28 Jan, 2014

1 commit


24 Jan, 2014

1 commit

  • For general-purpose (i.e. distro) kernel builds it makes sense to build
    with CONFIG_KEXEC to allow end users to choose what kind of things they
    want to do with kexec. However, in the face of trying to lock down a
    system with such a kernel, there needs to be a way to disable kexec_load
    (much like module loading can be disabled). Without this, it is too easy
    for the root user to modify kernel memory even when CONFIG_STRICT_DEVMEM
    and modules_disabled are set. With this change, it is still possible to
    load an image for use later, then disable kexec_load so the image (or lack
    of image) can't be altered.

    The intention is for using this in environments where "perfect"
    enforcement is hard. Without a verified boot, along with verified
    modules, and along with verified kexec, this is trying to give a system a
    better chance to defend itself (or at least grow the window of
    discoverability) against attack in the face of a privilege escalation.

    In my mind, I consider several boot scenarios:

    1) Verified boot of read-only verified root fs loading fd-based
    verification of kexec images.
    2) Secure boot of writable root fs loading signed kexec images.
    3) Regular boot loading kexec (e.g. kcrash) image early and locking it.
    4) Regular boot with no control of kexec image at all.

    1 and 2 don't exist yet, but will soon once the verified kexec series has
    landed. 4 is the state of things now. The gap between 2 and 4 is too
    large, so this change creates scenario 3, a middle-ground above 4 when 2
    and 1 are not possible for a system.

    Signed-off-by: Kees Cook
    Acked-by: Rik van Riel
    Cc: Vivek Goyal
    Cc: Eric Biederman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     

19 Dec, 2013

1 commit

  • Commit 1b3a5d02ee07 ("reboot: move arch/x86 reboot= handling to generic
    kernel") moved reboot= handling to generic code. In the process it also
    removed the code in native_machine_shutdown() which are moving reboot
    process to reboot_cpu/cpu0.

    I guess that thought must have been that all reboot paths are calling
    migrate_to_reboot_cpu(), so we don't need this special handling. But
    kexec reboot path (kernel_kexec()) is not calling
    migrate_to_reboot_cpu() so above change broke kexec. Now reboot can
    happen on non-boot cpu and when INIT is sent in second kerneo to bring
    up BP, it brings down the machine.

    So start calling migrate_to_reboot_cpu() in kexec reboot path to avoid
    this problem.

    Bisected by WANG Chao.

    Reported-by: Matthew Whitehead
    Reported-by: Dave Young
    Signed-off-by: Vivek Goyal
    Tested-by: Baoquan He
    Tested-by: WANG Chao
    Acked-by: H. Peter Anvin
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     

08 Dec, 2013

1 commit

  • Add a flag to tell the PCI subsystem that kernel is shutting down in
    preparation to kexec a kernel. Add code in PCI subsystem to use this flag
    to clear Bus Master bit on PCI devices only in case of kexec reboot.

    This fixes a power-off problem on Acer Aspire V5-573G and likely other
    machines and avoids any other issues caused by clearing Bus Master bit on
    PCI devices in normal shutdown path. The problem was introduced by
    b566a22c2332 ("PCI: disable Bus Master on PCI device shutdown").

    This patch is based on discussion at
    http://marc.info/?l=linux-pci&m=138425645204355&w=2

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=63861
    Reported-by: Chang Liu
    Signed-off-by: Khalid Aziz
    Signed-off-by: Bjorn Helgaas
    Acked-by: Konstantin Khlebnikov
    Cc: stable@vger.kernel.org # v3.5+

    Khalid Aziz
     

16 Nov, 2013

1 commit

  • Pull trivial tree updates from Jiri Kosina:
    "Usual earth-shaking, news-breaking, rocket science pile from
    trivial.git"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits)
    doc: usb: Fix typo in Documentation/usb/gadget_configs.txt
    doc: add missing files to timers/00-INDEX
    timekeeping: Fix some trivial typos in comments
    mm: Fix some trivial typos in comments
    irq: Fix some trivial typos in comments
    NUMA: fix typos in Kconfig help text
    mm: update 00-INDEX
    doc: Documentation/DMA-attributes.txt fix typo
    DRM: comment: `halve' -> `half'
    Docs: Kconfig: `devlopers' -> `developers'
    doc: typo on word accounting in kprobes.c in mutliple architectures
    treewide: fix "usefull" typo
    treewide: fix "distingush" typo
    mm/Kconfig: Grammar s/an/a/
    kexec: Typo s/the/then/
    Documentation/kvm: Update cpuid documentation for steal time and pv eoi
    treewide: Fix common typo in "identify"
    __page_to_pfn: Fix typo in comment
    Correct some typos for word frequency
    clk: fixed-factor: Fix a trivial typo
    ...

    Linus Torvalds
     

14 Oct, 2013

1 commit


12 Sep, 2013

1 commit

  • Code can not run here forever, so remove the unnecessary return.

    Signed-off-by: Xishi Qiu
    Suggested-by: Zhang Yanfei
    Reviewed-by: Simon Horman
    Reviewed-by: Zhang Yanfei
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Xishi Qiu
     

01 May, 2013

2 commits

  • Simplify the logic of variable assignments.

    [akpm@linux-foundation.org: replace min_t with min, remove unneeded casts]
    Signed-off-by: Zhang Yanfei
    Cc: "Eric W. Biederman"
    Reviewed-by: Simon Horman
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhang Yanfei
     
  • The types of the following local variables:

    - ubytes/mbytes in kimage_load_crash_segment()/kimage_load_normal_segment()

    - r in vmcoreinfo_append_str()

    are wrong, so fix them.

    Signed-off-by: Zhang Yanfei
    Cc: "Eric W. Biederman"
    Cc: Simon Horman
    Cc: Joe Perches
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhang Yanfei
     

30 Apr, 2013

3 commits

  • Now, vmap_area_list is exported as VMCOREINFO for makedumpfile to get
    the start address of vmalloc region (vmalloc_start). The address which
    contains vmalloc_start value is represented as below:

    vmap_area_list.next - OFFSET(vmap_area.list) + OFFSET(vmap_area.va_start)

    However, both OFFSET(vmap_area.va_start) and OFFSET(vmap_area.list)
    aren't exported as VMCOREINFO.

    So this patch exports them externally with small cleanup.

    [akpm@linux-foundation.org: vmalloc.h should include list.h for list_head]
    Signed-off-by: Atsushi Kumagai
    Cc: Joonsoo Kim
    Cc: Joonsoo Kim
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Atsushi Kumagai
    Cc: Chris Metcalf
    Cc: Dave Anderson
    Cc: Eric Biederman
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Cc: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Kumagai
     
  • Although our intention is to unexport internal structure entirely, but
    there is one exception for kexec. kexec dumps address of vmlist and
    makedumpfile uses this information.

    We are about to remove vmlist, then another way to retrieve information
    of vmalloc layer is needed for makedumpfile. For this purpose, we
    export vmap_area_list, instead of vmlist.

    Signed-off-by: Joonsoo Kim
    Signed-off-by: Joonsoo Kim
    Cc: Eric Biederman
    Cc: Dave Anderson
    Cc: Vivek Goyal
    Cc: Atsushi Kumagai
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Chris Metcalf
    Cc: Guan Xuetao
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joonsoo Kim
     
  • Use common help functions to free reserved pages.

    Signed-off-by: Jiang Liu
    Cc: Eric Biederman
    Reviewed-by: Zhang Yanfei
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiang Liu
     

18 Apr, 2013

3 commits

  • We can extend kexec-tools to support multiple "Crash kernel" in /proc/iomem
    instead.

    So we can use "Crash kernel" instead of "Crash kernel low" in /proc/iomem.

    Suggested-by: Vivek Goyal
    Signed-off-by: Yinghai Lu
    Link: http://lkml.kernel.org/r/1366089828-19692-3-git-send-email-yinghai@kernel.org
    Acked-by: Vivek Goyal
    Signed-off-by: H. Peter Anvin

    Yinghai Lu
     
  • Per hpa, use crashkernel=X,high crashkernel=Y,low instead of
    crashkernel_hign=X crashkernel_low=Y. As that could be extensible.

    -v2: according to Vivek, change delimiter to ;
    -v3: let hign and low only handle simple form and it conforms to
    description in kernel-parameters.txt
    still keep crashkernel=X override any crashkernel=X,high
    crashkernel=Y,low
    -v4: update get_last_crashkernel returning and add more strict
    checking in parse_crashkernel_simple() found by HATAYAMA.
    -v5: Change delimiter back to , according to HPA.
    also separate parse_suffix from parse_simper according to vivek.
    so we can avoid @pos in that path.
    -v6: Tight the checking about crashkernel=X,highblahblah,high
    found by HTYAYAMA.

    Cc: HATAYAMA Daisuke
    Signed-off-by: Yinghai Lu
    Link: http://lkml.kernel.org/r/1366089828-19692-5-git-send-email-yinghai@kernel.org
    Acked-by: Vivek Goyal
    Signed-off-by: H. Peter Anvin

    Yinghai Lu
     
  • Vivek found old kexec-tools does not work new kernel anymore.

    So change back crashkernel= back to old behavoir, and add crashkernel_high=
    to let user decide if buffer could be above 4G, and also new kexec-tools will
    be needed.

    -v2: let crashkernel=X override crashkernel_high=
    update description about _high will be ignored by crashkernel=X
    -v3: update description about kernel-parameters.txt according to Vivek.

    Signed-off-by: Yinghai Lu
    Link: http://lkml.kernel.org/r/1366089828-19692-4-git-send-email-yinghai@kernel.org
    Acked-by: Vivek Goyal
    Signed-off-by: H. Peter Anvin

    Yinghai Lu
     

28 Feb, 2013

6 commits

  • Though there is no error if we free a NULL pointer, I think we could
    avoid this behaviour. Change the code a little in kimage_crash_alloc()
    could avoid this kind of unnecessary free.

    Signed-off-by: Zhang Yanfei
    Cc: "Eric W. Biederman"
    Cc: Sasha Levin
    Reviewed-by: Simon Horman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhang Yanfei
     
  • If kimage_normal_alloc() fails to alloc pages for image->swap_page, it
    should call kimage_free_page_list() to free allocated pages in
    image->control_pages list before it frees image.

    Signed-off-by: Zhang Yanfei
    Cc: "Eric W. Biederman"
    Cc: Sasha Levin
    Reviewed-by: Simon Horman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhang Yanfei
     
  • If kimage_normal_alloc() fails to initialize an allocated kimage, it will
    free the image but would still set 'rimage', as a result kexec_load will
    try to free it again.

    This would explode as part of the freeing process is accessing internal
    members which point to uninitialized memory.

    Signed-off-by: Sasha Levin
    Cc: "Eric W. Biederman"
    Cc: Zhang Yanfei
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sasha Levin
     
  • This patch exports a PG_hwpoison into vmcoreinfo when
    CONFIG_MEMORY_FAILURE is defined. "makedumpfile" needs to read
    information of memory, such as 'mem_section', 'zone', 'pageflags' from
    vmcore.

    We introduce a function into "makedumpfile" to exclude hwpoison page from
    vmcore dump. In order to introduce this function, PG_hwpoison flag have
    to export into vmcoreinfo.

    Signed-off-by: Mitsuhiro Tanino
    Acked-by: "Eric W. Biederman"
    Cc: Mitsuhiro Tanino
    Cc: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mitsuhiro Tanino
     
  • hole_end has been checked to make sure it is
    Reviewed-by: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhang Yanfei
     
  • tAdd adds the values related to buddy system to vmcoreinfo data so that
    makedumpfile (dump filtering command) can filter out all free pages with
    the new logic.

    It's faster than the current logic because it can distinguish free page
    by analyzing page structure at the same time as filtering for other
    unnecessary pages (e.g. anonymous page).

    OTOH, the current logic has to trace free_list to distinguish free pages
    while analyzing page structure to filter out other unnecessary pages.

    The new logic uses the fact that buddy page is marked by _mapcount ==
    PAGE_BUDDY_MAPCOUNT_VALUE. But, _mapcount shares its memory with other
    fields for SLAB/SLUB when PG_slab is set, so we need to check if PG_slab
    is set or not before looking up _mapcount value. And we can get the
    order of buddy system from private field. To sum it up, the values
    below are required for this logic.

    Required values:
    - OFFSET(page._mapcount)
    - OFFSET(page.private)
    - NUMBER(PG_slab)
    - NUMBER(PAGE_BUDDY_MAPCOUNT_VALUE)

    Changelog from v1 to v2:
    1. remove SIZE(pageflags)
    The new logic was changed after I sent v1 patch.
    Accordingly, SIZE(pageflags) has been unnecessary for makedumpfile.

    What's makedumpfile:
    makedumpfile creates a small dumpfile by excluding unnecessary pages
    for the analysis. To distinguish unnecessary pages, makedumpfile gets
    the vmcoreinfo data which has the minimum debugging information only
    for dump filtering.

    Signed-off-by: Atsushi Kumagai
    Cc: "Eric W. Biederman"
    Acked-by: Vivek Goyal
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Atsushi Kumagai
     

30 Jan, 2013

1 commit

  • During kdump kernel's booting stage, it need to find low ram for
    swiotlb buffer when system does not support intel iommu/dmar remapping.

    kexed-tools is appending memmap=exactmap and range from /proc/iomem
    with "Crash kernel", and that range is above 4G for 64bit after boot
    protocol 2.12.

    We need to add another range in /proc/iomem like "Crash kernel low",
    so kexec-tools could find that info and append to kdump kernel
    command line.

    Try to reserve some under 4G if the normal "Crash kernel" is above 4G.

    User could specify the size with crashkernel_low=XX[KMG].

    -v2: fix warning that is found by Fengguang's test robot.
    -v3: move out get_mem_size change to another patch, to solve compiling
    warning that is found by Borislav Petkov
    -v4: user must specify crashkernel_low if system does not support
    intel or amd iommu.

    Signed-off-by: Yinghai Lu
    Link: http://lkml.kernel.org/r/1359058816-7615-31-git-send-email-yinghai@kernel.org
    Cc: Eric Biederman
    Cc: Rob Landley
    Signed-off-by: H. Peter Anvin

    Yinghai Lu
     

06 Oct, 2012

1 commit


31 Jul, 2012

1 commit

  • The last line of vmcoreinfo note does not end with \n. Parsing all the
    lines in note becomes easier if all lines end with \n instead of trying to
    special case the last line.

    I know at least one tool, vmcore-dmesg in kexec-tools tree which made the
    assumption that all lines end with \n. I think it is a good idea to fix
    it.

    Signed-off-by: Vivek Goyal
    Cc: "Eric W. Biederman"
    Cc: Atsushi Kumagai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vivek Goyal
     

29 Mar, 2012

4 commits

  • Merge third batch of patches from Andrew Morton:
    - Some MM stragglers
    - core SMP library cleanups (on_each_cpu_mask)
    - Some IPI optimisations
    - kexec
    - kdump
    - IPMI
    - the radix-tree iterator work
    - various other misc bits.

    "That'll do for -rc1. I still have ~10 patches for 3.4, will send
    those along when they've baked a little more."

    * emailed from Andrew Morton : (35 commits)
    backlight: fix typo in tosa_lcd.c
    crc32: add help text for the algorithm select option
    mm: move hugepage test examples to tools/testing/selftests/vm
    mm: move slabinfo.c to tools/vm
    mm: move page-types.c from Documentation to tools/vm
    selftests/Makefile: make `run_tests' depend on `all'
    selftests: launch individual selftests from the main Makefile
    radix-tree: use iterators in find_get_pages* functions
    radix-tree: rewrite gang lookup using iterator
    radix-tree: introduce bit-optimized iterator
    fs/proc/namespaces.c: prevent crash when ns_entries[] is empty
    nbd: rename the nbd_device variable from lo to nbd
    pidns: add reboot_pid_ns() to handle the reboot syscall
    sysctl: use bitmap library functions
    ipmi: use locks on watchdog timeout set on reboot
    ipmi: simplify locking
    ipmi: fix message handling during panics
    ipmi: use a tasklet for handling received messages
    ipmi: increase KCS timeouts
    ipmi: decrease the IPMI message transaction time in interrupt mode
    ...

    Linus Torvalds
     
  • When using crashkernel=2M-256M, the kernel doesn't give any warning. This
    is misleading sometimes.

    Signed-off-by: Zhenzhong Duan
    Acked-by: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zhenzhong Duan
     
  • nommu platforms don't have very interesting swapper_pg_dir pointers and
    usually just #define them to NULL, meaning that we can't include them in
    the vmcoreinfo on the kexec crash path.

    This patch only saves the swapper_pg_dir if we have an MMU.

    Signed-off-by: Will Deacon
    Reviewed-by: Simon Horman
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Will Deacon
     
  • Remove all #inclusions of asm/system.h preparatory to splitting and killing
    it. Performed with the following command:

    perl -p -i -e 's!^#\s*include\s*.*\n!!' `grep -Irl '^#\s*include\s*' *`

    Signed-off-by: David Howells

    David Howells
     

30 Jan, 2012

1 commit

  • The current device suspend/resume phases during system-wide power
    transitions appear to be insufficient for some platforms that want
    to use the same callback routines for saving device states and
    related operations during runtime suspend/resume as well as during
    system suspend/resume. In principle, they could point their
    .suspend_noirq() and .resume_noirq() to the same callback routines
    as their .runtime_suspend() and .runtime_resume(), respectively,
    but at least some of them require device interrupts to be enabled
    while the code in those routines is running.

    It also makes sense to have device suspend-resume callbacks that will
    be executed with runtime PM disabled and with device interrupts
    enabled in case someone needs to run some special code in that
    context during system-wide power transitions.

    Apart from this, .suspend_noirq() and .resume_noirq() were introduced
    as a workaround for drivers using shared interrupts and failing to
    prevent their interrupt handlers from accessing suspended hardware.
    It appears to be better not to use them for other porposes, or we may
    have to deal with some serious confusion (which seems to be happening
    already).

    For the above reasons, introduce new device suspend/resume phases,
    "late suspend" and "early resume" (and analogously for hibernation)
    whose callback will be executed with runtime PM disabled and with
    device interrupts enabled and whose callback pointers generally may
    point to runtime suspend/resume routines.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Mark Brown
    Reviewed-by: Kevin Hilman

    Rafael J. Wysocki
     

13 Jan, 2012

3 commits

  • Currently it is possible to set the crash_size via the sysfs
    /sys/kernel/kexec_crash_size even if no crash kernel memory has been
    defined with the "crashkernel" parameter. In this case "crashk_res" is
    not initialized and crashk_res.start = crashk_res.end = 0. Unfortunately
    resource_size(&crashk_res) returns 1 in this case. This breaks the s390
    implementation of crash_(un)map_reserved_pages().

    To fix the problem the correct "old_size" is now calculated in
    crash_shrink_memory(). "old_size is set to "0" if crashk_res is not
    initialized. With this change crash_shrink_memory() will do nothing, when
    "crashk_res" is not initialized. It will return "0" for "echo 0 >
    /sys/kernel/kexec_crash_size" and -EINVAL for "echo [not zero] >
    /sys/kernel/kexec_crash_size".

    In addition to that this patch also simplifies the "ret = -EINVAL" vs.
    "ret = 0" logic as suggested by Simon Horman.

    Signed-off-by: Michael Holzheu
    Reviewed-by: Dave Young
    Reviewed-by: WANG Cong
    Reviewed-by: Simon Horman
    Cc: Vivek Goyal
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Holzheu
     
  • When shrinking crashkernel memory using /sys/kernel/kexec_crash_size for
    the newly added memory no RAM resource is created at the moment.

    Example:

    $ cat /proc/iomem
    00000000-bfffffff : System RAM
    00000000-005b7ac3 : Kernel code
    005b7ac4-009743bf : Kernel data
    009bb000-00a85c33 : Kernel bss
    c0000000-cfffffff : Crash kernel
    d0000000-ffffffff : System RAM

    $ echo 0 > /sys/kernel/kexec_crash_size
    $ cat /proc/iomem
    00000000-bfffffff : System RAM
    00000000-005b7ac3 : Kernel code
    005b7ac4-009743bf : Kernel data
    009bb000-00a85c33 : Kernel bss
    < /sys/kernel/kexec_crash_size
    $ cat /proc/iomem
    00000000-bfffffff : System RAM
    00000000-005b7ac3 : Kernel code
    005b7ac4-009743bf : Kernel data
    009bb000-00a85c33 : Kernel bss
    c0000000-cfffffff : System RAM <
    Cc: Vivek Goyal
    Cc: "Eric W. Biederman"
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Holzheu
     
  • KMSG_DUMP_KEXEC is useless because we already save kernel messages inside
    /proc/vmcore, and it is unsafe to allow modules to do other stuffs in a
    crash dump scenario.

    [akpm@linux-foundation.org: fix powerpc build]
    Signed-off-by: WANG Cong
    Reported-by: Vivek Goyal
    Acked-by: Vivek Goyal
    Acked-by: Jarod Wilson
    Cc: "Eric W. Biederman"
    Cc: KOSAKI Motohiro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    WANG Cong
     

09 Dec, 2011

1 commit


30 Oct, 2011

3 commits

  • This patch introduces a mechanism that allows architecture backends to
    remove page tables for the crashkernel memory. This can protect the loaded
    kdump kernel from being overwritten by broken kernel code. Two new
    functions crash_map_reserved_pages() and crash_unmap_reserved_pages() are
    added that can be implemented by architecture code. The
    crash_map_reserved_pages() function is called before and
    crash_unmap_reserved_pages() after the crashkernel segments are loaded. The
    functions are also called in crash_shrink_memory() to create/remove page
    tables when the crashkernel memory size is reduced.

    To support architectures that have large pages this patch also introduces
    a new define KEXEC_CRASH_MEM_ALIGN. The crashkernel start and size must
    always be aligned with KEXEC_CRASH_MEM_ALIGN.

    Cc: Andrew Morton
    Acked-by: Vivek Goyal
    Signed-off-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky

    Michael Holzheu
     
  • Currently the vmcoreinfo note is only initialized in case of kdump. On s390
    it is possible to create kernel dumps with other dump mechanisms than kdump
    (e.g. via hypervisor dump or stand-alone dump tools). For those dumps it
    would also be desirable to include the vmcoreinfo data. To accomplish this,
    with this patch the vmcoreinfo ELF note is always initialized, not only in
    case of a (kdump) crash. On s390 we will add an ABI defined pointer at
    a well known address to vmcoreinfo so that dump analysis tools are able to
    find this information.

    In particular on s390 we have a tool named zgetdump. With this tool it is
    possible to convert dump formats on the fly using fuse. E.g. you can mount a
    s390 stand-alone dump as ELF dump. When this is done, the tool finds the
    vmcoreinfo in the stand-alone dump via the well known ABI defined address and
    it creates the respective VMCOREINFO ELF note in the output ELF dump. This then
    can be used e.g. by makedumpfile for dump filtering. No more need for a
    vmlinux file with debug information.

    So this will look like the following:
    $ zgetdump --mount standalone.dump -f elf /mnt
    $ ls /mnt
    dump.elf
    $ readelf -n /mnt/dump.elf
    $ ...
    VMCOREINFO 0x00000474 Unknown note type: (0x00000000)
    $ makedumpfile -c -d 31 /mnt/dump.elf dump.kdump

    Cc: Andrew Morton
    Acked-by: Vivek Goyal
    Signed-off-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky

    Michael Holzheu
     
  • On s390 there is a different KEXEC_CONTROL_MEMORY_LIMIT for the normal and
    the kdump kexec case. Therefore this patch introduces a new macro
    KEXEC_CRASH_CONTROL_MEMORY_LIMIT. This is set to
    KEXEC_CONTROL_MEMORY_LIMIT for all architectures that do not define
    KEXEC_CRASH_CONTROL_MEMORY_LIMIT.

    Acked-by: Vivek Goyal
    Acked-by: Andrew Morton
    Signed-off-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky

    Michael Holzheu
     

10 Jun, 2011

1 commit


12 May, 2011

1 commit

  • Since suspend, resume and shutdown operations in struct sysdev_class
    and struct sysdev_driver are not used any more, remove them. Also
    drop sysdev_suspend(), sysdev_resume() and sysdev_shutdown() used
    for executing those operations and modify all of their users
    accordingly. This reduces kernel code size quite a bit and reduces
    its complexity.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     

20 Apr, 2011

1 commit

  • Device suspend/resume infrastructure is used not only by the suspend
    and hibernate code in kernel/power, but also by APM, Xen and the
    kexec jump feature. However, commit 40dc166cb5dddbd36aa4ad11c03915ea
    (PM / Core: Introduce struct syscore_ops for core subsystems PM)
    failed to add syscore_suspend() and syscore_resume() calls to that
    code, which generally leads to breakage when the features in question
    are used.

    To fix this problem, add the missing syscore_suspend() and
    syscore_resume() calls to arch/x86/kernel/apm_32.c, kernel/kexec.c
    and drivers/xen/manage.c.

    Signed-off-by: Rafael J. Wysocki
    Acked-by: Greg Kroah-Hartman
    Acked-by: Ian Campbell

    Rafael J. Wysocki
     

08 Apr, 2011

1 commit