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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 16 Mar 2018 09:58:46 -0700
From:   Linus Torvalds <torvalds@...ux-foundation.org>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Dominik Brodowski <linux@...inikbrodowski.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Al Viro <viro@...iv.linux.org.uk>,
        Andy Lutomirski <luto@...nel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH v2 14/36] fs: add ksys_mount() helper; remove in-kernel
 calls to sys_mount()

On Thu, Mar 15, 2018 at 1:11 PM, Arnd Bergmann <arnd@...db.de> wrote:
>
> Shouldn't the callers of sys_mount just call do_mount() instead?

So for most of these, I'd rather not really change the code and just
do a direct translation, but I have to agree that "sys_mount ->
do_mount" might be special.

As you say, the only thing sys_mount() does is to copy things from
user space and allocate temporaries, and then call do_mount(). And we
already use do_mount in other places.

So it translating sys_mount() to do_mount() might just be the right thing to do.

Of course, do_mount() still ends up doing yet more "translate user
mode stuff to kernel stuff", so it's kind o fa confusing half-way
state where the user mountpoint name is still in user space, and the
flags are still in the MS namespace, but the device name and the mount
options have been moved to kernel space.

So I dunno. It might make sense to convert to do_mount(), but in many
ways ksys_mount() that just passes *everything* as if it was a user
call is actually more logical, even if it's just pointless churn to
then copy things.

I do like the mindless "let's just use the SYSCALL_DEFINEx()
interfaces for in-kernel use" model, exactly because it's so
black-and-white and doesn't have these kinds of "on one hand.."
issues.

                   Linus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ