27 Aug, 2016

1 commit

  • Commit 97f2645f358b ("tree-wide: replace config_enabled() with
    IS_ENABLED()") mostly killed config_enabled(), but some new users have
    appeared for v4.8-rc1. They are all used for a boolean option, so can
    be replaced with IS_ENABLED() safely.

    Link: http://lkml.kernel.org/r/1471970749-24867-1-git-send-email-yamada.masahiro@socionext.com
    Signed-off-by: Masahiro Yamada
    Acked-by: Kees Cook
    Acked-by: Peter Oberparleiter
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Ralf Baechle
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masahiro Yamada
     

17 Aug, 2016

1 commit

  • Pull s390 fixes from Martin Schwidefsky:
    "A couple of bug fixes, minor cleanup and a change to the default
    config"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390/dasd: fix failing CUIR assignment under LPAR
    s390/pageattr: handle numpages parameter correctly
    s390/dasd: fix hanging device after clear subchannel
    s390/qdio: avoid reschedule of outbound tasklet once killed
    s390/qdio: remove checks for ccw device internal state
    s390/qdio: fix double return code evaluation
    s390/qdio: get rid of spin_lock_irqsave usage
    s390/cio: remove subchannel_id from ccw_device_private
    s390/qdio: obtain subchannel_id via ccw_device_get_schid()
    s390/cio: stop using subchannel_id from ccw_device_private
    s390/config: make the vector optimized crc function builtin
    s390/lib: fix memcmp and strstr
    s390/crc32-vx: Fix checksum calculation for small sizes
    s390: clarify compressed image code path

    Linus Torvalds
     

14 Aug, 2016

1 commit

  • 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
     

12 Aug, 2016

3 commits

  • When triggering KVM_RUN without a user memory region being mapped
    (KVM_SET_USER_MEMORY_REGION) a validity intercept occurs. This could
    happen, if the user memory region was not mapped initially or if it
    was unmapped after the vcpu is initialized. The function
    kvm_s390_handle_requests checks for the KVM_REQ_MMU_RELOAD bit. The
    check function always clears this bit. If gmap_mprotect_notify
    returns an error code, the mapping failed, but the KVM_REQ_MMU_RELOAD
    was not set anymore. So the next time kvm_s390_handle_requests is
    called, the execution would fall trough the check for
    KVM_REQ_MMU_RELOAD. The bit needs to be resetted, if
    gmap_mprotect_notify returns an error code. Resetting the bit with
    kvm_make_request(KVM_REQ_MMU_RELOAD, vcpu) fixes the bug.

    Reviewed-by: David Hildenbrand
    Signed-off-by: Julius Niedworok
    Signed-off-by: Christian Borntraeger

    Julius Niedworok
     
  • When KVM_RUN is triggered on a VCPU without an initial reset, a
    validity intercept occurs.
    Setting the prefix will set the KVM_REQ_MMU_RELOAD bit initially,
    thus preventing the bug.

    Reviewed-by: David Hildenbrand
    Acked-by: Cornelia Huck
    Signed-off-by: Julius Niedworok
    Signed-off-by: Christian Borntraeger

    Julius Niedworok
     
  • Pull virtio/vhost fixes and cleanups from Michael Tsirkin:
    "Misc fixes and cleanups all over the place"

    * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
    virtio/s390: deprecate old transport
    virtio/s390: keep early_put_chars
    virtio_blk: Fix a slient kernel panic
    virtio-vsock: fix include guard typo
    vhost/vsock: fix vhost virtio_vsock_pkt use-after-free
    9p/trans_virtio: use kvfree() for iov_iter_get_pages_alloc()
    virtio: fix error handling for debug builds
    virtio: fix memory leak in virtqueue_add()

    Linus Torvalds
     

10 Aug, 2016

1 commit

  • Both set_memory_ro() and set_memory_rw() will modify the page
    attributes of at least one page, even if the numpages parameter is
    zero.

    The author expected that calling these functions with numpages == zero
    would never happen. However with the new 444d13ff10fb ("modules: add
    ro_after_init support") feature this happens frequently.

    Therefore do the right thing and make these two functions return
    gracefully if nothing should be done.

    Fixes crashes on module load like this one:

    Unable to handle kernel pointer dereference in virtual kernel address space
    Failing address: 000003ff80008000 TEID: 000003ff80008407
    Fault in home space mode while using kernel ASCE.
    AS:0000000000d18007 R3:00000001e6aa4007 S:00000001e6a10800 P:00000001e34ee21d
    Oops: 0004 ilc:3 [#1] SMP
    Modules linked in: x_tables
    CPU: 10 PID: 1 Comm: systemd Not tainted 4.7.0-11895-g3fa9045 #4
    Hardware name: IBM 2964 N96 703 (LPAR)
    task: 00000001e9118000 task.stack: 00000001e9120000
    Krnl PSW : 0704e00180000000 00000000005677f8 (rb_erase+0xf0/0x4d0)
    R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 RI:0 EA:3
    Krnl GPRS: 000003ff80008b20 000003ff80008b20 000003ff80008b70 0000000000b9d608
    000003ff80008b20 0000000000000000 00000001e9123e88 000003ff80008950
    00000001e485ab40 000003ff00000000 000003ff80008b00 00000001e4858480
    0000000100000000 000003ff80008b68 00000000001d5998 00000001e9123c28
    Krnl Code: 00000000005677e8: ec1801c3007c cgij %r1,0,8,567b6e
    00000000005677ee: e32010100020 cg %r2,16(%r1)
    #00000000005677f4: a78401c2 brc 8,567b78
    >00000000005677f8: e35010080024 stg %r5,8(%r1)
    00000000005677fe: ec5801af007c cgij %r5,0,8,567b5c
    0000000000567804: e30050000024 stg %r0,0(%r5)
    000000000056780a: ebacf0680004 lmg %r10,%r12,104(%r15)
    0000000000567810: 07fe bcr 15,%r14
    Call Trace:
    ([] __this_module+0x0/0xffffffffffffd700 [x_tables])
    ([] do_init_module+0x12c/0x220)
    ([] load_module+0x24e2/0x2b10)
    ([] SyS_finit_module+0xbe/0xd8)
    ([] system_call+0xd6/0x264)
    Last Breaking-Event-Address:
    [] rb_erase+0x12/0x4d0
    Kernel panic - not syncing: Fatal exception: panic_on_oops

    Reported-by: Christian Borntraeger
    Reported-and-tested-by: Sebastian Ott
    Fixes: e8a97e42dc98 ("s390/pageattr: allow kernel page table splitting")
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     

09 Aug, 2016

2 commits

  • There only ever have been two host implementations of the old
    s390-virtio (pre-ccw) transport: the experimental kuli userspace,
    and qemu. As qemu switched its default to ccw with 2.4 (with most
    users having used ccw well before that) and removed the old transport
    entirely in 2.6, s390-virtio probably hasn't been in active use for
    quite some time and is therefore likely to bitrot.

    Let's start the slow march towards removing the code by deprecating
    it.

    Note that this also deprecates the early virtio console code, which
    has been causing trouble in the guest without being wired up in any
    relevant hypervisor code.

    Acked-by: Christian Borntraeger
    Reviewed-by: Dong Jia Shi
    Reviewed-by: Sascha Silbe
    Signed-off-by: Cornelia Huck
    Signed-off-by: Michael S. Tsirkin

    Cornelia Huck
     
  • Pull usercopy protection from Kees Cook:
    "Tbhis implements HARDENED_USERCOPY verification of copy_to_user and
    copy_from_user bounds checking for most architectures on SLAB and
    SLUB"

    * tag 'usercopy-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
    mm: SLUB hardened usercopy support
    mm: SLAB hardened usercopy support
    s390/uaccess: Enable hardened usercopy
    sparc/uaccess: Enable hardened usercopy
    powerpc/uaccess: Enable hardened usercopy
    ia64/uaccess: Enable hardened usercopy
    arm64/uaccess: Enable hardened usercopy
    ARM: uaccess: Enable hardened usercopy
    x86/uaccess: Enable hardened usercopy
    mm: Hardened usercopy
    mm: Implement stack frame object validation
    mm: Add is_migrate_cma_page

    Linus Torvalds
     

08 Aug, 2016

4 commits

  • For all configs with CONFIG_BTRFS_FS = y we should also make the
    optimized crc module builtin. Otherwise early mounts will fall
    back to the software variant.

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     
  • if two string compare equal the clcle instruction will update the
    string addresses to point _after_ the string. This might already
    be on a different page, so we should not use these pointer to
    calculate the difference as in that case the calculation of the
    difference can cause oopses.

    The return value of memcmp does not need the difference, we
    can just reuse the condition code and return for CC=1 (All bytes
    compared, first operand low) -1 and for CC=2 (All bytes compared,
    first operand high) +1
    strstr also does not need the diff.
    While fixing this, make the common function clcle "correct on its
    own" by using l1 instead of l2 for the first length. strstr will
    call this with l2 for both strings.

    Signed-off-by: Christian Borntraeger
    Fixes: db7f5eef3dc0 ("s390/lib: use basic blocks for inline assemblies")
    Reviewed-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     
  • The current prealign logic will fail for sizes < alignment,
    as the new datalen passed to the vector function is smaller
    than zero. Being a size_t this gets wrapped to a huge
    number causing memory overruns and wrong data.

    Let's add an early exit if the size is smaller than the minimal
    size with alignment. This will also avoid calling the software
    fallback twice for all sizes smaller than the minimum size
    (prealign + remaining)

    Signed-off-by: Christian Borntraeger
    Fixes: f848dbd3bc1a ("s390/crc32-vx: add crypto API module for optimized CRC-32 algorithms")
    Reviewed-by: Hendrik Brueckner
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     
  • The way the decompressor is hooked into the start-up code is rather
    subtle, with a mix of multiply-defined symbols and hardcoded address
    literals. Add some comments at the junction points to clarify how it
    works.

    Signed-off-by: Sascha Silbe
    Signed-off-by: Martin Schwidefsky

    Sascha Silbe
     

04 Aug, 2016

1 commit

  • The dma-mapping core and the implementations do not change the DMA
    attributes passed by pointer. Thus the pointer can point to const data.
    However the attributes do not have to be a bitfield. Instead unsigned
    long will do fine:

    1. This is just simpler. Both in terms of reading the code and setting
    attributes. Instead of initializing local attributes on the stack
    and passing pointer to it to dma_set_attr(), just set the bits.

    2. It brings safeness and checking for const correctness because the
    attributes are passed by value.

    Semantic patches for this change (at least most of them):

    virtual patch
    virtual context

    @r@
    identifier f, attrs;

    @@
    f(...,
    - struct dma_attrs *attrs
    + unsigned long attrs
    , ...)
    {
    ...
    }

    @@
    identifier r.f;
    @@
    f(...,
    - NULL
    + 0
    )

    and

    // Options: --all-includes
    virtual patch
    virtual context

    @r@
    identifier f, attrs;
    type t;

    @@
    t f(..., struct dma_attrs *attrs);

    @@
    identifier r.f;
    @@
    f(...,
    - NULL
    + 0
    )

    Link: http://lkml.kernel.org/r/1468399300-5399-2-git-send-email-k.kozlowski@samsung.com
    Signed-off-by: Krzysztof Kozlowski
    Acked-by: Vineet Gupta
    Acked-by: Robin Murphy
    Acked-by: Hans-Christian Noren Egtvedt
    Acked-by: Mark Salter [c6x]
    Acked-by: Jesper Nilsson [cris]
    Acked-by: Daniel Vetter [drm]
    Reviewed-by: Bart Van Assche
    Acked-by: Joerg Roedel [iommu]
    Acked-by: Fabien Dessenne [bdisp]
    Reviewed-by: Marek Szyprowski [vb2-core]
    Acked-by: David Vrabel [xen]
    Acked-by: Konrad Rzeszutek Wilk [xen swiotlb]
    Acked-by: Joerg Roedel [iommu]
    Acked-by: Richard Kuo [hexagon]
    Acked-by: Geert Uytterhoeven [m68k]
    Acked-by: Gerald Schaefer [s390]
    Acked-by: Bjorn Andersson
    Acked-by: Hans-Christian Noren Egtvedt [avr32]
    Acked-by: Vineet Gupta [arc]
    Acked-by: Robin Murphy [arm64 and dma-iommu]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Krzysztof Kozlowski
     

03 Aug, 2016

2 commits

  • Pull kbuild updates from Michal Marek:

    - GCC plugin support by Emese Revfy from grsecurity, with a fixup from
    Kees Cook. The plugins are meant to be used for static analysis of
    the kernel code. Two plugins are provided already.

    - reduction of the gcc commandline by Arnd Bergmann.

    - IS_ENABLED / IS_REACHABLE macro enhancements by Masahiro Yamada

    - bin2c fix by Michael Tautschnig

    - setlocalversion fix by Wolfram Sang

    * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
    gcc-plugins: disable under COMPILE_TEST
    kbuild: Abort build on bad stack protector flag
    scripts: Fix size mismatch of kexec_purgatory_size
    kbuild: make samples depend on headers_install
    Kbuild: don't add obj tree in additional includes
    Kbuild: arch: look for generated headers in obtree
    Kbuild: always prefix objtree in LINUXINCLUDE
    Kbuild: avoid duplicate include path
    Kbuild: don't add ../../ to include path
    vmlinux.lds.h: replace config_enabled() with IS_ENABLED()
    kconfig.h: allow to use IS_{ENABLE,REACHABLE} in macro expansion
    kconfig.h: use already defined macros for IS_REACHABLE() define
    export.h: use __is_defined() to check if __KSYM_* is defined
    kconfig.h: use __is_defined() to check if MODULE is defined
    kbuild: setlocalversion: print error to STDERR
    Add sancov plugin
    Add Cyclomatic complexity GCC plugin
    GCC plugin infrastructure
    Shared library support

    Linus Torvalds
     
  • Pull KVM updates from Paolo Bonzini:

    - ARM: GICv3 ITS emulation and various fixes. Removal of the
    old VGIC implementation.

    - s390: support for trapping software breakpoints, nested
    virtualization (vSIE), the STHYI opcode, initial extensions
    for CPU model support.

    - MIPS: support for MIPS64 hosts (32-bit guests only) and lots
    of cleanups, preliminary to this and the upcoming support for
    hardware virtualization extensions.

    - x86: support for execute-only mappings in nested EPT; reduced
    vmexit latency for TSC deadline timer (by about 30%) on Intel
    hosts; support for more than 255 vCPUs.

    - PPC: bugfixes.

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (302 commits)
    KVM: PPC: Introduce KVM_CAP_PPC_HTM
    MIPS: Select HAVE_KVM for MIPS64_R{2,6}
    MIPS: KVM: Reset CP0_PageMask during host TLB flush
    MIPS: KVM: Fix ptr->int cast via KVM_GUEST_KSEGX()
    MIPS: KVM: Sign extend MFC0/RDHWR results
    MIPS: KVM: Fix 64-bit big endian dynamic translation
    MIPS: KVM: Fail if ebase doesn't fit in CP0_EBase
    MIPS: KVM: Use 64-bit CP0_EBase when appropriate
    MIPS: KVM: Set CP0_Status.KX on MIPS64
    MIPS: KVM: Make entry code MIPS64 friendly
    MIPS: KVM: Use kmap instead of CKSEG0ADDR()
    MIPS: KVM: Use virt_to_phys() to get commpage PFN
    MIPS: Fix definition of KSEGX() for 64-bit
    KVM: VMX: Add VMCS to CPU's loaded VMCSs before VMPTRLD
    kvm: x86: nVMX: maintain internal copy of current VMCS
    KVM: PPC: Book3S HV: Save/restore TM state in H_CEDE
    KVM: PPC: Book3S HV: Pull out TM state save/restore into separate procedures
    KVM: arm64: vgic-its: Simplify MAPI error handling
    KVM: arm64: vgic-its: Make vgic_its_cmd_handle_mapi similar to other handlers
    KVM: arm64: vgic-its: Turn device_id validation into generic ID validation
    ...

    Linus Torvalds
     

31 Jul, 2016

10 commits

  • This fixes the same issue Steven already fixed for x86
    in following commit:

    237d28db036e ftrace/jprobes/x86: Fix conflict between jprobes and function graph tracing

    It fixes the crash, that happens when function graph tracing
    and jprobes are used simultaneously. Please refer to above
    commit for details.

    Signed-off-by: Jiri Olsa
    Signed-off-by: Martin Schwidefsky
    Acked-by: Steven Rostedt

    Jiri Olsa
     
  • AT_VECTOR_SIZE_ARCH should be defined with the maximum number of
    NEW_AUX_ENT entries that ARCH_DLINFO can contain, but it wasn't defined
    for s390 at all even though ARCH_DLINFO can contain one NEW_AUX_ENT when
    VDSO is enabled.

    This shouldn't be a problem as AT_VECTOR_SIZE_BASE includes space for
    AT_BASE_PLATFORM which s390 doesn't use, but lets define it now and add
    the comment above ARCH_DLINFO as found in several other architectures to
    remind future modifiers of ARCH_DLINFO to keep AT_VECTOR_SIZE_ARCH up to
    date.

    Fixes: b020632e40c3 ("[S390] introduce vdso on s390")
    Signed-off-by: James Hogan
    Signed-off-by: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: linux-s390@vger.kernel.org

    James Hogan
     
  • Make sure that only those nodes appear in the node_possible_map that
    may actually be used. Usually that means that the node online and
    possible maps are identical. For mode "plain" we only have one node,
    for mode "emu" we have "emu_nodes" nodes.

    Before this the possible map included (with default config) 16 nodes
    while usually only one was used. That made a couple of loops that
    iterated over all possible nodes do more work than necessary.

    Signed-off-by: Heiko Carstens
    Acked-by: Michael Holzheu
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • Fix this one when gcov is enabled:

    arch/s390/kernel/als.o:(.data+0x118): undefined reference to `__gcov_merge_add'
    arch/s390/kernel/als.o: In function `_GLOBAL__sub_I_65535_0_verify_facilities':
    (.text.startup+0x8): undefined reference to `__gcov_init'

    Please merge with "s390/als: convert architecture level set code to C".

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • The architecture level set code has been converted to C and doesn't
    need a define to figure out array sizes. Since the old code was the
    only user of the DWORDS define, we can get rid of it again.

    Signed-off-by: Heiko Carstens
    Reviewed-by: Sascha Silbe
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • If the kernel needs more facilities to run than the machine provides
    it is running on, print the facility bit numbers which are missing.

    This allows to easily tell what went wrong and if simply the machine
    does not provide a required facility or if either the kernel or the
    hypervisor may have a bug.

    Signed-off-by: Heiko Carstens
    Reviewed-by: Sascha Silbe
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • If we have a facility mismatch the kernel only emits a warning that
    the processor is not recent enough and stops operating. This doesn't
    give us a lot of an idea of what actually went wrong.

    As a first step print the machine type in addition.

    Signed-off-by: Heiko Carstens
    Reviewed-by: Sascha Silbe
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • There is no reason to have this code in assembly language. Therefore
    convert it to C.

    Note that this code needs special treatment: it is called very early
    and one of the side effects is that e.g. the bss section is not
    cleared. Therefore the preferred way for static variables is to put
    them on the stack which has a size of 16KB.

    There is no functional change with this patch.

    Signed-off-by: Heiko Carstens
    Reviewed-by: Sascha Silbe
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • The early sclp code may be called before the bss section is
    cleared. Therefore move all variables to the data section.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • The hugetlbfs ptepmd conversion functions currently assume that the pmd
    bit layout is consistent with the pte layout, which is not really true.

    The SW read and write bits are encoded as the sequence "wr" in a pte, but
    in a pmd it is "rw". The hugetlbfs conversion assumes that the sequence
    is identical in both cases, which results in swapped read and write bits
    in the pmd. In practice this is not a problem, because those pmd bits are
    only relevant for THP pmds and not for hugetlbfs pmds. The hugetlbfs code
    works on (fake) ptes, and the converted pte bits are correct.

    There is another variation in pte/pmd encoding which affects dirty
    prot-none ptes/pmds. In this case, a pmd has both its HW read-only and
    invalid bit set, while it is only the invalid bit for a pte. This also has
    no effect in practice, but it should better be consistent.

    This patch fixes both inconsistencies by changing the SW read/write bit
    layout for pmds as well as the PAGE_NONE encoding for ptes. It also makes
    the hugetlbfs conversion functions more robust by introducing a
    move_set_bit() macro that uses the pte/pmd bit #defines instead of
    constant shifts.

    Signed-off-by: Gerald Schaefer
    Signed-off-by: Martin Schwidefsky

    Gerald Schaefer
     

30 Jul, 2016

3 commits

  • Pull audit updates from Paul Moore:
    "Six audit patches for 4.8.

    There are a couple of style and minor whitespace tweaks for the logs,
    as well as a minor fixup to catch errors on user filter rules, however
    the major improvements are a fix to the s390 syscall argument masking
    code (reviewed by the nice s390 folks), some consolidation around the
    exclude filtering (less code, always a win), and a double-fetch fix
    for recording the execve arguments"

    * 'stable-4.8' of git://git.infradead.org/users/pcmoore/audit:
    audit: fix a double fetch in audit_log_single_execve_arg()
    audit: fix whitespace in CWD record
    audit: add fields to exclude filter by reusing user filter
    s390: ensure that syscall arguments are properly masked on s390
    audit: fix some horrible switch statement style crimes
    audit: fixup: log on errors from filter user rules

    Linus Torvalds
     
  • Pull security subsystem updates from James Morris:
    "Highlights:

    - TPM core and driver updates/fixes
    - IPv6 security labeling (CALIPSO)
    - Lots of Apparmor fixes
    - Seccomp: remove 2-phase API, close hole where ptrace can change
    syscall #"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (156 commits)
    apparmor: fix SECURITY_APPARMOR_HASH_DEFAULT parameter handling
    tpm: Add TPM 2.0 support to the Nuvoton i2c driver (NPCT6xx family)
    tpm: Factor out common startup code
    tpm: use devm_add_action_or_reset
    tpm2_i2c_nuvoton: add irq validity check
    tpm: read burstcount from TPM_STS in one 32-bit transaction
    tpm: fix byte-order for the value read by tpm2_get_tpm_pt
    tpm_tis_core: convert max timeouts from msec to jiffies
    apparmor: fix arg_size computation for when setprocattr is null terminated
    apparmor: fix oops, validate buffer size in apparmor_setprocattr()
    apparmor: do not expose kernel stack
    apparmor: fix module parameters can be changed after policy is locked
    apparmor: fix oops in profile_unpack() when policy_db is not present
    apparmor: don't check for vmalloc_addr if kvzalloc() failed
    apparmor: add missing id bounds check on dfa verification
    apparmor: allow SYS_CAP_RESOURCE to be sufficient to prlimit another task
    apparmor: use list_next_entry instead of list_entry_next
    apparmor: fix refcount race when finding a child profile
    apparmor: fix ref count leak when profile sha1 hash is read
    apparmor: check that xindex is in trans_table bounds
    ...

    Linus Torvalds
     
  • Pull smp hotplug updates from Thomas Gleixner:
    "This is the next part of the hotplug rework.

    - Convert all notifiers with a priority assigned

    - Convert all CPU_STARTING/DYING notifiers

    The final removal of the STARTING/DYING infrastructure will happen
    when the merge window closes.

    Another 700 hundred line of unpenetrable maze gone :)"

    * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (70 commits)
    timers/core: Correct callback order during CPU hot plug
    leds/trigger/cpu: Move from CPU_STARTING to ONLINE level
    powerpc/numa: Convert to hotplug state machine
    arm/perf: Fix hotplug state machine conversion
    irqchip/armada: Avoid unused function warnings
    ARC/time: Convert to hotplug state machine
    clocksource/atlas7: Convert to hotplug state machine
    clocksource/armada-370-xp: Convert to hotplug state machine
    clocksource/exynos_mct: Convert to hotplug state machine
    clocksource/arm_global_timer: Convert to hotplug state machine
    rcu: Convert rcutree to hotplug state machine
    KVM/arm/arm64/vgic-new: Convert to hotplug state machine
    smp/cfd: Convert core to hotplug state machine
    x86/x2apic: Convert to CPU hotplug state machine
    profile: Convert to hotplug state machine
    timers/core: Convert to hotplug state machine
    hrtimer: Convert to hotplug state machine
    x86/tboot: Convert to hotplug state machine
    arm64/armv8 deprecated: Convert to hotplug state machine
    hwtracing/coresight-etm4x: Convert to hotplug state machine
    ...

    Linus Torvalds
     

29 Jul, 2016

1 commit

  • There are now a number of accounting oddities such as mapped file pages
    being accounted for on the node while the total number of file pages are
    accounted on the zone. This can be coped with to some extent but it's
    confusing so this patch moves the relevant file-based accounted. Due to
    throttling logic in the page allocator for reliable OOM detection, it is
    still necessary to track dirty and writeback pages on a per-zone basis.

    [mgorman@techsingularity.net: fix NR_ZONE_WRITE_PENDING accounting]
    Link: http://lkml.kernel.org/r/1468404004-5085-5-git-send-email-mgorman@techsingularity.net
    Link: http://lkml.kernel.org/r/1467970510-21195-20-git-send-email-mgorman@techsingularity.net
    Signed-off-by: Mel Gorman
    Acked-by: Vlastimil Babka
    Acked-by: Michal Hocko
    Cc: Hillf Danton
    Acked-by: Johannes Weiner
    Cc: Joonsoo Kim
    Cc: Minchan Kim
    Cc: Rik van Riel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     

28 Jul, 2016

1 commit

  • Pull networking updates from David Miller:

    1) Unified UDP encapsulation offload methods for drivers, from
    Alexander Duyck.

    2) Make DSA binding more sane, from Andrew Lunn.

    3) Support QCA9888 chips in ath10k, from Anilkumar Kolli.

    4) Several workqueue usage cleanups, from Bhaktipriya Shridhar.

    5) Add XDP (eXpress Data Path), essentially running BPF programs on RX
    packets as soon as the device sees them, with the option to mirror
    the packet on TX via the same interface. From Brenden Blanco and
    others.

    6) Allow qdisc/class stats dumps to run lockless, from Eric Dumazet.

    7) Add VLAN support to b53 and bcm_sf2, from Florian Fainelli.

    8) Simplify netlink conntrack entry layout, from Florian Westphal.

    9) Add ipv4 forwarding support to mlxsw spectrum driver, from Ido
    Schimmel, Yotam Gigi, and Jiri Pirko.

    10) Add SKB array infrastructure and convert tun and macvtap over to it.
    From Michael S Tsirkin and Jason Wang.

    11) Support qdisc packet injection in pktgen, from John Fastabend.

    12) Add neighbour monitoring framework to TIPC, from Jon Paul Maloy.

    13) Add NV congestion control support to TCP, from Lawrence Brakmo.

    14) Add GSO support to SCTP, from Marcelo Ricardo Leitner.

    15) Allow GRO and RPS to function on macsec devices, from Paolo Abeni.

    16) Support MPLS over IPV4, from Simon Horman.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1622 commits)
    xgene: Fix build warning with ACPI disabled.
    be2net: perform temperature query in adapter regardless of its interface state
    l2tp: Correctly return -EBADF from pppol2tp_getname.
    net/mlx5_core/health: Remove deprecated create_singlethread_workqueue
    net: ipmr/ip6mr: update lastuse on entry change
    macsec: ensure rx_sa is set when validation is disabled
    tipc: dump monitor attributes
    tipc: add a function to get the bearer name
    tipc: get monitor threshold for the cluster
    tipc: make cluster size threshold for monitoring configurable
    tipc: introduce constants for tipc address validation
    net: neigh: disallow transition to NUD_STALE if lladdr is unchanged in neigh_update()
    MAINTAINERS: xgene: Add driver and documentation path
    Documentation: dtb: xgene: Add MDIO node
    dtb: xgene: Add MDIO node
    drivers: net: xgene: ethtool: Use phy_ethtool_gset and sset
    drivers: net: xgene: Use exported functions
    drivers: net: xgene: Enable MDIO driver
    drivers: net: xgene: Add backward compatibility
    drivers: net: phy: xgene: Add MDIO driver
    ...

    Linus Torvalds
     

27 Jul, 2016

7 commits

  • Merge updates from Andrew Morton:

    - a few misc bits

    - ocfs2

    - most(?) of MM

    * emailed patches from Andrew Morton : (125 commits)
    thp: fix comments of __pmd_trans_huge_lock()
    cgroup: remove unnecessary 0 check from css_from_id()
    cgroup: fix idr leak for the first cgroup root
    mm: memcontrol: fix documentation for compound parameter
    mm: memcontrol: remove BUG_ON in uncharge_list
    mm: fix build warnings in
    mm, thp: convert from optimistic swapin collapsing to conservative
    mm, thp: fix comment inconsistency for swapin readahead functions
    thp: update Documentation/{vm/transhuge,filesystems/proc}.txt
    shmem: split huge pages beyond i_size under memory pressure
    thp: introduce CONFIG_TRANSPARENT_HUGE_PAGECACHE
    khugepaged: add support of collapse for tmpfs/shmem pages
    shmem: make shmem_inode_info::lock irq-safe
    khugepaged: move up_read(mmap_sem) out of khugepaged_alloc_page()
    thp: extract khugepaged from mm/huge_memory.c
    shmem, thp: respect MADV_{NO,}HUGEPAGE for file mappings
    shmem: add huge pages support
    shmem: get_unmapped_area align huge page
    shmem: prepare huge= mount option and sysfs knob
    mm, rmap: account shmem thp pages
    ...

    Linus Torvalds
     
  • We always have vma->vm_mm around.

    Link: http://lkml.kernel.org/r/1466021202-61880-8-git-send-email-kirill.shutemov@linux.intel.com
    Signed-off-by: Kirill A. Shutemov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill A. Shutemov
     
  • This allows an arch which needs to do special handing with respect to
    different page size when flushing tlb to implement the same in mmu
    gather.

    Link: http://lkml.kernel.org/r/1465049193-22197-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com
    Signed-off-by: Aneesh Kumar K.V
    Cc: Benjamin Herrenschmidt
    Cc: Michael Ellerman
    Cc: Hugh Dickins
    Cc: "Kirill A. Shutemov"
    Cc: Andrea Arcangeli
    Cc: Joonsoo Kim
    Cc: Mel Gorman
    Cc: David Rientjes
    Cc: Vlastimil Babka
    Cc: Minchan Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Aneesh Kumar K.V
     
  • This updates the generic and arch specific implementation to return true
    if we need to do a tlb flush. That means if a __tlb_remove_page
    indicate a flush is needed, the page we try to remove need to be tracked
    and added again after the flush. We need to track it because we have
    already update the pte to none and we can't just loop back.

    This change is done to enable us to do a tlb_flush when we try to flush
    a range that consists of different page sizes. For architectures like
    ppc64, we can do a range based tlb flush and we need to track page size
    for that. When we try to remove a huge page, we will force a tlb flush
    and starts a new mmu gather.

    [aneesh.kumar@linux.vnet.ibm.com: mm-change-the-interface-for-__tlb_remove_page-v3]
    Link: http://lkml.kernel.org/r/1465049193-22197-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com
    Link: http://lkml.kernel.org/r/1464860389-29019-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com
    Signed-off-by: Aneesh Kumar K.V
    Cc: Benjamin Herrenschmidt
    Cc: Michael Ellerman
    Cc: Hugh Dickins
    Cc: "Kirill A. Shutemov"
    Cc: Andrea Arcangeli
    Cc: Joonsoo Kim
    Cc: Mel Gorman
    Cc: David Rientjes
    Cc: Vlastimil Babka
    Cc: Minchan Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Aneesh Kumar K.V
     
  • Enables CONFIG_HARDENED_USERCOPY checks on s390.

    Signed-off-by: Kees Cook

    Kees Cook
     
  • Pull crypto updates from Herbert Xu:
    "Here is the crypto update for 4.8:

    API:
    - first part of skcipher low-level conversions
    - add KPP (Key-agreement Protocol Primitives) interface.

    Algorithms:
    - fix IPsec/cryptd reordering issues that affects aesni
    - RSA no longer does explicit leading zero removal
    - add SHA3
    - add DH
    - add ECDH
    - improve DRBG performance by not doing CTR by hand

    Drivers:
    - add x86 AVX2 multibuffer SHA256/512
    - add POWER8 optimised crc32c
    - add xts support to vmx
    - add DH support to qat
    - add RSA support to caam
    - add Layerscape support to caam
    - add SEC1 AEAD support to talitos
    - improve performance by chaining requests in marvell/cesa
    - add support for Araneus Alea I USB RNG
    - add support for Broadcom BCM5301 RNG
    - add support for Amlogic Meson RNG
    - add support Broadcom NSP SoC RNG"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (180 commits)
    crypto: vmx - Fix aes_p8_xts_decrypt build failure
    crypto: vmx - Ignore generated files
    crypto: vmx - Adding support for XTS
    crypto: vmx - Adding asm subroutines for XTS
    crypto: skcipher - add comment for skcipher_alg->base
    crypto: testmgr - Print akcipher algorithm name
    crypto: marvell - Fix wrong flag used for GFP in mv_cesa_dma_add_iv_op
    crypto: nx - off by one bug in nx_of_update_msc()
    crypto: rsa-pkcs1pad - fix rsa-pkcs1pad request struct
    crypto: scatterwalk - Inline start/map/done
    crypto: scatterwalk - Remove unnecessary BUG in scatterwalk_start
    crypto: scatterwalk - Remove unnecessary advance in scatterwalk_pagedone
    crypto: scatterwalk - Fix test in scatterwalk_done
    crypto: api - Optimise away crypto_yield when hard preemption is on
    crypto: scatterwalk - add no-copy support to copychunks
    crypto: scatterwalk - Remove scatterwalk_bytes_sglen
    crypto: omap - Stop using crypto scatterwalk_bytes_sglen
    crypto: skcipher - Remove top-level givcipher interface
    crypto: user - Remove crypto_lookup_skcipher call
    crypto: cts - Convert to skcipher
    ...

    Linus Torvalds
     
  • Pull s390 updates from Martin Schwidefsky:
    "There are a couple of new things for s390 with this merge request:

    - a new scheduling domain "drawer" is added to reflect the unusual
    topology found on z13 machines. Performance tests showed up to 8
    percent gain with the additional domain.

    - the new crc-32 checksum crypto module uses the vector-galois-field
    multiply and sum SIMD instruction to speed up crc-32 and crc-32c.

    - proper __ro_after_init support, this requires RO_AFTER_INIT_DATA in
    the generic vmlinux.lds linker script definitions.

    - kcov instrumentation support. A prerequisite for that is the
    inline assembly basic block cleanup, which is the reason for the
    net/iucv/iucv.c change.

    - support for 2GB pages is added to the hugetlbfs backend.

    Then there are two removals:

    - the oprofile hardware sampling support is dead code and is removed.
    The oprofile user space uses the perf interface nowadays.

    - the ETR clock synchronization is removed, this has been superseeded
    be the STP clock synchronization. And it always has been
    "interesting" code..

    And the usual bug fixes and cleanups"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (82 commits)
    s390/pci: Delete an unnecessary check before the function call "pci_dev_put"
    s390/smp: clean up a condition
    s390/cio/chp : Remove deprecated create_singlethread_workqueue
    s390/chsc: improve channel path descriptor determination
    s390/chsc: sanitize fmt check for chp_desc determination
    s390/cio: make fmt1 channel path descriptor optional
    s390/chsc: fix ioctl CHSC_INFO_CU command
    s390/cio/device_ops: fix kernel doc
    s390/cio: allow to reset channel measurement block
    s390/console: Make preferred console handling more consistent
    s390/mm: fix gmap tlb flush issues
    s390/mm: add support for 2GB hugepages
    s390: have unique symbol for __switch_to address
    s390/cpuinfo: show maximum thread id
    s390/ptrace: clarify bits in the per_struct
    s390: stack address vs thread_info
    s390: remove pointless load within __switch_to
    s390: enable kcov support
    s390/cpumf: use basic block for ecctr inline assembly
    s390/hypfs: use basic block for diag inline assembly
    ...

    Linus Torvalds
     

26 Jul, 2016

1 commit

  • Pull locking updates from Ingo Molnar:
    "The locking tree was busier in this cycle than the usual pattern - a
    couple of major projects happened to coincide.

    The main changes are:

    - implement the atomic_fetch_{add,sub,and,or,xor}() API natively
    across all SMP architectures (Peter Zijlstra)

    - add atomic_fetch_{inc/dec}() as well, using the generic primitives
    (Davidlohr Bueso)

    - optimize various aspects of rwsems (Jason Low, Davidlohr Bueso,
    Waiman Long)

    - optimize smp_cond_load_acquire() on arm64 and implement LSE based
    atomic{,64}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()
    on arm64 (Will Deacon)

    - introduce smp_acquire__after_ctrl_dep() and fix various barrier
    mis-uses and bugs (Peter Zijlstra)

    - after discovering ancient spin_unlock_wait() barrier bugs in its
    implementation and usage, strengthen its semantics and update/fix
    usage sites (Peter Zijlstra)

    - optimize mutex_trylock() fastpath (Peter Zijlstra)

    - ... misc fixes and cleanups"

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (67 commits)
    locking/atomic: Introduce inc/dec variants for the atomic_fetch_$op() API
    locking/barriers, arch/arm64: Implement LDXR+WFE based smp_cond_load_acquire()
    locking/static_keys: Fix non static symbol Sparse warning
    locking/qspinlock: Use __this_cpu_dec() instead of full-blown this_cpu_dec()
    locking/atomic, arch/tile: Fix tilepro build
    locking/atomic, arch/m68k: Remove comment
    locking/atomic, arch/arc: Fix build
    locking/Documentation: Clarify limited control-dependency scope
    locking/atomic, arch/rwsem: Employ atomic_long_fetch_add()
    locking/atomic, arch/qrwlock: Employ atomic_fetch_add_acquire()
    locking/atomic, arch/mips: Convert to _relaxed atomics
    locking/atomic, arch/alpha: Convert to _relaxed atomics
    locking/atomic: Remove the deprecated atomic_{set,clear}_mask() functions
    locking/atomic: Remove linux/atomic.h:atomic_fetch_or()
    locking/atomic: Implement atomic{,64,_long}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()
    locking/atomic: Fix atomic64_relaxed() bits
    locking/atomic, arch/xtensa: Implement atomic_fetch_{add,sub,and,or,xor}()
    locking/atomic, arch/x86: Implement atomic{,64}_fetch_{add,sub,and,or,xor}()
    locking/atomic, arch/tile: Implement atomic{,64}_fetch_{add,sub,and,or,xor}()
    locking/atomic, arch/sparc: Implement atomic{,64}_fetch_{add,sub,and,or,xor}()
    ...

    Linus Torvalds
     

19 Jul, 2016

1 commit

  • There are very few files that need add an -I$(obj) gcc for the preprocessor
    or the assembler. For C files, we add always these for both the objtree and
    srctree, but for the other ones we require the Makefile to add them, and
    Kbuild then adds it for both trees.

    As a preparation for changing the meaning of the -I$(obj) directive to
    only refer to the srctree, this changes the two instances in arch/x86 to use
    an explictit $(objtree) prefix where needed, otherwise we won't find the
    headers any more, as reported by the kbuild 0day builder.

    arch/x86/realmode/rm/realmode.lds.S:75:20: fatal error: pasyms.h: No such file or directory

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Michal Marek

    Arnd Bergmann