linux/tools/testing/selftests/damon
SeongJae Park 0b7623bdf8 selftests/damon: test removed scheme sysfs dir access bug
A DAMON sysfs user could start DAMON with a scheme, remove the sysfs
directory for the scheme, and then ask stats or schemes tried regions
update.  The related logic were not aware of the already removed directory
situation, so it was able to results in invalid memory accesses.  The fix
has made with commit 8468b48661 ("mm/damon/sysfs-schemes: skip stats
update if the scheme directory is removed"), though.  Add a selftest to
prevent such kinds of bugs from being introduced again.

Link: https://lkml.kernel.org/r/20221201170834.62823-1-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-12-11 18:12:15 -08:00
..
_chk_dependency.sh kselftests/damon: add support for cases where debugfs cannot be read 2022-06-27 14:14:41 -06:00
_debugfs_common.sh selftests/damon: split test cases 2021-12-10 17:10:56 -08:00
.gitignore selftests/damon: test debugfs file reads/writes with huge count 2021-12-10 17:10:56 -08:00
debugfs_attrs.sh selftests/damon: split test cases 2021-12-10 17:10:56 -08:00
debugfs_duplicate_context_creation.sh selftest/damon: add a test for duplicate context dirs creation 2022-10-03 14:03:06 -07:00
debugfs_empty_targets.sh selftests/damon: split test cases 2021-12-10 17:10:56 -08:00
debugfs_huge_count_read_write.sh selftests/damon: split test cases 2021-12-10 17:10:56 -08:00
debugfs_rm_non_contexts.sh selftests/damon: test non-context inputs to rm_contexts file 2022-11-30 15:58:47 -08:00
debugfs_schemes.sh selftests/damon: split test cases 2021-12-10 17:10:56 -08:00
debugfs_target_ids.sh selftests/damon: split test cases 2021-12-10 17:10:56 -08:00
huge_count_read_write.c selftests/damon: fix unnecessary compilation warnings 2022-11-30 15:58:56 -08:00
lru_sort.sh selftests/damon: add tests for DAMON_LRU_SORT's enabled parameter 2022-11-30 15:01:27 -08:00
Makefile selftests/damon: test removed scheme sysfs dir access bug 2022-12-11 18:12:15 -08:00
reclaim.sh selftests/damon: add tests for DAMON_RECLAIM's enabled parameter 2022-11-30 15:01:26 -08:00
sysfs_update_removed_scheme_dir.sh selftests/damon: test removed scheme sysfs dir access bug 2022-12-11 18:12:15 -08:00
sysfs.sh tools/selftets/damon/sysfs: test tried_regions directory existence 2022-11-30 15:58:44 -08:00