Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2107985pxk; Sat, 3 Oct 2020 08:22:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZzjofGK8xWK7DhCFvyRKeELnlcK0tSdpyIXsW2QNj85iDuKvTiRa1IwQPA0ocuYk3amV1 X-Received: by 2002:a17:906:52d5:: with SMTP id w21mr7221496ejn.501.1601738541308; Sat, 03 Oct 2020 08:22:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601738541; cv=none; d=google.com; s=arc-20160816; b=R0j/JctEaiUQCwe03zJkfpAxG8ywlaEq+39ATtzOuWUDf4/BdDh6s1C5bwhGiaLyzx +kOmBquJl2c+ZiqZwXO/duskW241Vg6wg82m1jiociKnep0RIAtxZtD0pWBkDk/6cwrb SJMi4gUVEpdJb8VG9mysoyu0aQoPSFSABS0no4GV+jKhPTPAXmA+UrHp34poQYzjh8av flwtt+Xiu3P+30/4ZTJNw8d9UYjc1cVEIIIARkPCkNxFpQao2SgOs8Au6yCr1aedL6WY 1aI7wpPKOot3JGyQuP3I7GmF0yP/bVhYxswGNV/XJ2oEgvLM2B8dPCF1lrz8KkZXqJ89 3rDQ== 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 :mime-version:user-agent:date:message-id:cc:to:subject:from :dkim-signature; bh=CxbBf0VRe0OZIyWTwmQLbfkYS+f/I5q5WzqukLpPtqk=; b=xmMwNf/8V9Pbn0zaS2s0nhtpaRLh2HZgmIcKdszBzyIDP7W/ZrZbkEC2+FKuSC2aI9 LeI+mZqxsaDlNtcgVzr7go4FpJm4lUFQr6TGO5CKlpE9Mz2i3lrEuSJY5Yt3Vu5zkdwH Qq4oNqZ/R5xA1TqyESg4517bNqMTP39+4llAb/DlKGbN0xzr4ysGxW9U8RO4JWVq++YR lIKNYOEtPSZzPLmagNXStsrxb9s5VZSAMEutMcxQNxP+U0LYSD2F5yEEbu0h+x0xKzzK /X1tGm4TPZZmfPgoP7vFmSOD3TjHkSs0RPhy9IZybgq4vHw5Ew34WK8LuDWAR23QLpHI H+bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fCtR6Dln; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cx12si3606484edb.298.2020.10.03.08.21.58; Sat, 03 Oct 2020 08:22:21 -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=@gmail.com header.s=20161025 header.b=fCtR6Dln; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725828AbgJCPUW (ORCPT + 99 others); Sat, 3 Oct 2020 11:20:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725747AbgJCPUW (ORCPT ); Sat, 3 Oct 2020 11:20:22 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F8BFC0613D0; Sat, 3 Oct 2020 08:20:22 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id nl2so803583pjb.1; Sat, 03 Oct 2020 08:20:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=CxbBf0VRe0OZIyWTwmQLbfkYS+f/I5q5WzqukLpPtqk=; b=fCtR6DlnazI9qSvmWO5CT3uqVuXeQBmf20Vfz9o3tHYLhPd/0StGuPQhxHsfc1RCBB dv++7Y7psyh6Uy/4JY/1qv6iZJ3Ua4nKFt0xqdwepxekoOXg0YEVtE/V2saQUplEfd87 P/bjbWinHFpzTfhm+1DELqxO0BYLr8uTDRSrhGYbnbtWbp1kUjVsvJ0VwkQVaHM2kxN8 N8xTjrw5/08nKtX3OZSRnf2s7PJZ9QT+Cm7za9aShaXMJ8HiM6SWMj8lEo1phVy0mL/5 GtSU89e7o8EDi/Ml0FqlcOyo4QnYN77P0J7l8/6NMqmSFajV3EhosJbG5pNpw83NZNCU l3OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=CxbBf0VRe0OZIyWTwmQLbfkYS+f/I5q5WzqukLpPtqk=; b=UeRFejdsvq+fXIcrvwW6+VxBPCo8ucetd53DCeyJ+Omvml/u5yA2nbY2k1lTs0Skor IsNnWWpnABrTM550NbJr+OEmZyjT06+sD9pcD16L8jsoj0V54Ixyl1cNXk+kAD4652aB ijy85X1OTkpn+bkguN6SOJ5boOfA1egCjL9WXLbQgcZjq5Ebtvr99uCCsfjCntE76knW wVkJjhJSD94ImRnJoMMwSYjppeR4aXkWEUuFr2uWulWfIr9qWbee4l8PmugiLy12WaCO vfurJDQzkKy4rkV9OG+j4bm8p+3jteqASlh1lO0OM7kJajN0Rj6ttxWmC40ISI2nZdbq YAMw== X-Gm-Message-State: AOAM530kJgzHzkgfqcDuZ+vUPrBYjO2dgfg+Bv9nGZrHyRV0aKv1vci+ r4UTMI5wEr8UyteUZWUKhtg= X-Received: by 2002:a17:90b:140c:: with SMTP id jo12mr8029928pjb.41.1601738421556; Sat, 03 Oct 2020 08:20:21 -0700 (PDT) Received: from localhost.localdomain ([2405:201:a404:280a:90bd:7a49:dcda:1fb1]) by smtp.gmail.com with ESMTPSA id e13sm5071942pjy.38.2020.10.03.08.20.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 03 Oct 2020 08:20:20 -0700 (PDT) From: Ujjwal Kumar Subject: [PATCH RFC 1/2] kconfig: use interpreters to invoke scripts To: Masahiro Yamada , Michal Marek Cc: Ujjwal Kumar , Andrew Morton , Kees Cook , Lukas Bulwahn , Nathan Chancellor , Nick Desaulniers , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-ia64@vger.kernel.org, clang-built-linux@googlegroups.com, linux-kernel-mentees@lists.linuxfoundation.org Message-ID: Date: Sat, 3 Oct 2020 20:50:10 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We cannot rely on execute bits to be set on files in the repository. The build script should use the explicit interpreter when invoking any script from the repository. Link: https://lore.kernel.org/lkml/20200830174409.c24c3f67addcce0cea9a9d4c@linux-foundation.org/ Link: https://lore.kernel.org/lkml/202008271102.FEB906C88@keescook/ Suggested-by: Andrew Morton Suggested-by: Kees Cook Suggested-by: Lukas Bulwahn Signed-off-by: Ujjwal Kumar --- init/Kconfig | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/init/Kconfig b/init/Kconfig index 91456ac0ef20..524f6b555945 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -30,12 +30,12 @@ config CC_IS_GCC config GCC_VERSION int - default $(shell,$(srctree)/scripts/gcc-version.sh $(CC)) if CC_IS_GCC + default $(shell,$(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) if CC_IS_GCC default 0 config LD_VERSION int - default $(shell,$(LD) --version | $(srctree)/scripts/ld-version.sh) + default $(shell,$(LD) --version | $(AWK) -f $(srctree)/scripts/ld-version.sh) config CC_IS_CLANG def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q clang) @@ -45,20 +45,20 @@ config LD_IS_LLD config CLANG_VERSION int - default $(shell,$(srctree)/scripts/clang-version.sh $(CC)) + default $(shell,$(CONFIG_SHELL) $(srctree)/scripts/clang-version.sh $(CC)) config CC_CAN_LINK bool - default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m64-flag)) if 64BIT - default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m32-flag)) + default $(success,$(CONFIG_SHELL) $(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m64-flag)) if 64BIT + default $(success,$(CONFIG_SHELL) $(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m32-flag)) config CC_CAN_LINK_STATIC bool - default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m64-flag) -static) if 64BIT - default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m32-flag) -static) + default $(success,$(CONFIG_SHELL) $(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m64-flag) -static) if 64BIT + default $(success,$(CONFIG_SHELL) $(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(m32-flag) -static) config CC_HAS_ASM_GOTO - def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC)) + def_bool $(success,$(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)) config CC_HAS_ASM_GOTO_OUTPUT depends on CC_HAS_ASM_GOTO -- 2.26.2