lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 21 Feb 2020 20:20:57 -0800
From:   Randy Dunlap <rdunlap@...radead.org>
To:     Masami Hiramatsu <mhiramat@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>
Cc:     Geert Uytterhoeven <geert@...ux-m68k.org>,
        Borislav Petkov <bp@...en8.de>,
        LKML <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH v3 1/2] bootconfig: Prohibit re-defining value on same key

On 2/21/20 12:13 AM, Masami Hiramatsu wrote:
> Currently, bootconfig adds new value on the existing key
> to the tail of an array. But this looks a bit confusing
> because admin can rewrite original value in same config
> file easily.
> 
> This rejects following value re-definition.
> 
>   key = value1
>   ...
>   key = value2
> 
> You should rewrite value1 to value2 in this case.
> 
> Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>

Hi,
One correction below and then question.

> ---
>  Documentation/admin-guide/bootconfig.rst   |   11 ++++++++++-
>  lib/bootconfig.c                           |   13 ++++++++-----
>  tools/bootconfig/samples/bad-samekey.bconf |    6 ++++++
>  3 files changed, 24 insertions(+), 6 deletions(-)
>  create mode 100644 tools/bootconfig/samples/bad-samekey.bconf
> 
> diff --git a/Documentation/admin-guide/bootconfig.rst b/Documentation/admin-guide/bootconfig.rst
> index dfeffa73dca3..9ee7650b7817 100644
> --- a/Documentation/admin-guide/bootconfig.rst
> +++ b/Documentation/admin-guide/bootconfig.rst
> @@ -62,7 +62,16 @@ Or more shorter, written as following::
>  In both styles, same key words are automatically merged when parsing it
>  at boot time. So you can append similar trees or key-values.
>  
> -Note that a sub-key and a value can not co-exist under a parent key.
> +Same-key Values
> +---------------
> +
> +It is prohibited that two or more values or arraies share a same-key.

I think (?):                                   arrays

> +For example,::
> +
> + foo = bar, baz
> + foo = qux  # !ERROR! we can not re-define same key
> +
> +Also, a sub-key and a value can not co-exist under a parent key.
>  For example, following config is NOT allowed.::
>  
>   foo = value1


I'm pretty sure that the kernel command line allows someone to use
  key=value1 ... key=value2
and the first setting is just overwritten with value2 (for most "key"s).

Am I wrong?  and is this patch saying that bootconfig won't operate like that?

thanks.
-- 
~Randy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ