sysctl: const-ify ngroups_max
Subsystems (2)
PATCH 1/1 sysctl: const-ify ngroups_max
ngroups_max is a read-only sysctl entry, reflecting NGROUPS_MAX. Make it const, in the same way as cap_last_cap.
---
This is split out from 2f4c33063ad7 ("docs: sysctl/kernel: document ngroups_max") which conflicted with f461d2dcd511 ("sysctl: avoid forward declarations").
kernel/sysctl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/sysctl.c +2 -2
@@ -133,7 +133,7 @@ static unsigned long dirty_bytes_min = 2 * PAGE_SIZE;static int maxolduid =65535 ;static int minolduid; -static int ngroups_max =NGROUPS_MAX ; +static const int ngroups_max =NGROUPS_MAX ;static const int cap_last_cap =CAP_LAST_CAP ;/*
@@ -2232,7 +2232,7 @@ static struct ctl_table kern_table[] = {#endif { .procname = "ngroups_max", - .data = &ngroups_max, + .data = (void *)&ngroups_max, .maxlen = sizeof (int), .mode = 0444, .proc_handler = proc_dointvec,
base-commit: bdecf38f228bcca73b31ada98b5b7ba1215eb9c9
Signature · 1 line
2.20.1
Quoted 4 lines · Stephen Kitt
ngroups_maxis a read-only sysctl entry, reflectingNGROUPS_MAX. Make it const, in the same way ascap_last_cap.Signed-off-by Stephen Kitt <[email protected]>
Signature · 1 line
Kees Cook
Quoted 7 lines · Kees Cook
Quoted 4 lines · Stephen Kitt
ngroups_maxis a read-only sysctl entry, reflectingNGROUPS_MAX. Make it const, in the same way ascap_last_cap.Signed-off-by Stephen Kitt <[email protected]>Reviewed-by Kees Cook <[email protected]>
Kees, since there is quite a bit of sysctl cleanup stuff going on and I have a fs sysctl kitchen cleanup, are you alright if I carry this in a tree and send this to Andrew once done? This would hopefully avoid merge conflicts between these patches.
I have to still re-spin my fs sysctl stuff, but will wait to do that once Xiaoming bases his series on linux-next.
Luis
Quoted 9 lines · Luis Chamberlain
Quoted 7 lines · Kees Cook
Quoted 4 lines · Stephen Kitt
ngroups_maxis a read-only sysctl entry, reflectingNGROUPS_MAX. Make it const, in the same way ascap_last_cap.Signed-off-by Stephen Kitt <[email protected]>Reviewed-by Kees Cook <[email protected]>
Quoted 7 lines
Kees, since there is quite a bit of sysctl cleanup stuff going on and I have a fs sysctl kitchen cleanup, are you alright if I carry this in a tree and send this to Andrew once done? This would hopefully avoid merge conflicts between these patches.
I have to still re-spin my fs sysctl stuff, but will wait to do that once Xiaoming bases his series on linux-next.
Yeah, totally. I don't technically have a sysctl tree (I've always just had akpm take stuff), so go for it. I'm just doing reviews. :)
Signature · 1 line
Kees Cook
Quoted 15 lines · Kees Cook
Quoted 14 lines · Luis Chamberlain
Quoted 7 lines · Kees Cook
Quoted 4 lines · Stephen Kitt
ngroups_maxis a read-only sysctl entry, reflectingNGROUPS_MAX. Make it const, in the same way ascap_last_cap.Signed-off-by Stephen Kitt <[email protected]>Reviewed-by Kees Cook <[email protected]>Kees, since there is quite a bit of sysctl cleanup stuff going on and I have a fs sysctl kitchen cleanup, are you alright if I carry this in a tree and send this to Andrew once done? This would hopefully avoid merge conflicts between these patches.
Quoted 5 lines
Quoted 2 lines
I have to still re-spin my fs sysctl stuff, but will wait to do that once Xiaoming bases his series on linux-next.
Yeah, totally. I don't technically have a sysctl tree (I've always just had akpm take stuff), so go for it. I'm just doing reviews. :)
Oh, I don't want a tree either, it was just that I can imagine these series can easily create conflcits, so I wanted to avoid that before passing them on to Andrew.
Luis
Quoted 19 lines · Luis Chamberlain
Quoted 18 lines · Kees Cook
Quoted 16 lines · Luis Chamberlain
Quoted 7 lines · Kees Cook
Quoted 4 lines · Stephen Kitt
ngroups_maxis a read-only sysctl entry, reflectingNGROUPS_MAX. Make it const, in the same way ascap_last_cap.Signed-off-by Stephen Kitt <[email protected]>Reviewed-by Kees Cook <[email protected]>Kees, since there is quite a bit of sysctl cleanup stuff going on and I have a fs sysctl kitchen cleanup, are you alright if I carry this in a tree and send this to Andrew once done? This would hopefully avoid merge conflicts between these patches.
I have to still re-spin my fs sysctl stuff, but will wait to do that once Xiaoming bases his series on linux-next.
Quoted 6 lines
Quoted 2 lines
Yeah, totally. I don't technically have a sysctl tree (I've always just had akpm take stuff), so go for it. I'm just doing reviews. :)
Oh, I don't want a tree either, it was just that I can imagine these series can easily create conflcits, so I wanted to avoid that before passing them on to Andrew.
Yup, that's cool. I happily defer to you on these cleanups! :)
Signature · 1 line
Kees Cook