[PATCH 2/2] um: oops on accessing an non-present page in the vmalloc area

2023-12-15 Thread Petr Tesarik
From: Petr Tesarik If a segmentation fault is caused by an address in the vmalloc area, check that the target page is present. Currently, if the kernel hits a guard page the vmalloc area, UML assumes that the fault is caused merely by a stale mapping and will be fixed by flush_tlb_kernel_vm

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

2023-12-15 Thread Petr Tesarik
From: Petr Tesarik 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

[PATCH 1/2] um: do not panic on kernel mode faults

2023-12-15 Thread Petr Tesarik
From: Petr Tesarik Do not call panic() on unrecoverable page faults in kernel mode. Although such page faults always indicate a bug in the kernel, other architectures prefer to kill only the current process and continue. The new behavior is useful for testing intentional kernel mode page faults

[PATCH RESEND 1/1] um: oops on accessing a non-present page in the vmalloc area

2024-02-23 Thread Petr Tesarik
From: Petr Tesarik If a segmentation fault is caused by accessing an address in the vmalloc area, check that the target page is present. Currently, if the kernel hits a guard page in the vmalloc area, UML blindly assumes that the fault is caused by a stale mapping and will be fixed by

Re: [PATCH RESEND 1/1] um: oops on accessing a non-present page in the vmalloc area

2024-03-12 Thread Petr Tesarik
On 2/23/2024 3:04 PM, Petr Tesarik wrote: > From: Petr Tesarik > > If a segmentation fault is caused by accessing an address in the vmalloc > area, check that the target page is present. > > Currently, if the kernel hits a guard page in the vmalloc area, UML blindly > assu

Re: [PATCH RESEND 1/1] um: oops on accessing a non-present page in the vmalloc area

2024-03-18 Thread Petr Tesarik
On 3/12/2024 4:07 PM, Petr Tesarik wrote: > On 2/23/2024 3:04 PM, Petr Tesarik wrote: >> From: Petr Tesarik >> >> If a segmentation fault is caused by accessing an address in the vmalloc >> area, check that the target page is present. >> >> Currently,

Re: [PATCH RESEND 1/1] um: oops on accessing a non-present page in the vmalloc area

2024-03-20 Thread Petr Tesarik
On 3/19/2024 11:18 PM, Richard Weinberger wrote: > - Ursprüngliche Mail - >> Von: "Petr Tesarik" >> An: "richard" , "anton ivanov" >> , "Johannes Berg" >> , "linux-um" , >> "linux-kernel" &g

Re: [PATCH RESEND 1/1] um: oops on accessing a non-present page in the vmalloc area

2024-03-21 Thread Petr Tesarik
On 3/21/2024 5:44 AM, David Gow wrote: > On Fri, 23 Feb 2024 at 22:07, Petr Tesarik > wrote: >> >> From: Petr Tesarik >> >> If a segmentation fault is caused by accessing an address in the vmalloc >> area, check that the target page is present. >> >