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:	Tue, 5 Jul 2011 10:12:16 -0600
From:	Jim Cromie <jim.cromie@...il.com>
To:	Bart Van Assche <bvanassche@....org>
Cc:	linux-kernel@...r.kernel.org, gnb@...h.org, jbaron@...hat.com,
	gregkh@...e.de
Subject: Re: [PATCH 03/11] dynamic_debug: process multiple commands on a line

On Wed, Jun 29, 2011 at 4:50 AM, Bart Van Assche <bvanassche@....org> wrote:
> On Tue, Jun 28, 2011 at 9:09 AM, Jim Cromie <jim.cromie@...il.com> wrote:
>> Process multiple commands per line, separated by ';'.  All commands are
>> processed, independent of errors, allowing individual commands to fail,
>> for example when a module is not installed.  Last error code is returned.
>> With this, extensive command sets can be given on the boot-line.
>> +/* handle multiple queries, continue on error, return last error */
>> +static int ddebug_exec_queries(char *query)
>> +{
>> +       char *split = query;
>> +       int i, errs = 0, exitcode = 0, rc;
>> +
>> +       if (verbose)
>> +               /* clean up for logging */
>> +               for (; (split = strpbrk(split, "\t\n")); split++)
>> +                       *split = ' ';
>
> The above will join multiple lines into a single line and hence will
> cause a shell statement like the one below to be interpret as a single
> query:
>

oof.
I got impression from Documentation/dynamic-debug-howto.txt
that multiple commands were not supported.  Hence this change
in patch 3:

-Commands are bounded by a write() system call.  If you want to do
-multiple commands you need to do a separate "echo" for each, like:
+Commands are bounded by a write() system call.  Subject to this limit
+(or 1024 for boot-line parameter) you can send multiple commands,
+separated by ';'

Clearly by your example it is possible.
I'll remove those lines, they were for pretty debug messages anyway.

FWIW, using \n to separate multiple commands doesnt work
on kernel bootline (in mainline); the following kills the ddebug facility
(see 0007-dynamic_debug-dont-kill-entire-facility-on-error-par.patch)

root@...age:~# more /proc/cmdline
root=LABEL=ROOT_FS console=ttyS0,115200n8 all_generic_ide \
ide_core.nodma=0.0 \
ddebug_query="module init_32 +p\n module suspend +p\n module freezer +p"

>
>> +       for (i = 0; query; query = split, i++) {
>> +
>
> No blank line past "for" please.

ack. will fix.
--
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