diff options
-rw-r--r-- | Documentation/sysctl/kernel.txt | 8 | ||||
-rw-r--r-- | kernel/sysctl.c | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 704e474a93df..1f2463671a1a 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -24,6 +24,7 @@ show up in /proc/sys/kernel: | |||
24 | - bootloader_type [ X86 only ] | 24 | - bootloader_type [ X86 only ] |
25 | - bootloader_version [ X86 only ] | 25 | - bootloader_version [ X86 only ] |
26 | - callhome [ S390 only ] | 26 | - callhome [ S390 only ] |
27 | - cap_last_cap | ||
27 | - core_pattern | 28 | - core_pattern |
28 | - core_pipe_limit | 29 | - core_pipe_limit |
29 | - core_uses_pid | 30 | - core_uses_pid |
@@ -155,6 +156,13 @@ on has a service contract with IBM. | |||
155 | 156 | ||
156 | ============================================================== | 157 | ============================================================== |
157 | 158 | ||
159 | cap_last_cap | ||
160 | |||
161 | Highest valid capability of the running kernel. Exports | ||
162 | CAP_LAST_CAP from the kernel. | ||
163 | |||
164 | ============================================================== | ||
165 | |||
158 | core_pattern: | 166 | core_pattern: |
159 | 167 | ||
160 | core_pattern is used to specify a core dumpfile pattern name. | 168 | core_pattern is used to specify a core dumpfile pattern name. |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 2d2ecdcc8cdb..c49d66658ec0 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -57,6 +57,7 @@ | |||
57 | #include <linux/pipe_fs_i.h> | 57 | #include <linux/pipe_fs_i.h> |
58 | #include <linux/oom.h> | 58 | #include <linux/oom.h> |
59 | #include <linux/kmod.h> | 59 | #include <linux/kmod.h> |
60 | #include <linux/capability.h> | ||
60 | 61 | ||
61 | #include <asm/uaccess.h> | 62 | #include <asm/uaccess.h> |
62 | #include <asm/processor.h> | 63 | #include <asm/processor.h> |
@@ -134,6 +135,7 @@ static int minolduid; | |||
134 | static int min_percpu_pagelist_fract = 8; | 135 | static int min_percpu_pagelist_fract = 8; |
135 | 136 | ||
136 | static int ngroups_max = NGROUPS_MAX; | 137 | static int ngroups_max = NGROUPS_MAX; |
138 | static const int cap_last_cap = CAP_LAST_CAP; | ||
137 | 139 | ||
138 | #ifdef CONFIG_INOTIFY_USER | 140 | #ifdef CONFIG_INOTIFY_USER |
139 | #include <linux/inotify.h> | 141 | #include <linux/inotify.h> |
@@ -740,6 +742,13 @@ static struct ctl_table kern_table[] = { | |||
740 | .mode = 0444, | 742 | .mode = 0444, |
741 | .proc_handler = proc_dointvec, | 743 | .proc_handler = proc_dointvec, |
742 | }, | 744 | }, |
745 | { | ||
746 | .procname = "cap_last_cap", | ||
747 | .data = (void *)&cap_last_cap, | ||
748 | .maxlen = sizeof(int), | ||
749 | .mode = 0444, | ||
750 | .proc_handler = proc_dointvec, | ||
751 | }, | ||
743 | #if defined(CONFIG_LOCKUP_DETECTOR) | 752 | #if defined(CONFIG_LOCKUP_DETECTOR) |
744 | { | 753 | { |
745 | .procname = "watchdog", | 754 | .procname = "watchdog", |