[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y7A76+IBS4fnucrW@zn.tnic>
Date: Sat, 31 Dec 2022 14:40:59 +0100
From: Borislav Petkov <bp@...en8.de>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: "Jason A. Donenfeld" <Jason@...c4.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 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.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists