01 Oct, 2019

1 commit

  • Pull csky updates from Guo Ren:
    "This round of csky subsystem just some fixups:

    - Fix mb() synchronization problem

    - Fix dma_alloc_coherent with PAGE_SO attribute

    - Fix cache_op failed when cross memory ZONEs

    - Optimize arch_sync_dma_for_cpu/device with dma_inv_range

    - Fix ioremap function losing

    - Fix arch_get_unmapped_area() implementation

    - Fix defer cache flush for 610

    - Support kernel non-aligned access

    - Fix 610 vipt cache flush mechanism

    - Fix add zero_fp fixup perf backtrace panic

    - Move static keyword to the front of declaration

    - Fix csky_pmu.max_period assignment

    - Use generic free_initrd_mem()

    - entry: Remove unneeded need_resched() loop"

    * tag 'csky-for-linus-5.4-rc1' of git://github.com/c-sky/csky-linux:
    csky: Move static keyword to the front of declaration
    csky: entry: Remove unneeded need_resched() loop
    csky: Fixup csky_pmu.max_period assignment
    csky: Fixup add zero_fp fixup perf backtrace panic
    csky: Use generic free_initrd_mem()
    csky: Fixup 610 vipt cache flush mechanism
    csky: Support kernel non-aligned access
    csky: Fixup defer cache flush for 610
    csky: Fixup arch_get_unmapped_area() implementation
    csky: Fixup ioremap function losing
    csky: Optimize arch_sync_dma_for_cpu/device with dma_inv_range
    csky/dma: Fixup cache_op failed when cross memory ZONEs
    csky: Fixup dma_alloc_coherent with PAGE_SO attribute
    csky: Fixup mb() synchronization problem

    Linus Torvalds
     

30 Sep, 2019

5 commits


27 Sep, 2019

1 commit

  • The naming of pgtable_page_{ctor,dtor}() seems to have confused a few
    people, and until recently arm64 used these erroneously/pointlessly for
    other levels of page table.

    To make it incredibly clear that these only apply to the PTE level, and to
    align with the naming of pgtable_pmd_page_{ctor,dtor}(), let's rename them
    to pgtable_pte_page_{ctor,dtor}().

    These changes were generated with the following shell script:

    ----
    git grep -lw 'pgtable_page_.tor' | while read FILE; do
    sed -i '{s/pgtable_page_ctor/pgtable_pte_page_ctor/}' $FILE;
    sed -i '{s/pgtable_page_dtor/pgtable_pte_page_dtor/}' $FILE;
    done
    ----

    ... with the documentation re-flowed to remain under 80 columns, and
    whitespace fixed up in macros to keep backslashes aligned.

    There should be no functional change as a result of this patch.

    Link: http://lkml.kernel.org/r/20190722141133.3116-1-mark.rutland@arm.com
    Signed-off-by: Mark Rutland
    Reviewed-by: Mike Rapoport
    Acked-by: Geert Uytterhoeven [m68k]
    Cc: Anshuman Khandual
    Cc: Matthew Wilcox
    Cc: Michal Hocko
    Cc: Yu Zhao
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Rutland
     

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
     

22 Sep, 2019

1 commit

  • Pull hmm updates from Jason Gunthorpe:
    "This is more cleanup and consolidation of the hmm APIs and the very
    strongly related mmu_notifier interfaces. Many places across the tree
    using these interfaces are touched in the process. Beyond that a
    cleanup to the page walker API and a few memremap related changes
    round out the series:

    - General improvement of hmm_range_fault() and related APIs, more
    documentation, bug fixes from testing, API simplification &
    consolidation, and unused API removal

    - Simplify the hmm related kconfigs to HMM_MIRROR and DEVICE_PRIVATE,
    and make them internal kconfig selects

    - Hoist a lot of code related to mmu notifier attachment out of
    drivers by using a refcount get/put attachment idiom and remove the
    convoluted mmu_notifier_unregister_no_release() and related APIs.

    - General API improvement for the migrate_vma API and revision of its
    only user in nouveau

    - Annotate mmu_notifiers with lockdep and sleeping region debugging

    Two series unrelated to HMM or mmu_notifiers came along due to
    dependencies:

    - Allow pagemap's memremap_pages family of APIs to work without
    providing a struct device

    - Make walk_page_range() and related use a constant structure for
    function pointers"

    * tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (75 commits)
    libnvdimm: Enable unit test infrastructure compile checks
    mm, notifier: Catch sleeping/blocking for !blockable
    kernel.h: Add non_block_start/end()
    drm/radeon: guard against calling an unpaired radeon_mn_unregister()
    csky: add missing brackets in a macro for tlb.h
    pagewalk: use lockdep_assert_held for locking validation
    pagewalk: separate function pointers from iterator data
    mm: split out a new pagewalk.h header from mm.h
    mm/mmu_notifiers: annotate with might_sleep()
    mm/mmu_notifiers: prime lockdep
    mm/mmu_notifiers: add a lockdep map for invalidate_range_start/end
    mm/mmu_notifiers: remove the __mmu_notifier_invalidate_range_start/end exports
    mm/hmm: hmm_range_fault() infinite loop
    mm/hmm: hmm_range_fault() NULL pointer bug
    mm/hmm: fix hmm_range_fault()'s handling of swapped out pages
    mm/mmu_notifiers: remove unregister_no_release
    RDMA/odp: remove ib_ucontext from ib_umem
    RDMA/odp: use mmu_notifier_get/put for 'struct ib_ucontext_per_mm'
    RDMA/mlx5: Use odp instead of mr->umem in pagefault_mr
    RDMA/mlx5: Use ib_umem_start instead of umem.address
    ...

    Linus Torvalds
     

07 Sep, 2019

1 commit

  • As an earlier patch made the macro argument more complicated, compilation
    now fails with:

    In file included from mm/madvise.c:30:
    mm/madvise.c: In function 'madvise_free_single_vma':
    arch/csky/include/asm/tlb.h:11:11: error:
    invalid type argument of '->' (have 'struct mmu_gather')

    Link: https://lore.kernel.org/r/20190901193601.GB5208@mellanox.com
    Fixes: 923bfc561e75 ("pagewalk: separate function pointers from iterator data")
    Reported-by: Guenter Roeck
    Signed-off-by: Jason Gunthorpe

    Jason Gunthorpe
     

29 Aug, 2019

1 commit


22 Aug, 2019

1 commit

  • 610 has vipt aliasing issue, so we need to finish the cache flush
    apis mentioned in cachetlb.rst to avoid data corruption.

    Here is the list of modified apis in the patch:

    - flush_kernel_dcache_page (new add)
    - flush_dcache_mmap_lock (new add)
    - flush_dcache_mmap_unlock (new add)
    - flush_kernel_vmap_range (new add)
    - invalidate_kernel_vmap_range (new add)
    - flush_anon_page (new add)
    - flush_cache_range (new add)
    - flush_cache_vmap (flush all)
    - flush_cache_vunmap (flush all)
    - flush_cache_mm (only dcache flush)
    - flush_icache_page (just nop)
    - copy_from_user_page (remove no need flush)
    - copy_to_user_page (remove no need flush)

    Change to V2:
    - Fixup compile error with xa_lock*(&mapping->i_pages)

    Signed-off-by: Guo Ren
    Cc: Arnd Bergmann
    Cc: Christoph Hellwig

    Guo Ren
     

20 Aug, 2019

3 commits

  • We prohibit non-aligned access in kernel mode, but some special NIC
    driver needs to support kernel-state unaligned access. For example,
    when the bus does not support unaligned access, IP header parsing
    will cause non-aligned access and driver does not recopy the skb
    buffer to dma for performance reasons.

    Added kernel_enable & user_enable to control unaligned access and
    added kernel_count & user_count for statistical unaligned access.

    Signed-off-by: Guo Ren
    Cc: Arnd Bergmann

    Guo Ren
     
  • We use defer cache flush mechanism to improve the performance of
    610, but the implementation is wrong. We fix it up now and update
    the mechanism:

    - Zero page needn't be flushed.
    - If page is file mapping & non-touched in user space, defer flush.
    - If page is anon mapping or dirty file mapping, flush immediately.
    - In update_mmu_cache finish the defer flush by flush_dcache_page().

    For 610 we need take care the dcache aliasing issue:
    - VIPT cache with 8K-bytes size per way in 4K page granularity.

    Signed-off-by: Guo Ren
    Cc: Arnd Bergmann

    Guo Ren
     
  • Current arch_get_unmapped_area() of abiv1 doesn't use standard kernel
    api. After referring to the implementation of arch/arm, we implement
    it with vm_unmapped_area() from linux/mm.h.

    Signed-off-by: Guo Ren
    Cc: Arnd Bergmann

    Guo Ren
     

15 Aug, 2019

1 commit

  • Implement the following apis to meet usage in different scenarios.

    - ioremap (NonCache + StrongOrder)
    - ioremap_nocache (NonCache + StrongOrder)
    - ioremap_wc (NonCache + WeakOrder )
    - ioremap_cache ( Cache + WeakOrder )

    Also change flag VM_ALLOC to VM_IOREMAP in get_vm_area_caller.

    Signed-off-by: Guo Ren
    Cc: Arnd Bergmann
    Cc: Christoph Hellwig

    Guo Ren
     

06 Aug, 2019

2 commits

  • DMA_FROM_DEVICE only need to read dma data of memory into CPU cache,
    so there is no need to clear cache before. Also clear + inv for
    DMA_FROM_DEVICE won't cause problem, because the memory range for dma
    won't be touched by software during dma working.

    Changes for V2:
    - Remove clr cache and ignore the DMA_TO_DEVICE in _for_cpu.
    - Change inv to wbinv cache with DMA_FROM_DEVICE in _for_device.

    Signed-off-by: Guo Ren
    Cc: Arnd Bergmann

    Guo Ren
     
  • If the paddr and size are cross between NORMAL_ZONE and HIGHMEM_ZONE
    memory range, cache_op will panic in do_page_fault with bad_area.

    Optimize the code to support the range which cross memory ZONEs.

    Changes for V2:
    - Revert back to postcore_initcall

    Signed-off-by: Guo Ren
    Cc: Christoph Hellwig
    Cc: Arnd Bergmann

    Guo Ren
     

31 Jul, 2019

2 commits

  • This bug is from commit: 2b070ccdf8c0 (fixup abiv2 mmap(... O_SYNC)
    failed). In that patch we remove the _PAGE_SO for memory noncache
    mapping and this will cause problem when drivers use dma descriptors
    to control the transcations without dma_w/rmb().

    After referencing other archs' implementation, pgprot_writecombine is
    introduced for mmap(... O_SYNC).

    Signed-off-by: Guo Ren

    Guo Ren
     
  • The mb() is the superset of dma and smp. Using bar.xxx to implement
    mb() will cause problem when sync data with dma device, becasue
    bar.xxx couldn't guarantee bus transactions finished at outside bus
    level.

    We must use sync.s instead of bar.xxx for dma data synchronization
    and it will guarantee retirement after getting the bus bresponse.

    Changes for V2:
    - Use sync.s for all mb, rmb, wmb, dma_wmb, dma_rmb.

    Signed-off-by: Guo Ren
    Cc: Arnd Bergmann

    Guo Ren
     

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
     

20 Jul, 2019

1 commit

  • Pull arch/csky pupdates from Guo Ren:
    "This round of csky subsystem gives two features (ASID algorithm
    update, Perf pmu record support) and some fixups.

    ASID updates:
    - Revert mmu ASID mechanism
    - Add new asid lib code from arm
    - Use generic asid algorithm to implement switch_mm
    - Improve tlb operation with help of asid

    Perf pmu record support:
    - Init pmu as a device
    - Add count-width property for csky pmu
    - Add pmu interrupt support
    - Fix perf record in kernel/user space
    - dt-bindings: Add csky PMU bindings

    Fixes:
    - Fixup no panic in kernel for some traps
    - Fixup some error count in 810 & 860.
    - Fixup abiv1 memset error"

    * tag 'csky-for-linus-5.3-rc1' of git://github.com/c-sky/csky-linux:
    csky: Fixup abiv1 memset error
    csky: Improve tlb operation with help of asid
    csky: Use generic asid algorithm to implement switch_mm
    csky: Add new asid lib code from arm
    csky: Revert mmu ASID mechanism
    dt-bindings: csky: Add csky PMU bindings
    dt-bindings: interrupt-controller: Update csky mpintc
    csky: Fixup some error count in 810 & 860.
    csky: Fix perf record in kernel/user space
    csky: Add pmu interrupt support
    csky: Add count-width property for csky pmu
    csky: Init pmu as a device
    csky: Fixup no panic in kernel for some traps
    csky: Select intc & timer drivers

    Linus Torvalds
     

19 Jul, 2019

12 commits

  • Current memset implementation in abiv1 is wrong and it'll cause unalign
    access. Just remove it and use the generic one. This patch will cause
    performance degradation and we will improve it with a new design in next
    patchset.

    Signed-off-by: Guo Ren
    Cc: Arnd Bergmann

    Guo Ren
     
  • There are two generations of tlb operation instruction for C-SKY.
    First generation is use mcr register and it need software do more
    things, second generation is use specific instructions, eg:
    tlbi.va, tlbi.vas, tlbi.alls

    We implemented the following functions:

    - flush_tlb_range (a range of entries)
    - flush_tlb_page (one entry)

    Above functions use asid from vma->mm to invalid tlb entries and
    we could use tlbi.vas instruction for newest generation csky cpu.

    - flush_tlb_kernel_range
    - flush_tlb_one

    Above functions don't care asid and it invalid the tlb entries only
    with vpn and we could use tlbi.vaas instruction for newest generat-
    ion csky cpu.

    Signed-off-by: Guo Ren
    Cc: Arnd Bergmann

    Guo Ren
     
  • Use linux generic asid/vmid algorithm to implement csky
    switch_mm function. The algorithm is from arm and it could
    work with SMP system. It'll help reduce tlb flush for
    switch_mm in task/vm switch.

    Signed-off-by: Guo Ren
    Cc: Arnd Bergmann

    Guo Ren
     
  • This patch only contains asid help code from arm for next patch to
    use.

    The asid allocator use five level check to reduce the cost of
    switch_mm.

    1. Check if the asid version is the same (it's general)
    2. Check reserved_asid which is set in rollover flush_context()
    and key point is to keep the same bit position with the current
    asid version instead of input version.
    3. Check if the position of bitmap is free then it could be set &
    used directly.
    4. find_next_zero_bit() (a little performance cost)
    5. flush_context (this is the worst cost with increase current asid
    version)

    Check is level by level and cost is also higher with the next level.
    The reserved_asid and bitmap mechanism prevent unnecessary
    find_next_zero_bit().

    The atomic 64 bit asid is also suitable for 32-bit system and it
    won't cost a lot in 1th 2th 3th level check.

    The operation of set/clear mm_cpumask was removed in arm64 compared to
    arm32. It seems no side effect on current arm64 system, but from
    software meaning it's wrong. Although csky also needn't it, we add it
    back for csky.

    The asid_per_ctxt is no use for csky and it reserves the lowest bits for
    other use, maybe: trust zone ? Ok, just keep it in csky copy.

    Seems it also could be used by other archs and it's worth to move asid
    code to generic in future.

    Signed-off-by: Guo Ren
    Cc: Arnd Bergmann
    Cc: Julien Grall

    Guo Ren
     
  • Current C-SKY ASID mechanism is from mips and it doesn't work well
    with multi-cores. ASID per core mechanism is not suitable for C-SKY
    SMP tlb maintain operations, eg: tlbi.vas need share the same asid
    in all processors and it'll invalid the tlb entry in all cores with
    the same asid.

    This patch is prepare for new ASID mechanism.

    Signed-off-by: Guo Ren
    Cc: Arnd Bergmann

    Guo Ren
     
  • CK810 pmu only support event with index 0-8 and 0xd; CK860 only
    support event 1~4, 0xa~0x1b. So do not register unsupport event
    to hardware cache event, which may leader to unknown behavior.

    Signed-off-by: Mao Han
    Signed-off-by: Guo Ren

    Guo Ren
     
  • csky_pmu_event_init is called several times during the perf record
    initialzation. After configure the event counter in either kernel
    space or user space, csky_pmu_event_init is called twice with no
    attr specified. Configuration will be overwritten with sampling in
    both kernel space and user space. --all-kernel/--all-user is
    useless without this patch applied.

    Signed-off-by: Mao Han
    Signed-off-by: Guo Ren

    Mao Han
     
  • This patch add interrupt request and handler for csky pmu.
    perf can record on hardware event with this patch applied.

    Signed-off-by: Mao Han
    Signed-off-by: Guo Ren

    Mao Han
     
  • The csky pmu counter may have different io width. When the counter is
    smaller then 64 bits and counter value is smaller than the old value, it
    will result to a extremely large delta value. So the sampled value should
    be extend to 64 bits to avoid this, the extension bits base on the
    count-width property from dts.

    Signed-off-by: Mao Han
    Signed-off-by: Guo Ren

    Mao Han
     
  • This patch change the csky pmu initialization from arch init to
    device init. The pmu can be configued with information from
    device tree(pmu device name, irq number and etc.).

    Signed-off-by: Mao Han
    Signed-off-by: Guo Ren

    Mao Han
     
  • These traps couldn't be hanppen in kernel and we must panic there not
    send a signal to userspace.

    Signed-off-by: Guo Ren
    Cc: Arnd Bergmann

    Guo Ren
     
  • Let arch help to select interrupt controller's and timer's drivers
    instead of people using menuconfig to select. This help the mini system
    boot up.

    Signed-off-by: Guo Ren
    Cc: Arnd Bergmann

    Guo Ren
     

13 Jul, 2019

2 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
     
  • The csky implementation pte_alloc_one(), pte_free_kernel() and pte_free()
    is identical to the generic except of lack of __GFP_ACCOUNT for the user
    PTEs allocation.

    Switch csky to use generic version of these functions.

    The csky implementation of pte_alloc_one_kernel() is not replaced because
    it does not clear the allocated page but rather sets each PTE in it to a
    non-zero value.

    The pte_free_kernel() and pte_free() versions on csky are identical to the
    generic ones and can be simply dropped.

    Link: http://lkml.kernel.org/r/1557296232-15361-6-git-send-email-rppt@linux.ibm.com
    Signed-off-by: Mike Rapoport
    Acked-by: Guo Ren
    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: 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
     

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
     

26 Jun, 2019

1 commit

  • The struct rt_sigframe is also defined in libgcc/config/csky/linux-unwind.h
    of gcc. Although there is no use for the first three word space, we must
    keep them the same with linux-unwind.h for member position.

    The BUG is found in glibc test with the tst-cancel02.
    The BUG is from commit:bf2416829362 of linux-5.2-rc1 merge window.

    Signed-off-by: Guo Ren
    Signed-off-by: Mao Han
    Cc: Arnd Bergmann

    Guo Ren
     

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