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

2024-03-19 Thread Richard Weinberger
- Ursprüngliche Mail - > Von: "Petr Tesarik" > An: "richard" , "anton ivanov" > , "Johannes Berg" > , "linux-um" , > "linux-kernel" > CC: "Roberto Sassu" , "petr" > Gesendet: Montag, 18. März 2024 14:09:07 > Betreff: Re: [PATCH RESEND 1/1] um: oops on accessing a non-present page in >

[PATCH v3 5/7] kunit: Fix KUNIT_SUCCESS() calls in iov_iter tests

2024-03-19 Thread Mickaël Salaün
Fix KUNIT_SUCCESS() calls to pass a test argument. This is a no-op for now because this macro does nothing, but it will be required for the next commit. Cc: Brendan Higgins Cc: Rae Moar Cc: Shuah Khan Reviewed-by: Kees Cook Reviewed-by: David Gow Signed-off-by: Mickaël Salaün Link: https://

[PATCH v3 7/7] kunit: Add tests for fault

2024-03-19 Thread Mickaël Salaün
Add a test case to check NULL pointer dereference and make sure it would result as a failed test. The full kunit_fault test suite is marked as skipped when run on UML because it would result to a kernel panic. Tested with: ./tools/testing/kunit/kunit.py run --arch x86_64 kunit_fault ./tools/testi

[PATCH v3 3/7] kunit: Fix timeout message

2024-03-19 Thread Mickaël Salaün
The exit code is always checked, so let's properly handle the -ETIMEDOUT error code. Cc: Brendan Higgins Cc: Shuah Khan Reviewed-by: Kees Cook Reviewed-by: David Gow Reviewed-by: Rae Moar Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20240319104857.70783-4-...@digikod.net ---

[PATCH v3 2/7] kunit: Fix kthread reference

2024-03-19 Thread Mickaël Salaün
There is a race condition when a kthread finishes after the deadline and before the call to kthread_stop(), which may lead to use after free. Cc: Brendan Higgins Cc: Shuah Khan Reviewed-by: Kees Cook Fixes: adf505457032 ("kunit: fix UAF when run kfence test case test_gfpzero") Reviewed-by: Davi

[PATCH v3 0/7] Handle faults in KUnit tests

2024-03-19 Thread Mickaël Salaün
Hi, This patch series teaches KUnit to handle kthread faults as errors, and it brings a few related fixes and improvements. Shuah, everything should be OK now, could you please merge this series? All these tests pass (on top of v6.8): ./tools/testing/kunit/kunit.py run --alltests ./tools/testing

[PATCH v3 1/7] kunit: Handle thread creation error

2024-03-19 Thread Mickaël Salaün
Previously, if a thread creation failed (e.g. -ENOMEM), the function was called (kunit_catch_run_case or kunit_catch_run_case_cleanup) without marking the test as failed. Instead, fill try_result with the error code returned by kthread_run(), which will mark the test as failed and print "internal

[PATCH v3 4/7] kunit: Handle test faults

2024-03-19 Thread Mickaël Salaün
Previously, when a kernel test thread crashed (e.g. NULL pointer dereference, general protection fault), the KUnit test hanged for 30 seconds and exited with a timeout error. Fix this issue by waiting on task_struct->vfork_done instead of the custom kunit_try_catch.try_completion, and track the ex

[PATCH v3 6/7] kunit: Print last test location on fault

2024-03-19 Thread Mickaël Salaün
This helps identify the location of test faults with opportunistic calls to _KUNIT_SAVE_LOC(). This can be useful while writing tests or debugging them. It is possible to call KUNIT_SUCCESS() to explicit save last location. Cc: Brendan Higgins Cc: David Gow Cc: Rae Moar Cc: Shuah Khan Review

Re: [PATCH vhost v3 0/4] refactor the params of find_vqs()

2024-03-19 Thread Michael S. Tsirkin
On Tue, Mar 12, 2024 at 10:10:09AM +0800, Xuan Zhuo wrote: > This pathset is splited from the > > > http://lore.kernel.org/all/20240229072044.77388-1-xuanz...@linux.alibaba.com > > That may needs some cycles to discuss. But that notifies too many people. > > But just the four commits need