diff options
Diffstat (limited to 'kernel/ksysfs.c')
| -rw-r--r-- | kernel/ksysfs.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c index 0b624e791805..3b053c04dd86 100644 --- a/kernel/ksysfs.c +++ b/kernel/ksysfs.c | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/kexec.h> | 16 | #include <linux/kexec.h> |
| 17 | #include <linux/profile.h> | 17 | #include <linux/profile.h> |
| 18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
| 19 | #include <linux/capability.h> | ||
| 19 | 20 | ||
| 20 | #define KERNEL_ATTR_RO(_name) \ | 21 | #define KERNEL_ATTR_RO(_name) \ |
| 21 | static struct kobj_attribute _name##_attr = __ATTR_RO(_name) | 22 | static struct kobj_attribute _name##_attr = __ATTR_RO(_name) |
| @@ -131,6 +132,14 @@ KERNEL_ATTR_RO(vmcoreinfo); | |||
| 131 | 132 | ||
| 132 | #endif /* CONFIG_KEXEC */ | 133 | #endif /* CONFIG_KEXEC */ |
| 133 | 134 | ||
| 135 | /* whether file capabilities are enabled */ | ||
| 136 | static ssize_t fscaps_show(struct kobject *kobj, | ||
| 137 | struct kobj_attribute *attr, char *buf) | ||
| 138 | { | ||
| 139 | return sprintf(buf, "%d\n", file_caps_enabled); | ||
| 140 | } | ||
| 141 | KERNEL_ATTR_RO(fscaps); | ||
| 142 | |||
| 134 | /* | 143 | /* |
| 135 | * Make /sys/kernel/notes give the raw contents of our kernel .notes section. | 144 | * Make /sys/kernel/notes give the raw contents of our kernel .notes section. |
| 136 | */ | 145 | */ |
| @@ -158,6 +167,7 @@ struct kobject *kernel_kobj; | |||
| 158 | EXPORT_SYMBOL_GPL(kernel_kobj); | 167 | EXPORT_SYMBOL_GPL(kernel_kobj); |
| 159 | 168 | ||
| 160 | static struct attribute * kernel_attrs[] = { | 169 | static struct attribute * kernel_attrs[] = { |
| 170 | &fscaps_attr.attr, | ||
| 161 | #if defined(CONFIG_HOTPLUG) | 171 | #if defined(CONFIG_HOTPLUG) |
| 162 | &uevent_seqnum_attr.attr, | 172 | &uevent_seqnum_attr.attr, |
| 163 | &uevent_helper_attr.attr, | 173 | &uevent_helper_attr.attr, |
