lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140212210440.6148aaa3b75240627576ba3f@skynet.be>
Date:	Wed, 12 Feb 2014 21:04:40 +0800
From:	Fabian Frederick <fabf@...net.be>
To:	linux-kernel@...r.kernel.org
Cc:	akpm <akpm@...ux-foundation.org>, rdunlap <rdunlap@...radead.org>
Subject: [RFC 2/2] Arch: Kconfig: Disable obsolete syscalls

fs: sysfs syscall: Disable if DISABLE_OBSOLETE_SYSCALLS

sysfs syscall is obsolete (cf man sysfs).

Don't define fs_index, fs_name, fs_maxindex functions when
DISABLE_OBSOLETE_SYSCALLS is defined.
In that case, SYSCALL_DEFINE3(sysfs...) returns automatically -EINVAL.

Signed-off-by: Fabian Frederick <fabf@...net.be>
---
 fs/filesystems.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/fs/filesystems.c b/fs/filesystems.c
index 92567d9..079626d 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);
 
+#ifndef CONFIG_DISABLE_OBSOLETE_SYSCALLS
 static int fs_index(const char __user * __name)
 {
 	struct file_system_type * tmp;
@@ -199,6 +200,12 @@ SYSCALL_DEFINE3(sysfs, int, option, unsigned long, arg1, unsigned long, arg2)
 	}
 	return retval;
 }
+#else
+SYSCALL_DEFINE3(sysfs, int, option, unsigned long, arg1, unsigned long, arg2)
+{
+	return -EINVAL;
+}
+#endif /*CONFIG_DISABLE_OBSOLETE_SYSCALLS*/
 
 int __init get_filesystem_list(char *buf)
 {
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ