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:
parent
53a406803c
commit
9c5d03d362
47 changed files with 56 additions and 2 deletions
|
|
@ -132,6 +132,7 @@ struct genl_family nl802154_family __ro_after_init = {
|
|||
.module = THIS_MODULE,
|
||||
.small_ops = ieee802154_ops,
|
||||
.n_small_ops = ARRAY_SIZE(ieee802154_ops),
|
||||
.resv_start_op = IEEE802154_LLSEC_DEL_SECLEVEL + 1,
|
||||
.mcgrps = ieee802154_mcgrps,
|
||||
.n_mcgrps = ARRAY_SIZE(ieee802154_mcgrps),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2500,6 +2500,7 @@ static struct genl_family nl802154_fam __ro_after_init = {
|
|||
.module = THIS_MODULE,
|
||||
.ops = nl802154_ops,
|
||||
.n_ops = ARRAY_SIZE(nl802154_ops),
|
||||
.resv_start_op = NL802154_CMD_DEL_SEC_LEVEL + 1,
|
||||
.mcgrps = nl802154_mcgrps,
|
||||
.n_mcgrps = ARRAY_SIZE(nl802154_mcgrps),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue