Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp233471pxb; Wed, 22 Sep 2021 00:29:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBk/ZipitnpAQr5mDsiN73WfLZgt0DAvrch3vBGpykybWPCIhOoGYSqM4LgiHYc+1NV8Vs X-Received: by 2002:a17:906:341b:: with SMTP id c27mr40859420ejb.61.1632295785889; Wed, 22 Sep 2021 00:29:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632295785; cv=none; d=google.com; s=arc-20160816; b=h/I5pxRQuFr6ja0LLHDv6Lj0x/I3xXXuaveIRJbC3VAOwxzbX+GUXTnD1Dd+myL3Ay OR/l10zNbmXtda3x2u7g0WspNgFOgzIO7FB5mKOC3rLkpjyLMPJ1Rt+bFOgwG2HtQPZN 8PxucN6tSvjv50if5YEuSxKdHEQhuCzwYNquBjEgJUv2zk3iuWObzPaNYYps0nBOEyyt ZYS9geQFQJ21cyiR/Ta5zrHILAYVVHMg3Gyax3jDWhGg3MS5yZYj3RfVYwIUZbgEFJQf N9l7YSGwlgcLayfrkzVb63mtiee7l/wslCU5F/PzI+bW0lM6d8xuo7ZkPySItzTVLXdw tYFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=cM2KpRxjfkq0aUqpTrsv2tc0qIx18JehwkbFSbPGP6M=; b=UEgG4zERygOUreDkUpeS1S8tQtE9uuR2SOexAdvPPJst2eT+d7wAZGta0lkvvV1zEt 250BrAICs1iv41JyJBzo9mr8W1qKNzHkL5jypiwVSS6SczELFZNR2ItJ7V2e84eRzbxZ H5EJwfMqOWz5yWZsyefSQPOpaaMN1rKLgLNhrDU675HuBU3gL+9VxDotGpZRqrR/WKQA NEBkIhVIDWulylhCplI+aP9OWuAkfDjcC3050hMb2s+VOGN6MLcSP4pFYuMjkJwOQwcG xEXpaERTucymh/TrZBoXG3XNJ5HHUOIZGgyXBu6PObGsYl+SRPtlmQuCeucjrqqwynFY wWbw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b88si2471249edf.312.2021.09.22.00.29.22; Wed, 22 Sep 2021 00:29:45 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233166AbhIVH3N convert rfc822-to-8bit (ORCPT + 99 others); Wed, 22 Sep 2021 03:29:13 -0400 Received: from lithops.sigma-star.at ([195.201.40.130]:59864 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229697AbhIVH3M (ORCPT ); Wed, 22 Sep 2021 03:29:12 -0400 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id B913F608F449; Wed, 22 Sep 2021 09:27:41 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id turHSlNKDIff; Wed, 22 Sep 2021 09:27:41 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 3C8E26171B1D; Wed, 22 Sep 2021 09:27:41 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 9YHVx8c-c2qj; Wed, 22 Sep 2021 09:27:41 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id 14585608F449; Wed, 22 Sep 2021 09:27:41 +0200 (CEST) Date: Wed, 22 Sep 2021 09:27:40 +0200 (CEST) From: Richard Weinberger To: Boris Kolpackov Cc: masahiroy@kernel.org, linux-kernel , linux-kbuild@vger.kernel.org Message-ID: <1402570794.96583.1632295660867.JavaMail.zimbra@nod.at> In-Reply-To: References: <20210920213957.1064-1-richard@nod.at> <20210920213957.1064-2-richard@nod.at> Subject: Re: [PATCH 2/2] kconfig: Deny command substitution in string values MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF92 (Linux)/8.8.12_GA_3809) Thread-Topic: kconfig: Deny command substitution in string values Thread-Index: eQeXXGSt2VJG458SXb4zuJcuohhEjw== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Boris, ----- Ursprüngliche Mail ----- > Von: "Boris Kolpackov" > An: "richard" > CC: masahiroy@kernel.org, "linux-kernel" , linux-kbuild@vger.kernel.org > Gesendet: Mittwoch, 22. September 2021 09:17:44 > Betreff: Re: [PATCH 2/2] kconfig: Deny command substitution in string values > Richard Weinberger writes: > >> The post processed .config file will get included in shell >> and makefiles. > > That depends on who you ask: a number of projects other than the > Linux kernel use kconfig for configuration and some of them do > neither of those. I also don't believe the Linux kernel sources > .config in shell (but I may be wrong). See below. > >> So make sure that a string does not contain >> symbols that allow command substitution. >> If such a malformed string is found, return empty string >> and report it. > > So effectively it's now impossible to include ` or $ in kconfig > string values. Seems like a major, backwards-incompatible > restriction. Do you have a working example? Since the config is sourced in the scripts/setlocalversion it will not work correctly anyway. > I think if this is really desired, then it should be re-done with > escaping (similar to ") rather than outright banning inconvenient > characters. Escaping is not so easy since the very same content is included in shell scripts (sertlocalversion), in Makefiles and in C files. At least I didn't find find a good way to escape these characters such that all three programming environments will accept it. Thanks, //richard