* Re: makedumpfile --dump-dmesg option broken on 3.5 kernels and later
[not found] <mailman.13964.1359561994.1038.kexec@lists.infradead.org>
@ 2013-01-30 17:11 ` Dave Anderson
0 siblings, 0 replies; 5+ messages in thread
From: Dave Anderson @ 2013-01-30 17:11 UTC (permalink / raw)
To: kexec
----- Original Message -----
> Bouchard Louis <louis.bouchard@canonical.com> wrote:
>
> I now have what looks like a working patch for this issue. Thank to Dave
> Anderson (crash) and Eric Biederman (vmcore-dmesg) for having chewed
> most of the work for me.
>
> My only remaining problem is to be able to print the syslog level as is
> provided in the previous version. Currently, the kernel doesn't export
> the 'level:3' offset of the log structure in the vmcoreinfo information
> provided in the vmcore.
>
> Vivek who authored the original kernel/printk.c patch might be able to
> suggest a better way to expose log.level:3 (I did try to patch the
> kernel but got thrown away because of the nature of .level:3 that didn't
> fit the VMCOREINFO_OFFSET macro)
>
> In the meantime, I only found this kinda ugly hack to work around the
> absence of the structure element :
>
> > /*
> > * Ugly hack around absence of log.level:3
> > * Hard code log.level offset = log.dict_len + 3
> > */
> > level = (UCHAR(logptr + OFFSET(log.dict_len)+3)&level_mask);
> >
> > sprintf(buf,"<%d>[%5lld.%06ld] ",level,nanos,rem/1000);
>
> Aside from that, I get an identical dmesg output on kernel 3.5 and after.
>
> I would appreciate comments on the following before I send the patch to
> the list.
IMHO, just drop it.
As I mentioned on the crash-utility list, it's a PITA keeping up with
the log structure changes, especially when it involves bit-fields.
The vmcore-dmesg facility just ignores displaying the message evel.
And for the next crash release, I'm putting the finishing touches on
a new "crash --log vmcore" option (i.e., without requiring the vmlinux
file), and I'm also going to ignore the log-level.
I understand that "makedumpfile --dump-dmesg" and vmcore-dmesg show
the log level for the legacy log buffer dumps, but that's because
they're embedded in the messages themselves.
Dave
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 5+ messages in thread
* makedumpfile --dump-dmesg option broken on 3.5 kernels and later
@ 2013-01-22 13:52 Bouchard Louis
2013-01-23 1:19 ` Atsushi Kumagai
0 siblings, 1 reply; 5+ messages in thread
From: Bouchard Louis @ 2013-01-22 13:52 UTC (permalink / raw)
To: Atsushi Kumagai, kexec@lists.infradead.org
Hello Kumagai-san,
Following a suggestion from Dave Anderson, I have tested the
makedumpfile --dump-dmesg option. After some research, I realized that
the option was no longer working on 3.5 kernel and later. Here is an
example of the result (on Ubuntu Quantal) :
# makedumpfile --dump-dmesg /proc/vmcore /tmp/dmesg
dump_dmesg: Can't find some symbols for log_buf.
makedumpfile Failed.
On 3.5 kernel and later, the log_end symbol no longer exists.
This is caused by the change from byte-buffer structure to
variable-length record buffer of the kernel log buffer introduced by
this commit :
http://goo.gl/NCgLI
I am curious to know if you were aware of this change and if you had
done some work on modifying dump_dmesg() accordingly ? Just so I don't
go off and try to work on something that you have already solved.
Kind regards,
...Louis
--
Louis Bouchard
Backline Support Analyst
Canonical Ltd
Ubuntu support: http://landscape.canonical.com
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: makedumpfile --dump-dmesg option broken on 3.5 kernels and later
2013-01-22 13:52 Bouchard Louis
@ 2013-01-23 1:19 ` Atsushi Kumagai
2013-01-23 8:49 ` Bouchard Louis
2013-01-30 13:45 ` Bouchard Louis
0 siblings, 2 replies; 5+ messages in thread
From: Atsushi Kumagai @ 2013-01-23 1:19 UTC (permalink / raw)
To: louis.bouchard; +Cc: kexec
Hello Louis,
On Tue, 22 Jan 2013 14:52:09 +0100
Bouchard Louis <louis.bouchard@canonical.com> wrote:
> Hello Kumagai-san,
>
> Following a suggestion from Dave Anderson, I have tested the
> makedumpfile --dump-dmesg option. After some research, I realized that
> the option was no longer working on 3.5 kernel and later. Here is an
> example of the result (on Ubuntu Quantal) :
>
> # makedumpfile --dump-dmesg /proc/vmcore /tmp/dmesg
> dump_dmesg: Can't find some symbols for log_buf.
>
> makedumpfile Failed.
>
> On 3.5 kernel and later, the log_end symbol no longer exists.
>
> This is caused by the change from byte-buffer structure to
> variable-length record buffer of the kernel log buffer introduced by
> this commit :
> http://goo.gl/NCgLI
>
> I am curious to know if you were aware of this change and if you had
> done some work on modifying dump_dmesg() accordingly ? Just so I don't
> go off and try to work on something that you have already solved.
Thanks for your report.
I haven't been aware of this, so could I ask you to help me ?
Thanks
Atsushi Kumagai
> Kind regards,
>
> ...Louis
> --
> Louis Bouchard
> Backline Support Analyst
> Canonical Ltd
> Ubuntu support: http://landscape.canonical.com
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: makedumpfile --dump-dmesg option broken on 3.5 kernels and later
2013-01-23 1:19 ` Atsushi Kumagai
@ 2013-01-23 8:49 ` Bouchard Louis
2013-01-30 13:45 ` Bouchard Louis
1 sibling, 0 replies; 5+ messages in thread
From: Bouchard Louis @ 2013-01-23 8:49 UTC (permalink / raw)
To: Atsushi Kumagai; +Cc: kexec
Hi Kumagai-san,
Le 23/01/2013 02:19, Atsushi Kumagai a écrit :
> Hello Louis,
>
> On Tue, 22 Jan 2013 14:52:09 +0100
> Bouchard Louis <louis.bouchard@canonical.com> wrote:
>
>> Hello Kumagai-san,
>>
>> Following a suggestion from Dave Anderson, I have tested the
>> makedumpfile --dump-dmesg option. After some research, I realized that
>> the option was no longer working on 3.5 kernel and later. Here is an
>> example of the result (on Ubuntu Quantal) :
>>
>> # makedumpfile --dump-dmesg /proc/vmcore /tmp/dmesg
>> dump_dmesg: Can't find some symbols for log_buf.
>>
>> makedumpfile Failed.
>>
>> On 3.5 kernel and later, the log_end symbol no longer exists.
>>
>> This is caused by the change from byte-buffer structure to
>> variable-length record buffer of the kernel log buffer introduced by
>> this commit :
>> http://goo.gl/NCgLI
>>
>> I am curious to know if you were aware of this change and if you had
>> done some work on modifying dump_dmesg() accordingly ? Just so I don't
>> go off and try to work on something that you have already solved.
>
> Thanks for your report.
> I haven't been aware of this, so could I ask you to help me ?
>
I will be happy to do so. Dave Anderson has already fixed in for crash,
so I have an example to follow. I've already started work on a patch for
the post 3.5 kernels.
I might need to come back to you for some details about the code though.
Kind regards,
...Louis
--
Louis Bouchard
Backline Support Analyst
Canonical Ltd
Ubuntu support: http://landscape.canonical.com
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: makedumpfile --dump-dmesg option broken on 3.5 kernels and later
2013-01-23 1:19 ` Atsushi Kumagai
2013-01-23 8:49 ` Bouchard Louis
@ 2013-01-30 13:45 ` Bouchard Louis
1 sibling, 0 replies; 5+ messages in thread
From: Bouchard Louis @ 2013-01-30 13:45 UTC (permalink / raw)
To: Atsushi Kumagai, Vivek Goyal; +Cc: kexec
Hello,
Le 23/01/2013 02:19, Atsushi Kumagai a écrit :
> Hello Louis,
>
> On Tue, 22 Jan 2013 14:52:09 +0100
> Bouchard Louis <louis.bouchard@canonical.com> wrote:
>
>> Hello Kumagai-san,
>>
>> Following a suggestion from Dave Anderson, I have tested the
>> makedumpfile --dump-dmesg option. After some research, I realized that
>> the option was no longer working on 3.5 kernel and later. Here is an
>> example of the result (on Ubuntu Quantal) :
>>
>> # makedumpfile --dump-dmesg /proc/vmcore /tmp/dmesg
>> dump_dmesg: Can't find some symbols for log_buf.
>>
>> makedumpfile Failed.
>>
>> On 3.5 kernel and later, the log_end symbol no longer exists.
>>
>> This is caused by the change from byte-buffer structure to
>> variable-length record buffer of the kernel log buffer introduced by
>> this commit :
>> http://goo.gl/NCgLI
>>
>> I am curious to know if you were aware of this change and if you had
>> done some work on modifying dump_dmesg() accordingly ? Just so I don't
>> go off and try to work on something that you have already solved.
>
> Thanks for your report.
> I haven't been aware of this, so could I ask you to help me ?
>
>
> Thanks
> Atsushi Kumagai
I now have what looks like a working patch for this issue. Thank to Dave
Anderson (crash) and Eric Biederman (vmcore-dmesg) for having chewed
most of the work for me.
My only remaining problem is to be able to print the syslog level as is
provided in the previous version. Currently, the kernel doesn't export
the 'level:3' offset of the log structure in the vmcoreinfo information
provided in the vmcore.
Vivek who authored the original kernel/printk.c patch might be able to
suggest a better way to expose log.level:3 (I did try to patch the
kernel but got thrown away because of the nature of .level:3 that didn't
fit the VMCOREINFO_OFFSET macro)
In the meantime, I only found this kinda ugly hack to work around the
absence of the structure element :
> /*
> * Ugly hack around absence of log.level:3
> * Hard code log.level offset = log.dict_len + 3
> */
> level = (UCHAR(logptr + OFFSET(log.dict_len)+3)&level_mask);
>
> sprintf(buf,"<%d>[%5lld.%06ld] ",level,nanos,rem/1000);
Aside from that, I get an identical dmesg output on kernel 3.5 and after.
I would appreciate comments on the following before I send the patch to
the list.
Kind regards,
...Louis
--
Louis Bouchard
Backline Support Analyst
Canonical Ltd
Ubuntu support: http://landscape.canonical.com
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-30 17:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.13964.1359561994.1038.kexec@lists.infradead.org>
2013-01-30 17:11 ` makedumpfile --dump-dmesg option broken on 3.5 kernels and later Dave Anderson
2013-01-22 13:52 Bouchard Louis
2013-01-23 1:19 ` Atsushi Kumagai
2013-01-23 8:49 ` Bouchard Louis
2013-01-30 13:45 ` Bouchard Louis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox