[Crash-utility] [PATCH v2] log: output logs of printk safe buffers

HAGIO KAZUHITO(萩尾 一仁) k-hagio-ab at nec.com
Tue Jan 11 07:43:58 UTC 2022


-----Original Message-----
> On the other hand, I would like to make sure that
> users who don't know about "log -s" don't overlook
> the logs of safe buffers as possible.
> 
> Is it acceptable to make "log" output look like the following, in addition to
> implementing "log -s"?
> 
> ---
> [    6.261629] Key type id_resolver registered
> [    6.261924] Key type id_legacy registered
> [1717970.628952] safebuffer: loading out-of-tree module taints kernel.
> [1717970.629299] safebuffer: module verification failed: signature and/or required key missing - tainting
> kernel
> [nmi_print_seq] message2 message2 message2 message2
> [nmi_print_seq] Uhhuh. NMI received for unknown reason 20 on CPU 0.
> [nmi_print_seq] Do you have a strange power saving mode enabled?
> [nmi_print_seq] Dazed and confused, but trying to continue
> ---

OK, makes sense.  This looks better to me than the next one.
Please add help description about this, too.

> 
> or
> 
> ---
> [    6.261629] Key type id_resolver registered
> [    6.261924] Key type id_legacy registered
> [1717970.628952] safebuffer: loading out-of-tree module taints kernel.
> [1717970.629299] safebuffer: module verification failed: signature and/or required key missing - tainting
> kernel
> message2 message2 message2 message2
> Uhhuh. NMI received for unknown reason 20 on CPU 0.
> Do you have a strange power saving mode enabled?
> Dazed and confused, but trying to continue
> ---

> >
> > > +
> > > +			n = (len <= buffer_size) ? len : buffer_size;
> > > +			for (i = 0, p = buffer; i < n; i++, p++) {
> > > +				if (*p == 0x1) { //SOH
> > > +					i++; p++;
> > > +					continue;
> >
> > According to include/linux/kern_levels.h, the byte right after the SOH
> > can be printed as log level?
> 
> Ok, I'll add log level to the output when -m is specified to log command.

Thanks.

Kazu






More information about the Crash-utility mailing list