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 X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DBFCC433DF for ; Mon, 12 Oct 2020 16:37:48 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C4D502080A for ; Mon, 12 Oct 2020 16:37:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="muv5XHXQ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="k7q3poQl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C4D502080A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=BtgaLDUDS+5D5ak/0pDT5omGuYdQmHqdPUVnsLWFdbo=; b=muv5XHXQRmuVhgihHQYnZmxj2 GQP2z7TtypbrMF2eWX79dD4ONvbg7dgib/OVuCxQc/P0XYGhgHgw41JvCQzEsKRRyESUIX85pwxfM 66rhaPuOJfx7eYa6grKS31tp39Fp4kOg+rGn75zdk9FKSzAQNwCKrtaO4BFlgZz0Bt2ibVchH/Ej9 noYTFsNRYwyE83WVam9uew3RkqFRhTolk/suCIDPKJda3dWgM3g5KQuyQGrST44BaPqLALVcRwnb+ zmzRl/UO4sTfOrI6wJtaR1ALtQSKqYWqNsr9TG2USAd2OeEpCOwp8SbsddgraXuSVf11WndBbZ2BV bt4A2/0JA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kS0oG-0004bM-A7; Mon, 12 Oct 2020 16:36:28 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kS0o9-0004YJ-Ra for linux-arm-kernel@lists.infradead.org; Mon, 12 Oct 2020 16:36:23 +0000 Received: by mail-pl1-x644.google.com with SMTP id w21so6119491plq.3 for ; Mon, 12 Oct 2020 09:36:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Gd86cnVMEv6nUkqocEH/guphnmHfom7rwvxSoLZ1nQI=; b=k7q3poQliNKrMvFe1BHWGlTNslk5tloXi5A3aKJecrv11W7LeZbZ8+46JBcbyW4WFj oG0T+Oq8U5Uh9y4fT7Ye1kBl7fJJSMZeFPBOuUI8pWi5nRyBgk02EQIDi1FmhO4ZgiZy nszISfAfxb3Q3AEySwTSq5nv2RLPMK78fsKIFeF5fmbx1AdnkWbphY8cD5aGxRNPBEDx pcki268j1GbJ9vNuYYoiqJTqDamy6sU9s1yXq0Se2YsOjgBJ67Srp2H2Br4P5LUv1V6m HmQwSqdAasoEgG9uJfOjBi1b55fLxuzOpaWpk6I4L8vmap+gy6lk4PNLLeupWaXE2dgz FWHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=Gd86cnVMEv6nUkqocEH/guphnmHfom7rwvxSoLZ1nQI=; b=rt8UyqEYWR86oo7ZbNVyw4zMJ8Xy42RJG2zykX2/dRqhrJkjWfkHzjhINMGbkMU9u8 KF7ScSlbCHA3lo/9jVHtN2YkAUSoahAf6uqMaPkgwPwvCDT4RTM0GCzn1/+ELpWLt7/j ciZFT5RzeqXwqxfNKE4ZRTtYD3rV6mblI+Owrxq0t7zU/21p6HvHdwUkuk4eJbT8S1vg XbsfuaC6fwKcNyeBWBxc7h/StU2PHMEFw+wTxhRzh/uGUFtMgNdoGB4Prmlu1hl5quyU 6aROlXusPqbzYT9szrhSmgOOmoLywVDd2fpaCJlcpP5lCFRalnND3HAQLHp63lc25NqU yrOg== X-Gm-Message-State: AOAM531FaFDHptPv+1rQRbMdwC5cFyaN4HyYxl/tYY+t776dRJrAMY9f XClVNDSMiUM3U5oJIZeDC7k= X-Google-Smtp-Source: ABdhPJz8AZdqfnri4o1DwdFFnh8hMt0zGwqgg9ejf3blzSfx/a97v/U3yLzd4m7LH8J9Ei3f+RmI2A== X-Received: by 2002:a17:902:a715:b029:d3:c2b4:bcee with SMTP id w21-20020a170902a715b02900d3c2b4bceemr25272756plq.22.1602520577791; Mon, 12 Oct 2020 09:36:17 -0700 (PDT) Received: from localhost.localdomain ([2405:201:a404:280a:90bd:7a49:dcda:1fb1]) by smtp.gmail.com with ESMTPSA id q24sm23427124pfn.72.2020.10.12.09.36.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Oct 2020 09:36:16 -0700 (PDT) Subject: Re: [PATCH RFC 0/2] use interpreters to invoke scripts To: Masahiro Yamada References: <2b00e566-112c-5657-c10f-7f210d3eae93@gmail.com> From: Ujjwal Kumar Message-ID: <0dfaf697-1f69-74c4-ffc1-30b77026db68@gmail.com> Date: Mon, 12 Oct 2020 22:06:09 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201012_123621_930900_D0C9B025 X-CRM114-Status: GOOD ( 33.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Marek , linux-ia64@vger.kernel.org, Kees Cook , Linux Kbuild mailing list , Nick Desaulniers , Linux Kernel Mailing List , clang-built-linux , Lukas Bulwahn , Nathan Chancellor , linux-kernel-mentees@lists.linuxfoundation.org, Andrew Morton , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 12/10/20 9:48 pm, Masahiro Yamada wrote: > On Sun, Oct 4, 2020 at 12:19 AM Ujjwal Kumar wrote: >> >> This patch series aims at removing the dependency on execute >> bit of the scripts in the kbuild system. >> >> If not working with fresh clone of linux-next, clean the srctree: >> make distclean >> make tools/clean >> >> To test the dependency on execute bits, I tried building the >> kernel after removing x-bits for all files in the repository. >> Removing execute bits: >> for i in $(find -executable -type f); do chmod -x $i; done >> >> Any attempts to configure (or build) the kernel fail because of >> 'Permission denied' on scripts with the following error: >> $ make allmodconfig >> sh: ./scripts/gcc-version.sh: Permission denied >> init/Kconfig:34: syntax error >> init/Kconfig:33: invalid statement >> init/Kconfig:34: invalid statement >> sh: ./scripts/ld-version.sh: Permission denied >> init/Kconfig:39: syntax error >> init/Kconfig:38: invalid statement >> sh: ./scripts/clang-version.sh: Permission denied >> init/Kconfig:49: syntax error >> init/Kconfig:48: invalid statement >> make[1]: *** [scripts/kconfig/Makefile:71: allmodconfig] Error 1 >> make: *** [Makefile:606: allmodconfig] Error 2 >> >> Changes: >> 1. Adds specific interpreters (in Kconfig) to invoke >> scripts. >> >> After this patch I could successfully do a kernel build >> without any errors. >> >> 2. Again, adds specific interpreters to other parts of >> kbuild system. >> >> I could successfully perform the following make targets after >> applying the PATCH 2/2: >> make headerdep >> make kselftest-merge >> make rpm-pkg >> make perf-tar-src-pkg >> make ARCH=ia64 defconfig >> ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make prepare >> >> Following changes in PATCH 2/2 are not yet tested: >> arch/arm64/kernel/vdso32/Makefile >> arch/nds32/kernel/vdso/Makefile >> scripts/Makefile.build >> >> Ujjwal Kumar (2): >> kconfig: use interpreters to invoke scripts >> kbuild: use interpreters to invoke scripts >> >> Makefile | 4 ++-- >> arch/arm64/kernel/vdso/Makefile | 2 +- >> arch/arm64/kernel/vdso32/Makefile | 2 +- >> arch/ia64/Makefile | 4 ++-- >> arch/nds32/kernel/vdso/Makefile | 2 +- >> init/Kconfig | 16 ++++++++-------- >> scripts/Makefile.build | 2 +- >> scripts/Makefile.package | 4 ++-- >> 8 files changed, 18 insertions(+), 18 deletions(-) >> >> -- >> 2.26.2 >> > > > Andrew Morton suggested and applied the doc patch > (commit e9aae7af4601688386 in linux-next), > but did not pick up this series. > > It is difficult to predict which patch he would > pick up, and which he would not. > > > I can apply this series > together with Lukas' base patch. > > > I pointed out possible mistakes in 2/2. > I can locally fix them up if you agree. I agree with the changes you pointed out. I was in the process of sending a V2 patch series (almost done). But if you prefer on locally fixing them, that is completely fine. > > > BTW, Kees Cook suggested dropping the x bit > from all scripts, but I did not agree with that part. IIRC, in the discussion Kees Cook suggestion was not to drop x bit but rather he meant to use that as a trick to catch any existing dependency on x bit. > > > In the doc change, Lukas mentioned > "further clean-up patches", but I hope > it does not mean dropping the x bits. IMO, he did not mean to drop the x bits. But rather I have many more small changes similar to these. He must be referring to these two patches and any future patches around this issue. > > > -- > Best Regards > > Masahiro Yamada > Thanks Ujjwal Kumar _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel