19 Nov, 2018

3 commits

  • Pull perf fixes from Ingo Molnar:
    "Fix uncore PMU enumeration for CofeeLake CPUs"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86/intel/uncore: Support CoffeeLake 8th CBOX
    perf/x86/intel/uncore: Add more IMC PCI IDs for KabyLake and CoffeeLake CPUs

    Linus Torvalds
     
  • Pull EFI fixes from Ingo Molnar:
    "Misc fixes: two warning splat fixes, a leak fix and persistent memory
    allocation fixes for ARM"

    * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    efi: Permit calling efi_mem_reserve_persistent() from atomic context
    efi/arm: Defer persistent reservations until after paging_init()
    efi/arm/libstub: Pack FDT after populating it
    efi/arm: Revert deferred unmap of early memmap mapping
    efi: Fix debugobjects warning on 'efi_rts_work'

    Linus Torvalds
     
  • Pull ARM spectre updates from Russell King:
    "These are the currently known final bits that resolve the Spectre
    issues. big.Little systems used to be sufficiently identical in that
    there were no differences between individual CPUs in the system that
    mattered to the kernel. With the advent of the Spectre problem, the
    CPUs now have differences in how the workaround is applied.

    As a result of previous Spectre patches, these systems ended up
    reporting quite a lot of:

    "CPUx: Spectre v2: incorrect context switching function, system vulnerable"

    messages due to the action of the big.Little switcher causing the CPUs
    to be re-initialised regularly. This series resolves that issue by
    making the CPU vtable unique to each CPU.

    However, since this is used very early, before per-cpu is setup,
    per-cpu can't be used. We also have a problem that two of the methods
    are not called from preempt-safe paths, but thankfully these remain
    identical between all CPUs in the system. To make sure, we validate
    that these are identical during boot"

    * 'spectre' of git://git.armlinux.org.uk/~rmk/linux-arm:
    ARM: spectre-v2: per-CPU vtables to work around big.Little systems
    ARM: add PROC_VTABLE and PROC_TABLE macros
    ARM: clean up per-processor check_bugs method call
    ARM: split out processor lookup
    ARM: make lookup_processor_type() non-__init

    Linus Torvalds
     

17 Nov, 2018

3 commits

  • Pull drm fixes from Dave Airlie:
    "Live from Vancouver, SoC maintainer talk, this weeks drm fixes pull
    for rc3:

    omapdrm:
    - regression fixes for the reordering bridge stuff that went into rc1

    i915:
    - incorrect EU count fix
    - HPD storm fix
    - MST fix
    - relocation fix for gen4/5

    amdgpu:
    - huge page handling fix
    - IH ring setup
    - XGMI aperture setup
    - watermark setup fix

    misc:
    - docs and MST fix"

    * tag 'drm-fixes-2018-11-16' of git://anongit.freedesktop.org/drm/drm: (23 commits)
    drm/i915: Account for scale factor when calculating initial phase
    drm/i915: Clean up skl_program_scaler()
    drm/i915: Move programming plane scaler to its own function.
    drm/i915/icl: Drop spurious register read from icl_dbuf_slices_update
    drm/i915: fix broadwell EU computation
    drm/amdgpu: fix huge page handling on Vega10
    drm/amd/pp: Fix truncated clock value when set watermark
    drm/amdgpu: fix bug with IH ring setup
    drm/meson: venc: dmt mode must use encp
    drm/amdgpu: set system aperture to cover whole FB region
    drm/i915: Fix hpd handling for pins with two encoders
    drm/i915/execlists: Force write serialisation into context image vs execution
    drm/i915/icl: Fix power well 2 wrt. DC-off toggling order
    drm/i915: Fix NULL deref when re-enabling HPD IRQs on systems with MST
    drm/i915: Fix possible race in intel_dp_add_mst_connector()
    drm/i915/ringbuffer: Delay after EMIT_INVALIDATE for gen4/gen5
    drm/omap: dsi: Fix missing of_platform_depopulate()
    drm/omap: Move DISPC runtime PM handling to omapdrm
    drm/omap: dsi: Ensure the device is active during probe
    drm/omap: hdmi4: Ensure the device is active during bind
    ...

    Linus Torvalds
     
  • Pull powerpc fixes from Michael Ellerman:
    "Two weeks worth of fixes since rc1.

    - I broke 16-byte alignment of the stack when we moved PPR into
    pt_regs. Despite being required by the ABI this broke almost
    nothing, we eventually hit it in code where GCC does arithmetic on
    the stack pointer assuming the bottom 4 bits are clear. Fix it by
    padding the in-kernel pt_regs by 8 bytes.

    - A couple of commits fixing minor bugs in the recent SLB rewrite.

    - A build fix related to tracepoints in KVM in some configurations.

    - Our old "IO workarounds" code written for Cell couldn't coexist in
    a kernel that runs on Power9 with the Radix MMU, fix that.

    - Remove the NPU DMA ops, these just printed a warning and should
    never have been called.

    - Suppress an overly chatty message triggered by CPU hotplug in some
    configs.

    - Two small selftest fixes.

    Thanks to: Alistair Popple, Gustavo Romero, Nicholas Piggin, Satheesh
    Rajendran, Scott Wood"

    * tag 'powerpc-4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
    selftests/powerpc: Adjust wild_bctr to build with old binutils
    powerpc/64: Fix kernel stack 16-byte alignment
    powerpc/numa: Suppress "VPHN is not supported" messages
    selftests/powerpc: Fix wild_bctr test to work on ppc64
    powerpc/io: Fix the IO workarounds code to work with Radix
    powerpc/mm/64s: Fix preempt warning in slb_allocate_kernel()
    KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE
    powerpc/mm/64s: Only use slbfee on CPUs that support it
    powerpc/mm/64s: Use PPC_SLBFEE macro
    powerpc/mm/64s: Consolidate SLB assertions
    powerpc/powernv/npu: Remove NPU DMA ops

    Linus Torvalds
     
  • Pull Xtensa fixes from Max Filippov:

    - fix stack alignment for bFLT binaries.

    - fix physical-to-virtual address translation for boot parameters in
    MMUv3 256+256 and 512+512 virtual memory layouts.

    * tag 'xtensa-20181115' of git://github.com/jcmvbkbc/linux-xtensa:
    xtensa: fix boot parameters address translation
    xtensa: make sure bFLT stack is 16 byte aligned

    Linus Torvalds
     

16 Nov, 2018

1 commit

  • Cross-subsystem:
    - omap: Instantiate dss children in omapdss instead of mach (Laurent)

    Other:
    - htmldocs build warning (Sean)
    - MST NULL deref fix (Stanislav)
    - omap: Various runtime ref gets on probe/bind (Laurent)
    - omap: Fix to the above dss children patch (Tony)

    Cc: Sean Paul
    Cc: Stanislav Lisovskiy
    Cc: Laurent Pinchart
    Cc: Tony Lindgren
    Signed-off-by: Dave Airlie
    From: Sean Paul
    Link: https://patchwork.freedesktop.org/patch/msgid/20181114204542.GA52569@art_vandelay

    Dave Airlie
     

15 Nov, 2018

5 commits

  • The new memory EFI reservation feature we introduced to allow memory
    reservations to persist across kexec may trigger an unbounded number
    of calls to memblock_reserve(). The memblock subsystem can deal with
    this fine, but not before memblock resizing is enabled, which we can
    only do after paging_init(), when the memory we reallocate the array
    into is actually mapped.

    So break out the memreserve table processing into a separate routine
    and call it after paging_init() on arm64. On ARM, because of limited
    reviewing bandwidth of the maintainer, we cannot currently fix this,
    so instead, disable the EFI persistent memreserve entirely on ARM so
    we can fix it later.

    Tested-by: Marc Zyngier
    Signed-off-by: Ard Biesheuvel
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20181114175544.12860-5-ard.biesheuvel@linaro.org
    Signed-off-by: Ingo Molnar

    Ard Biesheuvel
     
  • Commit 4c2de74cc869 ("powerpc/64: Interrupts save PPR on stack rather
    than thread_struct") changed sizeof(struct pt_regs) % 16 from 0 to 8,
    which causes the interrupt frame allocation on kernel entry to put the
    kernel stack out of alignment.

    Quadword (16-byte) alignment for the stack is required by both the
    64-bit v1 ABI (v1.9 § 3.2.2) and the 64-bit v2 ABI (v1.1 § 2.2.2.1).

    Add a pad field to fix alignment, and add a BUILD_BUG_ON to catch this
    in future.

    Fixes: 4c2de74cc869 ("powerpc/64: Interrupts save PPR on stack rather than thread_struct")
    Signed-off-by: Nicholas Piggin
    Signed-off-by: Michael Ellerman

    Nicholas Piggin
     
  • …l/git/palmer/riscv-linux

    Pull RISC-V fixes from Palmer Dabbelt:
    "This contains a few patches that fix various issues in the RISC-V
    port:

    - enable printk timestamps in the RISC-V defconfig.

    - a whitespace fix to "struct pt_regs".

    - add a "vdso_install" target for RISC-V.

    - a pair of build fixes: one to fix a typo in our makefile, and one
    to clean up some warnings.

    There will probably be more patches from us for 4.20, but I don't have
    anything that's ready to go right now so I'm going to hold off a bit.

    Right now the only concrete thing I know I want to make sure gets
    sorted out is our 32-bit stat interface, which I don't want sitting in
    limbo for another cycle as we have to get RV32I glibc sone"

    * tag 'riscv-for-linus-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux:
    RISC-V: Silence some module warnings on 32-bit
    RISC-V: lib: Fix build error for 64-bit
    riscv: add missing vdso_install target
    riscv: fix spacing in struct pt_regs
    RISC-V: defconfig: Enable printk timestamps

    Linus Torvalds
     
  • Pull parisc fix from Helge Deller:
    "Revert one patch which changed how spinlocks get released. It breaks
    the rwlock implementation in glibc"

    * 'parisc-4.20-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Revert "Release spinlocks using ordered store"

    Linus Torvalds
     
  • Pull ARM fix from Russell King:
    "It was noticed that one of Julien's patches contained an error, this
    fixes that up"

    * 'spectre' of git://git.armlinux.org.uk/~rmk/linux-arm:
    ARM: 8810/1: vfp: Fix wrong assignement to ufp_exc

    Linus Torvalds
     

14 Nov, 2018

2 commits

  • The bootloader may pass physical address of the boot parameters structure
    to the MMUv3 kernel in the register a2. Code in the _SetupMMU block in
    the arch/xtensa/kernel/head.S is supposed to map that physical address to
    the virtual address in the configured virtual memory layout.

    This code haven't been updated when additional 256+256 and 512+512
    memory layouts were introduced and it may produce wrong addresses when
    used with these layouts.

    Cc: stable@vger.kernel.org
    Signed-off-by: Max Filippov

    Max Filippov
     
  • When VPHN function is not supported and during cpu hotplug event,
    kernel prints message 'VPHN function not supported. Disabling
    polling...'. Currently it prints on every hotplug event, it floods
    dmesg when a KVM guest tries to hotplug huge number of vcpus, let's
    just print once and suppress further kernel prints.

    Signed-off-by: Satheesh Rajendran
    Signed-off-by: Michael Ellerman

    Satheesh Rajendran
     

13 Nov, 2018

5 commits

  • Fixes:

    arch/riscv/kernel/module.c: In function 'apply_r_riscv_32_rela':
    ./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=]
    arch/riscv/kernel/module.c:23:27: note: format string is defined here
    arch/riscv/kernel/module.c: In function 'apply_r_riscv_pcrel_hi20_rela':
    ./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=]
    arch/riscv/kernel/module.c:104:23: note: format string is defined here
    arch/riscv/kernel/module.c: In function 'apply_r_riscv_hi20_rela':
    ./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=]
    arch/riscv/kernel/module.c:146:23: note: format string is defined here
    arch/riscv/kernel/module.c: In function 'apply_r_riscv_got_hi20_rela':
    ./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=]
    arch/riscv/kernel/module.c:190:60: note: format string is defined here
    arch/riscv/kernel/module.c: In function 'apply_r_riscv_call_plt_rela':
    ./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=]
    arch/riscv/kernel/module.c:214:24: note: format string is defined here
    arch/riscv/kernel/module.c: In function 'apply_r_riscv_call_rela':
    ./include/linux/kern_levels.h:5:18: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'Elf32_Addr' {aka 'unsigned int'} [-Wformat=]
    arch/riscv/kernel/module.c:236:23: note: format string is defined here

    Signed-off-by: Olof Johansson
    Signed-off-by: Palmer Dabbelt

    Olof Johansson
     
  • Fixes the following build error from tinyconfig:

    riscv64-unknown-linux-gnu-ld: kernel/sched/fair.o: in function `.L8':
    fair.c:(.text+0x70): undefined reference to `__lshrti3'
    riscv64-unknown-linux-gnu-ld: kernel/time/clocksource.o: in function `.L0 ':
    clocksource.c:(.text+0x334): undefined reference to `__lshrti3'

    Fixes: 7f47c73b355f ("RISC-V: Build tishift only on 64-bit")
    Signed-off-by: Olof Johansson
    Signed-off-by: Palmer Dabbelt

    Olof Johansson
     
  • Building kernel 4.20 for Fedora as RPM fails, because riscv is missing
    vdso_install target in arch/riscv/Makefile.

    Signed-off-by: David Abdurachmanov
    Signed-off-by: Palmer Dabbelt

    David Abdurachmanov
     
  • Replace 8 spaces with tab to match styling.

    Signed-off-by: David Abdurachmanov
    Signed-off-by: Palmer Dabbelt

    David Abdurachmanov
     
  • The printk timestamps are very useful information to visually see
    where kernel is spending time during boot. It also helps us see
    the timing of hotplug events at runtime.

    This patch enables printk timestamps in RISC-V defconfig so that
    we have it enabled by default (similar to other architectures
    such as x86_64, arm64, etc).

    Signed-off-by: Anup Patel
    Acked-by: Olof Johansson
    Signed-off-by: Palmer Dabbelt

    Anup Patel
     

12 Nov, 2018

13 commits

  • In big.Little systems, some CPUs require the Spectre workarounds in
    paths such as the context switch, but other CPUs do not. In order
    to handle these differences, we need per-CPU vtables.

    We are unable to use the kernel's per-CPU variables to support this
    as per-CPU is not initialised at times when we need access to the
    vtables, so we have to use an array indexed by logical CPU number.

    We use an array-of-pointers to avoid having function pointers in
    the kernel's read/write .data section.

    Reviewed-by: Julien Thierry
    Signed-off-by: Russell King

    Russell King
     
  • In vfp_preserve_user_clear_hwstate, ufp_exc->fpinst2 gets assigned to
    itself. It should actually be hwstate->fpinst2 that gets assigned to the
    ufp_exc field.

    Fixes commit 3aa2df6ec2ca6bc143a65351cca4266d03a8bc41 ("ARM: 8791/1:
    vfp: use __copy_to_user() when saving VFP state").

    Reported-by: David Binderman
    Signed-off-by: Julien Thierry
    Signed-off-by: Russell King

    Julien Thierry
     
  • Allow the way we access members of the processor vtable to be changed
    at compile time. We will need to move to per-CPU vtables to fix the
    Spectre variant 2 issues on big.Little systems.

    However, we have a couple of calls that do not need the vtable
    treatment, and indeed cause a kernel warning due to the (later) use
    of smp_processor_id(), so also introduce the PROC_TABLE macro for
    these which always use CPU 0's function pointers.

    Reviewed-by: Julien Thierry
    Signed-off-by: Russell King

    Russell King
     
  • Call the per-processor type check_bugs() method in the same way as we
    do other per-processor functions - move the "processor." detail into
    proc-fns.h.

    Reviewed-by: Julien Thierry
    Signed-off-by: Russell King

    Russell King
     
  • Split out the lookup of the processor type and associated error handling
    from the rest of setup_processor() - we will need to use this in the
    secondary CPU bringup path for big.Little Spectre variant 2 mitigation.

    Reviewed-by: Julien Thierry
    Signed-off-by: Russell King

    Russell King
     
  • Move lookup_processor_type() out of the __init section so it is callable
    from (eg) the secondary startup code during hotplug.

    Reviewed-by: Julien Thierry
    Signed-off-by: Russell King

    Russell King
     
  • The DSS DT node contains children that describe the DSS components
    (DISPC and internal encoders). Each of those components is handled by a
    platform driver, and thus needs to be backed by a platform device.

    The corresponding platform devices are created in mach-omap2 code by a
    call to of_platform_populate(). While this approach has worked so far,
    it doesn't model the hardware architecture very well, as it creates
    child devices before the parent is ready to handle them. This would be
    akin to creating I2C slaves before the I2C master is available.

    The task can be easily performed in the omapdss driver code instead,
    simplifying mach-omap2 code. We however can't remove the mach-omap2 code
    completely as the omap2fb driver still depends on it, but we can move it
    to the omap2fb-specific section, where it can stay until the omap2fb
    driver gets removed.

    This has the added benefit of not allowing DSS components to probe
    before the DSS itself, which led to runtime PM issues when the DSS probe
    is deferred.

    Fixes: 27d624527d99 ("drm/omap: dss: Acquire next dssdev at probe time")
    Signed-off-by: Laurent Pinchart
    Acked-by: Tony Lindgren
    Reviewed-by: Sebastian Reichel
    Signed-off-by: Tomi Valkeinen
    Link: https://patchwork.freedesktop.org/patch/msgid/20181110111654.4387-2-laurent.pinchart@ideasonboard.com

    Laurent Pinchart
     
  • Coffee Lake has 8 core products which has 8 Cboxes. The 8th CBOX is
    mapped into different MSR space.

    Increase the num_boxes to 8 to handle the new products. It will not
    impact the previous platforms, SkyLake, KabyLake and earlier CoffeeLake.
    Because the num_boxes will be recalculated in uncore_cpu_init and
    doesn't exceed the x86_max_cores.

    Introduce a new box flag bit to indicate the 8th CBOX.

    Signed-off-by: Kan Liang
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Alexander Shishkin
    Cc: Arnaldo Carvalho de Melo
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Thomas Gleixner
    Cc: Vince Weaver
    Link: http://lkml.kernel.org/r/20181019170419.378-2-kan.liang@linux.intel.com
    Signed-off-by: Ingo Molnar

    Kan Liang
     
  • KabyLake and CoffeeLake CPUs have the same client uncore events as SkyLake.

    Add the PCI IDs for the KabyLake Y, U, S processor lines and CoffeeLake U,
    H, S processor lines.

    Signed-off-by: Kan Liang
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Alexander Shishkin
    Cc: Arnaldo Carvalho de Melo
    Cc: Jiri Olsa
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Thomas Gleixner
    Cc: Vince Weaver
    Link: http://lkml.kernel.org/r/20181019170419.378-1-kan.liang@linux.intel.com
    Signed-off-by: Ingo Molnar

    Kan Liang
     
  • Back in 2006 Ben added some workarounds for a misbehaviour in the
    Spider IO bridge used on early Cell machines, see commit
    014da7ff47b5 ("[POWERPC] Cell "Spider" MMIO workarounds"). Later these
    were made to be generic, ie. not tied specifically to Spider.

    The code stashes a token in the high bits (59-48) of virtual addresses
    used for IO (eg. returned from ioremap()). This works fine when using
    the Hash MMU, but when we're using the Radix MMU the bits used for the
    token overlap with some of the bits of the virtual address.

    This is because the maximum virtual address is larger with Radix, up
    to c00fffffffffffff, and in fact we use that high part of the address
    range for ioremap(), see RADIX_KERN_IO_START.

    As it happens the bits that are used overlap with the bits that
    differentiate an IO address vs a linear map address. If the resulting
    address lies outside the linear mapping we will crash (see below), if
    not we just corrupt memory.

    virtio-pci 0000:00:00.0: Using 64-bit direct DMA at offset 800000000000000
    Unable to handle kernel paging request for data at address 0xc000000080000014
    ...
    CFAR: c000000000626b98 DAR: c000000080000014 DSISR: 42000000 IRQMASK: 0
    GPR00: c0000000006c54fc c00000003e523378 c0000000016de600 0000000000000000
    GPR04: c00c000080000014 0000000000000007 0fffffff000affff 0000000000000030
    ^^^^
    ...
    NIP [c000000000626c5c] .iowrite8+0xec/0x100
    LR [c0000000006c992c] .vp_reset+0x2c/0x90
    Call Trace:
    .pci_bus_read_config_dword+0xc4/0x120 (unreliable)
    .register_virtio_device+0x13c/0x1c0
    .virtio_pci_probe+0x148/0x1f0
    .local_pci_probe+0x68/0x140
    .pci_device_probe+0x164/0x220
    .really_probe+0x274/0x3b0
    .driver_probe_device+0x80/0x170
    .__driver_attach+0x14c/0x150
    .bus_for_each_dev+0xb8/0x130
    .driver_attach+0x34/0x50
    .bus_add_driver+0x178/0x2f0
    .driver_register+0x90/0x1a0
    .__pci_register_driver+0x6c/0x90
    .virtio_pci_driver_init+0x2c/0x40
    .do_one_initcall+0x64/0x280
    .kernel_init_freeable+0x36c/0x474
    .kernel_init+0x24/0x160
    .ret_from_kernel_thread+0x58/0x7c

    This hasn't been a problem because CONFIG_PPC_IO_WORKAROUNDS which
    enables this code is usually not enabled. It is only enabled when it's
    selected by PPC_CELL_NATIVE which is only selected by
    PPC_IBM_CELL_BLADE and that in turn depends on BIG_ENDIAN. So in order
    to hit the bug you need to build a big endian kernel, with IBM Cell
    Blade support enabled, as well as Radix MMU support, and then boot
    that on Power9 using Radix MMU.

    Still we can fix the bug, so let's do that. We simply use fewer bits
    for the token, taking the union of the restrictions on the address
    from both Hash and Radix, we end up with 8 bits we can use for the
    token. The only user of the token is iowa_mem_find_bus() which only
    supports 8 token values, so 8 bits is plenty for that.

    Fixes: 566ca99af026 ("powerpc/mm/radix: Add dummy radix_enabled()")
    Signed-off-by: Michael Ellerman

    Michael Ellerman
     
  • With preempt enabled we see warnings in do_slb_fault():

    BUG: using smp_processor_id() in preemptible [00000000] code: kworker/u33:0/98
    futex hash table entries: 4096 (order: 3, 524288 bytes)
    caller is do_slb_fault+0x204/0x230
    CPU: 5 PID: 98 Comm: kworker/u33:0 Not tainted 4.19.0-rc3-gcc-7.3.1-00022-g1936f094e164 #138
    Call Trace:
    dump_stack+0xb4/0x104 (unreliable)
    check_preemption_disabled+0x148/0x150
    do_slb_fault+0x204/0x230
    data_access_slb_common+0x138/0x180

    This is caused by the get_paca() in slb_allocate_kernel(), which
    includes a call to debug_smp_processor_id().

    slb_allocate_kernel() can only be called from do_slb_fault(), and in
    that path interrupts are hard disabled and so we can't be preempted,
    but we can't update the preempt flags (in thread_info) because that
    could cause an SLB fault.

    So just use local_paca which is safe and doesn't cause the warning.

    Fixes: 48e7b7695745 ("powerpc/64s/hash: Convert SLB miss handlers to C")
    Signed-off-by: Michael Ellerman

    Michael Ellerman
     
  • Pull x86 fixes from Thomas Gleixner:
    "A set of x86 fixes:

    - Cure the LDT remapping to user space on 5 level paging which ended
    up in the KASLR space

    - Remove LDT mapping before freeing the LDT pages

    - Make NFIT MCE handling more robust

    - Unbreak the VSMP build by removing the dependency on paravirt ops

    - Support broken PIT emulation on Microsoft hyperV

    - Don't trace vmware_sched_clock() to avoid tracer recursion

    - Remove -pipe from KBUILD CFLAGS which breaks clang and is also
    slower on GCC

    - Trivial coding style and typo fixes"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/cpu/vmware: Do not trace vmware_sched_clock()
    x86/vsmp: Remove dependency on pv_irq_ops
    x86/ldt: Remove unused variable in map_ldt_struct()
    x86/ldt: Unmap PTEs for the slot before freeing LDT pages
    x86/mm: Move LDT remap out of KASLR region on 5-level paging
    acpi/nfit, x86/mce: Validate a MCE's address before using it
    acpi/nfit, x86/mce: Handle only uncorrectable machine checks
    x86/build: Remove -pipe from KBUILD_CFLAGS
    x86/hyper-v: Fix indentation in hv_do_fast_hypercall16()
    Documentation/x86: Fix typo in zero-page.txt
    x86/hyper-v: Enable PIT shutdown quirk
    clockevents/drivers/i8253: Add support for PIT shutdown quirk

    Linus Torvalds
     
  • Pull locking build fix from Thomas Gleixner:
    "A single fix for a build fail with CONFIG_PROFILE_ALL_BRANCHES=y in
    the qspinlock code"

    * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/qspinlock: Fix compile error

    Linus Torvalds
     

11 Nov, 2018

1 commit

  • Pull tty/serial fixes from Greg KH:
    "Here are some small tty fixes for 4.20-rc2

    One of these missed the original 4.19-final release, I missed that I
    hadn't done a pull request for it as it was in linux-next and my
    branch for a long time, that's my fault.

    The others are small, fixing some reported issues and finally fixing
    the termios mess for alpha so that glibc has a chance to implement
    some missing functionality that has been pending for many years now.

    All of these have been in linux-next with no reported issues"

    * tag 'tty-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
    serial: sh-sci: Fix could not remove dev_attr_rx_fifo_timeout
    arch/alpha, termios: implement BOTHER, IBSHIFT and termios2
    termios, tty/tty_baudrate.c: fix buffer overrun
    vt: fix broken display when running aptitude
    serial: sh-sci: Fix receive on SCIFA/SCIFB variants with DMA

    Linus Torvalds
     

10 Nov, 2018

5 commits

  • Pull xen fixes from Juergen Gross:
    "Several fixes, mostly for rather recent regressions when running under
    Xen"

    * tag 'for-linus-4.20a-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    xen: remove size limit of privcmd-buf mapping interface
    xen: fix xen_qlock_wait()
    x86/xen: fix pv boot
    xen-blkfront: fix kernel panic with negotiate_mq error path
    xen/grant-table: Fix incorrect gnttab_dma_free_pages() pr_debug message
    CONFIG_XEN_PV breaks xen_create_contiguous_region on ARM

    Linus Torvalds
     
  • Pull arm64 fixes from Catalin Marinas:

    - Fix occasional page fault during boot due to memblock resizing before
    the linear map is up.

    - Define NET_IP_ALIGN to 0 to improve the DMA performance on some
    platforms.

    - lib/raid6 test build fix.

    - .mailmap update for Punit Agrawal

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: memblock: don't permit memblock resizing until linear mapping is up
    arm64: mm: define NET_IP_ALIGN to 0
    lib/raid6: Fix arm64 test build
    mailmap: Update email for Punit Agrawal

    Linus Torvalds
     
  • Pull block layer fixes from Jens Axboe:

    - Two fixes for an ubd regression, one for missing locking, and one for
    a missing initialization of a field. The latter was an old latent
    bug, but it's now visible and triggers (Me, Anton Ivanov)

    - Set of NVMe fixes via Christoph, but applied manually due to a git
    tree mixup (Christoph, Sagi)

    - Fix for a discard split regression, in three patches (Ming)

    - Update libata git trees (Geert)

    - SPDX identifier for sata_rcar (Kuninori Morimoto)

    - Virtual boundary merge fix (Johannes)

    - Preemptively clear memory we are going to pass to userspace, in case
    the driver does a short read (Keith)

    * tag 'for-linus-20181109' of git://git.kernel.dk/linux-block:
    block: make sure writesame bio is aligned with logical block size
    block: cleanup __blkdev_issue_discard()
    block: make sure discard bio is aligned with logical block size
    Revert "nvmet-rdma: use a private workqueue for delete"
    nvme: make sure ns head inherits underlying device limits
    nvmet: don't try to add ns to p2p map unless it actually uses it
    sata_rcar: convert to SPDX identifiers
    ubd: fix missing initialization of io_req
    block: Clear kernel memory before copying to user
    MAINTAINERS: Fix remaining pointers to obsolete libata.git
    ubd: fix missing lock around request issue
    block: respect virtual boundary mask in bvecs

    Linus Torvalds
     
  • Pull MIPS fixes from Paul Burton:
    "A couple of small MIPS fixes for 4.20:

    - Extend an array to avoid overruns on some Octeon hardware, fixing a
    bug introduced in 4.3.

    - Fix a coherent DMA regression for systems without cache-coherent
    DMA introduced in the 4.20 merge window"

    * tag 'mips_fixes_4.20_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
    MIPS: Fix `dma_alloc_coherent' returning a non-coherent allocation
    MIPS: OCTEON: fix out of bounds array access on CN68XX

    Linus Torvalds
     
  • When running function tracing on a Linux guest running on VMware
    Workstation, the guest would crash. This is due to tracing of the
    sched_clock internal call of the VMware vmware_sched_clock(), which
    causes an infinite recursion within the tracing code (clock calls must
    not be traced).

    Make vmware_sched_clock() not traced by ftrace.

    Fixes: 80e9a4f21fd7c ("x86/vmware: Add paravirt sched clock")
    Reported-by: GwanYeong Kim
    Signed-off-by: Steven Rostedt (VMware)
    Signed-off-by: Borislav Petkov
    CC: Alok Kataria
    CC: GwanYeong Kim
    CC: "H. Peter Anvin"
    CC: Ingo Molnar
    Cc: stable@vger.kernel.org
    CC: Thomas Gleixner
    CC: virtualization@lists.linux-foundation.org
    CC: x86-ml
    Link: http://lkml.kernel.org/r/20181109152207.4d3e7d70@gandalf.local.home

    Steven Rostedt (VMware)
     

09 Nov, 2018

2 commits

  • Commit a856531951dc80 ("xen: make xen_qlock_wait() nestable")
    introduced a regression for Xen guests running fully virtualized
    (HVM or PVH mode). The Xen hypervisor wouldn't return from the poll
    hypercall with interrupts disabled in case of an interrupt (for PV
    guests it does).

    So instead of disabling interrupts in xen_qlock_wait() use a nesting
    counter to avoid calling xen_clear_irq_pending() in case
    xen_qlock_wait() is nested.

    Fixes: a856531951dc80 ("xen: make xen_qlock_wait() nestable")
    Cc: stable@vger.kernel.org
    Reported-by: Sander Eikelenboom
    Signed-off-by: Juergen Gross
    Reviewed-by: Boris Ostrovsky
    Tested-by: Sander Eikelenboom
    Signed-off-by: Juergen Gross

    Juergen Gross
     
  • Pull s390 fixes from Martin Schwidefsky:

    - A fix for the pgtable_bytes misaccounting on s390. The patch changes
    common code part in regard to page table folding and adds extra
    checks to mm_[inc|dec]_nr_[pmds|puds].

    - Add FORCE for all build targets using if_changed

    - Use non-loadable phdr for the .vmlinux.info section to avoid a
    segment overlap that confuses kexec

    - Cleanup the attribute definition for the diagnostic sampling

    - Increase stack size for CONFIG_KASAN=y builds

    - Export __node_distance to fix a build error

    - Correct return code of a PMU event init function

    - An update for the default configs

    * tag 's390-4.20-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390/perf: Change CPUM_CF return code in event init function
    s390: update defconfigs
    s390/mm: Fix ERROR: "__node_distance" undefined!
    s390/kasan: increase instrumented stack size to 64k
    s390/cpum_sf: Rework attribute definition for diagnostic sampling
    s390/mm: fix mis-accounting of pgtable_bytes
    mm: add mm_pxd_folded checks to pgtable_bytes accounting functions
    mm: introduce mm_[p4d|pud|pmd]_folded
    mm: make the __PAGETABLE_PxD_FOLDED defines non-empty
    s390: avoid vmlinux segments overlap
    s390/vdso: add missing FORCE to build targets
    s390/decompressor: add missing FORCE to build targets

    Linus Torvalds