lkml.org 
[lkml]   [2010]   [Aug]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] init/do_mounts.c: replace sys_mount() to do_mount()
Date
On Tuesday 17 August 2010, Namhyung Kim wrote:
> 2010-08-17 (화), 15:15 +0200, Arnd Bergmann:
> > AFAICT there is no need for the copy at all here. The reason that sys_mount
> > copies to a separate page is that it gets passed an arbitrary-length user
> > input.
>
> Right. But make sure to user options never exceed a page, do_mount() has
> following code:
>
> if (data_page)
> ((char *)data_page)[PAGE_SIZE - 1] = 0;

Hmm, how very unexpected...

Maybe you can fix that as well in the same patch and move this safeguard
into the copy_mount_options() function? I guess ideally we'd even mark
the arguments to do_mount() as pointers to const, but that might create
an excessive amount of churn.

Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2010-08-17 15:45    [W:0.054 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site