óÐÉÓÏË ÉÚÍÅÎÅÎÉÊ × Linux 6.7.1

 
ACPI: resource: Add another DMI match for the TongFang GMxXGxx [+ + +]
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Sat Dec 23 15:57:06 2023 +0100

    ACPI: resource: Add another DMI match for the TongFang GMxXGxx
    
    commit df0cced74159c79e36ce7971f0bf250673296d93 upstream.
    
    The TongFang GMxXGxx, which needs IRQ overriding for the keyboard to work,
    is also sold as the Eluktronics RP-15 which does not use the standard
    TongFang GMxXGxx DMI board_name.
    
    Add an entry for this laptop to the irq1_edge_low_force_override[] DMI
    table to make the internal keyboard functional.
    
    Reported-by: Luis Acuna <ldacuna@gmail.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Cc: All applicable <stable@vger.kernel.org>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
ALSA: hda/realtek: Add quirks for Dell models [+ + +]
Author: Stefan Binding <sbinding@opensource.cirrus.com>
Date:   Thu Dec 21 13:25:18 2023 +0000

    ALSA: hda/realtek: Add quirks for Dell models
    
    commit 423206604b28174698d77bf5ea81365cdd6c0f77 upstream.
    
    These models use 2 or 4 CS35L41 amps with HDA using SPI and I2C.
    Models use internal and external boost.
    All models require DSD support to be added inside
    cs35l41_hda_property.c
    
    Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
    Cc: <stable@vger.kernel.org> # v6.7+
    Link: https://lore.kernel.org/r/20231221132518.3213-4-sbinding@opensource.cirrus.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ALSA: hda/realtek: enable SND_PCI_QUIRK for Lenovo Legion Slim 7 Gen 8 (2023) serie [+ + +]
Author: Dorian Cruveiller <doriancruveiller@gmail.com>
Date:   Sat Dec 30 12:40:01 2023 +0100

    ALSA: hda/realtek: enable SND_PCI_QUIRK for Lenovo Legion Slim 7 Gen 8 (2023) serie
    
    commit 99af5b11c57d33c32d761797f6308b40936c22ed upstream.
    
    Link up the realtek audio chip to the cirrus cs35l41 sound amplifier chip
    on 4 models of the Lenovo legion slim 7 gen 8 (2023). These models are
    16IRH8 (2 differents subsystem id) and 16APH8 (2 differents subsystem ids).
    
    Subsystem ids list:
     - 17AA38B4
     - 17AA38B5
     - 17AA38B6
     - 17AA38B7
    
    Signed-off-by: Dorian Cruveiller <doriancruveiller@gmail.com>
    Cc: <stable@vger.kernel.org> # v6.7
    Link: https://lore.kernel.org/r/20231230114001.19855-1-doriancruveiller@gmail.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ALSA: hda/realtek: Fix mute and mic-mute LEDs for HP Envy X360 13-ay0xxx [+ + +]
Author: Tom Jason Schwanke <tom@catboys.cloud>
Date:   Mon Jan 8 16:15:21 2024 +0100

    ALSA: hda/realtek: Fix mute and mic-mute LEDs for HP Envy X360 13-ay0xxx
    
    commit 6b3d14b7f9b1acaf7303d8499836bf78ee9c470c upstream.
    
    This enables the mute and mic-mute LEDs on the HP Envy X360 13-ay0xxx
    convertibles.
    The quirk 'ALC245_FIXUP_HP_X360_MUTE_LEDS' already exists and is now
    enabled for this device.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=216197
    Signed-off-by: Tom Jason Schwanke <tom@catboys.cloud>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/651b26e9-e86b-45dd-aa90-3e43d6b99823@catboys.cloud
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ALSA: hda: Add driver properties for cs35l41 for Lenovo Legion Slim 7 Gen 8 serie [+ + +]
Author: Dorian Cruveiller <doriancruveiller@gmail.com>
Date:   Sat Dec 30 12:43:12 2023 +0100

    ALSA: hda: Add driver properties for cs35l41 for Lenovo Legion Slim 7 Gen 8 serie
    
    commit ba7053b4b4a4ddcf530fa2b897e697004715d086 upstream.
    
    Add driver properties on 4 models of this laptop serie since they don't
    have _DSD in the ACPI table
    
    Signed-off-by: Dorian Cruveiller <doriancruveiller@gmail.com>
    Cc: <stable@vger.kernel.org> # v6.7
    Link: https://lore.kernel.org/r/20231230114312.22118-1-doriancruveiller@gmail.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ALSA: hda: cs35l41: Prevent firmware load if SPI speed too low [+ + +]
Author: Stefan Binding <sbinding@opensource.cirrus.com>
Date:   Thu Dec 21 13:25:17 2023 +0000

    ALSA: hda: cs35l41: Prevent firmware load if SPI speed too low
    
    commit d110858a6925827609d11db8513d76750483ec06 upstream.
    
    Some laptops without _DSD have the SPI speed set very low in the BIOS.
    Since the SPI controller uses this speed as its max speed, the SPI
    transactions are very slow. Firmware download writes to many registers,
    and if the SPI speed is too slow, it can take a long time to download.
    For this reason, disable firmware loading if the maximum SPI speed is
    too low. Without Firmware, audio playback will work, but the volume
    will be low to ensure safe operation of the CS35L41.
    
    Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
    Cc: <stable@vger.kernel.org> # v6.7+
    Link: https://lore.kernel.org/r/20231221132518.3213-3-sbinding@opensource.cirrus.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ALSA: hda: cs35l41: Support additional Dell models without _DSD [+ + +]
Author: Stefan Binding <sbinding@opensource.cirrus.com>
Date:   Thu Dec 21 13:25:16 2023 +0000

    ALSA: hda: cs35l41: Support additional Dell models without _DSD
    
    commit ee694e7db47e1af00ffb29f569904a9ed576868f upstream.
    
    Add new model entries into configuration table.
    
    Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
    Cc: <stable@vger.kernel.org> # v6.7+
    Link: https://lore.kernel.org/r/20231221132518.3213-2-sbinding@opensource.cirrus.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ALSA: hda: cs35l41: Support more HP models without _DSD [+ + +]
Author: Lorenz Brun <lorenz@brun.one>
Date:   Tue Jan 2 22:48:20 2024 +0100

    ALSA: hda: cs35l41: Support more HP models without _DSD
    
    commit 7d65d70161ef75a3991480c91668ac11acedf211 upstream.
    
    This adds overrides for a series of notebooks using a common config
    taken from HP's proprietary Windows driver.
    
    This has been tested on a HP 15-ey0xxxx device (subsystem 103C8A31)
    together with another Realtek quirk and the calibration files from the
    proprietary driver.
    
    Signed-off-by: Lorenz Brun <lorenz@brun.one>
    Cc: <stable@vger.kernel.org> # v6.7
    Link: https://lore.kernel.org/r/20240102214821.3394810-1-lorenz@brun.one
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
binder: fix comment on binder_alloc_new_buf() return value [+ + +]
Author: Carlos Llamas <cmllamas@google.com>
Date:   Fri Dec 1 17:21:36 2023 +0000

    binder: fix comment on binder_alloc_new_buf() return value
    
    commit e1090371e02b601cbfcea175c2a6cc7c955fa830 upstream.
    
    Update the comments of binder_alloc_new_buf() to reflect that the return
    value of the function is now ERR_PTR(-errno) on failure.
    
    No functional changes in this patch.
    
    Cc: stable@vger.kernel.org
    Fixes: 57ada2fb2250 ("binder: add log information for binder transaction failures")
    Reviewed-by: Alice Ryhl <aliceryhl@google.com>
    Signed-off-by: Carlos Llamas <cmllamas@google.com>
    Link: https://lore.kernel.org/r/20231201172212.1813387-8-cmllamas@google.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

binder: fix trivial typo of binder_free_buf_locked() [+ + +]
Author: Carlos Llamas <cmllamas@google.com>
Date:   Fri Dec 1 17:21:35 2023 +0000

    binder: fix trivial typo of binder_free_buf_locked()
    
    commit 122a3c1cb0ff304c2b8934584fcfea4edb2fe5e3 upstream.
    
    Fix minor misspelling of the function in the comment section.
    
    No functional changes in this patch.
    
    Cc: stable@vger.kernel.org
    Fixes: 0f966cba95c7 ("binder: add flag to clear buffer on txn complete")
    Reviewed-by: Alice Ryhl <aliceryhl@google.com>
    Signed-off-by: Carlos Llamas <cmllamas@google.com>
    Link: https://lore.kernel.org/r/20231201172212.1813387-7-cmllamas@google.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

binder: fix use-after-free in shinker's callback [+ + +]
Author: Carlos Llamas <cmllamas@google.com>
Date:   Fri Dec 1 17:21:31 2023 +0000

    binder: fix use-after-free in shinker's callback
    
    commit 3f489c2067c5824528212b0fc18b28d51332d906 upstream.
    
    The mmap read lock is used during the shrinker's callback, which means
    that using alloc->vma pointer isn't safe as it can race with munmap().
    As of commit dd2283f2605e ("mm: mmap: zap pages with read mmap_sem in
    munmap") the mmap lock is downgraded after the vma has been isolated.
    
    I was able to reproduce this issue by manually adding some delays and
    triggering page reclaiming through the shrinker's debug sysfs. The
    following KASAN report confirms the UAF:
    
      ==================================================================
      BUG: KASAN: slab-use-after-free in zap_page_range_single+0x470/0x4b8
      Read of size 8 at addr ffff356ed50e50f0 by task bash/478
    
      CPU: 1 PID: 478 Comm: bash Not tainted 6.6.0-rc5-00055-g1c8b86a3799f-dirty #70
      Hardware name: linux,dummy-virt (DT)
      Call trace:
       zap_page_range_single+0x470/0x4b8
       binder_alloc_free_page+0x608/0xadc
       __list_lru_walk_one+0x130/0x3b0
       list_lru_walk_node+0xc4/0x22c
       binder_shrink_scan+0x108/0x1dc
       shrinker_debugfs_scan_write+0x2b4/0x500
       full_proxy_write+0xd4/0x140
       vfs_write+0x1ac/0x758
       ksys_write+0xf0/0x1dc
       __arm64_sys_write+0x6c/0x9c
    
      Allocated by task 492:
       kmem_cache_alloc+0x130/0x368
       vm_area_alloc+0x2c/0x190
       mmap_region+0x258/0x18bc
       do_mmap+0x694/0xa60
       vm_mmap_pgoff+0x170/0x29c
       ksys_mmap_pgoff+0x290/0x3a0
       __arm64_sys_mmap+0xcc/0x144
    
      Freed by task 491:
       kmem_cache_free+0x17c/0x3c8
       vm_area_free_rcu_cb+0x74/0x98
       rcu_core+0xa38/0x26d4
       rcu_core_si+0x10/0x1c
       __do_softirq+0x2fc/0xd24
    
      Last potentially related work creation:
       __call_rcu_common.constprop.0+0x6c/0xba0
       call_rcu+0x10/0x1c
       vm_area_free+0x18/0x24
       remove_vma+0xe4/0x118
       do_vmi_align_munmap.isra.0+0x718/0xb5c
       do_vmi_munmap+0xdc/0x1fc
       __vm_munmap+0x10c/0x278
       __arm64_sys_munmap+0x58/0x7c
    
    Fix this issue by performing instead a vma_lookup() which will fail to
    find the vma that was isolated before the mmap lock downgrade. Note that
    this option has better performance than upgrading to a mmap write lock
    which would increase contention. Plus, mmap_write_trylock() has been
    recently removed anyway.
    
    Fixes: dd2283f2605e ("mm: mmap: zap pages with read mmap_sem in munmap")
    Cc: stable@vger.kernel.org
    Cc: Liam Howlett <liam.howlett@oracle.com>
    Cc: Minchan Kim <minchan@kernel.org>
    Reviewed-by: Alice Ryhl <aliceryhl@google.com>
    Signed-off-by: Carlos Llamas <cmllamas@google.com>
    Link: https://lore.kernel.org/r/20231201172212.1813387-3-cmllamas@google.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

binder: use EPOLLERR from eventpoll.h [+ + +]
Author: Carlos Llamas <cmllamas@google.com>
Date:   Fri Dec 1 17:21:30 2023 +0000

    binder: use EPOLLERR from eventpoll.h
    
    commit 6ac061db9c58ca5b9270b1b3940d2464fb3ff183 upstream.
    
    Use EPOLLERR instead of POLLERR to make sure it is cast to the correct
    __poll_t type. This fixes the following sparse issue:
    
      drivers/android/binder.c:5030:24: warning: incorrect type in return expression (different base types)
      drivers/android/binder.c:5030:24:    expected restricted __poll_t
      drivers/android/binder.c:5030:24:    got int
    
    Fixes: f88982679f54 ("binder: check for binder_thread allocation failure in binder_poll()")
    Cc: stable@vger.kernel.org
    Cc: Eric Biggers <ebiggers@google.com>
    Reviewed-by: Alice Ryhl <aliceryhl@google.com>
    Signed-off-by: Carlos Llamas <cmllamas@google.com>
    Link: https://lore.kernel.org/r/20231201172212.1813387-2-cmllamas@google.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
bus: moxtet: Add spi device table [+ + +]
Author: Sjoerd Simons <sjoerd@collabora.com>
Date:   Tue Nov 28 22:35:05 2023 +0100

    bus: moxtet: Add spi device table
    
    commit aaafe88d5500ba18b33be72458439367ef878788 upstream.
    
    The moxtet module fails to auto-load on. Add a SPI id table to
    allow it to do so.
    
    Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
    Cc:  <stable@vger.kernel.org>
    Reviewed-by: Marek Behún <kabel@kernel.org>
    Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

bus: moxtet: Mark the irq as shared [+ + +]
Author: Sjoerd Simons <sjoerd@collabora.com>
Date:   Tue Nov 28 22:35:04 2023 +0100

    bus: moxtet: Mark the irq as shared
    
    commit e7830f5a83e96d8cb8efc0412902a03008f8fbe3 upstream.
    
    The Turris Mox shares the moxtet IRQ with various devices on the board,
    so mark the IRQ as shared in the driver as well.
    
    Without this loading the module will fail with:
      genirq: Flags mismatch irq 40. 00002002 (moxtet) vs. 00002080 (mcp7940x)
    
    Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
    Cc:  <stable@vger.kernel.org> # v6.2+
    Reviewed-by: Marek Behún <kabel@kernel.org>
    Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
coresight: etm4x: Fix width of CCITMIN field [+ + +]
Author: James Clark <james.clark@arm.com>
Date:   Wed Nov 1 11:52:06 2023 +0000

    coresight: etm4x: Fix width of CCITMIN field
    
    commit cc0271a339cc70cae914c3ec20edc2a8058407da upstream.
    
    CCITMIN is a 12 bit field and doesn't fit in a u8, so extend it to u16.
    This probably wasn't an issue previously because values higher than 255
    never occurred.
    
    But since commit 4aff040bcc8d ("coresight: etm: Override TRCIDR3.CCITMIN
    on errata affected cpus"), a comparison with 256 was done to enable the
    errata, generating the following W=1 build error:
    
      coresight-etm4x-core.c:1188:24: error: result of comparison of
      constant 256 with expression of type 'u8' (aka 'unsigned char') is
      always false [-Werror,-Wtautological-constant-out-of-range-compare]
    
       if (drvdata->ccitmin == 256)
    
    Cc: stable@vger.kernel.org
    Fixes: 2e1cdfe184b5 ("coresight-etm4x: Adding CoreSight ETM4x driver")
    Reported-by: kernel test robot <lkp@intel.com>
    Closes: https://lore.kernel.org/oe-kbuild-all/202310302043.as36UFED-lkp@intel.com/
    Reviewed-by: Mike Leach <mike.leach@linaro.org>
    Signed-off-by: James Clark <james.clark@arm.com>
    Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
    Link: https://lore.kernel.org/r/20231101115206.70810-1-james.clark@arm.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
docs: kernel_feat.py: fix potential command injection [+ + +]
Author: Vegard Nossum <vegard.nossum@oracle.com>
Date:   Wed Jan 10 18:47:58 2024 +0100

    docs: kernel_feat.py: fix potential command injection
    
    commit c48a7c44a1d02516309015b6134c9bb982e17008 upstream.
    
    The kernel-feat directive passes its argument straight to the shell.
    This is unfortunate and unnecessary.
    
    Let's always use paths relative to $srctree/Documentation/ and use
    subprocess.check_call() instead of subprocess.Popen(shell=True).
    
    This also makes the code shorter.
    
    This is analogous to commit 3231dd586277 ("docs: kernel_abi.py: fix
    command injection") where we did exactly the same thing for
    kernel_abi.py, somehow I completely missed this one.
    
    Link: https://fosstodon.org/@jani/111676532203641247
    Reported-by: Jani Nikula <jani.nikula@intel.com>
    Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Jonathan Corbet <corbet@lwn.net>
    Link: https://lore.kernel.org/r/20240110174758.3680506-1-vegard.nossum@oracle.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/amd/display: Pass pwrseq inst for backlight and ABM [+ + +]
Author: Lewis Huang <lewis.huang@amd.com>
Date:   Fri Dec 1 06:25:02 2023 -0700

    drm/amd/display: Pass pwrseq inst for backlight and ABM
    
    commit b17ef04bf3a4346d66404454d6a646343ddc9749 upstream.
    
    [Why]
    OTG inst and pwrseq inst mapping is not align therefore we cannot use
    otg_inst as pwrseq inst to get DCIO register.
    
    [How]
    1. Pass the correct pwrseq instance to dmub when set abm pipe.
    2. LVTMA control index change from panel_inst to pwrseq_inst.
    
    Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
    Reviewed-by: Phil Hsieh <phil.hsieh@amd.com>
    Acked-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
    Signed-off-by: Lewis Huang <lewis.huang@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
f2fs: explicitly null-terminate the xattr list [+ + +]
Author: Eric Biggers <ebiggers@google.com>
Date:   Mon Nov 6 20:44:34 2023 -0800

    f2fs: explicitly null-terminate the xattr list
    
    commit e26b6d39270f5eab0087453d9b544189a38c8564 upstream.
    
    When setting an xattr, explicitly null-terminate the xattr list.  This
    eliminates the fragile assumption that the unused xattr space is always
    zeroed.
    
    Signed-off-by: Eric Biggers <ebiggers@google.com>
    Reviewed-by: Chao Yu <chao@kernel.org>
    Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
ksmbd: don't allow O_TRUNC open on read-only share [+ + +]
Author: Namjae Jeon <linkinjeon@kernel.org>
Date:   Sun Jan 7 21:24:07 2024 +0900

    ksmbd: don't allow O_TRUNC open on read-only share
    
    commit d592a9158a112d419f341f035d18d02f8d232def upstream.
    
    When file is changed using notepad on read-only share(read_only = yes in
    ksmbd.conf), There is a problem where existing data is truncated.
    notepad in windows try to O_TRUNC open(FILE_OVERWRITE_IF) and all data
    in file is truncated. This patch don't allow  O_TRUNC open on read-only
    share and add KSMBD_TREE_CONN_FLAG_WRITABLE check in smb2_set_info().
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ksmbd: free ppace array on error in parse_dacl [+ + +]
Author: Fedor Pchelkin <pchelkin@ispras.ru>
Date:   Tue Jan 9 17:14:44 2024 +0300

    ksmbd: free ppace array on error in parse_dacl
    
    commit 8cf9bedfc3c47d24bb0de386f808f925dc52863e upstream.
    
    The ppace array is not freed if one of the init_acl_state() calls inside
    parse_dacl() fails. At the moment the function may fail only due to the
    memory allocation errors so it's highly unlikely in this case but
    nevertheless a fix is needed.
    
    Move ppace allocation after the init_acl_state() calls with proper error
    handling.
    
    Found by Linux Verification Center (linuxtesting.org).
    
    Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
    Cc: stable@vger.kernel.org
    Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
    Acked-by: Namjae Jeon <linkinjeon@kernel.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
leds: ledtrig-tty: Free allocated ttyname buffer on deactivate [+ + +]
Author: Florian Eckert <fe@dev.tdt.de>
Date:   Mon Nov 27 09:16:21 2023 +0100

    leds: ledtrig-tty: Free allocated ttyname buffer on deactivate
    
    commit 25054b232681c286fca9c678854f56494d1352cc upstream.
    
    The ttyname buffer for the ledtrig_tty_data struct is allocated in the
    sysfs ttyname_store() function. This buffer must be released on trigger
    deactivation. This was missing and is thus a memory leak.
    
    While we are at it, the TTY handler in the ledtrig_tty_data struct should
    also be returned in case of the trigger deactivation call.
    
    Cc: stable@vger.kernel.org
    Fixes: fd4a641ac88f ("leds: trigger: implement a tty trigger")
    Signed-off-by: Florian Eckert <fe@dev.tdt.de>
    Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Link: https://lore.kernel.org/r/20231127081621.774866-1-fe@dev.tdt.de
    Signed-off-by: Lee Jones <lee@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Linux: Linux 6.7.1 [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Sat Jan 20 11:53:02 2024 +0100

    Linux 6.7.1
    
    Link: https://lore.kernel.org/r/20240118104301.249503558@linuxfoundation.org
    Tested-by: Ronald Warsow <rwarsow@gmx.de>
    Tested-by: Allen Pais <apais@linux.microsoft.com>
    Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
    Tested-by: SeongJae Park <sj@kernel.org>
    Tested-by: Shuah Khan <skhan@linuxfoundation.org>
    Tested-by: Ron Economos <re@w6rz.net>
    Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
    Tested-by: Ricardo B. Marliere <ricardo@marliere.net>
    Tested-by: Jon Hunter <jonathanh@nvidia.com>
    Tested-by: Luna Jernberg <droidbittin@gmail.com>
    Tested-by: Justin M. Forbes <jforbes@fedoraproject.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
mm/memory_hotplug: fix memmap_on_memory sysfs value retrieval [+ + +]
Author: Sumanth Korikkar <sumanthk@linux.ibm.com>
Date:   Wed Jan 10 15:01:27 2024 +0100

    mm/memory_hotplug: fix memmap_on_memory sysfs value retrieval
    
    commit 11684134140bb708b6e6de969a060535630b1b53 upstream.
    
    set_memmap_mode() stores the kernel parameter memmap mode as an integer.
    However, the get_memmap_mode() function utilizes param_get_bool() to fetch
    the value as a boolean, leading to potential endianness issue.  On
    Big-endian architectures, the memmap_on_memory is consistently displayed
    as 'N' regardless of its actual status.
    
    To address this endianness problem, the solution involves obtaining the
    mode as an integer.  This adjustment ensures the proper display of the
    memmap_on_memory parameter, presenting it as one of the following options:
    Force, Y, or N.
    
    Link: https://lkml.kernel.org/r/20240110140127.241451-1-sumanthk@linux.ibm.com
    Fixes: 2d1f649c7c08 ("mm/memory_hotplug: support memmap_on_memory when memmap is not aligned to pageblocks")
    Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
    Suggested-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
    Acked-by: David Hildenbrand <david@redhat.com>
    Cc: Alexander Gordeev <agordeev@linux.ibm.com>
    Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
    Cc: Heiko Carstens <hca@linux.ibm.com>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: Oscar Salvador <osalvador@suse.de>
    Cc: Vasily Gorbik <gor@linux.ibm.com>
    Cc: <stable@vger.kernel.org>    [6.6+]
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
parport: parport_serial: Add Brainboxes BAR details [+ + +]
Author: Cameron Williams <cang1@live.co.uk>
Date:   Thu Nov 2 21:07:05 2023 +0000

    parport: parport_serial: Add Brainboxes BAR details
    
    commit 65fde134b0a4ffe838729f9ee11b459a2f6f2815 upstream.
    
    Add BAR/enum entries for Brainboxes serial/parallel cards.
    
    Cc:  <stable@vger.kernel.org>
    Signed-off-by: Cameron Williams <cang1@live.co.uk>
    Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
    Link: https://lore.kernel.org/r/AS4PR02MB79035155C2D5C3333AE6FA52C4A6A@AS4PR02MB7903.eurprd02.prod.outlook.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

parport: parport_serial: Add Brainboxes device IDs and geometry [+ + +]
Author: Cameron Williams <cang1@live.co.uk>
Date:   Thu Nov 2 21:07:06 2023 +0000

    parport: parport_serial: Add Brainboxes device IDs and geometry
    
    commit 6aa1fc5a8085bbc01687aa708dcf2dbe637a5ee3 upstream.
    
    Add device IDs for the Brainboxes UC-203, UC-257, UC-414, UC-475,
    IS-300/IS-500 and PX-263/PX-295 and define the relevant "geometry"
    for the cards.
    This patch requires part 1 of this series.
    
    Cc:  <stable@vger.kernel.org>
    Signed-off-by: Cameron Williams <cang1@live.co.uk>
    Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
    Link: https://lore.kernel.org/r/AS4PR02MB7903A4094564BE28F1F926A6C4A6A@AS4PR02MB7903.eurprd02.prod.outlook.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
PCI: Add ACS quirk for more Zhaoxin Root Ports [+ + +]
Author: LeoLiuoc <LeoLiu-oc@zhaoxin.com>
Date:   Mon Dec 11 17:15:43 2023 +0800

    PCI: Add ACS quirk for more Zhaoxin Root Ports
    
    commit e367e3c765f5477b2e79da0f1399aed49e2d1e37 upstream.
    
    Add more Root Port Device IDs to pci_quirk_zhaoxin_pcie_ports_acs() for
    some new Zhaoxin platforms.
    
    Fixes: 299bd044a6f3 ("PCI: Add ACS quirk for Zhaoxin Root/Downstream Ports")
    Link: https://lore.kernel.org/r/20231211091543.735903-1-LeoLiu-oc@zhaoxin.com
    Signed-off-by: LeoLiuoc <LeoLiu-oc@zhaoxin.com>
    [bhelgaas: update subject, drop changelog, add Fixes, add stable tag, fix
    whitespace, wrap code comment]
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Cc: <stable@vger.kernel.org>    # 5.7
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Revert "md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d" [+ + +]
Author: Junxiao Bi <junxiao.bi@oracle.com>
Date:   Wed Nov 8 10:22:16 2023 -0800

    Revert "md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d"
    
    commit bed9e27baf52a09b7ba2a3714f1e24e17ced386d upstream.
    
    This reverts commit 5e2cf333b7bd5d3e62595a44d598a254c697cd74.
    
    That commit introduced the following race and can cause system hung.
    
     md_write_start:             raid5d:
     // mddev->in_sync == 1
     set "MD_SB_CHANGE_PENDING"
                                // running before md_write_start wakeup it
                                 waiting "MD_SB_CHANGE_PENDING" cleared
                                 >>>>>>>>> hung
     wakeup mddev->thread
     ...
     waiting "MD_SB_CHANGE_PENDING" cleared
     >>>> hung, raid5d should clear this flag
     but get hung by same flag.
    
    The issue reverted commit fixing is fixed by last patch in a new way.
    
    Fixes: 5e2cf333b7bd ("md/raid5: Wait for MD_SB_CHANGE_PENDING in raid5d")
    Cc: stable@vger.kernel.org # v5.19+
    Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
    Reviewed-by: Yu Kuai <yukuai3@huawei.com>
    Signed-off-by: Song Liu <song@kernel.org>
    Link: https://lore.kernel.org/r/20231108182216.73611-2-junxiao.bi@oracle.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
scripts/decode_stacktrace.sh: optionally use LLVM utilities [+ + +]
Author: Carlos Llamas <cmllamas@google.com>
Date:   Fri Sep 29 03:48:17 2023 +0000

    scripts/decode_stacktrace.sh: optionally use LLVM utilities
    
    commit efbd6398353315b7018e6943e41fee9ec35e875f upstream.
    
    GNU's addr2line can have problems parsing a vmlinux built with LLVM,
    particularly when LTO was used.  In order to decode the traces correctly
    this patch adds the ability to switch to LLVM's utilities readelf and
    addr2line.  The same approach is followed by Will in [1].
    
    Before:
      $ scripts/decode_stacktrace.sh vmlinux < kernel.log
      [17716.240635] Call trace:
      [17716.240646] skb_cow_data (??:?)
      [17716.240654] esp6_input (ld-temp.o:?)
      [17716.240666] xfrm_input (ld-temp.o:?)
      [17716.240674] xfrm6_rcv (??:?)
      [...]
    
    After:
      $ LLVM=1 scripts/decode_stacktrace.sh vmlinux < kernel.log
      [17716.240635] Call trace:
      [17716.240646] skb_cow_data (include/linux/skbuff.h:2172 net/core/skbuff.c:4503)
      [17716.240654] esp6_input (net/ipv6/esp6.c:977)
      [17716.240666] xfrm_input (net/xfrm/xfrm_input.c:659)
      [17716.240674] xfrm6_rcv (net/ipv6/xfrm6_input.c:172)
      [...]
    
    Note that one could set CROSS_COMPILE=llvm- instead to hack around this
    issue.  However, doing so can break the decodecode routine as it will
    force the selection of other LLVM utilities down the line e.g.  llvm-as.
    
    [1] https://lore.kernel.org/all/20230914131225.13415-3-will@kernel.org/
    
    Link: https://lkml.kernel.org/r/20230929034836.403735-1-cmllamas@google.com
    Signed-off-by: Carlos Llamas <cmllamas@google.com>
    Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
    Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
    Tested-by: Justin Stitt <justinstitt@google.com>
    Cc: Will Deacon <will@kernel.org>
    Cc: John Stultz <jstultz@google.com>
    Cc: Masahiro Yamada <masahiroy@kernel.org>
    Cc: Nathan Chancellor <nathan@kernel.org>
    Cc: Tom Rix <trix@redhat.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
uio: Fix use-after-free in uio_open [+ + +]
Author: Guanghui Feng <guanghuifeng@linux.alibaba.com>
Date:   Thu Dec 21 17:57:43 2023 +0800

    uio: Fix use-after-free in uio_open
    
    commit 0c9ae0b8605078eafc3bea053cc78791e97ba2e2 upstream.
    
    core-1                          core-2
    -------------------------------------------------------
    uio_unregister_device           uio_open
                                    idev = idr_find()
    device_unregister(&idev->dev)
    put_device(&idev->dev)
    uio_device_release
                                    get_device(&idev->dev)
    kfree(idev)
    uio_free_minor(minor)
                                    uio_release
                                    put_device(&idev->dev)
                                    kfree(idev)
    -------------------------------------------------------
    
    In the core-1 uio_unregister_device(), the device_unregister will kfree
    idev when the idev->dev kobject ref is 1. But after core-1
    device_unregister, put_device and before doing kfree, the core-2 may
    get_device. Then:
    1. After core-1 kfree idev, the core-2 will do use-after-free for idev.
    2. When core-2 do uio_release and put_device, the idev will be double
       freed.
    
    To address this issue, we can get idev atomic & inc idev reference with
    minor_lock.
    
    Fixes: 57c5f4df0a5a ("uio: fix crash after the device is unregistered")
    Cc: stable <stable@kernel.org>
    Signed-off-by: Guanghui Feng <guanghuifeng@linux.alibaba.com>
    Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
    Link: https://lore.kernel.org/r/1703152663-59949-1-git-send-email-guanghuifeng@linux.alibaba.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>