lkml.org 
[lkml]   [2021]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] kconfig: Deny command substitution in string values
Boris,

----- Ursprüngliche Mail -----
> Von: "Boris Kolpackov" <boris@codesynthesis.com>
> An: "richard" <richard@nod.at>
> CC: masahiroy@kernel.org, "linux-kernel" <linux-kernel@vger.kernel.org>, 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 <richard@nod.at> 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

\
 
 \ /
  Last update: 2021-09-22 09:28    [W:0.094 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site