1. 27 Jul, 2022 5 commits
  2. 26 Jul, 2022 2 commits
  3. 24 Jul, 2022 6 commits
  4. 23 Jul, 2022 2 commits
  5. 22 Jul, 2022 17 commits
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v5.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 301c8949
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A few more small driver specific fixes"
      
      * tag 'spi-fix-v5.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: spi-rspi: Fix PIO fallback on RZ platforms
        spi: spi-cadence: Fix SPI NO Slave Select macro definition
        spi: bcm2835: bcm2835_spi_handle_err(): fix NULL pointer deref for non DMA transfers
      301c8949
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · 70664fc1
      Linus Torvalds authored
      Pull RISC-V fixes from Palmer Dabbelt:
      
       - Two kexec-related build fixes
      
       - A DTS update to make the GPIO nodes match the upcoming dtschema
      
       - A fix that passes -mno-relax directly to the assembler when building
         modules, to work around compilers that fail to do so
      
      * tag 'riscv-for-linus-5.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: add as-options for modules with assembly compontents
        riscv: dts: align gpio-key node names with dtschema
        RISC-V: kexec: Fix build error without CONFIG_KEXEC
        RISCV: kexec: Fix build error without CONFIG_MODULES
      70664fc1
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · ae21fbac
      Linus Torvalds authored
      Pull ACPI fix from Rafael Wysocki:
       "Fix yet another piece of ACPI CPPC changes fallout on AMD platforms
        (Mario Limonciello)"
      
      * tag 'acpi-5.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: CPPC: Don't require flexible address space if X86_FEATURE_CPPC is supported
      ae21fbac
    • Linus Torvalds's avatar
      Merge tag 'io_uring-5.19-2022-07-21' of git://git.kernel.dk/linux-block · a5235996
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
       "Fix for a bad kfree() introduced in this cycle, and a quick fix for
        disabling buffer recycling for IORING_OP_READV.
      
        The latter will get reworked for 5.20, but it gets the job done for
        5.19"
      
      * tag 'io_uring-5.19-2022-07-21' of git://git.kernel.dk/linux-block:
        io_uring: do not recycle buffer in READV
        io_uring: fix free of unallocated buffer list
      a5235996
    • Linus Torvalds's avatar
      Merge tag 'block-5.19-2022-07-21' of git://git.kernel.dk/linux-block · d945404f
      Linus Torvalds authored
      Pull block fix from Jens Axboe:
       "Just a single fix for missing error propagation for an allocation
        failure in raid5"
      
      * tag 'block-5.19-2022-07-21' of git://git.kernel.dk/linux-block:
        md/raid5: missing error code in setup_conf()
      d945404f
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-5.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 4a1dcf77
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "Two driver bugfixes and a typo fix"
      
      * tag 'i2c-for-5.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: cadence: Change large transfer count reset logic to be unconditional
        i2c: imx: fix typo in comment
        i2c: mlxcpld: Fix register setting for 400KHz frequency
      4a1dcf77
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v5.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 6f8e4e10
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
      
       - fix several regmap usage issues in gpio-pca953x
      
       - fix out-of-tree build for GPIO selftests
      
       - fix integer overflow in gpio-xilinx
      
      * tag 'gpio-fixes-for-v5.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpio: gpio-xilinx: Fix integer overflow
        selftests: gpio: fix include path to kernel headers for out of tree builds
        gpio: pca953x: use the correct register address when regcache sync during init
        gpio: pca953x: use the correct range when do regmap sync
        gpio: pca953x: only use single read/write for No AI mode
      6f8e4e10
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · 61471911
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
       "Only driver fixes:
      
         - NULL check for the ralink and sunplus drivers
      
         - Add Jacky Bai as maintainer for the Freescale pin controllers
      
         - Fix pin config ops for the Ocelot LAN966x and SparX5
      
         - Disallow AMD pin control to be a module: the GPIO lines need to be
           active in early boot, so no can do
      
         - Fix the Armada 37xx to use raw spinlocks in the interrupt handler
           path to avoid wait context"
      
      * tag 'pinctrl-v5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: armada-37xx: use raw spinlocks for regmap to avoid invalid wait context
        pinctrl: armada-37xx: make irq_lock a raw spinlock to avoid invalid wait context
        pinctrl: Don't allow PINCTRL_AMD to be a module
        pinctrl: ocelot: Fix pincfg
        pinctrl: ocelot: Fix pincfg for lan966x
        MAINTAINERS: Update freescale pin controllers maintainer
        pinctrl: sunplus: Add check for kcalloc
        pinctrl: ralink: Check for null return of devm_kcalloc
      61471911
    • Linus Torvalds's avatar
      Merge tag 'sound-5.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 8f636c6a
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Only undoes the Rockchip BCLK changes to address a regression"
      
      * tag 'sound-5.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ASoC: rockchip-i2s: Undo BCLK pinctrl changes
        ASoC: rockchip: i2s: Fix NULL pointer dereference when pinctrl is not found
      8f636c6a
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 85029503
      Linus Torvalds authored
      Pull MMC fix from Ulf Hansson:
      
       - sdhci-omap: Fix a lockdep warning while probing
      
      * tag 'mmc-v5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: sdhci-omap: Fix a lockdep warning for PM runtime init
      85029503
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2022-07-22' of git://anongit.freedesktop.org/drm/drm · 8e65afba
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Fixes for this week.
      
        The main one is the i915 firmware fix for the phoronix reported issue.
        I've written some firmware guidelines as a result, should land in
        -next soon. Otherwise a few amdgpu fixes, a scheduler fix, ttm fix and
        two other minor ones.
      
        scheduler:
         - scheduling while atomic fix
      
        ttm:
         - locking fix
      
        edp:
         - variable typo fix
      
        i915:
         - add back support for v69 firmware on ADL-P
      
        amdgpu:
         - Drop redundant buffer cleanup that can lead to a segfault
         - Add a bo_list mutex to avoid possible list corruption in CS
         - dmub notification fix
      
        imx:
         - fix error path"
      
      * tag 'drm-fixes-2022-07-22' of git://anongit.freedesktop.org/drm/drm:
        drm/amdgpu: Protect the amdgpu_bo_list list with a mutex v2
        drm/imx/dcss: Add missing of_node_put() in fail path
        drm/i915/guc: support v69 in parallel to v70
        drm/i915/guc: Support programming the EU priority in the GuC descriptor
        drm/panel-edp: Fix variable typo when saving hpd absent delay from DT
        drm/amdgpu: Remove one duplicated ef removal
        drm/ttm: fix locking in vmap/vunmap TTM GEM helpers
        drm/scheduler: Don't kill jobs in interrupt context
        drm/amd/display: Fix new dmub notification enabling in DM
      8e65afba
    • Linus Torvalds's avatar
      Merge tag 'rcu-urgent.2022.07.21a' of... · 4ba1329c
      Linus Torvalds authored
      Merge tag 'rcu-urgent.2022.07.21a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu
      
      Pull RCU fix from Paul McKenney:
       "This contains a pair of commits that fix 282d8998 ("srcu: Prevent
        expedited GPs and blocking readers from consuming CPU"), which was
        itself a fix to an SRCU expedited grace-period problem that could
        prevent kernel live patching (KLP) from completing.
      
        That SRCU fix for KLP introduced large (as in minutes) boot-time
        delays to embedded Linux kernels running on qemu/KVM. These delays
        were due to the emulation of certain MMIO operations controlling
        memory layout, which were emulated with one expedited grace period per
        access. Common configurations required thousands of boot-time MMIO
        accesses, and thus thousands of boot-time expedited SRCU grace
        periods.
      
        In these configurations, the occasional sleeps that allowed KLP to
        proceed caused excessive boot delays. These commits preserve enough
        sleeps to permit KLP to proceed, but few enough that the virtual
        embedded kernels still boot reasonably quickly.
      
        This represents a regression introduced in the v5.19 merge window, and
        the bug is causing significant inconvenience"
      
      * tag 'rcu-urgent.2022.07.21a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu:
        srcu: Make expedited RCU grace periods block even less frequently
        srcu: Block less aggressively for expedited grace periods
      4ba1329c
    • Linus Torvalds's avatar
      mmu_gather: fix the CONFIG_MMU_GATHER_NO_RANGE case · 7fb5e508
      Linus Torvalds authored
      Sudip reports that alpha doesn't build properly, with errors like
      
        include/asm-generic/tlb.h:401:1: error: redefinition of 'tlb_update_vma_flags'
          401 | tlb_update_vma_flags(struct mmu_gather *tlb, struct vm_area_struct *vma)
              | ^~~~~~~~~~~~~~~~~~~~
        include/asm-generic/tlb.h:372:1: note: previous definition of 'tlb_update_vma_flags' with type 'void(struct mmu_gather *, struct vm_area_struct *)'
          372 | tlb_update_vma_flags(struct mmu_gather *tlb, struct vm_area_struct *vma) { }
      
      the cause being that We have this odd situation where some architectures
      were never converted to the newer TLB flushing interfaces that have a
      range for the flush.  Instead people left them alone, and we have them
      select the MMU_GATHER_NO_RANGE config option to make the tlb header
      files account for this.
      
      Peter Zijlstra cleaned some of these nasty header file games up in
      commits
      
        1e9fdf21 ("mmu_gather: Remove per arch tlb_{start,end}_vma()")
        18ba064e ("mmu_gather: Let there be one tlb_{start,end}_vma() implementation")
      
      but tlb_update_vma_flags() was left alone, and then commit b67fbebd
      ("mmu_gather: Force tlb-flush VM_PFNMAP vmas") ended up removing only
      _one_ of the two stale duplicate dummy inline functions.
      
      This removes the other stale one.
      
      Somebody braver than me should try to remove MMU_GATHER_NO_RANGE
      entirely, but it requires fixing up the oddball architectures that use
      it: alpha, m68k, microblaze, nios2 and openrisc.
      
      The fixups should be fairly straightforward ("fix the build errors it
      exposes by adding the appropriate range arguments"), but the reason this
      wasn't done in the first place is that so few people end up working on
      those architectures.  But it could be done one architecture at a time,
      hint, hint.
      Reported-by: default avatarSudip Mukherjee (Codethink) <sudipm.mukherjee@gmail.com>
      Fixes: b67fbebd ("mmu_gather: Force tlb-flush VM_PFNMAP vmas")
      Link: https://lore.kernel.org/all/YtpXh0QHWwaEWVAY@debian/
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Will Deacon <will@kernel.org>
      Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Nick Piggin <npiggin@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7fb5e508
    • Linus Walleij's avatar
      ARM: pxa2xx: Fix GPIO descriptor tables · c5cdb928
      Linus Walleij authored
      Laurence reports:
      
      "Kernel >5.18 on Zaurus has a bug where the power management code can't
      talk to devices, emitting the following errors:
      
      sharpsl-pm sharpsl-pm: Error: AC check failed: voltage -22.
      sharpsl-pm sharpsl-pm: Charging Error!
      sharpsl-pm sharpsl-pm: Warning: Cannot read main battery!
      
      Looking at the recent changes, I found that commit 31455bbd ("spi:
      pxa2xx_spi: Convert to use GPIO descriptors") replaced the deprecated
      SPI chip select platform device code with a gpiod lookup table. However,
      this didn't seem to work until I changed the `dev_id` member from the
      device name to the bus id. I'm not entirely sure why this is necessary,
      but I suspect it is related to the fact that in sysfs SPI devices are
      attached under /sys/devices/.../dev_name/spi_master/spiB/spiB.C, rather
      than directly to the device."
      
      After reviewing the change I conclude that the same fix is needed
      for all affected boards.
      
      Fixes: 31455bbd ("spi: pxa2xx_spi: Convert to use GPIO descriptors")
      Reported-by: default avatarLaurence de Bruxelles <lfdebrux@gmail.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20220722114611.1517414-1-linus.walleij@linaro.org'
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      c5cdb928
    • Lukas Bulwahn's avatar
      asm-generic: remove a broken and needless ifdef conditional · e2a619ca
      Lukas Bulwahn authored
      Commit 527701ed ("lib: Add a generic version of devmem_is_allowed()")
      introduces the config symbol GENERIC_LIB_DEVMEM_IS_ALLOWED, but then
      falsely refers to CONFIG_GENERIC_DEVMEM_IS_ALLOWED (note the missing LIB
      in the reference) in ./include/asm-generic/io.h.
      
      Luckily, ./scripts/checkkconfigsymbols.py warns on non-existing configs:
      
      GENERIC_DEVMEM_IS_ALLOWED
      Referencing files: include/asm-generic/io.h
      
      The actual fix, though, is simply to not to make this function declaration
      dependent on any kernel config. For architectures that intend to use
      the generic version, the arch's 'select GENERIC_LIB_DEVMEM_IS_ALLOWED' will
      lead to picking the function definition, and for other architectures, this
      function is simply defined elsewhere.
      
      The wrong '#ifndef' on a non-existing config symbol also always had the
      same effect (although more by mistake than by intent). So, there is no
      functional change.
      
      Remove this broken and needless ifdef conditional.
      
      Fixes: 527701ed ("lib: Add a generic version of devmem_is_allowed()")
      Signed-off-by: default avatarLukas Bulwahn <lukas.bulwahn@gmail.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      e2a619ca
    • Srinivas Neeli's avatar
      gpio: gpio-xilinx: Fix integer overflow · 32c094a0
      Srinivas Neeli authored
      Current implementation is not able to configure more than 32 pins
      due to incorrect data type. So type casting with unsigned long
      to avoid it.
      
      Fixes: 02b3f84d ("xilinx: Switch to use bitmap APIs")
      Signed-off-by: default avatarSrinivas Neeli <srinivas.neeli@xilinx.com>
      Signed-off-by: default avatarBartosz Golaszewski <brgl@bgdev.pl>
      32c094a0
    • Dave Airlie's avatar
      Merge tag 'drm-misc-fixes-2022-07-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes · 7f5ec14a
      Dave Airlie authored
      A scheduling-while-atomic fix for drm/scheduler, a locking fix for TTM,
      a typo fix for panel-edp and a resource removal fix for imx/dcss
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220721085550.hrwbukj34y56rzva@houat
      7f5ec14a
  6. 21 Jul, 2022 8 commits
    • Ben Dooks's avatar
      riscv: add as-options for modules with assembly compontents · c1f6eff3
      Ben Dooks authored
      When trying to load modules built for RISC-V which include assembly files
      the kernel loader errors with "unexpected relocation type 'R_RISCV_ALIGN'"
      due to R_RISCV_ALIGN relocations being generated by the assembler.
      
      The R_RISCV_ALIGN relocations can be removed at the expense of code space
      by adding -mno-relax to gcc and as.  In commit 7a8e7da4
      ("RISC-V: Fixes to module loading") -mno-relax is added to the build
      variable KBUILD_CFLAGS_MODULE. See [1] for more info.
      
      The issue is that when kbuild builds a .S file, it invokes gcc with
      the -mno-relax flag, but this is not being passed through to the
      assembler. Adding -Wa,-mno-relax to KBUILD_AFLAGS_MODULE ensures that
      the assembler is invoked correctly. This may have now been fixed in
      gcc[2] and this addition should not stop newer gcc and as from working.
      
      [1] https://github.com/riscv/riscv-elf-psabi-doc/issues/183
      [2] https://github.com/gcc-mirror/gcc/commit/3b0a7d624e64eeb81e4d5e8c62c46d86ef521857Signed-off-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
      Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
      Link: https://lore.kernel.org/r/20220529152200.609809-1-ben.dooks@codethink.co.uk
      Fixes: ab1ef68e ("RISC-V: Add sections of PLT and GOT for kernel module")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
      c1f6eff3
    • Linus Torvalds's avatar
      Merge tag 'mtd/fixes-for-5.19-final' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · 68e77ffb
      Linus Torvalds authored
      Pull MTD fix from Richard Weinberger:
       "A aingle NAND controller fix:
      
         - gpmi: Fix busy timeout setting (wrong calculation, yes again)"
      
      * tag 'mtd/fixes-for-5.19-final' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
        mtd: rawnand: gpmi: Set WAIT_FOR_READY timeout based on program/erase times
      68e77ffb
    • Linus Torvalds's avatar
      Merge tag 'net-5.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 7ca433dc
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "Including fixes from can.
      
        Still no major regressions, most of the changes are still due to data
        races fixes, plus the usual bunch of drivers fixes.
      
        Previous releases - regressions:
      
         - tcp/udp: make early_demux back namespacified.
      
         - dsa: fix issues with vlan_filtering_is_global
      
        Previous releases - always broken:
      
         - ip: fix data-races around ipv4_net_table (round 2, 3 & 4)
      
         - amt: fix validation and synchronization bugs
      
         - can: fix detection of mcp251863
      
         - eth: iavf: fix handling of dummy receive descriptors
      
         - eth: lan966x: fix issues with MAC table
      
         - eth: stmmac: dwmac-mediatek: fix clock issue
      
        Misc:
      
         - dsa: update documentation"
      
      * tag 'net-5.19-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (107 commits)
        mlxsw: spectrum_router: Fix IPv4 nexthop gateway indication
        net/sched: cls_api: Fix flow action initialization
        tcp: Fix data-races around sysctl_tcp_max_reordering.
        tcp: Fix a data-race around sysctl_tcp_abort_on_overflow.
        tcp: Fix a data-race around sysctl_tcp_rfc1337.
        tcp: Fix a data-race around sysctl_tcp_stdurg.
        tcp: Fix a data-race around sysctl_tcp_retrans_collapse.
        tcp: Fix data-races around sysctl_tcp_slow_start_after_idle.
        tcp: Fix a data-race around sysctl_tcp_thin_linear_timeouts.
        tcp: Fix data-races around sysctl_tcp_recovery.
        tcp: Fix a data-race around sysctl_tcp_early_retrans.
        tcp: Fix data-races around sysctl knobs related to SYN option.
        udp: Fix a data-race around sysctl_udp_l3mdev_accept.
        ip: Fix data-races around sysctl_ip_prot_sock.
        ipv4: Fix data-races around sysctl_fib_multipath_hash_fields.
        ipv4: Fix data-races around sysctl_fib_multipath_hash_policy.
        ipv4: Fix a data-race around sysctl_fib_multipath_use_neigh.
        can: rcar_canfd: Add missing of_node_put() in rcar_canfd_probe()
        can: mcp251xfd: fix detection of mcp251863
        Documentation: fix udp_wmem_min in ip-sysctl.rst
        ...
      7ca433dc
    • Harald Freudenberger's avatar
      s390/archrandom: prevent CPACF trng invocations in interrupt context · 918e75f7
      Harald Freudenberger authored
      This patch slightly reworks the s390 arch_get_random_seed_{int,long}
      implementation: Make sure the CPACF trng instruction is never
      called in any interrupt context. This is done by adding an
      additional condition in_task().
      
      Justification:
      
      There are some constrains to satisfy for the invocation of the
      arch_get_random_seed_{int,long}() functions:
      - They should provide good random data during kernel initialization.
      - They should not be called in interrupt context as the TRNG
        instruction is relatively heavy weight and may for example
        make some network loads cause to timeout and buck.
      
      However, it was not clear what kind of interrupt context is exactly
      encountered during kernel init or network traffic eventually calling
      arch_get_random_seed_long().
      
      After some days of investigations it is clear that the s390
      start_kernel function is not running in any interrupt context and
      so the trng is called:
      
      Jul 11 18:33:39 t35lp54 kernel:  [<00000001064e90ca>] arch_get_random_seed_long.part.0+0x32/0x70
      Jul 11 18:33:39 t35lp54 kernel:  [<000000010715f246>] random_init+0xf6/0x238
      Jul 11 18:33:39 t35lp54 kernel:  [<000000010712545c>] start_kernel+0x4a4/0x628
      Jul 11 18:33:39 t35lp54 kernel:  [<000000010590402a>] startup_continue+0x2a/0x40
      
      The condition in_task() is true and the CPACF trng provides random data
      during kernel startup.
      
      The network traffic however, is more difficult. A typical call stack
      looks like this:
      
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b5600fc>] extract_entropy.constprop.0+0x23c/0x240
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b560136>] crng_reseed+0x36/0xd8
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b5604b8>] crng_make_state+0x78/0x340
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b5607e0>] _get_random_bytes+0x60/0xf8
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b56108a>] get_random_u32+0xda/0x248
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008aefe7a8>] kfence_guarded_alloc+0x48/0x4b8
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008aeff35e>] __kfence_alloc+0x18e/0x1b8
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008aef7f10>] __kmalloc_node_track_caller+0x368/0x4d8
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b611eac>] kmalloc_reserve+0x44/0xa0
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b611f98>] __alloc_skb+0x90/0x178
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b6120dc>] __napi_alloc_skb+0x5c/0x118
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b8f06b4>] qeth_extract_skb+0x13c/0x680
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b8f6526>] qeth_poll+0x256/0x3f8
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b63d76e>] __napi_poll.constprop.0+0x46/0x2f8
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b63dbec>] net_rx_action+0x1cc/0x408
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b937302>] __do_softirq+0x132/0x6b0
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008abf46ce>] __irq_exit_rcu+0x13e/0x170
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008abf531a>] irq_exit_rcu+0x22/0x50
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b922506>] do_io_irq+0xe6/0x198
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b935826>] io_int_handler+0xd6/0x110
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b9358a6>] psw_idle_exit+0x0/0xa
      Jul 06 17:37:07 t35lp54 kernel: ([<000000008ab9c59a>] arch_cpu_idle+0x52/0xe0)
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b933cfe>] default_idle_call+0x6e/0xd0
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008ac59f4e>] do_idle+0xf6/0x1b0
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008ac5a28e>] cpu_startup_entry+0x36/0x40
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008abb0d90>] smp_start_secondary+0x148/0x158
      Jul 06 17:37:07 t35lp54 kernel:  [<000000008b935b9e>] restart_int_handler+0x6e/0x90
      
      which confirms that the call is in softirq context. So in_task() covers exactly
      the cases where we want to have CPACF trng called: not in nmi, not in hard irq,
      not in soft irq but in normal task context and during kernel init.
      Signed-off-by: default avatarHarald Freudenberger <freude@linux.ibm.com>
      Acked-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
      Reviewed-by: default avatarJuergen Christ <jchrist@linux.ibm.com>
      Link: https://lore.kernel.org/r/20220713131721.257907-1-freude@linux.ibm.com
      Fixes: e4f74400 ("s390/archrandom: simplify back to earlier design and initialize earlier")
      [agordeev@linux.ibm.com changed desc, added Fixes and Link, removed -stable]
      Signed-off-by: default avatarAlexander Gordeev <agordeev@linux.ibm.com>
      918e75f7
    • Peter Zijlstra's avatar
      mmu_gather: Force tlb-flush VM_PFNMAP vmas · b67fbebd
      Peter Zijlstra authored
      Jann reported a race between munmap() and unmap_mapping_range(), where
      unmap_mapping_range() will no-op once unmap_vmas() has unlinked the
      VMA; however munmap() will not yet have invalidated the TLBs.
      
      Therefore unmap_mapping_range() will complete while there are still
      (stale) TLB entries for the specified range.
      
      Mitigate this by force flushing TLBs for VM_PFNMAP ranges.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarWill Deacon <will@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b67fbebd
    • Peter Zijlstra's avatar
      mmu_gather: Let there be one tlb_{start,end}_vma() implementation · 18ba064e
      Peter Zijlstra authored
      Now that architectures are no longer allowed to override
      tlb_{start,end}_vma() re-arrange code so that there is only one
      implementation for each of these functions.
      
      This much simplifies trying to figure out what they actually do.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarWill Deacon <will@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      18ba064e
    • Peter Zijlstra's avatar
      csky/tlb: Remove tlb_flush() define · 1d7708e7
      Peter Zijlstra authored
      The previous patch removed the tlb_flush_end() implementation which
      used tlb_flush_range(). This means:
      
       - csky did double invalidates, a range invalidate per vma and a full
         invalidate at the end
      
       - csky actually has range invalidates and as such the generic
         tlb_flush implementation is more efficient for it.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarWill Deacon <will@kernel.org>
      Tested-by: default avatarGuo Ren <guoren@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1d7708e7
    • Peter Zijlstra's avatar
      mmu_gather: Remove per arch tlb_{start,end}_vma() · 1e9fdf21
      Peter Zijlstra authored
      Scattered across the archs are 3 basic forms of tlb_{start,end}_vma().
      Provide two new MMU_GATHER_knobs to enumerate them and remove the per
      arch tlb_{start,end}_vma() implementations.
      
       - MMU_GATHER_NO_FLUSH_CACHE indicates the arch has flush_cache_range()
         but does *NOT* want to call it for each VMA.
      
       - MMU_GATHER_MERGE_VMAS indicates the arch wants to merge the
         invalidate across multiple VMAs if possible.
      
      With these it is possible to capture the three forms:
      
        1) empty stubs;
           select MMU_GATHER_NO_FLUSH_CACHE and MMU_GATHER_MERGE_VMAS
      
        2) start: flush_cache_range(), end: empty;
           select MMU_GATHER_MERGE_VMAS
      
        3) start: flush_cache_range(), end: flush_tlb_range();
           default
      
      Obviously, if the architecture does not have flush_cache_range() then
      it also doesn't need to select MMU_GATHER_NO_FLUSH_CACHE.
      Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: default avatarWill Deacon <will@kernel.org>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1e9fdf21