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]
Message-ID: <CAEMqcmqzkybD1yYhZWYY=hSDePXbhgV0_w_MMtmUBmD+2EDvwg@mail.gmail.com>
Date:	Fri, 3 Jul 2015 12:16:23 +0200
From:	Ulf Magnusson <ulfalizer.lkml@...il.com>
To:	Valentin Rothberg <valentinrothberg@...il.com>
Cc:	rafael.j.wysocki@...el.com, Paul Bolle <pebolle@...cali.nl>,
	yann.morin.1998@...e.fr, linux-kbuild@...r.kernel.org,
	Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andreas Ruprecht <andreas.ruprecht@....de>,
	hengelein Stefan <stefan.hengelein@....de>,
	linux@...inikbrodowski.net
Subject: Re: Kconfig: '+config' valid syntax?

On Thu, Jul 2, 2015 at 10:08 AM, Valentin Rothberg
<valentinrothberg@...il.com> wrote:
> Hi,
>
> commit ed013214afa7 ("ACPI / init: Make it possible to override _REV")
> is in today's linux-next tree (i.e., next-20150702) adding the
> following hunk to drivers/acpi/Kconfig:
>
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -428,6 +428,26 @@ config XPOWER_PMIC_OPREGION
>         help
>           This config adds ACPI operation region support for XPower AXP288 PMIC.
>
> ++config ACPI_REV_OVERRIDE_POSSIBLE
> +       bool "Allow supported ACPI revision to be overriden"
> +       depends on X86
> +       default y
> [...]
>
> By having a close look at the first added line, we can see that
> '+config ACPI_...' is added.  To my great surprise, it's valid Kconfig
> syntax.  How is that possible?  IMHO it's an invalid token, such that
> Kconfig should complain about it.  Or do I miss something?
>
> Kind regards,
>  Valentin

For another take on this, you could look at the Config._tokenize() function
in Kconfiglib (https://github.com/ulfalizer/Kconfiglib/blob/master/kconfiglib.py).
Here's a relevant comment from that function:

# The initial word on a line is parsed specially. Let
# command_chars = [A-Za-z0-9_]. Then
#  - leading non-command_chars characters are ignored, and
#  - the first token consists the following one or more
#    command_chars characters.
# This is why things like "----help--" are accepted.

The root cause is sloppy lexing in zconf.l, IIRC. I didn't check
whether it's been
improved, but Kconfiglib needs to be backwards compatible either way.

/Ulf
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ