Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4513864rdb; Tue, 12 Dec 2023 01:20:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IEyrv/Sq8MIjxZp041c9HSQ0IgbsPbNsERpM3baaOts80OiB/KnbYQDGZpyngneSivQvWS+ X-Received: by 2002:a05:6a00:b87:b0:6ce:6f21:566c with SMTP id g7-20020a056a000b8700b006ce6f21566cmr7662861pfj.7.1702372826762; Tue, 12 Dec 2023 01:20:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702372826; cv=none; d=google.com; s=arc-20160816; b=OPfzBQ2XvGbzHt/2GZATP+xMO5O1Sxg1le9aMIbdViY843UitakRO/jqTYr59AXJVe w2HkivG2jfcJym3hQEu2Eq15vxNaYvtPMZjzNkWudpVwIx7aRAfVmZ90BFu4CaOTjFMR Z6Eh5j/xva6oYZqc1f5BC8xcFNr1RgfvLnGpZvx+VdKfqvjlmL89ao1Ce/YxV6RemE6v ykiwSJExNYOyZFH7Ggso50T0j7DgayZK2vVNu3eSx4ariKH0w0/LfkYgnzCBAfqoEVbz I3BlR/v0wt9pDiJ+APgKoVY38a5/56gscoXYN8Fm61c+4/TaKDi6Ei4h37knQ2QjmIn4 46mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=n3iXsZTA7DDZEZZBAbZi7ahs/svo8ZJWI4qmMuM5zT4=; fh=fWpG2EFyFDgCrE1mvgdIpn6huS4lG6SyInP1TlGxmoc=; b=O64Bs2nav1AaZetR9xrbmpNFSrdi6TEjYV70907VBnRN2X8vSGkUdyMOH8ONJHppX3 i3yvBzIOmVyEIHxP8jX8wM5KzfX7t7qFRlgpIjZz0c1N15HOpBb/fh72KK9JPvFLtgMP a9Sg4eu/d5uUbbAuTQ4uMoc3PzdZbyi3ZDeSd5gPk/vL9zIUPoaIZjKrk1d+yl3n9HDB Rc/FH21viqrEAnJi9nrLKM/tz7bQ03yTtK8hQCKJMhFKnnykipL/cq09vRCUOd1/sf2L Tt9WBQTfRVrWaqhC8SaiKCpf9el6GHec1rEav9GT1+rB8T/vyYkhA+ev1AOae3KK17vV Pzvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tum.de header.s=tu-postout21 header.b=icWpRiDQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tum.de Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id p22-20020a056a000b5600b006ce6da9d524si7472658pfo.326.2023.12.12.01.20.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 01:20:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@tum.de header.s=tu-postout21 header.b=icWpRiDQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=tum.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id DB2F78054EF4; Tue, 12 Dec 2023 01:20:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346228AbjLLJTv (ORCPT + 99 others); Tue, 12 Dec 2023 04:19:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346253AbjLLJTo (ORCPT ); Tue, 12 Dec 2023 04:19:44 -0500 Received: from postout2.mail.lrz.de (postout2.mail.lrz.de [129.187.255.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71B50FE; Tue, 12 Dec 2023 01:19:49 -0800 (PST) Received: from lxmhs52.srv.lrz.de (localhost [127.0.0.1]) by postout2.mail.lrz.de (Postfix) with ESMTP id 4SqCkB4ZNdzyTl; Tue, 12 Dec 2023 10:19:46 +0100 (CET) Authentication-Results: postout.lrz.de (amavisd-new); dkim=pass (2048-bit key) reason="pass (just generated, assumed good)" header.d=tum.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tum.de; h= in-reply-to:content-transfer-encoding:content-disposition :content-type:content-type:mime-version:references:message-id :subject:subject:from:from:date:date:received:received; s= tu-postout21; t=1702372786; bh=WVqZLzbRiMUVOMOUzl6GSebSesNYA4TdD tY3d47tqa4=; b=icWpRiDQ+Dkbt+mbfo6bx1CaHVlYa5iIVdt+nEteVMvyk5htn ORZz4sgz+cJyVTstEOFDiKVgqoXEOZYjVsGNY1btar+2KLWGtlmxULK/NPPYZ8cf 6NeuW01lhF9UQ7/Zusoo+1ahqV6ePZjLUNWb5kyJbZXAwkPvOmu+AjXUAZn+N99O eDlzA2ZQzcRM5NgucQA1PGPUXlL7OfbfWQ71C7vKH7w0pNuNilSOmGh8IPtS+Ne4 SxSeNqMQA8EPgqiMUX+NvuVH6zZkjheMDThKsRCh15KZUGgOWGsUdpfPzWIUu+rk csqLkCQQb8xXf0kc3YCiAzWN7zLjAZF/sT/Hg== X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs52.srv.lrz.de X-Spam-Score: -2.881 X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 Received: from postout2.mail.lrz.de ([127.0.0.1]) by lxmhs52.srv.lrz.de (lxmhs52.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id U88J6q2Jd8Lb; Tue, 12 Dec 2023 10:19:46 +0100 (CET) Received: from cerulean.fritz.box (unknown [IPv6:2001:a61:245c:a01:443b:cc34:8ae7:6ede]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by postout2.mail.lrz.de (Postfix) with ESMTPSA id 4SqCk90XN5zyTm; Tue, 12 Dec 2023 10:19:45 +0100 (CET) Date: Tue, 12 Dec 2023 10:19:41 +0100 From: Paul =?utf-8?Q?Heidekr=C3=BCger?= To: Andrey Konovalov Cc: Marco Elver , Steven Rostedt , Peter Collingbourne , andrey.konovalov@linux.dev, Andrew Morton , Alexander Potapenko , Dmitry Vyukov , Andrey Ryabinin , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov , Masami Hiramatsu , linux-trace-kernel@vger.kernel.org, Nick Desaulniers Subject: Re: [PATCH v3 1/3] kasan: switch kunit tests to console tracepoints Message-ID: References: <20230505095805.759153de@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 12 Dec 2023 01:20:24 -0800 (PST) On 12.12.2023 00:37, Andrey Konovalov wrote: > On Tue, Dec 12, 2023 at 12:35 AM Paul Heidekrüger > wrote: > > > > Using CONFIG_FTRACE=y instead of CONFIG_TRACEPOINTS=y produces the same error > > for me. > > > > So > > > > CONFIG_KUNIT=y > > CONFIG_KUNIT_ALL_TESTS=n > > CONFIG_FTRACE=y > > CONFIG_KASAN=y > > CONFIG_KASAN_GENERIC=y > > CONFIG_KASAN_KUNIT_TEST=y > > > > produces > > > > ➜ ./tools/testing/kunit/kunit.py run --kunitconfig=mm/kasan/.kunitconfig --arch=arm64 > > Configuring KUnit Kernel ... > > Regenerating .config ... > > Populating config with: > > $ make ARCH=arm64 O=.kunit olddefconfig CC=clang > > ERROR:root:Not all Kconfig options selected in kunitconfig were in the generated .config. > > This is probably due to unsatisfied dependencies. > > Missing: CONFIG_KASAN_KUNIT_TEST=y > > > > By that error message, CONFIG_FTRACE appears to be present in the generated > > config, but CONFIG_KASAN_KUNIT_TEST still isn't. Presumably, > > CONFIG_KASAN_KUNIT_TEST is missing because of an unsatisfied dependency, which > > must be CONFIG_TRACEPOINTS, unless I'm missing something ... > > > > If I just generate an arm64 defconfig and select CONFIG_FTRACE=y, > > CONFIG_TRACEPOINTS=y shows up in my .config. So, maybe this is kunit.py-related > > then? > > > > Andrey, you said that the tests have been working for you; are you running them > > with kunit.py? > > No, I just run the kernel built with a config file that I put together > based on defconfig. Ah. I believe I've figured it out. When I add CONFIG_STACK_TRACER=y in addition to CONFIG_FTRACE=y, it works. CONFIG_STACK_TRACER selects CONFIG_FUNCTION_TRACER, CONFIG_FUNCTION_TRACER selects CONFIG_GENERIC_TRACER, CONFIG_GENERIC_TRACER selects CONFIG_TRACING, and CONFIG_TRACING selects CONFIG_TRACEPOINTS. CONFIG_BLK_DEV_IO_TRACE=y also works instead of CONFIG_STACK_TRACER=y, as it directly selects CONFIG_TRACEPOINTS. CONFIG_FTRACE=y on its own does not appear suffice for kunit.py on arm64. I believe the reason my .kunitconfig as well as the existing mm/kfence/.kunitconfig work on X86 is because CONFIG_TRACEPOINTS=y is present in an X86 defconfig. Does this make sense? Would you welcome a patch addressing this for the existing mm/kfence/.kunitconfig? I would also like to submit a patch for an mm/kasan/.kunitconfig. Do you think that would be helpful too? FWICT, kernel/kcsan/.kunitconfig might also be affected since CONFIG_KCSAN_KUNIT_TEST also depends on CONFIG_TRACEPOITNS, but I would have to test that. That could be a third patch. What do you think? Many thanks, Paul