Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3822915imw; Mon, 11 Jul 2022 17:05:25 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sIfM2zwfUQexv/jX4rL7qbrA/W1lA4jet3sFUs1r+erjAYtEfZ0JbMCs+uTQy+kc9ctt97 X-Received: by 2002:a05:6a00:114f:b0:528:2c7a:634c with SMTP id b15-20020a056a00114f00b005282c7a634cmr20727953pfm.41.1657584325574; Mon, 11 Jul 2022 17:05:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657584325; cv=none; d=google.com; s=arc-20160816; b=yR4Tko3DbKv9wV6ScnESCnokhHlpeHOhSIclx48/+W3O5yt+TApCqQmjR4WFKHvZ8l wJgdlMfBEFmzkZUePajdQXaM85Md+NkDtPnq6E9Ave0tD4HC1tzu5jxFnAxy1yXyln3i cHtw3w0o02S+mrr+seYNWAwqK8MR+ox+2fvy5XFzNuVGYSkGuV+zJQoMDsWlvonrVsOS nT6ayDFjSMSmLJ95RzQakdQUFwpWuPXAxV4YrE4dRq0YBfpzSFfrcHOIXhfeX2hza7tj b5An8lrUn3AqWlcdFEpv5TYMfMBaoWu8ovDTkqR9tU56i+Asma1CKItS3VG9lO4z+h8t MifA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=X4V9spvk1I9jjtr8sVusqF9oSSPPa+R7P/GUBMC4gLc=; b=j3REV+P+C+uwjEejNym+bO4fKM9tFIa3oy44xt/AelOgnJ8gA7QLpXmwFY1Q2uqPjR iabay/CdyIoiUYCjWx1b/HRTF2PVZ6+FTsIYe9EslMyrMfhBqxZYIwI+Vb2LnWG/7DxA KVTGidE/CrfDKLN40Ytoy/mf2exS3fiBNHqUX4JylC9VWaMOeLnp0/jOSfhZP5c9Ycpa WKGKQMctBzgjRAkXH0vSovnGvOjwUkbXS7PZnEWzmZa7qAFpgNvkP25jjQJgQwiPPKWV 9AwBldJmjxS1F11/4g08qWjhXelK+a2yuYiKohtkYnwXpNa20UGQDvThtEySPfbs1k1U vw0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="iL2mD/P0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f18-20020a63e312000000b004129de98629si11121754pgh.784.2022.07.11.17.05.13; Mon, 11 Jul 2022 17:05:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b="iL2mD/P0"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231304AbiGKXRf (ORCPT + 99 others); Mon, 11 Jul 2022 19:17:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229990AbiGKXRd (ORCPT ); Mon, 11 Jul 2022 19:17:33 -0400 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57F7888777 for ; Mon, 11 Jul 2022 16:17:31 -0700 (PDT) Received: by mail-io1-xd2c.google.com with SMTP id r76so6355279iod.10 for ; Mon, 11 Jul 2022 16:17:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=X4V9spvk1I9jjtr8sVusqF9oSSPPa+R7P/GUBMC4gLc=; b=iL2mD/P0V4lfh23PpOV1RJOguNLsoUgdYgJwIjkRgS64rurYUXaVJSd3k7136hlWh+ aSX3Sy9hkwO1TextBrkhg7/G0fkAst9YMLYeZGIPYO0n1vg88u4nguP2uIcjBSJdIG2s TQRIQWOEtYP10f+luBeND/Wq3Hi7OU8xOISJE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=X4V9spvk1I9jjtr8sVusqF9oSSPPa+R7P/GUBMC4gLc=; b=RDg/hNNZdboZUByPnb8CwDi9bQZmcEZv7vn9/SLh8L83QGZYxI04JKDNH5C6kmV46N 2TQ758n63csnzI2n0k474oYvZ2xJHvwVGs1aNqRHAuoR257ibFG/xAghg8MO/sJWLxAU njwzCAWAKIkiOQwzQsdPDZsybts0trPgXxitC4qd6poxJ44oKm39ktSfTK8ndqXeIDzG jJZ3MaOF3MgAxx0H1ow1wvDUlEdtPO/JfSaRP7fYAVRaFYF8/uvQZ+Yt9G1x0Aq84Ci/ hLPnvq86h7dO6f8vUPO9/si4Rth72FXl7Ns3c1RcgE8PKTVb/FlIuu7FO/ohPNPQ8vWW Gbag== X-Gm-Message-State: AJIora80vSLaXP5L5mlfNW4U6CrmM87ScP+n0CwiywZ8e9h9Ppi16vo8 lm8iay+KaCV5/p8OLS/sh6GAjg== X-Received: by 2002:a05:6602:2e0c:b0:669:b7a8:fb0a with SMTP id o12-20020a0566022e0c00b00669b7a8fb0amr10334823iow.121.1657581450696; Mon, 11 Jul 2022 16:17:30 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id y20-20020a056e02119400b002dc239fbd04sm3185890ili.22.2022.07.11.16.17.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Jul 2022 16:17:30 -0700 (PDT) Subject: Re: [PATCH v6 3/4] kunit: Taint the kernel when KUnit tests are run To: David Gow Cc: Daniel Latypov , Andrew Morton , Brendan Higgins , "Guilherme G . Piccoli" , Sebastian Reichel , John Ogness , Joe Fradley , Luis Chamberlain , Nathan Chancellor , KUnit Development , "open list:KERNEL SELFTEST FRAMEWORK" , Andy Shevchenko , "open list:DOCUMENTATION" , Linux Kernel Mailing List , Jani Nikula , Lucas De Marchi , Aaron Tomlin , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, Michal Marek , Nick Desaulniers , Jonathan Corbet , Linux Kbuild mailing list , Greg KH , Masahiro Yamada , Kees Cook , Shuah Khan References: <20220708044847.531566-1-davidgow@google.com> <20220708044847.531566-3-davidgow@google.com> From: Shuah Khan Message-ID: <4e5ca5b9-cdb8-4ddf-b057-27f721427f52@linuxfoundation.org> Date: Mon, 11 Jul 2022 17:17:29 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 7/8/22 9:35 PM, David Gow wrote: > On Sat, Jul 9, 2022 at 5:24 AM Shuah Khan wrote: >> >> On 7/8/22 3:22 PM, Shuah Khan wrote: >>> On 7/8/22 3:00 PM, Daniel Latypov wrote: >>>> On Fri, Jul 8, 2022 at 1:22 PM Shuah Khan wrote: >>>>> >>>>> On 7/7/22 10:48 PM, David Gow wrote: >>>>>> Make KUnit trigger the new TAINT_TEST taint when any KUnit test is run. >>>>>> Due to KUnit tests not being intended to run on production systems, and >>>>>> potentially causing problems (or security issues like leaking kernel >>>>>> addresses), the kernel's state should not be considered safe for >>>>>> production use after KUnit tests are run. >>>>>> >>>>>> This both marks KUnit modules as test modules using MODULE_INFO() and >>>>>> manually taints the kernel when tests are run (which catches builtin >>>>>> tests). >>>>>> >>>>>> Acked-by: Luis Chamberlain >>>>>> Tested-by: Daniel Latypov >>>>>> Reviewed-by: Brendan Higgins >>>>>> Signed-off-by: David Gow >>>>>> --- >>>>>> >>>>>> No changes since v5: >>>>>> https://lore.kernel.org/linux-kselftest/20220702040959.3232874-3-davidgow@google.com/ >>>>>> >>>>>> No changes since v4: >>>>>> https://lore.kernel.org/linux-kselftest/20220701084744.3002019-3-davidgow@google.com/ >>>>>> >>>>> >>>>> David, Brendan, Andrew, >>>>> >>>>> Just confirming the status of these patches. I applied v4 1/3 and v4 3/4 >>>>> to linux-kselftest kunit for 5.20-rc1. >>>>> I am seeing v5 and v6 now. Andrew applied v5 looks like. Would you like >>>>> me to drop the two I applied? Do we have to refresh with v6? >>>> >>>> Just noting here that there'll be a merge conflict between this patch >>>> (3/4) and some other patches lined up to go through the kunit tree: >>>> https://patchwork.kernel.org/project/linux-kselftest/patch/20220625050838.1618469-2-davidgow@google.com/ >>>> >>>> Not sure how we want to handle that. >>>> >>> >>> I can go drop the two patches and have Andrew carry the series through >>> mm tree. >>> >> >> Sorry spoke too soon. Yes there are others that might have conflicts as >> Daniel pointed out: >> >> https://patchwork.kernel.org/project/linux-kselftest/patch/20220625050838.1618469-2-davidgow@google.com/ >> >> thanks, >> -- Shuah >> > > Thanks everyone for pointing these out. > > I've rebased the other series (the KUnit module support one: > https://lore.kernel.org/linux-kselftest/20220709032001.819487-1-davidgow@google.com/ > ) on top of this. > > If they all go in via the kselftest/kunit tree, everything should be fine now. > > Cheers, > -- David > Thank you David. All patches applied now to linux-kselftest kunit for 5.20-rc1 thanks, -- Shuah