From nobody Tue Nov 26 19:44:23 2024 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 496B1209F48; Wed, 16 Oct 2024 13:18:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729084706; cv=none; b=lmyHGwNXwoU3v1JqHqTTdahTb8+s6Y7Orye24G/RBCC/T48HzM61XmCZKJbFcdi1yz/U+E6/NTG3G3pXQWz+cZ85fTZJkDV3HLMjLLXGYDmYF/wiyf6amebv4mAsHcDgxpfC0fzrwlhiuUo6cgkuDVl/2AEoS3kcpHA0PyO4Cg8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729084706; c=relaxed/simple; bh=j4lwfqIfhg3o9c/qxDv63TOPSlOrzp7Cd7ov8oxJkXc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=HNiduwbD943yAafM/f8aFHEeo3QLLewLLjllpYebKgGk3V5o2pDYeljdbqNHrQf4cQO3S9PQ0OKrqsJj7PGdoQ0lFf5xRddjI9uR1T9pldLVV0rnmNRtsnpwMZt/6cClPCxzigf7TgdILHRBSu7ehufLz5IAqM6CT7wB22tLOdY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=R8fmnS7X; arc=none smtp.client-ip=209.85.221.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="R8fmnS7X" Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-37d49ffaba6so4287940f8f.0; Wed, 16 Oct 2024 06:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729084702; x=1729689502; darn=vger.kernel.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=JGMf0QveJLuqNVGuhCQVRHmO+zBayTHS2lF5VIrEUbY=; b=R8fmnS7XknkpD//IQLFeW5MACYzmuiF5nOWxid4BDY3YR3FEVKqDf0YJe0nYxaHgL9 YjwdbaU/WilKdv0oDPrnuKFHoxyiT188Q5RguePMqGqEqeR409LEvLPCmsMQLpKeN5a3 LniW1FdbwIedKJdbdnqKRFl3bueGy8fpudZwHwLYMkJ9hWM+uTC5yYe7gTWdd0dLVC1x 4fRGisBDpp8Ql3//W3jlZu0n7CtB7aDYO9xE6gO66e7fs17JroSYvscWks8gHyv64+gr ao7ZD6qWZvtrYWdzo7kEjdJJ43PMIW7NQMM5yTx6ny+MCtpIXOj3Rpw6om46uVuDsf+w DvpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729084702; x=1729689502; 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=JGMf0QveJLuqNVGuhCQVRHmO+zBayTHS2lF5VIrEUbY=; b=PzMIgx2UzYePa+++HBSyRYGAe5Nt79FhM8/gIoer269h6UDMU5quqhdXKzo3gPmVqy +aBISR7gPs+L9TMdECt4MH6V3U1dNPLbYtwkv970BRboYRCFXg59ooQnm78N7kTps20N jd6D7OnbFkMQ6iWDe25Q3Arsi/DQMt7/s1pd6RYJtrzrnbSmQnjOl6H9U2a2lcmCJApm ql+F8LREnqlj4a2t0bDMDdL9b46n6bmMq5ZjnjM8qMl5uPTB85C8ENZz6wqKQlNbs0e2 lDNt6Chbf9FVAfUKTLEQDcBHm6Aatr2mVbfBEobxE8lcMfJFbQ4OOz46oC+hd3szzPC+ X8jQ== X-Forwarded-Encrypted: i=1; AJvYcCUJlhvu4nvnvMe38Fic1cXMUKJm0SrJBiDgEdYMODjqtlyZVHGf1dWb3PdY9SX7BB5TVdVqmNbu7zw=@vger.kernel.org, AJvYcCWq7J5CwYyn9Sievr/dH7HhwkFd4cLzTQfRR2/U6Sm80w+hxiCkWnefZtxPCmJkXuMP4gmypWsbc/Y+@vger.kernel.org, AJvYcCX4K78JgRKtcbhIt0GNLLhZrZMxsQ2xiEeJIQMopf08dgeQ//oPKGi4PKOc8ZoyU2AuQ5xlAtTCxmA5yLFS@vger.kernel.org X-Gm-Message-State: AOJu0Yw+xDRyck8vxKagVZjNNfhvPvO0OOgHwgj66XibZHnTc2+UkquK 3rXKoi2hbim2kLwJW4pk2FDBWsi3BL6LFxFF0K5UfNURjwr1Gw5m X-Google-Smtp-Source: AGHT+IEnqE33zAEZ4Osvb5YV0WmK6TiqgW5ppvcNvuX+PIESYEVsFYkFYZLCq1hdV0OqDyWWM/vbiw== X-Received: by 2002:a5d:6109:0:b0:37d:3999:7b4 with SMTP id ffacd0b85a97d-37d5519cbb6mr11646512f8f.17.1729084702303; Wed, 16 Oct 2024 06:18:22 -0700 (PDT) Received: from work.. (2.133.25.254.dynamic.telecom.kz. [2.133.25.254]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4313f5698aesm49612825e9.11.2024.10.16.06.18.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2024 06:18:21 -0700 (PDT) From: Sabyrzhan Tasbolatov To: andreyknvl@gmail.com Cc: 2023002089@link.tyut.edu.cn, akpm@linux-foundation.org, alexs@kernel.org, corbet@lwn.net, dvyukov@google.com, elver@google.com, glider@google.com, kasan-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, ryabinin.a.a@gmail.com, siyanteng@loongson.cn, snovitoll@gmail.com, vincenzo.frascino@arm.com, workflows@vger.kernel.org Subject: [PATCH v4 3/3] kasan: delete CONFIG_KASAN_MODULE_TEST Date: Wed, 16 Oct 2024 18:18:02 +0500 Message-Id: <20241016131802.3115788-4-snovitoll@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241016131802.3115788-1-snovitoll@gmail.com> References: <20241016131802.3115788-1-snovitoll@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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. Reviewed-by: Andrey Konovalov Signed-off-by: Sabyrzhan Tasbolatov --- Changes v2 -> v3: - applied Andrey's patch to modify further kasan.rst. --- Documentation/dev-tools/kasan.rst | 23 ++++++++----------- .../translations/zh_CN/dev-tools/kasan.rst | 20 +++++++--------- .../translations/zh_TW/dev-tools/kasan.rst | 21 ++++++++--------- lib/Kconfig.kasan | 7 ------ mm/kasan/kasan.h | 2 +- mm/kasan/report.c | 2 +- 6 files changed, 28 insertions(+), 47 deletions(-) diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/ka= san.rst index d7de44f5339..0a1418ab72f 100644 --- a/Documentation/dev-tools/kasan.rst +++ b/Documentation/dev-tools/kasan.rst @@ -511,19 +511,14 @@ Tests ~~~~~ =20 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. =20 -1. Tests that are integrated with the KUnit Test Framework. Enabled with -``CONFIG_KASAN_KUNIT_TEST``. These tests can be run and partially verified +All KASAN tests are integrated with the KUnit Test Framework and can be en= abled +via ``CONFIG_KASAN_KUNIT_TEST``. The tests can be run and partially verifi= ed automatically in a few different ways; see the instructions below. =20 -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. +Each KASAN test prints one of multiple KASAN reports if an error is detect= ed. +Then the test prints its number and status. =20 When a test passes:: =20 @@ -550,16 +545,16 @@ Or, if one of the tests failed:: =20 not ok 1 - kasan =20 -There are a few ways to run KUnit-compatible KASAN tests. +There are a few ways to run the KASAN tests. =20 1. Loadable module =20 - With ``CONFIG_KUNIT`` enabled, KASAN-KUnit tests can be built as a load= able - module and run by loading ``kasan_test.ko`` with ``insmod`` or ``modpro= be``. + With ``CONFIG_KUNIT`` enabled, the tests can be built as a loadable mod= ule + and run by loading ``kasan_test.ko`` with ``insmod`` or ``modprobe``. =20 2. Built-In =20 - With ``CONFIG_KUNIT`` built-in, KASAN-KUnit tests can be built-in as we= ll. + With ``CONFIG_KUNIT`` built-in, the tests can be built-in as well. In this case, the tests will run at boot as a late-init call. =20 3. Using kunit_tool diff --git a/Documentation/translations/zh_CN/dev-tools/kasan.rst b/Documen= tation/translations/zh_CN/dev-tools/kasan.rst index 4491ad2830e..fd2e3afbdfa 100644 --- a/Documentation/translations/zh_CN/dev-tools/kasan.rst +++ b/Documentation/translations/zh_CN/dev-tools/kasan.rst @@ -422,16 +422,12 @@ KASAN=E8=BF=9E=E6=8E=A5=E5=88=B0vmap=E5=9F=BA=E7=A1= =80=E6=9E=B6=E6=9E=84=E4=BB=A5=E6=87=92=E6=B8=85=E7=90=86=E6=9C=AA=E4=BD=BF= =E7=94=A8=E7=9A=84=E5=BD=B1=E5=AD=90=E5=86=85=E5=AD=98=E3=80=82 ~~~~ =20 =E6=9C=89=E4=B8=80=E4=BA=9BKASAN=E6=B5=8B=E8=AF=95=E5=8F=AF=E4=BB=A5=E9=AA= =8C=E8=AF=81KASAN=E6=98=AF=E5=90=A6=E6=AD=A3=E5=B8=B8=E5=B7=A5=E4=BD=9C=E5= =B9=B6=E5=8F=AF=E4=BB=A5=E6=A3=80=E6=B5=8B=E6=9F=90=E4=BA=9B=E7=B1=BB=E5=9E= =8B=E7=9A=84=E5=86=85=E5=AD=98=E6=8D=9F=E5=9D=8F=E3=80=82 -=E6=B5=8B=E8=AF=95=E7=94=B1=E4=B8=A4=E9=83=A8=E5=88=86=E7=BB=84=E6=88=90: =20 -1. =E4=B8=8EKUnit=E6=B5=8B=E8=AF=95=E6=A1=86=E6=9E=B6=E9=9B=86=E6=88=90=E7= =9A=84=E6=B5=8B=E8=AF=95=E3=80=82=E4=BD=BF=E7=94=A8 ``CONFIG_KASAN_KUNIT_TE= ST`` =E5=90=AF=E7=94=A8=E3=80=82 -=E8=BF=99=E4=BA=9B=E6=B5=8B=E8=AF=95=E5=8F=AF=E4=BB=A5=E9=80=9A=E8=BF=87= =E5=87=A0=E7=A7=8D=E4=B8=8D=E5=90=8C=E7=9A=84=E6=96=B9=E5=BC=8F=E8=87=AA=E5= =8A=A8=E8=BF=90=E8=A1=8C=E5=92=8C=E9=83=A8=E5=88=86=E9=AA=8C=E8=AF=81=EF=BC= =9B=E8=AF=B7=E5=8F=82=E9=98=85=E4=B8=8B=E9=9D=A2=E7=9A=84=E8=AF=B4=E6=98=8E= =E3=80=82 +=E6=89=80=E6=9C=89 KASAN =E6=B5=8B=E8=AF=95=E9=83=BD=E4=B8=8E KUnit =E6=B5= =8B=E8=AF=95=E6=A1=86=E6=9E=B6=E9=9B=86=E6=88=90=EF=BC=8C=E5=8F=AF=E9=80=9A= =E8=BF=87 ``CONFIG_KASAN_KUNIT_TEST`` =E5=90=AF=E7=94=A8=E3=80=82 +=E6=B5=8B=E8=AF=95=E5=8F=AF=E4=BB=A5=E9=80=9A=E8=BF=87=E5=87=A0=E7=A7=8D= =E4=B8=8D=E5=90=8C=E7=9A=84=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+=E5=A6=82=E6=9E=9C=E6=A3=80=E6=B5=8B=E5=88=B0=E9=94=99=E8=AF=AF=EF=BC=8C= =E6=AF=8F=E4=B8=AA KASAN =E6=B5=8B=E8=AF=95=E9=83=BD=E4=BC=9A=E6=89=93=E5= =8D=B0=E5=A4=9A=E4=BB=BD KASAN =E6=8A=A5=E5=91=8A=E4=B8=AD=E7=9A=84=E4=B8= =80=E4=BB=BD=E3=80=82 +=E7=84=B6=E5=90=8E=E6=B5=8B=E8=AF=95=E4=BC=9A=E6=89=93=E5=8D=B0=E5=85=B6= =E7=BC=96=E5=8F=B7=E5=92=8C=E7=8A=B6=E6=80=81=E3=80=82 =20 =E5=BD=93=E6=B5=8B=E8=AF=95=E9=80=9A=E8=BF=87:: =20 @@ -458,16 +454,16 @@ KASAN=E8=BF=9E=E6=8E=A5=E5=88=B0vmap=E5=9F=BA=E7=A1= =80=E6=9E=B6=E6=9E=84=E4=BB=A5=E6=87=92=E6=B8=85=E7=90=86=E6=9C=AA=E4=BD=BF= =E7=94=A8=E7=9A=84=E5=BD=B1=E5=AD=90=E5=86=85=E5=AD=98=E3=80=82 =20 not ok 1 - kasan =20 -=E6=9C=89=E5=87=A0=E7=A7=8D=E6=96=B9=E6=B3=95=E5=8F=AF=E4=BB=A5=E8=BF=90= =E8=A1=8C=E4=B8=8EKUnit=E5=85=BC=E5=AE=B9=E7=9A=84KASAN=E6=B5=8B=E8=AF=95= =E3=80=82 +=E6=9C=89=E5=87=A0=E7=A7=8D=E6=96=B9=E6=B3=95=E5=8F=AF=E4=BB=A5=E8=BF=90= =E8=A1=8C KASAN =E6=B5=8B=E8=AF=95=E3=80=82 =20 1. =E5=8F=AF=E5=8A=A0=E8=BD=BD=E6=A8=A1=E5=9D=97 =20 - =E5=90=AF=E7=94=A8 ``CONFIG_KUNIT`` =E5=90=8E=EF=BC=8CKASAN-KUnit=E6=B5= =8B=E8=AF=95=E5=8F=AF=E4=BB=A5=E6=9E=84=E5=BB=BA=E4=B8=BA=E5=8F=AF=E5=8A=A0= =E8=BD=BD=E6=A8=A1=E5=9D=97=EF=BC=8C=E5=B9=B6=E9=80=9A=E8=BF=87=E4=BD=BF=E7= =94=A8 - ``insmod`` =E6=88=96 ``modprobe`` =E5=8A=A0=E8=BD=BD ``kasan_test.ko`` = =E6=9D=A5=E8=BF=90=E8=A1=8C=E3=80=82 + =E5=90=AF=E7=94=A8 ``CONFIG_KUNIT`` =E5=90=8E=EF=BC=8C=E5=8F=AF=E4=BB= =A5=E5=B0=86=E6=B5=8B=E8=AF=95=E6=9E=84=E5=BB=BA=E4=B8=BA=E5=8F=AF=E5=8A=A0= =E8=BD=BD=E6=A8=A1=E5=9D=97 + =E5=B9=B6=E9=80=9A=E8=BF=87=E4=BD=BF=E7=94=A8 ``insmod`` =E6=88=96 ``mo= dprobe`` =E5=8A=A0=E8=BD=BD ``kasan_test.ko`` =E6=9D=A5=E8=BF=90=E8=A1=8C= =E3=80=82 =20 2. =E5=86=85=E7=BD=AE =20 - =E9=80=9A=E8=BF=87=E5=86=85=E7=BD=AE ``CONFIG_KUNIT`` =EF=BC=8C=E4=B9= =9F=E5=8F=AF=E4=BB=A5=E5=86=85=E7=BD=AEKASAN-KUnit=E6=B5=8B=E8=AF=95=E3=80= =82=E5=9C=A8=E8=BF=99=E7=A7=8D=E6=83=85=E5=86=B5=E4=B8=8B=EF=BC=8C + =E9=80=9A=E8=BF=87=E5=86=85=E7=BD=AE ``CONFIG_KUNIT``=EF=BC=8C=E6=B5=8B= =E8=AF=95=E4=B9=9F=E5=8F=AF=E4=BB=A5=E5=86=85=E7=BD=AE=E3=80=82 =E6=B5=8B=E8=AF=95=E5=B0=86=E5=9C=A8=E5=90=AF=E5=8A=A8=E6=97=B6=E4=BD= =9C=E4=B8=BA=E5=90=8E=E6=9C=9F=E5=88=9D=E5=A7=8B=E5=8C=96=E8=B0=83=E7=94=A8= =E8=BF=90=E8=A1=8C=E3=80=82 =20 3. =E4=BD=BF=E7=94=A8kunit_tool diff --git a/Documentation/translations/zh_TW/dev-tools/kasan.rst b/Documen= tation/translations/zh_TW/dev-tools/kasan.rst index ed342e67d8e..35b7fd18aa4 100644 --- a/Documentation/translations/zh_TW/dev-tools/kasan.rst +++ b/Documentation/translations/zh_TW/dev-tools/kasan.rst @@ -404,16 +404,13 @@ KASAN=E9=80=A3=E6=8E=A5=E5=88=B0vmap=E5=9F=BA=E7=A4= =8E=E6=9E=B6=E6=A7=8B=E4=BB=A5=E6=87=B6=E6=B8=85=E7=90=86=E6=9C=AA=E4=BD=BF= =E7=94=A8=E7=9A=84=E5=BD=B1=E5=AD=90=E5=85=A7=E5=AD=98=E3=80=82 ~~~~ =20 =E6=9C=89=E4=B8=80=E4=BA=9BKASAN=E6=B8=AC=E8=A9=A6=E5=8F=AF=E4=BB=A5=E9=A9= =97=E8=AD=89KASAN=E6=98=AF=E5=90=A6=E6=AD=A3=E5=B8=B8=E5=B7=A5=E4=BD=9C=E4= =B8=A6=E5=8F=AF=E4=BB=A5=E6=AA=A2=E6=B8=AC=E6=9F=90=E4=BA=9B=E9=A1=9E=E5=9E= =8B=E7=9A=84=E5=85=A7=E5=AD=98=E6=90=8D=E5=A3=9E=E3=80=82 -=E6=B8=AC=E8=A9=A6=E7=94=B1=E5=85=A9=E9=83=A8=E5=88=86=E7=B5=84=E6=88=90: =20 -1. =E8=88=87KUnit=E6=B8=AC=E8=A9=A6=E6=A1=86=E6=9E=B6=E9=9B=86=E6=88=90=E7= =9A=84=E6=B8=AC=E8=A9=A6=E3=80=82=E4=BD=BF=E7=94=A8 ``CONFIG_KASAN_KUNIT_TE= ST`` =E5=95=93=E7=94=A8=E3=80=82 -=E9=80=99=E4=BA=9B=E6=B8=AC=E8=A9=A6=E5=8F=AF=E4=BB=A5=E9=80=9A=E9=81=8E= =E5=B9=BE=E7=A8=AE=E4=B8=8D=E5=90=8C=E7=9A=84=E6=96=B9=E5=BC=8F=E8=87=AA=E5= =8B=95=E9=81=8B=E8=A1=8C=E5=92=8C=E9=83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0=B8=E6=97=A5=E8=AA=8C=E4=BB= =A5=E7=8D=B2=E5=8F=96KASAN=E5=A0=B1=E5=91=8A=E4=BE=86=E6=89=8B=E5=8B=95=E9= =A9=97=E8=AD=89=E3=80=82 - -=E5=A6=82=E6=9E=9C=E6=AA=A2=E6=B8=AC=E5=88=B0=E9=8C=AF=E8=AA=A4=EF=BC=8C= =E6=AF=8F=E5=80=8BKUnit=E5=85=BC=E5=AE=B9=E7=9A=84KASAN=E6=B8=AC=E8=A9=A6= =E9=83=BD=E6=9C=83=E6=89=93=E5=8D=B0=E5=A4=9A=E5=80=8BKASAN=E5=A0=B1=E5=91= =8A=E4=B9=8B=E4=B8=80=EF=BC=8C=E7=84=B6=E5=BE=8C=E6=B8=AC=E8=A9=A6=E6=89=93= =E5=8D=B0 -=E5=85=B6=E7=B7=A8=E8=99=9F=E5=92=8C=E7=8B=80=E6=85=8B=E3=80=82 +=E5=A6=82=E6=9E=9C=E5=81=B5=E6=B8=AC=E5=88=B0=E9=8C=AF=E8=AA=A4=EF=BC=8C= =E6=AF=8F=E5=80=8B KASAN =E6=B8=AC=E8=A9=A6=E9=83=BD=E6=9C=83=E5=88=97=E5= =8D=B0=E5=A4=9A=E5=80=8B KASAN =E5=A0=B1=E5=91=8A=E4=B9=8B=E4=B8=80=E3=80= =82 +=E7=84=B6=E5=BE=8C=E6=B8=AC=E8=A9=A6=E5=88=97=E5=8D=B0=E5=85=B6=E7=B7=A8= =E8=99=9F=E5=92=8C=E7=8B=80=E6=85=8B=E3=80=82 =20 =E7=95=B6=E6=B8=AC=E8=A9=A6=E9=80=9A=E9=81=8E:: =20 @@ -440,16 +437,16 @@ KASAN=E9=80=A3=E6=8E=A5=E5=88=B0vmap=E5=9F=BA=E7=A4= =8E=E6=9E=B6=E6=A7=8B=E4=BB=A5=E6=87=B6=E6=B8=85=E7=90=86=E6=9C=AA=E4=BD=BF= =E7=94=A8=E7=9A=84=E5=BD=B1=E5=AD=90=E5=85=A7=E5=AD=98=E3=80=82 =20 not ok 1 - kasan =20 -=E6=9C=89=E5=B9=BE=E7=A8=AE=E6=96=B9=E6=B3=95=E5=8F=AF=E4=BB=A5=E9=81=8B= =E8=A1=8C=E8=88=87KUnit=E5=85=BC=E5=AE=B9=E7=9A=84KASAN=E6=B8=AC=E8=A9=A6= =E3=80=82 +=E6=9C=89=E5=B9=BE=E7=A8=AE=E6=96=B9=E6=B3=95=E5=8F=AF=E4=BB=A5=E5=9F=B7= =E8=A1=8C KASAN =E6=B8=AC=E8=A9=A6=E3=80=82 =20 1. =E5=8F=AF=E5=8A=A0=E8=BC=89=E6=A8=A1=E5=A1=8A =20 - =E5=95=93=E7=94=A8 ``CONFIG_KUNIT`` =E5=BE=8C=EF=BC=8CKASAN-KUnit=E6=B8= =AC=E8=A9=A6=E5=8F=AF=E4=BB=A5=E6=A7=8B=E5=BB=BA=E7=88=B2=E5=8F=AF=E5=8A=A0= =E8=BC=89=E6=A8=A1=E5=A1=8A=EF=BC=8C=E4=B8=A6=E9=80=9A=E9=81=8E=E4=BD=BF=E7= =94=A8 - ``insmod`` =E6=88=96 ``modprobe`` =E5=8A=A0=E8=BC=89 ``kasan_test.ko`` = =E4=BE=86=E9=81=8B=E8=A1=8C=E3=80=82 + =E5=95=9F=E7=94=A8 ``CONFIG_KUNIT`` =E5=BE=8C=EF=BC=8C=E6=B8=AC=E8=A9= =A6=E5=8F=AF=E4=BB=A5=E5=BB=BA=E7=BD=AE=E7=82=BA=E5=8F=AF=E8=BC=89=E5=85=A5= =E6=A8=A1=E7=B5=84 + =E4=B8=A6=E4=B8=94=E9=80=8F=E9=81=8E=E4=BD=BF=E7=94=A8 ``insmod`` =E6= =88=96 ``modprobe`` =E4=BE=86=E8=BC=89=E5=85=A5 ``kasan_test.ko`` =E4=BE=86= =E9=81=8B=E4=BD=9C=E3=80=82 =20 2. =E5=85=A7=E7=BD=AE =20 - =E9=80=9A=E9=81=8E=E5=85=A7=E7=BD=AE ``CONFIG_KUNIT`` =EF=BC=8C=E4=B9= =9F=E5=8F=AF=E4=BB=A5=E5=85=A7=E7=BD=AEKASAN-KUnit=E6=B8=AC=E8=A9=A6=E3=80= =82=E5=9C=A8=E9=80=99=E7=A8=AE=E6=83=85=E6=B3=81=E4=B8=8B=EF=BC=8C + =E9=80=8F=E9=81=8E=E5=85=A7=E5=BB=BA ``CONFIG_KUNIT``=EF=BC=8C=E6=B8=AC= =E8=A9=A6=E4=B9=9F=E5=8F=AF=E4=BB=A5=E5=85=A7=E5=BB=BA=E3=80=82 =E6=B8=AC=E8=A9=A6=E5=B0=87=E5=9C=A8=E5=95=93=E5=8B=95=E6=99=82=E4=BD= =9C=E7=88=B2=E5=BE=8C=E6=9C=9F=E5=88=9D=E5=A7=8B=E5=8C=96=E8=AA=BF=E7=94=A8= =E9=81=8B=E8=A1=8C=E3=80=82 =20 3. =E4=BD=BF=E7=94=A8kunit_tool 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/. =20 -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) { } =20 #endif /* CONFIG_KASAN_KUNIT_TEST */ =20 -#if IS_ENABLED(CONFIG_KASAN_KUNIT_TEST) || IS_ENABLED(CONFIG_KASAN_MODULE_= TEST) +#if IS_ENABLED(CONFIG_KASAN_KUNIT_TEST) =20 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); } =20 -#if IS_ENABLED(CONFIG_KASAN_KUNIT_TEST) || IS_ENABLED(CONFIG_KASAN_MODULE_= TEST) +#if IS_ENABLED(CONFIG_KASAN_KUNIT_TEST) =20 bool kasan_save_enable_multi_shot(void) { --=20 2.34.1