linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v10 0/5] Kernel parameter parser cleanup/enhancement
@ 2018-06-05 16:43 Michal Suchanek
  2018-06-05 16:43 ` [PATCH v10 1/5] lib/cmdline.c: Add backslash support to kernel commandline parsing Michal Suchanek
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Michal Suchanek @ 2018-06-05 16:43 UTC (permalink / raw)
  To: Jonathan Corbet, Michal Suchanek, Arnd Bergmann,
	Frederic Weisbecker, Ingo Molnar, Aaron Wu, Tony Luck,
	Andrew Morton, Thomas Gleixner, Steven Rostedt,,
	Laura Abbott, Dominik Brodowski, Alexey Dobriyan, Tom Lendacky,
	Jeffrey Hugo, Baoquan He, Ilya Matveychikov, linux-doc,
	linux-kernel

Hello,

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.

Previous versions (including the fadump part) can be found here:

https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg126148.html
https://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg123639.html

Thanks

Michal

Michal Suchanek (5):
  lib/cmdline.c: Add backslash support to kernel commandline parsing.
  Documentation/admin-guide: backslash support in kernel arguments.
  init/main.c: simplify repair_env_string.
  lib/cmdline.c: Implement single quotes in commandline argument
    parsing.
  Documentation/admin-guide: single quotes in kernel arguments.

 Documentation/admin-guide/kernel-parameters.rst |  5 +-
 init/main.c                                     | 13 ++---
 lib/cmdline.c                                   | 63 +++++++++++++++----------
 3 files changed, 46 insertions(+), 35 deletions(-)

-- 
2.13.6

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-06-20 10:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2018-06-20 10:47   ` Michal Suchánek

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).