From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F4BCCCA480 for ; Mon, 11 Jul 2022 23:17:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231295AbiGKXRf (ORCPT ); Mon, 11 Jul 2022 19:17:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230395AbiGKXRd (ORCPT ); Mon, 11 Jul 2022 19:17:33 -0400 Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 596268877A for ; Mon, 11 Jul 2022 16:17:31 -0700 (PDT) Received: by mail-io1-xd31.google.com with SMTP id n68so6379385iod.3 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=MnI12NF19Lx7DezZctKzzg6i1JHnMEqSHBhc/RTkYuAxqobuxgc+3Eh49dFbXrj8Ch DekMQphX3anYP7MLK8tLKXbxf9RhVeER+j9+zMeFUQBFV2W35iiT9teFmfVmgK2SnRze JFnPh/mNZyVXK0fo3T6dEVFY8fJws4bRMeWo7CbE3AEJuxpdyyv+MRWD1rtRUA3aM/Gt //8o6xlhoAfnN/wuVSxc4sqXpp8U56LxNJoVQXHM1vMS6TGzDvJb5HL+I0XODIyMiamb TdGbK5wJo75cFyijrEWW6TrJAZDIxLXXy3UydV/qEk4vEzmW/RF5fH3htux42V8evq05 cgSQ== X-Gm-Message-State: AJIora947uSWq17c//XLvEY2IUlKvuEe/ooED/7ievZY69p06okkS269 ZxOfn3hlpFn39sLUVX4+mUQZXA== X-Google-Smtp-Source: AGRyM1uj5haGzpa8pwS0HQnvZKEjcACNgX12g8/rtIBFbcZxuC0BrgiAPyKTyF5FN6ouZQ+LKJ9q5Q== 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 Precedence: bulk List-ID: X-Mailing-List: linux-block@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