From: Andrew Morton <akpm@linux-foundation.org>
To: Fabian Frederick <fabf@skynet.be>
Cc: linux-kernel@vger.kernel.org, rdunlap <rdunlap@infradead.org>
Subject: Re: [RFC 2/2] Arch: Kconfig: Disable obsolete syscalls
Date: Wed, 12 Feb 2014 13:13:14 -0800 [thread overview]
Message-ID: <20140212131314.ef423a5b1214b0a33345f03d@linux-foundation.org> (raw)
In-Reply-To: <20140212210440.6148aaa3b75240627576ba3f@skynet.be>
On Wed, 12 Feb 2014 21:04:40 +0800 Fabian Frederick <fabf@skynet.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.
next prev parent reply other threads:[~2014-02-12 21:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-12 13:04 Fabian Frederick
2014-02-12 21:13 ` Andrew Morton [this message]
2014-02-12 13:23 ` Fabian Frederick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140212131314.ef423a5b1214b0a33345f03d@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=fabf@skynet.be \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®