Received: by 10.223.185.116 with SMTP id b49csp5526654wrg; Tue, 27 Feb 2018 15:10:07 -0800 (PST) X-Google-Smtp-Source: AG47ELtXIH4+cWBrlTd/u+eTqaqKqP/HEjyN+c9JYHygMjOPuI9ZpJZaStVWXYAhYQCFZtkpsqCR X-Received: by 10.101.92.138 with SMTP id a10mr6582639pgt.129.1519773006968; Tue, 27 Feb 2018 15:10:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519773006; cv=none; d=google.com; s=arc-20160816; b=OFGN+KoQF93+hD5mgd0Q8AazDhiGX6UdzZwmosi/At1QWXCNf8RFpZcDEIjbHFCI0l J23M1Y+vFWqhMbTs+kn4fq1Auh/QgobGDnCWb4caUl9ciuLLEaSl3w5V7/I/a+qG8I1v 99wzDDC+g03T1P4HlEppkcana3rvTaiw/aSsC+Qeghzl/2+gBuKcEoikV4uEYNEkaWB9 YHFrg2iCMSq13ABU5mHtarE1nfcUoCIKLTiEZc50L4HnhaU90oFlZuQmSIIDCjz9rq7/ /d4sm9lmnr4LQ5BwQAcK/YvGaV6/1dp5eMcLoIrRVCvsXRXB0hxbzC36ALLsYftF+0Bo NEbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=FxkggFmv9/FNt561TSor/bmaoDYxJzcD3XigtfEEQsU=; b=FGWEJAHL/8EWksna/yJduXrEtzmjHwz+Gjp0lSxP2OgIQCffsEAWXww6Y8B+WY9c7e N82DqeKmN0uJDggVGaJBzsliavHcUjkYBarTFfCj/aALEF7nWUK2O6Uxpc6QcEZ07qVS fzfLAx0kiizqB9a55GKDgXoaXYulaxblSxGVaeEiIYjfqreaMIHaIM2dySuPextvdLxE wjhDJSCx8LetgzlMYyKZ0vfxYQeuuSLdfaJ24tvy/D3wBBw063jelDLhGUJXP55bz19D 78ooX2fr5gNTnumbluDifkY+ayER2+ObSRd04CHaBczIw483/q6HYRtEN9uPExnMAumD hk+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=azzXOFlO; dkim=fail header.i=@chromium.org header.s=google header.b=X+5XwvrM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q19si147097pgq.10.2018.02.27.15.09.51; Tue, 27 Feb 2018 15:10:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=azzXOFlO; dkim=fail header.i=@chromium.org header.s=google header.b=X+5XwvrM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751974AbeB0XJP (ORCPT + 99 others); Tue, 27 Feb 2018 18:09:15 -0500 Received: from mail-ua0-f196.google.com ([209.85.217.196]:40434 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751779AbeB0XJN (ORCPT ); Tue, 27 Feb 2018 18:09:13 -0500 Received: by mail-ua0-f196.google.com with SMTP id c14so352301uak.7 for ; Tue, 27 Feb 2018 15:09:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=FxkggFmv9/FNt561TSor/bmaoDYxJzcD3XigtfEEQsU=; b=azzXOFlORNAH20waxCi3C2KHQEn+CY8lUkMT6kLRwuwaz9r4v3VZIHnbh7wNf7gFR9 0tgLgBb6yrdDk5b6s6bZpTkbImbLnI0+bpOqZg5Y5VIutlxV0OkxuzaMIWZDdstuFc9O J85PEdsdkEzII9gSnEHZTlI+VD9/pPp7lMmjHYxquYQzcR+ZjGr8VwvuxoCVB12do+FN U7TQ3+4Nat41q3zE4O8gTFfyKNCrqEUhZDUym1Arl7Fs1oJC18b6WiNeB65uk7PptwcT 2uVV9Bi4dsaw5gUyKDbmFR87/rG2uaneAvNmUegWdHus5WhYuaA1vOrRKwtUsFoWf1PE Dg7A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=FxkggFmv9/FNt561TSor/bmaoDYxJzcD3XigtfEEQsU=; b=X+5XwvrM6r0FvPOMAQcDaQSjG7rKfImeL94eYdTNMv2ODStKHwJOvcrf3ZyWyWl6z3 7DKJI0e9VtzPfU+Jd13iUye1yT16WYFQfSunDC3LHQvQT4oz6fFHHSajJ1pqj1Vg4QVR ZVKbJLFcAkduvYvgBk+FAUp0IqrqKCiI+cYjQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=FxkggFmv9/FNt561TSor/bmaoDYxJzcD3XigtfEEQsU=; b=NxRfjuZughXXluVQg+xN7g63BLb6GnJ99Vpb/d8yF9pX+AaXVC7qDvfofbdy7QlEeK /QF+iKPAOVjsSbfwkDqW6C+QxbEZDGGU7+h81JN/Vh0lfo9VUCRewfGTTNe3v6zXs3y9 D6H5u/N4fzqbpir2DFkPxbnip/XYqmoHBmC8Ob6fW5VcoFWWMOgcX/R6f7ZL5GzW31XS WQ9JKUIJX69gw5wKux0hqf1OIiOR/bRsvIXvMTW5jyO+7WYAlN+jdhSbsf3bxen9jYP2 yX3kPUezHJsYGWE169yMgl6Rx+Ql2wnO+1QXs7UneWiRHbswbZ9cTZ/hhYkFkKKnzZJz kBUA== X-Gm-Message-State: APf1xPCtzMICVf6z9fUsWJGCg4yeI+sOJZV0mImNIbpdIH3y4MdF5dXj oOyC3TyeCQRE525DHP4PNKpm5Bzp4P1L+H3sNioYCQ== X-Received: by 10.159.54.227 with SMTP id p90mr8874998uap.74.1519772952886; Tue, 27 Feb 2018 15:09:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.242.140 with HTTP; Tue, 27 Feb 2018 15:09:12 -0800 (PST) In-Reply-To: <20180224024613.24078-3-mcgrof@kernel.org> References: <20180224024613.24078-1-mcgrof@kernel.org> <20180224024613.24078-3-mcgrof@kernel.org> From: Kees Cook Date: Tue, 27 Feb 2018 15:09:12 -0800 X-Google-Sender-Auth: OfAYreA96UorjfSf69qPvm23LTc Message-ID: Subject: Re: [PATCH v2 02/11] test_firmware: replace syfs fallback check with kconfig_has helper To: "Luis R. Rodriguez" Cc: Greg KH , Andrew Morton , Shuah Khan , Martin Fuzzey , Mimi Zohar , David Howells , pali.rohar@gmail.com, Takashi Iwai , arend.vanspriel@broadcom.com, =?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?= , nbroeking@me.com, Vikram Mulukutla , stephen.boyd@linaro.org, Mark Brown , Dmitry Torokhov , David Woodhouse , Linus Torvalds , Abhay_Salunke@dell.com, bjorn.andersson@linaro.org, jewalt@lgsinnovations.com, LKML , "linux-fsdevel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 23, 2018 at 6:46 PM, Luis R. Rodriguez wrote: > Now that we have a kconfig checker just use that instead of relying > on testing a sysfs directory being present, since our requirements > are spelled out. I don't see the reason to depend on config.gz, but it's a reasonable requirement for a test build. > Signed-off-by: Luis R. Rodriguez Acked-by: Kees Cook -Kees > --- > tools/testing/selftests/firmware/fw_fallback.sh | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/tools/testing/selftests/firmware/fw_fallback.sh b/tools/testing/selftests/firmware/fw_fallback.sh > index a42e437363d9..40b6c1d3e832 100755 > --- a/tools/testing/selftests/firmware/fw_fallback.sh > +++ b/tools/testing/selftests/firmware/fw_fallback.sh > @@ -49,10 +49,7 @@ kconfig_has() > > DIR=/sys/devices/virtual/misc/test_firmware > > -# CONFIG_FW_LOADER_USER_HELPER has a sysfs class under /sys/class/firmware/ > -# These days no one enables CONFIG_FW_LOADER_USER_HELPER so check for that > -# as an indicator for CONFIG_FW_LOADER_USER_HELPER. > -HAS_FW_LOADER_USER_HELPER=$(if [ -d /sys/class/firmware/ ]; then echo yes; else echo no; fi) > +HAS_FW_LOADER_USER_HELPER=$(kconfig_has CONFIG_FW_LOADER_USER_HELPER=y) > HAS_FW_LOADER_USER_HELPER_FALLBACK=$(kconfig_has CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y) > > if [ "$HAS_FW_LOADER_USER_HELPER" = "yes" ]; then > -- > 2.16.2 > -- Kees Cook Pixel Security