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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 14 Sep 2014 11:13:12 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Markus Trippelsdorf <markus@...ppelsdorf.de>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Jan Kara <jack@...e.cz>, Steven Rostedt <rostedt@...dmis.org>
Subject: Re: Weird character in kernel message

On Sun, Sep 14, 2014 at 7:54 AM, Markus Trippelsdorf
<markus@...ppelsdorf.de> wrote:
> On 2014.09.14 at 07:09 +0200, Markus Trippelsdorf wrote:
>> Just noticed this today:
>>
>> Sep 14 06:51:57 x4 kernel: [sched_delayed] ^a4CE: hpet increased min_delta_ns to 20115 nsec
>>
>> in hex:
>> 20 01 34 43 45 3A 20
>>
>> Must be a recent regression.
>
> It looks like a combination of commit 504d58745c9ca and commit
> 458df9fd4815b causes the issue.
> 458df9fd4815b changed the loglevel of printk_deferred to a hardcoded
> KERN_WARNING. And 504d58745c9ca changed the printk in
> kernel/time/clockevents.c to printk_deferred.
> But now the KERN_WARNING loglevel of printk_deferred in
> kernel/time/clockevents.c is redundant and responsible for the weird
> 01 34 character combination (KERN_SOH "4").

vprintk_emit() has:

        if (in_sched)
                text_len = scnprintf(text, sizeof(textbuf),
                                     KERN_WARNING "[sched_delayed] ");

        text_len += vscnprintf(text + text_len,
                               sizeof(textbuf) - text_len, fmt, args);

Hence if in_sched, "[sched_delayed] " is inserted before the printed
message. As most printed messages have a KERN_* prefix, this
prefix now ends up in the middle of the message, causing the issue.

A simple solution is to print a newline after the "[sched_delayed]", but
this will break the line.

Better, but more complicated, would be to remove the KERN_* prefix
(if it exists) from the next message if in_sched is set.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
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