lkml.org 
[lkml]   [2012]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] kdump: force page alignment for per-CPU crash notes.
    On Wed, Feb 29, 2012 at 05:39:55PM -0800, Eugene Surovegin wrote:
    > On Wed, Feb 29, 2012 at 5:32 PM, Simon Horman <horms@verge.net.au> wrote:
    > > On Wed, Feb 29, 2012 at 05:23:10PM -0800, Eugene Surovegin wrote:
    > >> On Wed, Feb 29, 2012 at 5:18 PM, Simon Horman <horms@verge.net.au> wrote:
    > >>
    > >> > On Wed, Feb 29, 2012 at 09:21:23AM -0800, Eugene Surovegin wrote:
    > >> > > Per-CPU allocations are not guaranteed to be physically contiguous.
    > >> > > However, kdump kernel and user-space code assumes that per-CPU
    > >> > > memory, used for saving CPU registers on crash, is.
    > >> > > This can cause corrupted /proc/vmcore in some cases - the main
    > >> > > symptom being huge ELF note section.
    > >> > >
    > >> > > Force page alignment for note_buf_t to ensure that this assumption holds.
    > >> >
    > >> > Ouch. I'm surprised there is an allocation on crash, perhaps
    > >> > it could at least be done earlier? And am I right in thinking
    > >> > that this change increases the likely hood that the allocation
    > >> > could fail?
    > >> >
    > >>
    > >> I'm not following. This allocation is done on start-up, not on crash.
    > >> If you cannot allocate this much memory on system boot, I'm not sure what
    > >> else you can do on this system....
    > >
    > > Sorry, my eyes deceived me. You are correct and I agree.
    > >
    > > Is it the case that note_buf_t is never larger than PAGE_SIZE?
    > > If so I your patch looks good to me.
    >
    > Currently, maximum note size is hardcoded in kexec-tools to 1024
    > (MAX_NOTE_BYTES).
    > Usually it's way less. IIRC on x86_64 it's 336 bytes.

    Ok, understood.

    Reviewed-by: Simon Horman <horms@verge.net.au>


    \
     
     \ /
      Last update: 2012-03-01 03:55    [W:0.020 / U:59.464 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site