larify why the start address is checked
v2:
- add include
Fixes: 2810c1e99867 ("kunit: Fix wild-memory-access bug in
kunit_free_suite_set()")
Reviewed-by: David Gow
Tested-by: Rae Moar
Tested-by: Richard Fitzgerald
Reviewed-by: Javier Martinez Canillas
Signed-off-by: Marco Pagani
On 2024-01-08 08:27, David Gow wrote:
> On Wed, 6 Dec 2023 at 23:07, Marco Pagani wrote:
>>
>> Commit 2810c1e99867 ("kunit: Fix wild-memory-access bug in
>> kunit_free_suite_set()") fixed a wild-memory-access bug that could have
>> happened during the l
ot;kunit: Fix wild-memory-access bug in
kunit_free_suite_set()")
Tested-by: Richard Fitzgerald
Reviewed-by: Javier Martinez Canillas
Signed-off-by: Marco Pagani
---
lib/kunit/test.c | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/lib/kunit/tes
On 28/11/23 12:15, Javier Martinez Canillas wrote:
> Marco Pagani writes:
>
> Hello Marco,
>
> [...]
>
>> @@ -737,12 +738,14 @@ static void kunit_module_exit(struct module *mod)
>> };
>> const char *action = kunit_action();
>>
>&g
s is still
pointing to the original address that was set when looking up the
.kunit_test_suites section of the module, then the loading phase has
failed and there's no memory to be freed.
v2:
- add include
Fixes: 2810c1e99867 ("kunit: Fix wild-memory-access bug in
kunit_free_suite
On 2023-10-17 03:28, Jinjie Ruan wrote:
>
>
> On 2023/10/17 4:35, Marco Pagani wrote:
>> Commit 2810c1e99867 ("kunit: Fix wild-memory-access bug in
>> kunit_free_suite_set()") is causing all test suites to run (when
>> built as modules) while still
has failed
and mod->kunit_suites has not been allocated using kmalloc_array().
Fixes: 2810c1e99867 ("kunit: Fix wild-memory-access bug in
kunit_free_suite_set()")
Signed-off-by: Marco Pagani
---
lib/kunit/test.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --g
_sys_init_module+0xa0/0xa0
> ? userfaultfd_unmap_prep+0x3d0/0x3d0
> ? _raw_spin_lock_bh+0xe0/0xe0
> idempotent_init_module+0x339/0x610
> ? init_module_from_file+0x130/0x130
> ? __fget_light+0x57/0x500
> __x64_sys_finit_module+0xba/0x130
> do_syscall_64+0x35/0x
Fix wild-memory-access bug in
kunit_free_suite_set()")
Signed-off-by: Marco Pagani
---
lib/kunit/test.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/kunit/test.c b/lib/kunit/test.c
index 421f13981412..242f26ad387a 100644
--- a/lib/kunit/test.c
+++ b/lib/kun