13 Feb, 2018

1 commit

  • commit 10b62a2f785ab55857380f0c63d9fa468fd8c676 upstream.

    Most of DT files are compiled under arch/*/boot/dts/, but we have some
    other directories, like drivers/of/unittest-data/. We often miss to
    add gitignore patterns per directory. Since there are no source files
    that end with .dtb or .dtb.S, we can ignore the patterns globally.

    Signed-off-by: Masahiro Yamada
    Signed-off-by: Rob Herring
    Signed-off-by: Greg Kroah-Hartman

    Masahiro Yamada
     

02 Nov, 2017

3 commits

  • Many user space API headers have licensing information, which is either
    incomplete, badly formatted or just a shorthand for referring to the
    license under which the file is supposed to be. This makes it hard for
    compliance tools to determine the correct license.

    Update these files with an SPDX license identifier. The identifier was
    chosen based on the license information in the file.

    GPL/LGPL licensed headers get the matching GPL/LGPL SPDX license
    identifier with the added 'WITH Linux-syscall-note' exception, which is
    the officially assigned exception identifier for the kernel syscall
    exception:

    NOTE! This copyright does *not* cover user programs that use kernel
    services by normal system calls - this is merely considered normal use
    of the kernel, and does *not* fall under the heading of "derived work".

    This exception makes it possible to include GPL headers into non GPL
    code, without confusing license compliance tools.

    Headers which have either explicit dual licensing or are just licensed
    under a non GPL license are updated with the corresponding SPDX
    identifier and the GPLv2 with syscall exception identifier. The format
    is:
    ((GPL-2.0 WITH Linux-syscall-note) OR SPDX-ID-OF-OTHER-LICENSE)

    SPDX license identifiers are a legally binding shorthand, which can be
    used instead of the full boiler plate text. The update does not remove
    existing license information as this has to be done on a case by case
    basis and the copyright holders might have to be consulted. This will
    happen in a separate step.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne. See the previous patch in this series for the
    methodology of how this patch was researched.

    Reviewed-by: Kate Stewart
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Many user space API headers are missing licensing information, which
    makes it hard for compliance tools to determine the correct license.

    By default are files without license information under the default
    license of the kernel, which is GPLV2. Marking them GPLV2 would exclude
    them from being included in non GPLV2 code, which is obviously not
    intended. The user space API headers fall under the syscall exception
    which is in the kernels COPYING file:

    NOTE! This copyright does *not* cover user programs that use kernel
    services by normal system calls - this is merely considered normal use
    of the kernel, and does *not* fall under the heading of "derived work".

    otherwise syscall usage would not be possible.

    Update the files which contain no license information with an SPDX
    license identifier. The chosen identifier is 'GPL-2.0 WITH
    Linux-syscall-note' which is the officially assigned identifier for the
    Linux syscall exception. SPDX license identifiers are a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne. See the previous patch in this series for the
    methodology of how this patch was researched.

    Reviewed-by: Kate Stewart
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

23 Sep, 2017

1 commit


13 Sep, 2017

1 commit

  • Pull dma-mapping updates from Christoph Hellwig:

    - removal of the old dma_alloc_noncoherent interface

    - remove unused flags to dma_declare_coherent_memory

    - restrict OF DMA configuration to specific physical busses

    - use the iommu mailing list for dma-mapping questions and patches

    * tag 'dma-mapping-4.14' of git://git.infradead.org/users/hch/dma-mapping:
    dma-coherent: fix dma_declare_coherent_memory() logic error
    ARM: imx: mx31moboard: Remove unused 'dma' variable
    dma-coherent: remove an unused variable
    MAINTAINERS: use the iommu list for the dma-mapping subsystem
    dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags
    dma-coherent: remove the DMA_MEMORY_INCLUDES_CHILDREN flag
    of: restrict DMA configuration
    dma-mapping: remove dma_alloc_noncoherent and dma_free_noncoherent
    i825xx: switch to switch to dma_alloc_attrs
    au1000_eth: switch to dma_alloc_attrs
    sgiseeq: switch to dma_alloc_attrs
    dma-mapping: reduce dma_mapping_error inline bloat

    Linus Torvalds
     

07 Sep, 2017

1 commit

  • Commit a7be6e5a7f8d ("mm: drop useless local parameters of
    __register_one_node()") removes the last user of parent_node().

    The parent_node() macro in METAG architecture is unnecessary.

    Remove it for cleanup.

    Link: http://lkml.kernel.org/r/1501076076-1974-4-git-send-email-douly.fnst@cn.fujitsu.com
    Signed-off-by: Dou Liyang
    Reported-by: Michael Ellerman
    Cc: James Hogan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dou Liyang
     

05 Sep, 2017

2 commits

  • Pull irq updates from Thomas Gleixner:
    "The interrupt subsystem delivers this time:

    - Refactoring of the GIC-V3 driver to prepare for the GIC-V4 support

    - Initial GIC-V4 support

    - Consolidation of the FSL MSI support

    - Utilize the effective affinity interface in various ARM irqchip
    drivers

    - Yet another interrupt chip driver (UniPhier AIDET)

    - Bulk conversion of the irq chip driver to use %pOF

    - The usual small fixes and improvements all over the place"

    * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (77 commits)
    irqchip/ls-scfg-msi: Add MSI affinity support
    irqchip/ls-scfg-msi: Add LS1043a v1.1 MSI support
    irqchip/ls-scfg-msi: Add LS1046a MSI support
    arm64: dts: ls1046a: Add MSI dts node
    arm64: dts: ls1043a: Share all MSIs
    arm: dts: ls1021a: Share all MSIs
    arm64: dts: ls1043a: Fix typo of MSI compatible string
    arm: dts: ls1021a: Fix typo of MSI compatible string
    irqchip/ls-scfg-msi: Fix typo of MSI compatible strings
    irqchip/irq-bcm7120-l2: Use correct I/O accessors for irq_fwd_mask
    irqchip/mmp: Make mmp_intc_conf const
    irqchip/gic: Make irq_chip const
    irqchip/gic-v3: Advertise GICv4 support to KVM
    irqchip/gic-v4: Enable low-level GICv4 operations
    irqchip/gic-v4: Add some basic documentation
    irqchip/gic-v4: Add VLPI configuration interface
    irqchip/gic-v4: Add VPE command interface
    irqchip/gic-v4: Add per-VM VPE domain creation
    irqchip/gic-v3-its: Set implementation defined bit to enable VLPIs
    irqchip/gic-v3-its: Allow doorbell interrupts to be injected/cleared
    ...

    Linus Torvalds
     
  • Pull locking updates from Ingo Molnar:

    - Add 'cross-release' support to lockdep, which allows APIs like
    completions, where it's not the 'owner' who releases the lock, to be
    tracked. It's all activated automatically under
    CONFIG_PROVE_LOCKING=y.

    - Clean up (restructure) the x86 atomics op implementation to be more
    readable, in preparation of KASAN annotations. (Dmitry Vyukov)

    - Fix static keys (Paolo Bonzini)

    - Add killable versions of down_read() et al (Kirill Tkhai)

    - Rework and fix jump_label locking (Marc Zyngier, Paolo Bonzini)

    - Rework (and fix) tlb_flush_pending() barriers (Peter Zijlstra)

    - Remove smp_mb__before_spinlock() and convert its usages, introduce
    smp_mb__after_spinlock() (Peter Zijlstra)

    * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (56 commits)
    locking/lockdep/selftests: Fix mixed read-write ABBA tests
    sched/completion: Avoid unnecessary stack allocation for COMPLETION_INITIALIZER_ONSTACK()
    acpi/nfit: Fix COMPLETION_INITIALIZER_ONSTACK() abuse
    locking/pvqspinlock: Relax cmpxchg's to improve performance on some architectures
    smp: Avoid using two cache lines for struct call_single_data
    locking/lockdep: Untangle xhlock history save/restore from task independence
    locking/refcounts, x86/asm: Disable CONFIG_ARCH_HAS_REFCOUNT for the time being
    futex: Remove duplicated code and fix undefined behaviour
    Documentation/locking/atomic: Finish the document...
    locking/lockdep: Fix workqueue crossrelease annotation
    workqueue/lockdep: 'Fix' flush_work() annotation
    locking/lockdep/selftests: Add mixed read-write ABBA tests
    mm, locking/barriers: Clarify tlb_flush_pending() barriers
    locking/lockdep: Make CONFIG_LOCKDEP_CROSSRELEASE and CONFIG_LOCKDEP_COMPLETIONS truly non-interactive
    locking/lockdep: Explicitly initialize wq_barrier::done::map
    locking/lockdep: Rename CONFIG_LOCKDEP_COMPLETE to CONFIG_LOCKDEP_COMPLETIONS
    locking/lockdep: Reword title of LOCKDEP_CROSSRELEASE config
    locking/lockdep: Make CONFIG_LOCKDEP_CROSSRELEASE part of CONFIG_PROVE_LOCKING
    locking/refcounts, x86/asm: Implement fast refcount overflow protection
    locking/lockdep: Fix the rollback and overwrite detection logic in crossrelease
    ...

    Linus Torvalds
     

29 Aug, 2017

1 commit


18 Aug, 2017

1 commit

  • The metag-ext driver only targets a single CPU at a time, even if
    the notional affinity is wider. Let's inform the core code
    about this.

    Signed-off-by: Marc Zyngier
    Signed-off-by: Thomas Gleixner
    Cc: Andrew Lunn
    Cc: James Hogan
    Cc: Jason Cooper
    Cc: Paul Burton
    Cc: Chris Zankel
    Cc: Kevin Cernekee
    Cc: Wei Xu
    Cc: Max Filippov
    Cc: Florian Fainelli
    Cc: Gregory Clement
    Cc: Matt Redfearn
    Cc: Sebastian Hesselbarth
    Link: http://lkml.kernel.org/r/20170818083925.10108-10-marc.zyngier@arm.com

    Marc Zyngier
     

17 Aug, 2017

1 commit

  • There is no agreed-upon definition of spin_unlock_wait()'s semantics,
    and it appears that all callers could do just as well with a lock/unlock
    pair. This commit therefore removes the underlying arch-specific
    arch_spin_unlock_wait() for all architectures providing them.

    Signed-off-by: Paul E. McKenney
    Cc:
    Cc: Peter Zijlstra
    Cc: Alan Stern
    Cc: Andrea Parri
    Cc: Linus Torvalds
    Acked-by: Will Deacon
    Acked-by: Boqun Feng

    Paul E. McKenney
     

10 Aug, 2017

1 commit

  • Those architectures that have a special atomic_set implementation also
    need a special atomic_set_release(), because for the very same reason
    WRITE_ONCE() is broken for them, smp_store_release() is too.

    The vast majority is architectures that have spinlock hash based atomic
    implementation except hexagon which seems to have a hardware 'feature'.

    The spinlock based atomics should be SC, that is, none of them appear to
    place extra barriers in atomic_cmpxchg() or any of the other SC atomic
    primitives and therefore seem to rely on their spinlock implementation
    being SC (I did not fully validate all that).

    Therefore, the normal atomic_set() is SC and can be used at
    atomic_set_release().

    Signed-off-by: Peter Zijlstra (Intel)
    Acked-by: Chris Metcalf [for tile]
    Cc: Boqun Feng
    Cc: Linus Torvalds
    Cc: Paul McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Will Deacon
    Cc: davem@davemloft.net
    Cc: james.hogan@imgtec.com
    Cc: jejb@parisc-linux.org
    Cc: rkuo@codeaurora.org
    Cc: vgupta@synopsys.com
    Link: http://lkml.kernel.org/r/20170609110506.yod47flaav3wgoj5@hirez.programming.kicks-ass.net
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

10 Jul, 2017

1 commit

  • Since commit fcc8487d477a ("uapi: export all headers under uapi
    directories"), all (and only) headers under uapi directories are
    exported, but asm-generic wrappers are still exceptions.

    To complete de-coupling the uapi from kernel headers, move generic-y
    of exported headers to uapi/asm/Kbuild.

    With this change, "make headers_install" will just need to parse
    uapi/asm/Kbuild to build up exported headers.

    Also, move "generic-y += kprobes.h" up in order to keep the entries
    sorted.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

07 Jul, 2017

3 commits

  • Merge misc updates from Andrew Morton:

    - a few hotfixes

    - various misc updates

    - ocfs2 updates

    - most of MM

    * emailed patches from Andrew Morton : (108 commits)
    mm, memory_hotplug: move movable_node to the hotplug proper
    mm, memory_hotplug: drop CONFIG_MOVABLE_NODE
    mm, memory_hotplug: drop artificial restriction on online/offline
    mm: memcontrol: account slab stats per lruvec
    mm: memcontrol: per-lruvec stats infrastructure
    mm: memcontrol: use generic mod_memcg_page_state for kmem pages
    mm: memcontrol: use the node-native slab memory counters
    mm: vmstat: move slab statistics from zone to node counters
    mm/zswap.c: delete an error message for a failed memory allocation in zswap_dstmem_prepare()
    mm/zswap.c: improve a size determination in zswap_frontswap_init()
    mm/zswap.c: delete an error message for a failed memory allocation in zswap_pool_create()
    mm/swapfile.c: sort swap entries before free
    mm/oom_kill: count global and memory cgroup oom kills
    mm: per-cgroup memory reclaim stats
    mm: kmemleak: treat vm_struct as alternative reference to vmalloc'ed objects
    mm: kmemleak: factor object reference updating out of scan_block()
    mm: kmemleak: slightly reduce the size of some structures on 64-bit architectures
    mm, mempolicy: don't check cpuset seqlock where it doesn't matter
    mm, cpuset: always use seqlock when changing task's nodemask
    mm, mempolicy: simplify rebinding mempolicies when updating cpusets
    ...

    Linus Torvalds
     
  • Pull user access str* updates from Al Viro:
    "uaccess str...() dead code removal"

    * 'uaccess.strlen' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    s390 keyboard.c: don't open-code strndup_user()
    mips: get rid of unused __strnlen_user()
    get rid of unused __strncpy_from_user() instances
    kill strlen_user()

    Linus Torvalds
     
  • A poisoned or migrated hugepage is stored as a swap entry in the page
    tables. On architectures that support hugepages consisting of
    contiguous page table entries (such as on arm64) this leads to ambiguity
    in determining the page table entry to return in huge_pte_offset() when
    a poisoned entry is encountered.

    Let's remove the ambiguity by adding a size parameter to convey
    additional information about the requested address. Also fixup the
    definition/usage of huge_pte_offset() throughout the tree.

    Link: http://lkml.kernel.org/r/20170522133604.11392-4-punit.agrawal@arm.com
    Signed-off-by: Punit Agrawal
    Acked-by: Steve Capper
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Tony Luck
    Cc: Fenghua Yu
    Cc: James Hogan (odd fixer:METAG ARCHITECTURE)
    Cc: Ralf Baechle (supporter:MIPS)
    Cc: "James E.J. Bottomley"
    Cc: Helge Deller
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Yoshinori Sato
    Cc: Rich Felker
    Cc: "David S. Miller"
    Cc: Chris Metcalf
    Cc: Thomas Gleixner
    Cc: Ingo Molnar
    Cc: "H. Peter Anvin"
    Cc: Alexander Viro
    Cc: Michal Hocko
    Cc: Mike Kravetz
    Cc: Naoya Horiguchi
    Cc: "Aneesh Kumar K.V"
    Cc: "Kirill A. Shutemov"
    Cc: Hillf Danton
    Cc: Mark Rutland
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Punit Agrawal
     

23 May, 2017

1 commit

  • To enable smp_processor_id() and might_sleep() debug checks earlier, it's
    required to add system states between SYSTEM_BOOTING and SYSTEM_RUNNING.

    Adjust the system_state check in stop_this_cpu() to handle the extra states.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Greg Kroah-Hartman
    Cc: James Hogan
    Cc: Linus Torvalds
    Cc: Mark Rutland
    Cc: Peter Zijlstra
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/20170516184735.283420315@linutronix.de
    Signed-off-by: Ingo Molnar

    Thomas Gleixner
     

19 May, 2017

1 commit

  • We use a directory under arch/$ARCH/boot/dts as an include path
    that has links outside of the subtree to find dt-bindings from under
    include/dt-bindings. That's been working well, but new DT architectures
    haven't been adding them by default.

    Recently there's been a desire to share some of the DT material between
    arm and arm64, which originally caused developers to create symlinks or
    relative includes between the subtrees. This isn't ideal -- it breaks
    if the DT files aren't stored in the exact same hierarchy as the kernel
    tree, and generally it's just icky.

    As a somewhat cleaner solution we decided to add a $ARCH/ prefix link
    once, and allow DTS files to reference dtsi (and dts) files in other
    architectures that way.

    Original approach was to create these links under each architecture,
    but it lead to the problem of recursive symlinks.

    As a remedy, move the include link directories out of the architecture
    trees into a common location. At the same time, they can now share one
    directory and one dt-bindings/ link as well.

    Fixes: 4027494ae6e3 ('ARM: dts: add arm/arm64 include symlinks')
    Reported-by: Russell King
    Reported-by: Omar Sandoval
    Reviewed-by: Heiko Stuebner
    Reviewed-by: Masahiro Yamada
    Tested-by: Heiko Stuebner
    Acked-by: Rob Herring
    Cc: Heiko Stuebner
    Cc: Mark Rutland
    Cc: Russell King
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Mikael Starvik
    Cc: Jesper Nilsson
    Cc: James Hogan
    Cc: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Michael Ellerman
    Cc: Frank Rowand
    Cc: linux-arch
    Signed-off-by: Olof Johansson

    Olof Johansson
     

16 May, 2017

1 commit


11 May, 2017

2 commits

  • …asahiroy/linux-kbuild

    Pull Kbuild UAPI updates from Masahiro Yamada:
    "Improvement of headers_install by Nicolas Dichtel.

    It has been long since the introduction of uapi directories, but the
    de-coupling of exported headers has not been completed. Headers listed
    in header-y are exported whether they exist in uapi directories or
    not. His work fixes this inconsistency.

    All (and only) headers under uapi directories are now exported. The
    asm-generic wrappers are still exceptions, but this is a big step
    forward"

    * tag 'kbuild-uapi-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    arch/include: remove empty Kbuild files
    uapi: export all arch specifics directories
    uapi: export all headers under uapi directories
    smc_diag.h: fix include from userland
    btrfs_tree.h: fix include from userland
    uapi: includes linux/types.h before exporting files
    Makefile.headersinst: remove destination-y option
    Makefile.headersinst: cleanup input files
    x86: stop exporting msr-index.h to userland
    nios2: put setup.h in uapi
    h8300: put bitsperlong.h in uapi

    Linus Torvalds
     
  • Pull metag updates from James Hogan:
    "These patches primarily make some usercopy improvements (following on
    from the recent usercopy fixes):

    - reformat and simplify rapf copy loops

    - add 64-bit get_user support

    And fix a couple more uaccess issues, partily pointed out by Al:

    - fix access_ok() serious shortcomings

    - fix strncpy_from_user() address validation

    Also included is a trivial removal of a redundant increment"

    * tag 'metag-for-v4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
    metag/mm: Drop pointless increment
    metag/uaccess: Check access_ok in strncpy_from_user
    metag/uaccess: Fix access_ok()
    metag/usercopy: Add 64-bit get_user support
    metag/usercopy: Simplify rapf loop fixup corner case
    metag/usercopy: Reformat rapf loop inline asm

    Linus Torvalds
     

10 May, 2017

1 commit

  • Regularly, when a new header is created in include/uapi/, the developer
    forgets to add it in the corresponding Kbuild file. This error is usually
    detected after the release is out.

    In fact, all headers under uapi directories should be exported, thus it's
    useless to have an exhaustive list.

    After this patch, the following files, which were not exported, are now
    exported (with make headers_install_all):
    asm-arc/kvm_para.h
    asm-arc/ucontext.h
    asm-blackfin/shmparam.h
    asm-blackfin/ucontext.h
    asm-c6x/shmparam.h
    asm-c6x/ucontext.h
    asm-cris/kvm_para.h
    asm-h8300/shmparam.h
    asm-h8300/ucontext.h
    asm-hexagon/shmparam.h
    asm-m32r/kvm_para.h
    asm-m68k/kvm_para.h
    asm-m68k/shmparam.h
    asm-metag/kvm_para.h
    asm-metag/shmparam.h
    asm-metag/ucontext.h
    asm-mips/hwcap.h
    asm-mips/reg.h
    asm-mips/ucontext.h
    asm-nios2/kvm_para.h
    asm-nios2/ucontext.h
    asm-openrisc/shmparam.h
    asm-parisc/kvm_para.h
    asm-powerpc/perf_regs.h
    asm-sh/kvm_para.h
    asm-sh/ucontext.h
    asm-tile/shmparam.h
    asm-unicore32/shmparam.h
    asm-unicore32/ucontext.h
    asm-x86/hwcap2.h
    asm-xtensa/kvm_para.h
    drm/armada_drm.h
    drm/etnaviv_drm.h
    drm/vgem_drm.h
    linux/aspeed-lpc-ctrl.h
    linux/auto_dev-ioctl.h
    linux/bcache.h
    linux/btrfs_tree.h
    linux/can/vxcan.h
    linux/cifs/cifs_mount.h
    linux/coresight-stm.h
    linux/cryptouser.h
    linux/fsmap.h
    linux/genwqe/genwqe_card.h
    linux/hash_info.h
    linux/kcm.h
    linux/kcov.h
    linux/kfd_ioctl.h
    linux/lightnvm.h
    linux/module.h
    linux/nbd-netlink.h
    linux/nilfs2_api.h
    linux/nilfs2_ondisk.h
    linux/nsfs.h
    linux/pr.h
    linux/qrtr.h
    linux/rpmsg.h
    linux/sched/types.h
    linux/sed-opal.h
    linux/smc.h
    linux/smc_diag.h
    linux/stm.h
    linux/switchtec_ioctl.h
    linux/vfio_ccw.h
    linux/wil6210_uapi.h
    rdma/bnxt_re-abi.h

    Note that I have removed from this list the files which are generated in every
    exported directories (like .install or .install.cmd).

    Thanks to Julien Floret for the tip to get all
    subdirs with a pure makefile command.

    For the record, note that exported files for asm directories are a mix of
    files listed by:
    - include/uapi/asm-generic/Kbuild.asm;
    - arch//include/uapi/asm/Kbuild;
    - arch//include/asm/Kbuild.

    Signed-off-by: Nicolas Dichtel
    Acked-by: Daniel Vetter
    Acked-by: Russell King
    Acked-by: Mark Salter
    Acked-by: Michael Ellerman (powerpc)
    Signed-off-by: Masahiro Yamada

    Nicolas Dichtel
     

03 May, 2017

4 commits

  • The increment of entry in the loop in mmu_init for meta1 is redundant as
    it isn't used again, so drop it.

    Reported-by: David Binderman
    Signed-off-by: James Hogan

    James Hogan
     
  • Pull crypto updates from Herbert Xu:
    "Here is the crypto update for 4.12:

    API:
    - Add batch registration for acomp/scomp
    - Change acomp testing to non-unique compressed result
    - Extend algorithm name limit to 128 bytes
    - Require setkey before accept(2) in algif_aead

    Algorithms:
    - Add support for deflate rfc1950 (zlib)

    Drivers:
    - Add accelerated crct10dif for powerpc
    - Add crc32 in stm32
    - Add sha384/sha512 in ccp
    - Add 3des/gcm(aes) for v5 devices in ccp
    - Add Queue Interface (QI) backend support in caam
    - Add new Exynos RNG driver
    - Add ThunderX ZIP driver
    - Add driver for hardware random generator on MT7623 SoC"

    * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (101 commits)
    crypto: stm32 - Fix OF module alias information
    crypto: algif_aead - Require setkey before accept(2)
    crypto: scomp - add support for deflate rfc1950 (zlib)
    crypto: scomp - allow registration of multiple scomps
    crypto: ccp - Change ISR handler method for a v5 CCP
    crypto: ccp - Change ISR handler method for a v3 CCP
    crypto: crypto4xx - rename ce_ring_contol to ce_ring_control
    crypto: testmgr - Allow ecb(cipher_null) in FIPS mode
    Revert "crypto: arm64/sha - Add constant operand modifier to ASM_EXPORT"
    crypto: ccp - Disable interrupts early on unload
    crypto: ccp - Use only the relevant interrupt bits
    hwrng: mtk - Add driver for hardware random generator on MT7623 SoC
    dt-bindings: hwrng: Add Mediatek hardware random generator bindings
    crypto: crct10dif-vpmsum - Fix missing preempt_disable()
    crypto: testmgr - replace compression known answer test
    crypto: acomp - allow registration of multiple acomps
    hwrng: n2 - Use devm_kcalloc() in n2rng_probe()
    crypto: chcr - Fix error handling related to 'chcr_alloc_shash'
    padata: get_next is never NULL
    crypto: exynos - Add new Exynos RNG driver
    ...

    Linus Torvalds
     
  • The metag implementation of strncpy_from_user() doesn't validate the src
    pointer, which could allow reading of arbitrary kernel memory. Add a
    short access_ok() check to prevent that.

    Its still possible for it to read across the user/kernel boundary, but
    it will invariably reach a NUL character after only 9 bytes, leaking
    only a static kernel address being loaded into D0Re0 at the beginning of
    __start, which is acceptable for the immediate fix.

    Reported-by: Al Viro
    Signed-off-by: James Hogan
    Cc: linux-metag@vger.kernel.org
    Cc: stable@vger.kernel.org

    James Hogan
     
  • The __user_bad() macro used by access_ok() has a few corner cases
    noticed by Al Viro where it doesn't behave correctly:

    - The kernel range check has off by 1 errors which permit access to the
    first and last byte of the kernel mapped range.

    - The kernel range check ends at LINCORE_BASE rather than
    META_MEMORY_LIMIT, which is ineffective when the kernel is in global
    space (an extremely uncommon configuration).

    There are a couple of other shortcomings here too:

    - Access to the whole of the other address space is permitted (i.e. the
    global half of the address space when the kernel is in local space).
    This isn't ideal as it could theoretically still contain privileged
    mappings set up by the bootloader.

    - The size argument is unused, permitting user copies which start on
    valid pages at the end of the user address range and cross the
    boundary into the kernel address space (e.g. addr = 0x3ffffff0, size
    > 0x10).

    It isn't very convenient to add size checks when disallowing certain
    regions, and it seems far safer to be sure and explicit about what
    userland is able to access, so invert the logic to allow certain regions
    instead, and fix the off by 1 errors and missing size checks. This also
    allows the get_fs() == KERNEL_DS check to be more easily optimised into
    the user address range case.

    We now have 3 such allowed regions:

    - The user address range (incorporating the get_fs() == KERNEL_DS
    check).

    - NULL (some kernel code expects this to work, and we'll always catch
    the fault anyway).

    - The core code memory region.

    Fixes: 373cd784d0fc ("metag: Memory handling")
    Reported-by: Al Viro
    Signed-off-by: James Hogan
    Cc: linux-metag@vger.kernel.org
    Cc: stable@vger.kernel.org

    James Hogan
     

02 May, 2017

1 commit

  • Pull uaccess unification updates from Al Viro:
    "This is the uaccess unification pile. It's _not_ the end of uaccess
    work, but the next batch of that will go into the next cycle. This one
    mostly takes copy_from_user() and friends out of arch/* and gets the
    zero-padding behaviour in sync for all architectures.

    Dealing with the nocache/writethrough mess is for the next cycle;
    fortunately, that's x86-only. Same for cleanups in iov_iter.c (I am
    sold on access_ok() in there, BTW; just not in this pile), same for
    reducing __copy_... callsites, strn*... stuff, etc. - there will be a
    pile about as large as this one in the next merge window.

    This one sat in -next for weeks. -3KLoC"

    * 'work.uaccess' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (96 commits)
    HAVE_ARCH_HARDENED_USERCOPY is unconditional now
    CONFIG_ARCH_HAS_RAW_COPY_USER is unconditional now
    m32r: switch to RAW_COPY_USER
    hexagon: switch to RAW_COPY_USER
    microblaze: switch to RAW_COPY_USER
    get rid of padding, switch to RAW_COPY_USER
    ia64: get rid of copy_in_user()
    ia64: sanitize __access_ok()
    ia64: get rid of 'segment' argument of __do_{get,put}_user()
    ia64: get rid of 'segment' argument of __{get,put}_user_check()
    ia64: add extable.h
    powerpc: get rid of zeroing, switch to RAW_COPY_USER
    esas2r: don't open-code memdup_user()
    alpha: fix stack smashing in old_adjtimex(2)
    don't open-code kernel_setsockopt()
    mips: switch to RAW_COPY_USER
    mips: get rid of tail-zeroing in primitives
    mips: make copy_from_user() zero tail explicitly
    mips: clean and reorder the forest of macros...
    mips: consolidate __invoke_... wrappers
    ...

    Linus Torvalds
     

27 Apr, 2017

2 commits


21 Apr, 2017

1 commit

  • Few parts of kernel define their own macro for aligning down so provide
    a common define for this, with the same usage and assumptions as existing
    ALIGN.

    Convert also three existing implementations to this one.

    Signed-off-by: Krzysztof Kozlowski
    Signed-off-by: Herbert Xu

    Krzysztof Kozlowski
     

08 Apr, 2017

1 commit

  • Pull metag usercopy fixes from James Hogan:
    "Metag usercopy fault handling fixes

    These patches fix a bunch of longstanding (some over a decade old)
    metag user copy fault handling bugs. Thanks go to Al Viro for spotting
    some of the questionable code in the first place"

    * tag 'metag-for-v4.11-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
    metag/usercopy: Add missing fixups
    metag/usercopy: Fix src fixup in from user rapf loops
    metag/usercopy: Set flags before ADDZ
    metag/usercopy: Zero rest of buffer from copy_from_user
    metag/usercopy: Add early abort to copy_to_user
    metag/usercopy: Fix alignment error checking
    metag/usercopy: Drop unused macros

    Linus Torvalds
     

05 Apr, 2017

8 commits

  • Switch to using raw user copy instead of providing metag specific
    [__]copy_{to,from}_user[_inatomic](). This simplifies the metag
    uaccess.h and allows us to take advantage of extra checking in the
    generic versions.

    Signed-off-by: James Hogan
    Cc: Al Viro
    Cc: linux-metag@vger.kernel.org
    Signed-off-by: Al Viro

    James Hogan
     
  • …ag into uaccess.metag

    Al Viro
     
  • Metag already supports 64-bit put_user, so add support for 64-bit
    get_user too so that the test_user_copy module can test both.

    Signed-off-by: James Hogan
    Cc: linux-metag@vger.kernel.org

    James Hogan
     
  • The final fixup in the rapf loops must handle a corner case due to the
    intermediate decrementing of the destination pointer before writing the
    last element to it again and re-incrementing it. This decrement (and the
    associated increment in the fixup code) can be easily avoided by using
    SETL/SETD with an offset of -8/-4.

    Signed-off-by: James Hogan
    Cc: linux-metag@vger.kernel.org

    James Hogan
     
  • Reformat rapf loop inline assembly to make it more readable and easier
    to modify in future.

    Signed-off-by: James Hogan
    Cc: linux-metag@vger.kernel.org

    James Hogan
     
  • The rapf copy loops in the Meta usercopy code is missing some extable
    entries for HTP cores with unaligned access checking enabled, where
    faults occur on the instruction immediately after the faulting access.

    Add the fixup labels and extable entries for these cases so that corner
    case user copy failures don't cause kernel crashes.

    Fixes: 373cd784d0fc ("metag: Memory handling")
    Signed-off-by: James Hogan
    Cc: linux-metag@vger.kernel.org
    Cc: stable@vger.kernel.org

    James Hogan
     
  • The fixup code to rewind the source pointer in
    __asm_copy_from_user_{32,64}bit_rapf_loop() always rewound the source by
    a single unit (4 or 8 bytes), however this is insufficient if the fault
    didn't occur on the first load in the loop, as the source pointer will
    have been incremented but nothing will have been stored until all 4
    register [pairs] are loaded.

    Read the LSM_STEP field of TXSTATUS (which is already loaded into a
    register), a bit like the copy_to_user versions, to determine how many
    iterations of MGET[DL] have taken place, all of which need rewinding.

    Fixes: 373cd784d0fc ("metag: Memory handling")
    Signed-off-by: James Hogan
    Cc: linux-metag@vger.kernel.org
    Cc: stable@vger.kernel.org

    James Hogan
     
  • The fixup code for the copy_to_user rapf loops reads TXStatus.LSM_STEP
    to decide how far to rewind the source pointer. There is a special case
    for the last execution of an MGETL/MGETD, since it leaves LSM_STEP=0
    even though the number of MGETLs/MGETDs attempted was 4. This uses ADDZ
    which is conditional upon the Z condition flag, but the AND instruction
    which masked the TXStatus.LSM_STEP field didn't set the condition flags
    based on the result.

    Fix that now by using ANDS which does set the flags, and also marking
    the condition codes as clobbered by the inline assembly.

    Fixes: 373cd784d0fc ("metag: Memory handling")
    Signed-off-by: James Hogan
    Cc: linux-metag@vger.kernel.org
    Cc: stable@vger.kernel.org

    James Hogan