15 Mar, 2018

5 commits


14 Mar, 2018

1 commit


07 Mar, 2018

14 commits

  • The refcount.c file missed the mass-addition of the SPDX lines.

    Signed-off-by: Kees Cook
    Signed-off-by: Greg Kroah-Hartman

    Kees Cook
     
  • The LKDTM modules keep expanding, and it's getting weird to have each file
    get a prefix. Instead, move to a subdirectory for cleaner handling.

    Signed-off-by: Kees Cook
    Signed-off-by: Greg Kroah-Hartman

    Kees Cook
     
  • Use sysfs to allow supporting sub-channels. The userspace application
    makes request to host to create sub-channels and the UIO kernel
    driver populates the sysfs per-channel directory with a binary
    attribute file that can be used to read/write ring.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: Greg Kroah-Hartman

    Stephen Hemminger
     
  • Hyper-V balloon driver makes non-trivial calculations to convert Linux's
    representation of free/used memory to what Hyper-V host expects to see. Add
    a tracepoint to see what's being sent and where the data comes from.

    Signed-off-by: Vitaly Kuznetsov
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Vitaly Kuznetsov
     
  • Our num_pages_onlined accounting is buggy:
    1) In case we're offlining a memory block which was present at boot (e.g.
    when there was no hotplug at all) we subtract 32k from 0 and as
    num_pages_onlined is unsigned get a very big positive number.

    2) Commit 6df8d9aaf3af ("Drivers: hv: balloon: Correctly update onlined
    page count") made num_pages_onlined counter accurate on onlining but
    totally incorrect on offlining for partly populated regions: no matter
    how many pages were onlined and what was actually added to
    num_pages_onlined counter we always subtract the full region (32k) so
    again, num_pages_onlined can wrap around zero. By onlining/offlining
    the same partly populated region multiple times we can make the
    situation worse.

    Solve these issues by doing accurate accounting on offlining: walk HAS
    list, check for covered range and gaps.

    Fixes: 6df8d9aaf3af ("Drivers: hv: balloon: Correctly update onlined page count")
    Signed-off-by: Vitaly Kuznetsov
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Vitaly Kuznetsov
     
  • Instead of doing pfn_to_page() and continuosly casting page to unsigned
    long just cache the pfn of the page with page_to_pfn().

    Signed-off-by: Vitaly Kuznetsov
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Vitaly Kuznetsov
     
  • We have a mix of different ideas of which loglevel should be used. Unify
    on the following:
    - pr_info() for normal operation
    - pr_warn() for 'strange' host behavior
    - pr_err() for all errors.

    Signed-off-by: Vitaly Kuznetsov
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Vitaly Kuznetsov
     
  • The 2016 version of Hyper-V offers the option to operate the guest VM
    per-vcpu stimer's in Direct Mode, which means the timer interupts on its
    own vector rather than queueing a VMbus message. Direct Mode reduces
    timer processing overhead in both the hypervisor and the guest, and
    avoids having timer interrupts pollute the VMbus interrupt stream for
    the synthetic NIC and storage. This patch enables Direct Mode by
    default on stimer0 when running on a version of Hyper-V that supports
    it.

    In prep for coming support of Hyper-V on ARM64, the arch independent
    portion of the code contains calls to routines that will be populated
    on ARM64 but are not needed and do nothing on x86.

    Signed-off-by: Michael Kelley
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Michael Kelley
     
  • The comments doesn't match what the current code does, also have a
    typo. This patch corrects them.

    Signed-off-by: Haiyang Zhang
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Haiyang Zhang
     
  • The usage of strchr requires inclusion of string.h.

    Fixes: 0c38cda64aec ("tools: hv: remove unnecessary header files and netlink related code")
    Signed-off-by: Olaf Hering
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Olaf Hering
     
  • This patch fixes the below warnings with new glibc and gcc:

    hv_vss_daemon.c:100:13: warning: In the GNU C Library, "major" is defined
    by . For historical compatibility, it is currently
    defined by as well, but we plan to remove this soon.
    To use "major", include directly.

    hv_fcopy_daemon.c:42:2: note: 'snprintf' output between 2 and 1040
    bytes into a destination of size 260

    Signed-off-by: Dexuan Cui
    Cc: Stephen Hemminger
    Cc: K. Y. Srinivasan
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Dexuan Cui
     
  • Just a trivial tyop fix.

    Signed-off-by: Joe Perches
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Joe Perches
     
  • The kzalloc function is called with GFP_ATOMIC.
    But according to driver call graph, it is not in atomic context,
    namely no spinlock is held nor in an interrupt handler.

    This GFP_ATOMIC is unnecessary, and replace with GFP_KERNEL.

    Signed-off-by: Jia-Ju Bai
    Reviewed-by: Vitaly Kuznetsov
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Jia-Ju Bai
     
  • On Hyper-V the VF NIC has the same MAC as the related synthetic NIC.
    VF NIC can work under the synthetic NIC transparently, without its
    own IP address. The existing KVP daemon only gets IP from the first
    NIC matching a MAC address, and may not be able to find the IP in
    this case.

    This patch fixes the problem by searching the NIC matching the MAC,
    and having an IP address. So, the IP address will be found and
    reported to the host successfully.

    Signed-off-by: Haiyang Zhang
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    Haiyang Zhang
     

05 Mar, 2018

6 commits

  • Linus Torvalds
     
  • Pull x86 fixes from Thomas Gleixner:
    "A small set of fixes for x86:

    - Add missing instruction suffixes to assembly code so it can be
    compiled by newer GAS versions without warnings.

    - Switch refcount WARN exceptions to UD2 as we did in general

    - Make the reboot on Intel Edison platforms work

    - A small documentation update so text and sample command match"

    * 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    Documentation, x86, resctrl: Make text and sample command match
    x86/platform/intel-mid: Handle Intel Edison reboot correctly
    x86/asm: Add instruction suffixes to bitops
    x86/entry/64: Add instruction suffix
    x86/refcounts: Switch to UD2 for exceptions

    Linus Torvalds
     
  • Pull x86/pti fixes from Thomas Gleixner:
    "Three fixes related to melted spectrum:

    - Sync the cpu_entry_area page table to initial_page_table on 32 bit.

    Otherwise suspend/resume fails because resume uses
    initial_page_table and triggers a triple fault when accessing the
    cpu entry area.

    - Zero the SPEC_CTL MRS on XEN before suspend to address a
    shortcoming in the hypervisor.

    - Fix another switch table detection issue in objtool"

    * 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/cpu_entry_area: Sync cpu_entry_area to initial_page_table
    objtool: Fix another switch table detection issue
    x86/xen: Zero MSR_IA32_SPEC_CTRL before suspend

    Linus Torvalds
     
  • Pull timer fixes from Thomas Gleixner:
    "A small set of fixes from the timer departement:

    - Add a missing timer wheel clock forward when migrating timers off a
    unplugged CPU to prevent operating on a stale clock base and
    missing timer deadlines.

    - Use the proper shift count to extract data from a register value to
    prevent evaluating unrelated bits

    - Make the error return check in the FSL timer driver work correctly.
    Checking an unsigned variable for less than zero does not really
    work well.

    - Clarify the confusing comments in the ARC timer code"

    * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    timers: Forward timer base before migrating timers
    clocksource/drivers/arc_timer: Update some comments
    clocksource/drivers/mips-gic-timer: Use correct shift count to extract data
    clocksource/drivers/fsl_ftm_timer: Fix error return checking

    Linus Torvalds
     
  • Pull irq fixlet from Thomas Gleixner:
    "Just a documentation update for the missing device tree property of
    the R-Car M3N interrupt controller"

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    dt-bindings/irqchip/renesas-irqc: Document R-Car M3-N support

    Linus Torvalds
     
  • Pull btrfs fixes from David Sterba:

    - when NR_CPUS is large, a SRCU structure can significantly inflate
    size of the main filesystem structure that would not be possible to
    allocate by kmalloc, so the kvalloc fallback is used

    - improved error handling

    - fix endiannes when printing some filesystem attributes via sysfs,
    this is could happen when a filesystem is moved between different
    endianity hosts

    - send fixes: the NO_HOLE mode should not send a write operation for a
    file hole

    - fix log replay for for special files followed by file hardlinks

    - fix log replay failure after unlink and link combination

    - fix max chunk size calculation for DUP allocation

    * tag 'for-4.16-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
    Btrfs: fix log replay failure after unlink and link combination
    Btrfs: fix log replay failure after linking special file and fsync
    Btrfs: send, fix issuing write op when processing hole in no data mode
    btrfs: use proper endianness accessors for super_copy
    btrfs: alloc_chunk: fix DUP stripe size handling
    btrfs: Handle btrfs_set_extent_delalloc failure in relocate_file_extent_cluster
    btrfs: handle failure of add_pending_csums
    btrfs: use kvzalloc to allocate btrfs_fs_info

    Linus Torvalds
     

04 Mar, 2018

5 commits

  • Pull i2c fixes from Wolfram Sang:
    "A driver fix and a documentation fix (which makes dependency handling
    for the next cycle easier)"

    * 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
    i2c: octeon: Prevent error message on bus error
    dt-bindings: at24: sort manufacturers alphabetically

    Linus Torvalds
     
  • Pull libnvdimm fixes from Dan Williams:
    "A 4.16 regression fix, three fixes for -stable, and a cleanup fix:

    - During the merge window support for the new ACPI NVDIMM Platform
    Capabilities structure disabled support for "deep flush", a
    force-unit- access like mechanism for persistent memory. Restore
    that mechanism.

    - VFIO like RDMA is yet one more memory registration / pinning
    interface that is incompatible with Filesystem-DAX. Disable long
    term pins of Filesystem-DAX mappings via VFIO.

    - The Filesystem-DAX detection to prevent long terms pins mistakenly
    also disabled Device-DAX pins which are not subject to the same
    block- map collision concerns.

    - Similar to the setup path, softlockup warnings can trigger in the
    shutdown path for large persistent memory namespaces. Teach
    for_each_device_pfn() to perform cond_resched() in all cases.

    - Boaz noticed that the might_sleep() in dax_direct_access() is stale
    as of the v4.15 kernel.

    These have received a build success notification from the 0day robot,
    and the longterm pin fixes have appeared in -next. However, I recently
    rebased the tree to remove some other fixes that need to be reworked
    after review feedback.

    * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
    memremap: fix softlockup reports at teardown
    libnvdimm: re-enable deep flush for pmem devices via fsync()
    vfio: disable filesystem-dax page pinning
    dax: fix vma_is_fsdax() helper
    dax: ->direct_access does not sleep anymore

    Linus Torvalds
     
  • …masahiroy/linux-kbuild

    Pull Kbuild fixes from Masahiro Yamada:

    - suppress sparse warnings about unknown attributes

    - fix typos and stale comments

    - fix build error of arch/sh

    - fix wrong use of ld-option vs cc-ldoption

    - remove redundant GCC_PLUGINS_CFLAGS assignment

    - fix another memory leak of Kconfig

    - fix line number in error messages of Kconfig

    - do not write confusing CONFIG_DEFCONFIG_LIST out to .config

    - add xstrdup() to Kconfig to handle memory shortage errors

    - show also a Debian package name if ncurses is missing

    * tag 'kbuild-fixes-v4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    MAINTAINERS: take over Kconfig maintainership
    kconfig: fix line number in recursive inclusion error message
    Coccinelle: memdup: Fix typo in warning messages
    kconfig: Update ncurses package names for menuconfig
    kbuild/kallsyms: trivial typo fix
    kbuild: test --build-id linker flag by ld-option instead of cc-ldoption
    kbuild: drop superfluous GCC_PLUGINS_CFLAGS assignment
    kconfig: Don't leak choice names during parsing
    sh: fix build error for empty CONFIG_BUILTIN_DTB_SOURCE
    kconfig: set SYMBOL_AUTO to the symbol marked with defconfig_list
    kconfig: add xstrdup() helper
    kbuild: disable sparse warnings about unknown attributes
    Makefile: Fix lying comment re. silentoldconfig

    Linus Torvalds
     
  • Pull media fixes from Mauro Carvalho Chehab:

    - some build fixes with randconfigs

    - an m88ds3103 fix to prevent an OOPS if the chip doesn't provide the
    right version during probe (with can happen if the hardware hangs)

    - a potential out of array bounds reference in tvp5150

    - some fixes and improvements in the DVB memory mapped API (added for
    kernel 4.16)

    * tag 'media/v4.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
    media: vb2: Makefile: place vb2-trace together with vb2-core
    media: Don't let tvp5150_get_vbi() go out of vbi_ram_default array
    media: dvb: update buffer mmaped flags and frame counter
    media: dvb: add continuity error indicators for memory mapped buffers
    media: dmxdev: Fix the logic that enables DMA mmap support
    media: dmxdev: fix error code for invalid ioctls
    media: m88ds3103: don't call a non-initalized function
    media: au0828: add VIDEO_V4L2 dependency
    media: dvb: fix DVB_MMAP dependency
    media: dvb: fix DVB_MMAP symbol name
    media: videobuf2: fix build issues with vb2-trace
    media: videobuf2: Add VIDEOBUF2_V4L2 Kconfig option for VB2 V4L2 part

    Linus Torvalds
     
  • Pull watchdog fixes from Wim Van Sebroeck:

    - rave-sp: add NVMEM dependency

    - build fixes for i6300esb_wdt, xen_wdt and sp5100_tco

    * tag 'linux-watchdog-4.16-fixes-1' of git://www.linux-watchdog.org/linux-watchdog:
    watchdog: sp5100_tco.c: fix potential build failure
    watchdog: xen_wdt: fix potential build failure
    watchdog: i6300esb: fix build failure
    watchdog: rave-sp: add NVMEM dependency

    Linus Torvalds
     

03 Mar, 2018

9 commits

  • Pull KVM fixes from Radim Krčmář:
    "x86:

    - fix NULL dereference when using userspace lapic

    - optimize spectre v1 mitigations by allowing guests to use LFENCE

    - make microcode revision configurable to prevent guests from
    unnecessarily blacklisting spectre v2 mitigation feature"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
    KVM: x86: fix vcpu initialization with userspace lapic
    KVM: X86: Allow userspace to define the microcode version
    KVM: X86: Introduce kvm_get_msr_feature()
    KVM: SVM: Add MSR-based feature support for serializing LFENCE
    KVM: x86: Add a framework for supporting MSR-based features

    Linus Torvalds
     
  • The cond_resched() currently in the setup path needs to be duplicated in
    the teardown path. Rather than require each instance of
    for_each_device_pfn() to open code the same sequence, embed it in the
    helper.

    Link: https://github.com/intel/ixpdimm_sw/issues/11
    Cc: "Jérôme Glisse"
    Cc: Michal Hocko
    Cc: Christoph Hellwig
    Cc:
    Fixes: 71389703839e ("mm, zone_device: Replace {get, put}_zone_device_page()...")
    Signed-off-by: Dan Williams

    Dan Williams
     
  • Re-enable deep flush so that users always have a way to be sure that a
    write makes it all the way out to media. Writes from the PMEM driver
    always arrive at the NVDIMM since movnt is used to bypass the cache, and
    the driver relies on the ADR (Asynchronous DRAM Refresh) mechanism to
    flush write buffers on power failure. The Deep Flush mechanism is there
    to explicitly write buffers to protect against (rare) ADR failure. This
    change prevents a regression in deep flush behavior so that applications
    can continue to depend on fsync() as a mechanism to trigger deep flush
    in the filesystem-DAX case.

    Fixes: 06e8ccdab15f4 ("acpi: nfit: Add support for detect platform CPU cache...")
    Reviewed-by: Jeff Moyer
    Signed-off-by: Dave Jiang
    Signed-off-by: Dan Williams

    Dave Jiang
     
  • I have recently picked up Kconfig patches to my tree without any
    declaration. Making it official now.

    Signed-off-by: Masahiro Yamada
    Acked-by: Linus Torvalds

    Masahiro Yamada
     
  • Filesystem-DAX is incompatible with 'longterm' page pinning. Without
    page cache indirection a DAX mapping maps filesystem blocks directly.
    This means that the filesystem must not modify a file's block map while
    any page in a mapping is pinned. In order to prevent the situation of
    userspace holding of filesystem operations indefinitely, disallow
    'longterm' Filesystem-DAX mappings.

    RDMA has the same conflict and the plan there is to add a 'with lease'
    mechanism to allow the kernel to notify userspace that the mapping is
    being torn down for block-map maintenance. Perhaps something similar can
    be put in place for vfio.

    Note that xfs and ext4 still report:

    "DAX enabled. Warning: EXPERIMENTAL, use at your own risk"

    ...at mount time, and resolving the dax-dma-vs-truncate problem is one
    of the last hurdles to remove that designation.

    Acked-by: Alex Williamson
    Cc: Michal Hocko
    Cc: kvm@vger.kernel.org
    Cc:
    Reported-by: Haozhong Zhang
    Tested-by: Haozhong Zhang
    Fixes: d475c6346a38 ("dax,ext2: replace XIP read and write with DAX I/O")
    Reviewed-by: Christoph Hellwig
    Signed-off-by: Dan Williams

    Dan Williams
     
  • Pull PCI fixes from Bjorn Helgaas:

    - Update pci.ids location (documentation only) (Randy Dunlap)

    - Fix a crash when BIOS didn't assign a BAR and we try to enlarge it
    (Christian König)

    * tag 'pci-v4.16-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
    PCI: Allow release of resources that were never assigned
    PCI: Update location of pci.ids file

    Linus Torvalds
     
  • Pull parisc fixes from Helge Deller:

    - a patch to change the ordering of cache and TLB flushes to hopefully
    fix the random segfaults we very rarely face (by Dave Anglin).

    - a patch to hide the virtual kernel memory layout due to security
    reasons.

    - two small patches to make the kernel run more smoothly under qemu.

    * 'parisc-4.16-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
    parisc: Reduce irq overhead when run in qemu
    parisc: Use cr16 interval timers unconditionally on qemu
    parisc: Check if secondary CPUs want own PDC calls
    parisc: Hide virtual kernel memory layout
    parisc: Fix ordering of cache and TLB flushes

    Linus Torvalds
     
  • Pull xen fixes from Juergen Gross:
    "Five minor fixes for Xen-specific drivers"

    * tag 'for-linus-4.16a-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
    pvcalls-front: 64-bit align flags
    x86/xen: add tty0 and hvc0 as preferred consoles for dom0
    xen-netfront: Fix hang on device removal
    xen/pirq: fix error path cleanup when binding MSIs
    xen/pvcalls: fix null pointer dereference on map->sock

    Linus Torvalds
     
  • Pull ceph fixes from Ilya Dryomov:
    "A cap handling fix from Zhi that ensures that metadata writeback isn't
    delayed and three error path memory leak fixups from Chengguang"

    * tag 'ceph-for-4.16-rc4' of git://github.com/ceph/ceph-client:
    ceph: fix potential memory leak in init_caches()
    ceph: fix dentry leak when failing to init debugfs
    libceph, ceph: avoid memory leak when specifying same option several times
    ceph: flush dirty caps of unlinked inode ASAP

    Linus Torvalds