[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140212131314.ef423a5b1214b0a33345f03d@linux-foundation.org>
Date: Wed, 12 Feb 2014 13:13:14 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Fabian Frederick <fabf@...net.be>
Cc: linux-kernel@...r.kernel.org, rdunlap <rdunlap@...radead.org>
Subject: Re: [RFC 2/2] Arch: Kconfig: Disable obsolete syscalls
On Wed, 12 Feb 2014 21:04:40 +0800 Fabian Frederick <fabf@...net.be> wrote:
> 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.
>
Are there any other syscalls which will fall under
CONFIG_DISABLE_OBSOLETE_SYSCALLS?
There are plenty of other syscalls which can be disabled via Kconfig.
As far as I recall, they each use their own CONFIG_foo.
So I'm thinking it would be better to add a CONFIG_SYS_SYSFS or
whatever which enables this syscall only. It defaults to y.
> --- 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*/
And this should be done in kernel/sys_ni.c along with all the others.
--
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