18 Jan, 2020

1 commit

  • commit 4f0bd808134d73184054ad09173821c84f31dd5d upstream.

    The commit c296d4dc13ae ("asm-generic: fix a compilation warning") changed
    asm-generic/cachflush.h to use static inlines instead of macros and as a
    result the nds32 build with CONFIG_CPU_CACHE_ALIASING=n fails:

    CC init/main.o
    In file included from arch/nds32/include/asm/cacheflush.h:43,
    from include/linux/highmem.h:12,
    from include/linux/pagemap.h:11,
    from include/linux/blkdev.h:16,
    from include/linux/blk-cgroup.h:23,
    from include/linux/writeback.h:14,
    from init/main.c:44:
    include/asm-generic/cacheflush.h:50:20: error: static declaration of 'flush_icache_range' follows non-static declaration
    static inline void flush_icache_range(unsigned long start, unsigned long end)
    ^~~~~~~~~~~~~~~~~~
    In file included from include/linux/highmem.h:12,
    from include/linux/pagemap.h:11,
    from include/linux/blkdev.h:16,
    from include/linux/blk-cgroup.h:23,
    from include/linux/writeback.h:14,
    from init/main.c:44:
    arch/nds32/include/asm/cacheflush.h:11:6: note: previous declaration of 'flush_icache_range' was here
    void flush_icache_range(unsigned long start, unsigned long end);
    ^~~~~~~~~~~~~~~~~~

    Surround the inline functions in asm-generic/cacheflush.h by ifdef's so
    that architectures could override them and add the required overrides to
    nds32.

    Fixes: c296d4dc13ae ("asm-generic: fix a compilation warning")
    Link: https://lore.kernel.org/lkml/201912212139.yptX8CsV%25lkp@intel.com/
    Reported-by: kbuild test robot
    Signed-off-by: Mike Rapoport
    Reviewed-by: Greentime Hu
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Greg Kroah-Hartman

    Mike Rapoport
     

25 Sep, 2019

2 commits

  • Both pgtable_cache_init() and pgd_cache_init() are used to initialize kmem
    cache for page table allocations on several architectures that do not use
    PAGE_SIZE tables for one or more levels of the page table hierarchy.

    Most architectures do not implement these functions and use __weak default
    NOP implementation of pgd_cache_init(). Since there is no such default
    for pgtable_cache_init(), its empty stub is duplicated among most
    architectures.

    Rename the definitions of pgd_cache_init() to pgtable_cache_init() and
    drop empty stubs of pgtable_cache_init().

    Link: http://lkml.kernel.org/r/1566457046-22637-1-git-send-email-rppt@linux.ibm.com
    Signed-off-by: Mike Rapoport
    Acked-by: Will Deacon [arm64]
    Acked-by: Thomas Gleixner [x86]
    Cc: Catalin Marinas
    Cc: Ingo Molnar
    Cc: Borislav Petkov
    Cc: Matthew Wilcox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • Patch series "mm: remove quicklist page table caches".

    A while ago Nicholas proposed to remove quicklist page table caches [1].

    I've rebased his patch on the curren upstream and switched ia64 and sh to
    use generic versions of PTE allocation.

    [1] https://lore.kernel.org/linux-mm/20190711030339.20892-1-npiggin@gmail.com

    This patch (of 3):

    Remove page table allocator "quicklists". These have been around for a
    long time, but have not got much traction in the last decade and are only
    used on ia64 and sh architectures.

    The numbers in the initial commit look interesting but probably don't
    apply anymore. If anybody wants to resurrect this it's in the git
    history, but it's unhelpful to have this code and divergent allocator
    behaviour for minor archs.

    Also it might be better to instead make more general improvements to page
    allocator if this is still so slow.

    Link: http://lkml.kernel.org/r/1565250728-21721-2-git-send-email-rppt@linux.ibm.com
    Signed-off-by: Nicholas Piggin
    Signed-off-by: Mike Rapoport
    Cc: Tony Luck
    Cc: Yoshinori Sato
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nicholas Piggin
     

20 Sep, 2019

1 commit

  • Pull dma-mapping updates from Christoph Hellwig:

    - add dma-mapping and block layer helpers to take care of IOMMU merging
    for mmc plus subsequent fixups (Yoshihiro Shimoda)

    - rework handling of the pgprot bits for remapping (me)

    - take care of the dma direct infrastructure for swiotlb-xen (me)

    - improve the dma noncoherent remapping infrastructure (me)

    - better defaults for ->mmap, ->get_sgtable and ->get_required_mask
    (me)

    - cleanup mmaping of coherent DMA allocations (me)

    - various misc cleanups (Andy Shevchenko, me)

    * tag 'dma-mapping-5.4' of git://git.infradead.org/users/hch/dma-mapping: (41 commits)
    mmc: renesas_sdhi_internal_dmac: Add MMC_CAP2_MERGE_CAPABLE
    mmc: queue: Fix bigger segments usage
    arm64: use asm-generic/dma-mapping.h
    swiotlb-xen: merge xen_unmap_single into xen_swiotlb_unmap_page
    swiotlb-xen: simplify cache maintainance
    swiotlb-xen: use the same foreign page check everywhere
    swiotlb-xen: remove xen_swiotlb_dma_mmap and xen_swiotlb_dma_get_sgtable
    xen: remove the exports for xen_{create,destroy}_contiguous_region
    xen/arm: remove xen_dma_ops
    xen/arm: simplify dma_cache_maint
    xen/arm: use dev_is_dma_coherent
    xen/arm: consolidate page-coherent.h
    xen/arm: use dma-noncoherent.h calls for xen-swiotlb cache maintainance
    arm: remove wrappers for the generic dma remap helpers
    dma-mapping: introduce a dma_common_find_pages helper
    dma-mapping: always use VM_DMA_COHERENT for generic DMA remap
    vmalloc: lift the arm flag for coherent mappings to common code
    dma-mapping: provide a better default ->get_required_mask
    dma-mapping: remove the dma_declare_coherent_memory export
    remoteproc: don't allow modular build
    ...

    Linus Torvalds
     

30 Aug, 2019

1 commit

  • Mark switch cases where we are expecting to fall through.

    This patch fixes the following warnings (Building: allmodconfig nds32):

    include/math-emu/soft-fp.h:124:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
    arch/nds32/kernel/signal.c:362:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
    arch/nds32/kernel/signal.c:315:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
    include/math-emu/op-common.h:417:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
    include/math-emu/op-common.h:430:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
    include/math-emu/op-common.h:310:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
    include/math-emu/op-common.h:320:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
    include/math-emu/op-common.h:310:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
    include/math-emu/op-common.h:320:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
    include/math-emu/soft-fp.h:124:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
    include/math-emu/op-common.h:417:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
    include/math-emu/op-common.h:430:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
    include/math-emu/op-common.h:310:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
    include/math-emu/op-common.h:320:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
    include/math-emu/op-common.h:310:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
    include/math-emu/op-common.h:320:11: warning: this statement may fall through [-Wimplicit-fallthrough=]

    Reported-by: Michael Ellerman
    Signed-off-by: Gustavo A. R. Silva

    Gustavo A. R. Silva
     

29 Aug, 2019

1 commit


25 Jul, 2019

1 commit

  • UAPI headers licensed under GPL are supposed to have exception
    "WITH Linux-syscall-note" so that they can be included into non-GPL
    user space application code.

    The exception note is missing in some UAPI headers.

    Some of them slipped in by the treewide conversion commit b24413180f56
    ("License cleanup: add SPDX GPL-2.0 license identifier to files with
    no license"). Just run:

    $ git show --oneline b24413180f56 -- arch/x86/include/uapi/asm/

    I believe they are not intentional, and should be fixed too.

    This patch was generated by the following script:

    git grep -l --not -e Linux-syscall-note --and -e SPDX-License-Identifier \
    -- :arch/*/include/uapi/asm/*.h :include/uapi/ :^*/Kbuild |
    while read file
    do
    sed -i -e '/[[:space:]]OR[[:space:]]/s/\(GPL-[^[:space:]]*\)/(\1 WITH Linux-syscall-note)/g' \
    -e '/[[:space:]]or[[:space:]]/s/\(GPL-[^[:space:]]*\)/(\1 WITH Linux-syscall-note)/g' \
    -e '/[[:space:]]OR[[:space:]]/!{/[[:space:]]or[[:space:]]/!s/\(GPL-[^[:space:]]*\)/\1 WITH Linux-syscall-note/g}' $file
    done

    After this patch is applied, there are 5 UAPI headers that do not contain
    "WITH Linux-syscall-note". They are kept untouched since this exception
    applies only to GPL variants.

    $ git grep --not -e Linux-syscall-note --and -e SPDX-License-Identifier \
    -- :arch/*/include/uapi/asm/*.h :include/uapi/ :^*/Kbuild
    include/uapi/drm/panfrost_drm.h:/* SPDX-License-Identifier: MIT */
    include/uapi/linux/batman_adv.h:/* SPDX-License-Identifier: MIT */
    include/uapi/linux/qemu_fw_cfg.h:/* SPDX-License-Identifier: BSD-3-Clause */
    include/uapi/linux/vbox_err.h:/* SPDX-License-Identifier: MIT */
    include/uapi/linux/virtio_iommu.h:/* SPDX-License-Identifier: BSD-3-Clause */

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Masahiro Yamada
     

17 Jul, 2019

1 commit

  • PTRACE_GET_SYSCALL_INFO is a generic ptrace API that lets ptracer obtain
    details of the syscall the tracee is blocked in.

    There are two reasons for a special syscall-related ptrace request.

    Firstly, with the current ptrace API there are cases when ptracer cannot
    retrieve necessary information about syscalls. Some examples include:

    * The notorious int-0x80-from-64-bit-task issue. See [1] for details.
    In short, if a 64-bit task performs a syscall through int 0x80, its
    tracer has no reliable means to find out that the syscall was, in
    fact, a compat syscall, and misidentifies it.

    * Syscall-enter-stop and syscall-exit-stop look the same for the
    tracer. Common practice is to keep track of the sequence of
    ptrace-stops in order not to mix the two syscall-stops up. But it is
    not as simple as it looks; for example, strace had a (just recently
    fixed) long-standing bug where attaching strace to a tracee that is
    performing the execve system call led to the tracer identifying the
    following syscall-exit-stop as syscall-enter-stop, which messed up
    all the state tracking.

    * Since the introduction of commit 84d77d3f06e7 ("ptrace: Don't allow
    accessing an undumpable mm"), both PTRACE_PEEKDATA and
    process_vm_readv become unavailable when the process dumpable flag is
    cleared. On such architectures as ia64 this results in all syscall
    arguments being unavailable for the tracer.

    Secondly, ptracers also have to support a lot of arch-specific code for
    obtaining information about the tracee. For some architectures, this
    requires a ptrace(PTRACE_PEEKUSER, ...) invocation for every syscall
    argument and return value.

    PTRACE_GET_SYSCALL_INFO returns the following structure:

    struct ptrace_syscall_info {
    __u8 op; /* PTRACE_SYSCALL_INFO_* */
    __u32 arch __attribute__((__aligned__(sizeof(__u32))));
    __u64 instruction_pointer;
    __u64 stack_pointer;
    union {
    struct {
    __u64 nr;
    __u64 args[6];
    } entry;
    struct {
    __s64 rval;
    __u8 is_error;
    } exit;
    struct {
    __u64 nr;
    __u64 args[6];
    __u32 ret_data;
    } seccomp;
    };
    };

    The structure was chosen according to [2], except for the following
    changes:

    * seccomp substructure was added as a superset of entry substructure

    * the type of nr field was changed from int to __u64 because syscall
    numbers are, as a practical matter, 64 bits

    * stack_pointer field was added along with instruction_pointer field
    since it is readily available and can save the tracer from extra
    PTRACE_GETREGS/PTRACE_GETREGSET calls

    * arch is always initialized to aid with tracing system calls such as
    execve()

    * instruction_pointer and stack_pointer are always initialized so they
    could be easily obtained for non-syscall stops

    * a boolean is_error field was added along with rval field, this way
    the tracer can more reliably distinguish a return value from an error
    value

    strace has been ported to PTRACE_GET_SYSCALL_INFO. Starting with
    release 4.26, strace uses PTRACE_GET_SYSCALL_INFO API as the preferred
    mechanism of obtaining syscall information.

    [1] https://lore.kernel.org/lkml/CA+55aFzcSVmdDj9Lh_gdbz1OzHyEm6ZrGPBDAJnywm2LF_eVyg@mail.gmail.com/
    [2] https://lore.kernel.org/lkml/CAObL_7GM0n80N7J_DFw_eQyfLyzq+sf4y2AvsCCV88Tb3AwEHA@mail.gmail.com/

    This patch (of 7):

    All syscall_get_*() and syscall_set_*() functions must be defined as
    static inline as on all other architectures, otherwise asm/syscall.h
    cannot be included in more than one compilation unit.

    This bug has to be fixed in order to extend the generic
    ptrace API with PTRACE_GET_SYSCALL_INFO request.

    Link: http://lkml.kernel.org/r/20190510152749.GA28558@altlinux.org
    Fixes: 1932fbe36e02 ("nds32: System calls handling")
    Signed-off-by: Dmitry V. Levin
    Reported-by: kbuild test robot
    Acked-by: Greentime Hu
    Cc: Vincent Chen
    Cc: Elvira Khabirova
    Cc: Eugene Syromyatnikov
    Cc: Oleg Nesterov
    Cc: Andy Lutomirski
    Cc: Benjamin Herrenschmidt
    Cc: Helge Deller [parisc]
    Cc: James E.J. Bottomley
    Cc: James Hogan
    Cc: Kees Cook
    Cc: Michael Ellerman
    Cc: Paul Burton
    Cc: Paul Mackerras
    Cc: Ralf Baechle
    Cc: Richard Kuo
    Cc: Shuah Khan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dmitry V. Levin
     

13 Jul, 2019

4 commits

  • Pull Kconfig updates from Masahiro Yamada:

    - always require argument for --defconfig and remove the hard-coded
    arch/$(ARCH)/defconfig path

    - make arch/$(SRCARCH)/configs/defconfig the new default of defconfig

    - some code cleanups

    * tag 'kconfig-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
    kconfig: remove meaningless if-conditional in conf_read()
    kconfig: Fix spelling of sym_is_changable
    unicore32: rename unicore32_defconfig to defconfig
    kconfig: make arch/*/configs/defconfig the default of KBUILD_DEFCONFIG
    kconfig: add static qualifier to expand_string()
    kconfig: require the argument of --defconfig
    kconfig: remove always false ifeq ($(KBUILD_DEFCONFIG,) conditional

    Linus Torvalds
     
  • Pull Kbuild updates from Masahiro Yamada:

    - remove headers_{install,check}_all targets

    - remove unreasonable 'depends on !UML' from CONFIG_SAMPLES

    - re-implement 'make headers_install' more cleanly

    - add new header-test-y syntax to compile-test headers

    - compile-test exported headers to ensure they are compilable in
    user-space

    - compile-test headers under include/ to ensure they are self-contained

    - remove -Waggregate-return, -Wno-uninitialized, -Wno-unused-value
    flags

    - add -Werror=unknown-warning-option for Clang

    - add 128-bit built-in types support to genksyms

    - fix missed rebuild of modules.builtin

    - propagate 'No space left on device' error in fixdep to Make

    - allow Clang to use its integrated assembler

    - improve some coccinelle scripts

    - add a new flag KBUILD_ABS_SRCTREE to request Kbuild to use absolute
    path for $(srctree).

    - do not ignore errors when compression utility is missing

    - misc cleanups

    * tag 'kbuild-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (49 commits)
    kbuild: use -- separater intead of $(filter-out ...) for cc-cross-prefix
    kbuild: Inform user to pass ARCH= for make mrproper
    kbuild: fix compression errors getting ignored
    kbuild: add a flag to force absolute path for srctree
    kbuild: replace KBUILD_SRCTREE with boolean building_out_of_srctree
    kbuild: remove src and obj from the top Makefile
    scripts/tags.sh: remove unused environment variables from comments
    scripts/tags.sh: drop SUBARCH support for ARM
    kbuild: compile-test kernel headers to ensure they are self-contained
    kheaders: include only headers into kheaders_data.tar.xz
    kheaders: remove meaningless -R option of 'ls'
    kbuild: support header-test-pattern-y
    kbuild: do not create wrappers for header-test-y
    kbuild: compile-test exported headers to ensure they are self-contained
    init/Kconfig: add CONFIG_CC_CAN_LINK
    kallsyms: exclude kasan local symbols on s390
    kbuild: add more hints about SUBDIRS replacement
    coccinelle: api/stream_open: treat all wait_.*() calls as blocking
    coccinelle: put_device: Add a cast to an expression for an assignment
    coccinelle: put_device: Adjust a message construction
    ...

    Linus Torvalds
     
  • Pull dma-mapping updates from Christoph Hellwig:

    - move the USB special case that bounced DMA through a device bar into
    the USB code instead of handling it in the common DMA code (Laurentiu
    Tudor and Fredrik Noring)

    - don't dip into the global CMA pool for single page allocations
    (Nicolin Chen)

    - fix a crash when allocating memory for the atomic pool failed during
    boot (Florian Fainelli)

    - move support for MIPS-style uncached segments to the common code and
    use that for MIPS and nios2 (me)

    - make support for DMA_ATTR_NON_CONSISTENT and
    DMA_ATTR_NO_KERNEL_MAPPING generic (me)

    - convert nds32 to the generic remapping allocator (me)

    * tag 'dma-mapping-5.3' of git://git.infradead.org/users/hch/dma-mapping: (29 commits)
    dma-mapping: mark dma_alloc_need_uncached as __always_inline
    MIPS: only select ARCH_HAS_UNCACHED_SEGMENT for non-coherent platforms
    usb: host: Fix excessive alignment restriction for local memory allocations
    lib/genalloc.c: Add algorithm, align and zeroed family of DMA allocators
    nios2: use the generic uncached segment support in dma-direct
    nds32: use the generic remapping allocator for coherent DMA allocations
    arc: use the generic remapping allocator for coherent DMA allocations
    dma-direct: handle DMA_ATTR_NO_KERNEL_MAPPING in common code
    dma-direct: handle DMA_ATTR_NON_CONSISTENT in common code
    dma-mapping: add a dma_alloc_need_uncached helper
    openrisc: remove the partial DMA_ATTR_NON_CONSISTENT support
    arc: remove the partial DMA_ATTR_NON_CONSISTENT support
    arm-nommu: remove the partial DMA_ATTR_NON_CONSISTENT support
    ARM: dma-mapping: allow larger DMA mask than supported
    dma-mapping: truncate dma masks to what dma_addr_t can hold
    iommu/dma: Apply dma_{alloc,free}_contiguous functions
    dma-remap: Avoid de-referencing NULL atomic_pool
    MIPS: use the generic uncached segment support in dma-direct
    dma-direct: provide generic support for uncached kernel segments
    au1100fb: fix DMA API abuse
    ...

    Linus Torvalds
     
  • The nds32 implementation of pte_alloc_one_kernel() differs from the
    generic in the use of __GFP_RETRY_MAYFAIL flag, which is removed after the
    conversion.

    The nds32 version of pte_alloc_one() missed the call to
    pgtable_page_ctor() and also used __GFP_RETRY_MAYFAIL. Switching it to
    use generic __pte_alloc_one() for the PTE page allocation ensures that
    page table constructor is run and the user page tables are allocated with
    __GFP_ACCOUNT.

    The conversion to the generic version of pte_free_kernel() removes the
    NULL check for pte.

    The pte_free() version on nds32 is identical to the generic one and can be
    simply dropped.

    Link: http://lkml.kernel.org/r/1557296232-15361-10-git-send-email-rppt@linux.ibm.com
    Signed-off-by: Mike Rapoport
    Cc: Albert Ou
    Cc: Anshuman Khandual
    Cc: Anton Ivanov
    Cc: Arnd Bergmann
    Cc: Catalin Marinas
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Guan Xuetao
    Cc: Guo Ren
    Cc: Guo Ren
    Cc: Helge Deller
    Cc: Ley Foon Tan
    Cc: Matthew Wilcox
    Cc: Matt Turner
    Cc: Michael Ellerman
    Cc: Michal Hocko
    Cc: Palmer Dabbelt
    Cc: Paul Burton
    Cc: Ralf Baechle
    Cc: Richard Kuo
    Cc: Richard Weinberger
    Cc: Russell King
    Cc: Sam Creasey
    Cc: Vincent Chen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

10 Jul, 2019

1 commit

  • Pull Documentation updates from Jonathan Corbet:
    "It's been a relatively busy cycle for docs:

    - A fair pile of RST conversions, many from Mauro. These create more
    than the usual number of simple but annoying merge conflicts with
    other trees, unfortunately. He has a lot more of these waiting on
    the wings that, I think, will go to you directly later on.

    - A new document on how to use merges and rebases in kernel repos,
    and one on Spectre vulnerabilities.

    - Various improvements to the build system, including automatic
    markup of function() references because some people, for reasons I
    will never understand, were of the opinion that
    :c:func:``function()`` is unattractive and not fun to type.

    - We now recommend using sphinx 1.7, but still support back to 1.4.

    - Lots of smaller improvements, warning fixes, typo fixes, etc"

    * tag 'docs-5.3' of git://git.lwn.net/linux: (129 commits)
    docs: automarkup.py: ignore exceptions when seeking for xrefs
    docs: Move binderfs to admin-guide
    Disable Sphinx SmartyPants in HTML output
    doc: RCU callback locks need only _bh, not necessarily _irq
    docs: format kernel-parameters -- as code
    Doc : doc-guide : Fix a typo
    platform: x86: get rid of a non-existent document
    Add the RCU docs to the core-api manual
    Documentation: RCU: Add TOC tree hooks
    Documentation: RCU: Rename txt files to rst
    Documentation: RCU: Convert RCU UP systems to reST
    Documentation: RCU: Convert RCU linked list to reST
    Documentation: RCU: Convert RCU basic concepts to reST
    docs: filesystems: Remove uneeded .rst extension on toctables
    scripts/sphinx-pre-install: fix out-of-tree build
    docs: zh_CN: submitting-drivers.rst: Remove a duplicated Documentation/
    Documentation: PGP: update for newer HW devices
    Documentation: Add section about CPU vulnerabilities for Spectre
    Documentation: platform: Delete x86-laptop-drivers.txt
    docs: Note that :c:func: should no longer be used
    ...

    Linus Torvalds
     

09 Jul, 2019

1 commit

  • …iederm/user-namespace

    Pull force_sig() argument change from Eric Biederman:
    "A source of error over the years has been that force_sig has taken a
    task parameter when it is only safe to use force_sig with the current
    task.

    The force_sig function is built for delivering synchronous signals
    such as SIGSEGV where the userspace application caused a synchronous
    fault (such as a page fault) and the kernel responded with a signal.

    Because the name force_sig does not make this clear, and because the
    force_sig takes a task parameter the function force_sig has been
    abused for sending other kinds of signals over the years. Slowly those
    have been fixed when the oopses have been tracked down.

    This set of changes fixes the remaining abusers of force_sig and
    carefully rips out the task parameter from force_sig and friends
    making this kind of error almost impossible in the future"

    * 'siginfo-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: (27 commits)
    signal/x86: Move tsk inside of CONFIG_MEMORY_FAILURE in do_sigbus
    signal: Remove the signal number and task parameters from force_sig_info
    signal: Factor force_sig_info_to_task out of force_sig_info
    signal: Generate the siginfo in force_sig
    signal: Move the computation of force into send_signal and correct it.
    signal: Properly set TRACE_SIGNAL_LOSE_INFO in __send_signal
    signal: Remove the task parameter from force_sig_fault
    signal: Use force_sig_fault_to_task for the two calls that don't deliver to current
    signal: Explicitly call force_sig_fault on current
    signal/unicore32: Remove tsk parameter from __do_user_fault
    signal/arm: Remove tsk parameter from __do_user_fault
    signal/arm: Remove tsk parameter from ptrace_break
    signal/nds32: Remove tsk parameter from send_sigtrap
    signal/riscv: Remove tsk parameter from do_trap
    signal/sh: Remove tsk parameter from force_sig_info_fault
    signal/um: Remove task parameter from send_sigtrap
    signal/x86: Remove task parameter from send_sigtrap
    signal: Remove task parameter from force_sig_mceerr
    signal: Remove task parameter from force_sig
    signal: Remove task parameter from force_sigsegv
    ...

    Linus Torvalds
     

25 Jun, 2019

1 commit


15 Jun, 2019

2 commits

  • Commit 5318321d367c ("samples: disable CONFIG_SAMPLES for UML") used
    a big hammer to fix the build errors under the samples/ directory.
    Only some samples actually include uapi headers from usr/include.

    Introduce CONFIG_HEADERS_INSTALL since 'depends on HEADERS_INSTALL' is
    clearer than 'depends on !UML'. If this option is enabled, uapi headers
    are installed before starting directory descending.

    I added 'depends on HEADERS_INSTALL' to per-sample CONFIG options.
    This allows UML to compile some samples.

    $ make ARCH=um allmodconfig samples/
    [ snip ]
    CC [M] samples/configfs/configfs_sample.o
    CC [M] samples/kfifo/bytestream-example.o
    CC [M] samples/kfifo/dma-example.o
    CC [M] samples/kfifo/inttype-example.o
    CC [M] samples/kfifo/record-example.o
    CC [M] samples/kobject/kobject-example.o
    CC [M] samples/kobject/kset-example.o
    CC [M] samples/trace_events/trace-events-sample.o
    CC [M] samples/trace_printk/trace-printk.o
    AR samples/vfio-mdev/built-in.a
    AR samples/built-in.a

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • The kbuild documentation clearly shows that the documents
    there are written at different times: some use markdown,
    some use their own peculiar logic to split sections.

    Convert everything to ReST without affecting too much
    the author's style and avoiding adding uneeded markups.

    The conversion is actually:
    - add blank lines and identation in order to identify paragraphs;
    - fix tables markups;
    - add some lists markups;
    - mark literal blocks;
    - adjust title markups.

    At its new index.rst, let's add a :orphan: while this is not linked to
    the main index.rst file, in order to avoid build warnings.

    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

09 Jun, 2019

1 commit

  • Until recently, if KBUILD_DEFCONFIG was not set by the arch Makefile,
    the default path arch/*/defconfig was used.

    The last users of the default are gone by the following commits:

    - Commit f3e20ad67b4c ("s390: move arch/s390/defconfig to
    arch/s390/configs/defconfig")

    - Commit 986a13769c4b ("alpha: move arch/alpha/defconfig to
    arch/alpha/configs/defconfig")

    Let's set arch/*/configs/defconfig as a new default. This saves
    KBUILD_DEFCONFIG for some architectures.

    Signed-off-by: Masahiro Yamada
    Acked-by: Catalin Marinas

    Masahiro Yamada
     

04 Jun, 2019

1 commit


31 May, 2019

3 commits

  • The existing floating point emulations is only available for floating
    instruction that possibly issue denormalized input and underflow
    exceptions. These existing FPU emulations are not sufficient when IEx
    Trap is enabled because some floating point instructions only issue inexact
    exception. This patch adds the emulations of such floating point
    instructions.

    Signed-off-by: Vincent Chen
    Acked-by: Greentime Hu
    Signed-off-by: Greentime Hu

    Vincent Chen
     
  • In order for kernel to capture each denormalized output, the UDF
    trapping enable bit is always raised in $fpcsr. Because underflow case will
    issue not an underflow exception but also an inexact exception, it causes
    that the IEX, IEX cumulative exception, flag in $fpcsr to be raised in each
    denormalized output handling. To make the emulation transparent to the
    user, the emulator needs to clear the IEX flag in $fpcsr if the result is a
    denormalized number. However, if the IEX flag has been raised before this
    floating point emulation, this cleanup may be incorrect. To avoid the IEX
    flags in $fpcsr be raised in each denormalized output handling, the IEX
    trap shall be always enabled.

    Signed-off-by: Vincent Chen
    Acked-by: Greentime Hu
    Signed-off-by: Greentime Hu

    Vincent Chen
     
  • Add SPDX license identifiers to all Make/Kconfig files which:

    - Have no license information of any form

    These files fall under the project license, GPL v2 only. The resulting SPDX
    license identifier is:

    GPL-2.0

    Reported-by: Masahiro Yamada
    Signed-off-by: Greg Kroah-Hartman
    Reviewed-by: Kate Stewart
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

29 May, 2019

3 commits

  • As synchronous exceptions really only make sense against the current
    task (otherwise how are you synchronous) remove the task parameter
    from from force_sig_fault to make it explicit that is what is going
    on.

    The two known exceptions that deliver a synchronous exception to a
    stopped ptraced task have already been changed to
    force_sig_fault_to_task.

    The callers have been changed with the following emacs regular expression
    (with obvious variations on the architectures that take more arguments)
    to avoid typos:

    force_sig_fault[(]\([^,]+\)[,]\([^,]+\)[,]\([^,]+\)[,]\W+current[)]
    ->
    force_sig_fault(\1,\2,\3)

    Signed-off-by: "Eric W. Biederman"

    Eric W. Biederman
     
  • Update the calls of force_sig_fault that pass in a variable that is
    set to current earlier to explicitly use current.

    This is to make the next change that removes the task parameter
    from force_sig_fault easier to verify.

    Signed-off-by: "Eric W. Biederman"

    Eric W. Biederman
     
  • The send_sigtrap function is always called with tsk == current.
    Make that obvious by removing the tsk parameter.

    This also makes it clear that send_sigtrap always calls
    force_sig_fault on the current task.

    Signed-off-by: "Eric W. Biederman"

    Eric W. Biederman
     

27 May, 2019

1 commit


21 May, 2019

1 commit


18 May, 2019

2 commits

  • These generic-y defines do not have the corresponding generic header
    in include/asm-generic/, so they are definitely invalid.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Pull nds32 updates from Greentime Hu:

    - Clean up codes and Makefile

    - Fix a vDSO bug

    - Remove useless functions/header files

    - Update git repo path in MAINTAINERS

    * tag 'nds32-for-linus-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/greentime/linux:
    nds32: Fix vDSO clock_getres()
    MAINTAINERS: update nds32 git repo path
    nds32: don't export low-level cache flushing routines
    arch: nds32: Kconfig: pedantic formatting
    nds32: fix semicolon code style issue
    nds32: vdso: drop unnecessary cc-ldoption
    nds32: remove unused generic-y += cmpxchg-local.h
    nds32: Use the correct style for SPDX License Identifier
    nds32: remove __virt_to_bus and __bus_to_virt
    nds32: vdso: fix and clean-up Makefile
    nds32: add vmlinux.lds and vdso.so to .gitignore
    nds32: ex-exit: Remove unneeded need_resched() loop
    nds32/io: Remove useless definition of mmiowb()
    nds32: Removed unused thread flag TIF_USEDFPU

    Linus Torvalds
     

17 May, 2019

1 commit

  • Pull nommu generic uaccess updates from Arnd Bergmann:
    "asm-generic: kill and improve nommu generic uaccess helpers

    Christoph Hellwig writes:

    This is a series doing two somewhat interwinded things. It improves
    the asm-generic nommu uaccess helper to optionally be entirely
    generic and not require any arch helpers for the actual uaccess.
    For the generic uaccess.h to actually be generically useful I also
    had to kill off the mess we made of , which really
    shouldn't exist on most architectures"

    * tag 'asm-generic-nommu' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
    asm-generic: optimize generic uaccess for 8-byte loads and stores
    asm-generic: provide entirely generic nommu uaccess
    arch: mostly remove
    asm-generic: don't include from

    Linus Torvalds
     

16 May, 2019

3 commits

  • clock_getres in the vDSO library has to preserve the same behaviour
    of posix_get_hrtimer_res().

    In particular, posix_get_hrtimer_res() does:
    sec = 0;
    ns = hrtimer_resolution;
    and hrtimer_resolution depends on the enablement of the high
    resolution timers that can happen either at compile or at run time.

    Fix the nds32 vdso implementation of clock_getres keeping a copy of
    hrtimer_resolution in vdso data and using that directly.

    Cc: Greentime Hu
    Cc: Vincent Chen
    Signed-off-by: Vincenzo Frascino
    Signed-off-by: Greentime Hu

    Vincenzo Frascino
     
  • None of these is used by modules. Nor should they as we have better
    highlevel primitives.

    Signed-off-by: Christoph Hellwig
    Acked-by: Greentime Hu
    Signed-off-by: Greentime Hu

    Christoph Hellwig
     
  • Pull tracing updates from Steven Rostedt:
    "The major changes in this tracing update includes:

    - Removal of non-DYNAMIC_FTRACE from 32bit x86

    - Removal of mcount support from x86

    - Emulating a call from int3 on x86_64, fixes live kernel patching

    - Consolidated Tracing Error logs file

    Minor updates:

    - Removal of klp_check_compiler_support()

    - kdb ftrace dumping output changes

    - Accessing and creating ftrace instances from inside the kernel

    - Clean up of #define if macro

    - Introduction of TRACE_EVENT_NOP() to disable trace events based on
    config options

    And other minor fixes and clean ups"

    * tag 'trace-v5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (44 commits)
    x86: Hide the int3_emulate_call/jmp functions from UML
    livepatch: Remove klp_check_compiler_support()
    ftrace/x86: Remove mcount support
    ftrace/x86_32: Remove support for non DYNAMIC_FTRACE
    tracing: Simplify "if" macro code
    tracing: Fix documentation about disabling options using trace_options
    tracing: Replace kzalloc with kcalloc
    tracing: Fix partial reading of trace event's id file
    tracing: Allow RCU to run between postponed startup tests
    tracing: Fix white space issues in parse_pred() function
    tracing: Eliminate const char[] auto variables
    ring-buffer: Fix mispelling of Calculate
    tracing: probeevent: Fix to make the type of $comm string
    tracing: probeevent: Do not accumulate on ret variable
    tracing: uprobes: Re-enable $comm support for uprobe events
    ftrace/x86_64: Emulate call function while updating in breakpoint handler
    x86_64: Allow breakpoints to emulate call instructions
    x86_64: Add gap to int3 to allow for call emulation
    tracing: kdb: Allow ftdump to skip all but the last few entries
    tracing: Add trace_total_entries() / trace_total_entries_cpu()
    ...

    Linus Torvalds
     

15 May, 2019

4 commits

  • Now that all instances of #include have been replaced with
    #include , we can remove these.

    Link: http://lkml.kernel.org/r/1553267665-27228-2-git-send-email-yamada.masahiro@socionext.com
    Signed-off-by: Masahiro Yamada
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masahiro Yamada
     
  • Since commit dccd2304cc90 ("ARM: 7430/1: sizes.h: move from asm-generic
    to "), and are just
    wrappers of .

    This commit replaces all and to
    prepare for the removal.

    Link: http://lkml.kernel.org/r/1553267665-27228-1-git-send-email-yamada.masahiro@socionext.com
    Signed-off-by: Masahiro Yamada
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masahiro Yamada
     
  • Patch series "provide a generic free_initmem implementation", v2.

    Many architectures implement free_initmem() in exactly the same or very
    similar way: they wrap the call to free_initmem_default() with sometimes
    different 'poison' parameter.

    These patches switch those architectures to use a generic implementation
    that does free_initmem_default(POISON_FREE_INITMEM).

    This was inspired by Christoph's patches for free_initrd_mem [1] and I
    shamelessly copied changelog entries from his patches :)

    [1] https://lore.kernel.org/lkml/20190213174621.29297-1-hch@lst.de/

    This patch (of 2):

    For most architectures free_initmem just a wrapper for the same
    free_initmem_default(-1) call. Provide that as a generic implementation
    marked __weak.

    Link: http://lkml.kernel.org/r/1550515285-17446-2-git-send-email-rppt@linux.ibm.com
    Signed-off-by: Mike Rapoport
    Reviewed-by: Andrew Morton
    Cc: Christoph Hellwig
    Cc: Palmer Dabbelt
    Cc: Richard Kuo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     
  • For most architectures free_initrd_mem just expands to the same
    free_reserved_area call. Provide that as a generic implementation marked
    __weak.

    Link: http://lkml.kernel.org/r/20190213174621.29297-8-hch@lst.de
    Signed-off-by: Christoph Hellwig
    Acked-by: Geert Uytterhoeven [m68k]
    Acked-by: Mike Rapoport
    Cc: Catalin Marinas [arm64]
    Cc: Steven Price
    Cc: Alexander Viro
    Cc: Guan Xuetao
    Cc: Russell King
    Cc: Will Deacon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

08 May, 2019

1 commit

  • Pull audit updates from Paul Moore:
    "We've got a reasonably broad set of audit patches for the v5.2 merge
    window, the highlights are below:

    - The biggest change, and the source of all the arch/* changes, is
    the patchset from Dmitry to help enable some of the work he is
    doing around PTRACE_GET_SYSCALL_INFO.

    To be honest, including this in the audit tree is a bit of a
    stretch, but it does help move audit a little further along towards
    proper syscall auditing for all arches, and everyone else seemed to
    agree that audit was a "good" spot for this to land (or maybe they
    just didn't want to merge it? dunno.).

    - We can now audit time/NTP adjustments.

    - We continue the work to connect associated audit records into a
    single event"

    * tag 'audit-pr-20190507' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: (21 commits)
    audit: fix a memory leak bug
    ntp: Audit NTP parameters adjustment
    timekeeping: Audit clock adjustments
    audit: purge unnecessary list_empty calls
    audit: link integrity evm_write_xattrs record to syscall event
    syscall_get_arch: add "struct task_struct *" argument
    unicore32: define syscall_get_arch()
    Move EM_UNICORE to uapi/linux/elf-em.h
    nios2: define syscall_get_arch()
    nds32: define syscall_get_arch()
    Move EM_NDS32 to uapi/linux/elf-em.h
    m68k: define syscall_get_arch()
    hexagon: define syscall_get_arch()
    Move EM_HEXAGON to uapi/linux/elf-em.h
    h8300: define syscall_get_arch()
    c6x: define syscall_get_arch()
    arc: define syscall_get_arch()
    Move EM_ARCOMPACT and EM_ARCV2 to uapi/linux/elf-em.h
    audit: Make audit_log_cap and audit_copy_inode static
    audit: connect LOGIN record to its syscall record
    ...

    Linus Torvalds
     

07 May, 2019

2 commits