linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Sabyrzhan Tasbolatov <snovitoll@gmail.com>
To: andreyknvl@gmail.com
Cc: akpm@linux-foundation.org, dvyukov@google.com, glider@google.com,
	kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, ryabinin.a.a@gmail.com, snovitoll@gmail.com,
	vincenzo.frascino@arm.com, elver@google.com, corbet@lwn.net,
	alexs@kernel.org, siyanteng@loongson.cn,
	2023002089@link.tyut.edu.cn, workflows@vger.kernel.org,
	linux-doc@vger.kernel.org
Subject: [PATCH v2 0/3] kasan: migrate the last module test to kunit
Date: Sun, 13 Oct 2024 18:02:08 +0500	[thread overview]
Message-ID: <20241013130211.3067196-1-snovitoll@gmail.com> (raw)
In-Reply-To: <CA+fCnZdeuNxTmGaYniiRMhS-TtNhiwj_MwW53K73a5Wiui+8RQ@mail.gmail.com>

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 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

-- 
2.34.1



  reply	other threads:[~2024-10-13 13:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11  7:16 [PATCH] kasan: migrate copy_user_test to kunit Sabyrzhan Tasbolatov
2024-10-11  9:13 ` Sabyrzhan Tasbolatov
2024-10-12 22:49   ` Andrey Konovalov
2024-10-13  6:33     ` Sabyrzhan Tasbolatov
2024-10-12 22:46 ` Andrey Konovalov
2024-10-13 13:02   ` Sabyrzhan Tasbolatov [this message]
2024-10-13 13:02     ` [PATCH v2 1/3] kasan: move checks to do_strncpy_from_user Sabyrzhan Tasbolatov
2024-10-13 16:04       ` Andrey Konovalov
2024-10-13 13:02     ` [PATCH v2 2/3] kasan: migrate copy_user_test to kunit Sabyrzhan Tasbolatov
2024-10-13 16:02       ` Andrey Konovalov
2024-10-13 18:20         ` [PATCH v3 " Sabyrzhan Tasbolatov
2024-10-13 20:25           ` Andrey Konovalov
2024-10-14  2:56             ` [PATCH RESEND v3 0/3] kasan: migrate the last module test " Sabyrzhan Tasbolatov
2024-10-14  2:56               ` [PATCH RESEND v3 1/3] kasan: move checks to do_strncpy_from_user Sabyrzhan Tasbolatov
2024-10-14  2:57               ` [PATCH RESEND v3 2/3] kasan: migrate copy_user_test to kunit Sabyrzhan Tasbolatov
2024-10-14 23:10                 ` Andrew Morton
2024-10-15  1:18                   ` Andrey Konovalov
2024-10-15 10:53                     ` Sabyrzhan Tasbolatov
2024-10-15 23:16                       ` Andrey Konovalov
2024-10-16 13:17                         ` [PATCH v4 0/3] kasan: migrate the last module test " Sabyrzhan Tasbolatov
2024-10-16 13:18                           ` [PATCH v4 1/3] kasan: move checks to do_strncpy_from_user Sabyrzhan Tasbolatov
2024-10-16 13:18                           ` [PATCH v4 2/3] kasan: migrate copy_user_test to kunit Sabyrzhan Tasbolatov
2024-10-16 13:18                           ` [PATCH v4 3/3] kasan: delete CONFIG_KASAN_MODULE_TEST Sabyrzhan Tasbolatov
2024-10-14  2:57               ` [PATCH RESEND v3 " Sabyrzhan Tasbolatov
2024-10-13 13:02     ` [PATCH v2 " Sabyrzhan Tasbolatov
2024-10-13 16:03       ` Andrey Konovalov
2024-10-13 18:21         ` [PATCH v3 " Sabyrzhan Tasbolatov
2024-10-13 20:25           ` Andrey Konovalov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241013130211.3067196-1-snovitoll@gmail.com \
    --to=snovitoll@gmail.com \
    --cc=2023002089@link.tyut.edu.cn \
    --cc=akpm@linux-foundation.org \
    --cc=alexs@kernel.org \
    --cc=andreyknvl@gmail.com \
    --cc=corbet@lwn.net \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryabinin.a.a@gmail.com \
    --cc=siyanteng@loongson.cn \
    --cc=vincenzo.frascino@arm.com \
    --cc=workflows@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).