summaryrefslogtreecommitdiffstats
path: root/kernel/kmod.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2015-06-25 15:01:30 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-25 17:00:38 -0700
commit6fe29354befe4c46eb308b662155d4d8017358e1 (patch)
tree8bdee457952ed38e3a3495721e7c1cf37b8b7f65 /kernel/kmod.c
parent0a295e67ec19d59bdb146e0b60ac9659104f2215 (diff)
downloadop-kernel-dev-6fe29354befe4c46eb308b662155d4d8017358e1.zip
op-kernel-dev-6fe29354befe4c46eb308b662155d4d8017358e1.tar.gz
printk: implement support for extended console drivers
printk log_buf keeps various metadata for each message including its sequence number and timestamp. The metadata is currently available only through /dev/kmsg and stripped out before passed onto console drivers. We want this metadata to be available to console drivers too so that console consumers can get full information including the metadata and dictionary, which among other things can be used to detect whether messages got lost in transit. This patch implements support for extended console drivers. Consoles can indicate that they want extended messages by setting the new CON_EXTENDED flag and they'll be fed messages formatted the same way as /dev/kmsg. "<level>,<sequnum>,<timestamp>,<contflag>;<message text>\n" If extended consoles exist, in-kernel fragment assembly is disabled. This ensures that all messages emitted to consoles have full metadata including sequence number. The contflag carries enough information to reassemble the fragments from the reader side trivially. Note that this only affects /dev/kmsg. Regular console and /proc/kmsg outputs are not affected by this change. * Extended message formatting for console drivers is enabled iff there are registered extended consoles. * Comment describing /dev/kmsg message format updated to add missing contflag field and help distinguishing variable from verbatim terms. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: David Miller <davem@davemloft.net> Cc: Kay Sievers <kay@vrfy.org> Reviewed-by: Petr Mladek <pmladek@suse.cz> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kmod.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud