mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
genetlink: start to validate reserved header bytes
We had historically not checked that genlmsghdr.reserved is 0 on input which prevents us from using those precious bytes in the future. One use case would be to extend the cmd field, which is currently just 8 bits wide and 256 is not a lot of commands for some core families. To make sure that new families do the right thing by default put the onus of opting out of validation on existing families. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Acked-by: Paul Moore <paul@paul-moore.com> (NetLabel) Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
53a406803c
commit
9c5d03d362
@@ -294,6 +294,7 @@ static struct genl_family ZZZ_genl_family __ro_after_init = {
|
||||
.ops = ZZZ_genl_ops,
|
||||
.n_ops = ARRAY_SIZE(ZZZ_genl_ops),
|
||||
.mcgrps = ZZZ_genl_mcgrps,
|
||||
.resv_start_op = 42, /* drbd is currently the only user */
|
||||
.n_mcgrps = ARRAY_SIZE(ZZZ_genl_mcgrps),
|
||||
.module = THIS_MODULE,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user