Re: [GIT pull] printk updates for 4.15

From: Linus Torvalds
Date: Tue Nov 14 2017 - 16:30:06 EST


On Tue, Nov 14, 2017 at 1:16 PM, Mark Salyzyn <salyzyn@xxxxxxxxxxx> wrote:
>
> User is _root_ (assuming default perms for nodes), not some random user.

Totally irrelevant.

It was clear from this discussion that the developers involved in the
discussion APPARENTLY DID NOT EVEN UNDERSTAND the linkage to systemd,
for example.

Just look at this part of the patch:

+config PRINTK_TIME_TYPE
+ int
+ depends on PRINTK

which already shows that trhe developers _thought_ that this is purely
about CONFIG_PRINTK_TIME.

But that is the "print_time()" prefix that is printed as part of the
buffer itself as [%5lu.%06lu]. That's the "freeform" string part of
dmesg.

People clearly never actually connected the dots, and noticed that
msg_print_ext_header() thing, which is part of the logging format, and
which has a different format and that is actually parsed by tools.

So you guys screwed that up.

Now, if the developers don't know or understand that, how do you
expect some poor random MIS person who builds the kernel or sets
things up to know?

Basically, the whole choice is something that shouldn't exist.

If Andoid wants real-time oin the system logs as part of
"print_time()", then that is one thing. But doing it this way is
BROKEN.

Seriously.

If you want wall-clock time in the print_time() header, do *THAT*.
Don't screw up ts_nsec without understanding how it is used.

Really. Do you really want to argue about this, when the patch
clearly shows that the developers didn't understand the code?

Comprende?

So just admit that the patch series was done entirely the wrong way
around, instead of making excuses for broken crap.

And then maybe you can send a single patch that changes *ONLY*
print_time(), with an explanation of how Android uses
CONFIG_PRINTK_TIME and would like that to be realtime instead of the
monotonic clock that we traditionally use.

See? Fix the part you actually want to fix, instead of breaking the
parts THAT YOU DIDN'T EVEN UNDERSTAND OR KNOW OF!

Linus