[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y7A8qP05B0YRbQIN@zx2c4.com>
Date: Sat, 31 Dec 2022 14:44:08 +0100
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: Borislav Petkov <bp@...en8.de>
Cc: "H. Peter Anvin" <hpa@...or.com>, pbonzini@...hat.com,
ebiggers@...nel.org, x86@...nel.org, linux-kernel@...r.kernel.org,
qemu-devel@...gnu.org, ardb@...nel.org, kraxel@...hat.com,
philmd@...aro.org
Subject: Re: [PATCH qemu] x86: don't let decompressed kernel image clobber
setup_data
On Sat, Dec 31, 2022 at 02:40:59PM +0100, Borislav Petkov wrote:
> On Fri, Dec 30, 2022 at 05:06:55PM -0800, H. Peter Anvin wrote:
> > This needs to be something like:
> >
> > kernel_add_identity_map(sd_addr, sd_addr + sizeof(*sd));
> > kernel_add_identity_map(sd_addr + sizeof(*sd),
> > sd_addr + sizeof(*sd) + sd->len);
>
> It still #PFs with that:
>
> (gdb) bt
> #0 0xffffffff84738576 in native_halt () at ./arch/x86/include/asm/irqflags.h:57
> #1 halt () at ./arch/x86/include/asm/irqflags.h:98
> #2 early_fixup_exception (regs=regs@...ry=0xffffffff84007dc8, trapnr=trapnr@...ry=14) at arch/x86/mm/extable.c:340
> #3 0xffffffff846ff465 in do_early_exception (regs=0xffffffff84007dc8, trapnr=14) at arch/x86/kernel/head64.c:424
> #4 0xffffffff846ff14f in early_idt_handler_common () at arch/x86/kernel/head_64.S:483
> #5 0xc149f9894908788d in ?? ()
> #6 0xffffffffff2003fc in ?? ()
> #7 0x0000000000000010 in fixed_percpu_data ()
> #8 0xdffffc0000000000 in ?? ()
> #9 0xffffffff84007ea8 in init_thread_union ()
> #10 0xffffffffff20088d in ?? ()
> #11 0x0000000000000000 in ?? ()
>
> /me goes to dig more.
Are you using patch v1 minus the 62 MiB thing? If you haven't applied
patch v1 and then removed the 62 MiB limitation in it, then you've
misunderstood the conversation again.
Please see my reproduction steps to Peter:
https://lore.kernel.org/lkml/Y68K4mPuz6edQkCX@zx2c4.com/
Jason
Powered by blists - more mailing lists