Re: [RFC PATCH 0/5] crash dump bitmap: scan memory pages in kernel to speedup kernel dump process

Eric W. Biederman
2013-03-12T19:48:42Z

Jingbai Ma <jingbai.ma@hp.com> writes:

> On 03/11/2013 05:42 PM, Eric W. Biederman wrote:

>> The kernel is known bad. What is bad is unclear.
>> Executing any extra code is a bad idea.
>>
>> The history here is that before kexec-on-panic there were lots of dump
>> routines that did all of the crashdump logic in the kernel before they
>> shutdown. They all worked beautifully during development, and on
>> developers test machines and were absolutely worthless in real world
>> situations.
>
> I also have learned some from the old style kernel dump. Yes, they do have some
> problems in real world situations. The primary problems come from I/O operations
> (disk writing/network sending) and invalid page table.

That and they provide no guarantee that you won't write corrupt data.

The kdump based solutions fail safe. The worst that will happen is that
you don't take a crash dump. There is no chance of corrupting your
system.

>> A piece of code that walks all of the page tables is most definitely
>> opening itself up to all kinds of failure situations I can't even
>> imagine.
>
> Agree, invalid page table will cause disaster.
> But even in the capture kernel with user space program, it may only causes a
> core dump, user still have chance to dump the crashed system by themselves with
> some special tools, It's possible, but should be very rare in real world.
> I doubt how many users be able to handle it in such kind of situations.
> So in most cases, if page tables have corrupted, and can not dump it normally,
> user would like to reboot the system directly.

For whatever it is worth corrupted page tables. Or at least page tables
that the cpu thinks are invalid are one of the crash scenarios that I
have seen in the wild on enough occasions to remember them.

Eric