[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linux 6.13-rc3 many different panics in Xen PV dom0



On Thu, Jan 02, 2025 at 12:30:10PM +0100, Juergen Gross wrote:
> On 02.01.25 11:20, Jürgen Groß wrote:
> > On 19.12.24 17:14, Marek Marczykowski-Górecki wrote:
> > > Hi,
> > > 
> > > It crashes on boot like below, most of the times. But sometimes (rarely)
> > > it manages to stay alive. Below I'm pasting few of the crashes that look
> > > distinctly different, if you follow the links, you can find more of
> > > them. IMHO it looks like some memory corruption bug somewhere. I tested
> > > also Linux 6.13-rc2 before, and it had very similar issue.
> > 
> > ...
> > 
> > > 
> > > Full log:
> > > https://openqa.qubes-os.org/tests/122879/logfile?filename=serial0.txt
> > 
> > I can reproduce a crash with 6.13-rc5 PV dom0.
> > 
> > What is really interesting in the logs: most crashes seem to happen right
> > after a module being loaded (in my reproducer it was right after loading
> > the first module).
> > 
> > I need to go through the 6.13 commits, but I think I remember having seen
> > a patch optimizing module loading by using large pages for addressing the
> > loaded modules. Maybe the case of no large pages being available isn't
> > handled properly.
> 
> Seems I was right.
> 
> For me the following diff fixes the issue. Marek, can you please confirm
> it fixes your crashes, too?

Thanks for looking into it!
Will do, I've pushed it to
https://github.com/QubesOS/qubes-linux-kernel/pull/662, CI will build it
and then I'll post it to openQA.

> diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
> index c6d29f283001..b5b7964b34b0 100644
> --- a/arch/x86/mm/init.c
> +++ b/arch/x86/mm/init.c
> @@ -1080,7 +1080,7 @@ struct execmem_info __init *execmem_arch_setup(void)
> 
>         start = MODULES_VADDR + offset;
> 
> -       if (IS_ENABLED(CONFIG_ARCH_HAS_EXECMEM_ROX)) {
> +       if (IS_ENABLED(CONFIG_ARCH_HAS_EXECMEM_ROX) &&
> cpu_feature_enabled(X86_FEATURE_PSE)) {
>                 pgprot = PAGE_KERNEL_ROX;
>                 flags = EXECMEM_KASAN_SHADOW | EXECMEM_ROX_CACHE;
>         } else {
> 
> 
> Juergen






-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

Attachment: signature.asc
Description: PGP signature


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.