All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] sys_sysfs: Add CONFIG_SYSFS_SYSCALL
@ 2014-02-13 14:09 Fabian Frederick
  2014-02-13 22:31 ` Dave Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Fabian Frederick @ 2014-02-13 14:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, rdunlap

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

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 fs/filesystems.c |  2 ++
 init/Kconfig     | 10 ++++++++++
 kernel/sys_ni.c  |  1 +
 3 files changed, 13 insertions(+)

diff --git a/fs/filesystems.c b/fs/filesystems.c
index 92567d9..5797d45 100644
--- a/fs/filesystems.c
+++ b/fs/filesystems.c
@@ -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)
 {
diff --git a/init/Kconfig b/init/Kconfig
index 009a797..013d13c 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -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 while being more secure breaks
+	  compatibility with other systems.
+
+	  If unsure say Y here.
+
 config SYSCTL_SYSCALL
 	bool "Sysctl syscall support" if EXPERT
 	depends on PROC_SYSCTL
diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c
index 7078052..74395a9 100644
--- a/kernel/sys_ni.c
+++ b/kernel/sys_ni.c
@@ -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);
-- 
1.8.1.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-02-19 20:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-13 14:09 [PATCH 1/1] sys_sysfs: Add CONFIG_SYSFS_SYSCALL Fabian Frederick
2014-02-13 22:31 ` Dave Jones
2014-02-13 22:38   ` Greg KH
2014-02-13 22:41     ` Dave Jones
2014-02-13 22:43   ` Andrew Morton
2014-02-19 12:49     ` Fabian Frederick

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.