Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3065173pxb; Tue, 12 Jan 2021 05:36:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJyt0bdJTm4TYEGfeerlGGTk0rYQ8O25Mh7mf/rs53Gr/WIA0/qF0kzwZZBBSvF7QKT/PeT1 X-Received: by 2002:a17:906:aec6:: with SMTP id me6mr3247095ejb.542.1610458602832; Tue, 12 Jan 2021 05:36:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610458602; cv=none; d=google.com; s=arc-20160816; b=sSIA0RUYeniI1T9uTFkmYQIwZgY30tij/loBKbMpfe+LoMAtA9eL+ddxLzRozm4ipO Wj5iKjjoVitHLknAEbvlZGMnvI6szSWBUpEejmLBxGFMvSP4scLOTgUtwZehrk8yVsQ4 Cg5l6iFdWsmCfPyaJIrzaVJoxoaA+4vFRMX55fU6l5wtTSDXj9pYsptha9gVtCmKnZth 3eSVE4+zAmhPGDubBMCzzHoVc/hsr4r91VYxzPNmlCBzpnG/l0gm7sq4KooIWUMVe+Qj +n/GivIAOXKHujWkXRv71hH/eefWgBpNXZzDq4KBH62qEP8blUI3DUBkKLuxi3X4RbX8 E9mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=qMb9wiTztKRoS07hzB3mhdKsb+sq4X1Trw3VZKDYs14=; b=XK0h2E/LdDxDV2MZDoB/6yzR6459q0+SqrnIauffA3umMhQXMFio1nZ2CuBVa5p9iH /huGYIjrS1M63OoWzPq8tqU2kYA0vLrb/QYvQ2L7NQYsVojhP2UbZaBJaMNuAp9fR2Ra 0AXD1vmo36ol90NMeYOu4akXzrHA9iPWUIFXSZpS2TIiJykw8oIdVubqZSpboQ2BJOL9 wFkJs5kUt7Qk3K+B3WSM2YF2VbxbB0RO13V/6LIMt/mFW6dTf1EZ7El7acwPUFWkgz/A 0vw3FAz/w06TXrEKUtfG2J9eQVWVkq5mCM+dZkWBX8ZxvDwTDsql2eHeFn1M/wkDWHyl Wucw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=LulKNfPy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f15si1277717edq.340.2021.01.12.05.36.18; Tue, 12 Jan 2021 05:36:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=LulKNfPy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726900AbhALNeV (ORCPT + 99 others); Tue, 12 Jan 2021 08:34:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728281AbhALNeV (ORCPT ); Tue, 12 Jan 2021 08:34:21 -0500 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1615C061575 for ; Tue, 12 Jan 2021 05:33:40 -0800 (PST) Received: by mail-wr1-x435.google.com with SMTP id d26so2484889wrb.12 for ; Tue, 12 Jan 2021 05:33:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=qMb9wiTztKRoS07hzB3mhdKsb+sq4X1Trw3VZKDYs14=; b=LulKNfPy6RVKeuhuvL+21DkViXqm+xoh01+ZKNpfO8NcjO0tSBaITJinrbdfENlRvO iiiFj9B0zakXBmdRrGQpq8QPe++CE5K8M8Yq68gCWH/jAvR1iAOL0C8UNi/f75vtG7GI B8+rXYakqo+ZXricrDxC2lsa6jKFHT4TxSBqO0ZsGTZgYOtwuHQzRB4ff7zKkR795Aps ym4/FFqVJS5TlHhjSbFKfKQB9hOf2Omg7HihXK6NpglMTkh97VAg35jyAF+id3eJ3TDN kjBRTl4GCIxqWWdMqYdbc9/SkACGesAJlWAdCSPT8tirP2P0pi4PnVDzZiAdn3GJPgcF a+QA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qMb9wiTztKRoS07hzB3mhdKsb+sq4X1Trw3VZKDYs14=; b=Axe43/ObTnZOE/ENOihtVNGOZE14W0WqxH3A2UqRxJMqyF3BeRi/7ye0C0EFvbvYAo AzU/RxwQE6L9zlBALks34pT+oc1y+T4ozwwyt4YSgobz64zRkLbXcsnTt2LnlbTI1+H4 OGInmz92sb98GwpXE8vKMYpksbsAI+DGKdimW6e7+XyaYzI/zNw51bYtiEdC4Df1pAgQ ejFsTtZcDO8zm0NXdc3op/+f0HnlU0F88LqT59qXi/6AYRMLeTFH4B0IPSiaON4F8BDh 7d38facCroMAkgCWgHw0CgfkjlT/xo6e6pWTAt7NYpHknfS9iLnITyyhgXmj4mMad7Za KA+A== X-Gm-Message-State: AOAM531ERXFDA5RD62aRoooLtXwq6wv3Dy3ENmH4uH8gDEXGIB6KK2Wr 4i7UTXo1EPsKU6vfVL5Ve4Peyg== X-Received: by 2002:a5d:4712:: with SMTP id y18mr4402827wrq.229.1610458419201; Tue, 12 Jan 2021 05:33:39 -0800 (PST) Received: from elver.google.com ([2a00:79e0:15:13:f693:9fff:fef4:2449]) by smtp.gmail.com with ESMTPSA id s63sm4156014wms.18.2021.01.12.05.33.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jan 2021 05:33:38 -0800 (PST) Date: Tue, 12 Jan 2021 14:33:32 +0100 From: Marco Elver To: Andrey Konovalov Cc: Catalin Marinas , Vincenzo Frascino , Dmitry Vyukov , Alexander Potapenko , Andrew Morton , Will Deacon , Andrey Ryabinin , Evgenii Stepanov , Branislav Rankov , Kevin Brodsky , kasan-dev@googlegroups.com, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 06/11] kasan: rename CONFIG_TEST_KASAN_MODULE Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.2 (2020-11-20) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 05, 2021 at 07:27PM +0100, Andrey Konovalov wrote: > Rename CONFIG_TEST_KASAN_MODULE to CONFIG_KASAN_MODULE_TEST. > > This naming is more consistent with the existing CONFIG_KASAN_KUNIT_TEST. > > Signed-off-by: Andrey Konovalov > Link: https://linux-review.googlesource.com/id/Id347dfa5fe8788b7a1a189863e039f409da0ae5f Reviewed-by: Marco Elver For this patch, as-is. But we could potentially do better in future -- see below. > --- > Documentation/dev-tools/kasan.rst | 6 +++--- > lib/Kconfig.kasan | 2 +- > lib/Makefile | 2 +- > 3 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst > index 26c99852a852..72535816145d 100644 > --- a/Documentation/dev-tools/kasan.rst > +++ b/Documentation/dev-tools/kasan.rst > @@ -374,8 +374,8 @@ unmapped. This will require changes in arch-specific code. > This allows ``VMAP_STACK`` support on x86, and can simplify support of > architectures that do not have a fixed module region. > > -CONFIG_KASAN_KUNIT_TEST & CONFIG_TEST_KASAN_MODULE > --------------------------------------------------- > +CONFIG_KASAN_KUNIT_TEST and CONFIG_KASAN_MODULE_TEST > +---------------------------------------------------- > > KASAN tests consist on two parts: > > @@ -384,7 +384,7 @@ KASAN tests consist on two parts: > automatically in a few different ways, see the instructions below. > > 2. Tests that are currently incompatible with KUnit. Enabled with > -``CONFIG_TEST_KASAN_MODULE`` and can only be run as a module. These tests can > +``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. > > diff --git a/lib/Kconfig.kasan b/lib/Kconfig.kasan > index 3091432acb0a..624ae1df7984 100644 > --- a/lib/Kconfig.kasan > +++ b/lib/Kconfig.kasan > @@ -192,7 +192,7 @@ 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 TEST_KASAN_MODULE > +config KASAN_MODULE_TEST > tristate "KUnit-incompatible tests of KASAN bug detection capabilities" > depends on m && KASAN && !KASAN_HW_TAGS > help > diff --git a/lib/Makefile b/lib/Makefile > index afeff05fa8c5..122f25d6407e 100644 > --- a/lib/Makefile > +++ b/lib/Makefile > @@ -68,7 +68,7 @@ obj-$(CONFIG_TEST_IDA) += test_ida.o > obj-$(CONFIG_KASAN_KUNIT_TEST) += test_kasan.o > CFLAGS_test_kasan.o += -fno-builtin > CFLAGS_test_kasan.o += $(call cc-disable-warning, vla) > -obj-$(CONFIG_TEST_KASAN_MODULE) += test_kasan_module.o > +obj-$(CONFIG_KASAN_MODULE_TEST) += test_kasan_module.o > CFLAGS_test_kasan_module.o += -fno-builtin [1] https://www.kernel.org/doc/html/latest/dev-tools/kunit/style.html#test-file-and-module-names Do we eventually want to rename the tests to follow the style recommendation more closely? Option 1: Rename the KUnit test to kasan_test.c? And then also rename test_kasan_module.c -> kasan_module_test.c? Then the file names would be mostly consistent with the config names. Option 2: The style guide [1] also mentions where there are non-KUnit tests around to use _kunit for KUnit test, and _test (or similar) for the non-KUnit test. So here we'd end up with kasan_kunit.c and kasan_test.c. That would get rid of the confusing "module" part. The config variable could either remain CONFIG_KASAN_MODULE_TEST, or simply become CONFIG_KASAN_TEST, since we already have CONFIG_KASAN_KUNIT_TEST to distinguish. But I won't bikeshed further. If you do a v2, I leave it to your judgement to decide what is most appropriate. Thanks, -- Marco