26 Dec, 2016

4 commits

  • I am getting the following warning when I build kernel 4.9-git on my
    PowerBook G4 with a 32-bit PPC processor:

    AS arch/powerpc/kernel/misc_32.o
    arch/powerpc/kernel/misc_32.S:299:7: warning: "CONFIG_FSL_BOOKE" is not defined [-Wundef]

    This problem is evident after commit 989cea5c14be ("kbuild: prevent
    lib-ksyms.o rebuilds"); however, this change in kbuild only exposes an
    error that has been in the code since 2005 when this source file was
    created. That was with commit 9994a33865f4 ("powerpc: Introduce
    entry_{32,64}.S, misc_{32,64}.S, systbl.S").

    The offending line does not make a lot of sense. This error does not
    seem to cause any errors in the executable, thus I am not recommending
    that it be applied to any stable versions.

    Thanks to Nicholas Piggin for suggesting this solution.

    Fixes: 9994a33865f4 ("powerpc: Introduce entry_{32,64}.S, misc_{32,64}.S, systbl.S")
    Signed-off-by: Larry Finger
    Cc: Nicholas Piggin
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: linuxppc-dev@lists.ozlabs.org
    Signed-off-by: Linus Torvalds

    Larry Finger
     
  • Pull timer type cleanups from Thomas Gleixner:
    "This series does a tree wide cleanup of types related to
    timers/timekeeping.

    - Get rid of cycles_t and use a plain u64. The type is not really
    helpful and caused more confusion than clarity

    - Get rid of the ktime union. The union has become useless as we use
    the scalar nanoseconds storage unconditionally now. The 32bit
    timespec alike storage got removed due to the Y2038 limitations
    some time ago.

    That leaves the odd union access around for no reason. Clean it up.

    Both changes have been done with coccinelle and a small amount of
    manual mopping up"

    * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    ktime: Get rid of ktime_equal()
    ktime: Cleanup ktime_set() usage
    ktime: Get rid of the union
    clocksource: Use a plain u64 instead of cycle_t

    Linus Torvalds
     
  • Pull SMP hotplug notifier removal from Thomas Gleixner:
    "This is the final cleanup of the hotplug notifier infrastructure. The
    series has been reintgrated in the last two days because there came a
    new driver using the old infrastructure via the SCSI tree.

    Summary:

    - convert the last leftover drivers utilizing notifiers

    - fixup for a completely broken hotplug user

    - prevent setup of already used states

    - removal of the notifiers

    - treewide cleanup of hotplug state names

    - consolidation of state space

    There is a sphinx based documentation pending, but that needs review
    from the documentation folks"

    * 'smp-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    irqchip/armada-xp: Consolidate hotplug state space
    irqchip/gic: Consolidate hotplug state space
    coresight/etm3/4x: Consolidate hotplug state space
    cpu/hotplug: Cleanup state names
    cpu/hotplug: Remove obsolete cpu hotplug register/unregister functions
    staging/lustre/libcfs: Convert to hotplug state machine
    scsi/bnx2i: Convert to hotplug state machine
    scsi/bnx2fc: Convert to hotplug state machine
    cpu/hotplug: Prevent overwriting of callbacks
    x86/msr: Remove bogus cleanup from the error path
    bus: arm-ccn: Prevent hotplug callback leak
    perf/x86/intel/cstate: Prevent hotplug callback leak
    ARM/imx/mmcd: Fix broken cpu hotplug handling
    scsi: qedi: Convert to hotplug state machine

    Linus Torvalds
     
  • ktime_set(S,N) was required for the timespec storage type and is still
    useful for situations where a Seconds and Nanoseconds part of a time value
    needs to be converted. For anything where the Seconds argument is 0, this
    is pointless and can be replaced with a simple assignment.

    Signed-off-by: Thomas Gleixner
    Cc: Peter Zijlstra

    Thomas Gleixner
     

25 Dec, 2016

3 commits

  • There is no point in having an extra type for extra confusion. u64 is
    unambiguous.

    Conversion was done with the following coccinelle script:

    @rem@
    @@
    -typedef u64 cycle_t;

    @fix@
    typedef cycle_t;
    @@
    -cycle_t
    +u64

    Signed-off-by: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: John Stultz

    Thomas Gleixner
     
  • When the state names got added a script was used to add the extra argument
    to the calls. The script basically converted the state constant to a
    string, but the cleanup to convert these strings into meaningful ones did
    not happen.

    Replace all the useless strings with 'subsys/xxx/yyy:state' strings which
    are used in all the other places already.

    Signed-off-by: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: Sebastian Siewior
    Link: http://lkml.kernel.org/r/20161221192112.085444152@linutronix.de
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • This was entirely automated, using the script by Al:

    PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*'
    sed -i -e "s!$PATT!#include !" \
    $(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)

    to do the replacement at the end of the merge window.

    Requested-by: Al Viro
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

21 Dec, 2016

4 commits

  • Pull networking fixes and cleanups from David Miller:

    1) Use rb_entry() instead of hardcoded container_of(), from Geliang
    Tang.

    2) Use correct memory barriers in stammac driver, from Pavel Machek.

    3) Fix assoc bind address handling in SCTP, from Xin Long.

    4) Make the length check for UFO handling consistent between
    __ip_append_data() and ip_finish_output(), from Zheng Li.

    5) HSI driver compatible strings were busted fro hix5hd2, from Dongpo
    Li.

    6) Handle devm_ioremap() errors properly in cavium driver, from Arvind
    Yadav.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (22 commits)
    RDS: use rb_entry()
    net_sched: sch_netem: use rb_entry()
    net_sched: sch_fq: use rb_entry()
    net/mlx5: use rb_entry()
    ethernet: sfc: Add Kconfig entry for vendor Solarflare
    sctp: not copying duplicate addrs to the assoc's bind address list
    sctp: reduce indent level in sctp_copy_local_addr_list
    ARM: dts: hix5hd2: don't change the existing compatible string
    net: hix5hd2_gmac: fix compatible strings name
    openvswitch: Add a missing break statement.
    net: netcp: ethss: fix 10gbe host port tx pri map configuration
    net: netcp: ethss: fix errors in ethtool ops
    fsl/fman: enable compilation on ARM64
    fsl/fman: A007273 only applies to PPC SoCs
    powerpc: fsl/fman: remove fsl,fman from of_device_ids[]
    fsl/fman: fix 1G support for QSGMII interfaces
    dt: bindings: net: use boolean dt properties for eee broken modes
    net: phy: use boolean dt properties for eee broken modes
    net: phy: fix sign type error in genphy_config_eee_advert
    ipv4: Should use consistent conditional judgement for ip fragment in __ip_append_data and ip_finish_output
    ...

    Linus Torvalds
     
  • The fsl/fman drivers will use of_platform_populate() on all
    supported platforms. Call of_platform_populate() to probe the
    FMan sub-nodes.

    Signed-off-by: Igal Liberman
    Signed-off-by: Madalin Bucur
    Acked-by: Scott Wood
    Signed-off-by: David S. Miller

    Madalin Bucur
     
  • The IMA kexec buffer allows the currently running kernel to pass the
    measurement list via a kexec segment to the kernel that will be kexec'd.

    This is the architecture-specific part of setting up the IMA kexec
    buffer for the next kernel. It will be used in the next patch.

    Link: http://lkml.kernel.org/r/1480554346-29071-6-git-send-email-zohar@linux.vnet.ibm.com
    Signed-off-by: Thiago Jung Bauermann
    Signed-off-by: Mimi Zohar
    Acked-by: "Eric W. Biederman"
    Cc: Andreas Steffen
    Cc: Dmitry Kasatkin
    Cc: Josh Sklar
    Cc: Dave Young
    Cc: Vivek Goyal
    Cc: Baoquan He
    Cc: Michael Ellerman
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Stewart Smith
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thiago Jung Bauermann
     
  • Patch series "ima: carry the measurement list across kexec", v8.

    The TPM PCRs are only reset on a hard reboot. In order to validate a
    TPM's quote after a soft reboot (eg. kexec -e), the IMA measurement
    list of the running kernel must be saved and then restored on the
    subsequent boot, possibly of a different architecture.

    The existing securityfs binary_runtime_measurements file conveniently
    provides a serialized format of the IMA measurement list. This patch
    set serializes the measurement list in this format and restores it.

    Up to now, the binary_runtime_measurements was defined as architecture
    native format. The assumption being that userspace could and would
    handle any architecture conversions. With the ability of carrying the
    measurement list across kexec, possibly from one architecture to a
    different one, the per boot architecture information is lost and with it
    the ability of recalculating the template digest hash. To resolve this
    problem, without breaking the existing ABI, this patch set introduces
    the boot command line option "ima_canonical_fmt", which is arbitrarily
    defined as little endian.

    The need for this boot command line option will be limited to the
    existing version 1 format of the binary_runtime_measurements.
    Subsequent formats will be defined as canonical format (eg. TPM 2.0
    support for larger digests).

    A simplified method of Thiago Bauermann's "kexec buffer handover" patch
    series for carrying the IMA measurement list across kexec is included in
    this patch set. The simplified method requires all file measurements be
    taken prior to executing the kexec load, as subsequent measurements will
    not be carried across the kexec and restored.

    This patch (of 10):

    The IMA kexec buffer allows the currently running kernel to pass the
    measurement list via a kexec segment to the kernel that will be kexec'd.
    The second kernel can check whether the previous kernel sent the buffer
    and retrieve it.

    This is the architecture-specific part which enables IMA to receive the
    measurement list passed by the previous kernel. It will be used in the
    next patch.

    The change in machine_kexec_64.c is to factor out the logic of removing
    an FDT memory reservation so that it can be used by remove_ima_buffer.

    Link: http://lkml.kernel.org/r/1480554346-29071-2-git-send-email-zohar@linux.vnet.ibm.com
    Signed-off-by: Thiago Jung Bauermann
    Signed-off-by: Mimi Zohar
    Acked-by: "Eric W. Biederman"
    Cc: Andreas Steffen
    Cc: Dmitry Kasatkin
    Cc: Josh Sklar
    Cc: Dave Young
    Cc: Vivek Goyal
    Cc: Baoquan He
    Cc: Michael Ellerman
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Stewart Smith
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thiago Jung Bauermann
     

18 Dec, 2016

1 commit

  • Pull more vfs updates from Al Viro:
    "In this pile:

    - autofs-namespace series
    - dedupe stuff
    - more struct path constification"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (40 commits)
    ocfs2: implement the VFS clone_range, copy_range, and dedupe_range features
    ocfs2: charge quota for reflinked blocks
    ocfs2: fix bad pointer cast
    ocfs2: always unlock when completing dio writes
    ocfs2: don't eat io errors during _dio_end_io_write
    ocfs2: budget for extent tree splits when adding refcount flag
    ocfs2: prohibit refcounted swapfiles
    ocfs2: add newlines to some error messages
    ocfs2: convert inode refcount test to a helper
    simple_write_end(): don't zero in short copy into uptodate
    exofs: don't mess with simple_write_{begin,end}
    9p: saner ->write_end() on failing copy into non-uptodate page
    fix gfs2_stuffed_write_end() on short copies
    fix ceph_write_end()
    nfs_write_end(): fix handling of short copies
    vfs: refactor clone/dedupe_file_range common functions
    fs: try to clone files first in vfs_copy_file_range
    vfs: misc struct path constification
    namespace.c: constify struct path passed to a bunch of primitives
    quota: constify struct path in quota_on
    ...

    Linus Torvalds
     

17 Dec, 2016

1 commit

  • Pull powerpc updates from Michael Ellerman:
    "Highlights include:

    - Support for the kexec_file_load() syscall, which is a prereq for
    secure and trusted boot.

    - Prevent kernel execution of userspace on P9 Radix (similar to
    SMEP/PXN).

    - Sort the exception tables at build time, to save time at boot, and
    store them as relative offsets to save space in the kernel image &
    memory.

    - Allow building the kernel with thin archives, which should allow us
    to build an allyesconfig once some other fixes land.

    - Build fixes to allow us to correctly rebuild when changing the
    kernel endian from big to little or vice versa.

    - Plumbing so that we can avoid doing a full mm TLB flush on P9
    Radix.

    - Initial stack protector support (-fstack-protector).

    - Support for dumping the radix (aka. Linux) and hash page tables via
    debugfs.

    - Fix an oops in cxl coredump generation when cxl_get_fd() is used.

    - Freescale updates from Scott: "Highlights include 8xx hugepage
    support, qbman fixes/cleanup, device tree updates, and some misc
    cleanup."

    - Many and varied fixes and minor enhancements as always.

    Thanks to:
    Alexey Kardashevskiy, Andrew Donnellan, Aneesh Kumar K.V, Anshuman
    Khandual, Anton Blanchard, Balbir Singh, Bartlomiej Zolnierkiewicz,
    Christophe Jaillet, Christophe Leroy, Denis Kirjanov, Elimar
    Riesebieter, Frederic Barrat, Gautham R. Shenoy, Geliang Tang, Geoff
    Levand, Jack Miller, Johan Hovold, Lars-Peter Clausen, Libin,
    Madhavan Srinivasan, Michael Neuling, Nathan Fontenot, Naveen N.
    Rao, Nicholas Piggin, Pan Xinhui, Peter Senna Tschudin, Rashmica
    Gupta, Rui Teng, Russell Currey, Scott Wood, Simon Guo, Suraj
    Jitindar Singh, Thiago Jung Bauermann, Tobias Klauser, Vaibhav Jain"

    [ And thanks to Michael, who took time off from a new baby to get this
    pull request done. - Linus ]

    * tag 'powerpc-4.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (174 commits)
    powerpc/fsl/dts: add FMan node for t1042d4rdb
    powerpc/fsl/dts: add sg_2500_aqr105_phy4 alias on t1024rdb
    powerpc/fsl/dts: add QMan and BMan nodes on t1024
    powerpc/fsl/dts: add QMan and BMan nodes on t1023
    soc/fsl/qman: test: use DEFINE_SPINLOCK()
    powerpc/fsl-lbc: use DEFINE_SPINLOCK()
    powerpc/8xx: Implement support of hugepages
    powerpc: get hugetlbpage handling more generic
    powerpc: port 64 bits pgtable_cache to 32 bits
    powerpc/boot: Request no dynamic linker for boot wrapper
    soc/fsl/bman: Use resource_size instead of computation
    soc/fsl/qe: use builtin_platform_driver
    powerpc/fsl_pmc: use builtin_platform_driver
    powerpc/83xx/suspend: use builtin_platform_driver
    powerpc/ftrace: Fix the comments for ftrace_modify_code
    powerpc/perf: macros for power9 format encoding
    powerpc/perf: power9 raw event format encoding
    powerpc/perf: update attribute_group data structure
    powerpc/perf: factor out the event format field
    powerpc/mm/iommu, vfio/spapr: Put pages on VFIO container shutdown
    ...

    Linus Torvalds
     

16 Dec, 2016

2 commits

  • Freescale updates from Scott:

    "Highlights include 8xx hugepage support, qbman fixes/cleanup, device
    tree updates, and some misc cleanup."

    Michael Ellerman
     
  • Pull tracing updates from Steven Rostedt:
    "This release has a few updates:

    - STM can hook into the function tracer
    - Function filtering now supports more advance glob matching
    - Ftrace selftests updates and added tests
    - Softirq tag in traces now show only softirqs
    - ARM nop added to non traced locations at compile time
    - New trace_marker_raw file that allows for binary input
    - Optimizations to the ring buffer
    - Removal of kmap in trace_marker
    - Wakeup and irqsoff tracers now adhere to the set_graph_notrace file
    - Other various fixes and clean ups"

    * tag 'trace-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (42 commits)
    selftests: ftrace: Shift down default message verbosity
    kprobes/trace: Fix kprobe selftest for newer gcc
    tracing/kprobes: Add a helper method to return number of probe hits
    tracing/rb: Init the CPU mask on allocation
    tracing: Use SOFTIRQ_OFFSET for softirq dectection for more accurate results
    tracing/fgraph: Have wakeup and irqsoff tracers ignore graph functions too
    fgraph: Handle a case where a tracer ignores set_graph_notrace
    tracing: Replace kmap with copy_from_user() in trace_marker writing
    ftrace/x86_32: Set ftrace_stub to weak to prevent gcc from using short jumps to it
    tracing: Allow benchmark to be enabled at early_initcall()
    tracing: Have system enable return error if one of the events fail
    tracing: Do not start benchmark on boot up
    tracing: Have the reg function allow to fail
    ring-buffer: Force rb_end_commit() and rb_set_commit_to_write() inline
    ring-buffer: Froce rb_update_write_stamp() to be inlined
    ring-buffer: Force inline of hotpath helper functions
    tracing: Make __buffer_unlock_commit() always_inline
    tracing: Make tracepoint_printk a static_key
    ring-buffer: Always inline rb_event_data()
    ring-buffer: Make rb_reserve_next_event() always inlined
    ...

    Linus Torvalds
     

15 Dec, 2016

5 commits

  • Merge more updates from Andrew Morton:

    - a few misc things

    - kexec updates

    - DMA-mapping updates to better support networking DMA operations

    - IPC updates

    - various MM changes to improve DAX fault handling

    - lots of radix-tree changes, mainly to the test suite. All leading up
    to reimplementing the IDA/IDR code to be a wrapper layer over the
    radix-tree. However the final trigger-pulling patch is held off for
    4.11.

    * emailed patches from Andrew Morton : (114 commits)
    radix tree test suite: delete unused rcupdate.c
    radix tree test suite: add new tag check
    radix-tree: ensure counts are initialised
    radix tree test suite: cache recently freed objects
    radix tree test suite: add some more functionality
    idr: reduce the number of bits per level from 8 to 6
    rxrpc: abstract away knowledge of IDR internals
    tpm: use idr_find(), not idr_find_slowpath()
    idr: add ida_is_empty
    radix tree test suite: check multiorder iteration
    radix-tree: fix replacement for multiorder entries
    radix-tree: add radix_tree_split_preload()
    radix-tree: add radix_tree_split
    radix-tree: add radix_tree_join
    radix-tree: delete radix_tree_range_tag_if_tagged()
    radix-tree: delete radix_tree_locate_item()
    radix-tree: improve multiorder iterators
    btrfs: fix race in btrfs_free_dummy_fs_info()
    radix-tree: improve dump output
    radix-tree: make radix_tree_find_next_bit more useful
    ...

    Linus Torvalds
     
  • Every single user of vmf->virtual_address typed that entry to unsigned
    long before doing anything with it so the type of virtual_address does
    not really provide us any additional safety. Just use masked
    vmf->address which already has the appropriate type.

    Link: http://lkml.kernel.org/r/1479460644-25076-3-git-send-email-jack@suse.cz
    Signed-off-by: Jan Kara
    Acked-by: Kirill A. Shutemov
    Cc: Dan Williams
    Cc: Ross Zwisler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • This change allows us to pass DMA_ATTR_SKIP_CPU_SYNC which allows us to
    avoid invoking cache line invalidation if the driver will just handle it
    via a sync_for_cpu or sync_for_device call.

    Link: http://lkml.kernel.org/r/20161110113534.76501.86492.stgit@ahduyck-blue-test.jf.intel.com
    Signed-off-by: Alexander Duyck
    Acked-by: Michael Ellerman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexander Duyck
     
  • Pull namespace updates from Eric Biederman:
    "After a lot of discussion and work we have finally reachanged a basic
    understanding of what is necessary to make unprivileged mounts safe in
    the presence of EVM and IMA xattrs which the last commit in this
    series reflects. While technically it is a revert the comments it adds
    are important for people not getting confused in the future. Clearing
    up that confusion allows us to seriously work on unprivileged mounts
    of fuse in the next development cycle.

    The rest of the fixes in this set are in the intersection of user
    namespaces, ptrace, and exec. I started with the first fix which
    started a feedback cycle of finding additional issues during review
    and fixing them. Culiminating in a fix for a bug that has been present
    since at least Linux v1.0.

    Potentially these fixes were candidates for being merged during the rc
    cycle, and are certainly backport candidates but enough little things
    turned up during review and testing that I decided they should be
    handled as part of the normal development process just to be certain
    there were not any great surprises when it came time to backport some
    of these fixes"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
    Revert "evm: Translate user/group ids relative to s_user_ns when computing HMAC"
    exec: Ensure mm->user_ns contains the execed files
    ptrace: Don't allow accessing an undumpable mm
    ptrace: Capture the ptracer's creds not PT_PTRACE_CAP
    mm: Add a user_ns owner to mm_struct and fix ptrace permission checks

    Linus Torvalds
     
  • Pull crypto updates from Herbert Xu:
    "Here is the crypto update for 4.10:

    API:
    - add skcipher walk interface
    - add asynchronous compression (acomp) interface
    - fix algif_aed AIO handling of zero buffer

    Algorithms:
    - fix unaligned access in poly1305
    - fix DRBG output to large buffers

    Drivers:
    - add support for iMX6UL to caam
    - fix givenc descriptors (used by IPsec) in caam
    - accelerated SHA256/SHA512 for ARM64 from OpenSSL
    - add SSE CRCT10DIF and CRC32 to ARM/ARM64
    - add AEAD support to Chelsio chcr
    - add Armada 8K support to omap-rng"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (148 commits)
    crypto: testmgr - fix overlap in chunked tests again
    crypto: arm/crc32 - accelerated support based on x86 SSE implementation
    crypto: arm64/crc32 - accelerated support based on x86 SSE implementation
    crypto: arm/crct10dif - port x86 SSE implementation to ARM
    crypto: arm64/crct10dif - port x86 SSE implementation to arm64
    crypto: testmgr - add/enhance test cases for CRC-T10DIF
    crypto: testmgr - avoid overlap in chunked tests
    crypto: chcr - checking for IS_ERR() instead of NULL
    crypto: caam - check caam_emi_slow instead of re-lookup platform
    crypto: algif_aead - fix AIO handling of zero buffer
    crypto: aes-ce - Make aes_simd_algs static
    crypto: algif_skcipher - set error code when kcalloc fails
    crypto: caam - make aamalg_desc a proper module
    crypto: caam - pass key buffers with typesafe pointers
    crypto: arm64/aes-ce-ccm - Fix AEAD decryption length
    MAINTAINERS: add crypto headers to crypto entry
    crypt: doc - remove misleading mention of async API
    crypto: doc - fix header file name
    crypto: api - fix comment typo
    crypto: skcipher - Add separate walker for AEAD decryption
    ..

    Linus Torvalds
     

14 Dec, 2016

1 commit

  • Pull KVM updates from Paolo Bonzini:
    "Small release, the most interesting stuff is x86 nested virt
    improvements.

    x86:
    - userspace can now hide nested VMX features from guests
    - nested VMX can now run Hyper-V in a guest
    - support for AVX512_4VNNIW and AVX512_FMAPS in KVM
    - infrastructure support for virtual Intel GPUs.

    PPC:
    - support for KVM guests on POWER9
    - improved support for interrupt polling
    - optimizations and cleanups.

    s390:
    - two small optimizations, more stuff is in flight and will be in
    4.11.

    ARM:
    - support for the GICv3 ITS on 32bit platforms"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (94 commits)
    arm64: KVM: pmu: Reset PMSELR_EL0.SEL to a sane value before entering the guest
    KVM: arm/arm64: timer: Check for properly initialized timer on init
    KVM: arm/arm64: vgic-v2: Limit ITARGETSR bits to number of VCPUs
    KVM: x86: Handle the kthread worker using the new API
    KVM: nVMX: invvpid handling improvements
    KVM: nVMX: check host CR3 on vmentry and vmexit
    KVM: nVMX: introduce nested_vmx_load_cr3 and call it on vmentry
    KVM: nVMX: propagate errors from prepare_vmcs02
    KVM: nVMX: fix CR3 load if L2 uses PAE paging and EPT
    KVM: nVMX: load GUEST_EFER after GUEST_CR0 during emulated VM-entry
    KVM: nVMX: generate MSR_IA32_CR{0,4}_FIXED1 from guest CPUID
    KVM: nVMX: fix checks on CR{0,4} during virtual VMX operation
    KVM: nVMX: support restore of VMX capability MSRs
    KVM: nVMX: generate non-true VMX MSRs based on true versions
    KVM: x86: Do not clear RFLAGS.TF when a singlestep trap occurs.
    KVM: x86: Add kvm_skip_emulated_instruction and use it.
    KVM: VMX: Move skip_emulated_instruction out of nested_vmx_check_vmcs12
    KVM: VMX: Reorder some skip_emulated_instruction calls
    KVM: x86: Add a return value to kvm_emulate_cpuid
    KVM: PPC: Book3S: Move prototypes for KVM functions into kvm_ppc.h
    ...

    Linus Torvalds
     

13 Dec, 2016

9 commits

  • Merge updates from Andrew Morton:

    - various misc bits

    - most of MM (quite a lot of MM material is awaiting the merge of
    linux-next dependencies)

    - kasan

    - printk updates

    - procfs updates

    - MAINTAINERS

    - /lib updates

    - checkpatch updates

    * emailed patches from Andrew Morton : (123 commits)
    init: reduce rootwait polling interval time to 5ms
    binfmt_elf: use vmalloc() for allocation of vma_filesz
    checkpatch: don't emit unified-diff error for rename-only patches
    checkpatch: don't check c99 types like uint8_t under tools
    checkpatch: avoid multiple line dereferences
    checkpatch: don't check .pl files, improve absolute path commit log test
    scripts/checkpatch.pl: fix spelling
    checkpatch: don't try to get maintained status when --no-tree is given
    lib/ida: document locking requirements a bit better
    lib/rbtree.c: fix typo in comment of ____rb_erase_color
    lib/Kconfig.debug: make CONFIG_STRICT_DEVMEM depend on CONFIG_DEVMEM
    MAINTAINERS: add drm and drm/i915 irc channels
    MAINTAINERS: add "C:" for URI for chat where developers hang out
    MAINTAINERS: add drm and drm/i915 bug filing info
    MAINTAINERS: add "B:" for URI where to file bugs
    get_maintainer: look for arbitrary letter prefixes in sections
    printk: add Kconfig option to set default console loglevel
    printk/sound: handle more message headers
    printk/btrfs: handle more message headers
    printk/kdb: handle more message headers
    ...

    Linus Torvalds
     
  • Pull irq updates from Thomas Gleixner:
    "The irq department provides:

    - a major update to the auto affinity management code, which is used
    by multi-queue devices

    - move of the microblaze irq chip driver into the common driver code
    so it can be shared between microblaze, powerpc and MIPS

    - a series of updates to the ARM GICV3 interrupt controller

    - the usual pile of fixes and small improvements all over the place"

    * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
    powerpc/virtex: Use generic xilinx irqchip driver
    irqchip/xilinx: Try to fall back if xlnx,kind-of-intr not provided
    irqchip/xilinx: Add support for parent intc
    irqchip/xilinx: Rename get_irq to xintc_get_irq
    irqchip/xilinx: Restructure and use jump label api
    irqchip/xilinx: Clean up print messages
    microblaze/irqchip: Move intc driver to irqchip
    ARM: virt: Select ARM_GIC_V3_ITS
    ARM: gic-v3-its: Add 32bit support to GICv3 ITS
    irqchip/gic-v3-its: Specialise readq and writeq accesses
    irqchip/gic-v3-its: Specialise flush_dcache operation
    irqchip/gic-v3-its: Narrow down Entry Size when used as a divider
    irqchip/gic-v3-its: Change unsigned types for AArch32 compatibility
    irqchip/gic-v3: Use nops macro for Cavium ThunderX erratum 23154
    irqchip/gic-v3: Convert arm64 GIC accessors to {read,write}_sysreg_s
    genirq/msi: Drop artificial PCI dependency
    irqchip/bcm7038-l1: Implement irq_cpu_offline() callback
    genirq/affinity: Use default affinity mask for reserved vectors
    genirq/affinity: Take reserved vectors into account when spreading irqs
    PCI: Remove the irq_affinity mask from struct pci_dev
    ...

    Linus Torvalds
     
  • Pull smp hotplug updates from Thomas Gleixner:
    "This is the final round of converting the notifier mess to the state
    machine. The removal of the notifiers and the related infrastructure
    will happen around rc1, as there are conversions outstanding in other
    trees.

    The whole exercise removed about 2000 lines of code in total and in
    course of the conversion several dozen bugs got fixed. The new
    mechanism allows to test almost every hotplug step standalone, so
    usage sites can exercise all transitions extensively.

    There is more room for improvement, like integrating all the
    pointlessly different architecture mechanisms of synchronizing,
    setting cpus online etc into the core code"

    * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (60 commits)
    tracing/rb: Init the CPU mask on allocation
    soc/fsl/qbman: Convert to hotplug state machine
    soc/fsl/qbman: Convert to hotplug state machine
    zram: Convert to hotplug state machine
    KVM/PPC/Book3S HV: Convert to hotplug state machine
    arm64/cpuinfo: Convert to hotplug state machine
    arm64/cpuinfo: Make hotplug notifier symmetric
    mm/compaction: Convert to hotplug state machine
    iommu/vt-d: Convert to hotplug state machine
    mm/zswap: Convert pool to hotplug state machine
    mm/zswap: Convert dst-mem to hotplug state machine
    mm/zsmalloc: Convert to hotplug state machine
    mm/vmstat: Convert to hotplug state machine
    mm/vmstat: Avoid on each online CPU loops
    mm/vmstat: Drop get_online_cpus() from init_cpu_node_state/vmstat_cpu_dead()
    tracing/rb: Convert to hotplug state machine
    oprofile/nmi timer: Convert to hotplug state machine
    net/iucv: Use explicit clean up labels in iucv_init()
    x86/pci/amd-bus: Convert to hotplug state machine
    x86/oprofile/nmi: Convert to hotplug state machine
    ...

    Linus Torvalds
     
  • Add arch specific callback in the generic THP page cache code that will
    deposit and withdarw preallocated page table. Archs like ppc64 use this
    preallocated table to store the hash pte slot information.

    Testing:
    kernel build of the patch series on tmpfs mounted with option huge=always

    The related thp stat:
    thp_fault_alloc 72939
    thp_fault_fallback 60547
    thp_collapse_alloc 603
    thp_collapse_alloc_failed 0
    thp_file_alloc 253763
    thp_file_mapped 4251
    thp_split_page 51518
    thp_split_page_failed 1
    thp_deferred_split_page 73566
    thp_split_pmd 665
    thp_zero_page_alloc 3
    thp_zero_page_alloc_failed 0

    [akpm@linux-foundation.org: remove unneeded parentheses, per Kirill]
    Link: http://lkml.kernel.org/r/20161113150025.17942-2-aneesh.kumar@linux.vnet.ibm.com
    Signed-off-by: Aneesh Kumar K.V
    Acked-by: Kirill A. Shutemov
    Cc: Michael Ellerman
    Cc: Benjamin Herrenschmidt
    Cc: Michael Neuling
    Cc: Paul Mackerras
    Cc: Balbir Singh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Aneesh Kumar K.V
     
  • Independent of whether the vma is for anonymous memory, some arches like
    ppc64 would like to override pmd_move_must_withdraw().

    One option is to encapsulate the vma_is_anonymous() check for general
    architectures inside pmd_move_must_withdraw() so that is always called
    and architectures that need unconditional overriding can override this
    function. ppc64 needs to override the function when the MMU is
    configured to use hash PTE's.

    [bsingharora@gmail.com: reworked changelog]
    Link: http://lkml.kernel.org/r/20161113150025.17942-1-aneesh.kumar@linux.vnet.ibm.com
    Signed-off-by: Aneesh Kumar K.V
    Acked-by: Kirill A. Shutemov
    Acked-by: Michael Ellerman (powerpc)
    Cc: Benjamin Herrenschmidt
    Cc: Michael Neuling
    Cc: Paul Mackerras
    Cc: Balbir Singh
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Aneesh Kumar K.V
     
  • Patch series "enable movable nodes on non-x86 configs", v7.

    This patchset allows more configs to make use of movable nodes. When
    CONFIG_MOVABLE_NODE is selected, there are two ways to introduce such
    nodes into the system:

    1. Discover movable nodes at boot. Currently this is only possible on
    x86, but we will enable configs supporting fdt to do the same.

    2. Hotplug and online all of a node's memory using online_movable. This
    is already possible on any config supporting memory hotplug, not
    just x86, but the Kconfig doesn't say so. We will fix that.

    We'll also remove some cruft on power which would prevent (2).

    This patch (of 5):

    Remove the check which prevents us from hotplugging into an empty node.

    The original commit b226e4621245 ("[PATCH] powerpc: don't add memory to
    empty node/zone"), states that this was intended to be a temporary measure.
    It is a workaround for an oops which no longer occurs.

    Link: http://lkml.kernel.org/r/1479160961-25840-2-git-send-email-arbab@linux.vnet.ibm.com
    Signed-off-by: Reza Arbab
    Reviewed-by: Aneesh Kumar K.V
    Acked-by: Balbir Singh
    Acked-by: Michael Ellerman
    Cc: "Aneesh Kumar K.V"
    Cc: "H. Peter Anvin"
    Cc: Alistair Popple
    Cc: Benjamin Herrenschmidt
    Cc: Bharata B Rao
    Cc: Frank Rowand
    Cc: Ingo Molnar
    Cc: Nathan Fontenot
    Cc: Paul Mackerras
    Cc: Rob Herring
    Cc: Stewart Smith
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Reza Arbab
     
  • With commit e77b0852b551 ("mm/mmu_gather: track page size with mmu
    gather and force flush if page size change") we added the ability to
    force a tlb flush when the page size change in a mmu_gather loop. We
    did that by checking for a page size change every time we added a page
    to mmu_gather for lazy flush/remove. We can improve that by moving the
    page size change check early and not doing it every time we add a page.

    This also helps us to do tlb flush when invalidating a range covering
    dax mapping. Wrt dax mapping we don't have a backing struct page and
    hence we don't call tlb_remove_page, which earlier forced the tlb flush
    on page size change. Moving the page size change check earlier means we
    will do the same even for dax mapping.

    We also avoid doing this check on architecture other than powerpc.

    In a later patch we will remove page size check from tlb_remove_page().

    Link: http://lkml.kernel.org/r/20161026084839.27299-5-aneesh.kumar@linux.vnet.ibm.com
    Signed-off-by: Aneesh Kumar K.V
    Cc: "Kirill A. Shutemov"
    Cc: Dan Williams
    Cc: Ross Zwisler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Aneesh Kumar K.V
     
  • Pull scheduler updates from Ingo Molnar:
    "The main scheduler changes in this cycle were:

    - support Intel Turbo Boost Max Technology 3.0 (TBM3) by introducig a
    notion of 'better cores', which the scheduler will prefer to
    schedule single threaded workloads on. (Tim Chen, Srinivas
    Pandruvada)

    - enhance the handling of asymmetric capacity CPUs further (Morten
    Rasmussen)

    - improve/fix load handling when moving tasks between task groups
    (Vincent Guittot)

    - simplify and clean up the cputime code (Stanislaw Gruszka)

    - improve mass fork()ed task spread a.k.a. hackbench speedup (Vincent
    Guittot)

    - make struct kthread kmalloc()ed and related fixes (Oleg Nesterov)

    - add uaccess atomicity debugging (when using access_ok() in the
    wrong context), under CONFIG_DEBUG_ATOMIC_SLEEP=y (Peter Zijlstra)

    - implement various fixes, cleanups and other enhancements (Daniel
    Bristot de Oliveira, Martin Schwidefsky, Rafael J. Wysocki)"

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (41 commits)
    sched/core: Use load_avg for selecting idlest group
    sched/core: Fix find_idlest_group() for fork
    kthread: Don't abuse kthread_create_on_cpu() in __kthread_create_worker()
    kthread: Don't use to_live_kthread() in kthread_[un]park()
    kthread: Don't use to_live_kthread() in kthread_stop()
    Revert "kthread: Pin the stack via try_get_task_stack()/put_task_stack() in to_live_kthread() function"
    kthread: Make struct kthread kmalloc'ed
    x86/uaccess, sched/preempt: Verify access_ok() context
    sched/x86: Make CONFIG_SCHED_MC_PRIO=y easier to enable
    sched/x86: Change CONFIG_SCHED_ITMT to CONFIG_SCHED_MC_PRIO
    x86/sched: Use #include instead of #include
    cpufreq/intel_pstate: Use CPPC to get max performance
    acpi/bus: Set _OSC for diverse core support
    acpi/bus: Enable HWP CPPC objects
    x86/sched: Add SD_ASYM_PACKING flags to x86 ITMT CPU
    x86/sysctl: Add sysctl for ITMT scheduling feature
    x86: Enable Intel Turbo Boost Max Technology 3.0
    x86/topology: Define x86's arch_update_cpu_topology
    sched: Extend scheduler's asym packing
    sched/fair: Clean up the tunable parameter definitions
    ...

    Linus Torvalds
     
  • Pull locking updates from Ingo Molnar:
    "The tree got pretty big in this development cycle, but the net effect
    is pretty good:

    115 files changed, 673 insertions(+), 1522 deletions(-)

    The main changes were:

    - Rework and generalize the mutex code to remove per arch mutex
    primitives. (Peter Zijlstra)

    - Add vCPU preemption support: add an interface to query the
    preemption status of vCPUs and use it in locking primitives - this
    optimizes paravirt performance. (Pan Xinhui, Juergen Gross,
    Christian Borntraeger)

    - Introduce cpu_relax_yield() and remov cpu_relax_lowlatency() to
    clean up and improve the s390 lock yielding machinery and its core
    kernel impact. (Christian Borntraeger)

    - Micro-optimize mutexes some more. (Waiman Long)

    - Reluctantly add the to-be-deprecated mutex_trylock_recursive()
    interface on a temporary basis, to give the DRM code more time to
    get rid of its locking hacks. Any other users will be NAK-ed on
    sight. (We turned off the deprecation warning for the time being to
    not pollute the build log.) (Peter Zijlstra)

    - Improve the rtmutex code a bit, in light of recent long lived
    bugs/races. (Thomas Gleixner)

    - Misc fixes, cleanups"

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (36 commits)
    x86/paravirt: Fix bool return type for PVOP_CALL()
    x86/paravirt: Fix native_patch()
    locking/ww_mutex: Use relaxed atomics
    locking/rtmutex: Explain locking rules for rt_mutex_proxy_unlock()/init_proxy_locked()
    locking/rtmutex: Get rid of RT_MUTEX_OWNER_MASKALL
    x86/paravirt: Optimize native pv_lock_ops.vcpu_is_preempted()
    locking/mutex: Break out of expensive busy-loop on {mutex,rwsem}_spin_on_owner() when owner vCPU is preempted
    locking/osq: Break out of spin-wait busy waiting loop for a preempted vCPU in osq_lock()
    Documentation/virtual/kvm: Support the vCPU preemption check
    x86/xen: Support the vCPU preemption check
    x86/kvm: Support the vCPU preemption check
    x86/kvm: Support the vCPU preemption check
    kvm: Introduce kvm_write_guest_offset_cached()
    locking/core, x86/paravirt: Implement vcpu_is_preempted(cpu) for KVM and Xen guests
    locking/spinlocks, s390: Implement vcpu_is_preempted(cpu)
    locking/core, powerpc: Implement vcpu_is_preempted(cpu)
    sched/core: Introduce the vcpu_is_preempted(cpu) interface
    sched/wake_q: Rename WAKE_Q to DEFINE_WAKE_Q
    locking/core: Provide common cpu_relax_yield() definition
    locking/mutex: Don't mark mutex_trylock_recursive() as deprecated, temporarily
    ...

    Linus Torvalds
     

11 Dec, 2016

2 commits


10 Dec, 2016

8 commits

  • Signed-off-by: Madalin Bucur
    Signed-off-by: Scott Wood

    Madalin Bucur
     
  • The alias is used by the boot loader to perform a device tree
    fixup.

    Signed-off-by: Madalin Bucur
    Signed-off-by: Scott Wood

    Madalin Bucur
     
  • Signed-off-by: Madalin Bucur
    Signed-off-by: Scott Wood

    Madalin Bucur
     
  • Signed-off-by: Madalin Bucur
    Signed-off-by: Scott Wood

    Madalin Bucur
     
  • Signed-off-by: Fabian Frederick
    Signed-off-by: Scott Wood

    Fabian Frederick
     
  • 8xx uses a two level page table with two different linux page size
    support (4k and 16k). 8xx also support two different hugepage sizes
    512k and 8M. In order to support them on linux we define two different
    page table layout.

    The size of pages is in the PGD entry, using PS field (bits 28-29):
    00 : Small pages (4k or 16k)
    01 : 512k pages
    10 : reserved
    11 : 8M pages

    For 512K hugepage size a pgd entry have the below format
    [0101] . The hugepte table allocated will contain 8
    entries pointing to 512K huge pte in 4k pages mode and 64 entries in
    16k pages mode.

    For 8M in 16k mode, a pgd entry have the below format
    [1101] . The hugepte table allocated will contain 8
    entries pointing to 8M huge pte.

    For 8M in 4k mode, multiple pgd entries point to the same hugepte
    address and pgd entry will have the below format
    [1101]. The hugepte table allocated will only have one
    entry.

    For the time being, we do not support CPU15 ERRATA when HUGETLB is
    selected

    Signed-off-by: Christophe Leroy
    Reviewed-by: Aneesh Kumar K.V (v3, for the generic bits)
    Signed-off-by: Scott Wood

    Christophe Leroy
     
  • Today there are two implementations of hugetlbpages which are managed
    by exclusive #ifdefs:
    * FSL_BOOKE: several directory entries points to the same single hugepage
    * BOOK3S: one upper level directory entry points to a table of hugepages

    In preparation of implementation of hugepage support on the 8xx, we
    need a mix of the two above solutions, because the 8xx needs both cases
    depending on the size of pages:
    * In 4k page size mode, each PGD entry covers a 4M bytes area. It means
    that 2 PGD entries will be necessary to cover an 8M hugepage while a
    single PGD entry will cover 8x 512k hugepages.
    * In 16 page size mode, each PGD entry covers a 64M bytes area. It means
    that 8x 8M hugepages will be covered by one PGD entry and 64x 512k
    hugepages will be covers by one PGD entry.

    This patch:
    * removes #ifdefs in favor of if/else based on the range sizes
    * merges the two huge_pte_alloc() functions as they are pretty similar
    * merges the two hugetlbpage_init() functions as they are pretty similar

    Signed-off-by: Christophe Leroy
    Reviewed-by: Aneesh Kumar K.V (v3)
    Signed-off-by: Scott Wood

    Christophe Leroy
     
  • Today powerpc64 uses a set of pgtable_caches while powerpc32 uses
    standard pages when using 4k pages and a single pgtable_cache
    if using other size pages.

    In preparation of implementing huge pages on the 8xx, this patch
    replaces the specific powerpc32 handling by the 64 bits approach.

    This is done by:
    * moving 64 bits pgtable_cache_add() and pgtable_cache_init()
    in a new file called init-common.c
    * modifying pgtable_cache_init() to also handle the case
    without PMD
    * removing the 32 bits version of pgtable_cache_add() and
    pgtable_cache_init()
    * copying related header contents from 64 bits into both the
    book3s/32 and nohash/32 header files

    On the 8xx, the following cache sizes will be used:
    * 4k pages mode:
    - PGT_CACHE(10) for PGD
    - PGT_CACHE(3) for 512k hugepage tables
    * 16k pages mode:
    - PGT_CACHE(6) for PGD
    - PGT_CACHE(7) for 512k hugepage tables
    - PGT_CACHE(3) for 8M hugepage tables

    Signed-off-by: Christophe Leroy
    Reviewed-by: Aneesh Kumar K.V
    Signed-off-by: Scott Wood

    Christophe Leroy