From: Andrew Morton <akpm@linux-foundation.org>
To: Michal Suchanek <msuchanek@suse.de>
Cc: Jonathan Corbet <corbet@lwn.net>, Arnd Bergmann <arnd@arndb.de>,
Frederic Weisbecker <frederic@kernel.org>,
Ingo Molnar <mingo@kernel.org>, Aaron Wu <Aaron.Wu@analog.com>,
Tony Luck <tony.luck@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
"Steven Rostedt," <rostedt@goodmis.org>,
Laura Abbott <lauraa@codeaurora.org>,
Dominik Brodowski <linux@dominikbrodowski.net>,
Alexey Dobriyan <adobriyan@gmail.com>,
Tom Lendacky <thomas.lendacky@amd.com>,
Jeffrey Hugo <jhugo@codeaurora.org>, Baoquan He <bhe@redhat.com>,
Ilya Matveychikov <matvejchikov@gmail.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v10 0/5] Kernel parameter parser cleanup/enhancement
Date: Tue, 19 Jun 2018 16:36:47 -0700 [thread overview]
Message-ID: <20180619163647.23c8a5d7370258c9e43141c3@linux-foundation.org> (raw)
In-Reply-To: <cover.1528215659.git.msuchanek@suse.de>
On Tue, 5 Jun 2018 18:43:07 +0200 Michal Suchanek <msuchanek@suse.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 :(
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2018-06-19 23:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-05 16:43 [PATCH v10 0/5] Kernel parameter parser cleanup/enhancement Michal Suchanek
2018-06-05 16:43 ` [PATCH v10 1/5] lib/cmdline.c: Add backslash support to kernel commandline parsing Michal Suchanek
2018-06-05 16:43 ` [PATCH v10 2/5] Documentation/admin-guide: backslash support in kernel arguments Michal Suchanek
2018-06-05 16:43 ` [PATCH v10 3/5] init/main.c: simplify repair_env_string Michal Suchanek
2018-06-05 16:43 ` [PATCH v10 4/5] lib/cmdline.c: Implement single quotes in commandline argument parsing Michal Suchanek
2018-06-05 16:43 ` [PATCH v10 5/5] Documentation/admin-guide: single quotes in kernel arguments Michal Suchanek
2018-06-05 17:05 ` [PATCH v10 0/5] Kernel parameter parser cleanup/enhancement Andy Shevchenko
2018-06-05 17:25 ` Michal Suchánek
2018-06-19 23:36 ` Andrew Morton [this message]
2018-06-20 10:47 ` Michal Suchánek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180619163647.23c8a5d7370258c9e43141c3@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=Aaron.Wu@analog.com \
--cc=adobriyan@gmail.com \
--cc=arnd@arndb.de \
--cc=bhe@redhat.com \
--cc=corbet@lwn.net \
--cc=frederic@kernel.org \
--cc=jhugo@codeaurora.org \
--cc=lauraa@codeaurora.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=matvejchikov@gmail.com \
--cc=mingo@kernel.org \
--cc=msuchanek@suse.de \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).