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  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:	Sat, 28 Dec 2013 19:57:50 +0100
From:	Geert Uytterhoeven <>
To:	Tetsuo Handa <>
Cc:	Andrew Morton <>,
	Jiri Kosina <>, Joe Perches <>,
	Al Viro <>,
	"David S. Miller" <>,
	"" <>
Subject: Re: [PATCH] lib/vsprintf: add %pT[C012] format specifier

On Sat, Dec 28, 2013 at 4:43 AM, Tetsuo Handa
<> wrote:
> Andrew Morton wrote:
>> which is painful, so we also provide the new vsprintf token as a
>> convenience:
>>       pr_warn("%|: hair on fire\n");
>> but I don't know what we can use in place of %|.
> We are using %pEXTENSION where EXTENSION is [A-Za-z0-9]* because compiler does
> not need to understand what EXTENSION does; compiler needs to care about what
> character follows the % character and check type of corresponding argument if
> __printf() attribute is given.


> If we introduce a character which compiler does not know that follows the %
> character, compiler would be confused when checking type of corresponding
> argument.
>> I wonder if there's some way in which we can invent a vsprintf token
>> which means "insert corrent->comm here" and which doesn't require that
>> the caller pass in the additional argument?
> Therefore, if we want to omit passing corresponding argument, we should not
> introduce new character which compiler does not know that follows the %
> character.
> Also, % is the only character which everybody knows that it is reserved for the
> beginning of format specifier and %% is the only characters which everybody
> knows that it is reserved for literal % character.
> Therefore, what we could do for printing current thread's attributes would be
> either reserve a new character and add EXTENSION like
>   pr_warn("$comm$: hair on fire\n");
>   pr_warn("Process $pid$: hair on fire\n");
> or add EXTENSION after the %% characters like
>   pr_warn("%%comm%%: hair on fire\n");
>   pr_warn("Process %%pid%%: hair on fire\n");

ESC sequences? So far printk() doesn't parse them (a bit unfortunate, as I
always liked the idea of printing error messages in red, warnings in yellow,

Is any of the "\x" (backslash + character) unused and thus available?



Geert Uytterhoeven -- There's lots of Linux beyond ia32 --

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
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists