[lkml]   [2005]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [Fastboot] [PATCH] Kdump(x86): add note type NT_KDUMPINFO tokernel core dumps
    Vivek Goyal wrote:

    > > Ok. The point here is to know which task/cpu called panic, rather
    > > than to get the task_struct. That makes a lot of sense, and is
    > > cheap to get. Any note on the crashing cpu that is not captured
    > > by another cpu will give us that information.
    > >
    > That makes sense. Sheer presence of a particular note can identify the
    > crashing cpu and no need to store "current". Only crashing cpu is going
    > to store that note and that too after respective NT_PRSTATUS.
    > > My primary concern is while the concept of a task_struct is pretty
    > > stable who is to know how the kernel will change in the future. So
    > > if we don't need to export a task_struct pointer and merely need
    > > to flag the cpu that called panic we can do that much more reliably.

    Just flagging the cpu, and then mapping that to the stack pointer found in
    the associated NT_PRSTATUS register set should work OK too. It gets
    a little muddy if it crashed while running on an IRQ stack, but it still can be
    tracked back from there as well. (although not if the crashing task overflowed
    the IRQ stack)

    The task_struct would be ideal though -- if the kernel's use of task_structs
    changes in the future, well, then crash is going to need a serious re-write
    anyway... FWIW, netdump and diskdump use the NT_TASKSTRUCT note
    note to store just the "current" pointer, and not the whole task_struct itself,
    which would just be a waste of space in the ELF header for crash's purposes.
    And looking at the gdb sources, it appears to be totally ignored. Who
    uses the NT_TASKSTRUCT note anyway?

    > > We do need a way that we can test to see if a core dump
    > > actually matches the vmlinux we are looking at. Probably
    > > this is capturing all of the information captured by linux/version.h
    > > and linux/compile.h both at runtime and at compile time and
    > > checking to see if they match.
    > >
    > I quickly browsed through "crash" code and looks like it is already doing
    > similiar check (kernel.c, verify_version()). It seems to be retrieving
    > "linux_banner" from core image and also retrieving banner string from vmlinux
    > and trying to match. So if banner information can be directly read from the
    > core image, probably there is no need to export it through notes.

    That's correct.


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-09-22 17:33    [W:0.039 / U:8.376 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site