26 Jul, 2020

4 commits

  • …/git/riscv/linux into master

    Pull RISC-V fixes from Palmer Dabbelt:
    "A few more fixes this week:

    - A fix to avoid using SBI calls during kasan initialization, as the
    SBI calls themselves have not been probed yet.

    - Three fixes related to systems with multiple memory regions"

    * tag 'riscv-for-linus-5.8-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
    riscv: Parse all memory blocks to remove unusable memory
    RISC-V: Do not rely on initrd_start/end computed during early dt parsing
    RISC-V: Set maximum number of mapped pages correctly
    riscv: kasan: use local_tlb_flush_all() to avoid uninitialized __sbi_rfence

    Linus Torvalds
     
  • …it/tip/tip into master

    Pull x86 fixes from Ingo Molnar:
    "Misc fixes:

    - Fix a section end page alignment assumption that was causing
    crashes

    - Fix ORC unwinding on freshly forked tasks which haven't executed
    yet and which have empty user task stacks

    - Fix the debug.exception-trace=1 sysctl dumping of user stacks,
    which was broken by recent maccess changes"

    * tag 'x86-urgent-2020-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/dumpstack: Dump user space code correctly again
    x86/stacktrace: Fix reliable check for empty user task stacks
    x86/unwind/orc: Fix ORC for newly forked tasks
    x86, vmlinux.lds: Page-align end of ..page_aligned sections

    Linus Torvalds
     
  • …it/tip/tip into master

    Pull EFI fixes from Ingo Molnar:
    "Various EFI fixes:

    - Fix the layering violation in the use of the EFI runtime services
    availability mask in users of the 'efivars' abstraction

    - Revert build fix for GCC v4.8 which is no longer supported

    - Clean up some x86 EFI stub details, some of which are borderline
    bugs that copy around garbage into padding fields - let's fix these
    out of caution.

    - Fix build issues while working on RISC-V support

    - Avoid --whole-archive when linking the stub on arm64"

    * tag 'efi-urgent-2020-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    efi: Revert "efi/x86: Fix build with gcc 4"
    efi/efivars: Expose RT service availability via efivars abstraction
    efi/libstub: Move the function prototypes to header file
    efi/libstub: Fix gcc error around __umoddi3 for 32 bit builds
    efi/libstub/arm64: link stub lib.a conditionally
    efi/x86: Only copy upto the end of setup_header
    efi/x86: Remove unused variables

    Linus Torvalds
     
  • Pull networking fixes from David Miller:

    1) Fix RCU locaking in iwlwifi, from Johannes Berg.

    2) mt76 can access uninitialized NAPI struct, from Felix Fietkau.

    3) Fix race in updating pause settings in bnxt_en, from Vasundhara
    Volam.

    4) Propagate error return properly during unbind failures in ax88172a,
    from George Kennedy.

    5) Fix memleak in adf7242_probe, from Liu Jian.

    6) smc_drv_probe() can leak, from Wang Hai.

    7) Don't muck with the carrier state if register_netdevice() fails in
    the bonding driver, from Taehee Yoo.

    8) Fix memleak in dpaa_eth_probe, from Liu Jian.

    9) Need to check skb_put_padto() return value in hsr_fill_tag(), from
    Murali Karicheri.

    10) Don't lose ionic RSS hash settings across FW update, from Shannon
    Nelson.

    11) Fix clobbered SKB control block in act_ct, from Wen Xu.

    12) Missing newlink in "tx_timeout" sysfs output, from Xiongfeng Wang.

    13) IS_UDPLITE cleanup a long time ago, incorrectly handled
    transformations involving UDPLITE_RECV_CC. From Miaohe Lin.

    14) Unbalanced locking in netdevsim, from Taehee Yoo.

    15) Suppress false-positive error messages in qed driver, from Alexander
    Lobakin.

    16) Out of bounds read in ax25_connect and ax25_sendmsg, from Peilin Ye.

    17) Missing SKB release in cxgb4's uld_send(), from Navid Emamdoost.

    18) Uninitialized value in geneve_changelink(), from Cong Wang.

    19) Fix deadlock in xen-netfront, from Andera Righi.

    19) flush_backlog() frees skbs with IRQs disabled, so should use
    dev_kfree_skb_irq() instead of kfree_skb(). From Subash Abhinov
    Kasiviswanathan.

    * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (111 commits)
    drivers/net/wan: lapb: Corrected the usage of skb_cow
    dev: Defer free of skbs in flush_backlog
    qrtr: orphan socket in qrtr_release()
    xen-netfront: fix potential deadlock in xennet_remove()
    flow_offload: Move rhashtable inclusion to the source file
    geneve: fix an uninitialized value in geneve_changelink()
    bonding: check return value of register_netdevice() in bond_newlink()
    tcp: allow at most one TLP probe per flight
    AX.25: Prevent integer overflows in connect and sendmsg
    cxgb4: add missing release on skb in uld_send()
    net: atlantic: fix PTP on AQC10X
    AX.25: Prevent out-of-bounds read in ax25_sendmsg()
    sctp: shrink stream outq when fails to do addstream reconf
    sctp: shrink stream outq only when new outcnt < old outcnt
    AX.25: Fix out-of-bounds read in ax25_connect()
    enetc: Remove the mdio bus on PF probe bailout
    net: ethernet: ti: add NETIF_F_HW_TC hw feature flag for taprio offload
    net: ethernet: ave: Fix error returns in ave_init
    drivers/net/wan/x25_asy: Fix to make it work
    ipvs: fix the connection sync failed in some cases
    ...

    Linus Torvalds
     

25 Jul, 2020

5 commits

  • Currently, maximum physical memory allowed is equal to -PAGE_OFFSET.
    That's why we remove any memory blocks spanning beyond that size. However,
    it is done only for memblock containing linux kernel which will not work
    if there are multiple memblocks.

    Process all memory blocks to figure out how much memory needs to be removed
    and remove at the end instead of updating the memblock list in place.

    Signed-off-by: Atish Patra
    Signed-off-by: Palmer Dabbelt

    Atish Patra
     
  • Currently, initrd_start/end are computed during early_init_dt_scan
    but used during arch_setup. We will get the following panic if initrd is used
    and CONFIG_DEBUG_VIRTUAL is turned on.

    [ 0.000000] ------------[ cut here ]------------
    [ 0.000000] kernel BUG at arch/riscv/mm/physaddr.c:33!
    [ 0.000000] Kernel BUG [#1]
    [ 0.000000] Modules linked in:
    [ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 5.8.0-rc4-00015-ged0b226fed02 #886
    [ 0.000000] epc: ffffffe0002058d2 ra : ffffffe0000053f0 sp : ffffffe001001f40
    [ 0.000000] gp : ffffffe00106e250 tp : ffffffe001009d40 t0 : ffffffe00107ee28
    [ 0.000000] t1 : 0000000000000000 t2 : ffffffe000a2e880 s0 : ffffffe001001f50
    [ 0.000000] s1 : ffffffe0001383e8 a0 : ffffffe00c087e00 a1 : 0000000080200000
    [ 0.000000] a2 : 00000000010bf000 a3 : ffffffe00106f3c8 a4 : ffffffe0010bf000
    [ 0.000000] a5 : ffffffe000000000 a6 : 0000000000000006 a7 : 0000000000000001
    [ 0.000000] s2 : ffffffe00106f068 s3 : ffffffe00106f070 s4 : 0000000080200000
    [ 0.000000] s5 : 0000000082200000 s6 : 0000000000000000 s7 : 0000000000000000
    [ 0.000000] s8 : 0000000080011010 s9 : 0000000080012700 s10: 0000000000000000
    [ 0.000000] s11: 0000000000000000 t3 : 000000000001fe30 t4 : 000000000001fe30
    [ 0.000000] t5 : 0000000000000000 t6 : ffffffe00107c471
    [ 0.000000] status: 0000000000000100 badaddr: 0000000000000000 cause: 0000000000000003
    [ 0.000000] random: get_random_bytes called from print_oops_end_marker+0x22/0x46 with crng_init=0

    To avoid the error, initrd_start/end can be computed from phys_initrd_start/size
    in setup itself. It also improves the initrd placement by aligning the start
    and size with the page size.

    Fixes: 76d2a0493a17 ("RISC-V: Init and Halt Code")
    Signed-off-by: Atish Patra
    Signed-off-by: Palmer Dabbelt

    Atish Patra
     
  • Currently, maximum number of mapper pages are set to the pfn calculated
    from the memblock size of the memblock containing kernel. This will work
    until that memblock spans the entire memory. However, it will be set to
    a wrong value if there are multiple memblocks defined in kernel
    (e.g. with efi runtime services).

    Set the the maximum value to the pfn calculated from dram size.

    Signed-off-by: Atish Patra
    Signed-off-by: Palmer Dabbelt

    Atish Patra
     
  • Pull xtensa csum regression fix from Al Viro:
    "Max Filippov caught a breakage introduced in xtensa this cycle
    by the csum_and_copy_..._user() series.

    Cut'n'paste from the wrong source - the check that belongs
    in csum_and_copy_to_user() ended up both there and in
    csum_and_copy_from_user()"

    * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    xtensa: fix access check in csum_and_copy_from_user

    Linus Torvalds
     
  • Pull arm64 fix from Will Deacon:
    "Fix compat vDSO build flags for recent versions of clang to tell it
    where to find the assembler"

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: vdso32: Fix '--prefix=' value for newer versions of clang

    Linus Torvalds
     

24 Jul, 2020

1 commit

  • Pull s390 fixes from Heiko Carstens:

    - Change cpum_cf/perf counter name from DFLT_CCERROR to DFLT_CCFINISH
    to reflect reality and avoid further confusion. This is a user space
    visible change therefore the commit has also a stable tag for 5.7,
    where this counter was introduced.

    - Add Matthew Rosato as s390 IOMMU maintainer.

    * tag 's390-5.8-6' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    MAINTAINERS: add Matthew for s390 IOMMU
    s390/cpum_cf,perf: change DFLT_CCERROR counter name

    Linus Torvalds
     

23 Jul, 2020

5 commits

  • Newer versions of clang only look for $(COMPAT_GCC_TOOLCHAIN_DIR)as [1],
    rather than $(COMPAT_GCC_TOOLCHAIN_DIR)$(CROSS_COMPILE_COMPAT)as,
    resulting in the following build error:

    $ make -skj"$(nproc)" ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
    CROSS_COMPILE_COMPAT=arm-linux-gnueabi- LLVM=1 O=out/aarch64 distclean \
    defconfig arch/arm64/kernel/vdso32/
    ...
    /home/nathan/cbl/toolchains/llvm-binutils/bin/as: unrecognized option '-EL'
    clang-12: error: assembler command failed with exit code 1 (use -v to see invocation)
    make[3]: *** [arch/arm64/kernel/vdso32/Makefile:181: arch/arm64/kernel/vdso32/note.o] Error 1
    ...

    Adding the value of CROSS_COMPILE_COMPAT (adding notdir to account for a
    full path for CROSS_COMPILE_COMPAT) fixes this issue, which matches the
    solution done for the main Makefile [2].

    [1]: https://github.com/llvm/llvm-project/commit/3452a0d8c17f7166f479706b293caf6ac76ffd90
    [2]: https://lore.kernel.org/lkml/20200721173125.1273884-1-maskray@google.com/

    Signed-off-by: Nathan Chancellor
    Cc: stable@vger.kernel.org
    Link: https://github.com/ClangBuiltLinux/linux/issues/1099
    Link: https://lore.kernel.org/r/20200723041509.400450-1-natechancellor@gmail.com
    Signed-off-by: Will Deacon

    Nathan Chancellor
     
  • H.J. reported that post 5.7 a segfault of a user space task does not longer
    dump the Code bytes when /proc/sys/debug/exception-trace is enabled. It
    prints 'Code: Bad RIP value.' instead.

    This was broken by a recent change which made probe_kernel_read() reject
    non-kernel addresses.

    Update show_opcodes() so it retrieves user space opcodes via
    copy_from_user_nmi().

    Fixes: 98a23609b103 ("maccess: always use strict semantics for probe_kernel_read")
    Reported-by: H.J. Lu
    Signed-off-by: Thomas Gleixner
    Link: https://lkml.kernel.org/r/87h7tz306w.fsf@nanos.tec.linutronix.de

    Thomas Gleixner
     
  • If a user task's stack is empty, or if it only has user regs, ORC
    reports it as a reliable empty stack. But arch_stack_walk_reliable()
    incorrectly treats it as unreliable.

    That happens because the only success path for user tasks is inside the
    loop, which only iterates on non-empty stacks. Generally, a user task
    must end in a user regs frame, but an empty stack is an exception to
    that rule.

    Thanks to commit 71c95825289f ("x86/unwind/orc: Fix error handling in
    __unwind_start()"), unwind_start() now sets state->error appropriately.
    So now for both ORC and FP unwinders, unwind_done() and !unwind_error()
    always means the end of the stack was successfully reached. So the
    success path for kthreads is no longer needed -- it can also be used for
    empty user tasks.

    Reported-by: Wang ShaoBo
    Signed-off-by: Josh Poimboeuf
    Signed-off-by: Thomas Gleixner
    Tested-by: Wang ShaoBo
    Link: https://lkml.kernel.org/r/f136a4e5f019219cbc4f4da33b30c2f44fa65b84.1594994374.git.jpoimboe@redhat.com

    Josh Poimboeuf
     
  • The ORC unwinder fails to unwind newly forked tasks which haven't yet
    run on the CPU. It correctly reads the 'ret_from_fork' instruction
    pointer from the stack, but it incorrectly interprets that value as a
    call stack address rather than a "signal" one, so the address gets
    incorrectly decremented in the call to orc_find(), resulting in bad ORC
    data.

    Fix it by forcing 'ret_from_fork' frames to be signal frames.

    Reported-by: Wang ShaoBo
    Signed-off-by: Josh Poimboeuf
    Signed-off-by: Thomas Gleixner
    Tested-by: Wang ShaoBo
    Link: https://lkml.kernel.org/r/f91a8778dde8aae7f71884b5df2b16d552040441.1594994374.git.jpoimboe@redhat.com

    Josh Poimboeuf
     
  • …b/linux-media into master

    Pull media fixes from Mauro Carvalho Chehab:
    "A series of fixes for the upcoming atomisp driver. They solve issues
    when probing atomisp on devices with multiple cameras and get rid of
    warnings when built with W=1.

    The diffstat is a bit long, as this driver has several abstractions.
    The patches that solved the issues with W=1 had to get rid of some
    duplicated code (there used to have 2 versions of the same code, one
    for ISP2401 and another one for ISP2400).

    As this driver is not in 5.7, such changes won't cause regressions"

    * tag 'media/v5.8-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (38 commits)
    Revert "media: atomisp: keep the ISP powered on when setting it"
    media: atomisp: fix mask and shift operation on ISPSSPM0
    media: atomisp: move system_local consts into a C file
    media: atomisp: get rid of version-specific system_local.h
    media: atomisp: move global stuff into a common header
    media: atomisp: remove non-used 32-bits consts at system_local
    media: atomisp: get rid of some unused static vars
    media: atomisp: Fix error code in ov5693_probe()
    media: atomisp: Replace trace_printk by pr_info
    media: atomisp: Fix __func__ style warnings
    media: atomisp: fix help message for ISP2401 selection
    media: atomisp: i2c: atomisp-ov2680.c: fixed a brace coding style issue.
    media: atomisp: make const arrays static, makes object smaller
    media: atomisp: Clean up non-existing folders from Makefile
    media: atomisp: Get rid of ACPI specifics in gmin_subdev_add()
    media: atomisp: Provide Gmin subdev as parameter to gmin_subdev_add()
    media: atomisp: Use temporary variable for device in gmin_subdev_add()
    media: atomisp: Refactor PMIC detection to a separate function
    media: atomisp: Deduplicate return ret in gmin_i2c_write()
    media: atomisp: Make pointer to PMIC client global
    ...

    Linus Torvalds
     

22 Jul, 2020

2 commits

  • On x86-32 the idt_table with 256 entries needs only 2048 bytes. It is
    page-aligned, but the end of the .bss..page_aligned section is not
    guaranteed to be page-aligned.

    As a result, objects from other .bss sections may end up on the same 4k
    page as the idt_table, and will accidentially get mapped read-only during
    boot, causing unexpected page-faults when the kernel writes to them.

    This could be worked around by making the objects in the page aligned
    sections page sized, but that's wrong.

    Explicit sections which store only page aligned objects have an implicit
    guarantee that the object is alone in the page in which it is placed. That
    works for all objects except the last one. That's inconsistent.

    Enforcing page sized objects for these sections would wreckage memory
    sanitizers, because the object becomes artificially larger than it should
    be and out of bound access becomes legit.

    Align the end of the .bss..page_aligned and .data..page_aligned section on
    page-size so all objects places in these sections are guaranteed to have
    their own page.

    [ tglx: Amended changelog ]

    Signed-off-by: Joerg Roedel
    Signed-off-by: Thomas Gleixner
    Reviewed-by: Kees Cook
    Cc: stable@vger.kernel.org
    Link: https://lkml.kernel.org/r/20200721093448.10417-1-joro@8bytes.org

    Joerg Roedel
     
  • Commit d341659f470b ("xtensa: switch to providing
    csum_and_copy_from_user()") introduced access check, but incorrectly
    tested dst instead of src.
    Fix access_ok argument in csum_and_copy_from_user.

    Cc: Al Viro
    Fixes: d341659f470b ("xtensa: switch to providing csum_and_copy_from_user()")
    Signed-off-by: Max Filippov
    Signed-off-by: Al Viro

    Max Filippov
     

21 Jul, 2020

2 commits

  • Change the counter name DLFT_CCERROR to DLFT_CCFINISH on IBM z15.
    This counter counts completed DEFLATE instructions with exit code
    0, 1 or 2. Since exit code 0 means success and exit code 1 or 2
    indicate errors, change the counter name to avoid confusion.
    This counter is incremented each time the DEFLATE instruction
    completed regardless if an error was detected or not.

    Fixes: d68d5d51dc89 ("s390/cpum_cf: Add new extended counters for IBM z15")
    Fixes: e7950166e402 ("perf vendor events s390: Add new deflate counters for IBM z15")
    Cc: stable@vger.kernel.org # v5.7
    Signed-off-by: Thomas Richter
    Reviewed-by: Sumanth Korikkar
    Signed-off-by: Heiko Carstens

    Thomas Richter
     
  • It fails to boot the v5.8-rc4 kernel with CONFIG_KASAN because kasan_init
    and kasan_early_init use uninitialized __sbi_rfence as executing the
    tlb_flush_all(). Actually, at this moment, only the CPU which is
    responsible for the system initialization enables the MMU. Other CPUs are
    parking at the .Lsecondary_start. Hence the tlb_flush_all() is able to be
    replaced by local_tlb_flush_all() to avoid using uninitialized
    __sbi_rfence.

    Signed-off-by: Vincent Chen
    Signed-off-by: Palmer Dabbelt

    Vincent Chen
     

20 Jul, 2020

4 commits

  • The commit below caused a regression for clearfog-gt-8k, where the link
    between the switch and the host does not come up.

    Investigation revealed two issues:
    - MV88E6xxx DSA no longer allows an in-band link to come up as the link
    is programmed to be forced down. Commit "net: dsa: mv88e6xxx: fix
    in-band AN link establishment" addresses this.

    - The dts configured dissimilar link modes at each end of the host to
    switch link; the host was configured using a fixed link (so has no
    in-band status) and the switch was configured to expect in-band
    status.

    With both issues fixed, the regression is resolved.

    Fixes: 34b5e6a33c1a ("net: dsa: mv88e6xxx: Configure MAC when using fixed link")
    Reported-by: Martin Rowe
    Signed-off-by: Russell King
    Reviewed-by: Andrew Lunn
    Signed-off-by: David S. Miller

    Russell King
     
  • This fixes a regression encountered while running the
    gdb.base/corefile.exp test in GDB's test suite.

    In my testing, the typo prevented the sw_reserved field of struct
    fxregs_state from being output to the kernel XSAVES area. Thus the
    correct mask corresponding to XCR0 was not present in the core file for
    GDB to interrogate, resulting in the following behavior:

    [kev@f32-1 gdb]$ ./gdb -q testsuite/outputs/gdb.base/corefile/corefile testsuite/outputs/gdb.base/corefile/corefile.core
    Reading symbols from testsuite/outputs/gdb.base/corefile/corefile...
    [New LWP 232880]

    warning: Unexpected size of section `.reg-xstate/232880' in core file.

    With the typo fixed, the test works again as expected.

    Signed-off-by: Kevin Buettner
    Fixes: 9e4636545933 ("copy_xstate_to_kernel(): don't leave parts of destination uninitialized")
    Cc: Al Viro
    Cc: Dave Airlie
    Signed-off-by: Linus Torvalds

    Kevin Buettner
     
  • …it/tip/tip into master

    Pull x86 fixes from Thomas Gleixner:
    "A pile of fixes for x86:

    - Fix the I/O bitmap invalidation on XEN PV, which was overlooked in
    the recent ioperm/iopl rework. This caused the TSS and XEN's I/O
    bitmap to get out of sync.

    - Use the proper vectors for HYPERV.

    - Make disabling of stack protector for the entry code work with GCC
    builds which enable stack protector by default. Removing the option
    is not sufficient, it needs an explicit -fno-stack-protector to
    shut it off.

    - Mark check_user_regs() noinstr as it is called from noinstr code.
    The missing annotation causes it to be placed in the text section
    which makes it instrumentable.

    - Add the missing interrupt disable in exc_alignment_check()

    - Fixup a XEN_PV build dependency in the 32bit entry code

    - A few fixes to make the Clang integrated assembler happy

    - Move EFI stub build to the right place for out of tree builds

    - Make prepare_exit_to_usermode() static. It's not longer called from
    ASM code"

    * tag 'x86-urgent-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/boot: Don't add the EFI stub to targets
    x86/entry: Actually disable stack protector
    x86/ioperm: Fix io bitmap invalidation on Xen PV
    x86: math-emu: Fix up 'cmp' insn for clang ias
    x86/entry: Fix vectors to IDTENTRY_SYSVEC for CONFIG_HYPERV
    x86/entry: Add compatibility with IAS
    x86/entry/common: Make prepare_exit_to_usermode() static
    x86/entry: Mark check_user_regs() noinstr
    x86/traps: Disable interrupts in exc_aligment_check()
    x86/entry/32: Fix XEN_PV build dependency

    Linus Torvalds
     
  • …it/tip/tip into master

    Pull irq fixes from Thomas Gleixner:
    "Two fixes for the interrupt subsystem:

    - Make the handling of the firmware node consistent and do not free
    the node after the domain has been created successfully. The core
    code stores a pointer to it which can lead to a use after free or
    double free.

    This used to "work" because the pointer was not stored when the
    initial code was written, but at some point later it was required
    to store it. Of course nobody noticed that the existing users break
    that way.

    - Handle affinity setting on inactive interrupts correctly when
    hierarchical irq domains are enabled.

    When interrupts are inactive with the modern hierarchical irqdomain
    design, the interrupt chips are not necessarily in a state where
    affinity changes can be handled. The legacy irq chip design allowed
    this because interrupts are immediately fully initialized at
    allocation time. X86 has a hacky workaround for this, but other
    implementations do not.

    This cased malfunction on GIC-V3. Instead of playing whack a mole
    to find all affected drivers, change the core code to store the
    requested affinity setting and then establish it when the interrupt
    is allocated, which makes the X86 hack go away"

    * tag 'irq-urgent-2020-07-19' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    genirq/affinity: Handle affinity setting on inactive interrupts correctly
    irqdomain/treewide: Keep firmware node unconditionally allocated

    Linus Torvalds
     

19 Jul, 2020

4 commits

  • vmlinux-objs-y is added to targets, which currently means that the EFI
    stub gets added to the targets as well. It shouldn't be added since it
    is built elsewhere.

    This confuses Makefile.build which interprets the EFI stub as a target
    $(obj)/$(objtree)/drivers/firmware/efi/libstub/lib.a
    and will create drivers/firmware/efi/libstub/ underneath
    arch/x86/boot/compressed, to hold this supposed target, if building
    out-of-tree. [0]

    Fix this by pulling the stub out of vmlinux-objs-y into efi-obj-y.

    [0] See scripts/Makefile.build near the end:
    # Create directories for object files if they do not exist

    Signed-off-by: Arvind Sankar
    Signed-off-by: Thomas Gleixner
    Reviewed-by: Masahiro Yamada
    Acked-by: Ard Biesheuvel
    Link: https://lkml.kernel.org/r/20200715032631.1562882-1-nivedita@alum.mit.edu

    Arvind Sankar
     
  • Some builds of GCC enable stack protector by default. Simply removing
    the arguments is not sufficient to disable stack protector, as the stack
    protector for those GCC builds must be explicitly disabled. Remove the
    argument removals and add -fno-stack-protector. Additionally include
    missed x32 argument updates, and adjust whitespace for readability.

    Fixes: 20355e5f73a7 ("x86/entry: Exclude low level entry code from sanitizing")
    Signed-off-by: Kees Cook
    Signed-off-by: Thomas Gleixner
    Link: https://lkml.kernel.org/r/202006261333.585319CA6B@keescook

    Kees Cook
     
  • …/git/riscv/linux into master

    Pull RISC-V fixes from Palmer Dabbelt:
    "Two fixes:

    - 16KiB kernel stacks on rv64, which fixes a lot of crashes.

    - Rolling an mmiowb() into the scheduler, which when combined with
    Will's fix to the mmiowb()-on-spinlock should fix the PREEMPT
    issues we've been seeing"

    * tag 'riscv-for-linus-5.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
    RISC-V: Upgrade smp_mb__after_spinlock() to iorw,iorw
    riscv: use 16KB kernel stack on 64-bit

    Linus Torvalds
     
  • Pull powerpc fixes from Michael Ellerman:
    "Some more powerpc fixes for 5.8:

    - A fix to the VAS code we merged this cycle, to report the proper
    error code to userspace for address translation failures. And a
    selftest update to match.

    - Another fix for our pkey handling of PROT_EXEC mappings.

    - A fix for a crash when booting a "secure VM" under an ultravisor
    with certain numbers of CPUs.

    Thanks to: Aneesh Kumar K.V, Haren Myneni, Laurent Dufour, Sandipan
    Das, Satheesh Rajendran, Thiago Jung Bauermann"

    * tag 'powerpc-5.8-7' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
    selftests/powerpc: Use proper error code to check fault address
    powerpc/vas: Report proper error code for address translation failure
    powerpc/pseries/svm: Fix incorrect check for shared_lppaca_size
    powerpc/book3s64/pkeys: Fix pkey_access_permitted() for execute disable pkey

    Linus Torvalds
     

18 Jul, 2020

8 commits

  • tss_invalidate_io_bitmap() wasn't wired up properly through the pvop
    machinery, so the TSS and Xen's io bitmap would get out of sync
    whenever disabling a valid io bitmap.

    Add a new pvop for tss_invalidate_io_bitmap() to fix it.

    This is XSA-329.

    Fixes: 22fe5b0439dd ("x86/ioperm: Move TSS bitmap update to exit to user work")
    Signed-off-by: Andy Lutomirski
    Signed-off-by: Thomas Gleixner
    Reviewed-by: Juergen Gross
    Reviewed-by: Thomas Gleixner
    Cc: stable@vger.kernel.org
    Link: https://lkml.kernel.org/r/d53075590e1f91c19f8af705059d3ff99424c020.1595030016.git.luto@kernel.org

    Andy Lutomirski
     
  • IOSF MBI header contains a lot of definitions, such as
    end point addresses of IPs. Move CCK address from AtomISP driver
    to generic header.

    While here, drop unused one.

    Signed-off-by: Andy Shevchenko
    Signed-off-by: Mauro Carvalho Chehab

    Andy Shevchenko
     
  • Pull ARM SoC fixes from Arnd Bergmann:
    "This time there are a number of actual code fixes, plus a small set of
    device tree issues getting addressed:

    Renesas:

    - one defconfig cleanup to allow a later Kconfig change

    Intel socfpga:

    - enable QSPI devices on some machines

    - fix DTC validation warnings

    TI OMAP:

    - Two DEBUG_ATOMIC_SLEEP fixes for ti-sysc interconnect target
    module driver

    - A regression fix for ti-sysc no-idle handling that caused issues
    compared to earlier platform data based booting

    - A fix for memory leak for omap_hwmod_allocate_module

    - Fix d_can driver probe for am437x

    NXP i.MX:

    - A couple of fixes on i.MX platform device registration code to
    stop the use of invalid IRQ 0.

    - Fix a regression seen on ls1021a platform, caused by commit
    52102a3ba6a61 ("soc: imx: move cpu code to drivers/soc/imx").

    - Fix a misconfiguration of audio SSI on imx6qdl-gw551x board.

    Amlogic Meson:

    - misc DT fixes

    - SoC ID fixes to detect all chips correctly"

    * tag 'arm-fixes-5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
    arm64: dts: spcfpga: Align GIC, NAND and UART nodenames with dtschema
    ARM: dts: socfpga: Align L2 cache-controller nodename with dtschema
    arm64: dts: stratix10: increase QSPI reg address in nand dts file
    arm64: dts: stratix10: add status to qspi dts node
    arm64: dts: agilex: add status to qspi dts node
    ARM: dts: Fix dcan driver probe failed on am437x platform
    ARM: OMAP2+: Fix possible memory leak in omap_hwmod_allocate_module
    arm64: defconfig: Enable CONFIG_PCIE_RCAR_HOST
    soc: imx: check ls1021a
    ARM: imx: Remove imx_add_imx_dma() unused irq_err argument
    ARM: imx: Provide correct number of resources when registering gpio devices
    ARM: dts: imx6qdl-gw551x: fix audio SSI
    bus: ti-sysc: Do not disable on suspend for no-idle
    bus: ti-sysc: Fix sleeping function called from invalid context for RTC quirk
    bus: ti-sysc: Fix wakeirq sleeping function called from invalid context
    ARM: dts: meson: Align L2 cache-controller nodename with dtschema
    arm64: dts: meson-gxl-s805x: reduce initial Mali450 core frequency
    arm64: dts: meson: add missing gxl rng clock
    soc: amlogic: meson-gx-socinfo: Fix S905X3 and S905D3 ID's

    Linus Torvalds
     
  • Pull arm64 fixes from Will Deacon:
    "A batch of arm64 fixes.

    Although the diffstat is a bit larger than we'd usually have at this
    stage, a decent amount of it is the addition of comments describing
    our syscall tracing behaviour, and also a sweep across all the modular
    arm64 PMU drivers to make them rebust against unloading and unbinding.

    There are a couple of minor things kicking around at the moment (CPU
    errata and module PLTs for very large modules), but I'm not expecting
    any significant changes now for us in 5.8.

    - Fix kernel text addresses for relocatable images booting using EFI
    and with KASLR disabled so that they match the vmlinux ELF binary.

    - Fix unloading and unbinding of PMU driver modules.

    - Fix generic mmiowb() when writeX() is called from preemptible
    context (reported by the riscv folks).

    - Fix ptrace hardware single-step interactions with signal handlers,
    system calls and reverse debugging.

    - Fix reporting of 64-bit x0 register for 32-bit tasks via
    'perf_regs'.

    - Add comments describing syscall entry/exit tracing ABI"

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    drivers/perf: Prevent forced unbinding of PMU drivers
    asm-generic/mmiowb: Allow mmiowb_set_pending() when preemptible()
    arm64: Use test_tsk_thread_flag() for checking TIF_SINGLESTEP
    arm64: ptrace: Use NO_SYSCALL instead of -1 in syscall_trace_enter()
    arm64: syscall: Expand the comment about ptrace and syscall(-1)
    arm64: ptrace: Add a comment describing our syscall entry/exit trap ABI
    arm64: compat: Ensure upper 32 bits of x0 are zero on syscall return
    arm64: ptrace: Override SPSR.SS when single-stepping is enabled
    arm64: ptrace: Consistently use pseudo-singlestep exceptions
    drivers/perf: Fix kernel panic when rmmod PMU modules during perf sampling
    efi/libstub/arm64: Retain 2MB kernel Image alignment if !KASLR

    Linus Torvalds
     
  • Setting interrupt affinity on inactive interrupts is inconsistent when
    hierarchical irq domains are enabled. The core code should just store the
    affinity and not call into the irq chip driver for inactive interrupts
    because the chip drivers may not be in a state to handle such requests.

    X86 has a hacky workaround for that but all other irq chips have not which
    causes problems e.g. on GIC V3 ITS.

    Instead of adding more ugly hacks all over the place, solve the problem in
    the core code. If the affinity is set on an inactive interrupt then:

    - Store it in the irq descriptors affinity mask
    - Update the effective affinity to reflect that so user space has
    a consistent view
    - Don't call into the irq chip driver

    This is the core equivalent of the X86 workaround and works correctly
    because the affinity setting is established in the irq chip when the
    interrupt is activated later on.

    Note, that this is only effective when hierarchical irq domains are enabled
    by the architecture. Doing it unconditionally would break legacy irq chip
    implementations.

    For hierarchial irq domains this works correctly as none of the drivers can
    have a dependency on affinity setting in inactive state by design.

    Remove the X86 workaround as it is not longer required.

    Fixes: 02edee152d6e ("x86/apic/vector: Ignore set_affinity call for inactive interrupts")
    Reported-by: Ali Saidi
    Signed-off-by: Thomas Gleixner
    Tested-by: Ali Saidi
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20200529015501.15771-1-alisaidi@amazon.com
    Link: https://lkml.kernel.org/r/877dv2rv25.fsf@nanos.tec.linutronix.de

    Thomas Gleixner
     
  • While digging through the recent mmiowb preemption issue it came up that
    we aren't actually preventing IO from crossing a scheduling boundary.
    While it's a bit ugly to overload smp_mb__after_spinlock() with this
    behavior, it's what PowerPC is doing so there's some precedent.

    Signed-off-by: Palmer Dabbelt

    Palmer Dabbelt
     
  • …el/git/dinguyen/linux into arm/fixes

    arm/arm64: dts: socfpga: fixes for v5.8
    - Add status = "okay" in QSPI
    - Increase QSPI size in reg property
    - Fix dtschema for SoCFPGA platforms

    * tag 'socfpga_fixes_for_v5.8_v2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
    arm64: dts: spcfpga: Align GIC, NAND and UART nodenames with dtschema
    ARM: dts: socfpga: Align L2 cache-controller nodename with dtschema
    arm64: dts: stratix10: increase QSPI reg address in nand dts file
    arm64: dts: stratix10: add status to qspi dts node
    arm64: dts: agilex: add status to qspi dts node

    Link: https://lore.kernel.org/r/20200717155758.18233-1-dinguyen@kernel.org
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>

    Arnd Bergmann
     
  • …rnel/git/geert/renesas-devel into arm/fixes

    Renesas fixes for v5.8

    - Replace CONFIG_PCIE_RCAR by CONFIG_PCIE_RCAR_HOST in the defconfig,
    to unblock a planned Kconfig change.

    * tag 'renesas-fixes-for-v5.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
    arm64: defconfig: Enable CONFIG_PCIE_RCAR_HOST

    Link: https://lore.kernel.org/r/20200717100523.15418-1-geert+renesas@glider.be
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>

    Arnd Bergmann
     

17 Jul, 2020

3 commits

  • …/kernel/git/tmlind/linux-omap into arm/fixes

    Fixes for omaps for v5.8-rc cycle

    Few fixes for issues noticed during testing:

    - Two DEBUG_ATOMIC_SLEEP fixes for ti-sysc interconnect target module
    driver

    - A regression fix for ti-sysc no-idle handling that caused issues
    compared to earlier platform data based booting

    - A fix for memory leak for omap_hwmod_allocate_module

    - Fix d_can driver probe for am437x

    * tag 'omap-for-v5.8/fixes-rc5-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
    ARM: dts: Fix dcan driver probe failed on am437x platform
    ARM: OMAP2+: Fix possible memory leak in omap_hwmod_allocate_module
    bus: ti-sysc: Do not disable on suspend for no-idle
    bus: ti-sysc: Fix sleeping function called from invalid context for RTC quirk
    bus: ti-sysc: Fix wakeirq sleeping function called from invalid context

    Link: https://lore.kernel.org/r/pull-1594840100-132735@atomide.com
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>

    Arnd Bergmann
     
  • …wnguo/linux into arm/fixes

    i.MX fixes for 5.8, round 2:

    - A couple of fixes on i.MX platform device registration code to stop
    the use of invalid IRQ 0.
    - Fix a regression seen on ls1021a platform, caused by commit
    52102a3ba6a61 ("soc: imx: move cpu code to drivers/soc/imx").
    - Fix a misconfiguration of audio SSI on imx6qdl-gw551x board.

    * tag 'imx-fixes-5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
    soc: imx: check ls1021a
    ARM: imx: Remove imx_add_imx_dma() unused irq_err argument
    ARM: imx: Provide correct number of resources when registering gpio devices
    ARM: dts: imx6qdl-gw551x: fix audio SSI

    Link: https://lore.kernel.org/r/20200714145649.GP15718@dragon
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>

    Arnd Bergmann
     
  • …an/linux-amlogic into arm/fixes

    Amlogic fixes for v5.8-rc
    - misc DT fixes, and SoC ID fixes

    * tag 'amlogic-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
    ARM: dts: meson: Align L2 cache-controller nodename with dtschema
    arm64: dts: meson-gxl-s805x: reduce initial Mali450 core frequency
    arm64: dts: meson: add missing gxl rng clock
    soc: amlogic: meson-gx-socinfo: Fix S905X3 and S905D3 ID's

    Link: https://lore.kernel.org/r/7hk0zc1ujc.fsf@baylibre.com
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>

    Arnd Bergmann
     

16 Jul, 2020

2 commits

  • The clang integrated assembler requires the 'cmp' instruction to
    have a length prefix here:

    arch/x86/math-emu/wm_sqrt.S:212:2: error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw', or 'cmpl')
    cmp $0xffffffff,-24(%ebp)
    ^

    Make this a 32-bit comparison, which it was clearly meant to be.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Thomas Gleixner
    Reviewed-by: Nick Desaulniers
    Link: https://lkml.kernel.org/r/20200527135352.1198078-1-arnd@arndb.de

    Arnd Bergmann
     
  • When assembling with Clang via `make LLVM_IAS=1` and CONFIG_HYPERV enabled,
    we observe the following error:

    :9:6: error: expected absolute expression
    .if HYPERVISOR_REENLIGHTENMENT_VECTOR == 3
    ^
    :1:1: note: while in macro instantiation
    idtentry HYPERVISOR_REENLIGHTENMENT_VECTOR asm_sysvec_hyperv_reenlightenment sysvec_hyperv_reenlightenment has_error_code=0
    ^
    ./arch/x86/include/asm/idtentry.h:627:1: note: while in macro instantiation
    idtentry_sysvec HYPERVISOR_REENLIGHTENMENT_VECTOR sysvec_hyperv_reenlightenment;
    ^
    :9:6: error: expected absolute expression
    .if HYPERVISOR_STIMER0_VECTOR == 3
    ^
    :1:1: note: while in macro instantiation
    idtentry HYPERVISOR_STIMER0_VECTOR asm_sysvec_hyperv_stimer0 sysvec_hyperv_stimer0 has_error_code=0
    ^
    ./arch/x86/include/asm/idtentry.h:628:1: note: while in macro instantiation
    idtentry_sysvec HYPERVISOR_STIMER0_VECTOR sysvec_hyperv_stimer0;

    This is caused by typos in arch/x86/include/asm/idtentry.h:

    HYPERVISOR_REENLIGHTENMENT_VECTOR -> HYPERV_REENLIGHTENMENT_VECTOR
    HYPERVISOR_STIMER0_VECTOR -> HYPERV_STIMER0_VECTOR

    For more details see ClangBuiltLinux issue #1088.

    Fixes: a16be368dd3f ("x86/entry: Convert various hypervisor vectors to IDTENTRY_SYSVEC")
    Suggested-by: Nick Desaulniers
    Signed-off-by: Sedat Dilek
    Signed-off-by: Thomas Gleixner
    Reviewed-by: Nathan Chancellor
    Reviewed-by: Wei Liu
    Reviewed-by: Nick Desaulniers
    Link: https://github.com/ClangBuiltLinux/linux/issues/1088
    Link: https://github.com/ClangBuiltLinux/linux/issues/1043
    Link: https://lore.kernel.org/patchwork/patch/1272115/
    Link: https://lkml.kernel.org/r/20200714194740.4548-1-sedat.dilek@gmail.com

    Sedat Dilek