From nobody Wed Nov 27 07:54:51 2024 Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (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 1EBB65336D; Mon, 14 Oct 2024 02:56:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728874609; cv=none; b=IRmAkeVRzvDPRyweSHftJuWS+1JfWzAsy9qtUOCeBlJ7BsFQg8VZsJi1CNTKwV1uovetIH+d+qABmolMsptudZsbeqrEMx7/hCt8P1PCjTiVQRBttaZsqJ2fYuaa5Vj7Gf8dU39EMq8WpjKd+bE+rNSjyaud1uU8fbP6WL4c4+k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728874609; c=relaxed/simple; bh=j4lwfqIfhg3o9c/qxDv63TOPSlOrzp7Cd7ov8oxJkXc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=tfvdn+WX5e5u0rom/J6daEiCc8o6RhENbeqFlQbHKo2XfcigVZQ+NdUR/y5JXf/EbiLtnPXjJL80vJBHgoFFqL2wBuV5EukAk+bFU5C8eFfZgtDJoZp7fppNwyhVRK0dLeOthqvq/ksOnBVLPcZid4ThYmp5BoaStGzcBjpTlwg= 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=Tongjfoh; arc=none smtp.client-ip=209.85.218.45 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="Tongjfoh" Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a9a0ef5179dso71908666b.1; Sun, 13 Oct 2024 19:56:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728874606; x=1729479406; 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=TongjfohGpxNQG40WWDgKWZcsngHw3EwHvshZVy6cRTvxOxcUOF8hDOn/Kb2RJx+Rm fgOGxRM4V6fGQOOKDK4dTTHSU399nd02zjAIU07xqxG2mqXycycRfuBBWki51zA3Aimk H2cSorz2BgKzvMIjLmFANuFNDfN89CJjMFtoFaIVYQzXrRhrTF13PNBCYqB34bElbUjc 0CzzxsA0aNiVzdDxX+ydkzlWHbdS8pkMjfARfwI9Ru0SRMCHxyAqeK/nFAnOpHNGxMF9 wbPhP5zUTygwtBXUYM//VaCNcrQrR7saPbPtkTUBeu7oMiyxrCYm2OMd+d8Zaz+LFG0q BDvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728874606; x=1729479406; 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=F4RicDHAoQOOeygTw1yWmU9jvnkrxrQ8JMLh2vqO8ba+dhnJJEVYSNAxc34ov3G99I b9Vk4W8tLXRSTcLopk/I4qI7HwZbSdKFsHJtosUGNzrgedo3FWEJAGwJvWjyo4P4YXDD N3X4zVRJEL4pNluf1euv5ZUgGWGhCmwnTis1Dc/ksuP/hTE3iPGMMsaccdR0HlZD2C5c ImIGMxdpPUZdHWE6swtRc0nTIveDbCxMXdUc8jG4NDRSsgvVcNT3eF4ysdcKpmr4QSC/ DugkwvBqW+5IH/Jjet6/LytlE/E27kNz1laD0uGEnREsZjv7v375l6X5cEaUoL0bYx82 tQ8Q== X-Forwarded-Encrypted: i=1; AJvYcCV+8ecSE3zuWJb9WUyR5mFeOp3SqgNcT5abQxp/eSnFJxU8s8le1vGI0r/O9CIzpewWc3eJTCads7/flMVY@vger.kernel.org, AJvYcCWOcwVGTstbToh9l0qRI5u4yA9K94m2VbcV5hJeEeKpSN0zIyirejamjdze1ZNuhAqKTiArXSfI/FH6@vger.kernel.org, AJvYcCWdbu0CLmZD8CBqMWbyrtIHRDWEfwHhD9/C/1rVjlAgUXeFKx/GKa00A0/5+uf6h1kkVF5vWSS9JOU=@vger.kernel.org X-Gm-Message-State: AOJu0YwOgVuXP1LFh4FOmy24w+erG0Qv4bSUorhIjrbIuwhoFU6SDUGP 21B02PpkC68YpyMJXyF2z0vv9uca4qxsAHi0eyD61Cysqm9yVT6P X-Google-Smtp-Source: AGHT+IGlDB8KlTXo7DMjdLaANmivxjxlnYDmQ0l9WvS8pEmuPKYpnSfmCvDI08URAXjBlRXZF+7cEQ== X-Received: by 2002:a17:907:72c1:b0:a9a:17f5:79a8 with SMTP id a640c23a62f3a-a9a17f59d0bmr26163766b.13.1728874606156; Sun, 13 Oct 2024 19:56:46 -0700 (PDT) Received: from work.. (2.133.25.254.dynamic.telecom.kz. [2.133.25.254]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a99ebdfbff1sm270501366b.39.2024.10.13.19.56.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Oct 2024 19:56:45 -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 RESEND v3 3/3] kasan: delete CONFIG_KASAN_MODULE_TEST Date: Mon, 14 Oct 2024 07:57:01 +0500 Message-Id: <20241014025701.3096253-4-snovitoll@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241014025701.3096253-1-snovitoll@gmail.com> References: <20241014025701.3096253-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=E6=96=B9=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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=A8=E5=88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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