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 01:46:53 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Dominik Brodowski <linux@...inikbrodowski.net>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.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 09:11:27PM +0100, Arnd Bergmann wrote:
> Shouldn't the callers of sys_mount just call do_mount() instead?
> 
> As I understand it, sys_mount is already a wrapper around do_mount()
> that copies its arguments from user space, but we don't need that
> when called from inside the kernel.

In general yes.  do_mount.c has some really strange calling context
where it tries to operate on kernel and user pointers interchangably,
but even with that just switching to do_mount seems like the right thing
to me.  In fact once we do that and take care or chdir/chdoot we could
probably get rid of the sparse disable hack in favour of a few __force
casts in change_floppy and sort this mess out as well.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ