1. Apr 02, 2022
  2. Apr 01, 2022
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · e8b767f5
      Linus Torvalds authored
      Pull UML updates from Richard Weinberger:
      
       - Devicetree support (for testing)
      
       - Various cleanups and fixes: UBD, port_user, uml_mconsole
      
       - Maintainer update
      
      * tag 'for-linus-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: run_helper: Write error message to kernel log on exec failure on host
        um: port_user: Improve error handling when port-helper is not found
        um: port_user: Allow setting path to port-helper using UML_PORT_HELPER envvar
        um: port_user: Search for in.telnetd in PATH
        um: clang: Strip out -mno-global-merge from USER_CFLAGS
        docs: UML: Mention telnetd for port channel
        um: Remove unused timeval_to_ns() function
        um: Fix uml_mconsole stop/go
        um: Cleanup syscall_handler_t definition/cast, fix warning
        uml: net: vector: fix const issue
        um: Fix WRITE_ZEROES in the UBD Driver
        um: Migrate vector drivers to NAPI
        um: Fix order of dtb unflatten/early init
        um: fix and optimize xor select template for CONFIG64 and timetravel mode
        um: Document dtb command line option
        lib/logic_iomem: correct fallback config references
        um: Remove duplicated include in syscalls_64.c
        MAINTAINERS: Update UserModeLinux entry
      e8b767f5
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs · a87a08e3
      Linus Torvalds authored
      Pull JFFS2, UBI and UBIFS updates from Richard Weinberger:
       "JFFS2:
         - Fixes for various memory issues
      
        UBI:
         - Fix for a race condition in cdev ioctl handler
      
        UBIFS:
         - Fixes for O_TMPFILE and whiteout handling
      
         - Fixes for various memory issues"
      
      * tag 'for-linus-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
        ubifs: rename_whiteout: correct old_dir size computing
        jffs2: fix memory leak in jffs2_scan_medium
        jffs2: fix memory leak in jffs2_do_mount_fs
        jffs2: fix use-after-free in jffs2_clear_xattr_subsystem
        fs/jffs2: fix comments mentioning i_mutex
        ubi: fastmap: Return error code if memory allocation fails in add_aeb()
        ubifs: Fix to add refcount once page is set private
        ubifs: Fix read out-of-bounds in ubifs_wbuf_write_nolock()
        ubifs: setflags: Make dirtied_ino_d 8 bytes aligned
        ubifs: Rectify space amount budget for mkdir/tmpfile operations
        ubifs: Fix 'ui->dirty' race between do_tmpfile() and writeback work
        ubifs: Rename whiteout atomically
        ubifs: Add missing iput if do_tmpfile() failed in rename whiteout
        ubifs: Fix wrong number of inodes locked by ui_mutex in ubifs_inode comment
        ubifs: Fix deadlock in concurrent rename whiteout and inode writeback
        ubifs: rename_whiteout: Fix double free for whiteout_ui->data
        ubi: Fix race condition between ctrl_cdev_ioctl and ubi_cdev_ioctl
      a87a08e3
    • Linus Torvalds's avatar
      Merge tag 'gfs2-v5.17-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 · 3d198e42
      Linus Torvalds authored
      Pull gfs2 fixes from Andreas Gruenbacher:
      
       - To avoid deadlocks, actively cancel dlm locking requests when we give
         up on them.
      
         Further dlm operations on the same lock will return -EBUSY until the
         cancel has been completed, so in that case, wait and repeat. (This is
         rare.)
      
       - Lock inversion fixes in gfs2_inode_lookup() and gfs2_create_inode().
      
       - Some more fallout from the gfs2 mmap + page fault deadlock fixes
         (merged in commit c03098d4: "Merge tag 'gfs2-v5.15-rc5-mmap-fault'").
      
       - Various other minor bug fixes and cleanups.
      
      * tag 'gfs2-v5.17-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
        gfs2: Make sure FITRIM minlen is rounded up to fs block size
        gfs2: Make sure not to return short direct writes
        gfs2: Remove dead code in gfs2_file_read_iter
        gfs2: Fix gfs2_file_buffered_write endless loop workaround
        gfs2: Minor retry logic cleanup
        gfs2: Disable page faults during lockless buffered reads
        gfs2: Fix should_fault_in_pages() logic
        gfs2: Remove return value for gfs2_indirect_init
        gfs2: Initialize gh_error in gfs2_glock_nq
        gfs2: Make use of list_is_first
        gfs2: Switch lock order of inode and iopen glock
        gfs2: cancel timed-out glock requests
        gfs2: Expect -EBUSY after canceling dlm locking requests
        gfs2: gfs2_setattr_size error path fix
        gfs2: assign rgrp glock before compute_bitstructs
      3d198e42
    • Linus Torvalds's avatar
      Merge tag 'netfs-prep-20220318' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs · f008b1d6
      Linus Torvalds authored
      Pull netfs updates from David Howells:
       "Netfs prep for write helpers.
      
        Having had a go at implementing write helpers and content encryption
        support in netfslib, it seems that the netfs_read_{,sub}request
        structs and the equivalent write request structs were almost the same
        and so should be merged, thereby requiring only one set of
        alloc/get/put functions and a common set of tracepoints.
      
        Merging the structs also has the advantage that if a bounce buffer is
        added to the request struct, a read operation can be performed to fill
        the bounce buffer, the contents of the buffer can be modified and then
        a write operation can be performed on it to send the data wherever it
        needs to go using the same request structure all the way through. The
        I/O handlers would then transparently perform any required crypto.
        This should make it easier to perform RMW cycles if needed.
      
        The potentially common ...
      f008b1d6
    • Linus Torvalds's avatar
      Merge tag 'random-5.18-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random · 478f74a3
      Linus Torvalds authored
      Pull random number generator fixes from Jason Donenfeld:
      
       - If a hardware random number generator passes a sufficiently large
         chunk of entropy to random.c during early boot, we now skip the
         "fast_init" business and let it initialize the RNG.
      
         This makes CONFIG_RANDOM_TRUST_BOOTLOADER=y actually useful.
      
       - We already have the command line `random.trust_cpu=0/1` option for
         RDRAND, which let distros enable CONFIG_RANDOM_TRUST_CPU=y while
         placating concerns of more paranoid users.
      
         Now we add `random.trust_bootloader=0/1` so that distros can
         similarly enable CONFIG_RANDOM_TRUST_BOOTLOADER=y.
      
       - Re-add a comment that got removed by accident in the recent revert.
      
       - Add the spec-compliant ACPI CID for vmgenid, which Microsoft added to
         the vmgenid spec at Ard's request during earlier review.
      
       - Restore build-time randomness via the latent entropy plugin, which
         was lost when we transitioned to using a hash function.
      
      * tag 'random-5.18-rc1-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random:
        random: mix build-time latent entropy into pool at init
        virt: vmgenid: recognize new CID added by Hyper-V
        random: re-add removed comment about get_random_{u32,u64} reseeding
        random: treat bootloader trust toggle the same way as cpu trust toggle
        random: skip fast_init if hwrng provides large chunk of entropy
      478f74a3
    • Linus Torvalds's avatar
      Merge tag 'linux-watchdog-5.18-rc1' of git://www.linux-watchdog.org/linux-watchdog · 354b8bf2
      Linus Torvalds authored
      Pull watchdog updates from Wim Van Sebroeck:
      
       - add support for BCM4908
      
       - renesas_wdt: add R-Car Gen4 support
      
       - improve watchdog_dev function documentation
      
       - sp5100_tco: replace the cd6h/cd7h port I/O with MMIO accesses during
         initialization
      
       - several other small improvements and fixes
      
      * tag 'linux-watchdog-5.18-rc1' of git://www.linux-watchdog.org/linux-watchdog:
        Watchdog: sp5100_tco: Enable Family 17h+ CPUs
        Watchdog: sp5100_tco: Add initialization using EFCH MMIO
        Watchdog: sp5100_tco: Refactor MMIO base address initialization
        Watchdog: sp5100_tco: Move timer initialization into function
        watchdog: ixp4xx: Implement restart
        watchdog: orion_wdt: support pretimeout on Armada-XP
        watchdog: allow building BCM7038_WDT for BCM4908
        watchdog: renesas_wdt: Add R-Car Gen4 support
        dt-bindings: watchdog: renesas-wdt: Document r8a779f0 support
        watchdog: Improve watchdog_dev function documentation
        watchdog: aspeed: add nowayout support
        watchdog: rti-wdt: Add missing pm_runtime_disable() in probe function
        watchdog: imx2_wdg: Alow ping on suspend
      354b8bf2
    • Linus Torvalds's avatar
      Merge tag 'auxdisplay-for-linus-v5.18-rc1' of https://github.com/ojeda/linux · d4f1db77
      Linus Torvalds authored
      Pull auxdisplay updates from Miguel Ojeda:
       "A few auxdisplay lcd2s improvements from Andy Shevchenko"
      
      * tag 'auxdisplay-for-linus-v5.18-rc1' of https://github.com/ojeda/linux:
        auxdisplay: lcd2s: Use array size explicitly in lcd2s_gotoxy()
        auxdisplay: lcd2s: Switch to i2c ->probe_new()
        auxdisplay: lcd2s: use module_i2c_driver to simplify the code
        auxdisplay: lcd2s: make use of device property API
        auxdisplay: lcd2s: Fix multi-line comment style
      d4f1db77
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · f4f5d7cf
      Linus Torvalds authored
      Pull virtio updates from Michael Tsirkin:
      
       - vdpa generic device type support
      
       - more virtio hardening for broken devices (but on the same theme,
         revert some virtio hotplug hardening patches - they were misusing
         some interrupt flags and had to be reverted)
      
       - RSS support in virtio-net
      
       - max device MTU support in mlx5 vdpa
      
       - akcipher support in virtio-crypto
      
       - shared IRQ support in ifcvf vdpa
      
       - a minor performance improvement in vhost
      
       - enable virtio mem for ARM64
      
       - beginnings of advance dma support
      
       - cleanups, fixes all over the place
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (33 commits)
        vdpa/mlx5: Avoid processing works if workqueue was destroyed
        vhost: handle error while adding split ranges to iotlb
        vdpa: support exposing the count of vqs to userspace
        vdpa: change the type of nvqs to u32
        vdpa: support exposing the config size to userspace
        vdpa/mlx5: re-create forwarding rules after mac modified
        virtio: pci: check bar values read from virtio config space
        Revert "virtio_pci: harden MSI-X interrupts"
        Revert "virtio-pci: harden INTX interrupts"
        drivers/net/virtio_net: Added RSS hash report control.
        drivers/net/virtio_net: Added RSS hash report.
        drivers/net/virtio_net: Added basic RSS support.
        drivers/net/virtio_net: Fixed padded vheader to use v1 with hash.
        virtio: use virtio_device_ready() in virtio_device_restore()
        tools/virtio: compile with -pthread
        tools/virtio: fix after premapped buf support
        virtio_ring: remove flags check for unmap packed indirect desc
        virtio_ring: remove flags check for unmap split indirect desc
        virtio_ring: rename vring_unmap_state_packed() to vring_unmap_extra_packed()
        net/mlx5: Add support for configuring max device MTU
        ...
      f4f5d7cf
    • Jason A. Donenfeld's avatar
      random: mix build-time latent entropy into pool at init · 1754abb3
      Jason A. Donenfeld authored
      Prior, the "input_pool_data" array needed no real initialization, and so
      it was easy to mark it with __latent_entropy to populate it during
      compile-time. In switching to using a hash function, this required us to
      specifically initialize it to some specific state, which means we
      dropped the __latent_entropy attribute. An unfortunate side effect was
      this meant the pool was no longer seeded using compile-time random data.
      In order to bring this back, we declare an array in rand_initialize()
      with __latent_entropy and call mix_pool_bytes() on that at init, which
      accomplishes the same thing as before. We make this __initconst, so that
      it doesn't take up space at runtime after init.
      
      Fixes: 6e8ec255
      
       ("random: use computational hash for entropy extraction")
      Reviewed-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
      Reviewed-by: default avatarTheodore Ts'o <tytso@mit.edu>
      Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      1754abb3
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.18-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · e729dbe8
      Linus Torvalds authored
      Pull more ACPI updates from Rafael Wysocki:
       "These are fixes and cleanup on top of the previously merged ACPI
        material.
      
        Specifics:
      
         - Avoid out-of-bounds access when parsing _CPC data (Rafael Wysocki)
      
         - Change default error code and clean up debug messages in ACPI CPPC
           probe (Rafael Wysocki)
      
         - Replace usage of found with dedicated list iterator variable in the
           ACPI IPMI driver (Jakob Koschel)
      
         - Clean up variable name confusion in APEI (Jakob Koschel)
      
         - Make LAPIC_ADDR_OVR address readable in a message parsed during
           MADT parsing (Vasant Hegde)"
      
      * tag 'acpi-5.18-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: CPPC: Change default error code and clean up debug messages in probe
        ACPI: CPPC: Avoid out of bounds access when parsing _CPC data
        ACPI: tables: Make LAPIC_ADDR_OVR address readable in message
        ACPI: IPMI: replace usage of found with...
      e729dbe8
    • Linus Torvalds's avatar
      Merge tag 'docs-5.18-2' of git://git.lwn.net/linux · b4a5ea09
      Linus Torvalds authored
      Pull more documentation updates from Jonathan Corbet:
       "Some late-arriving documentation improvements.
      
        This is mostly build-system fixes from Mauro and Akira; I also took
        the liberty of dropping in my 'messy diffstat' document"
      
      * tag 'docs-5.18-2' of git://git.lwn.net/linux:
        docs: Add a document on how to fix a messy diffstat
        docs: sphinx/requirements: Limit jinja2<3.1
        Documentation: kunit: Fix cross-referencing warnings
        scripts/kernel-doc: change the line number meta info
        scripts/get_abi: change the file/line number meta info
        docs: kernel_include.py: add sphinx build dependencies
        docs: kernel_abi.py: add sphinx build dependencies
        docs: kernel_feat.py: add build dependencies
        scripts/get_feat.pl: allow output the parsed file names
        docs: kfigure.py: Don't warn of missing PDF converter in 'make htmldocs'
        Documentation: Fix duplicate statement about raw_spinlock_t type
      b4a5ea09
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v5.18-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · b8321ed4
      Linus Torvalds authored
      Pull Kbuild updates from Masahiro Yamada:
      
       - Add new environment variables, USERCFLAGS and USERLDFLAGS to allow
         additional flags to be passed to user-space programs.
      
       - Fix missing fflush() bugs in Kconfig and fixdep
      
       - Fix a minor bug in the comment format of the .config file
      
       - Make kallsyms ignore llvm's local labels, .L*
      
       - Fix UAPI compile-test for cross-compiling with Clang
      
       - Extend the LLVM= syntax to support LLVM=<suffix> form for using a
         particular version of LLVm, and LLVM=<prefix> form for using custom
         LLVM in a particular directory path.
      
       - Clean up Makefiles
      
      * tag 'kbuild-v5.18-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        kbuild: Make $(LLVM) more flexible
        kbuild: add --target to correctly cross-compile UAPI headers with Clang
        fixdep: use fflush() and ferror() to ensure successful write to files
        arch: syscalls: simplify uapi/kapi directo...
      b8321ed4
    • Linus Torvalds's avatar
      Merge tag 'hardening-v5.18-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux · f87cbd05
      Linus Torvalds authored
      Pull hardening updates from Kees Cook:
       "This addresses an -Warray-bounds warning found under a few ARM
        defconfigs, and disables long-broken HARDENED_USERCOPY_PAGESPAN"
      
      * tag 'hardening-v5.18-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        ARM/dma-mapping: Remove CMA code when not built with CMA
        usercopy: Disable CONFIG_HARDENED_USERCOPY_PAGESPAN
      f87cbd05
    • Andrew Price's avatar
      gfs2: Make sure FITRIM minlen is rounded up to fs block size · 27ca8273
      Andrew Price authored
      Per fstrim(8) we must round up the minlen argument to the fs block size.
      The current calculation doesn't take into account devices that have a
      discard granularity and requested minlen less than 1 fs block, so the
      value can get shifted away to zero in the translation to fs blocks.
      
      The zero minlen passed to gfs2_rgrp_send_discards() then allows
      sb_issue_discard() to be called with nr_sects == 0 which returns -EINVAL
      and results in gfs2_rgrp_send_discards() returning -EIO.
      
      Make sure minlen is never < 1 fs block by taking the max of the
      requested minlen and the fs block size before comparing to the device's
      discard granularity and shifting to fs blocks.
      
      Fixes: 076f0faa
      
       ("GFS2: Fix FITRIM argument handling")
      Signed-off-by: default avatarAndrew Price <anprice@redhat.com>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      27ca8273
    • Linus Torvalds's avatar
      Merge tag 'net-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 2975dbdc
      Linus Torvalds authored
      Pull more networking updates from Jakub Kicinski:
       "Networking fixes and rethook patches.
      
        Features:
      
         - kprobes: rethook: x86: replace kretprobe trampoline with rethook
      
        Current release - regressions:
      
         - sfc: avoid null-deref on systems without NUMA awareness in the new
           queue sizing code
      
        Current release - new code bugs:
      
         - vxlan: do not feed vxlan_vnifilter_dump_dev with non-vxlan devices
      
         - eth: lan966x: fix null-deref on PHY pointer in timestamp ioctl when
           interface is down
      
        Previous releases - always broken:
      
         - openvswitch: correct neighbor discovery target mask field in the
           flow dump
      
         - wireguard: ignore v6 endpoints when ipv6 is disabled and fix a leak
      
         - rxrpc: fix call timer start racing with call destruction
      
         - rxrpc: fix null-deref when security type is rxrpc_no_security
      
         - can: fix UAF bugs around echo skbs in multiple drivers
      
        Misc:
      
         - docs: move netdev-FA...
      2975dbdc
    • Kees Cook's avatar
      ARM/dma-mapping: Remove CMA code when not built with CMA · 229a08a4
      Kees Cook authored
      The MAX_CMA_AREAS could be set to 0, which would result in code that would
      attempt to operate beyond the end of a zero-sized array. If CONFIG_CMA
      is disabled, just remove this code entirely. Found when building arm
      on GCC 10.x for several defconfigs (e.g. axm55xx_defconfig) under
      -Warray-bounds:
      
      arch/arm/mm/dma-mapping.c:396:22: warning: array subscript <unknown> is outside array bounds of 'struct dma_contig_early_reserve[0]' [-Warray-bounds]
        396 |         dma_mmu_remap[dma_mmu_remap_num].size = size;
            |         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
      arch/arm/mm/dma-mapping.c:389:40: note: while referencing 'dma_mmu_remap'
        389 | static struct dma_contig_early_reserve dma_mmu_remap[MAX_CMA_AREAS] __initdata;
            |                                        ^~~~~~~~~~~~~
      
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Logan Gunthorpe <logang@deltatee.com>
      Cc: Martin Oliveira <martin.oliveira@eideticom.com>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Zi Yan <ziy@nvidia.com>
      Cc: Hari Bathini <hbathini@linux.ibm.com>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Mike Kravetz <mike.kravetz@oracle.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https://lore.kernel.org/all/6243ee60.1c69fb81.16de6.7dbf@mx.google.com/
      
      
      Signed-off-by: default avatarKees Cook <keescook@chromium.org>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Link: https://lore.kernel.org/lkml/20220310070041.GA24874@lst.de
      
      
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Link: https://lore.kernel.org/lkml/9059fa71-330f-f04f-b155-2850abb72a71@redhat.com
      229a08a4
    • Linus Torvalds's avatar
      Merge tag 'v5.18-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 93235e3d
      Linus Torvalds authored
      Pull crypto fixes from Herbert Xu:
      
       - Missing Kconfig dependency on arm that leads to boot failure
      
       - x86 SLS fixes
      
       - Reference leak in the stm32 driver
      
      * tag 'v5.18-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: x86/sm3 - Fixup SLS
        crypto: x86/poly1305 - Fixup SLS
        crypto: x86/chacha20 - Avoid spurious jumps to other functions
        crypto: stm32 - fix reference leak in stm32_crc_remove
        crypto: arm/aes-neonbs-cbc - Select generic cbc and aes
      93235e3d
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-ipmi', 'acpi-tables' and 'acpi-apei' · 4a13e559
      Rafael J. Wysocki authored
      Merge IMPI driver changes, ACPI tables parsing code changes and
      additional APEI changes for v5.18-rc1:
      
       - Replace usage of found with dedicated list iterator variable
         in the ACPI IPMI driver (Jakob Koschel).
      
       - Make LAPIC_ADDR_OVR address readable in a message parsed during
         MADT parsing (Vasant Hegde).
      
       - Clean up variable name confusion in APEI (Jakob Koschel).
      
      * acpi-ipmi:
        ACPI: IPMI: replace usage of found with dedicated list iterator variable
      
      * acpi-tables:
        ACPI: tables: Make LAPIC_ADDR_OVR address readable in message
      
      * acpi-apei:
        ACPI, APEI: Use the correct variable for sizeof()
      4a13e559
  3. Mar 31, 2022