From patchwork Sun Oct 13 13:02:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sabyrzhan Tasbolatov X-Patchwork-Id: 13833406 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7504CF2579 for ; Sun, 13 Oct 2024 13:02:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 74E746B008C; Sun, 13 Oct 2024 09:02:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 6FFC46B0092; Sun, 13 Oct 2024 09:02:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 577976B0093; Sun, 13 Oct 2024 09:02:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 39A4B6B008C for ; Sun, 13 Oct 2024 09:02:29 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id ADC9312025A for ; Sun, 13 Oct 2024 13:02:22 +0000 (UTC) X-FDA: 82668592608.27.65C9BFF Received: from mail-ej1-f53.google.com (mail-ej1-f53.google.com [209.85.218.53]) by imf22.hostedemail.com (Postfix) with ESMTP id 0B866C0019 for ; Sun, 13 Oct 2024 13:02:20 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="PY/ORs1b"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf22.hostedemail.com: domain of snovitoll@gmail.com designates 209.85.218.53 as permitted sender) smtp.mailfrom=snovitoll@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728824432; a=rsa-sha256; cv=none; b=bHWJbvCAjW1nbUjQC70bciFMN7HldN48ZlM/LhvYQEAN9KGtJP+GxPDR3pgbrCkOojKx0c cQpIdon20D5zvhGwlJ3ClY+6qEc27CxN9zfEkyTnI1e24lAkkHnqF7YvVteEiUUsuHjTPw A6aqJVIwws3N1VHAGnxHTDvwOKOMl84= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="PY/ORs1b"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf22.hostedemail.com: domain of snovitoll@gmail.com designates 209.85.218.53 as permitted sender) smtp.mailfrom=snovitoll@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728824432; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=pqumvoIyJhkt9W5HwjJwb/i/n9g4P9IeX/TAEyTfGvM=; b=sQzPPNr9uzqDfHW8hjsWb9CtSsU6D9imQW5tVuPqbDrw5P5yRn8ReyeuVG+cWHyhkDZHCa zQw8Mgcugiac7YaE68u9eLx/sAg5P8FYMm+bKbVHBIz4jxfouy/JOaO4Cp/kV96HYSczP3 WTTpKBv8pwaxEq6h5EHRznICQ0+OC4Q= Received: by mail-ej1-f53.google.com with SMTP id a640c23a62f3a-a9a0cee600aso17092566b.1 for ; Sun, 13 Oct 2024 06:02:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728824545; x=1729429345; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pqumvoIyJhkt9W5HwjJwb/i/n9g4P9IeX/TAEyTfGvM=; b=PY/ORs1bsoWaZmgdnRwU6Ax6PwP0B0MICjRih7xB6pqORyVp3w6yWYk4DTqPZcRRyB 4yaEy7lGhrTtf/UbTRAMfAaPP6eGrN+ctSVddln7jzOsk6JGKOqQ3FquA+AmNWqYoBqY usMPJoXESx6hFSMPHzLUdrDiGRrQuVaOQmgYszWg67fW0lxs2QXEXjcNuw0DIq85NA3m jO7QrnsqSeGsG/G94KUCpGZ+yJ3KiX4Tkf3KEpiTZp1CTZPcoyOITse3dpI6C2eZmMQv exunijMZvuWPVUWdURe8P9R4z1ed18aIphZANef1O2pshinDy9KhiC+L9rdI/01u+PR6 Eywg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728824545; x=1729429345; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pqumvoIyJhkt9W5HwjJwb/i/n9g4P9IeX/TAEyTfGvM=; b=T3KF/+tX/4bHXLBIA35AwLz9T7UoRc5kr3lM2gxIbppUKgRDHwYoIzPAV/gz8dq1Gv ITlimaamKm0OvEcnt1aLjUNU2bxUwT12NK6jpq8sFVlwwXXVzsyJuRgYwHJ45sZmiC3b /rGLsa2LK5jU8XLPvHoubU90oIqcILnxTlrzlP/UIDx9c4rfQtm2Uum0BQ01NJxMadAX yLgRDOw+2LYkdh+m1nEI2AaahhSs0I7K0OrF6hmd0RroSbtH/4mCqh41QSKrpjw/TG5k RPl8um9IT4l7XOtXLF5vR7WHZMjUOhTuIkAG4Lz54VY5GwMqDqTfpem52GULYZmxzEQV PS+w== X-Forwarded-Encrypted: i=1; AJvYcCUNfS2WC7Hl350U8XUCBXv5iSlJT+LVmAzOtPl2y0oERmELbchXalrPkHnCF14B4oRIv9On/Cn8Hw==@kvack.org X-Gm-Message-State: AOJu0YwjorYb5ExN41XHF+UTEDVUzsoACRl+2/scBxhZorC9hK3TaV06 pYkDXbrLY54+E8ygynnuPPIYG5zfwlvmW+KLcPOh/d6nZpN8pOt4 X-Google-Smtp-Source: AGHT+IH3hBQZELCO27froLhmQMniGAn0bBg1HgfDg+xB1ADD1RL5C7wQdwmHKKqPnxl1b745khWtcw== X-Received: by 2002:a17:907:9723:b0:a99:ef41:33db with SMTP id a640c23a62f3a-a99ef4137ebmr460504966b.19.1728824544896; Sun, 13 Oct 2024 06:02:24 -0700 (PDT) Received: from work.. (2.133.25.254.dynamic.telecom.kz. [2.133.25.254]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9a0d9de967sm19209666b.139.2024.10.13.06.02.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Oct 2024 06:02:24 -0700 (PDT) From: Sabyrzhan Tasbolatov 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 3/3] kasan: delete CONFIG_KASAN_MODULE_TEST Date: Sun, 13 Oct 2024 18:02:11 +0500 Message-Id: <20241013130211.3067196-4-snovitoll@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241013130211.3067196-1-snovitoll@gmail.com> References: <20241013130211.3067196-1-snovitoll@gmail.com> MIME-Version: 1.0 X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 0B866C0019 X-Stat-Signature: t5k7wawzmudbahmwsug3g6fgnwqo7ajt X-Rspam-User: X-HE-Tag: 1728824540-717946 X-HE-Meta: U2FsdGVkX1/L1O/m8GKPmhBz/isysl2VFOJEHW/ZFatvT1w52MrARgrNmDkwCeYLx81p7HIYam3x6Pc8pRnOhQkevr4Nk2sRf3Oe91Vi8Sd8XLX1ylRAFus3CaQ7QCk3SZVPgV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DVpkNMtYkcRjOSMR8ojGlyOXn/D+7f+h5h1y8jwT/OoUETBa2sYzsXUXUfX4QXzbOHODKUU1hxIxU1hBq5CPtcoJPH6RrDJV/BbhIWQyjEsDehtct2G4Mp8LNeRU89O0VcAaR8FZYZSZZGphUrN8kai4QT0l+/Zw2Q9PgsRjVEh958PSUsU20KBbCgTJwNBMeBHm5FmnlLzLG9lPwR4rHG01jBeiEAZjiBL9iLYPcqV8YaYMVXgNK+cF5CfJkG39ofMLN0/ryh0pw2dqULPFUudEvzd2Il2ae8MotlfzpIppDuUDJg== X-Bogosity: Ham, tests=bogofilter, spamicity=0.003384, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Since we've migrated all tests to the KUnit framework, we can delete CONFIG_KASAN_MODULE_TEST and mentioning of it in the documentation as well. I've used the online translator to modify the non-English documentation. Signed-off-by: Sabyrzhan Tasbolatov --- Documentation/dev-tools/kasan.rst | 9 ++------- Documentation/translations/zh_CN/dev-tools/kasan.rst | 6 +----- Documentation/translations/zh_TW/dev-tools/kasan.rst | 6 +----- lib/Kconfig.kasan | 7 ------- mm/kasan/kasan.h | 2 +- mm/kasan/report.c | 2 +- 6 files changed, 6 insertions(+), 26 deletions(-) diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst index d7de44f5339..52fdd6b5ef6 100644 --- a/Documentation/dev-tools/kasan.rst +++ b/Documentation/dev-tools/kasan.rst @@ -511,17 +511,12 @@ Tests ~~~~~ There are KASAN tests that allow verifying that KASAN works and can detect -certain types of memory corruptions. The tests consist of two parts: +certain types of memory corruptions. -1. Tests that are integrated with the KUnit Test Framework. Enabled with +Tests that are integrated with the KUnit Test Framework. Enabled with ``CONFIG_KASAN_KUNIT_TEST``. These tests can be run and partially verified automatically in a few different ways; see the instructions below. -2. Tests that are currently incompatible with KUnit. Enabled with -``CONFIG_KASAN_MODULE_TEST`` and can only be run as a module. These tests can -only be verified manually by loading the kernel module and inspecting the -kernel log for KASAN reports. - Each KUnit-compatible KASAN test prints one of multiple KASAN reports if an error is detected. Then the test prints its number and status. diff --git a/Documentation/translations/zh_CN/dev-tools/kasan.rst b/Documentation/translations/zh_CN/dev-tools/kasan.rst index 4491ad2830e..f968d262be1 100644 --- a/Documentation/translations/zh_CN/dev-tools/kasan.rst +++ b/Documentation/translations/zh_CN/dev-tools/kasan.rst @@ -422,14 +422,10 @@ KASAN连接到vmap基础架构以懒清理未使用的影子内存。 ~~~~ 有一些KASAN测试可以验证KASAN是否正常工作并可以检测某些类型的内存损坏。 -测试由两部分组成: -1. 与KUnit测试框架集成的测试。使用 ``CONFIG_KASAN_KUNIT_TEST`` 启用。 +与KUnit测试框架集成的测试。使用 ``CONFIG_KASAN_KUNIT_TEST`` 启用。 这些测试可以通过几种不同的方式自动运行和部分验证;请参阅下面的说明。 -2. 与KUnit不兼容的测试。使用 ``CONFIG_KASAN_MODULE_TEST`` 启用并且只能作为模块 -运行。这些测试只能通过加载内核模块并检查内核日志以获取KASAN报告来手动验证。 - 如果检测到错误,每个KUnit兼容的KASAN测试都会打印多个KASAN报告之一,然后测试打印 其编号和状态。 diff --git a/Documentation/translations/zh_TW/dev-tools/kasan.rst b/Documentation/translations/zh_TW/dev-tools/kasan.rst index ed342e67d8e..19457860486 100644 --- a/Documentation/translations/zh_TW/dev-tools/kasan.rst +++ b/Documentation/translations/zh_TW/dev-tools/kasan.rst @@ -404,14 +404,10 @@ KASAN連接到vmap基礎架構以懶清理未使用的影子內存。 ~~~~ 有一些KASAN測試可以驗證KASAN是否正常工作並可以檢測某些類型的內存損壞。 -測試由兩部分組成: -1. 與KUnit測試框架集成的測試。使用 ``CONFIG_KASAN_KUNIT_TEST`` 啓用。 +與KUnit測試框架集成的測試。使用 ``CONFIG_KASAN_KUNIT_TEST`` 啓用。 這些測試可以通過幾種不同的方式自動運行和部分驗證;請參閱下面的說明。 -2. 與KUnit不兼容的測試。使用 ``CONFIG_KASAN_MODULE_TEST`` 啓用並且只能作爲模塊 -運行。這些測試只能通過加載內核模塊並檢查內核日誌以獲取KASAN報告來手動驗證。 - 如果檢測到錯誤,每個KUnit兼容的KASAN測試都會打印多個KASAN報告之一,然後測試打印 其編號和狀態。 diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan index 98016e137b7..f82889a830f 100644 --- a/lib/Kconfig.kasan +++ b/lib/Kconfig.kasan @@ -195,13 +195,6 @@ config KASAN_KUNIT_TEST For more information on KUnit and unit tests in general, please refer to the KUnit documentation in Documentation/dev-tools/kunit/. -config KASAN_MODULE_TEST - tristate "KUnit-incompatible tests of KASAN bug detection capabilities" - depends on m && KASAN && !KASAN_HW_TAGS - help - A part of the KASAN test suite that is not integrated with KUnit. - Incompatible with Hardware Tag-Based KASAN. - config KASAN_EXTRA_INFO bool "Record and report more information" depends on KASAN diff --git a/mm/kasan/kasan.h b/mm/kasan/kasan.h index f438a6cdc96..b7e4b81421b 100644 --- a/mm/kasan/kasan.h +++ b/mm/kasan/kasan.h @@ -568,7 +568,7 @@ static inline void kasan_kunit_test_suite_end(void) { } #endif /* CONFIG_KASAN_KUNIT_TEST */ -#if IS_ENABLED(CONFIG_KASAN_KUNIT_TEST) || IS_ENABLED(CONFIG_KASAN_MODULE_TEST) +#if IS_ENABLED(CONFIG_KASAN_KUNIT_TEST) bool kasan_save_enable_multi_shot(void); void kasan_restore_multi_shot(bool enabled); diff --git a/mm/kasan/report.c b/mm/kasan/report.c index b48c768acc8..3e48668c3e4 100644 --- a/mm/kasan/report.c +++ b/mm/kasan/report.c @@ -132,7 +132,7 @@ static bool report_enabled(void) return !test_and_set_bit(KASAN_BIT_REPORTED, &kasan_flags); } -#if IS_ENABLED(CONFIG_KASAN_KUNIT_TEST) || IS_ENABLED(CONFIG_KASAN_MODULE_TEST) +#if IS_ENABLED(CONFIG_KASAN_KUNIT_TEST) bool kasan_save_enable_multi_shot(void) {