Dave Anderson wrote:
Bernhard Walle wrote:
> * Dave Anderson <anderson(a)redhat.com> [2007-12-21 17:20]:
>
>> Looks reasonable.
>>
>> BTW, since is_netdump() gets called twice, first
>> directly and then via is_kdump(), do the error
>> messages get printed twice?
>
>
>
> Yes. But I don't think it's a problem, is it?
>
>
> Thanks,
> Bernhard
No, just looks funny. Anyway, I'll run with it
from here -- nice improvement.
Thanks,
Dave
Actually this patch has just turned up different issues
that have to be handled, because the e_type and e_phnum
get deferred until after the e_machine and endianness
are checked.
Among them the fact that an i386 xen guest core file
taken by an x86_64 host has the e_machine type set
to x86_64 (don't ask me why they did that...), and has
an e_phnum of 0. Anyway, that requires the e_phnum
to be checked *before* the machine type and endianness.
And another, since the e_type doesn't get checked
until *after* the machine type and endianness,
it allows the vmlinux file (ET_EXEC) to get passed
through, which can generate a bogus error message
about the vmlinux file!
And there's probably others...
There was a method to my madness in the way it's written
now. I'm going to have to spend some more time with
this because I don't want to introduce false alarms
or print error messages that don't make any sense...
Dave