1. 05 Jun, 2022 18 commits
    • Linus Torvalds's avatar
      bluetooth: don't use bitmaps for random flag accesses · e1cff700
      Linus Torvalds authored
      The bluetooth code uses our bitmap infrastructure for the two bits (!)
      of connection setup flags, and in the process causes odd problems when
      it converts between a bitmap and just the regular values of said bits.
      
      It's completely pointless to do things like bitmap_to_arr32() to convert
      a bitmap into a u32.  It shoudln't have been a bitmap in the first
      place.  The reason to use bitmaps is if you have arbitrary number of
      bits you want to manage (not two!), or if you rely on the atomicity
      guarantees of the bitmap setting and clearing.
      
      The code could use an "atomic_t" and use "atomic_or/andnot()" to set and
      clear the bit values, but considering that it then copies the bitmaps
      around with "bitmap_to_arr32()" and friends, there clearly cannot be a
      lot of atomicity requirements.
      
      So just use a regular integer.
      
      In the process, this avoids the warnings about erroneous use of
      bitmap_from_u64() which were triggered on 32-bit architectures when
      conversion from a u64 would access two words (and, surprise, surprise,
      only one word is needed - and indeed overkill - for a 2-bit bitmap).
      
      That was always problematic, but the compiler seems to notice it and
      warn about the invalid pattern only after commit 0a97953f ("lib: add
      bitmap_{from,to}_arr64") changed the exact implementation details of
      'bitmap_from_u64()', as reported by Sudip Mukherjee and Stephen Rothwell.
      
      Fixes: fe92ee64 ("Bluetooth: hci_core: Rework hci_conn_params flags")
      Link: https://lore.kernel.org/all/YpyJ9qTNHJzz0FHY@debian/
      Link: https://lore.kernel.org/all/20220606080631.0c3014f2@canb.auug.org.au/
      Link: https://lore.kernel.org/all/20220605162537.1604762-1-yury.norov@gmail.com/Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Reported-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
      Reviewed-by: default avatarYury Norov <yury.norov@gmail.com>
      Cc: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
      Cc: Marcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e1cff700
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d717180e
      Linus Torvalds authored
      Pull x86 SGX fix from Thomas Gleixner:
       "A single fix for x86/SGX to prevent that memory which is allocated for
        an SGX enclave is accounted to the wrong memory control group"
      
      * tag 'x86-urgent-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/sgx: Set active memcg prior to shmem allocation
      d717180e
    • Linus Torvalds's avatar
      Merge tag 'x86-mm-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0b7da15c
      Linus Torvalds authored
      Pull x86 mm cleanup from Thomas Gleixner:
       "Use PAGE_ALIGNED() instead of open coding it in the x86/mm code"
      
      * tag 'x86-mm-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm: Use PAGE_ALIGNED(x) instead of IS_ALIGNED(x, PAGE_SIZE)
      0b7da15c
    • Linus Torvalds's avatar
      Merge tag 'x86-microcode-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 9784edd7
      Linus Torvalds authored
      Pull x86 microcode updates from Thomas Gleixner:
      
       - Disable late microcode loading by default. Unless the HW people get
         their act together and provide a required minimum version in the
         microcode header for making a halfways informed decision its just
         lottery and broken.
      
       - Warn and taint the kernel when microcode is loaded late
      
       - Remove the old unused microcode loader interface
      
       - Remove a redundant perf callback from the microcode loader
      
      * tag 'x86-microcode-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/microcode: Remove unnecessary perf callback
        x86/microcode: Taint and warn on late loading
        x86/microcode: Default-disable late loading
        x86/microcode: Rip out the OLD_INTERFACE
      9784edd7
    • Linus Torvalds's avatar
      Merge tag 'x86-cleanups-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a9251280
      Linus Torvalds authored
      Pull x86 cleanups from Thomas Gleixner:
       "A set of small x86 cleanups:
      
         - Remove unused headers in the IDT code
      
         - Kconfig indendation and comment fixes
      
         - Fix all 'the the' typos in one go instead of waiting for bots to
           fix one at a time"
      
      * tag 'x86-cleanups-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86: Fix all occurences of the "the the" typo
        x86/idt: Remove unused headers
        x86/Kconfig: Fix indentation of arch/x86/Kconfig.debug
        x86/Kconfig: Fix indentation and add endif comments to arch/x86/Kconfig
      a9251280
    • Linus Torvalds's avatar
      Merge tag 'x86-boot-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1fd9f4ce
      Linus Torvalds authored
      Pull x86 boot update from Thomas Gleixner:
       "Use strlcpy() instead of strscpy() in arch_setup()"
      
      * tag 'x86-boot-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/setup: Use strscpy() to replace deprecated strlcpy()
      1fd9f4ce
    • Linus Torvalds's avatar
      Merge tag 'timers-core-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · c049ecc5
      Linus Torvalds authored
      Pull clockevent/clocksource updates from Thomas Gleixner:
      
       - Device tree bindings for MT8186
      
       - Tell the kernel that the RISC-V SBI timer stops in deeper power
         states
      
       - Make device tree parsing in sp804 more robust
      
       - Dead code removal and tiny fixes here and there
      
       - Add the missing SPDX identifiers
      
      * tag 'timers-core-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value
        clocksource/drivers/timer-ti-dm: Remove unnecessary NULL check
        clocksource/drivers/timer-sun5i: Convert to SPDX identifier
        clocksource/drivers/timer-sun4i: Convert to SPDX identifier
        clocksource/drivers/pistachio: Convert to SPDX identifier
        clocksource/drivers/orion: Convert to SPDX identifier
        clocksource/drivers/lpc32xx: Convert to SPDX identifier
        clocksource/drivers/digicolor: Convert to SPDX identifier
        clocksource/drivers/armada-370-xp: Convert to SPDX identifier
        clocksource/drivers/mips-gic-timer: Convert to SPDX identifier
        clocksource/drivers/jcore: Convert to SPDX identifier
        clocksource/drivers/bcm_kona: Convert to SPDX identifier
        clocksource/drivers/sp804: Avoid error on multiple instances
        clocksource/drivers/riscv: Events are stopped during CPU suspend
        clocksource/drivers/ixp4xx: Drop boardfile probe path
        dt-bindings: timer: Add compatible for Mediatek MT8186
      c049ecc5
    • Linus Torvalds's avatar
      Merge tag 'sched-urgent-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · bc1e02c3
      Linus Torvalds authored
      Pull scheduler fix from Thomas Gleixner:
       "Fix the fallout of sysctl code move which placed the init function
        wrong"
      
      * tag 'sched-urgent-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        sched/autogroup: Fix sysctl move
      bc1e02c3
    • Linus Torvalds's avatar
      Merge tag 'perf-urgent-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · fa11c280
      Linus Torvalds authored
      Pull perf fixes from Thomas Gleixner:
      
        - Make the ICL event constraints match reality
      
        - Remove a unused local variable
      
      * tag 'perf-urgent-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/core: Remove unused local variable
        perf/x86/intel: Fix event constraints for ICL
      fa11c280
    • Linus Torvalds's avatar
      Merge tag 'perf-core-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 5cc47d4a
      Linus Torvalds authored
      Pull perf fixlet from Thomas Gleixner:
       "Trivial indentation fix in Kconfig"
      
      * tag 'perf-core-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf/x86/Kconfig: Fix indentation in the Kconfig file
      5cc47d4a
    • Linus Torvalds's avatar
      Merge tag 'objtool-urgent-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 44688ffd
      Linus Torvalds authored
      Pull objtool fixes from Thomas Gleixner:
      
       - Handle __ubsan_handle_builtin_unreachable() correctly and treat it as
         noreturn
      
       - Allow architectures to select uaccess validation
      
       - Use the non-instrumented bit test for test_cpu_has() to prevent
         escape from non-instrumentable regions
      
       - Use arch_ prefixed atomics for JUMP_LABEL=n builds to prevent escape
         from non-instrumentable regions
      
       - Mark a few tiny inline as __always_inline to prevent GCC from
         bringing them out of line and instrumenting them
      
       - Mark the empty stub context_tracking_enabled() as always inline as
         GCC brings them out of line and instruments the empty shell
      
       - Annotate ex_handler_msr_mce() as dead end
      
      * tag 'objtool-urgent-2022-06-05' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/extable: Annotate ex_handler_msr_mce() as a dead end
        context_tracking: Always inline empty stubs
        x86: Always inline on_thread_stack() and current_top_of_stack()
        jump_label,noinstr: Avoid instrumentation for JUMP_LABEL=n builds
        x86/cpu: Elide KCSAN for cpu_has() and friends
        objtool: Mark __ubsan_handle_builtin_unreachable() as noreturn
        objtool: Add CONFIG_HAVE_UACCESS_VALIDATION
      44688ffd
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · b2c9a83d
      Linus Torvalds authored
      Pull more SCSI updates from James Bottomley:
       "Mostly small bug fixes plus other trivial updates.
      
        The major change of note is moving ufs out of scsi and a minor update
        to lpfc vmid handling"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (24 commits)
        scsi: qla2xxx: Remove unused 'ql_dm_tgt_ex_pct' parameter
        scsi: qla2xxx: Remove setting of 'req' and 'rsp' parameters
        scsi: mpi3mr: Fix kernel-doc
        scsi: lpfc: Add support for ATTO Fibre Channel devices
        scsi: core: Return BLK_STS_TRANSPORT for ALUA transitioning
        scsi: sd_zbc: Prevent zone information memory leak
        scsi: sd: Fix potential NULL pointer dereference
        scsi: mpi3mr: Rework mrioc->bsg_device model to fix warnings
        scsi: myrb: Fix up null pointer access on myrb_cleanup()
        scsi: core: Unexport scsi_bus_type
        scsi: sd: Don't call blk_cleanup_disk() in sd_probe()
        scsi: ufs: ufshcd: Delete unnecessary NULL check
        scsi: isci: Fix typo in comment
        scsi: pmcraid: Fix typo in comment
        scsi: smartpqi: Fix typo in comment
        scsi: qedf: Fix typo in comment
        scsi: esas2r: Fix typo in comment
        scsi: storvsc: Fix typo in comment
        scsi: ufs: Split the drivers/scsi/ufs directory
        scsi: qla1280: Remove redundant variable
        ...
      b2c9a83d
    • Linus Torvalds's avatar
      Merge tag 'hte/for-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux · 29814363
      Linus Torvalds authored
      Pull hardware timestamping subsystem from Thierry Reding:
       "This contains the new HTE (hardware timestamping engine) subsystem
        that has been in the works for a couple of months now.
      
        The infrastructure provided allows for drivers to register as hardware
        timestamp providers, while consumers will be able to request events
        that they are interested in (such as GPIOs and IRQs) to be timestamped
        by the hardware providers.
      
        Note that this currently supports only one provider, but there seems
        to be enough interest in this functionality and we expect to see more
        drivers added once this is merged"
      
      [ Linus Walleij mentions the Intel PMC in the Elkhart and Tiger Lake
        platforms as another future timestamp provider ]
      
      * tag 'hte/for-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
        dt-bindings: timestamp: Correct id path
        dt-bindings: Renamed hte directory to timestamp
        hte: Uninitialized variable in hte_ts_get()
        hte: Fix off by one in hte_push_ts_ns()
        hte: Fix possible use-after-free in tegra_hte_test_remove()
        hte: Remove unused including <linux/version.h>
        MAINTAINERS: Add HTE Subsystem
        hte: Add Tegra HTE test driver
        tools: gpio: Add new hardware clock type
        gpiolib: cdev: Add hardware timestamp clock type
        gpio: tegra186: Add HTE support
        gpiolib: Add HTE support
        dt-bindings: Add HTE bindings
        hte: Add Tegra194 HTE kernel provider
        drivers: Add hardware timestamp engine (HTE) subsystem
        Documentation: Add HTE subsystem guide
      29814363
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · 71e80720
      Linus Torvalds authored
      Pull more Kbuild updates from Masahiro Yamada:
      
       - Fix build regressions for parisc, csky, nios2, openrisc
      
       - Simplify module builds for CONFIG_LTO_CLANG and CONFIG_X86_KERNEL_IBT
      
       - Remove arch/parisc/nm, which was presumably a workaround for old
         tools
      
       - Check the odd combination of EXPORT_SYMBOL and 'static' precisely
      
       - Make external module builds robust against "too long argument error"
      
       - Support j, k keys for moving the cursor in nconfig
      
      * tag 'kbuild-v5.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (25 commits)
        kbuild: Allow to select bash in a modified environment
        scripts: kconfig: nconf: make nconfig accept jk keybindings
        modpost: use fnmatch() to simplify match()
        modpost: simplify mod->name allocation
        kbuild: factor out the common objtool arguments
        kbuild: move vmlinux.o link to scripts/Makefile.vmlinux_o
        kbuild: clean .tmp_* pattern by make clean
        kbuild: remove redundant cleanups in scripts/link-vmlinux.sh
        kbuild: rebuild multi-object modules when objtool is updated
        kbuild: add cmd_and_savecmd macro
        kbuild: make *.mod rule robust against too long argument error
        kbuild: make built-in.a rule robust against too long argument error
        kbuild: check static EXPORT_SYMBOL* by script instead of modpost
        parisc: remove arch/parisc/nm
        kbuild: do not create *.prelink.o for Clang LTO or IBT
        kbuild: replace $(linked-object) with CONFIG options
        kbuild: do not try to parse *.cmd files for objects provided by compiler
        kbuild: replace $(if A,A,B) with $(or A,B) in scripts/Makefile.modpost
        modpost: squash if...else-if in find_elf_symbol2()
        modpost: reuse ARRAY_SIZE() macro for section_mismatch()
        ...
      71e80720
    • Linus Torvalds's avatar
      Merge tag 'pull-18-rc1-work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 952923dd
      Linus Torvalds authored
      Pull vfs pathname updates from Al Viro:
       "Several cleanups in fs/namei.c"
      
      * tag 'pull-18-rc1-work.namei' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        namei: cleanup double word in comment
        get rid of dead code in legitimize_root()
        fs/namei.c:reserve_stack(): tidy up the call of try_to_unlazy()
      952923dd
    • Linus Torvalds's avatar
      Merge tag 'pull-18-rc1-work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · cbd76ede
      Linus Torvalds authored
      Pull mount handling updates from Al Viro:
       "Cleanups (and one fix) around struct mount handling.
      
        The fix is usermode_driver.c one - once you've done kern_mount(), you
        must kern_unmount(); simple mntput() will end up with a leak. Several
        failure exits in there messed up that way... In practice you won't hit
        those particular failure exits without fault injection, though"
      
      * tag 'pull-18-rc1-work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        move mount-related externs from fs.h to mount.h
        blob_to_mnt(): kern_unmount() is needed to undo kern_mount()
        m->mnt_root->d_inode->i_sb is a weird way to spell m->mnt_sb...
        linux/mount.h: trim includes
        uninline may_mount() and don't opencode it in fspick(2)/fsopen(2)
      cbd76ede
    • Linus Torvalds's avatar
      Merge tag 'pull-18-rc1-work.fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · dbe0ee46
      Linus Torvalds authored
      Pull file descriptor updates from Al Viro.
      
       - Descriptor handling cleanups
      
      * tag 'pull-18-rc1-work.fd' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        Unify the primitives for file descriptor closing
        fs: remove fget_many and fput_many interface
        io_uring_enter(): don't leave f.flags uninitialized
      dbe0ee46
    • Linus Torvalds's avatar
      Merge tag '5.19-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6 · d66016c5
      Linus Torvalds authored
      Pull cifs client fixes from Steve French:
       "Nine cifs/smb3 client fixes.
      
        Includes DFS fixes, some cleanup of leagcy SMB1 code, duplicated
        message cleanup and a double free and deadlock fix"
      
      * tag '5.19-rc-smb3-client-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: fix uninitialized pointer in error case in dfs_cache_get_tgt_share
        cifs: skip trailing separators of prefix paths
        cifs: update internal module number
        cifs: version operations for smb20 unneeded when legacy support disabled
        cifs: do not build smb1ops if legacy support is disabled
        cifs: fix potential deadlock in direct reclaim
        cifs: when extending a file with falloc we should make files not-sparse
        cifs: remove repeated debug message on cifs_put_smb_ses()
        cifs: fix potential double free during failed mount
      d66016c5
  2. 04 Jun, 2022 16 commits
    • Schspa Shi's avatar
      kbuild: Allow to select bash in a modified environment · 42ce60aa
      Schspa Shi authored
      This fixes the build error when the system has a default bash version
      which is too old to support associative array variables.
      
      The build error log as fellowing:
      linux/scripts/check-local-export: line 11: declare: -A: invalid option
      declare: usage: declare [-afFirtx] [-p] [name[=value] ...]
      Signed-off-by: default avatarSchspa Shi <schspa@gmail.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      42ce60aa
    • Isak Ellmer's avatar
      scripts: kconfig: nconf: make nconfig accept jk keybindings · 2bbb4861
      Isak Ellmer authored
      Make nconfig accept jk keybindings for movement in addition to arrow
      keys.
      Signed-off-by: default avatarIsak Ellmer <isak01@gmail.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      2bbb4861
    • Masahiro Yamada's avatar
      modpost: use fnmatch() to simplify match() · a89227d7
      Masahiro Yamada authored
      Replace the own implementation for wildcard (glob) matching with
      a function call to fnmatch().
      
      Also, change the return type to 'bool'.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      a89227d7
    • Masahiro Yamada's avatar
      modpost: simplify mod->name allocation · 8c9ce89c
      Masahiro Yamada authored
      mod->name is set to the ELF filename with the suffix ".o" stripped.
      
      The current code calls strdup() and free() to manipulate the string,
      but a simpler approach is to pass new_module() with the name length
      subtracted by 2.
      
      Also, check if the passed filename ends with ".o" before stripping it.
      
      The current code blindly chops the suffix:
      
          tmp[strlen(tmp) - 2] = '\0'
      
      It will cause buffer under-run if strlen(tmp) < 2;
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      8c9ce89c
    • Masahiro Yamada's avatar
      kbuild: factor out the common objtool arguments · b42d2306
      Masahiro Yamada authored
      scripts/Makefile.build and scripts/link-vmlinux.sh have similar setups
      for the objtool arguments.
      
      It was difficult to factor out them because all the vmlinux build rules
      were written in a shell script. It is somewhat tedious to touch the two
      files every time a new objtool option is supported.
      
      To reduce the code duplication, move the objtool for vmlinux.o into
      scripts/Makefile.vmlinux_o. Then, move the common macros to Makefile.lib
      so they are shared between Makefile.build and Makefile.vmlinux_o.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
      b42d2306
    • Masahiro Yamada's avatar
      kbuild: move vmlinux.o link to scripts/Makefile.vmlinux_o · 5d45950d
      Masahiro Yamada authored
      This is a preparation for moving the objtool rule in the next commit.
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
      5d45950d
    • Masahiro Yamada's avatar
      kbuild: clean .tmp_* pattern by make clean · b0d6207b
      Masahiro Yamada authored
      Change the "make clean" rule to remove all the .tmp_* files.
      
      .tmp_objdiff is the only exception, which should be removed by
      "make mrproper".
      
      Rename the record directory of objdiff, .tmp_objdiff to .objdiff to
      avoid the removal by "make clean".
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      Tested-by: Sedat Dilek <sedat.dilek@gmail.com> # LLVM-14 (x86-64)
      b0d6207b
    • Linus Torvalds's avatar
      Merge tag 'bitmap-for-5.19-rc1' of https://github.com/norov/linux · d0e60d46
      Linus Torvalds authored
      Pull bitmap updates from Yury Norov:
      
       - bitmap: optimize bitmap_weight() usage, from me
      
       - lib/bitmap.c make bitmap_print_bitmask_to_buf parseable, from Mauro
         Carvalho Chehab
      
       - include/linux/find: Fix documentation, from Anna-Maria Behnsen
      
       - bitmap: fix conversion from/to fix-sized arrays, from me
      
       - bitmap: Fix return values to be unsigned, from Kees Cook
      
      It has been in linux-next for at least a week with no problems.
      
      * tag 'bitmap-for-5.19-rc1' of https://github.com/norov/linux: (31 commits)
        nodemask: Fix return values to be unsigned
        bitmap: Fix return values to be unsigned
        KVM: x86: hyper-v: replace bitmap_weight() with hweight64()
        KVM: x86: hyper-v: fix type of valid_bank_mask
        ia64: cleanup remove_siblinginfo()
        drm/amd/pm: use bitmap_{from,to}_arr32 where appropriate
        KVM: s390: replace bitmap_copy with bitmap_{from,to}_arr64 where appropriate
        lib/bitmap: add test for bitmap_{from,to}_arr64
        lib: add bitmap_{from,to}_arr64
        lib/bitmap: extend comment for bitmap_(from,to)_arr32()
        include/linux/find: Fix documentation
        lib/bitmap.c make bitmap_print_bitmask_to_buf parseable
        MAINTAINERS: add cpumask and nodemask files to BITMAP_API
        arch/x86: replace nodes_weight with nodes_empty where appropriate
        mm/vmstat: replace cpumask_weight with cpumask_empty where appropriate
        clocksource: replace cpumask_weight with cpumask_empty in clocksource.c
        genirq/affinity: replace cpumask_weight with cpumask_empty where appropriate
        irq: mips: replace cpumask_weight with cpumask_empty where appropriate
        drm/i915/pmu: replace cpumask_weight with cpumask_empty where appropriate
        arch/x86: replace cpumask_weight with cpumask_empty where appropriate
        ...
      d0e60d46
    • Linus Torvalds's avatar
      Merge tag 'for-5.19/parisc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · 23df9ba6
      Linus Torvalds authored
      Pull more parisc architecture updates from Helge Deller:
       "A fix to prevent crash at bootup if CONFIG_SCHED_MC is enabled, and
        add auto-detection of primary graphics card for framebuffer driver"
      
      * tag 'for-5.19/parisc-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc/stifb: Keep track of hardware path of graphics card
        parisc/stifb: Implement fb_is_primary_device()
        parisc: fix a crash with multicore scheduler
      23df9ba6
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.19-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 4ccbe91d
      Linus Torvalds authored
      Pull more xen updates from Juergen Gross:
       "Two cleanup patches for Xen related code and (more important) an
        update of MAINTAINERS for Xen, as Boris Ostrovsky decided to step
        down"
      
      * tag 'for-linus-5.19-rc1b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen: replace xen_remap() with memremap()
        MAINTAINERS: Update Xen maintainership
        xen: switch gnttab_end_foreign_access() to take a struct page pointer
      4ccbe91d
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-for-v5.19-2022-06-04' of... · 45b2e5ad
      Linus Torvalds authored
      Merge tag 'perf-tools-for-v5.19-2022-06-04' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull more perf tools updates from Arnaldo Carvalho de Melo:
      
       - Synthesize task events for pre-existing threads when using 'perf lock
         --threads', as we need to show task names.
      
       - Fix unwinding with ld.lld (>= version 10.0) linked objects, where
        .eh_frame_hdr and .text are in different PT_LOAD program headers,
         which makes perf record --call-graph dwarf fail with such obkects.
      
       - Check if 'perf record' hangs in the ARM SPE (Statistical Profiling
         Extensions) 'perf test' entry when recording a workload with forks.
      
       - Trace physical address for Arm SPE events, needed for 'perf c2c' to
         locate the memory node for samples.
      
       - Fix sorting in percent_rmt_hitm_cmp() in 'perf c2c'.
      
       - Further support for Intel hybrid systems in the evlist and 'perf
         record' code.
      
       - Update IBM s/390 vendor event JSON tables.
      
       - Add metrics (JSON) for Intel Sapphirerapids.
      
       - Update metrics for Intel Alderlake.
      
       - Correct typo of sysf 'event_source' directory in the documentation.
      
      * tag 'perf-tools-for-v5.19-2022-06-04' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux:
        perf vendor events intel: Update metrics for Alderlake
        perf vendor events intel: Add metrics for Sapphirerapids
        perf c2c: Fix sorting in percent_rmt_hitm_cmp()
        perf mem: Trace physical address for Arm SPE events
        perf list: Update event description for IBM zEC12/zBC12 to latest level
        perf list: Update event description for IBM z196/z114 to latest level
        perf list: Update event description for IBM z15 to latest level
        perf list: Update event description for IBM z14 to latest level
        perf list: Update event description for IBM z13 to latest level
        perf list: Update event description for IBM z10 to latest level
        perf list: Add IBM z16 event description for s390
        perf record: Support sample-read topdown metric group for hybrid platforms
        perf lock: Change to synthesize task events
        perf unwind: Fix segbase for ld.lld linked objects
        perf test arm-spe: Check if perf-record hangs when recording workload with forks
        perf docs: Correct typo of event_sources
        perf evlist: Extend arch_evsel__must_be_in_group to support hybrid systems
      45b2e5ad
    • Steve French's avatar
      cifs: fix uninitialized pointer in error case in dfs_cache_get_tgt_share · ee3c8019
      Steve French authored
      Set default value of ppath to null.
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
      Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
      ee3c8019
    • Helge Deller's avatar
      parisc/stifb: Keep track of hardware path of graphics card · b046f984
      Helge Deller authored
      Keep the pa_path (hardware path) of the graphics card in sti_struct and use
      this info to give more useful info which card is currently being used.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Cc: stable@vger.kernel.org   # v5.10+
      b046f984
    • Helge Deller's avatar
      parisc/stifb: Implement fb_is_primary_device() · cf936af7
      Helge Deller authored
      Implement fb_is_primary_device() function, so that fbcon detects if this
      framebuffer belongs to the default graphics card which was used to start
      the system.
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Cc: stable@vger.kernel.org   # v5.10+
      cf936af7
    • Linus Torvalds's avatar
      Merge tag 'gpio-fixes-for-v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux · 032dcf09
      Linus Torvalds authored
      Pull gpio fixes from Bartosz Golaszewski:
      
       - use the correct register for regcache sync in gpio-pca953x
      
       - remove unused and potentially harmful code from gpio-adp5588
      
       - MAINTAINERS update
      
      * tag 'gpio-fixes-for-v5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux:
        gpio: adp5588: Remove support for platform setup and teardown callbacks
        gpio: pca953x: use the correct register address to do regcache sync
        MAINTAINERS: Update Intel GPIO (PMIC and PCH) to Supported
        MAINTAINERS: Update GPIO ACPI library to Supported
      032dcf09
    • Linus Torvalds's avatar
      Merge tag 'regulator-fix-v5.19-rc0' of... · 77d4d360
      Linus Torvalds authored
      Merge tag 'regulator-fix-v5.19-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
      
      Pull regulator fix from Mark Brown:
       "One fix that came in during the merge window, fixing an error in the
        examples in the DT binding documentation for mt6315"
      
      * tag 'regulator-fix-v5.19-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
        regulator: mt6315-regulator: fix invalid allowed mode
      77d4d360
  3. 03 Jun, 2022 6 commits
    • Linus Torvalds's avatar
      Merge tag 'ntfs3_for_5.19' of https://github.com/Paragon-Software-Group/linux-ntfs3 · 1f952675
      Linus Torvalds authored
      Pull ntfs3 updates from Konstantin Komarov:
      
       - fix some memory leaks and panic
      
       - fixed xfstests (tested on x86_64): generic/092 generic/099
         generic/228 generic/240 generic/307 generic/444
      
       - fix some typos, dead code, etc
      
      * tag 'ntfs3_for_5.19' of https://github.com/Paragon-Software-Group/linux-ntfs3:
        fs/ntfs3: provide block_invalidate_folio to fix memory leak
        fs/ntfs3: Fix invalid free in log_replay
        fs/ntfs3: Update valid size if -EIOCBQUEUED
        fs/ntfs3: Check new size for limits
        fs/ntfs3: Fix fiemap + fix shrink file size (to remove preallocated space)
        fs/ntfs3: In function ntfs_set_acl_ex do not change inode->i_mode if called from function ntfs_init_acl
        fs/ntfs3: Optimize locking in ntfs_save_wsl_perm
        fs/ntfs3: Update i_ctime when xattr is added
        fs/ntfs3: Restore ntfs_xattr_get_acl and ntfs_xattr_set_acl functions
        fs/ntfs3: Keep preallocated only if option prealloc enabled
        fs/ntfs3: Fix some memory leaks in an error handling path of 'log_replay()'
      1f952675
    • Linus Torvalds's avatar
      Merge tag 'ptrace_stop-cleanup-for-v5.19' of... · 67850b7b
      Linus Torvalds authored
      Merge tag 'ptrace_stop-cleanup-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
      
      Pull ptrace_stop cleanups from Eric Biederman:
       "While looking at the ptrace problems with PREEMPT_RT and the problems
        Peter Zijlstra was encountering with ptrace in his freezer rewrite I
        identified some cleanups to ptrace_stop that make sense on their own
        and move make resolving the other problems much simpler.
      
        The biggest issue is the habit of the ptrace code to change
        task->__state from the tracer to suppress TASK_WAKEKILL from waking up
        the tracee. No other code in the kernel does that and it is straight
        forward to update signal_wake_up and friends to make that unnecessary.
      
        Peter's task freezer sets frozen tasks to a new state TASK_FROZEN and
        then it stores them by calling "wake_up_state(t, TASK_FROZEN)" relying
        on the fact that all stopped states except the special stop states can
        tolerate spurious wake up and recover their state.
      
        The state of stopped and traced tasked is changed to be stored in
        task->jobctl as well as in task->__state. This makes it possible for
        the freezer to recover tasks in these special states, as well as
        serving as a general cleanup. With a little more work in that
        direction I believe TASK_STOPPED can learn to tolerate spurious wake
        ups and become an ordinary stop state.
      
        The TASK_TRACED state has to remain a special state as the registers
        for a process are only reliably available when the process is stopped
        in the scheduler. Fundamentally ptrace needs acess to the saved
        register values of a task.
      
        There are bunch of semi-random ptrace related cleanups that were found
        while looking at these issues.
      
        One cleanup that deserves to be called out is from commit 57b6de08
        ("ptrace: Admit ptrace_stop can generate spuriuos SIGTRAPs"). This
        makes a change that is technically user space visible, in the handling
        of what happens to a tracee when a tracer dies unexpectedly. According
        to our testing and our understanding of userspace nothing cares that
        spurious SIGTRAPs can be generated in that case"
      
      * tag 'ptrace_stop-cleanup-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        sched,signal,ptrace: Rework TASK_TRACED, TASK_STOPPED state
        ptrace: Always take siglock in ptrace_resume
        ptrace: Don't change __state
        ptrace: Admit ptrace_stop can generate spuriuos SIGTRAPs
        ptrace: Document that wait_task_inactive can't fail
        ptrace: Reimplement PTRACE_KILL by always sending SIGKILL
        signal: Use lockdep_assert_held instead of assert_spin_locked
        ptrace: Remove arch_ptrace_attach
        ptrace/xtensa: Replace PT_SINGLESTEP with TIF_SINGLESTEP
        ptrace/um: Replace PT_DTRACE with TIF_SINGLESTEP
        signal: Replace __group_send_sig_info with send_signal_locked
        signal: Rename send_signal send_signal_locked
      67850b7b
    • Linus Torvalds's avatar
      Merge tag 'kthread-cleanups-for-v5.19' of... · 1ec6574a
      Linus Torvalds authored
      Merge tag 'kthread-cleanups-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
      
      Pull kthread updates from Eric Biederman:
       "This updates init and user mode helper tasks to be ordinary user mode
        tasks.
      
        Commit 40966e31 ("kthread: Ensure struct kthread is present for
        all kthreads") caused init and the user mode helper threads that call
        kernel_execve to have struct kthread allocated for them. This struct
        kthread going away during execve in turned made a use after free of
        struct kthread possible.
      
        Here, commit 343f4c49 ("kthread: Don't allocate kthread_struct for
        init and umh") is enough to fix the use after free and is simple
        enough to be backportable.
      
        The rest of the changes pass struct kernel_clone_args to clean things
        up and cause the code to make sense.
      
        In making init and the user mode helpers tasks purely user mode tasks
        I ran into two complications. The function task_tick_numa was
        detecting tasks without an mm by testing for the presence of
        PF_KTHREAD. The initramfs code in populate_initrd_image was using
        flush_delayed_fput to ensuere the closing of all it's file descriptors
        was complete, and flush_delayed_fput does not work in a userspace
        thread.
      
        I have looked and looked and more complications and in my code review
        I have not found any, and neither has anyone else with the code
        sitting in linux-next"
      
      * tag 'kthread-cleanups-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        sched: Update task_tick_numa to ignore tasks without an mm
        fork: Stop allowing kthreads to call execve
        fork: Explicitly set PF_KTHREAD
        init: Deal with the init process being a user mode process
        fork: Generalize PF_IO_WORKER handling
        fork: Explicity test for idle tasks in copy_thread
        fork: Pass struct kernel_clone_args into copy_thread
        kthread: Don't allocate kthread_struct for init and umh
      1ec6574a
    • Linus Torvalds's avatar
      Merge tag 'per-namespace-ipc-sysctls-for-v5.19' of... · 1888e9b4
      Linus Torvalds authored
      Merge tag 'per-namespace-ipc-sysctls-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
      
      Pull ipc sysctl namespace updates from Eric Biederman:
       "This updates the ipc sysctls so that they are fundamentally per ipc
        namespace. Previously these sysctls depended upon a hack to simulate
        being per ipc namespace by looking up the ipc namespace in read or
        write. With this set of changes the ipc sysctls are registered per ipc
        namespace and open looks up the ipc namespace.
      
        Not only does this series of changes ensure the traditional binding at
        open time happens, but it sets a foundation for being able to relax
        the permission checks to allow a user namspace root to change the ipc
        sysctls for an ipc namespace that the user namespace root requires. To
        do this requires the ipc namespace to be known at open time"
      
      * tag 'per-namespace-ipc-sysctls-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace:
        ipc: Remove extra braces
        ipc: Check permissions for checkpoint_restart sysctls at open time
        ipc: Remove extra1 field abuse to pass ipc namespace
        ipc: Use the same namespace to modify and validate
        ipc: Store ipc sysctls in the ipc namespace
        ipc: Store mqueue sysctls in the ipc namespace
      1888e9b4
    • Linus Torvalds's avatar
      firmware_loader: enable XZ by default if compressed support is enabled · 07953c54
      Linus Torvalds authored
      Commit 23cfbc6e ("firmware: Add the support for ZSTD-compressed
      firmware files") added support for ZSTD compression, but in the process
      also made the previously default XZ compression a config option.
      
      That means that anybody who upgrades their kernel and does a
      
          make oldconfig
      
      to update their configuration, will end up without the XZ compression
      that the configuration used to have.
      
      Add the 'default y' to make sure this doesn't happen.
      
      The whole compression question should probably be improved upon, since
      it is now possible to "enable" compression in the kernel config but not
      enable any actual compression algorithm, which makes it all very
      useless.  It makes no sense to ask Kconfig questions that enable
      situations that are nonsensical like that.
      
      This at least fixes the immediate problem of a kernel update resulting
      in a nonbootable machine because of a missed option.
      
      Fixes: 23cfbc6e ("firmware: Add the support for ZSTD-compressed  firmware files")
      Cc: Takashi Iwai <tiwai@suse.de>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      07953c54
    • Linus Torvalds's avatar
      Merge tag 'for-linus-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs · 744983d8
      Linus Torvalds authored
      Pull JFFS2, UBI and UBIFS updates from Richard Weinberger:
       "JFFS2:
         - Fixes for a memory leak
      
        UBI:
         - Fixes for fastmap (UAF, high CPU usage)
      
        UBIFS:
         - Minor cleanups"
      
      * tag 'for-linus-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
        ubi: ubi_create_volume: Fix use-after-free when volume creation failed
        ubi: fastmap: Check wl_pool for free peb before wear leveling
        ubi: fastmap: Fix high cpu usage of ubi_bgt by making sure wl_pool not empty
        ubifs: Use NULL instead of using plain integer as pointer
        ubifs: Simplify the return expression of run_gc()
        jffs2: fix memory leak in jffs2_do_fill_super
        jffs2: Use kzalloc instead of kmalloc/memset
      744983d8