Re: [PATCH 0/2] um: improve UML page fault handling

From: Richard Weinberger
Date: Thu Jan 04 2024 - 18:22:30 EST


----- Ursprüngliche Mail -----
> Von: "Petr Tesarik" <petrtesarik@xxxxxxxxxxxxxxx>
> An: "richard" <richard@xxxxxx>, "anton ivanov" <anton.ivanov@xxxxxxxxxxxxxxxxxx>, "Johannes Berg"
> <johannes@xxxxxxxxxxxxxxxx>, "linux-um" <linux-um@xxxxxxxxxxxxxxxxxxx>, "linux-kernel" <linux-kernel@xxxxxxxxxxxxxxx>
> CC: "Roberto Sassu" <roberto.sassu@xxxxxxxxxxxxxxx>, petr@xxxxxxxxxxx, "Petr Tesarik"
> <petr.tesarik1@xxxxxxxxxxxxxxxxxxx>
> Gesendet: Freitag, 15. Dezember 2023 13:14:29
> Betreff: [PATCH 0/2] um: improve UML page fault handling

> From: Petr Tesarik <petr.tesarik1@xxxxxxxxxxxxxxxxxxx>
>
> Improve UML handling of segmentation faults in kernel mode. Although
> such page faults are generally caused by a kernel bug, it is annoying
> if they cause an infinite loop, or panic the kernel. More importantly,
> a robust implementation allows to write KUnit tests for various guard
> pages, preventing potential kernel self-protection regressions.
>
> Petr Tesarik (2):
> um: do not panic on kernel mode faults
> um: oops on accessing an non-present page in the vmalloc area

I think this is a good thing to have.
For the implementation side, this needs to use the oops_* helpers
from kernel/panic.c and taint the kernel, etc...
See arch/x86/kernel/dumpstack.c die() and friends.

Thanks,
//richard