20 Jan, 2021

2 commits

  • Changes in 5.10.9
    btrfs: reloc: fix wrong file extent type check to avoid false ENOENT
    btrfs: prevent NULL pointer dereference in extent_io_tree_panic
    ALSA: hda/realtek: fix right sounds and mute/micmute LEDs for HP machines
    ALSA: doc: Fix reference to mixart.rst
    ASoC: AMD Renoir - add DMI entry for Lenovo ThinkPad X395
    ASoC: dapm: remove widget from dirty list on free
    x86/hyperv: check cpu mask after interrupt has been disabled
    drm/amdgpu: add green_sardine device id (v2)
    drm/amdgpu: fix DRM_INFO flood if display core is not supported (bug 210921)
    Revert "drm/amd/display: Fixed Intermittent blue screen on OLED panel"
    drm/amdgpu: add new device id for Renior
    drm/i915: Allow the sysadmin to override security mitigations
    drm/i915/gt: Limit VFE threads based on GT
    drm/i915/backlight: fix CPU mode backlight takeover on LPT
    drm/bridge: sii902x: Refactor init code into separate function
    dt-bindings: display: sii902x: Add supply bindings
    drm/bridge: sii902x: Enable I/O and core VCC supplies if present
    tracing/kprobes: Do the notrace functions check without kprobes on ftrace
    tools/bootconfig: Add tracing_on support to helper scripts
    ext4: use IS_ERR instead of IS_ERR_OR_NULL and set inode null when IS_ERR
    ext4: fix wrong list_splice in ext4_fc_cleanup
    ext4: fix bug for rename with RENAME_WHITEOUT
    cifs: check pointer before freeing
    cifs: fix interrupted close commands
    riscv: Drop a duplicated PAGE_KERNEL_EXEC
    riscv: return -ENOSYS for syscall -1
    riscv: Fixup CONFIG_GENERIC_TIME_VSYSCALL
    riscv: Fix KASAN memory mapping.
    mips: fix Section mismatch in reference
    mips: lib: uncached: fix non-standard usage of variable 'sp'
    MIPS: boot: Fix unaligned access with CONFIG_MIPS_RAW_APPENDED_DTB
    MIPS: Fix malformed NT_FILE and NT_SIGINFO in 32bit coredumps
    MIPS: relocatable: fix possible boot hangup with KASLR enabled
    RDMA/ocrdma: Fix use after free in ocrdma_dealloc_ucontext_pd()
    ACPI: scan: Harden acpi_device_add() against device ID overflows
    xen/privcmd: allow fetching resource sizes
    compiler.h: Raise minimum version of GCC to 5.1 for arm64
    mm/vmalloc.c: fix potential memory leak
    mm/hugetlb: fix potential missing huge page size info
    mm/process_vm_access.c: include compat.h
    dm raid: fix discard limits for raid1
    dm snapshot: flush merged data before committing metadata
    dm integrity: fix flush with external metadata device
    dm integrity: fix the maximum number of arguments
    dm crypt: use GFP_ATOMIC when allocating crypto requests from softirq
    dm crypt: do not wait for backlogged crypto request completion in softirq
    dm crypt: do not call bio_endio() from the dm-crypt tasklet
    dm crypt: defer decryption to a tasklet if interrupts disabled
    stmmac: intel: change all EHL/TGL to auto detect phy addr
    r8152: Add Lenovo Powered USB-C Travel Hub
    btrfs: tree-checker: check if chunk item end overflows
    ext4: don't leak old mountpoint samples
    io_uring: don't take files/mm for a dead task
    io_uring: drop mm and files after task_work_run
    ARC: build: remove non-existing bootpImage from KBUILD_IMAGE
    ARC: build: add uImage.lzma to the top-level target
    ARC: build: add boot_targets to PHONY
    ARC: build: move symlink creation to arch/arc/Makefile to avoid race
    ARM: omap2: pmic-cpcap: fix maximum voltage to be consistent with defaults on xt875
    ath11k: fix crash caused by NULL rx_channel
    netfilter: ipset: fixes possible oops in mtype_resize
    ath11k: qmi: try to allocate a big block of DMA memory first
    btrfs: fix async discard stall
    btrfs: merge critical sections of discard lock in workfn
    btrfs: fix transaction leak and crash after RO remount caused by qgroup rescan
    regulator: bd718x7: Add enable times
    ethernet: ucc_geth: fix definition and size of ucc_geth_tx_global_pram
    ARM: dts: ux500/golden: Set display max brightness
    habanalabs: adjust pci controller init to new firmware
    habanalabs/gaudi: retry loading TPC f/w on -EINTR
    habanalabs: register to pci shutdown callback
    staging: spmi: hisi-spmi-controller: Fix some error handling paths
    spi: altera: fix return value for altera_spi_txrx()
    habanalabs: Fix memleak in hl_device_reset
    hwmon: (pwm-fan) Ensure that calculation doesn't discard big period values
    lib/raid6: Let $(UNROLL) rules work with macOS userland
    kconfig: remove 'kvmconfig' and 'xenconfig' shorthands
    spi: fix the divide by 0 error when calculating xfer waiting time
    io_uring: drop file refs after task cancel
    bfq: Fix computation of shallow depth
    arch/arc: add copy_user_page() to to fix build error on ARC
    misdn: dsp: select CONFIG_BITREVERSE
    net: ethernet: fs_enet: Add missing MODULE_LICENSE
    selftests: fix the return value for UDP GRO test
    nvme-pci: mark Samsung PM1725a as IGNORE_DEV_SUBNQN
    nvme: avoid possible double fetch in handling CQE
    nvmet-rdma: Fix list_del corruption on queue establishment failure
    drm/amd/display: fix sysfs amdgpu_current_backlight_pwm NULL pointer issue
    drm/amdgpu: fix a GPU hang issue when remove device
    drm/amd/pm: fix the failure when change power profile for renoir
    drm/amdgpu: fix potential memory leak during navi12 deinitialization
    usb: typec: Fix copy paste error for NVIDIA alt-mode description
    iommu/vt-d: Fix lockdep splat in sva bind()/unbind()
    ACPI: scan: add stub acpi_create_platform_device() for !CONFIG_ACPI
    drm/msm: Call msm_init_vram before binding the gpu
    ARM: picoxcell: fix missing interrupt-parent properties
    poll: fix performance regression due to out-of-line __put_user()
    rcu-tasks: Move RCU-tasks initialization to before early_initcall()
    bpf: Simplify task_file_seq_get_next()
    bpf: Save correct stopping point in file seq iteration
    x86/sev-es: Fix SEV-ES OUT/IN immediate opcode vc handling
    cfg80211: select CONFIG_CRC32
    nvme-fc: avoid calling _nvme_fc_abort_outstanding_ios from interrupt context
    iommu/vt-d: Update domain geometry in iommu_ops.at(de)tach_dev
    net/mlx5e: CT: Use per flow counter when CT flow accounting is enabled
    net/mlx5: Fix passing zero to 'PTR_ERR'
    net/mlx5: E-Switch, fix changing vf VLANID
    blk-mq-debugfs: Add decode for BLK_MQ_F_TAG_HCTX_SHARED
    mm: fix clear_refs_write locking
    mm: don't play games with pinned pages in clear_page_refs
    mm: don't put pinned pages into the swap cache
    perf intel-pt: Fix 'CPU too large' error
    dump_common_audit_data(): fix racy accesses to ->d_name
    ASoC: meson: axg-tdm-interface: fix loopback
    ASoC: meson: axg-tdmin: fix axg skew offset
    ASoC: Intel: fix error code cnl_set_dsp_D0()
    nvmet-rdma: Fix NULL deref when setting pi_enable and traddr INADDR_ANY
    nvme: don't intialize hwmon for discovery controllers
    nvme-tcp: fix possible data corruption with bio merges
    nvme-tcp: Fix warning with CONFIG_DEBUG_PREEMPT
    NFS4: Fix use-after-free in trace_event_raw_event_nfs4_set_lock
    pNFS: We want return-on-close to complete when evicting the inode
    pNFS: Mark layout for return if return-on-close was not sent
    pNFS: Stricter ordering of layoutget and layoutreturn
    NFS: Adjust fs_context error logging
    NFS/pNFS: Don't call pnfs_free_bucket_lseg() before removing the request
    NFS/pNFS: Don't leak DS commits in pnfs_generic_retry_commit()
    NFS/pNFS: Fix a leak of the layout 'plh_outstanding' counter
    NFS: nfs_delegation_find_inode_server must first reference the superblock
    NFS: nfs_igrab_and_active must first reference the superblock
    scsi: ufs: Fix possible power drain during system suspend
    ext4: fix superblock checksum failure when setting password salt
    RDMA/restrack: Don't treat as an error allocation ID wrapping
    RDMA/usnic: Fix memleak in find_free_vf_and_create_qp_grp
    bnxt_en: Improve stats context resource accounting with RDMA driver loaded.
    RDMA/mlx5: Fix wrong free of blue flame register on error
    IB/mlx5: Fix error unwinding when set_has_smi_cap fails
    umount(2): move the flag validity checks first
    dm zoned: select CONFIG_CRC32
    drm/i915/dsi: Use unconditional msleep for the panel_on_delay when there is no reset-deassert MIPI-sequence
    drm/i915/icl: Fix initing the DSI DSC power refcount during HW readout
    drm/i915/gt: Restore clear-residual mitigations for Ivybridge, Baytrail
    mm, slub: consider rest of partial list if acquire_slab() fails
    riscv: Trace irq on only interrupt is enabled
    iommu/vt-d: Fix unaligned addresses for intel_flush_svm_range_dev()
    net: sunrpc: interpret the return value of kstrtou32 correctly
    selftests: netfilter: Pass family parameter "-f" to conntrack tool
    dm: eliminate potential source of excessive kernel log noise
    ALSA: fireface: Fix integer overflow in transmit_midi_msg()
    ALSA: firewire-tascam: Fix integer overflow in midi_port_work()
    netfilter: conntrack: fix reading nf_conntrack_buckets
    netfilter: nf_nat: Fix memleak in nf_nat_init
    Linux 5.10.9

    Signed-off-by: Greg Kroah-Hartman
    Change-Id: I609e501511889081e03d2d18ee7e1be95406f396

    Greg Kroah-Hartman
     
  • [ Upstream commit 0c36d88cff4d72149f94809303c5180b6f716d39 ]

    Older versions of BSD awk are fussy about the order of '-v' and '-f'
    flags, and require a space after the flag name. This causes build
    failures on platforms with an old awk, such as macOS and NetBSD.

    Since GNU awk and modern versions of BSD awk (distributed with
    FreeBSD/OpenBSD) are fine with either form, the definition of
    'cmd_unroll' can be trivially tweaked to let the lib/raid6 Makefile
    work with both old and new awk flag dialects.

    Signed-off-by: John Millikin
    Signed-off-by: Masahiro Yamada
    Signed-off-by: Sasha Levin

    John Millikin
     

15 Jan, 2021

1 commit

  • Casting the comparison function to a different type trips indirect call
    Control-Flow Integrity (CFI) checking. Remove the additional consts from
    cmp_func, and the now unneeded casts.

    Bug: 145210207
    Change-Id: Iffe0eeec8e7f65a5937513a4bb87e5107faa004e
    Link: https://lore.kernel.org/lkml/20200110225602.91663-1-samitolvanen@google.com/
    Fixes: 043b3f7b6388 ("lib/list_sort: simplify and remove MAX_LIST_LENGTH_BITS")
    Signed-off-by: Sami Tolvanen

    Sami Tolvanen
     

13 Jan, 2021

1 commit

  • [ Upstream commit 36845663843fc59c5d794e3dc0641472e3e572da ]

    Some graphic card has very big memory on chip, such as 32G bytes.

    In the following case, it will cause overflow:

    pool = gen_pool_create(PAGE_SHIFT, NUMA_NO_NODE);
    ret = gen_pool_add(pool, 0x1000000, SZ_32G, NUMA_NO_NODE);

    va = gen_pool_alloc(pool, SZ_4G);

    The overflow occurs in gen_pool_alloc_algo_owner():

    ....
    size = nbits << order;
    ....

    The @nbits is "int" type, so it will overflow.
    Then the gen_pool_avail() will return the wrong value.

    This patch converts some "int" to "unsigned long", and
    changes the compare code in while.

    Link: https://lkml.kernel.org/r/20201229060657.3389-1-sjhuang@iluvatar.ai
    Signed-off-by: Huang Shijie
    Reported-by: Shi Jiasheng
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Sasha Levin

    Huang Shijie
     

06 Jan, 2021

2 commits

  • commit 605cc30dea249edf1b659e7d0146a2cf13cbbf71 upstream.

    In commit 11fb479ff5d9 ("zlib: export S390 symbols for zlib modules"), I
    added EXPORT_SYMBOL()s to dfltcc_inflate.c but then Mikhail said that
    these should probably be in dfltcc_syms.c with the other
    EXPORT_SYMBOL()s.

    However, that is contrary to the current kernel style, which places
    EXPORT_SYMBOL() immediately after the function that it applies to, so
    move all EXPORT_SYMBOL()s to their respective function locations and
    drop the dfltcc_syms.c file. Also move MODULE_LICENSE() from the
    deleted file to dfltcc.c.

    [rdunlap@infradead.org: remove dfltcc_syms.o from Makefile]
    Link: https://lkml.kernel.org/r/20201227171837.15492-1-rdunlap@infradead.org

    Link: https://lkml.kernel.org/r/20201219052530.28461-1-rdunlap@infradead.org
    Fixes: 11fb479ff5d9 ("zlib: export S390 symbols for zlib modules")
    Signed-off-by: Randy Dunlap
    Cc: Acked-by: Ilya Leoshkevich
    Acked-by: Christian Borntraeger
    Cc: Zaslonko Mikhail
    Cc: Heiko Carstens
    Cc: Vasily Gorbik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Randy Dunlap
     
  • commit f0bb29e8c4076444d32df00c8d32e169ceecf283 upstream.

    Decompressing zlib streams on s390 fails with "incorrect data check"
    error.

    Userspace zlib checks inflate_state.flags in order to byteswap checksums
    only for zlib streams, and s390 hardware inflate code, which was ported
    from there, tries to match this behavior. At the same time, kernel zlib
    does not use inflate_state.flags, so it contains essentially random
    values. For many use cases either zlib stream is zeroed out or checksum
    is not used, so this problem is masked, but at least SquashFS is still
    affected.

    Fix by always passing a checksum to and from the hardware as is, which
    matches zlib_inflate()'s expectations.

    Link: https://lkml.kernel.org/r/20201215155551.894884-1-iii@linux.ibm.com
    Fixes: 126196100063 ("lib/zlib: add s390 hardware support for kernel zlib_inflate")
    Signed-off-by: Ilya Leoshkevich
    Tested-by: Christian Borntraeger
    Acked-by: Mikhail Zaslonko
    Acked-by: Christian Borntraeger
    Cc: Heiko Carstens
    Cc: Vasily Gorbik
    Cc: Mikhail Zaslonko
    Cc: [5.6+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Ilya Leoshkevich
     

30 Dec, 2020

1 commit

  • commit 3577afb0052fca65e67efdfc8e0859bb7bac87a6 upstream.

    In commit a2d375eda771 ("dyndbg: refine export, rename to
    dynamic_debug_exec_queries()"), a string is copied before checking it
    isn't NULL. Fix this, report a usage/interface error, and return the
    proper error code.

    Fixes: a2d375eda771 ("dyndbg: refine export, rename to dynamic_debug_exec_queries()")
    Cc: stable@vger.kernel.org
    Signed-off-by: Jim Cromie
    Link: https://lore.kernel.org/r/20201209183625.2432329-1-jim.cromie@gmail.com
    Signed-off-by: Greg Kroah-Hartman

    Jim Cromie
     

12 Dec, 2020

1 commit

  • With extra warnings enabled, clang complains about the redundant
    -mhard-float argument:

    clang: error: argument unused during compilation: '-mhard-float' [-Werror,-Wunused-command-line-argument]

    Move this into the gcc-only part of the Makefile.

    Link: https://lkml.kernel.org/r/20201203223652.1320700-1-arnd@kernel.org
    Fixes: 4185b3b92792 ("selftests/fpu: Add an FPU selftest")
    Signed-off-by: Arnd Bergmann
    Cc: Nathan Chancellor
    Cc: Nick Desaulniers
    Cc: Petteri Aimonen
    Cc: Borislav Petkov
    Cc: Arnd Bergmann
    Cc: Andy Shevchenko
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     

07 Dec, 2020

1 commit

  • Fix build errors when ZLIB_INFLATE=m and ZLIB_DEFLATE=m and ZLIB_DFLTCC=y
    by exporting the 2 needed symbols in dfltcc_inflate.c.

    Fixes these build errors:

    ERROR: modpost: "dfltcc_inflate" [lib/zlib_inflate/zlib_inflate.ko] undefined!
    ERROR: modpost: "dfltcc_can_inflate" [lib/zlib_inflate/zlib_inflate.ko] undefined!

    Fixes: 126196100063 ("lib/zlib: add s390 hardware support for kernel zlib_inflate")
    Reported-by: kernel test robot
    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Acked-by: Ilya Leoshkevich
    Cc: Mikhail Zaslonko
    Cc: Heiko Carstens
    Cc: Vasily Gorbik
    Cc: Christian Borntraeger
    Link: https://lkml.kernel.org/r/20201123191712.4882-1-rdunlap@infradead.org
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

04 Dec, 2020

1 commit

  • Lilith >_> and Claudio Bozzato of Cisco Talos security team reported
    that collect_syscall() improperly casts the syscall registers to 64-bit
    values leaking the uninitialized last 24 bytes on 32-bit platforms, that
    are visible in /proc/self/syscall.

    The cause is that info->data.args are u64 while syscall_get_arguments()
    uses longs, as hinted by the bogus pointer cast in the function.

    Let's just proceed like the other call places, by retrieving the
    registers into an array of longs before assigning them to the caller's
    array. This was successfully tested on x86_64, i386 and ppc32.

    Reference: CVE-2020-28588, TALOS-2020-1211
    Fixes: 631b7abacd02 ("ptrace: Remove maxargs from task_current_syscall()")
    Cc: Greg KH
    Reviewed-by: Kees Cook
    Tested-by: Michael Ellerman (ppc32)
    Signed-off-by: Willy Tarreau
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    Willy Tarreau
     

20 Nov, 2020

1 commit

  • do_strncpy_from_user() may copy some extra bytes after the NUL
    terminator into the destination buffer. This usually does not matter for
    normal string operations. However, when BPF programs key BPF maps with
    strings, this matters a lot.

    A BPF program may read strings from user memory by calling the
    bpf_probe_read_user_str() helper which eventually calls
    do_strncpy_from_user(). The program can then key a map with the
    destination buffer. BPF map keys are fixed-width and string-agnostic,
    meaning that map keys are treated as a set of bytes.

    The issue is when do_strncpy_from_user() overcopies bytes after the NUL
    terminator, it can result in seemingly identical strings occupying
    multiple slots in a BPF map. This behavior is subtle and totally
    unexpected by the user.

    This commit masks out the bytes following the NUL while preserving
    long-sized stride in the fast path.

    Fixes: 6ae08ae3dea2 ("bpf: Add probe_read_{user, kernel} and probe_read_{user, kernel}_str helpers")
    Signed-off-by: Daniel Xu
    Signed-off-by: Alexei Starovoitov
    Link: https://lore.kernel.org/bpf/21efc982b3e9f2f7b0379eed642294caaa0c27a7.1605642949.git.dxu@dxuuu.xyz

    Daniel Xu
     

07 Nov, 2020

1 commit

  • Pull drm fixes from Dave Airlie:
    "It's Friday here so that means another installment of drm fixes to
    distract you from the counting process.

    Changes all over the place, the amdgpu changes contain support for a
    new GPU that is close to current one already in the tree (Green
    Sardine) so it shouldn't have much side effects.

    Otherwise imx has a few cleanup patches and fixes, amdgpu and i915
    have around the usual smattering of fixes, fonts got constified, and
    vc4/panfrost has some minor fixes. All in all a fairly regular rc3.

    We have an outstanding nouveau regression, but the author is looking
    into the fix, so should be here next week.

    I now return you to counting.

    fonts:
    - constify font structures.

    MAINTAINERS:
    - Fix path for amdgpu power management

    amdgpu:
    - Add support for more navi1x SKUs
    - Fix for suspend on CI dGPUs
    - VCN DPG fix for Picasso
    - Sienna Cichlid fixes
    - Polaris DPM fix
    - Add support for Green Sardine

    amdkfd:
    - Fix an allocation failure check

    i915:
    - Fix set domain's cache coherency
    - Fixes around breadcrumbs
    - Fix encoder lookup during PSR atomic
    - Hold onto an explicit ref to i915_vma_work.pinned
    - gvt: HWSP reset handling fix
    - gvt: flush workaround
    - gvt: vGPU context pin/unpin
    - gvt: mmio cmd access fix for bxt/apl

    imx:
    - drop unused functions and callbacks
    - reuse imx_drm_encoder_parse_of
    - spinlock rework
    - memory leak fix
    - minor cleanups

    vc4:
    - resource cleanup fix

    panfrost:
    - madvise/shrinker fix"

    * tag 'drm-fixes-2020-11-06-1' of git://anongit.freedesktop.org/drm/drm: (55 commits)
    drm/amdgpu/display: remove DRM_AMD_DC_GREEN_SARDINE
    drm/amd/display: Add green_sardine support to DM
    drm/amd/display: Add green_sardine support to DC
    drm/amdgpu: enable vcn support for green_sardine (v2)
    drm/amdgpu: enable green_sardine_asd.bin loading (v2)
    drm/amdgpu/sdma: add sdma engine support for green_sardine (v2)
    drm/amdgpu: add gfx support for green_sardine (v2)
    drm/amdgpu: add soc15 common ip block support for green_sardine (v3)
    drm/amdgpu: add green_sardine support for gpu_info and ip block setting (v2)
    drm/amdgpu: add Green_Sardine APU flag
    drm/amdgpu: resolved ASD loading issue on sienna
    amdkfd: Check kvmalloc return before memcpy
    drm/amdgpu: update golden setting for sienna_cichlid
    amd/amdgpu: Disable VCN DPG mode for Picasso
    drm/amdgpu/swsmu: remove duplicate call to smu_set_default_dpm_table
    drm/i915: Hold onto an explicit ref to i915_vma_work.pinned
    drm/i915/gt: Flush xcs before tgl breadcrumbs
    drm/i915/gt: Expose more parameters for emitting writes into the ring
    drm/i915: Fix encoder lookup during PSR atomic check
    drm/i915/gt: Use the local HWSP offset during submission
    ...

    Linus Torvalds
     

03 Nov, 2020

3 commits

  • Commit 6735b4632def ("Fonts: Support FONT_EXTRA_WORDS macros for built-in
    fonts") introduced the following error when building rpc_defconfig (only
    this build appears to be affected):

    `acorndata_8x8' referenced in section `.text' of arch/arm/boot/compressed/ll_char_wr.o:
    defined in discarded section `.data' of arch/arm/boot/compressed/font.o
    `acorndata_8x8' referenced in section `.data.rel.ro' of arch/arm/boot/compressed/font.o:
    defined in discarded section `.data' of arch/arm/boot/compressed/font.o
    make[3]: *** [/scratch/linux/arch/arm/boot/compressed/Makefile:191: arch/arm/boot/compressed/vmlinux] Error 1
    make[2]: *** [/scratch/linux/arch/arm/boot/Makefile:61: arch/arm/boot/compressed/vmlinux] Error 2
    make[1]: *** [/scratch/linux/arch/arm/Makefile:317: zImage] Error 2

    The .data section is discarded at link time. Reinstating acorndata_8x8 as
    const ensures it is still available after linking. Do the same for the
    other 12 built-in fonts as well, for consistency purposes.

    Cc:
    Cc: Russell King
    Reviewed-by: Greg Kroah-Hartman
    Fixes: 6735b4632def ("Fonts: Support FONT_EXTRA_WORDS macros for built-in fonts")
    Signed-off-by: Lee Jones
    Co-developed-by: Peilin Ye
    Signed-off-by: Peilin Ye
    Signed-off-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/20201102183242.2031659-1-yepeilin.cs@gmail.com

    Lee Jones
     
  • Commit 4d004099a668 ("lockdep: Fix lockdep recursion") uncovered the
    following issue in lib/crc32test reported on s390:

    BUG: using __this_cpu_read() in preemptible [00000000] code: swapper/0/1
    caller is lockdep_hardirqs_on_prepare+0x48/0x270
    CPU: 6 PID: 1 Comm: swapper/0 Not tainted 5.9.0-next-20201015-15164-g03d992bd2de6 #19
    Hardware name: IBM 3906 M04 704 (LPAR)
    Call Trace:
    lockdep_hardirqs_on_prepare+0x48/0x270
    trace_hardirqs_on+0x9c/0x1b8
    crc32_test.isra.0+0x170/0x1c0
    crc32test_init+0x1c/0x40
    do_one_initcall+0x40/0x130
    do_initcalls+0x126/0x150
    kernel_init_freeable+0x1f6/0x230
    kernel_init+0x22/0x150
    ret_from_fork+0x24/0x2c
    no locks held by swapper/0/1.

    Remove extra local_irq_disable/local_irq_enable helpers calls.

    Fixes: 5fb7f87408f1 ("lib: add module support to crc32 tests")
    Signed-off-by: Vasily Gorbik
    Signed-off-by: Andrew Morton
    Cc: Peter Zijlstra
    Cc: Ingo Molnar
    Cc: Greg Kroah-Hartman
    Link: https://lkml.kernel.org/r/patch.git-4369da00c06e.your-ad-here.call-01602859837-ext-1679@work.hours
    Signed-off-by: Linus Torvalds

    Vasily Gorbik
     
  • Now that we have KASAN-KUNIT tests integration, it's easy to see that
    some KASAN tests are not adopted to the SW_TAGS mode and are failing.

    Adjust the allocation size for kasan_memchr() and kasan_memcmp() by
    roung it up to OOB_TAG_OFF so the bad access ends up in a separate
    memory granule.

    Add a new kmalloc_uaf_16() tests that relies on UAF, and a new
    kasan_bitops_tags() test that is tailored to tag-based mode, as it's
    hard to adopt the existing kmalloc_oob_16() and kasan_bitops_generic()
    (renamed from kasan_bitops()) without losing the precision.

    Add new kmalloc_uaf_16() and kasan_bitops_uaf() tests that rely on UAFs,
    as it's hard to adopt the existing kmalloc_oob_16() and
    kasan_bitops_oob() (rename from kasan_bitops()) without losing the
    precision.

    Disable kasan_global_oob() and kasan_alloca_oob_left/right() as SW_TAGS
    mode doesn't instrument globals nor dynamic allocas.

    Signed-off-by: Andrey Konovalov
    Signed-off-by: Andrew Morton
    Tested-by: David Gow
    Link: https://lkml.kernel.org/r/76eee17b6531ca8b3ca92b240cb2fd23204aaff7.1603129942.git.andreyknvl@google.com
    Signed-off-by: Linus Torvalds

    Andrey Konovalov
     

02 Nov, 2020

1 commit

  • Pull driver core and documentation fixes from Greg KH:
    "Here is one tiny debugfs change to fix up an API where the last user
    was successfully fixed up in 5.10-rc1 (so it couldn't be merged
    earlier), and a much larger Documentation/ABI/ update to the files so
    they can be automatically parsed by our tools.

    The Documentation/ABI/ updates are just formatting issues, small ones
    to bring the files into parsable format, and have been acked by
    numerous subsystem maintainers and the documentation maintainer. I
    figured it was good to get this into 5.10-rc2 to help wih the merge
    issues that would arise if these were to stick in linux-next until
    5.11-rc1.

    The debugfs change has been in linux-next for a long time, and the
    Documentation updates only for the last linux-next release"

    * tag 'driver-core-5.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (40 commits)
    scripts: get_abi.pl: assume ReST format by default
    docs: ABI: sysfs-class-led-trigger-pattern: remove hw_pattern duplication
    docs: ABI: sysfs-class-backlight: unify ABI documentation
    docs: ABI: sysfs-c2port: remove a duplicated entry
    docs: ABI: sysfs-class-power: unify duplicated properties
    docs: ABI: unify /sys/class/leds//brightness documentation
    docs: ABI: stable: remove a duplicated documentation
    docs: ABI: change read/write attributes
    docs: ABI: cleanup several ABI documents
    docs: ABI: sysfs-bus-nvdimm: use the right format for ABI
    docs: ABI: vdso: use the right format for ABI
    docs: ABI: fix syntax to be parsed using ReST notation
    docs: ABI: convert testing/configfs-acpi to ReST
    docs: Kconfig/Makefile: add a check for broken ABI files
    docs: abi-testing.rst: enable --rst-sources when building docs
    docs: ABI: don't escape ReST-incompatible chars from obsolete and removed
    docs: ABI: create a 2-depth index for ABI
    docs: ABI: make it parse ABI/stable as ReST-compatible files
    docs: ABI: sysfs-uevent: make it compatible with ReST output
    docs: ABI: testing: make the files compatible with ReST output
    ...

    Linus Torvalds
     

30 Oct, 2020

1 commit

  • The files under Documentation/ABI should follow the syntax
    as defined at Documentation/ABI/README.

    Allow checking if they're following the syntax by running
    the ABI parser script on COMPILE_TEST.

    With that, when there's a problem with a file under
    Documentation/ABI, it would produce a warning like:

    Warning: file ./Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats#14:
    What '/sys/bus/pci/devices//aer_stats/aer_rootport_total_err_cor' doesn't have a description
    Warning: file ./Documentation/ABI/testing/sysfs-bus-pci-devices-aer_stats#21:
    What '/sys/bus/pci/devices//aer_stats/aer_rootport_total_err_fatal' doesn't have a description

    Acked-by: Jonathan Corbet
    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/57a38de85cb4b548857207cf1fc1bf1ee08613c9.1604042072.git.mchehab+huawei@kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Mauro Carvalho Chehab
     

29 Oct, 2020

1 commit


26 Oct, 2020

1 commit

  • Pull random32 updates from Willy Tarreau:
    "Make prandom_u32() less predictable.

    This is the cleanup of the latest series of prandom_u32
    experimentations consisting in using SipHash instead of Tausworthe to
    produce the randoms used by the network stack.

    The changes to the files were kept minimal, and the controversial
    commit that used to take noise from the fast_pool (f227e3ec3b5c) was
    reverted. Instead, a dedicated "net_rand_noise" per_cpu variable is
    fed from various sources of activities (networking, scheduling) to
    perturb the SipHash state using fast, non-trivially predictable data,
    instead of keeping it fully deterministic. The goal is essentially to
    make any occasional memory leakage or brute-force attempt useless.

    The resulting code was verified to be very slightly faster on x86_64
    than what is was with the controversial commit above, though this
    remains barely above measurement noise. It was also tested on i386 and
    arm, and build- tested only on arm64"

    Link: https://lore.kernel.org/netdev/20200808152628.GA27941@SDF.ORG/

    * tag '20201024-v4-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/prandom:
    random32: add a selftest for the prandom32 code
    random32: add noise from network and scheduling activity
    random32: make prandom_u32() output unpredictable

    Linus Torvalds
     

25 Oct, 2020

4 commits

  • Pull block fixes from Jens Axboe:

    - NVMe pull request from Christoph
    - rdma error handling fixes (Chao Leng)
    - fc error handling and reconnect fixes (James Smart)
    - fix the qid displace when tracing ioctl command (Keith Busch)
    - don't use BLK_MQ_REQ_NOWAIT for passthru (Chaitanya Kulkarni)
    - fix MTDT for passthru (Logan Gunthorpe)
    - blacklist Write Same on more devices (Kai-Heng Feng)
    - fix an uninitialized work struct (zhenwei pi)"

    - lightnvm out-of-bounds fix (Colin)

    - SG allocation leak fix (Doug)

    - rnbd fixes (Gioh, Guoqing, Jack)

    - zone error translation fixes (Keith)

    - kerneldoc markup fix (Mauro)

    - zram lockdep fix (Peter)

    - Kill unused io_context members (Yufen)

    - NUMA memory allocation cleanup (Xianting)

    - NBD config wakeup fix (Xiubo)

    * tag 'block-5.10-2020-10-24' of git://git.kernel.dk/linux-block: (27 commits)
    block: blk-mq: fix a kernel-doc markup
    nvme-fc: shorten reconnect delay if possible for FC
    nvme-fc: wait for queues to freeze before calling update_hr_hw_queues
    nvme-fc: fix error loop in create_hw_io_queues
    nvme-fc: fix io timeout to abort I/O
    null_blk: use zone status for max active/open
    nvmet: don't use BLK_MQ_REQ_NOWAIT for passthru
    nvmet: cleanup nvmet_passthru_map_sg()
    nvmet: limit passthru MTDS by BIO_MAX_PAGES
    nvmet: fix uninitialized work for zero kato
    nvme-pci: disable Write Zeroes on Sandisk Skyhawk
    nvme: use queuedata for nvme_req_qid
    nvme-rdma: fix crash due to incorrect cqe
    nvme-rdma: fix crash when connect rejected
    block: remove unused members for io_context
    blk-mq: remove the calling of local_memory_node()
    zram: Fix __zram_bvec_{read,write}() locking order
    skd_main: remove unused including
    sgl_alloc_order: fix memory leak
    lightnvm: fix out-of-bounds write to array devices->info[]
    ...

    Linus Torvalds
     
  • Given that this code is new, let's add a selftest for it as well.
    It doesn't rely on fixed sets, instead it picks 1024 numbers and
    verifies that they're not more correlated than desired.

    Link: https://lore.kernel.org/netdev/20200808152628.GA27941@SDF.ORG/
    Cc: George Spelvin
    Cc: Amit Klein
    Cc: Eric Dumazet
    Cc: "Jason A. Donenfeld"
    Cc: Andy Lutomirski
    Cc: Kees Cook
    Cc: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: Linus Torvalds
    Cc: tytso@mit.edu
    Cc: Florian Westphal
    Cc: Marc Plumb
    Signed-off-by: Willy Tarreau

    Willy Tarreau
     
  • With the removal of the interrupt perturbations in previous random32
    change (random32: make prandom_u32() output unpredictable), the PRNG
    has become 100% deterministic again. While SipHash is expected to be
    way more robust against brute force than the previous Tausworthe LFSR,
    there's still the risk that whoever has even one temporary access to
    the PRNG's internal state is able to predict all subsequent draws till
    the next reseed (roughly every minute). This may happen through a side
    channel attack or any data leak.

    This patch restores the spirit of commit f227e3ec3b5c ("random32: update
    the net random state on interrupt and activity") in that it will perturb
    the internal PRNG's statee using externally collected noise, except that
    it will not pick that noise from the random pool's bits nor upon
    interrupt, but will rather combine a few elements along the Tx path
    that are collectively hard to predict, such as dev, skb and txq
    pointers, packet length and jiffies values. These ones are combined
    using a single round of SipHash into a single long variable that is
    mixed with the net_rand_state upon each invocation.

    The operation was inlined because it produces very small and efficient
    code, typically 3 xor, 2 add and 2 rol. The performance was measured
    to be the same (even very slightly better) than before the switch to
    SipHash; on a 6-core 12-thread Core i7-8700k equipped with a 40G NIC
    (i40e), the connection rate dropped from 556k/s to 555k/s while the
    SYN cookie rate grew from 5.38 Mpps to 5.45 Mpps.

    Link: https://lore.kernel.org/netdev/20200808152628.GA27941@SDF.ORG/
    Cc: George Spelvin
    Cc: Amit Klein
    Cc: Eric Dumazet
    Cc: "Jason A. Donenfeld"
    Cc: Andy Lutomirski
    Cc: Kees Cook
    Cc: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: Linus Torvalds
    Cc: tytso@mit.edu
    Cc: Florian Westphal
    Cc: Marc Plumb
    Tested-by: Sedat Dilek
    Signed-off-by: Willy Tarreau

    Willy Tarreau
     
  • Non-cryptographic PRNGs may have great statistical properties, but
    are usually trivially predictable to someone who knows the algorithm,
    given a small sample of their output. An LFSR like prandom_u32() is
    particularly simple, even if the sample is widely scattered bits.

    It turns out the network stack uses prandom_u32() for some things like
    random port numbers which it would prefer are *not* trivially predictable.
    Predictability led to a practical DNS spoofing attack. Oops.

    This patch replaces the LFSR with a homebrew cryptographic PRNG based
    on the SipHash round function, which is in turn seeded with 128 bits
    of strong random key. (The authors of SipHash have *not* been consulted
    about this abuse of their algorithm.) Speed is prioritized over security;
    attacks are rare, while performance is always wanted.

    Replacing all callers of prandom_u32() is the quick fix.
    Whether to reinstate a weaker PRNG for uses which can tolerate it
    is an open question.

    Commit f227e3ec3b5c ("random32: update the net random state on interrupt
    and activity") was an earlier attempt at a solution. This patch replaces
    it.

    Reported-by: Amit Klein
    Cc: Willy Tarreau
    Cc: Eric Dumazet
    Cc: "Jason A. Donenfeld"
    Cc: Andy Lutomirski
    Cc: Kees Cook
    Cc: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: Linus Torvalds
    Cc: tytso@mit.edu
    Cc: Florian Westphal
    Cc: Marc Plumb
    Fixes: f227e3ec3b5c ("random32: update the net random state on interrupt and activity")
    Signed-off-by: George Spelvin
    Link: https://lore.kernel.org/netdev/20200808152628.GA27941@SDF.ORG/
    [ willy: partial reversal of f227e3ec3b5c; moved SIPROUND definitions
    to prandom.h for later use; merged George's prandom_seed() proposal;
    inlined siprand_u32(); replaced the net_rand_state[] array with 4
    members to fix a build issue; cosmetic cleanups to make checkpatch
    happy; fixed RANDOM32_SELFTEST build ]
    Signed-off-by: Willy Tarreau

    George Spelvin
     

24 Oct, 2020

1 commit

  • Pull more drm fixes from Dave Airlie:
    "This should be the last round of things for rc1, a bunch of i915
    fixes, some amdgpu, more font OOB fixes and one ttm fix just found
    reading code:

    fbcon/fonts:
    - Two patches to prevent OOB access

    ttm:
    - fix for evicition value range check

    amdgpu:
    - Sienna Cichlid fixes
    - MST manager resource leak fix
    - GPU reset fix

    amdkfd:
    - Luxmark fix for Navi1x

    i915:
    - Tweak initial DPCD backlight.enabled value (Sean)
    - Initialize reserved MOCS indices (Ayaz)
    - Mark initial fb obj as WT on eLLC machines to avoid rcu lockup (Ville)
    - Support parsing of oversize batches (Chris)
    - Delay execlists processing for TGL (Chris)
    - Use the active reference on the vma during error capture (Chris)
    - Widen CSB pointer (Chris)
    - Wait for CSB entries on TGL (Chris)
    - Fix unwind for scratch page allocation (Chris)
    - Exclude low patches of stolen memory (Chris)
    - Force VT'd workarounds when running as a guest OS (Chris)
    - Drop runtime-pm assert from vpgu io accessors (Chris)"

    * tag 'drm-next-2020-10-23' of git://anongit.freedesktop.org/drm/drm: (31 commits)
    drm/amdgpu: correct the cu and rb info for sienna cichlid
    drm/amd/pm: remove the average clock value in sysfs
    drm/amd/pm: fix pp_dpm_fclk
    Revert drm/amdgpu: disable sienna chichlid UMC RAS
    drm/amd/pm: fix pcie information for sienna cichlid
    drm/amdkfd: Use same SQ prefetch setting as amdgpu
    drm/amd/swsmu: correct wrong feature bit mapping
    drm/amd/psp: Fix sysfs: cannot create duplicate filename
    drm/amd/display: Avoid MST manager resource leak.
    drm/amd/display: Revert "drm/amd/display: Fix a list corruption"
    drm/amdgpu: update golden setting for sienna_cichlid
    drm/amd/swsmu: add missing feature map for sienna_cichlid
    drm/amdgpu: correct the gpu reset handling for job != NULL case
    drm/amdgpu: add rlc iram and dram firmware support
    drm/amdgpu: add function to program pbb mode for sienna cichlid
    drm/i915: Drop runtime-pm assert from vgpu io accessors
    drm/i915: Force VT'd workarounds when running as a guest OS
    drm/i915: Exclude low pages (128KiB) of stolen from use
    drm/i915/gt: Onion unwind for scratch page allocation failure
    drm/ttm: fix eviction valuable range check.
    ...

    Linus Torvalds
     

23 Oct, 2020

2 commits

  • Pull Kbuild updates from Masahiro Yamada:

    - Support 'make compile_commands.json' to generate the compilation
    database more easily, avoiding stale entries

    - Support 'make clang-analyzer' and 'make clang-tidy' for static checks
    using clang-tidy

    - Preprocess scripts/modules.lds.S to allow CONFIG options in the
    module linker script

    - Drop cc-option tests from compiler flags supported by our minimal
    GCC/Clang versions

    - Use always 12-digits commit hash for CONFIG_LOCALVERSION_AUTO=y

    - Use sha1 build id for both BFD linker and LLD

    - Improve deb-pkg for reproducible builds and rootless builds

    - Remove stale, useless scripts/namespace.pl

    - Turn -Wreturn-type warning into error

    - Fix build error of deb-pkg when CONFIG_MODULES=n

    - Replace 'hostname' command with more portable 'uname -n'

    - Various Makefile cleanups

    * tag 'kbuild-v5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (34 commits)
    kbuild: Use uname for LINUX_COMPILE_HOST detection
    kbuild: Only add -fno-var-tracking-assignments for old GCC versions
    kbuild: remove leftover comment for filechk utility
    treewide: remove DISABLE_LTO
    kbuild: deb-pkg: clean up package name variables
    kbuild: deb-pkg: do not build linux-headers package if CONFIG_MODULES=n
    kbuild: enforce -Werror=return-type
    scripts: remove namespace.pl
    builddeb: Add support for all required debian/rules targets
    builddeb: Enable rootless builds
    builddeb: Pass -n to gzip for reproducible packages
    kbuild: split the build log of kallsyms
    kbuild: explicitly specify the build id style
    scripts/setlocalversion: make git describe output more reliable
    kbuild: remove cc-option test of -Werror=date-time
    kbuild: remove cc-option test of -fno-stack-check
    kbuild: remove cc-option test of -fno-strict-overflow
    kbuild: move CFLAGS_{KASAN,UBSAN,KCSAN} exports to relevant Makefiles
    kbuild: remove redundant CONFIG_KASAN check from scripts/Makefile.kasan
    kbuild: do not create built-in objects for external module builds
    ...

    Linus Torvalds
     
  • Pull initial set_fs() removal from Al Viro:
    "Christoph's set_fs base series + fixups"

    * 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
    fs: Allow a NULL pos pointer to __kernel_read
    fs: Allow a NULL pos pointer to __kernel_write
    powerpc: remove address space overrides using set_fs()
    powerpc: use non-set_fs based maccess routines
    x86: remove address space overrides using set_fs()
    x86: make TASK_SIZE_MAX usable from assembly code
    x86: move PAGE_OFFSET, TASK_SIZE & friends to page_{32,64}_types.h
    lkdtm: remove set_fs-based tests
    test_bitmap: remove user bitmap tests
    uaccess: add infrastructure for kernel builds with set_fs()
    fs: don't allow splice read/write without explicit ops
    fs: don't allow kernel reads and writes without iter ops
    sysctl: Convert to iter interfaces
    proc: add a read_iter method to proc proc_ops
    proc: cleanup the compat vs no compat file ops
    proc: remove a level of indentation in proc_get_inode

    Linus Torvalds
     

21 Oct, 2020

1 commit

  • Pull XArray updates from Matthew Wilcox:

    - Fix the test suite after introduction of the local_lock

    - Fix a bug in the IDA spotted by Coverity

    - Change the API that allows the workingset code to delete a node

    - Fix xas_reload() when dealing with entries that occupy multiple
    indices

    - Add a few more tests to the test suite

    - Fix an unsigned int being shifted into an unsigned long

    * tag 'xarray-5.9' of git://git.infradead.org/users/willy/xarray:
    XArray: Fix xas_create_range for ranges above 4 billion
    radix-tree: fix the comment of radix_tree_next_slot()
    XArray: Fix xas_reload for multi-index entries
    XArray: Add private interface for workingset node deletion
    XArray: Fix xas_for_each_conflict documentation
    XArray: Test marked multiorder iterations
    XArray: Test two more things about xa_cmpxchg
    ida: Free allocated bitmap in error path
    radix tree test suite: Fix compilation

    Linus Torvalds
     

19 Oct, 2020

3 commits

  • Recently, in commit 6735b4632def ("Fonts: Support FONT_EXTRA_WORDS macros
    for built-in fonts"), we wrapped each of our built-in data buffers in a
    `font_data` structure, in order to use the following macros on them, see
    include/linux/font.h:

    #define REFCOUNT(fd) (((int *)(fd))[-1])
    #define FNTSIZE(fd) (((int *)(fd))[-2])
    #define FNTCHARCNT(fd) (((int *)(fd))[-3])
    #define FNTSUM(fd) (((int *)(fd))[-4])

    #define FONT_EXTRA_WORDS 4

    Do the same thing to our new 6x8 font. For built-in fonts, currently we
    only use FNTSIZE(). Since this is only a temporary solution for an
    out-of-bounds issue in the framebuffer layer (see commit 5af08640795b
    ("fbcon: Fix global-out-of-bounds read in fbcon_get_font()")), all the
    three other fields are intentionally set to zero in order to discourage
    using these negative-indexing macros.

    Signed-off-by: Peilin Ye
    Signed-off-by: Daniel Vetter
    Link: https://patchwork.freedesktop.org/patch/msgid/926453876c92caac34cba8545716a491754d04d5.1603037079.git.yepeilin.cs@gmail.com

    Peilin Ye
     
  • …/kernel/git/shuah/linux-kselftest

    Pull more Kunit updates from Shuah Khan:

    - add Kunit to kernel_init() and remove KUnit from init calls entirely.

    This addresses the concern that Kunit would not work correctly during
    late init phase.

    - add a linker section where KUnit can put references to its test
    suites.

    This is the first step in transitioning to dispatching all KUnit
    tests from a centralized executor rather than having each as its own
    separate late_initcall.

    - add a centralized executor to dispatch tests rather than relying on
    late_initcall to schedule each test suite separately. Centralized
    execution is for built-in tests only; modules will execute tests when
    loaded.

    - convert bitfield test to use KUnit framework

    - Documentation updates for naming guidelines and how
    kunit_test_suite() works.

    - add test plan to KUnit TAP format

    * tag 'linux-kselftest-kunit-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
    lib: kunit: Fix compilation test when using TEST_BIT_FIELD_COMPILE
    lib: kunit: add bitfield test conversion to KUnit
    Documentation: kunit: add a brief blurb about kunit_test_suite
    kunit: test: add test plan to KUnit TAP format
    init: main: add KUnit to kernel init
    kunit: test: create a single centralized executor for all tests
    vmlinux.lds.h: add linker section for KUnit test suites
    Documentation: kunit: Add naming guidelines

    Linus Torvalds
     
  • Pull RCU changes from Ingo Molnar:

    - Debugging for smp_call_function()

    - RT raw/non-raw lock ordering fixes

    - Strict grace periods for KASAN

    - New smp_call_function() torture test

    - Torture-test updates

    - Documentation updates

    - Miscellaneous fixes

    [ This doesn't actually pull the tag - I've dropped the last merge from
    the RCU branch due to questions about the series. - Linus ]

    * tag 'core-rcu-2020-10-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (77 commits)
    smp: Make symbol 'csd_bug_count' static
    kernel/smp: Provide CSD lock timeout diagnostics
    smp: Add source and destination CPUs to __call_single_data
    rcu: Shrink each possible cpu krcp
    rcu/segcblist: Prevent useless GP start if no CBs to accelerate
    torture: Add gdb support
    rcutorture: Allow pointer leaks to test diagnostic code
    rcutorture: Hoist OOM registry up one level
    refperf: Avoid null pointer dereference when buf fails to allocate
    rcutorture: Properly synchronize with OOM notifier
    rcutorture: Properly set rcu_fwds for OOM handling
    torture: Add kvm.sh --help and update help message
    rcutorture: Add CONFIG_PROVE_RCU_LIST to TREE05
    torture: Update initrd documentation
    rcutorture: Replace HTTP links with HTTPS ones
    locktorture: Make function torture_percpu_rwsem_init() static
    torture: document --allcpus argument added to the kvm.sh script
    rcutorture: Output number of elapsed grace periods
    rcutorture: Remove KCSAN stubs
    rcu: Remove unused "cpu" parameter from rcu_report_qs_rdp()
    ...

    Linus Torvalds
     

18 Oct, 2020

1 commit

  • Pull rdma updates from Jason Gunthorpe:
    "A usual cycle for RDMA with a typical mix of driver and core subsystem
    updates:

    - Driver minor changes and bug fixes for mlx5, efa, rxe, vmw_pvrdma,
    hns, usnic, qib, qedr, cxgb4, hns, bnxt_re

    - Various rtrs fixes and updates

    - Bug fix for mlx4 CM emulation for virtualization scenarios where
    MRA wasn't working right

    - Use tracepoints instead of pr_debug in the CM code

    - Scrub the locking in ucma and cma to close more syzkaller bugs

    - Use tasklet_setup in the subsystem

    - Revert the idea that 'destroy' operations are not allowed to fail
    at the driver level. This proved unworkable from a HW perspective.

    - Revise how the umem API works so drivers make fewer mistakes using
    it

    - XRC support for qedr

    - Convert uverbs objects RWQ and MW to new the allocation scheme

    - Large queue entry sizes for hns

    - Use hmm_range_fault() for mlx5 On Demand Paging

    - uverbs APIs to inspect the GID table instead of sysfs

    - Move some of the RDMA code for building large page SGLs into
    lib/scatterlist"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (191 commits)
    RDMA/ucma: Fix use after free in destroy id flow
    RDMA/rxe: Handle skb_clone() failure in rxe_recv.c
    RDMA/rxe: Move the definitions for rxe_av.network_type to uAPI
    RDMA: Explicitly pass in the dma_device to ib_register_device
    lib/scatterlist: Do not limit max_segment to PAGE_ALIGNED values
    IB/mlx4: Convert rej_tmout radix-tree to XArray
    RDMA/rxe: Fix bug rejecting all multicast packets
    RDMA/rxe: Fix skb lifetime in rxe_rcv_mcast_pkt()
    RDMA/rxe: Remove duplicate entries in struct rxe_mr
    IB/hfi,rdmavt,qib,opa_vnic: Update MAINTAINERS
    IB/rdmavt: Fix sizeof mismatch
    MAINTAINERS: CISCO VIC LOW LATENCY NIC DRIVER
    RDMA/bnxt_re: Fix sizeof mismatch for allocation of pbl_tbl.
    RDMA/bnxt_re: Use rdma_umem_for_each_dma_block()
    RDMA/umem: Move to allocate SG table from pages
    lib/scatterlist: Add support in dynamic allocation of SG table from pages
    tools/testing/scatterlist: Show errors in human readable form
    tools/testing/scatterlist: Rejuvenate bit-rotten test
    RDMA/ipoib: Set rtnl_link_ops for ipoib interfaces
    RDMA/uverbs: Expose the new GID query API to user space
    ...

    Linus Torvalds
     

17 Oct, 2020

9 commits

  • Pull kgdb updates from Daniel Thompson:
    "A fairly modest set of changes for this cycle.

    Of particular note are an earlycon fix from Doug Anderson and my own
    changes to get kgdb/kdb to honour the kprobe blocklist. The later
    creates a safety rail that strongly encourages developers not to place
    breakpoints in, for example, arch specific trap handling code.

    Also included are a couple of small fixes and tweaks: an API update,
    eliminate a coverity dead code warning, improved handling of search
    during multi-line printk and a couple of typo corrections"

    * tag 'kgdb-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux:
    kdb: Fix pager search for multi-line strings
    kernel: debug: Centralize dbg_[de]activate_sw_breakpoints
    kgdb: Add NOKPROBE labels on the trap handler functions
    kgdb: Honour the kprobe blocklist when setting breakpoints
    kernel/debug: Fix spelling mistake in debug_core.c
    kdb: Use newer api for tasklist scanning
    kgdb: Make "kgdbcon" work properly with "kgdb_earlycon"
    kdb: remove unnecessary null check of dbg_io_ops

    Linus Torvalds
     
  • Pull MIPS updates from Thomas Bogendoerfer:

    - removed support for PNX833x alias NXT_STB22x

    - included Ingenic SoC support into generic MIPS kernels

    - added support for new Ingenic SoCs

    - converted workaround selection to use Kconfig

    - replaced old boot mem functions by memblock_*

    - enabled COP2 usage in kernel for Loongson64 to make use
    of 16byte load/stores possible

    - cleanups and fixes

    * tag 'mips_5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (92 commits)
    MIPS: DEC: Restore bootmem reservation for firmware working memory area
    MIPS: dec: fix section mismatch
    bcm963xx_tag.h: fix duplicated word
    mips: ralink: enable zboot support
    MIPS: ingenic: Remove CPU_SUPPORTS_HUGEPAGES
    MIPS: cpu-probe: remove MIPS_CPU_BP_GHIST option bit
    MIPS: cpu-probe: introduce exclusive R3k CPU probe
    MIPS: cpu-probe: move fpu probing/handling into its own file
    MIPS: replace add_memory_region with memblock
    MIPS: Loongson64: Clean up numa.c
    MIPS: Loongson64: Select SMP in Kconfig to avoid build error
    mips: octeon: Add Ubiquiti E200 and E220 boards
    MIPS: SGI-IP28: disable use of ll/sc in kernel
    MIPS: tx49xx: move tx4939_add_memory_regions into only user
    MIPS: pgtable: Remove used PAGE_USERIO define
    MIPS: alchemy: Share prom_init implementation
    MIPS: alchemy: Fix build breakage, if TOUCHSCREEN_WM97XX is disabled
    MIPS: process: include exec.h header in process.c
    MIPS: process: Add prototype for function arch_dup_task_struct
    MIPS: idle: Add prototype for function check_wait
    ...

    Linus Torvalds
     
  • A build condition was missing around a compilation test, this compilation
    test comes from the original test_bitfield code.

    And removed unnecessary code for this test.

    Fixes: d2585f5164c2 ("lib: kunit: add bitfield test conversion to KUnit")
    Reported-by: Stephen Rothwell
    Signed-off-by: Vitor Massaru Iha
    Link: https://lore.kernel.org/linux-next/20201015163056.56fcc835@canb.auug.org.au/
    Reviewed-by: Brendan Higgins
    Signed-off-by: Shuah Khan

    Vitor Massaru Iha
     
  • Merge more updates from Andrew Morton:
    "155 patches.

    Subsystems affected by this patch series: mm (dax, debug, thp,
    readahead, page-poison, util, memory-hotplug, zram, cleanups), misc,
    core-kernel, get_maintainer, MAINTAINERS, lib, bitops, checkpatch,
    binfmt, ramfs, autofs, nilfs, rapidio, panic, relay, kgdb, ubsan,
    romfs, and fault-injection"

    * emailed patches from Andrew Morton : (155 commits)
    lib, uaccess: add failure injection to usercopy functions
    lib, include/linux: add usercopy failure capability
    ROMFS: support inode blocks calculation
    ubsan: introduce CONFIG_UBSAN_LOCAL_BOUNDS for Clang
    sched.h: drop in_ubsan field when UBSAN is in trap mode
    scripts/gdb/tasks: add headers and improve spacing format
    scripts/gdb/proc: add struct mount & struct super_block addr in lx-mounts command
    kernel/relay.c: drop unneeded initialization
    panic: dump registers on panic_on_warn
    rapidio: fix the missed put_device() for rio_mport_add_riodev
    rapidio: fix error handling path
    nilfs2: fix some kernel-doc warnings for nilfs2
    autofs: harden ioctl table
    ramfs: fix nommu mmap with gaps in the page cache
    mm: remove the now-unnecessary mmget_still_valid() hack
    mm/gup: take mmap_lock in get_dump_page()
    binfmt_elf, binfmt_elf_fdpic: use a VMA list snapshot
    coredump: rework elf/elf_fdpic vma_dump_size() into common helper
    coredump: refactor page range dumping into common helper
    coredump: let dump_emit() bail out on short writes
    ...

    Linus Torvalds
     
  • To test fault-tolerance of user memory access functions, introduce fault
    injection to usercopy functions.

    If a failure is expected return either -EFAULT or the total amount of
    bytes that were not copied.

    Signed-off-by: Albert van der Linde
    Signed-off-by: Andrew Morton
    Reviewed-by: Akinobu Mita
    Reviewed-by: Alexander Potapenko
    Cc: Al Viro
    Cc: Andrey Konovalov
    Cc: Arnd Bergmann
    Cc: Borislav Petkov
    Cc: Dmitry Vyukov
    Cc: "H. Peter Anvin"
    Cc: Ingo Molnar
    Cc: Jonathan Corbet
    Cc: Marco Elver
    Cc: Peter Zijlstra (Intel)
    Cc: Thomas Gleixner
    Cc: Christoph Hellwig
    Link: http://lkml.kernel.org/r/20200831171733.955393-3-alinde@google.com
    Signed-off-by: Linus Torvalds

    Albert van der Linde
     
  • Patch series "add fault injection to user memory access", v3.

    The goal of this series is to improve testing of fault-tolerance in usages
    of user memory access functions, by adding support for fault injection.

    syzkaller/syzbot are using the existing fault injection modes and will use
    this particular feature also.

    The first patch adds failure injection capability for usercopy functions.
    The second changes usercopy functions to use this new failure capability
    (copy_from_user, ...). The third patch adds get/put/clear_user failures
    to x86.

    This patch (of 3):

    Add a failure injection capability to improve testing of fault-tolerance
    in usages of user memory access functions.

    Add CONFIG_FAULT_INJECTION_USERCOPY to enable faults in usercopy
    functions. The should_fail_usercopy function is to be called by these
    functions (copy_from_user, get_user, ...) in order to fail or not.

    Signed-off-by: Albert van der Linde
    Signed-off-by: Andrew Morton
    Reviewed-by: Akinobu Mita
    Reviewed-by: Alexander Potapenko
    Cc: Borislav Petkov
    Cc: Ingo Molnar
    Cc: Jonathan Corbet
    Cc: Thomas Gleixner
    Cc: Arnd Bergmann
    Cc: Peter Zijlstra (Intel)
    Cc: "H. Peter Anvin"
    Cc: Al Viro
    Cc: Andrey Konovalov
    Cc: Dmitry Vyukov
    Cc: Marco Elver
    Cc: Christoph Hellwig
    Link: http://lkml.kernel.org/r/20200831171733.955393-1-alinde@google.com
    Link: http://lkml.kernel.org/r/20200831171733.955393-2-alinde@google.com
    Signed-off-by: Linus Torvalds

    Albert van der Linde
     
  • When the kernel is compiled with Clang, -fsanitize=bounds expands to
    -fsanitize=array-bounds and -fsanitize=local-bounds.

    Enabling -fsanitize=local-bounds with Clang has the unfortunate
    side-effect of inserting traps; this goes back to its original intent,
    which was as a hardening and not a debugging feature [1]. The same
    feature made its way into -fsanitize=bounds, but the traps remained. For
    that reason, -fsanitize=bounds was split into 'array-bounds' and
    'local-bounds' [2].

    Since 'local-bounds' doesn't behave like a normal sanitizer, enable it
    with Clang only if trapping behaviour was requested by
    CONFIG_UBSAN_TRAP=y.

    Add the UBSAN_BOUNDS_LOCAL config to Kconfig.ubsan to enable the
    'local-bounds' option by default when UBSAN_TRAP is enabled.

    [1] http://lists.llvm.org/pipermail/llvm-dev/2012-May/049972.html
    [2] http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20131021/091536.html

    Suggested-by: Marco Elver
    Signed-off-by: George Popescu
    Signed-off-by: Andrew Morton
    Reviewed-by: David Brazdil
    Reviewed-by: Marco Elver
    Cc: Masahiro Yamada
    Cc: Michal Marek
    Cc: Nathan Chancellor
    Cc: Nick Desaulniers
    Cc: Kees Cook
    Cc: Dmitry Vyukov
    Cc: Arnd Bergmann
    Cc: Peter Zijlstra
    Link: https://lkml.kernel.org/r/20200922074330.2549523-1-georgepope@google.com
    Signed-off-by: Linus Torvalds

    George Popescu
     
  • Whether crc32_be needs a lookup table is chosen based on CRC_LE_BITS.
    Obviously, the _be function should be governed by the _BE_ define.

    This probably never pops up as it's hard to come up with a configuration
    where CRC_BE_BITS isn't the same as CRC_LE_BITS and as nobody is using
    bitwise CRC anyway.

    Fixes: 46c5801eaf86 ("crc32: bolt on crc32c")
    Signed-off-by: Tobias Jordan
    Signed-off-by: Andrew Morton
    Cc: Krzysztof Kozlowski
    Cc: Jonathan Corbet
    Cc: Mauro Carvalho Chehab
    Link: https://lkml.kernel.org/r/20200923182122.GA3338@agrajag.zerfleddert.de
    Signed-off-by: Linus Torvalds

    Tobias Jordan
     
  • This is supposed to return false on failure, not a negative error code.

    Fixes: 170e38548b81 ("mm/hmm/test: use after free in dmirror_allocate_chunk()")
    Signed-off-by: Dan Carpenter
    Signed-off-by: Andrew Morton
    Reviewed-by: Ralph Campbell
    Cc: Jerome Glisse
    Cc: Stephen Rothwell
    Cc: Jason Gunthorpe
    Cc: Dan Williams
    Link: https://lkml.kernel.org/r/20201010200812.GA1886610@mwanda
    Signed-off-by: Linus Torvalds

    Dan Carpenter