Skip to content
  1. Sep 20, 2016
    • Aneesh Kumar K.V's avatar
      powerpc/mm: Update FORCE_MAX_ZONEORDER range to allow hugetlb w/4K · d5a1e42c
      Aneesh Kumar K.V authored
      For hugetlb to work with 4K page size, we need MAX_ORDER to be 13 or
      more. When switching from a 64K page size to 4K linux page size using
      make oldconfig, we end up with a CONFIG_FORCE_MAX_ZONEORDER value of 9.
      This results in a 16M hugepage beiing considered as a gigantic huge page
      which in turn results in failure to setup hugepages if gigantic hugepage
      support is not enabled.
      
      This also results in kernel crash with 4K radix configuration. We
      hit the below BUG_ON on radix:
      
        kernel BUG at mm/huge_memory.c:364!
        Oops: Exception in kernel mode, sig: 5 [#1]
        SMP NR_CPUS=2048 NUMA PowerNV
        CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.8.0-rc1-00006-gbae9cc6 #1
        task: c0000000f1af8000 task.stack: c0000000f1aec000
        NIP: c000000000c5fa0c LR: c000000000c5f9d8 CTR: c000000000c5f9a4
        REGS: c0000000f1aef920 TRAP: 0700   Not tainted (4.8.0-rc1-00006-gbae9cc6)
        MSR: 9000000102029033 <SF,HV,VEC,EE,ME,IR,DR,RI,LE,TM[E]>  CR: 24000844  XER: 00000000
        CFAR: c000000000c5f9e0 SOFTE: 1
        ....
        NIP [c000000000c5fa0c] hugepage_init+0x68/0x238
        LR [c000000000c5f9d8] hugepage_init+0x34/0x238
      
      Fixes: a7ee5395
      
       ("powerpc/Kconfig: Update config option based on page size")
      Cc: stable@vger.kernel.org # v4.7+
      Reported-by: default avatarSanthosh <santhog4@linux.vnet.ibm.com>
      Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
      Acked-by: default avatarBalbir Singh <bsingharora@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      d5a1e42c
    • Nicholas Piggin's avatar
      powerpc/64: Document the syscall ABI · 7b8845a2
      Nicholas Piggin authored
      
      
      Add some documentation for the 64-bit syscall ABI, which doesn't seem
      to be documented elsewhere.
      
      This attempts to document existing practice. The only small discrepancy
      is glibc clobbers not quite matching the kernel (e.g., xer, some
      vsyscalls trash cr1 whereas glibc only clobbers cr0). These will be
      resolved after this document is merged.
      
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      7b8845a2
    • Nicholas Piggin's avatar
      powerpc/64: Replay hypervisor maintenance interrupt first · e0e0d6b7
      Nicholas Piggin authored
      
      
      The HMI (Hypervisor Maintenance Interrupt) is defined by the
      architecture to be higher priority than other maskable interrupts, so
      replay it first, as a best-effort to replay according to hardware
      priorities.
      
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      e0e0d6b7
  2. Sep 19, 2016
    • Michael Ellerman's avatar
      powerpc: Ensure .mem(init|exit).text are within _stext/_etext · 7de3b27b
      Michael Ellerman authored
      
      
      In our linker script we open code the list of text sections, because we
      need to include the __ftr_alt sections, which are arch-specific.
      
      This means we can't use TEXT_TEXT as defined in vmlinux.lds.h, and so we
      don't have the MEM_KEEP() logic for memory hotplug sections.
      
      If we build the kernel with the gold linker, and with CONFIG_MEMORY_HOTPLUG=y,
      we see that functions marked __meminit can end up outside of the
      _stext/_etext range, and also outside of _sinittext/_einittext, eg:
      
          c000000000000000 T _stext
          c0000000009e0000 A _etext
          c0000000009e3f18 T hash__vmemmap_create_mapping
          c000000000ca0000 T _sinittext
          c000000000d00844 T _einittext
      
      This causes them to not be recognised as text by is_kernel_text(), and
      prevents them being patched by jump_label (and presumably ftrace/kprobes
      etc.).
      
      Fix it by adding MEM_KEEP() directives, mirroring what TEXT_TEXT does.
      
      This isn't a problem when CONFIG_MEMORY_HOTPLUG=n, because we use the
      standard INIT_TEXT_SECTION() and EXIT_TEXT macros from vmlinux.lds.h.
      
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Tested-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      7de3b27b
    • Michael Ellerman's avatar
      powerpc: Don't change the section in _GLOBAL() · bea2dccc
      Michael Ellerman authored
      
      
      Currently the _GLOBAL() macro unilaterally sets the assembler section to
      ".text" at the start of the macro. This is rude as the caller may be
      using a different section.
      
      So let the caller decide which section to emit the code into. On big
      endian we do need to switch to the ".opd" section to emit the OPD, but
      do that with pushsection/popsection, thereby leaving the original
      section intact.
      
      I verified that the order of all entries in System.map is unchanged
      after this patch. The actual addresses shift around slightly so you
      can't just diff the System.map.
      
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Reviewed-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      bea2dccc
    • Nicholas Piggin's avatar
      powerpc/kernel: Use kprobe blacklist for asm functions · 6f698df1
      Nicholas Piggin authored
      
      
      Rather than forcing the whole function into the ".kprobes.text" section,
      just add the symbol's address to the kprobe blacklist.
      
      This also lets us drop the three versions of the_KPROBE macro, in
      exchange for just one version of _ASM_NOKPROBE_SYMBOL - which is a good
      cleanup.
      
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      6f698df1
    • Nicholas Piggin's avatar
      powerpc: Use kprobe blacklist for exception handlers · 03465f89
      Nicholas Piggin authored
      
      
      Currently we mark the C implementations of some exception handlers as
      __kprobes. This has the effect of putting them in the ".kprobes.text"
      section, which separates them from the rest of the text.
      
      Instead we can use the blacklist macros to add the symbols to a
      blacklist which kprobes will check. This allows the linker to move
      exception handler functions close to callers and avoids trampolines in
      larger kernels.
      
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      [mpe: Reword change log a bit]
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      03465f89
  3. Sep 13, 2016
  4. Sep 10, 2016
  5. Sep 05, 2016
  6. Sep 04, 2016
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9ca581b5
      Linus Torvalds authored
      Pull x86 fix from Thomas Gleixner:
       "A single fix for an AMD erratum so machines without a BIOS fix work"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/AMD: Apply erratum 665 on machines without a BIOS fix
      9ca581b5
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1c333360
      Linus Torvalds authored
      Pull timer fixes from Thomas Gleixner:
       "Two fixlet from the timers departement:
      
         - A fix for scheduler stalls in the tick idle code affecting
           NOHZ_FULL kernels
      
         - A trivial compile fix"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        tick/nohz: Fix softlockup on scheduler stalls in kvm guest
        clocksource/drivers/atmel-pit: Fix compilation error
      1c333360
    • Linus Torvalds's avatar
      Merge tag 'dm-4.8-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm · 28e68154
      Linus Torvalds authored
      Pull device mapper fixes from Mike Snitzer:
      
       - a stable fix in both DM crypt and DM log-writes for too large bios
         (as generated by bcache)
      
       - two other stable fixes for DM log-writes
      
       - a stable fix for a DM crypt bug that could result in freeing pointers
         from uninitialized memory in the tfm allocation error path
      
       - a DM bufio cleanup to discontinue using create_singlethread_workqueue()
      
      * tag 'dm-4.8-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
        dm bufio: remove use of deprecated create_singlethread_workqueue()
        dm crypt: fix free of bad values after tfm allocation failure
        dm crypt: fix error with too large bios
        dm log writes: fix check of kthread_run() return value
        dm log writes: fix bug with too large bios
        dm log writes: move IO accounting earlier to fix error path
      28e68154
    • Linus Torvalds's avatar
      Merge branch 'for-linus-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs · 4b30b6d1
      Linus Torvalds authored
      Pull btrfs fixes from Chris Mason:
       "I'm still prepping a set of fixes for btrfs fsync, just nailing down a
        hard to trigger memory corruption.  For now, these are tested and ready."
      
      * 'for-linus-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
        btrfs: fix one bug that process may endlessly wait for ticket in wait_reserve_ticket()
        Btrfs: fix endless loop in balancing block groups
        Btrfs: kill invalid ASSERT() in process_all_refs()
      4b30b6d1
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 2bece1a0
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
       "arm64 and arm/perf fixes:
      
         - arm64 fix: debug exception unmasking on the CPU resume path
      
         - ARM PMU fixes: memory leak on error path and NULL pointer
           dereference"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: kernel: Fix unmasked debug exceptions when restoring mdscr_el1
        drivers/perf: arm_pmu: Fix NULL pointer dereference during probe
        drivers/perf: arm_pmu: Fix leak in error path
      2bece1a0
    • Linus Torvalds's avatar
      Merge tag 'char-misc-4.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 593ee4ed
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are a number of small driver fixes for 4.8-rc5.
      
        The largest thing here is deleting an obsolete driver,
        drivers/misc/bh1780gli.c, as the functionality of it was replaced by
        an iio driver a while ago.
      
        The other fixes are things that have been reported, or reverts of
        broken stuff (the binder change).  All of these changes have been in
        linux-next for a while with no reported issues"
      
      * tag 'char-misc-4.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        thunderbolt: Don't declare Falcon Ridge unsupported
        thunderbolt: Add support for INTEL_FALCON_RIDGE_2C controller.
        thunderbolt: Fix resume quirk for Falcon Ridge 4C.
        lkdtm: Mark lkdtm_rodata_do_nothing() notrace
        mei: me: disable driver on SPT SPS firmware
        Revert "android: binder: fix dangling pointer comparison"
        drivers/iio/light/Kconfig: SENSORS_BH1780 cleanup
        android: binder: fix dangling pointer comparison
        misc: delete bh1780 driver
      593ee4ed