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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 6A385C433FE for ; Wed, 22 Sep 2021 07:27:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 564FD610A0 for ; Wed, 22 Sep 2021 07:27:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233202AbhIVH3N convert rfc822-to-8bit (ORCPT ); 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