20 Jan, 2018

6 commits

  • If a dax buffer from a device that does not map pages is passed to
    read(2) or write(2) as a target for direct-I/O it triggers SIGBUS. If
    gdb attempts to examine the contents of a dax buffer from a device that
    does not map pages it triggers SIGBUS. If fork(2) is called on a process
    with a dax mapping from a device that does not map pages it triggers
    SIGBUS. 'struct page' is required otherwise several kernel code paths
    break in surprising ways. Disable filesystem-dax on devices that do not
    map pages.

    In addition to needing pfn_to_page() to be valid we also require devmap
    pages. We need this to detect dax pages in the get_user_pages_fast()
    path and so that we can stop managing the VM_MIXEDMAP flag. For DAX
    drivers that have not supported get_user_pages() to date we allow them
    to opt-in to supporting DAX with the CONFIG_FS_DAX_LIMITED configuration
    option which requires ->direct_access() to return pfn_t_special() pfns.
    This leaves DAX support in brd disabled and scheduled for removal.

    Note that when the initial dax support was being merged a few years back
    there was concern that struct page was unsuitable for use with next
    generation persistent memory devices. The theoretical concern was that
    struct page access, being such a hotly used data structure in the
    kernel, would lead to media wear out. While that was a reasonable
    conservative starting position it has not held true in practice. We have
    long since committed to using devm_memremap_pages() to support higher
    order kernel functionality that needs get_user_pages() and
    pfn_to_page().

    Cc: Jeff Moyer
    Cc: Ross Zwisler
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Reviewed-by: Jan Kara
    Reviewed-by: Christoph Hellwig
    Reviewed-by: Gerald Schaefer
    Signed-off-by: Dan Williams

    Dan Williams
     
  • Bring the ext2 filesystem in line with xfs that only warns and continues
    when the "-o dax" option is specified to mount and the backing device
    does not support dax. This is in preparation for removing dax support
    from devices that do not enable get_user_pages() operations on dax
    mappings. In other words 'gup' support is required and configurations
    that were using so called 'page-less' dax will be converted back to
    using the page cache.

    Removing the broken 'page-less' dax support is a pre-requisite for
    removing the "EXPERIMENTAL" warning when mounting a filesystem in dax
    mode.

    Reviewed-by: Jan Kara
    Signed-off-by: Dan Williams

    Dan Williams
     
  • Bring the ext4 filesystem in line with xfs that only warns and continues
    when the "-o dax" option is specified to mount and the backing device
    does not support dax. This is in preparation for removing dax support
    from devices that do not enable get_user_pages() operations on dax
    mappings. In other words 'gup' support is required and configurations
    that were using so called 'page-less' dax will be converted back to
    using the page cache.

    Removing the broken 'page-less' dax support is a pre-requisite for
    removing the "EXPERIMENTAL" warning when mounting a filesystem in dax
    mode.

    Reviewed-by: Jan Kara
    Signed-off-by: Dan Williams

    Dan Williams
     
  • In support of removing the VM_MIXEDMAP indication from DAX VMAs,
    introduce pfn_t_special() for drivers to indicate that _PAGE_SPECIAL
    should be used for DAX ptes. This also helps identify drivers like
    dccssblk that only want to use DAX in a read-only fashion without
    get_user_pages() support.

    Ideally we could delete axonram and dcssblk DAX support, but if we need
    to keep it better make it explicit that axonram and dcssblk only support
    a sub-set of DAX due to missing _PAGE_DEVMAP support.

    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Dan Williams

    Dan Williams
     
  • If devm_memremap_pages() detects a collision while adding entries
    to the radix-tree, we call pgmap_radix_release(). Unfortunately,
    the function removes *all* entries for the range -- including the
    entries that caused the collision in the first place.

    Modify pgmap_radix_release() to take an additional argument to
    indicate where to stop, so that only newly added entries are removed
    from the tree.

    Cc:
    Fixes: 9476df7d80df ("mm: introduce find_dev_pagemap()")
    Signed-off-by: Jan H. Schönherr
    Signed-off-by: Dan Williams

    Jan H. Schönherr
     
  • The functions devm_memremap_pages() and devm_memremap_pages_release() use
    different ways to calculate the section-aligned amount of memory. The
    latter function may use an incorrect size if the memory region is small
    but straddles a section border.

    Use the same code for both.

    Cc:
    Fixes: 5f29a77cd957 ("mm: fix mixed zone detection in devm_memremap_pages")
    Signed-off-by: Jan H. Schönherr
    Signed-off-by: Dan Williams

    Jan H. Schönherr
     

09 Jan, 2018

17 commits


01 Jan, 2018

16 commits

  • Linus Torvalds
     
  • Pull x86 fixes from Thomas Gleixner:
    "A couple of fixlets for x86:

    - Fix the ESPFIX double fault handling for 5-level pagetables

    - Fix the commandline parsing for 'apic=' on 32bit systems and update
    documentation

    - Make zombie stack traces reliable

    - Fix kexec with stack canary

    - Fix the delivery mode for APICs which was missed when the x86
    vector management was converted to single target delivery. Caused a
    regression due to the broken hardware which ignores affinity
    settings in lowest prio delivery mode.

    - Unbreak modules when AMD memory encryption is enabled

    - Remove an unused parameter of prepare_switch_to"

    * 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/apic: Switch all APICs to Fixed delivery mode
    x86/apic: Update the 'apic=' description of setting APIC driver
    x86/apic: Avoid wrong warning when parsing 'apic=' in X86-32 case
    x86-32: Fix kexec with stack canary (CONFIG_CC_STACKPROTECTOR)
    x86: Remove unused parameter of prepare_switch_to
    x86/stacktrace: Make zombie stack traces reliable
    x86/mm: Unbreak modules that use the DMA API
    x86/build: Make isoimage work on Debian
    x86/espfix/64: Fix espfix double-fault handling on 5-level systems

    Linus Torvalds
     
  • Pull x86 page table isolation fixes from Thomas Gleixner:
    "Four patches addressing the PTI fallout as discussed and debugged
    yesterday:

    - Remove stale and pointless TLB flush invocations from the hotplug
    code

    - Remove stale preempt_disable/enable from __native_flush_tlb()

    - Plug the memory leak in the write_ldt() error path"

    * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/ldt: Make LDT pgtable free conditional
    x86/ldt: Plug memory leak in error path
    x86/mm: Remove preempt_disable/enable() from __native_flush_tlb()
    x86/smpboot: Remove stale TLB flush invocations

    Linus Torvalds
     
  • Pull timer fixes from Thomas Gleixner:
    "A pile of fixes for long standing issues with the timer wheel and the
    NOHZ code:

    - Prevent timer base confusion accross the nohz switch, which can
    cause unlocked access and data corruption

    - Reinitialize the stale base clock on cpu hotplug to prevent subtle
    side effects including rollovers on 32bit

    - Prevent an interrupt storm when the timer softirq is already
    pending caused by tick_nohz_stop_sched_tick()

    - Move the timer start tracepoint to a place where it actually makes
    sense

    - Add documentation to timerqueue functions as they caused confusion
    several times now"

    * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    timerqueue: Document return values of timerqueue_add/del()
    timers: Invoke timer_start_debug() where it makes sense
    nohz: Prevent a timer interrupt storm in tick_nohz_stop_sched_tick()
    timers: Reinitialize per cpu bases on hotplug
    timers: Use deferrable base independent of base::nohz_active

    Linus Torvalds
     
  • Pull smp fixlet from Thomas Gleixner:
    "A trivial build warning fix for newer compilers"

    * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    cpu/hotplug: Move inline keyword at the beginning of declaration

    Linus Torvalds
     
  • Pull scheduler fixes from Thomas Gleixner:
    "Three patches addressing the fallout of the CPU_ISOLATION changes
    especially with NO_HZ_FULL plus documentation of boot parameter
    dependency"

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    sched/isolation: Document boot parameters dependency on CONFIG_CPU_ISOLATION=y
    sched/isolation: Enable CONFIG_CPU_ISOLATION=y by default
    sched/isolation: Make CONFIG_NO_HZ_FULL select CONFIG_CPU_ISOLATION

    Linus Torvalds
     
  • Pull perf fixes from Thomas Gleixner:

    - plug a memory leak in the intel pmu init code

    - clang fixes

    - tooling fix to avoid including kernel headers

    - a fix for jvmti to generate correct debug information for inlined
    code

    - replace backtick with a regular shell function

    - fix the build in hardened environments

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86/intel: Plug memory leak in intel_pmu_init()
    x86/asm: Allow again using asm.h when building for the 'bpf' clang target
    tools arch s390: Do not include header files from the kernel sources
    perf jvmti: Generate correct debug information for inlined code
    perf tools: Fix up build in hardened environments
    perf tools: Use shell function for perl cflags retrieval

    Linus Torvalds
     
  • Pull irq fixes from Thomas Gleixner:
    "A rather large update after the kaisered maintainer finally found time
    to handle regression reports.

    - The larger part addresses a regression caused by the x86 vector
    management rework.

    The reservation based model does not work reliably for MSI
    interrupts, if they cannot be masked (yes, yet another hw
    engineering trainwreck). The reason is that the reservation mode
    assigns a dummy vector when the interrupt is allocated and switches
    to a real vector when the interrupt is requested.

    If the MSI entry cannot be masked then the initialization might
    raise an interrupt before the interrupt is requested, which ends up
    as spurious interrupt and causes device malfunction and worse. The
    fix is to exclude MSI interrupts which do not support masking from
    reservation mode and assign a real vector right away.

    - Extend the extra lockdep class setup for nested interrupts with a
    class for the recently added irq_desc::request_mutex so lockdep can
    differeniate and does not emit false positive warnings.

    - A ratelimit guard for the bad irq printout so in case a bad irq
    comes back immediately the system does not drown in dmesg spam"

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    genirq/msi, x86/vector: Prevent reservation mode for non maskable MSI
    genirq/irqdomain: Rename early argument of irq_domain_activate_irq()
    x86/vector: Use IRQD_CAN_RESERVE flag
    genirq: Introduce IRQD_CAN_RESERVE flag
    genirq/msi: Handle reactivation only on success
    gpio: brcmstb: Make really use of the new lockdep class
    genirq: Guard handle_bad_irq log messages
    kernel/irq: Extend lockdep class for request mutex

    Linus Torvalds
     
  • Pull objtool fixes from Thomas Gleixner:
    "Three fixlets for objtool:

    - Address two segfaults related to missing parameter and clang
    objects

    - Make it compile clean with clang"

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    objtool: Fix seg fault with clang-compiled objects
    objtool: Fix seg fault caused by missing parameter
    objtool: Fix Clang enum conversion warning

    Linus Torvalds
     
  • Pull char/misc fixes from Greg KH:
    "Here are six small fixes of some of the char/misc drivers that have
    been sent in to resolve reported issues.

    Nothing major, a binder use-after-free fix, some thunderbolt bugfixes,
    a hyper-v bugfix, and an nvmem driver fix. All of these have been in
    linux-next with no reported issues for a while"

    * tag 'char-misc-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    nvmem: meson-mx-efuse: fix reading from an offset other than 0
    binder: fix proc->files use-after-free
    vmbus: unregister device_obj->channels_kset
    thunderbolt: Mask ring interrupt properly when polling starts
    MAINTAINERS: Add thunderbolt.rst to the Thunderbolt driver entry
    thunderbolt: Make pathname to force_power shorter

    Linus Torvalds
     
  • Pull driver core fixes from Greg KH:
    "Here are two driver core fixes for 4.15-rc6, resolving some reported
    issues.

    The first is a cacheinfo fix for DT based systems to resolve a
    reported issue that has been around for a while, and the other is to
    resolve a regression in the kobject uevent code that showed up in
    4.15-rc1.

    Both have been in linux-next for a while with no reported issues"

    * tag 'driver-core-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
    kobject: fix suppressing modalias in uevents delivered over netlink
    drivers: base: cacheinfo: fix cache type for non-architected system cache

    Linus Torvalds
     
  • Pull staging fixes from Greg KH:
    "Here are three staging driver fixes for 4.15-rc6

    The first resolves a bug in the lustre driver that came about due to a
    broken cleanup patch, due to crazy list usage in that codebase.

    The remaining two are ion driver fixes, finally getting the CMA
    interaction to work properly, resolving two regressions in that area
    of the code.

    All have been in linux-next with no reported issues for a while"

    * tag 'staging-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
    staging: android: ion: Fix dma direction for dma_sync_sg_for_cpu/device
    staging: ion: Fix ion_cma_heap allocations
    staging: lustre: lnet: Fix recent breakage from list_for_each conversion

    Linus Torvalds
     
  • Pull TTY fix from Greg KH:
    "Here is a single tty fix for a reported issue that you wrote the patch
    for :)

    It's been in linux-next for a week or so with no reported issues"

    * tag 'tty-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
    n_tty: fix EXTPROC vs ICANON interaction with TIOCINQ (aka FIONREAD)

    Linus Torvalds
     
  • Pull USB/PHY fixes from Greg KH:
    "Here are a number of small USB and PHY driver fixes for 4.15-rc6.

    Nothing major, but there are a number of regression fixes in here that
    resolve issues that have been reported a bunch. There are also the
    usual xhci fixes as well as a number of new usb serial device ids.

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

    * tag 'usb-4.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
    usb: xhci: Add XHCI_TRUST_TX_LENGTH for Renesas uPD720201
    xhci: Fix use-after-free in xhci debugfs
    xhci: Fix xhci debugfs NULL pointer dereference in resume from hibernate
    USB: serial: ftdi_sio: add id for Airbus DS P8GR
    usb: Add device quirk for Logitech HD Pro Webcam C925e
    usb: add RESET_RESUME for ELSA MicroLink 56K
    usbip: fix usbip bind writing random string after command in match_busid
    usbip: stub_rx: fix static checker warning on unnecessary checks
    usbip: prevent leaking socket pointer address in messages
    usbip: stub: stop printing kernel pointer addresses in messages
    usbip: vhci: stop printing kernel pointer addresses in messages
    USB: Fix off by one in type-specific length check of BOS SSP capability
    USB: serial: option: adding support for YUGA CLM920-NC5
    phy: rcar-gen3-usb2: select USB_COMMON
    phy: rockchip-typec: add pm_runtime_disable in err case
    phy: cpcap-usb: Fix platform_get_irq_byname's error checking.
    phy: tegra: fix device-tree node lookups
    USB: serial: qcserial: add Sierra Wireless EM7565
    USB: serial: option: add support for Telit ME910 PID 0x1101
    USB: chipidea: msm: fix ulpi-node lookup

    Linus Torvalds
     
  • The blackfin architecture has seen no maintainer action of any kind since
    April 2015. No new code, no pull requests, no acks to patches, no response
    to mails, nothing.

    The web site has an expired certificate (expiration Sep 2017, issued in
    2013), the mailing list sees no answers either, with one exception:

    https://sourceforge.net/p/adi-buildroot/mailman/adi-buildroot-devel/
    >
    > Steven is no longer working on this for ADI. Acked by me if this works. Thanks.
    >
    > Best regards,
    > Aaron Wu
    > Analog Devices Inc.

    But, Aaron doesn't seem to respond to queries either.

    Signed-off-by: Adam Borowski
    Acked-by: Linus Walleij
    Cc: Arnd Bergmann
    Signed-off-by: Linus Torvalds

    Adam Borowski
     
  • Pull sparc bugfix from David Miller.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
    sparc64: repair calling incorrect hweight function from stubs

    Linus Torvalds
     

31 Dec, 2017

1 commit