Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4307603rdb; Mon, 11 Dec 2023 15:37:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IGe3f+Pqx/MJ3iIuDjcBoHEMuzPKGaVhDhyESqcUrjnJXI2JQr5xldW8cQ6bSIoER16Bt+O X-Received: by 2002:a05:6808:2dcc:b0:3ba:f4a:4310 with SMTP id gn12-20020a0568082dcc00b003ba0f4a4310mr2625435oib.11.1702337875509; Mon, 11 Dec 2023 15:37:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702337875; cv=none; d=google.com; s=arc-20160816; b=015LO2MJaTz1xJwct4DLPTcdpYYESzffi37V2zxNiKMIltmLkZI3COLcsKWPIXLw7y 0DK5uD7p2kbZP8Ggdvue/GJumvyjmSaLxL13FPBnYFav2CHzfPBVUuRvM8Ps4wy7274K 3M7gYLVh+sASy73eCz2iYAdbFSTSHL4KkhKKN6mw0hpOzrzD/Ri31qHLh+C4MAyhzgUK uyJTOOSW+ZuEJDze36MWY0Tqjclm5/zxE1LzIK+qHSyhqNjTKVgTo2ddxM+bLfC4Ahjg 9LrGH/oXaqsGzUX77bq7oGMGmAqqPE3T2+RgfFKX5TYcwj8+X08PGfIAUwZPi16Oxuw8 oAxA== 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=8idFFu0L0dXkH2zjSo0W/AcVqktD9byVatdWxcpkJGc=; fh=akQ9pRj0ioS+a5e76cb5m/5897khq+iguQXzkvsNT28=; b=NjpQVcE9XzjMlK+Ro2btfIWSXwClvVDoCyBGxHBXjDPaEKa3QEVz6vypUpAKGpYqmk TxCImA7QfHR5AojFMadRLHFu7ZqAoL1WMvZmH9t83BTT36/QWcMvWoD28YY2ZPw6Vrqi ibI4F+cggjFG73MoRkS1DK2s8fvUA1brfH37A6gFlrOlaIUhp4zd4wUVkY2F7eCOP2CW vmTxgpwYrei99OcnoU1z7QTkrMR1v0O+1Lm3GjmzFo4LRyvsBZrzLwN5k88AKO/WcTM6 c8URWV1EUxV9dINRGX3XV6ZutZhrGMiy9SjUghFfPWnXPTrzNfqj1WRAxMP/ujbfjyp6 VT3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tum.de header.s=tu-postout21 header.b=XT23O3A2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id c11-20020a62e80b000000b006be1d2ee8f9si6744571pfi.224.2023.12.11.15.37.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 15:37:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@tum.de header.s=tu-postout21 header.b=XT23O3A2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 7FCCB8062345; Mon, 11 Dec 2023 15:37:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345163AbjLKXfR (ORCPT + 99 others); Mon, 11 Dec 2023 18:35:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229562AbjLKXfQ (ORCPT ); Mon, 11 Dec 2023 18:35:16 -0500 Received: from postout1.mail.lrz.de (postout1.mail.lrz.de [129.187.255.137]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 368D8CD; Mon, 11 Dec 2023 15:35:21 -0800 (PST) Received: from lxmhs51.srv.lrz.de (localhost [127.0.0.1]) by postout1.mail.lrz.de (Postfix) with ESMTP id 4Spylm6qCGzyTp; Tue, 12 Dec 2023 00:35:16 +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=1702337716; bh=hk0tuevZEoLDrYcG31rsdQ9GPMxog11sQ YsjOeuOlI8=; b=XT23O3A2DE9rX1e2iLgAYb42zO3ksg2FiIQsZRad0HZCTwWC0 usp9rXYFgx2LzBIj0FHbpEZ9tghtY8gsUOpRJXyg1XOGEj1ewsA5/mZbhr9UICbS R1hRot9yXH014E2HSJ+E8Z54MctMgv1DYfZpwtPRlOe3md016seOEzGBCbJb5+/+ rPFDJr1IOXVYuhEtoDNjesPywHOtmrZ2GToQB/GCMz1uQxjnHAokeR8NZyun1KMr mmESRYe9oUus1hWPZEKgtkB7/dIlfLdw85Jr8oUBAPjV7CQ5KbYlq+je/IaESULf 01l+cY2MBiFO/w/aY2fHLeakCbonAP+KWLtqw== X-Virus-Scanned: by amavisd-new at lrz.de in lxmhs51.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 postout1.mail.lrz.de ([127.0.0.1]) by lxmhs51.srv.lrz.de (lxmhs51.srv.lrz.de [127.0.0.1]) (amavisd-new, port 20024) with LMTP id Cuu56KEaV5jm; Tue, 12 Dec 2023 00:35:16 +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 postout1.mail.lrz.de (Postfix) with ESMTPSA id 4Spyll4BFKzyTb; Tue, 12 Dec 2023 00:35:15 +0100 (CET) Date: Tue, 12 Dec 2023 00:35:12 +0100 From: Paul =?utf-8?Q?Heidekr=C3=BCger?= To: Marco Elver Cc: Andrey Konovalov , 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: <20230215143306.2d563215@rorschach.local.home> <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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 11 Dec 2023 15:37:52 -0800 (PST) On 11.12.2023 23:56, Marco Elver wrote: > On Mon, 11 Dec 2023 at 23:48, Paul Heidekrüger wrote: > > > > On 11.12.2023 21:51, Andrey Konovalov wrote: > > > On Mon, Dec 11, 2023 at 7:59 PM Paul Heidekrüger > > > wrote: > > > > > > > > > Hi Paul, > > > > > > > > > > I've been successfully running KASAN tests with CONFIG_TRACEPOINTS > > > > > enabled on arm64 since this patch landed. > > > > > > > > Interesting ... > > > > > > > > > What happens when you try running the tests with .kunitconfig? Does > > > > > CONFIG_TRACEPOINTS or CONFIG_KASAN_KUNIT_TEST get disabled during > > > > > kernel building? > > > > > > > > Yes, exactly, that's what's happening. > > > > > > > > Here's the output kunit.py is giving me. I replaced CONFIG_DEBUG_KERNEL with > > > > CONFIG_TRACEPOINTS in my .kunitconfig. Otherwise, it's identical with the one I > > > > posted above. > > > > > > > > ➜ ./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 > > > > 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, CONFIG_TRACEPOINTS=y > > > > > > > > Does CONFIG_TRACEPOINTS have some dependency I'm not seeing? I couldn't find a > > > > reason why it would get disabled, but I could definitely be wrong. > > > > > > Does your .kunitconfig include CONFIG_TRACEPOINTS=y? I don't see it in > > > the listing that you sent earlier. > > > > Yes. For the kunit.py output from my previous email, I replaced > > CONFIG_DEBUG_KERNEL=y with CONFIG_TRACEPOINTS=y. So, the .kunitconfig I used to > > produce the output above was: > > > > CONFIG_KUNIT=y > > CONFIG_KUNIT_ALL_TESTS=n > > CONFIG_TRACEPOINTS=y > > CONFIG_KASAN=y > > CONFIG_KASAN_GENERIC=y > > CONFIG_KASAN_KUNIT_TEST=y > > > > This more or less mirrors what mm/kfence/.kunitconfig is doing, which also isn't > > working on my side; kunit.py reports the same error. > > mm/kfence/.kunitconfig does CONFIG_FTRACE=y. TRACEPOINTS is not user > selectable. I don't think any of this has changed since the initial > discussion above, so CONFIG_FTRACE=y is still needed. 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? Many thanks, Paul