Re: [PATCH v2 4/7] kunit: Handle test faults

2024-03-11 Thread David Gow
On Sat, 2 Mar 2024 at 03:40, Mickaël Salaün wrote: > > 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

Re: [PATCH v2 7/7] kunit: Add tests for fault

2024-03-11 Thread David Gow
On Sat, 2 Mar 2024 at 03:40, Mickaël Salaün wrote: > > 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: >

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

2024-03-11 Thread David Gow
On Sat, 2 Mar 2024 at 03:40, Mickaël Salaün wrote: > > This helps identify the location of test faults. > > Cc: Brendan Higgins > Cc: David Gow > Cc: Rae Moar > Cc: Shuah Khan > Reviewed-by: Kees Cook > Signed-off-by: Mickaël Salaün > Link:

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

2024-03-11 Thread David Gow
On Sat, 2 Mar 2024 at 03:40, Mickaël Salaün wrote: > > 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: David Gow > Cc: Rae Moar > Cc: Shuah Khan >

Re: [PATCH v2 3/7] kunit: Fix timeout message

2024-03-11 Thread David Gow
On Sat, 2 Mar 2024 at 03:40, Mickaël Salaün wrote: > > The exit code is always checked, so let's properly handle the -ETIMEDOUT > error code. > > Cc: Brendan Higgins > Cc: David Gow > Cc: Rae Moar > Cc: Shuah Khan > Reviewed-by: Kees Cook > Signed-off-by: Mickaël Salaün > Link:

Re: [PATCH v2 2/7] kunit: Fix kthread reference

2024-03-11 Thread David Gow
On Sat, 2 Mar 2024 at 03:40, Mickaël Salaün wrote: > > 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: David Gow > Cc: Rae Moar > Cc: Shuah Khan > Reviewed-by: Kees

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

2024-03-11 Thread David Gow
On Sat, 2 Mar 2024 at 03:40, Mickaël Salaün wrote: > > 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

[GIT PULL] pstore updates for v6.9-rc1

2024-03-11 Thread Kees Cook
Hi Linus, Please pull these handful of pstore updates for v6.9-rc1. Details below. Thanks! -Kees The following changes since commit 41bccc98fb7931d63d03f326a746ac4d429c1dd3: Linux 6.8-rc2 (2024-01-28 17:01:12 -0800) are available in the Git repository at:

Re: [PATCH v2 4/7] kunit: Handle test faults

2024-03-11 Thread Rae Moar
On Fri, Mar 1, 2024 at 2:40 PM Mickaël Salaün wrote: > > 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

Re: [PATCH AUTOSEL 6.1 10/12] enic: Avoid false positive under FORTIFY_SOURCE

2024-03-11 Thread Pavel Machek
Hi! > From: Kees Cook > > [ Upstream commit 40b9385dd8e6a0515e1c9cd06a277483556b7286 ] > > FORTIFY_SOURCE has been ignoring 0-sized destinations while the kernel > code base has been converted to flexible arrays. In order to enforce > the 0-sized destinations (e.g. with __counted_by), the

Re: [PATCH v2] overflow: Change DEFINE_FLEX to take __counted_by member

2024-03-11 Thread Tony Nguyen
On 3/11/2024 2:28 AM, Simon Horman wrote: On Sat, Mar 09, 2024 at 12:32:45PM -0800, Kees Cook wrote: On Fri, Mar 08, 2024 at 08:20:18PM +, Simon Horman wrote: On Wed, Mar 06, 2024 at 03:51:36PM -0800, Kees Cook wrote: The norm should be flexible array structures with __counted_by

Re: [PATCH] exec: Simplify remove_arg_zero() error path

2024-03-11 Thread Jan Kara
On Sat 09-03-24 13:48:30, Kees Cook wrote: > We don't need the "out" label any more, so remove "ret" and return > directly on error. > > Signed-off-by: Kees Cook Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- >

Re: [PATCH][next] net/smc: Avoid -Wflex-array-member-not-at-end warnings

2024-03-11 Thread Wen Gu
On 2024/3/8 07:46, Gustavo A. R. Silva wrote: On 3/7/24 02:17, Jan Karcher wrote: On 04/03/2024 10:00, Wen Gu wrote: On 2024/3/2 02:40, Gustavo A. R. Silva wrote: -Wflex-array-member-not-at-end is coming in GCC-14, and we are getting ready to enable it globally. There are currently

Re: [PATCH v2] overflow: Change DEFINE_FLEX to take __counted_by member

2024-03-11 Thread Simon Horman
On Sat, Mar 09, 2024 at 12:32:45PM -0800, Kees Cook wrote: > On Fri, Mar 08, 2024 at 08:20:18PM +, Simon Horman wrote: > > On Wed, Mar 06, 2024 at 03:51:36PM -0800, Kees Cook wrote: > > > The norm should be flexible array structures with __counted_by > > > annotations, so DEFINE_FLEX() is