Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4839659iob; Mon, 9 May 2022 02:53:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrhJ8gIqX8Y7o9aQQTOtU1dgczeTAd7YLO8Xye9YLENgnFnigcQmnxBCK66ew7DGTGXQOv X-Received: by 2002:a65:6c08:0:b0:3c6:39e3:ae98 with SMTP id y8-20020a656c08000000b003c639e3ae98mr12720612pgu.215.1652090038968; Mon, 09 May 2022 02:53:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652090038; cv=none; d=google.com; s=arc-20160816; b=1Ktl87LHTcDpxAlFnsNCKjhp4phzR9IQDPUtcSTViOJsvSDU9KHTvFNOwgUjHSkDSx imu3gU351LoSzcr4S7O1gAn5ChrEy2+WEnG5YTDVnihjrOjKb/b5hWa4dsoIBC1alb9e S9rmoeRmm2RvXXSZGi3W7SsAP5u4dY2cB35VC0f5BBPBIU4d3urKhsMAvEZCzMOz9lSx x46u2BOeDbNXIOOnMcNhzWeS6HA2DRovaPEsE/Hs1PEkzeS0hIjQDLXYmGnPxTHEKM2E fpmOx9UD8dBPKDxcwltH6QH/E+v9cvP+3vmIq1O/jz3ztPqpDaE8nQIPIid2F1GooKET AawQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=yqErQjmS+bnUS13HloDHpaivj9GT+Qdx14G8nSP6Cog=; b=EBR+jYkWn96+9bZ2wyrTXMjN49dDooO0rsnVAo8LF4443WHXqpcLnDudcpOFU6QEdb tHubocZpX8Zqur5AcTUFkV4cqaw+BSZpsH14O9aUZ4wU/eBtkk9gFe1eFas7hWQG6nc/ rH5rUWeCNVXSX4X1clrqfsPKIUxbLMJUDGIe0+3rIbf8EOk644W2CGHzu6itpqMwpVF0 OUvfzr+c6EUx7PZypm+vw76JhFgy81S1v0VGq7Cp9q9rJRcvJAq7wFFxZJgo3Y8CCgkx JYsOoiFIPBpzDVQ1bfTyJDuoW1tdGcfHd2aFqeAtU7n/e4OvZgXFglnoWRhLYkYj8Tlq /ktg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=qd8R7nTQ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id w5-20020a170902e88500b0015e9605ae8bsi12466085plg.123.2022.05.09.02.53.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:53:58 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=qd8R7nTQ; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 587D8A6236; Mon, 9 May 2022 02:36:26 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378520AbiEDVQP (ORCPT + 99 others); Wed, 4 May 2022 17:16:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238438AbiEDVQM (ORCPT ); Wed, 4 May 2022 17:16:12 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BA5F4A92C; Wed, 4 May 2022 14:12:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=yqErQjmS+bnUS13HloDHpaivj9GT+Qdx14G8nSP6Cog=; b=qd8R7nTQdEKUrp5XQwz8zr0tax LPOrH0DhAKEN9lLc/py2/4c+i94bgjTT8Z40U95XqlVChQAHQ9BBmkBrXX+nIUy9NHDlkPINMdAqN zq8vsIDGMxMCUOWxdegzbmmIZ26ZPJ6R/iVLKsB/jQ0aDic8qdT+14tNt32smVnbFdiqDxwB2zADN 3mDOsk0AK4hyt4InvnhTeLItp3d/5nVvbcqNWdKfnSAoyfivSjocwCtsu8M79pIOoW/5oCB5gsnle JBCLIoK7rdonK5qoHipzIwFHMv9DC5MJ84zgFNw9Mda0x1SdGcydIzf37GfjwHGKjKUlNvRDlSUE2 CYabBD0A==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmMIQ-00CkOY-PP; Wed, 04 May 2022 21:12:30 +0000 Date: Wed, 4 May 2022 14:12:30 -0700 From: Luis Chamberlain To: Daniel Latypov , Shuah Khan Cc: David Gow , Lucas De Marchi , Aaron Tomlin , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, Brendan Higgins , Andy Shevchenko , Jonathan Corbet , Andrew Morton , Kees Cook , Greg KH , "Guilherme G . Piccoli" , Sebastian Reichel , John Ogness , Joe Fradley , kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Jani Nikula Subject: Re: [PATCH v2] kunit: Taint kernel if any tests run Message-ID: References: <20220429043913.626647-1-davidgow@google.com> <20220430030019.803481-1-davidgow@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Luis Chamberlain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 04, 2022 at 02:19:59PM -0500, Daniel Latypov wrote: > On Wed, May 4, 2022 at 1:46 PM Luis Chamberlain wrote: > > OK so, we can just skip tainting considerations for selftests which > > don't use modules for now. There may be selftests which do wonky > > things in userspace but indeed I agree the userspace taint would > > be better for those but I don't think it may be worth bother > > worrying about those at this point in time. > > > > But my point in that sharing a taint between kunit / selftests modules > > does make sense and is easily possible. The unfortunate aspect is just > > Yes, I 100% agree that we should share a taint for kernelspace testing > from both kunit/kselftest. > Someone running the system won't care what framework was used. OK do you mind doing the nasty work of manually adding the new MODULE_TAINT() to the selftests as part of your effort? *Alternatively*, if we *moved* all sefltests modules to a new lib/debug/selftests/ directory or something like that then t would seem modpost *could* add the taint flag automagically for us without having to edit or require it on new drivers. We have similar type of taint for staging, see add_staging_flag(). I would *highly* prefer this approach, event though it is more work, because I think this is a step we should take anyway. However, I just checked modules on lib/ and well, some of them are already in their own directory, like lib/math/test_div64.c. So not sure, maybe just move a few modules which are just in lib/*.c for now and then just sprinkle the MODULE_TAINT() to the others? > > that selftests don't have a centralized runner, because I can just > > run tools/testing/selftests/sysctl/sysctl.sh for example and that's it. > > So I think we have no other option but to just add the module info > > manually for selftests at this time. > > Somewhat tangential: there's a number of other test modules that > aren't explicitly part of kselftest. Oh interesting, like which one? > Long-term, I think most of them should be converted to kselftest or > kunit as appropriate, so they'll get taken care of eventually. Makes sense. Luis