1. 03 Jul, 2023 8 commits
    • Linus Torvalds's avatar
      Merge tag 'backlight-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight · 0a8d6c9c
      Linus Torvalds authored
      Pull backlight updates from Lee Jones:
       "New Functionality:
         - Add lots of Device Tree bindings / support
         - Turn off LED strings when display is blank
         - Switch I2C drivers from .probe_new() to .probe()
         - Remove superfluous NULL checks
         - Only obtain PWM information once and do it in .probe()
      
        Fix-ups:
         - Ensure locks are obtained and held when required"
      
      * tag 'backlight-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight:
        backlight: led_bl: Take led_access lock when required
        video: backlight: lp855x: Get PWM for PWM mode during probe
        dt-bindings: backlight: lp855x: Convert to YAML and modernize
        dt-bindings: backlight: pwm: Make power-supply not required
        backlight: pwm_bl: Remove unneeded checks for valid GPIOs
        backlight: Switch i2c drivers back to use .probe()
        backlight: lm3630a: Turn off both led strings when display is blank
        dt-bindings: leds: backlight: ktz8866: Add reg property and update example
      0a8d6c9c
    • Linus Torvalds's avatar
      Merge tag 'leds-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds · c156d4af
      Linus Torvalds authored
      Pull LED updates from Lee Jones:
       "New Drivers:
         - Add support for Intel Cherry Trail Whiskey Cove PMIC LEDs
         - Add support for Awinic AW20036/AW20054/AW20072 LEDs
      
        New Device Support:
         - Add support for PMI632 LPG to QCom LPG
         - Add support for PMI8998 to QCom Flash
         - Add support for MT6331, WLEDs and MT6332 to Mediatek MT6323 PMIC
      
        New Functionality:
         - Implement the LP55xx Charge Pump
         - Add support for suspend / resume to Intel Cherry Trail Whiskey Cove PMIC
         - Add support for breathing mode to Intel Cherry Trail Whiskey Cove PMIC
         - Enable per-pin resolution Pinctrl in LEDs GPIO
      
        Fix-ups:
         - Allow thread to sleep by switching from spinlock to mutex
         - Add lots of Device Tree bindings / support
         - Adapt relationships / dependencies driven by Kconfig
         - Switch I2C drivers from .probe_new() to .probe()
         - Remove superfluous / duplicate code
         - Replace strlcpy() with strscpy() for efficiency and overflow prevention
         - Staticify various functions
         - Trivial: Fixing coding style
         - Simplify / reduce code
      
        Bug Fixes:
         - Prevent NETDEV_LED_MODE_LINKUP from being cleared on rename
         - Repair race between led_set_brightness(LED_{OFF,FULL})
         - Fix Oops relating to sleeping in critical sections
         - Clear LED_INIT_DEFAULT_TRIGGER flag when clearing the current trigger
         - Do not leak resources in error handling paths
         - Fix unsigned comparison which can never be negative
         - Provide missing NULL terminating entries in tables
         - Fix misnaming issues"
      
      * tag 'leds-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (53 commits)
        leds: leds-mt6323: Adjust return/parameter types in wled get/set callbacks
        leds: sgm3140: Add richtek,rt5033-led compatible
        dt-bindings: leds: sgm3140: Document richtek,rt5033 compatible
        dt-bindings: backlight: kinetic,ktz8866: Add missing type for "current-num-sinks"
        dt-bindings: leds: Drop unneeded quotes
        leds: Fix config reference for AW200xx driver
        leds: leds-mt6323: Add support for WLEDs and MT6332
        leds: leds-mt6323: Add support for MT6331 leds
        leds: leds-mt6323: Open code and drop MT6323_CAL_HW_DUTY macro
        leds: leds-mt6323: Drop MT6323_ prefix from macros and defines
        leds: leds-mt6323: Specify registers and specs in platform data
        dt-bindings: leds: leds-mt6323: Document mt6332 compatible
        dt-bindings: leds: leds-mt6323: Document mt6331 compatible
        leds: simatic-ipc-leds-gpio: Introduce more Kconfig switches
        leds: simatic-ipc-leds-gpio: Split up into multiple drivers
        leds: simatic-ipc-leds-gpio: Move two extra gpio pins into another table
        leds: simatic-ipc-leds-gpio: Add terminating entries to gpio tables
        leds: flash: leds-qcom-flash: Fix an unsigned comparison which can never be negative
        leds: cht-wcove: Remove unneeded semicolon
        leds: cht-wcove: Fix an unsigned comparison which can never be negative
        ...
      c156d4af
    • Linus Torvalds's avatar
      Merge tag 'mfd-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd · b8ec70ab
      Linus Torvalds authored
      Pull MFD updates from Lee Jones:
       "New Drivers:
         - Add support for TI TPS6594/TPS6593/LP8764 PMICs
         - Add support for Samsung RT5033 Battery Charger
         - Add support for Analog Devices MAX77540 and MAX77541 PMICs
      
        New Device Support:
         - Add support for SPI to Rockchip RK808 (and friends)
         - Add support for AXP192 PMIC to X-Powers AXP20X
         - Add support for AXP313a PMIC to X-Powers AXP20X
         - Add support for RK806 to Rockchip RK8XX
      
        Removed Device Support:
         - Removed MFD support for Richtek RT5033 Battery
      
        Fix-ups:
         - Remove superfluous code
         - Switch I2C drivers from .probe_new() to .probe()
         - Convert over to managed resources (devm_*(), etc)
         - Use dev_err_probe() for returning errors from .probe()
         - Add lots of Device Tree bindings / support
         - Improve cache efficiency by switching to Maple
         - Use own exported namespaces (NS)
         - Include missing and remove superfluous headers
         - Start using / convert to the new shutdown sys-off API
         - Trivial: variable / define renaming
         - Make use of of_property_read_reg() when requesting DT 'reg's
      
        Bug Fixes:
         - Fix chip revision readout due to incorrect data masking
         - Amend incorrect register and mask values used for charger state
         - Hide unused functionality at compile time
         - Fix resource leaks following error handling routines
         - Return correct error values and fix error handling in general
         - Repair incorrect device names - used for device matching
         - Remedy broken module auto-loading"
      
      * tag 'mfd-next-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (51 commits)
        dt-bindings: mfd: max77541: Add ADI MAX77541/MAX77540
        iio: adc: max77541: Add ADI MAX77541 ADC Support
        regulator: max77541: Add ADI MAX77541/MAX77540 Regulator Support
        dt-bindings: regulator: max77541: Add ADI MAX77541/MAX77540 Regulator
        mfd: Switch two more drivers back to use struct i2c_driver::probe
        dt-bindings: mfd: samsung,s5m8767: Simplify excluding properties
        mfd: stmpe: Only disable the regulators if they are enabled
        mfd: max77541: Add ADI MAX77541/MAX77540 PMIC Support
        dt-bindings: mfd: gateworks-gsc: Remove unnecessary fan-controller nodes
        mfd: core: Use of_property_read_reg() to parse "reg"
        mfd: stmfx: Nullify stmfx->vdd in case of error
        mfd: stmfx: Fix error path in stmfx_chip_init
        mfd: intel-lpss: Add missing check for platform_get_resource
        mfd: stpmic1: Add PMIC poweroff via sys-off handler
        mfd: stpmic1: Fixup main control register and bits naming
        dt-bindings: mfd: qcom,tcsr: Add the compatible for IPQ8074
        mfd: tps65219: Add support for soft shutdown via sys-off API
        mfd: pm8008: Drop bogus i2c module alias
        mfd: pm8008: Fix module autoloading
        mfd: tps65219: Add GPIO cell instance
        ...
      b8ec70ab
    • Linus Torvalds's avatar
      Merge tag 'mailbox-v6.5' of git://git.linaro.org/landing-teams/working/fujitsu/integration · 99bdeae2
      Linus Torvalds authored
      Pull mailbox updates from Jassi Brar:
      
       - tegra: support for Tegra264
      
       - broadcom: convert bcm2835 bindings from txt to yaml bcm2835
      
       - qcom: support for IPQ5018
      
       - ti: always zero TX data fields
      
      * tag 'mailbox-v6.5' of git://git.linaro.org/landing-teams/working/fujitsu/integration:
        mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0
        mailbox: tegra: add support for Tegra264
        dt-bindings: mailbox: tegra: Document Tegra264 HSP
        dt-bindings: mailbox: convert bcm2835-mbox bindings to YAML
        dt-bindings: mailbox: qcom: Add IPQ5018 APCS compatible
      99bdeae2
    • Linus Torvalds's avatar
      Merge tag 'rtc-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · b349de4c
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "The isl1208 dirver was reworked tobe able to work as part of an MFD.
      
        All the Loongson chips are now supported through a new driver, the old
        one is removed.
      
        Summary:
      
        Subsystem:
         - Switch i2c drivers back to use .probe()
         - Constify pointers to hwmon_channel_info
      
        New driver:
         - Loongson on chip RTC, replacing the Loongson 1 only driver
      
        Drivers:
         - isl1208: cleanup and support for RAA215300
         - st-lpc: cleanups
         - stm32: fix wakeup"
      
      * tag 'rtc-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (21 commits)
        rtc: Add rtc driver for the Loongson family chips
        rtc: Remove the Loongson-1 RTC driver
        dt-bindings: rtc: Split loongson,ls2x-rtc into SoC-based compatibles
        rtc: rv3028: make rv3028 probeable from userspace
        rtc: isl1208: Add support for the built-in RTC on the PMIC RAA215300
        rtc: isl1208: Add isl1208_set_xtoscb()
        rtc: isl1208: Drop enum isl1208_id and split isl1208_configs[]
        rtc: isl1208: Make similar I2C and DT-based matching table
        rtc: isl1208: Drop name variable
        dt-bindings: rtc: isil,isl1208: Document clock and clock-names properties
        dt-bindings: rtc: isl1208: Convert to json-schema
        rtc: st-lpc: Simplify clk handling in st_rtc_probe()
        rtc: st-lpc: Release some resources in st_rtc_probe() in case of error
        rtc: stm32: remove dedicated wakeup management
        dt-bindings: rtc: restrict node name suffixes
        rtc: add HAS_IOPORT dependencies
        rtc: Switch i2c drivers back to use .probe()
        rtc: rv3032: constify pointers to hwmon_channel_info
        rtc: isl12022: constify pointers to hwmon_channel_info
        rtc: ds3232: constify pointers to hwmon_channel_info
        ...
      b349de4c
    • Linus Torvalds's avatar
      Merge tag 'i3c/for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux · a7419587
      Linus Torvalds authored
      Pull i3c updates from Alexandre Belloni:
      
       - svc: fix suspend/resume on some platforms, fix locking issues
      
      * tag 'i3c/for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux:
        i3c: master: svc: add NACK check after start byte sent
        i3c: master: svc: fix cpu schedule in spin lock
        i3c: master: svc: fix i3c suspend/resume issue
      a7419587
    • Linus Torvalds's avatar
      mm: validate the mm before dropping the mmap lock · ae80b404
      Linus Torvalds authored
      Commit 408579cd ("mm: Update do_vmi_align_munmap() return
      semantics") made the return value and locking semantics of
      do_vmi_align_munmap() more straightforward, but in the process it ended
      up unlocking the mmap lock just a tad too early: the debug code doing
      the mmap layout validation still needs to run with the lock held, or
      things might change under it while it's trying to validate things.
      
      So just move the unlocking to after the validate_mm() call.
      Reported-by: default avatarkernel test robot <oliver.sang@intel.com>
      Link: https://lore.kernel.org/lkml/ZKIsoMOT71uwCIZX@xsang-OptiPlex-9020/
      Fixes: 408579cd ("mm: Update do_vmi_align_munmap() return semantics")
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ae80b404
    • Linus Torvalds's avatar
      execve: always mark stack as growing down during early stack setup · f66066bc
      Linus Torvalds authored
      While our user stacks can grow either down (all common architectures) or
      up (parisc and the ia64 register stack), the initial stack setup when we
      copy the argument and environment strings to the new stack at execve()
      time is always done by extending the stack downwards.
      
      But it turns out that in commit 8d7071af ("mm: always expand the
      stack with the mmap write lock held"), as part of making the stack
      growing code more robust, 'expand_downwards()' was now made to actually
      check the vma flags:
      
      	if (!(vma->vm_flags & VM_GROWSDOWN))
      		return -EFAULT;
      
      and that meant that this execve-time stack expansion started failing on
      parisc, because on that architecture, the stack flags do not contain the
      VM_GROWSDOWN bit.
      
      At the same time the new check in expand_downwards() is clearly correct,
      and simplified the callers, so let's not remove it.
      
      The solution is instead to just codify the fact that yes, during
      execve(), the stack grows down.  This not only matches reality, it ends
      up being particularly simple: we already have special execve-time flags
      for the stack (VM_STACK_INCOMPLETE_SETUP) and use those flags to avoid
      page migration during this setup time (see vma_is_temporary_stack() and
      invalid_migration_vma()).
      
      So just add VM_GROWSDOWN to that set of temporary flags, and now our
      stack flags automatically match reality, and the parisc stack expansion
      works again.
      
      Note that the VM_STACK_INCOMPLETE_SETUP bits will be cleared when the
      stack is finalized, so we only add the extra VM_GROWSDOWN bit on
      CONFIG_STACK_GROWSUP architectures (ie parisc) rather than adding it in
      general.
      
      Link: https://lore.kernel.org/all/612eaa53-6904-6e16-67fc-394f4faa0e16@bell.net/
      Link: https://lore.kernel.org/all/5fd98a09-4792-1433-752d-029ae3545168@gmx.de/
      Fixes: 8d7071af ("mm: always expand the stack with the mmap write lock held")
      Reported-by: default avatarJohn David Anglin <dave.anglin@bell.net>
      Reported-and-tested-by: default avatarHelge Deller <deller@gmx.de>
      Reported-and-tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      f66066bc
  2. 02 Jul, 2023 6 commits
    • Linus Torvalds's avatar
      Merge tag 'iomap-6.5-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · a901a356
      Linus Torvalds authored
      Pull iomap updates from Darrick Wong:
      
       - Fix a type signature mismatch
      
       - Drop Christoph as maintainer
      
      * tag 'iomap-6.5-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        iomap: drop me [hch] from MAINTAINERS for iomap
        fs: iomap: Change the type of blocksize from 'int' to 'unsigned int' in iomap_file_buffered_write_punch_delalloc
      a901a356
    • Linus Torvalds's avatar
      Merge tag 'v6.5/vfs.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs · 28c7980f
      Linus Torvalds authored
      Pull vfs fix from Christian Brauner:
       "A fix for the backing file work from this cycle.
      
        When init_file() failed it would call file_free_rcu() on the file
        allocated by the caller of init_file(). It naively assumed that the
        correct cleanup operation would be called depending on whether it is a
        regular file or a backing file. However, that presupposes that the
        FMODE_BACKING flag would already be set which it won't be as that is
        done in the caller of init_file().
      
        Fix that bug by moving the cleanup of the allocated file into the
        caller where it belongs in the first place. There's no good reason for
        init_file() to consume resources it didn't allocate. This is a
        mainline only fix and was reported by syzbot. The fix was validated by
        syzbot against the provided reproducer"
      
      * tag 'v6.5/vfs.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs:
        fs: move cleanup from init_file() into its callers
      28c7980f
    • Linus Torvalds's avatar
      Merge tag 'i2c-for-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 5def00ca
      Linus Torvalds authored
      Pull i2c updates from Wolfram Sang:
      
       - I2C has now a co-maintainer taking care of the host drivers. Welcome
         Andi Shyti and have fun!
      
       - platform remove callback converted to return void in drivers
      
       - simplify drivers by using devm_clk_get_enabled()
      
       - introduce i2c_get_match_data() to avoid more boilerplate code
         (especially since the core stopped delivering an i2c_device_id)
      
       - and the usual bunch of driver updates
      
      * tag 'i2c-for-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (38 commits)
        i2c: uniphier: Use devm_clk_get_enabled()
        i2c: uniphier-f: Use devm_clk_get_enabled()
        i2c: owl: Use devm_clk_get_enabled()
        i2c: lpc2k: Use devm_clk_get_enabled()
        i2c: hix5hd2: Use devm_clk_get_enabled()
        i2c: sun6i-p2wi: Use devm_clk_get_enabled()
        i2c: pasemi-platform: Use devm_clk_get_enabled()
        i2c: mt7621: Use devm_clk_get_enabled()
        i2c: xiic: Use devm_clk_get_enabled()
        i2c: davinci: Use platform table macro over module_alias
        i2c: ocores: use devm_ managed clks
        i2c: nomadik: Use dev_err_probe() whenever possible
        i2c: nomadik: Use devm_clk_get_enabled()
        i2c: nomadik: Remove unnecessary goto label
        usb: typec: ucsi: Mark dGPUs as DEVICE scope
        i2c: wmt: Use devm_platform_get_and_ioremap_resource()
        i2c: versatile: Use devm_platform_get_and_ioremap_resource()
        i2c: hix5hd2: Add I2C_M_STOP flag support for i2c-hix5hd2 driver.
        i2c: mpc: Use of_property_read_reg() to parse "reg"
        i2c: imx-lpi2c: Don't open-code DIV_ROUND_UP
        ...
      5def00ca
    • Linus Torvalds's avatar
      Merge tag 'parisc-for-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · ed77ac92
      Linus Torvalds authored
      Pull parisc updates from Helge Deller:
      
       - Add missing cacheflush() syscall
      
       - Fix STI console on 64-bit-only machines
      
       - Move kernel debug options to Kconfig.debug
      
       - Lots of warning fixes in arch/parisc/ and drivers/parisc/ when
         compiled with W=1
      
       - Enable some more graphics drivers in refreshed defconfigs
      
      * tag 'parisc-for-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: (29 commits)
        parisc: Refresh defconfigs
        parisc: irq: Add irq-related function declarations
        parisc: Move init function declarations into header file
        parisc: dino: Make dino_init() returning void
        parisc: lba_pci: Mark two variables __maybe_unused
        parisc: unaligned: Include header file to avoid missing prototype warnings
        parisc: signal: Mark do_notify_resume() and sys_rt_sigreturn() asmlinkage
        parisc: unwind: Mark start and stop variables __maybe_unused
        parisc: init: Drop unused variable end_paddr
        parisc: traps: Mark functions static
        parisc: processor: Fix kdoc for init_cpu_profiler()
        parisc: sys_parisc: parisc_personality() is called from asm code
        parisc: ccio-dma: Fix kdoc and compiler warnings
        parisc: pdc_stable: Fix kdoc and compiler warnings
        parisc: pci-dma: Make pcxl_alloc_range() static
        parisc: Mark image_size __maybe_unused in perf_write()
        parisc: module: Mark symindex __maybe_unused
        parisc: pdc_chassis: Fix kdoc warnings
        parisc: firmware: Fix kdoc warnings
        parisc: drivers: Fix kdoc warnings
        ...
      ed77ac92
    • Amir Goldstein's avatar
      fs: move cleanup from init_file() into its callers · dff745c1
      Amir Goldstein authored
      The use of file_free_rcu() in init_file() to free the struct that was
      allocated by the caller was hacky and we got what we deserved.
      
      Let init_file() and its callers take care of cleaning up each after
      their own allocated resources on error.
      
      Fixes: 62d53c4a ("fs: use backing_file container for internal files with "fake" f_path") # mainline only
      Reported-and-tested-by: syzbot+ada42aab05cf51b00e98@syzkaller.appspotmail.com
      Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
      Message-Id: <20230701171134.239409-1-amir73il@gmail.com>
      Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
      dff745c1
    • Linus Torvalds's avatar
      Merge tag 'csky-for-linus-6.5' of https://github.com/c-sky/csky-linux · 995b406c
      Linus Torvalds authored
      Pull arch/csky update from Guo Ren:
      
       - Correct thread.trap_no restore of uprobe
      
      * tag 'csky-for-linus-6.5' of https://github.com/c-sky/csky-linux:
        csky: uprobes: Restore thread.trap_no
      995b406c
  3. 01 Jul, 2023 19 commits
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-6.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · dfab92f2
      Linus Torvalds authored
      Pull NFS client updates from Trond Myklebust:
      "Stable fixes and other bugfixes:
      
         - nfs: don't report STATX_BTIME in ->getattr
      
         - Revert 'NFSv4: Retry LOCK on OLD_STATEID during delegation return'
           since it breaks NFSv4 state recovery.
      
         - NFSv4.1: freeze the session table upon receiving NFS4ERR_BADSESSION
      
         - Fix the NFSv4.2 xattr cache shrinker_id
      
         - Force a ctime update after a NFSv4.2 SETXATTR call
      
        Features and cleanups:
      
         - NFS and RPC over TLS client code from Chuck Lever
      
         - Support for use of abstract unix socket addresses with the rpcbind
           daemon
      
         - Sysfs API to allow shutdown of the kernel RPC client and prevent
           umount() hangs if the server is known to be permanently down
      
         - XDR cleanups from Anna"
      
      * tag 'nfs-for-6.5-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (33 commits)
        Revert "NFSv4: Retry LOCK on OLD_STATEID during delegation return"
        NFS: Don't cleanup sysfs superblock entry if uninitialized
        nfs: don't report STATX_BTIME in ->getattr
        NFSv4.1: freeze the session table upon receiving NFS4ERR_BADSESSION
        NFSv4.2: fix wrong shrinker_id
        NFSv4: Clean up some shutdown loops
        NFS: Cancel all existing RPC tasks when shutdown
        NFS: add sysfs shutdown knob
        NFS: add a sysfs link to the acl rpc_client
        NFS: add a sysfs link to the lockd rpc_client
        NFS: Add sysfs links to sunrpc clients for nfs_clients
        NFS: add superblock sysfs entries
        NFS: Make all of /sys/fs/nfs network-namespace unique
        NFS: Open-code the nfs_kset kset_create_and_add()
        NFS: rename nfs_client_kobj to nfs_net_kobj
        NFS: rename nfs_client_kset to nfs_kset
        NFS: Add an "xprtsec=" NFS mount option
        NFS: Have struct nfs_client carry a TLS policy field
        SUNRPC: Add a TCP-with-TLS RPC transport class
        SUNRPC: Capture CMSG metadata on client-side receive
        ...
      dfab92f2
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2023-07-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · f8566aa4
      Linus Torvalds authored
      Pull x86 fix from Thomas Gleixner:
       "A single regression fix for x86:
      
        Moving the invocation of arch_cpu_finalize_init() earlier in the boot
        process caused a boot regression on IBT enabled system.
      
        The root cause is not the move of arch_cpu_finalize_init() itself. The
        system fails to boot because the subsequent efi_enter_virtual_mode()
        code has a non-IBT safe EFI call inside. This was not noticed before
        because IBT was enabled after the EFI initialization.
      
        Switching the EFI call to use the IBT safe wrapper cures the problem"
      
      * tag 'x86-urgent-2023-07-01' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/efi: Make efi_set_virtual_address_map IBT safe
      f8566aa4
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · ad288597
      Linus Torvalds authored
      Pull Kbuild updates from Masahiro Yamada:
      
       - Remove the deprecated rule to build *.dtbo from *.dts
      
       - Refactor section mismatch detection in modpost
      
       - Fix bogus ARM section mismatch detections
      
       - Fix error of 'make gtags' with O= option
      
       - Add Clang's target triple to KBUILD_CPPFLAGS to fix a build error
         with the latest LLVM version
      
       - Rebuild the built-in initrd when KBUILD_BUILD_TIMESTAMP is changed
      
       - Ignore more compiler-generated symbols for kallsyms
      
       - Fix 'make local*config' to handle the ${CONFIG_FOO} form in Makefiles
      
       - Enable more kernel-doc warnings with W=2
      
       - Refactor <linux/export.h> by generating KSYMTAB data by modpost
      
       - Deprecate <asm/export.h> and <asm-generic/export.h>
      
       - Remove the EXPORT_DATA_SYMBOL macro
      
       - Move the check for static EXPORT_SYMBOL back to modpost, which makes
         the build faster
      
       - Re-implement CONFIG_TRIM_UNUSED_KSYMS with one-pass algorithm
      
       - Warn missing MODULE_DESCRIPTION when building modules with W=1
      
       - Make 'make clean' robust against too long argument error
      
       - Exclude more objects from GCOV to fix CFI failures with GCOV
      
       - Allow 'make modules_install' to install modules.builtin and
         modules.builtin.modinfo even when CONFIG_MODULES is disabled
      
       - Include modules.builtin and modules.builtin.modinfo in the
         linux-image Debian package even when CONFIG_MODULES is disabled
      
       - Revive "Entering directory" logging for the latest Make version
      
      * tag 'kbuild-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (72 commits)
        modpost: define more R_ARM_* for old distributions
        kbuild: revive "Entering directory" for Make >= 4.4.1
        kbuild: set correct abs_srctree and abs_objtree for package builds
        scripts/mksysmap: Ignore prefixed KCFI symbols
        kbuild: deb-pkg: remove the CONFIG_MODULES check in buildeb
        kbuild: builddeb: always make modules_install, to install modules.builtin*
        modpost: continue even with unknown relocation type
        modpost: factor out Elf_Sym pointer calculation to section_rel()
        modpost: factor out inst location calculation to section_rel()
        kbuild: Disable GCOV for *.mod.o
        kbuild: Fix CFI failures with GCOV
        kbuild: make clean rule robust against too long argument error
        script: modpost: emit a warning when the description is missing
        kbuild: make modules_install copy modules.builtin(.modinfo)
        linux/export.h: rename 'sec' argument to 'license'
        modpost: show offset from symbol for section mismatch warnings
        modpost: merge two similar section mismatch warnings
        kbuild: implement CONFIG_TRIM_UNUSED_KSYMS without recursion
        modpost: use null string instead of NULL pointer for default namespace
        modpost: squash sym_update_namespace() into sym_add_exported()
        ...
      ad288597
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · e3c2b10d
      Linus Torvalds authored
      Pull arm64 fix from Catalin Marinas:
       "Fix memory corruption (overwriting the kmalloc redzone) when saving
        the SVE state while in SVE streaming mode"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: sme: Use STR P to clear FFR context field in streaming SVE mode
      e3c2b10d
    • Linus Torvalds's avatar
      Merge tag 'cxl-for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl · d25f0025
      Linus Torvalds authored
      Pull CXL updates from Dan Williams:
       "The highlights in terms of new functionality are support for the
        standard CXL Performance Monitor definition that appeared in CXL 3.0,
        support for device sanitization (wiping all data from a device),
        secure-erase (re-keying encryption of user data), and support for
        firmware update. The firmware update support is notable as it reuses
        the simple sysfs_upload interface to just cat(1) a blob to a sysfs
        file and pipe that to the device.
      
        Additionally there are a substantial number of cleanups and
        reorganizations to get ready for RCH error handling (RCH == Restricted
        CXL Host == current shipping hardware generation / pre CXL-2.0
        topologies) and type-2 (accelerator / vendor specific) devices.
      
        For vendor specific devices they implement a subset of what the
        generic type-3 (generic memory expander) driver expects. As a result
        the rework decouples optional infrastructure from the core driver
        context.
      
        For RCH topologies, where the specification working group did not want
        to confuse pre-CXL-aware operating systems, many of the standard
        registers are hidden which makes support standard bus features like
        AER (PCIe Advanced Error Reporting) difficult. The rework arranges for
        the driver to help the PCI-AER core. Bjorn is on board with this
        direction but a late regression disocvery means the completion of this
        functionality needs to cook a bit longer, so it is code
        reorganizations only for now.
      
        Summary:
      
         - Add infrastructure for supporting background commands along with
           support for device sanitization and firmware update
      
         - Introduce a CXL performance monitoring unit driver based on the
           common definition in the specification.
      
         - Land some preparatory cleanup and refactoring for the anticipated
           arrival of CXL type-2 (accelerator devices) and CXL RCH (CXL-v1.1
           topology) error handling.
      
         - Rework CPU cache management with respect to region configuration
           (device hotplug or other dynamic changes to memory interleaving)
      
         - Fix region reconfiguration vs CXL decoder ordering rules"
      
      * tag 'cxl-for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: (51 commits)
        cxl: Fix one kernel-doc comment
        cxl/pci: Use correct flag for sanitize polling
        docs: perf: Minimal introduction the the CXL PMU device and driver
        perf: CXL Performance Monitoring Unit driver
        tools/testing/cxl: add firmware update emulation to CXL memdevs
        tools/testing/cxl: Use named effects for the Command Effect Log
        tools/testing/cxl: Fix command effects for inject/clear poison
        cxl: add a firmware update mechanism using the sysfs firmware loader
        cxl/test: Add Secure Erase opcode support
        cxl/mem: Support Secure Erase
        cxl/test: Add Sanitize opcode support
        cxl/mem: Wire up Sanitization support
        cxl/mbox: Add sanitization handling machinery
        cxl/mem: Introduce security state sysfs file
        cxl/mbox: Allow for IRQ_NONE case in the isr
        Revert "cxl/port: Enable the HDM decoder capability for switch ports"
        cxl/memdev: Formalize endpoint port linkage
        cxl/pci: Unconditionally unmask 256B Flit errors
        cxl/region: Manage decoder target_type at decoder-attach time
        cxl/hdm: Default CXL_DEVTYPE_DEVMEM decoders to CXL_DECODER_DEVMEM
        ...
      d25f0025
    • Linus Torvalds's avatar
      Merge tag 'libnvdimm-for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 0a1c979c
      Linus Torvalds authored
      Pull nvdimm and DAX updates from Vishal Verma:
       "This is mostly small cleanups and fixes, with the biggest change being
        the change to the DAX fault handler allowing it to return
        VM_FAULT_HWPOISON.
      
        Summary:
      
         - DAX fixes and cleanups including a use after free, extra
           references, and device unregistration, and a redundant variable.
      
         - Allow the DAX fault handler to return VM_FAULT_HWPOISON
      
         - A few libnvdimm cleanups such as making some functions and
           variables static where sufficient.
      
         - Add a few missing prototypes for wrapped functions in
           tools/testing/nvdimm"
      
      * tag 'libnvdimm-for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        dax: enable dax fault handler to report VM_FAULT_HWPOISON
        nvdimm: make security_show static
        nvdimm: make nd_class variable static
        dax/kmem: Pass valid argument to memory_group_register_static
        fsdax: remove redundant variable 'error'
        dax: Cleanup extra dax_region references
        dax: Introduce alloc_dev_dax_id()
        dax: Use device_unregister() in unregister_dax_mapping()
        dax: Fix dax_mapping_release() use after free
        tools/testing/nvdimm: Drop empty platform remove function
        libnvdimm: mark 'security_show' static again
        testing: nvdimm: add missing prototypes for wrapped functions
        dax: fix missing-prototype warnings
      0a1c979c
    • Linus Torvalds's avatar
      Merge tag 'sysctl-fixes-v2-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux · be21a73e
      Linus Torvalds authored
      Pull another sysctl fix from Luis Chamberlain:
       "Just one minor nit I forgot to merge"
      
      * tag 'sysctl-fixes-v2-v6.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux:
        sysctl: set variable sysctl_mount_point storage-class-specifier to static
      be21a73e
    • Linus Torvalds's avatar
      Merge tag 'flex-array-transformations-6.5-rc1' of... · 170ab6c5
      Linus Torvalds authored
      Merge tag 'flex-array-transformations-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux
      
      Pull flexible-array update from Gustavo Silva:
       "Transform a zero-length array into a C99 flexible-array member.
      
        This addresses a build failure with Clang by fixing multiple
        '-Warray-bounds' warnings in drivers/staging/ks7010/ks_wlan_net.c"
      
      * tag 'flex-array-transformations-6.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gustavoars/linux:
        uapi: wireless: Replace zero-length array with flexible-array member
      170ab6c5
    • Christian Brauner's avatar
      pid: use struct_size_t() helper · dd546618
      Christian Brauner authored
      Before commit d67790dd ("overflow: Add struct_size_t() helper") only
      struct_size() existed, which expects a valid pointer instance containing
      the flexible array.
      
      However, when we determine the default struct pid allocation size for
      the associated kmem cache of a pid namespace we need to take the nesting
      depth of the pid namespace into account without an variable instance
      necessarily being available.
      
      In commit b69f0aeb ("pid: Replace struct pid 1-element array with
      flex-array") we used to handle this the old fashioned way and cast NULL
      to a struct pid pointer type. However, we do apparently have a dedicated
      struct_size_t() helper for exactly this case. So switch to that.
      Suggested-by: default avatarKees Cook <keescook@chromium.org>
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      dd546618
    • Liam R. Howlett's avatar
      mm: Update do_vmi_align_munmap() return semantics · 408579cd
      Liam R. Howlett authored
      Since do_vmi_align_munmap() will always honor the downgrade request on
      the success, the callers no longer have to deal with confusing return
      codes.  Since all callers that request downgrade actually want the lock
      to be dropped, change the downgrade to an unlock request.
      
      Note that the lock still needs to be held in read mode during the page
      table clean up to avoid races with a map request.
      
      Update do_vmi_align_munmap() to return 0 for success.  Clean up the
      callers and comments to always expect the unlock to be honored on the
      success path.  The error path will always leave the lock untouched.
      
      As part of the cleanup, the wrapper function do_vmi_munmap() and callers
      to the wrapper are also updated.
      Suggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Link: https://lore.kernel.org/linux-mm/20230629191414.1215929-1-willy@infradead.org/Signed-off-by: default avatarLiam R. Howlett <Liam.Howlett@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      408579cd
    • Matthew Wilcox (Oracle)'s avatar
      mm: Always downgrade mmap_lock if requested · e4bd84c0
      Matthew Wilcox (Oracle) authored
      Now that stack growth must always hold the mmap_lock for write, we can
      always downgrade the mmap_lock to read and safely unmap pages from the
      page table, even if we're next to a stack.
      Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      e4bd84c0
    • Max Filippov's avatar
      xtensa: fix lock_mm_and_find_vma in case VMA not found · 03f88937
      Max Filippov authored
      MMU version of lock_mm_and_find_vma releases the mm lock before
      returning when VMA is not found. Do the same in noMMU version.
      This fixes hang on an attempt to handle protection fault.
      
      Fixes: d85a143b ("xtensa: fix NOMMU build with lock_mm_and_find_vma() conversion")
      Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      03f88937
    • Linus Torvalds's avatar
      Merge tag '6.5-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6 · a507db1d
      Linus Torvalds authored
      Pull smb client updates from Steve French:
      
       - Deferred close fix
      
       - Debugging improvements: display missing mount option, dump rc on
         invalidate inode failures, print client_guid in DebugData, log
         session id when matching session not found in reconnect, new dynamic
         tracepoint for session not found
      
       - Mount fixes including: potential null dereference, and possible
         memory leak and path name parsing when double slashes
      
       - Fix potential use after free in compounding
      
       - Two crediting (flow control) fixes: fix for crediting leak (stress
         scenario with excess lease credits) and better locking around
         updating credits
      
       - Three cleanups from issues pointed out by the kernel test robot
      
       - Session state check improvements (including for potential use after
         free)
      
       - DFS fixes: Fix for getattr on link when DFS disabled, fix for DFS
         mounts to same share with different prefix paths, DFS mount error
         checking improvement
      
      * tag '6.5-rc-smb3-client-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6:
        cifs: new dynamic tracepoint to track ses not found errors
        cifs: log session id when a matching ses is not found
        smb: client: improve DFS mount check
        smb: client: fix shared DFS root mounts with different prefixes
        smb: client: fix parsing of source mount option
        smb: client: fix broken file attrs with nodfs mounts
        cifs: print client_guid in DebugData
        cifs: fix session state check in smb2_find_smb_ses
        cifs: fix session state check in reconnect to avoid use-after-free issue
        cifs: do all necessary checks for credits within or before locking
        cifs: prevent use-after-free by freeing the cfile later
        smb: client: fix warning in generic_ip_connect()
        smb: client: fix warning in CIFSFindNext()
        smb: client: fix warning in CIFSFindFirst()
        smb3: do not reserve too many oplock credits
        cifs: print more detail when invalidate_inode_mapping fails
        smb: client: fix warning in cifs_smb3_do_mount()
        smb: client: fix warning in cifs_match_super()
        cifs: print nosharesock value while dumping mount options
        SMB3: Do not send lease break acknowledgment if all file handles have been closed
      a507db1d
    • Linus Torvalds's avatar
      Merge tag '6.5-rc-ksmbd-server-fixes-part1' of git://git.samba.org/ksmbd · 8976e9d0
      Linus Torvalds authored
      Pull ksmbd server updates from Steve French:
      
       - two fixes for compounding bugs (make sure no out of bound reads with
         less common combinations of commands in the compound)
      
       - eight minor cleanup patches (e.g. simplifying return values, replace
         one element array, use of kzalloc where simpler)
      
       - fix for clang warning on possible overflow in filename conversion
      
      * tag '6.5-rc-ksmbd-server-fixes-part1' of git://git.samba.org/ksmbd:
        ksmbd: avoid field overflow warning
        ksmbd: Replace one-element array with flexible-array member
        ksmbd: Use struct_size() helper in ksmbd_negotiate_smb_dialect()
        ksmbd: add missing compound request handing in some commands
        ksmbd: fix out of bounds read in smb2_sess_setup
        ksmbd: Replace the ternary conditional operator with min()
        ksmbd: use kvzalloc instead of kvmalloc
        ksmbd: Change the return value of ksmbd_vfs_query_maximal_access to void
        ksmbd: return a literal instead of 'err' in ksmbd_vfs_kern_path_locked()
        ksmbd: use kzalloc() instead of __GFP_ZERO
        ksmbd: remove unused ksmbd_tree_conn_share function
      8976e9d0
    • Linus Torvalds's avatar
      Merge tag 'nfsd-6.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux · ee152be1
      Linus Torvalds authored
      Pull nfsd fix from Chuck Lever:
      
       - Fix ordering of attributes in NFSv4 GETATTR replies
      
      * tag 'nfsd-6.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux:
        nfsd: Fix creation time serialization order
      ee152be1
    • Linus Torvalds's avatar
      Merge tag 'livepatching-for-6.5' of... · f4ce392b
      Linus Torvalds authored
      Merge tag 'livepatching-for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching
      
      Pull livepatching update from Petr Mladek:
      
       - Make a variable static to fix a sparse warning
      
      * tag 'livepatching-for-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching:
        livepatch: Make 'klp_stack_entries' static
      f4ce392b
    • Linus Torvalds's avatar
      Merge tag 'efi-next-for-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi · 937d96d2
      Linus Torvalds authored
      Pull EFI updates from Ard Biesheuvel:
       "Although some more stuff is brewing, the EFI changes that are ready
        for mainline are few this cycle:
      
         - improve the PCI DMA paranoia logic in the EFI stub
      
         - some constification changes
      
         - add statfs support to efivarfs
      
         - allow user space to enumerate updatable firmware resources without
           CAP_SYS_ADMIN"
      
      * tag 'efi-next-for-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
        efi/libstub: Disable PCI DMA before grabbing the EFI memory map
        efi/esrt: Allow ESRT access without CAP_SYS_ADMIN
        efivarfs: expose used and total size
        efi: make kobj_type structure constant
        efi: x86: make kobj_type structure constant
      937d96d2
    • Linus Torvalds's avatar
      Merge tag 'v6.5-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · 5d95ff84
      Linus Torvalds authored
      Pull crypto updates from Herbert Xu:
       "API:
         - Add linear akcipher/sig API
         - Add tfm cloning (hmac, cmac)
         - Add statesize to crypto_ahash
      
        Algorithms:
         - Allow only odd e and restrict value in FIPS mode for RSA
         - Replace LFSR with SHA3-256 in jitter
         - Add interface for gathering of raw entropy in jitter
      
        Drivers:
         - Fix race on data_avail and actual data in hwrng/virtio
         - Add hash and HMAC support in starfive
         - Add RSA algo support in starfive
         - Add support for PCI device 0x156E in ccp"
      
      * tag 'v6.5-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (85 commits)
        crypto: akcipher - Do not copy dst if it is NULL
        crypto: sig - Fix verify call
        crypto: akcipher - Set request tfm on sync path
        crypto: sm2 - Provide sm2_compute_z_digest when sm2 is disabled
        hwrng: imx-rngc - switch to DEFINE_SIMPLE_DEV_PM_OPS
        hwrng: st - keep clock enabled while hwrng is registered
        hwrng: st - support compile-testing
        hwrng: imx-rngc - fix the timeout for init and self check
        KEYS: asymmetric: Use new crypto interface without scatterlists
        KEYS: asymmetric: Move sm2 code into x509_public_key
        KEYS: Add forward declaration in asymmetric-parser.h
        crypto: sig - Add interface for sign/verify
        crypto: akcipher - Add sync interface without SG lists
        crypto: cipher - On clone do crypto_mod_get()
        crypto: api - Add __crypto_alloc_tfmgfp
        crypto: api - Remove crypto_init_ops()
        crypto: rsa - allow only odd e and restrict value in FIPS mode
        crypto: geniv - Split geniv out of AEAD Kconfig option
        crypto: algboss - Add missing dependency on RNG2
        crypto: starfive - Add RSA algo support
        ...
      5d95ff84
    • Linus Torvalds's avatar
      xtensa: fix NOMMU build with lock_mm_and_find_vma() conversion · d85a143b
      Linus Torvalds authored
      It turns out that xtensa has a really odd configuration situation: you
      can do a no-MMU config, but still have the page fault code enabled.
      Which doesn't sound all that sensible, but it turns out that xtensa can
      have protection faults even without the MMU, and we have this:
      
          config PFAULT
              bool "Handle protection faults" if EXPERT && !MMU
              default y
              help
                Handle protection faults. MMU configurations must enable it.
                noMMU configurations may disable it if used memory map never
                generates protection faults or faults are always fatal.
      
                If unsure, say Y.
      
      which completely violated my expectations of the page fault handling.
      
      End result: Guenter reports that the xtensa no-MMU builds all fail with
      
        arch/xtensa/mm/fault.c: In function ‘do_page_fault’:
        arch/xtensa/mm/fault.c:133:8: error: implicit declaration of function ‘lock_mm_and_find_vma’
      
      because I never exposed the new lock_mm_and_find_vma() function for the
      no-MMU case.
      
      Doing so is simple enough, and fixes the problem.
      Reported-and-tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Fixes: a050ba1e ("mm/fault: convert remaining simple cases to lock_mm_and_find_vma()")
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d85a143b
  4. 30 Jun, 2023 7 commits