[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191216095137.omiovbgt5bwjahku@isilmar-4.linta.de>
Date: Mon, 16 Dec 2019 10:51:37 +0100
From: Dominik Brodowski <linux@...inikbrodowski.net>
To: Borislav Petkov <bp@...en8.de>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/5] init: use do_mount() instead of ksys_mount()
On Mon, Dec 16, 2019 at 10:45:56AM +0100, Borislav Petkov wrote:
> On Thu, Dec 12, 2019 at 07:14:20PM +0100, Dominik Brodowski wrote:
> > diff --git a/init/do_mounts.c b/init/do_mounts.c
> > index 43f6d098c880..f55cbd9cb818 100644
> > --- a/init/do_mounts.c
> > +++ b/init/do_mounts.c
> > @@ -387,12 +387,25 @@ static void __init get_fs_names(char *page)
> > *s = '\0';
> > }
> >
> > -static int __init do_mount_root(char *name, char *fs, int flags, void *data)
> > +static int __init do_mount_root(const char *name, const char *fs,
> > + const int flags, const void *data)
> > {
> > struct super_block *s;
> > - int err = ksys_mount(name, "/root", fs, flags, data);
> > - if (err)
> > - return err;
> > + char *data_page;
> > + struct page *p;
> > + int ret;
> > +
> > + /* do_mount() requires a full page as fifth argument */
> > + p = alloc_page(GFP_KERNEL);
> > + if (!p)
> > + return -ENOMEM;
> > +
> > + data_page = page_address(p);
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> That doesn't work in my guest as it gives a funny address:
>
> [ 3.155314] mount_block_root: entry
> [ 3.155868] mount_block_root: fs_name: [ext3]
> [ 3.156512] do_mount_root: will copy data page: 0x00000000adf0ddb8
>
> leading to the splat below.
Does
https://lore.kernel.org/lkml/CAHk-=wh8VLe3AEKhz=1bzSO=1fv4EM71EhufxuC=Gp=+bLhXoA@mail.gmail.com/
solve the issue?
Thanks,
Dominik
Powered by blists - more mailing lists