08 Oct, 2016

3 commits


06 Oct, 2016

2 commits


01 Oct, 2016

5 commits

  • In preparation for enabling multiple namespaces per pmem region, convert
    the label tracking to use a linked list. In particular this will allow
    select_pmem_id() to move labels from the unvalidated state to the
    validated state. Currently we only track one validated set per-region.

    Signed-off-by: Dan Williams

    Dan Williams
     
  • Before we add more libnvdimm-private fields to nd_mapping make it clear
    which parameters are input vs libnvdimm internals. Use struct
    nd_mapping_desc instead of struct nd_mapping in nd_region_desc and make
    struct nd_mapping private to libnvdimm.

    Signed-off-by: Dan Williams

    Dan Williams
     
  • nvdimm_clear_poison cleared the user-visible badblocks, and sent
    commands to the NVDIMM to clear the areas marked as 'poison', but it
    neglected to clear the same areas from the internal poison_list which is
    used to marshal ARS results before sorting them by namespace. As a
    result, once on-demand ARS functionality was added:

    37b137f nfit, libnvdimm: allow an ARS scrub to be triggered on demand

    A scrub triggered from either sysfs or an MCE was found to be adding
    stale entries that had been cleared from gendisk->badblocks, but were
    still present in nvdimm_bus->poison_list. Additionally, the stale entries
    could be triggered into producing stale disk->badblocks by simply disabling
    and re-enabling the namespace or region.

    This adds the missing step of clearing poison_list entries when clearing
    poison, so that it is always in sync with badblocks.

    Fixes: 37b137f ("nfit, libnvdimm: allow an ARS scrub to be triggered on demand")
    Signed-off-by: Vishal Verma
    Signed-off-by: Dan Williams

    Vishal Verma
     
  • pmem_do_bvec used to kmap_atomic at the begin, and only unmap at the
    end. Things like nvdimm_clear_poison may want to do nvdimm subsystem
    bookkeeping operations that may involve taking locks or doing memory
    allocations, and we can't do that from the atomic context. Reduce the
    atomic context to just what needs it - the memcpy to/from pmem.

    Cc: Ross Zwisler
    Signed-off-by: Vishal Verma
    Signed-off-by: Dan Williams

    Vishal Verma
     
  • Starting a full Address Range Scrub (ARS) on hitting a memory error
    machine check exception may not always be desirable. Provide a way
    through sysfs to toggle the behavior between just adding the address
    (cache line) where the MCE happened to the poison list and doing a full
    scrub. The former (selective insertion of the address) is done
    unconditionally.

    Cc: linux-acpi@vger.kernel.org
    Cc: Linda Knippers
    Cc: Rafael J. Wysocki
    Signed-off-by: Vishal Verma
    Signed-off-by: Dan Williams

    Vishal Verma
     

22 Sep, 2016

3 commits


02 Sep, 2016

3 commits


30 Aug, 2016

1 commit

  • Per "ACPI 6.1 Section 9.20.3" NVDIMM devices, children of the ACPI0012
    NVDIMM Root device, can receive health event notifications.

    Given that these devices are precluded from registering a notification
    handler via acpi_driver.acpi_device_ops (due to no _HID), we use
    acpi_install_notify_handler() directly. The registered handler,
    acpi_nvdimm_notify(), triggers a poll(2) event on the nmemX/nfit/flags
    sysfs attribute when a health event notification is received.

    Cc: Rafael J. Wysocki
    Tested-by: Toshi Kani
    Reviewed-by: Vishal Verma
    Acked-by: Rafael J. Wysocki
    Reviewed-by: Toshi Kani
    Signed-off-by: Dan Williams

    Dan Williams
     

23 Aug, 2016

2 commits

  • We have had a couple bugs in this implementation in the past and before
    we add another ->notify() implementation for nvdimm devices, lets allow
    this routine to be exercised via nfit_test.

    Rewrite acpi_nfit_notify() in terms of a generic struct device and
    acpi_handle parameter, and then implement a mock acpi_evaluate_object()
    that returns a _FIT payload.

    Cc: Vishal Verma
    Reviewed-by: Vishal Verma
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Dan Williams

    Dan Williams
     
  • Commit 209851649dc4 "acpi: nfit: Add support for hot-add" added
    support for _FIT notifications, but it neglected to verify the
    notification event code matches the one in the ACPI spec for
    "NFIT Update". Currently there is only one code in the spec, but
    once additional codes are added, older kernels (without this fix)
    will misbehave by assuming all event notifications are for an
    NFIT Update.

    Fixes: 209851649dc4 ("acpi: nfit: Add support for hot-add")
    Cc:
    Cc:
    Cc: Dan Williams
    Reported-by: Linda Knippers
    Signed-off-by: Vishal Verma
    Signed-off-by: Dan Williams

    Vishal Verma
     

16 Aug, 2016

1 commit

  • "NVDIMM DSM Interface Example" v1.2 made an incompatible change to the
    layout of function1 "SMART and Health Info". While the kernel does not
    directly consume this payload, it does define it in ndctl.h that
    userpace utilities consume.

    Reported-by: Brian Boylston
    Signed-off-by: Dan Williams

    Dan Williams
     

15 Aug, 2016

3 commits

  • Linus Torvalds
     
  • Pull thermal updates from Zhang Rui:

    - Fix a race condition when updating cooling device, which may lead to
    a situation where a thermal governor never updates the cooling
    device. From Michele Di Giorgio.

    - Fix a zero division error when disabling the forced idle injection
    from the intel powerclamp. From Petr Mladek.

    - Add suspend/resume callback for intel_pch_thermal thermal driver.
    From Srinivas Pandruvada.

    - Another two fixes for clocking cooling driver and hwmon sysfs I/F.
    From Michele Di Giorgio and Kuninori Morimoto.

    [ Hmm. That suspend/resume callback for intel_pch_thermal doesn't look
    like a fix, but I'm letting it slide.. - Linus ]

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
    thermal: clock_cooling: Fix missing mutex_init()
    thermal: hwmon: EXPORT_SYMBOL_GPL for thermal hwmon sysfs
    thermal: fix race condition when updating cooling device
    thermal/powerclamp: Prevent division by zero when counting interval
    thermal: intel_pch_thermal: Add suspend/resume callback

    Linus Torvalds
     
  • Pull m68knommu fix from Greg Ungerer:
    "This contains only a single fix for a register corruption problem on
    certain types of m68k flat format binaries"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
    m68knommu: fix user a5 register being overwritten

    Linus Torvalds
     

14 Aug, 2016

4 commits

  • …/groeck/linux-staging

    Pull h8300 and unicore32 architecture fixes from Guenter Roeck:
    "Two patches to fix h8300 and unicore32 builds.

    unicore32 builds have been broken since v4.6. The fix has been
    available in -next since March of this year.

    h8300 builds have been broken since the last commit window. The fix
    has been available in -next since June of this year"

    * tag 'fixes-for-linus-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
    h8300: Add missing include file to asm/io.h
    unicore32: mm: Add missing parameter to arch_vma_access_permitted

    Linus Torvalds
     
  • Pull arm64 fixes from Catalin Marinas:

    - support for nr_cpus= command line argument (maxcpus was previously
    changed to allow secondary CPUs to be hot-plugged)

    - ARM PMU interrupt handling fix

    - fix potential TLB conflict in the hibernate code

    - improved handling of EL1 instruction aborts (better error reporting)

    - removal of useless jprobes code for stack saving/restoring

    - defconfig updates

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: defconfig: enable CONFIG_LOCALVERSION_AUTO
    arm64: defconfig: add options for virtualization and containers
    arm64: hibernate: handle allocation failures
    arm64: hibernate: avoid potential TLB conflict
    arm64: Handle el1 synchronous instruction aborts cleanly
    arm64: Remove stack duplicating code from jprobes
    drivers/perf: arm-pmu: Fix handling of SPI lacking "interrupt-affinity" property
    drivers/perf: arm-pmu: convert arm_pmu_mutex to spinlock
    arm64: Support hard limit of cpu count by nr_cpus

    Linus Torvalds
     
  • Pull KVM fixes from Radim Krčmář:
    "KVM:
    - lock kvm_device list to prevent corruption on device creation.

    PPC:
    - split debugfs initialization from creation of the xics device to
    unlock the newly taken kvm lock earlier.

    s390:
    - prevent userspace from triggering two WARN_ON_ONCE.

    MIPS:
    - fix several issues in the management of TLB faults (Cc: stable)"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    MIPS: KVM: Propagate kseg0/mapped tlb fault errors
    MIPS: KVM: Fix gfn range check in kseg0 tlb faults
    MIPS: KVM: Add missing gfn range check
    MIPS: KVM: Fix mapped fault broken commpage handling
    KVM: Protect device ops->create and list_add with kvm->lock
    KVM: PPC: Move xics_debugfs_init out of create
    KVM: s390: reset KVM_REQ_MMU_RELOAD if mapping the prefix failed
    KVM: s390: set the prefix initially properly

    Linus Torvalds
     
  • Pull block fixes from Jens Axboe:

    - an NVMe fix from Gabriel, fixing a suspend/resume issue on some
    setups

    - addition of a few missing entries in the block queue sysfs
    documentation, from Joe

    - a fix for a sparse shadow warning for the bvec iterator, from
    Johannes

    - a writeback deadlock involving raid issuing barriers, and not
    flushing the plug when we wakeup the flusher threads. From
    Konstantin

    - a set of patches for the NVMe target/loop/rdma code, from Roland and
    Sagi

    * 'for-linus' of git://git.kernel.dk/linux-block:
    bvec: avoid variable shadowing warning
    doc: update block/queue-sysfs.txt entries
    nvme: Suspend all queues before deletion
    mm, writeback: flush plugged IO in wakeup_flusher_threads()
    nvme-rdma: Remove unused includes
    nvme-rdma: start async event handler after reconnecting to a controller
    nvmet: Fix controller serial number inconsistency
    nvmet-rdma: Don't use the inline buffer in order to avoid allocation for small reads
    nvmet-rdma: Correctly handle RDMA device hot removal
    nvme-rdma: Make sure to shutdown the controller if we can
    nvme-loop: Remove duplicate call to nvme_remove_namespaces
    nvme-rdma: Free the I/O tags when we delete the controller
    nvme-rdma: Remove duplicate call to nvme_remove_namespaces
    nvme-rdma: Fix device removal handling
    nvme-rdma: Queue ns scanning after a sucessful reconnection
    nvme-rdma: Don't leak uninitialized memory in connect request private data

    Linus Torvalds
     

13 Aug, 2016

13 commits

  • h8300 builds fail with

    arch/h8300/include/asm/io.h:9:15: error: unknown type name ‘u8’
    arch/h8300/include/asm/io.h:15:15: error: unknown type name ‘u16’
    arch/h8300/include/asm/io.h:21:15: error: unknown type name ‘u32’

    and many related errors.

    Fixes: 23c82d41bdf4 ("kexec-allow-architectures-to-override-boot-mapping-fix")
    Cc: Andrew Morton
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • unicore32 fails to compile with the following errors.

    mm/memory.c: In function ‘__handle_mm_fault’:
    mm/memory.c:3381: error:
    too many arguments to function ‘arch_vma_access_permitted’
    mm/gup.c: In function ‘check_vma_flags’:
    mm/gup.c:456: error:
    too many arguments to function ‘arch_vma_access_permitted’
    mm/gup.c: In function ‘vma_permits_fault’:
    mm/gup.c:640: error:
    too many arguments to function ‘arch_vma_access_permitted’

    Fixes: d61172b4b695b ("mm/core, x86/mm/pkeys: Differentiate instruction fetches")
    Cc: Dave Hansen
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Signed-off-by: Guenter Roeck
    Acked-by: Guan Xuetao

    Guenter Roeck
     
  • Pull VFIO fix from Alex Williamson:
    "Fix oops when dereferencing empty data (Alex Williamson)"

    * tag 'vfio-v4.8-rc2' of git://github.com/awilliam/linux-vfio:
    vfio/pci: Fix NULL pointer oops in error interrupt setup handling

    Linus Torvalds
     
  • Pull nfsd fixes from Bruce Fields:
    "Fixes for the dentry refcounting leak I introduced in 4.8-rc1, and for
    races in the LOCK code which appear to go back to the big nfsd state
    lock removal from 3.17"

    * tag 'nfsd-4.8-1' of git://linux-nfs.org/~bfields/linux:
    nfsd: don't return an unhashed lock stateid after taking mutex
    nfsd: Fix race between FREE_STATEID and LOCK
    nfsd: fix dentry refcounting on create

    Linus Torvalds
     
  • Pull power management fixes from Rafael Wysocki:
    "Two hibernation fixes allowing it to work with the recently added
    randomization of the kernel identity mapping base on x86-64 and one
    cpufreq driver regression fix.

    Specifics:

    - Fix the x86 identity mapping creation helpers to avoid the
    assumption that the base address of the mapping will always be
    aligned at the PGD level, as it may be aligned at the PUD level if
    address space randomization is enabled (Rafael Wysocki).

    - Fix the hibernation core to avoid executing tracing functions
    before restoring the processor state completely during resume
    (Thomas Garnier).

    - Fix a recently introduced regression in the powernv cpufreq driver
    that causes it to crash due to an out-of-bounds array access
    (Akshay Adiga)"

    * tag 'pm-4.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    PM / hibernate: Restore processor state before using per-CPU variables
    x86/power/64: Always create temporary identity mapping correctly
    cpufreq: powernv: Fix crash in gpstate_timer_handler()

    Linus Torvalds
     
  • Pull x86 fixes from Ingo Molnar:
    "This is bigger than usual - the reason is partly a pent-up stream of
    fixes after the merge window and partly accidental. The fixes are:

    - five patches to fix a boot failure on Andy Lutomirsky's laptop
    - four SGI UV platform fixes
    - KASAN fix
    - warning fix
    - documentation update
    - swap entry definition fix
    - pkeys fix
    - irq stats fix"

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/apic/x2apic, smp/hotplug: Don't use before alloc in x2apic_cluster_probe()
    x86/efi: Allocate a trampoline if needed in efi_free_boot_services()
    x86/boot: Rework reserve_real_mode() to allow multiple tries
    x86/boot: Defer setup_real_mode() to early_initcall time
    x86/boot: Synchronize trampoline_cr4_features and mmu_cr4_features directly
    x86/boot: Run reserve_bios_regions() after we initialize the memory map
    x86/irq: Do not substract irq_tlb_count from irq_call_count
    x86/mm: Fix swap entry comment and macro
    x86/mm/kaslr: Fix -Wformat-security warning
    x86/mm/pkeys: Fix compact mode by removing protection keys' XSAVE buffer manipulation
    x86/build: Reduce the W=1 warnings noise when compiling x86 syscall tables
    x86/platform/UV: Fix kernel panic running RHEL kdump kernel on UV systems
    x86/platform/UV: Fix problem with UV4 BIOS providing incorrect PXM values
    x86/platform/UV: Fix bug with iounmap() of the UV4 EFI System Table causing a crash
    x86/platform/UV: Fix problem with UV4 Socket IDs not being contiguous
    x86/entry: Clarify the RF saving/restoring situation with SYSCALL/SYSRET
    x86/mm: Disable preemption during CR3 read+write
    x86/mm/KASLR: Increase BRK pages for KASLR memory randomization
    x86/mm/KASLR: Fix physical memory calculation on KASLR memory randomization
    x86, kasan, ftrace: Put APIC interrupt handlers into .irqentry.text

    Linus Torvalds
     
  • Pull timer fixes from Ingo Molnar:
    "Misc fixes: a /dev/rtc regression fix, two APIC timer period
    calibration fixes, an ARM clocksource driver fix and a NOHZ
    power use regression fix"

    * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/hpet: Fix /dev/rtc breakage caused by RTC cleanup
    x86/timers/apic: Inform TSC deadline clockevent device about recalibration
    x86/timers/apic: Fix imprecise timer interrupts by eliminating TSC clockevents frequency roundoff error
    timers: Fix get_next_timer_interrupt() computation
    clocksource/arm_arch_timer: Force per-CPU interrupt to be level-triggered

    Linus Torvalds
     
  • * pm-sleep:
    PM / hibernate: Restore processor state before using per-CPU variables
    x86/power/64: Always create temporary identity mapping correctly

    * pm-cpufreq:
    cpufreq: powernv: Fix crash in gpstate_timer_handler()

    Rafael J. Wysocki
     
  • Pull scheduler fixes from Ingo Molnar:
    "Misc fixes: cputime fixes, two deadline scheduler fixes and a cgroups
    scheduling fix"

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    sched/cputime: Fix omitted ticks passed in parameter
    sched/cputime: Fix steal time accounting
    sched/deadline: Fix lock pinning warning during CPU hotplug
    sched/cputime: Mitigate performance regression in times()/clock_gettime()
    sched/fair: Fix typo in sync_throttle()
    sched/deadline: Fix wrap-around in DL heap

    Linus Torvalds
     
  • Restore the processor state before calling any other functions to
    ensure per-CPU variables can be used with KASLR memory randomization.

    Tracing functions use per-CPU variables (GS based on x86) and one was
    called just before restoring the processor state fully. It resulted
    in a double fault when both the tracing & the exception handler
    functions tried to use a per-CPU variable.

    Fixes: bb3632c6101b (PM / sleep: trace events for suspend/resume)
    Reported-and-tested-by: Borislav Petkov
    Reported-by: Jiri Kosina
    Tested-by: Rafael J. Wysocki
    Tested-by: Jiri Kosina
    Signed-off-by: Thomas Garnier
    Acked-by: Pavel Machek
    Signed-off-by: Rafael J. Wysocki

    Thomas Garnier
     
  • Pull perf fixes from Ingo Molnar:
    "Mostly tooling fixes, plus two uncore-PMU fixes, an uprobes fix, a
    perf-cgroups fix and an AUX events fix"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86/intel/uncore: Add enable_box for client MSR uncore
    perf/x86/intel/uncore: Fix uncore num_counters
    uprobes/x86: Fix RIP-relative handling of EVEX-encoded instructions
    perf/core: Set cgroup in CPU contexts for new cgroup events
    perf/core: Fix sideband list-iteration vs. event ordering NULL pointer deference crash
    perf probe ppc64le: Fix probe location when using DWARF
    perf probe: Add function to post process kernel trace events
    tools: Sync cpufeatures headers with the kernel
    toops: Sync tools/include/uapi/linux/bpf.h with the kernel
    tools: Sync cpufeatures.h and vmx.h with the kernel
    perf probe: Support signedness casting
    perf stat: Avoid skew when reading events
    perf probe: Fix module name matching
    perf probe: Adjust map->reloc offset when finding kernel symbol from map
    perf hists: Trim libtraceevent trace_seq buffers
    perf script: Add 'bpf-output' field to usage message

    Linus Torvalds
     
  • nfsd4_lock will take the st_mutex before working with the stateid it
    gets, but between the time when we drop the cl_lock and take the mutex,
    the stateid could become unhashed (a'la FREE_STATEID). If that happens
    the lock stateid returned to the client will be forgotten.

    Fix this by first moving the st_mutex acquisition into
    lookup_or_create_lock_state. Then, have it check to see if the lock
    stateid is still hashed after taking the mutex. If it's not, then put
    the stateid and try the find/create again.

    Signed-off-by: Jeff Layton
    Tested-by: Alexey Kodanev
    Cc: stable@vger.kernel.org # feb9dad5 nfsd: Always lock state exclusively.
    Cc: stable@vger.kernel.org
    Signed-off-by: J. Bruce Fields

    Jeff Layton
     
  • Pull locking fixes from Ingo Molnar:
    "Misc fixes: lockstat fix, futex fix on !MMU systems, big endian fix
    for qrwlocks and a race fix for pvqspinlocks"

    * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    locking/pvqspinlock: Fix a bug in qstat_read()
    locking/pvqspinlock: Fix double hash race
    locking/qrwlock: Fix write unlock bug on big endian systems
    futex: Assume all mappings are private on !MMU systems

    Linus Torvalds