sys_sysfs: Add CONFIG_SYSFS_SYSCALL
PATCH 1/1 sys_sysfs: Add CONFIG_SYSFS_SYSCALL
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
--- fs/filesystems.c | 2 ++ init/Kconfig | 10 ++++++++++ kernel/sys_ni.c | 1 + 3 files changed, 13 insertions(+)
fs/filesystems.c +2 -0
@@ -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) {
init/Kconfig +10 -0
@@ -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
kernel/sys_ni.c +1 -0
@@ -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);
Signature · 1 line
1.8.1.4
Quoted 11 lines · Fabian Frederick
sys_sysfsis an obsolete system call no longer supported by libc ...(quoted diff) +0
-3-This patch adds a default CONFIG_SYSFS_SYSCALL=y -Option can be turned off in expert mode. -cond_syscall added to kernel/sys_ni.cSigned-off-by Fabian Frederick <[email protected]>--- fs/filesystems.c | 2 ++ init/Kconfig | 10 ++++++++++ kernel/sys_ni.c | 1 + 3 files changed, 13 insertions(+)
did anyone ever ship userspace that actually used that syscall ?
Some ancient version of udev that probably doesn't work on a modern kernel anyway maybe ?
I wonder if it's something we can make -ENOSYS unconditionally at some point, and remove all that code entirely.
Dave
Quoted 6 lines · Dave Jones
Quoted 5 lines · Fabian Frederick
sys_sysfsis an obsolete system call no longer supported by libc ...(quoted diff) +0
-3-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
Quoted 9 lines
Quoted 6 lines
Signed-off-by Fabian Frederick <[email protected]>--- fs/filesystems.c | 2 ++ init/Kconfig | 10 ++++++++++ kernel/sys_ni.c | 1 + 3 files changed, 13 insertions(+)did anyone ever ship userspace that actually used that syscall ?
Some ancient version of udev that probably doesn't work on a modern kernel anyway maybe ?
sys_sysfs doesn't have anything to do with /sys/ and udev in any way that I know of, it's a much older thing, a sysv syscall that can return the index, name, or max index of a filesystem.
And yes, I got confused by it all the time when creating sysfs :)
thanks,
greg k-h
Quoted 14 lines · Greg KH
Quoted 13 lines · Dave Jones
Quoted 11 lines · Fabian Frederick
sys_sysfsis an obsolete system call no longer supported by libc ...(quoted diff) +0
-3-This patch adds a default CONFIG_SYSFS_SYSCALL=y -Option can be turned off in expert mode. -cond_syscall added to kernel/sys_ni.cSigned-off-by Fabian Frederick <[email protected]>--- fs/filesystems.c | 2 ++ init/Kconfig | 10 ++++++++++ kernel/sys_ni.c | 1 + 3 files changed, 13 insertions(+)
Quoted 8 lines
Quoted 2 lines
did anyone ever ship userspace that actually used that syscall ?
Some ancient version of udev that probably doesn't work on a modern kernel anyway maybe ?
sys_sysfsdoesn't have anything to do with/sys/and udev in any way that I know of, it's a much older thing, a sysv syscall that can return the index, name, or max index of a filesystem.And yes, I got confused by it all the time when creating sysfs :)
ah, Now I realise I've also made this mistake before. Tricky.
I wonder if anything does still use it though..
*goes to grep all of Fedora source*
Dave
Quoted 16 lines · On Thu, 13 Feb 2014 17:31:41 -0500 Dave Jones <[email protected]> wrote:
Quoted 11 lines · Fabian Frederick
sys_sysfsis an obsolete system call no longer supported by libc ...(quoted diff) +0
-3-This patch adds a default CONFIG_SYSFS_SYSCALL=y -Option can be turned off in expert mode. -cond_syscall added to kernel/sys_ni.cSigned-off-by Fabian Frederick <[email protected]>--- fs/filesystems.c | 2 ++ init/Kconfig | 10 ++++++++++ kernel/sys_ni.c | 1 + 3 files changed, 13 insertions(+)did anyone ever ship userspace that actually used that syscall ?
Some ancient version of udev that probably doesn't work on a modern kernel anyway maybe ?
Quoted 2 lines
I wonder if it's something we can make
-ENOSYSunconditionally at some point, and remove all that code entirely.
Perhaps we could make it `default n' now and see if we receive nastygrams?
Quoted 15 lines · On Thu, 13 Feb 2014 14:43:19 -0800 Andrew Morton <[email protected]>…
Quoted 13 lines · On Thu, 13 Feb 2014 17:31:41 -0500 Dave Jones <[email protected]> wrote:
Quoted 11 lines · Fabian Frederick
sys_sysfsis an obsolete system call no longer supported by libc ...(quoted diff) +0
-3-This patch adds a default CONFIG_SYSFS_SYSCALL=y -Option can be turned off in expert mode. -cond_syscall added to kernel/sys_ni.cSigned-off-by Fabian Frederick <[email protected]>--- fs/filesystems.c | 2 ++ init/Kconfig | 10 ++++++++++ kernel/sys_ni.c | 1 + 3 files changed, 13 insertions(+)
Quoted 7 lines
Quoted 5 lines
did anyone ever ship userspace that actually used that syscall ?
Some ancient version of udev that probably doesn't work on a modern kernel anyway maybe ?I wonder if it's something we can make
-ENOSYSunconditionally at some point, and remove all that code entirely.Perhaps we could make it `default n' now and see if we receive nastygrams?
As it seems very old, maybe we wouldn't have any trouble for users in linux-next but it could break something when going in stable (?).Having that patch with functions enabled by default will give us time to test it and have a pointer to it to remove later...
Fabian