Skip to content

RFC mm/damon: fix uninitialized DAMOS field and kunit exec expectation bugs

SJ Park damon linux-kselftest linux-mm lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7mm/damon/core: initialize damos->last_appliedmm/damon/core.c+1 -00 replies
2/7mm/damon/core-kunit: check region count before testing in split_at()mm/damon/tests/core-kunit.h+5 -01 reply
3/7mm/damon/vaddr-kunit: check region count in three_regions testmm/damon/tests/vaddr-kunit.h+5 -01 reply
4/7mm/damon/core-kunit: handle region split failure in filter_out()mm/damon/tests/core-kunit.h+5 -01 reply
5/7mm/damon/core-kunit: skip wrong dest walk in commit_dests_for()mm/damon/tests/core-kunit.h+2 -00 replies
6/7mm/damon/core-kunit: skip wrong quota goal walk in commit_quota_goals()mm/damon/tests/core-kunit.h+9 -00 replies
7/7mm/damon/core-kunit: skip wrong region walk in commit_target_regions()mm/damon/tests/core-kunit.h+7 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH v1.1 0/7] mm/damon: fix uninitialized DAMOS field and kunit exec expectation bugs

Fix a few Sashiko-found unurgent bugs. Patch 1 fixes use of uninitialized damos->last_applied field. Patches 2-7 fix DAMON kunit tests that do invalid memory access under test failures.

The bugs are better to be fixed and eventually merged into stable@ kernel. That said, the fixes are arguably not urgent. Patch 1 only introduces negligible DAMOS efficiency degradation in occasional cases. Kunit fixes could introduce quite bad consequences but those are test code that affect only test run setups.

Changes from RFC
- RFC: https://lore.kernel.org/[email protected]
- Add missed region split failure check in filter_out() test.
- Rebase to latest mm-new.

SJ Park (7):
mm/damon/core: initialize damos->last_applied mm/damon/core-kunit: check region count before testing in split_at() mm/damon/vaddr-kunit: check region count in three_regions test mm/damon/core-kunit: handle region split failure in filter_out() mm/damon/core-kunit: skip wrong dest walk in commit_dests_for() mm/damon/core-kunit: skip wrong quota goal walk in
commit_quota_goals()
mm/damon/core-kunit: skip wrong region walk in commit_target_regions()

 mm/damon/core.c              |  1 +
 mm/damon/tests/core-kunit.h  | 30 ++++++++++++++++++++++++++++--
 mm/damon/tests/vaddr-kunit.h |  5 +++++
 3 files changed, 34 insertions(+), 2 deletions(-)

base-commit: 0ad94b65c75dc6c6c3fa742f0a6213ed578c771a

Signature · 1 line
2.47.3