[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180619163647.23c8a5d7370258c9e43141c3@linux-foundation.org>
Date: Tue, 19 Jun 2018 16:36:47 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Michal Suchanek <msuchanek@...e.de>
Cc: Jonathan Corbet <corbet@....net>, Arnd Bergmann <arnd@...db.de>,
Frederic Weisbecker <frederic@...nel.org>,
Ingo Molnar <mingo@...nel.org>, Aaron Wu <Aaron.Wu@...log.com>,
Tony Luck <tony.luck@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
"Steven Rostedt," <rostedt@...dmis.org>,
Laura Abbott <lauraa@...eaurora.org>,
Dominik Brodowski <linux@...inikbrodowski.net>,
Alexey Dobriyan <adobriyan@...il.com>,
Tom Lendacky <thomas.lendacky@....com>,
Jeffrey Hugo <jhugo@...eaurora.org>,
Baoquan He <bhe@...hat.com>,
Ilya Matveychikov <matvejchikov@...il.com>,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v10 0/5] Kernel parameter parser cleanup/enhancement
On Tue, 5 Jun 2018 18:43:07 +0200 Michal Suchanek <msuchanek@...e.de> wrote:
> due to work on the fadump_extra_args I looked at the kernel parameter parser
> and found its grammar rather curious.
>
> It supports double quotes but not any other quoting characters so double quotes
> cannot be quoted. What's more, the quotes can be anywhere in the parameter
> name or value and are interpteted but are removed only from start and end of
> the parameter value.
>
> These are the patches not specific to fadump which somewhat straighten the
> qouting grammar to make it on par with common shell interpreters.
>
> Specifically double and single quotes can be used for quoting as well as
> backslashes with the usual shell semantic. All quoting characters are removed
> while the parameters are parsed.
Well. It's nice. I guess. Is there any demand for these
capabilities? I don't recall ever having seen a complaint - kernel
parameters tend to be pretty simple things.
Also, the break_arg_end() and squash_char() macros make me want to cry.
A macro which changes control flow hidden inside another macro! Are
they reeeealy necessary? Can't be done with some C helpers? Maybe put
inquote, backslash, args, i into a new struct parser_state and pass a
pointer to that around the place? At the very least, those macros
should be apologetically documented :(
Powered by blists - more mailing lists