sys_sysfs: Add CONFIG_SYSFS_SYSCALL
authorFabian Frederick <fabf@skynet.be>
Thu, 3 Apr 2014 21:48:25 +0000 (14:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:21:05 +0000 (16:21 -0700)
sys_sysfs is an obsolete system call no longer supported by libc.

 - This patch adds a default CONFIG_SYSFS_SYSCALL=y

 - Option can be turned off in expert mode.

 - cond_syscall added to kernel/sys_ni.c

[akpm@linux-foundation.org: tweak Kconfig help text]
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/filesystems.c
init/Kconfig
kernel/sys_ni.c

index 92567d95ba6ab1adbf94c2ead01f94b60ae02a40..5797d45a78cb29fddcff617a8fc03139ed609369 100644 (file)
@@ -121,6 +121,7 @@ int unregister_filesystem(struct file_system_type * fs)
 
 EXPORT_SYMBOL(unregister_filesystem);
 
+#ifdef CONFIG_SYSFS_SYSCALL
 static int fs_index(const char __user * __name)
 {
        struct file_system_type * tmp;
@@ -199,6 +200,7 @@ SYSCALL_DEFINE3(sysfs, int, option, unsigned long, arg1, unsigned long, arg2)
        }
        return retval;
 }
+#endif
 
 int __init get_filesystem_list(char *buf)
 {
index d56cb03c1b491036c981582568d780303d3ca250..e45cc62904b3e967b6c7dd08dc57592d52429cc8 100644 (file)
@@ -1290,6 +1290,16 @@ config UID16
        help
          This enables the legacy 16-bit UID syscall wrappers.
 
+config SYSFS_SYSCALL
+       bool "Sysfs syscall support" if EXPERT
+       default y
+       ---help---
+         sys_sysfs is an obsolete system call no longer supported in libc.
+         Note that disabling this option is more secure but might break
+         compatibility with some systems.
+
+         If unsure say Y here.
+
 config SYSCTL_SYSCALL
        bool "Sysctl syscall support" if EXPERT
        depends on PROC_SYSCTL
index 7078052284fd9eda7bae8a86805054328af7bb4b..74395a95b7e96e6094e3845400169a937249559e 100644 (file)
@@ -146,6 +146,7 @@ cond_syscall(sys_io_destroy);
 cond_syscall(sys_io_submit);
 cond_syscall(sys_io_cancel);
 cond_syscall(sys_io_getevents);
+cond_syscall(sys_sysfs);
 cond_syscall(sys_syslog);
 cond_syscall(sys_process_vm_readv);
 cond_syscall(sys_process_vm_writev);