[PATCH v2 0/2] Fix mm/rodata_test

Petr Tesarik posted 2 patches 4 days, 1 hour ago
mm/rodata_test.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
[PATCH v2 0/2] Fix mm/rodata_test
Posted by Petr Tesarik 4 days, 1 hour ago
Make sure that the test actually reads the read-only memory location.
Verify that the variable contains the expected value rather than any
non-zero value.

Petr Tesarik (2):
  mm/rodata_test: use READ_ONCE() to read const variable
  mm/rodata_test: verify test data is unchanged, rather than non-zero

 mm/rodata_test.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

-- 
2.46.1
Re: [PATCH v2 0/2] Fix mm/rodata_test
Posted by Kees Cook 3 days, 19 hours ago
On Tue, Nov 19, 2024 at 12:37:37PM +0100, Petr Tesarik wrote:
> Make sure that the test actually reads the read-only memory location.
> Verify that the variable contains the expected value rather than any
> non-zero value.
> 
> Petr Tesarik (2):
>   mm/rodata_test: use READ_ONCE() to read const variable
>   mm/rodata_test: verify test data is unchanged, rather than non-zero
> 
>  mm/rodata_test.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)

Nice fixes! Thanks for catching these.

Reviewed-by: Kees Cook <kees@kernel.org>

-- 
Kees Cook