lkml.org 
[lkml]   [2018]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.

\
 
 \ /
  Last update: 2018-03-16 09:48    [W:0.100 / U:1.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site