diff options
| author | Luis R. Rodriguez <[email protected]> | 2017-07-12 14:33:40 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2017-07-12 16:26:00 -0700 |
| commit | 61d9b56a89208d8cccd0b4cfec7e6959717e16e3 (patch) | |
| tree | 50a968ed0905e9acbf1655d4a342560b644f9115 /include/linux | |
| parent | 4f2fec00afa60aa8e5d1b7f2a8e0526900f55623 (diff) | |
sysctl: add unsigned int range support
To keep parity with regular int interfaces provide the an unsigned int
proc_douintvec_minmax() which allows you to specify a range of allowed
valid numbers.
Adding proc_douintvec_minmax_sysadmin() is easy but we can wait for an
actual user for that.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Luis R. Rodriguez <[email protected]>
Acked-by: Kees Cook <[email protected]>
Cc: Subash Abhinov Kasiviswanathan <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Al Viro <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sysctl.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 80d07816def0..225001d437ae 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h @@ -47,6 +47,9 @@ extern int proc_douintvec(struct ctl_table *, int, void __user *, size_t *, loff_t *); extern int proc_dointvec_minmax(struct ctl_table *, int, void __user *, size_t *, loff_t *); +extern int proc_douintvec_minmax(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, + loff_t *ppos); extern int proc_dointvec_jiffies(struct ctl_table *, int, void __user *, size_t *, loff_t *); extern int proc_dointvec_userhz_jiffies(struct ctl_table *, int, |