kasan: migrate the last module test to kunit
Status from this message: [merged mm-stable] kasan-delete-config_kasan_module_test.patch removed from -mm tree
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest3 patches 0 repliesApplied 3/3
- v33 patches 6 repliesSuperseded
- v23 patches 3 repliesSuperseded
Changes in v4 from the cover letter
- moved checks from do_strncpy_from_user to strncpy_from_user due to "call to __check_object_size() with UACCESS enabled" warning, during the kernel build.
Patches in v4 All 3 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | kasan: move checks to do_strncpy_from_userlib/ | +3 | 0 replies | Applied |
| 2/3 | kasan: migrate copy_user_test to kunitmm/ mm/ mm/ | +47 | 0 replies | Applied |
| 3/3 | kasan: delete CONFIG_KASAN_MODULE_TESTDocumentation/ Documentation/ Documentation/ +3 more | +28 | 1 reply | Applied |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Andrey Konovalov |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/3] kasan: migrate the last module test to kunit
copy_user_test() is the last KUnit-incompatible test with CONFIG_KASAN_MODULE_TEST requirement, which we are going to migrate to KUnit framework and delete the former test and Kconfig as well.
In this patch series:
- [1/3] move kasan_check_write() and check_object_size() to do_strncpy_from_user() to cover with KASAN checks with
multiple conditions in strncpy_from_user().
- [2/3] migrated copy_user_test() to KUnit, where we can also test strncpy_from_user() due to [1/4].
KUnits have been tested on:
- x86_64 with CONFIG_KASAN_GENERIC. Passed
- arm64 with CONFIG_KASAN_SW_TAGS. 1 fail. See [1]
- arm64 with CONFIG_KASAN_HW_TAGS. 1 fail. See [1]
[1] https://lore.kernel.org/linux-mm/CACzwLxj21h7nCcS2-KA_q7ybe+5pxH0uCDwu64q_9pPsydneWQ@mail.gmail.com/
- [3/3] delete CONFIG_KASAN_MODULE_TEST and documentation occurrences.
Changes v3 -> v4:
- moved checks from do_strncpy_from_user to strncpy_from_user due to "call to __check_object_size() with UACCESS enabled" warning, during the kernel build.
Changes v2 -> v3:
- added in [1/3] Reviewed-by: Andrey Konovalov.
- added a long string in usermem for strncpy_from_user. Suggested by Andrey.
- applied Andrey's patch to modify further kasan.rst.
Changes v1 -> v2:
- moved the sanitization to do_strncpy_from_user and as the separate commit per Andrey's review.
- deleted corresponding entries of kasan_test_module.o in Makefile
- deleted CONFIG_KASAN_MODULE_TEST at all with the documentation in separate commit.
- added Documentation maintainers in CC.
Sabyrzhan Tasbolatov (3):
kasan: move checks to do_strncpy_from_user
kasan: migrate copy_user_test to kunit
kasan: delete CONFIG_KASAN_MODULE_TEST
Documentation/dev-tools/kasan.rst | 9 +-- .../translations/zh_CN/dev-tools/kasan.rst | 6 +- .../translations/zh_TW/dev-tools/kasan.rst | 6 +- lib/Kconfig.kasan | 7 -- lib/strncpy_from_user.c | 5 +- mm/kasan/Makefile | 2 - mm/kasan/kasan.h | 2 +- mm/kasan/kasan_test_c.c | 39 +++++++++ mm/kasan/kasan_test_module.c | 81 ------------------- mm/kasan/report.c | 2 +- 10 files changed, 48 insertions(+), 111 deletions(-) delete mode 100644 mm/kasan/kasan_test_module.c
Signature · 1 line
2.34.1