Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5722944pxj; Wed, 23 Jun 2021 07:40:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpMb4qO/Rt7zGO7z7JIFcSdpiHAoa5Pq+cnJg3iNVsvV8RwxeRPzNZ1HTgUdrSsOUNZo8p X-Received: by 2002:aa7:c256:: with SMTP id y22mr12925519edo.177.1624459248567; Wed, 23 Jun 2021 07:40:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624459248; cv=none; d=google.com; s=arc-20160816; b=W2B7FRtX4pNHn09iMVPZ0BsCfL6gACaQnDbfzKn75iMB6zFKqttbEB9ZPm4OrkNfAH bvNTWJh/GV85fyeqYebsCjwpYUMvhhVkCUMDYc04ifsLDf4JrWUR2/v35+cBZV/76ZmG Mgdpc8EO6lfBSTEXMD+azok3QbS3MZfzm6f0W4JGAbPVG6FhxHvxfRgejptnFLwuJMT6 avMnd0ZHnCITrjqLtNzGsjpS6wiiGWjGLFAnWWRWT1r5LXUg13qCcanbpeN/zK7ceqrY 90SqOrtqS87PKNqXLIXBKpymcS4U7x2yNn8wFdhHLVLyZ2rUatkqb9e1e1yfn9n5nOZH wrDg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=gYsWzSIHMSc6Tk2EhcHMeSwtIxBEj34qEnDzw9ljN3s=; b=eHYbef0SnsojT1GIH6Oj4fHj6S6CUxESArpnaEJKLDUyk6dYQmtYGWhgtnFe0PjEt1 /2j2ih7n9h9nvjeDQg97lw5hqjF7VnV4V+hMKMwvT4uJqMCWZk0deKf3o/+Zxyhp2Buc 304uELC4nv+4rQ6SpRFIafxzKT0KsHjek4zsQo1JE7Is3FO9nt16ZVW+un2i3Sc+qXWl p0YgDkUeSEj4vCfhvIeXTKKXVZX5RtWQ+WuvowpTeLy6FR7r6C5ONjqyMi0f2Q+Lremg HE88prZz0VbikbhKbfshXEZQSKeiqjaagxLej+CmVXmZ1s9c+q8ZOZRFPwSZdf/oxmrH vsUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=On69jlBS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h14si17081ede.514.2021.06.23.07.40.23; Wed, 23 Jun 2021 07:40:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=On69jlBS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231284AbhFWOka (ORCPT + 99 others); Wed, 23 Jun 2021 10:40:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231187AbhFWOk3 (ORCPT ); Wed, 23 Jun 2021 10:40:29 -0400 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81DF3C06175F for ; Wed, 23 Jun 2021 07:38:12 -0700 (PDT) Received: by mail-pj1-x102c.google.com with SMTP id b5-20020a17090a9905b029016fc06f6c5bso1500626pjp.5 for ; Wed, 23 Jun 2021 07:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=gYsWzSIHMSc6Tk2EhcHMeSwtIxBEj34qEnDzw9ljN3s=; b=On69jlBS8D8eW015oMkd5PZ2WcwQmLiyjgNGu9DtIfKZV0aMLPx3I4ItRey5K6mYDV xwOnvhsLXMLHTs9uOgjKZM+AAmcRCcNUyOXkhDaasZ4vUbuQUC2Y+tJOn+sxQ6ANsmda fPYT2eyPvHfGHH1cz0BDu0FYRr7cNEsZ9OeAs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=gYsWzSIHMSc6Tk2EhcHMeSwtIxBEj34qEnDzw9ljN3s=; b=ivZnFfCkS0AnQrvtRN5FE/BAYnpZiyx6CowcQkAfqqQeDOLIuxX7Qn6EGI5Db56Hdj flcQqs8aVw1+gWd+1VoD+USQ6ZsqrVmql9Oz/vErX3ZiakxvPTiUKxKBzfu666HN1VKU 9krli1qcYEs39djKZz0dshLHG5dXLwLOEwCOXggGO0wuBLt0mdbo/iT7Te1VNArmT3Ne vyTNbS4NCcrdxSKt+o+BaHZtyM8zLu9klzc+vYwE7hYV9wS0RjH1GmbF6xgQtdf5g+6x BU8+qYTHlcCcXJJ6hYsAKRjOqwSlsRzOgr2gv2isP/RF/A8pf4ntohLEi8rayhKqoDY/ /VPA== X-Gm-Message-State: AOAM531vUcp5T1GC2IUE8kYOUx4uzFSbgSF5+Q34Gq8ZJ4stclEFyoLv KG9LWs4Tb9gsTwapkKhAyvJ/pg== X-Received: by 2002:a17:902:db07:b029:125:765c:75e1 with SMTP id m7-20020a170902db07b0290125765c75e1mr9852plx.9.1624459092040; Wed, 23 Jun 2021 07:38:12 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id i125sm186361pfc.7.2021.06.23.07.38.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Jun 2021 07:38:11 -0700 (PDT) Date: Wed, 23 Jun 2021 07:38:10 -0700 From: Kees Cook To: Guillaume Tucker Cc: Shuah Khan , stable@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] selftests/lkdtm: Use /bin/sh not $SHELL Message-ID: <202106230734.78A239D@keescook> References: <20210619025834.2505201-1-keescook@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 23, 2021 at 01:39:57PM +0100, Guillaume Tucker wrote: > On 19/06/2021 03:58, Kees Cook wrote: > > Some environments do not set $SHELL when running tests. There's no need > > to use $SHELL here anyway, so just replace it with hard-coded path > > instead. Additionally avoid using bash-isms in the command, so that > > regular /bin/sh can be used. > > > > Suggested-by: Guillaume Tucker > > Fixes: 46d1a0f03d66 ("selftests/lkdtm: Add tests for LKDTM targets") > > Cc: stable@vger.kernel.org > > Signed-off-by: Kees Cook > > > Tested-by: "kernelci.org bot" > > > Sample staging results with this patch applied on top of > next-20210622: > > https://staging.kernelci.org/test/plan/id/60d2dbdc3cfb88da0924bf41/ > > Full log: > > https://storage.staging.kernelci.org/kernelci/staging-next/staging-next-20210623.0/x86_64/x86_64_defconfig+x86-chromebook+kselftest/clang-13/lab-collabora/kselftest-lkdtm-asus-C523NA-A20057-coral.html Awesome! This looks great. :) What's needed to build these kernels will different CONFIGs? I see a bunch of things (commonly found in distro kernels) that are not set: CONFIG_SLAB_FREELIST_HARDENED=y CONFIG_FORTIFY_SOURCE=y CONFIG_HARDENED_USERCOPY=y # CONFIG_HARDENED_USERCOPY_FALLBACK is not set Should I add these to the kselftest "config" file for LKDTM? Thanks again for the help with this! -Kees -- Kees Cook