Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aspeed master v6.6 #881

Open
wants to merge 5,767 commits into
base: master
Choose a base branch
from
Open

Aspeed master v6.6 #881

wants to merge 5,767 commits into from
This pull request is big! We’re only showing the most recent 250 commits.

Commits on Mar 6, 2024

  1. tls: fix peeking with sync+async decryption

    [ Upstream commit 6caaf10 ]
    
    If we peek from 2 records with a currently empty rx_list, and the
    first record is decrypted synchronously but the second record is
    decrypted async, the following happens:
      1. decrypt record 1 (sync)
      2. copy from record 1 to the userspace's msg
      3. queue the decrypted record to rx_list for future read(!PEEK)
      4. decrypt record 2 (async)
      5. queue record 2 to rx_list
      6. call process_rx_list to copy data from the 2nd record
    
    We currently pass copied=0 as skip offset to process_rx_list, so we
    end up copying once again from the first record. We should skip over
    the data we've already copied.
    
    Seen with selftest tls.12_aes_gcm.recv_peek_large_buf_mult_recs
    
    Fixes: 692d7b5 ("tls: Fix recvmsg() to be able to peek across multiple records")
    Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
    Link: https://lore.kernel.org/r/1b132d2b2b99296bfde54e8a67672d90d6d16e71.1709132643.git.sd@queasysnail.net
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    qsn authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    11121c2 View commit details
    Browse the repository at this point in the history
  2. tls: separate no-async decryption request handling from async

    [ Upstream commit 41532b7 ]
    
    If we're not doing async, the handling is much simpler. There's no
    reference counting, we just need to wait for the completion to wake us
    up and return its result.
    
    We should preferably also use a separate crypto_wait. I'm not seeing a
    UAF as I did in the past, I think aec7961 ("tls: fix race between
    async notify and socket close") took care of it.
    
    This will make the next fix easier.
    
    Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
    Link: https://lore.kernel.org/r/47bde5f649707610eaef9f0d679519966fc31061.1709132643.git.sd@queasysnail.net
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Stable-dep-of: 13114dc ("tls: fix use-after-free on failed backlog decryption")
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    qsn authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    dec5b6e View commit details
    Browse the repository at this point in the history
  3. tls: fix use-after-free on failed backlog decryption

    [ Upstream commit 13114dc ]
    
    When the decrypt request goes to the backlog and crypto_aead_decrypt
    returns -EBUSY, tls_do_decryption will wait until all async
    decryptions have completed. If one of them fails, tls_do_decryption
    will return -EBADMSG and tls_decrypt_sg jumps to the error path,
    releasing all the pages. But the pages have been passed to the async
    callback, and have already been released by tls_decrypt_done.
    
    The only true async case is when crypto_aead_decrypt returns
     -EINPROGRESS. With -EBUSY, we already waited so we can tell
    tls_sw_recvmsg that the data is available for immediate copy, but we
    need to notify tls_decrypt_sg (via the new ->async_done flag) that the
    memory has already been released.
    
    Fixes: 8590541 ("net: tls: handle backlogging of crypto requests")
    Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
    Link: https://lore.kernel.org/r/4755dd8d9bebdefaa19ce1439b833d6199d4364c.1709132643.git.sd@queasysnail.net
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    qsn authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    81be853 View commit details
    Browse the repository at this point in the history
  4. efi/capsule-loader: fix incorrect allocation size

    [ Upstream commit fccfa64 ]
    
    gcc-14 notices that the allocation with sizeof(void) on 32-bit architectures
    is not enough for a 64-bit phys_addr_t:
    
    drivers/firmware/efi/capsule-loader.c: In function 'efi_capsule_open':
    drivers/firmware/efi/capsule-loader.c:295:24: error: allocation of insufficient size '4' for type 'phys_addr_t' {aka 'long long unsigned int'} with size '8' [-Werror=alloc-size]
      295 |         cap_info->phys = kzalloc(sizeof(void *), GFP_KERNEL);
          |                        ^
    
    Use the correct type instead here.
    
    Fixes: f24c4d4 ("efi/capsule-loader: Reinstate virtual capsule mapping")
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    arndb authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    11aabd7 View commit details
    Browse the repository at this point in the history
  5. power: supply: bq27xxx-i2c: Do not free non existing IRQ

    [ Upstream commit 2df7014 ]
    
    The bq27xxx i2c-client may not have an IRQ, in which case
    client->irq will be 0. bq27xxx_battery_i2c_probe() already has
    an if (client->irq) check wrapping the request_threaded_irq().
    
    But bq27xxx_battery_i2c_remove() unconditionally calls
    free_irq(client->irq) leading to:
    
    [  190.310742] ------------[ cut here ]------------
    [  190.310843] Trying to free already-free IRQ 0
    [  190.310861] WARNING: CPU: 2 PID: 1304 at kernel/irq/manage.c:1893 free_irq+0x1b8/0x310
    
    Followed by a backtrace when unbinding the driver. Add
    an if (client->irq) to bq27xxx_battery_i2c_remove() mirroring
    probe() to fix this.
    
    Fixes: 444ff00 ("power: supply: bq27xxx: Fix I2C IRQ race on remove")
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Link: https://lore.kernel.org/r/20240215155133.70537-1-hdegoede@redhat.com
    Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    jwrdegoede authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    fbca8ba View commit details
    Browse the repository at this point in the history
  6. ASoC: cs35l56: Must clear HALO_STATE before issuing SYSTEM_RESET

    [ Upstream commit e33625c ]
    
    The driver must write 0 to HALO_STATE before sending the SYSTEM_RESET
    command to the firmware.
    
    HALO_STATE is in DSP memory, which is preserved across a soft reset.
    The SYSTEM_RESET command does not change the value of HALO_STATE.
    There is period of time while the CS35L56 is resetting, before the
    firmware has started to boot, where a read of HALO_STATE will return
    the value it had before the SYSTEM_RESET. If the driver does not
    clear HALO_STATE, this would return BOOT_DONE status even though the
    firmware has not booted.
    
    Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
    Fixes: 8a731fd ("ASoC: cs35l56: Move utility functions to shared file")
    Link: https://msgid.link/r/20240216140535.1434933-1-rf@opensource.cirrus.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    rfvirgil authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    4a7f5ef View commit details
    Browse the repository at this point in the history
  7. ALSA: Drop leftover snd-rtctimer stuff from Makefile

    [ Upstream commit 4df4971 ]
    
    We forgot to remove the line for snd-rtctimer from Makefile while
    dropping the functionality.  Get rid of the stale line.
    
    Fixes: 34ce71a ("ALSA: timer: remove legacy rtctimer")
    Link: https://lore.kernel.org/r/20240221092156.28695-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    tiwai authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    ac549de View commit details
    Browse the repository at this point in the history
  8. ASoC: soc.h: convert asoc_xxx() to snd_soc_xxx()

    [ Upstream commit 1d5a2b5 ]
    
    ASoC is using 2 type of prefix (asoc_xxx() vs snd_soc_xxx()), but there
    is no particular reason about that [1].
    To reduce confusing, standarding these to snd_soc_xxx() is sensible.
    
    This patch adds asoc_xxx() macro to keep compatible for a while.
    It will be removed if all drivers were switched to new style.
    
    Link: https://lore.kernel.org/r/87h6td3hus.wl-kuninori.morimoto.gx@renesas.com [1]
    Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Link: https://lore.kernel.org/r/87fs3ks26i.wl-kuninori.morimoto.gx@renesas.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Stable-dep-of: 1382d8b ("ASoC: qcom: Fix uninitialized pointer dmactl")
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    morimoto authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    c92c96c View commit details
    Browse the repository at this point in the history
  9. ASoC: qcom: convert not to use asoc_xxx()

    [ Upstream commit 9b1a2df ]
    
    ASoC is now unified asoc_xxx() into snd_soc_xxx().
    This patch convert asoc_xxx() to snd_soc_xxx().
    
    Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
    Link: https://lore.kernel.org/r/87v8cgqnjc.wl-kuninori.morimoto.gx@renesas.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Stable-dep-of: 1382d8b ("ASoC: qcom: Fix uninitialized pointer dmactl")
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    morimoto authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    841361d View commit details
    Browse the repository at this point in the history
  10. ASoC: qcom: Fix uninitialized pointer dmactl

    [ Upstream commit 1382d8b ]
    
    In the case where __lpass_get_dmactl_handle is called and the driver
    id dai_id is invalid the pointer dmactl is not being assigned a value,
    and dmactl contains a garbage value since it has not been initialized
    and so the null check may not work. Fix this to initialize dmactl to
    NULL. One could argue that modern compilers will set this to zero, but
    it is useful to keep this initialized as per the same way in functions
    __lpass_platform_codec_intf_init and lpass_cdc_dma_daiops_hw_params.
    
    Cleans up clang scan build warning:
    sound/soc/qcom/lpass-cdc-dma.c:275:7: warning: Branch condition
    evaluates to a garbage value [core.uninitialized.Branch]
    
    Fixes: b81af58 ("ASoC: qcom: Add lpass CPU driver for codec dma control")
    Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
    Link: https://msgid.link/r/20240221134804.3475989-1-colin.i.king@gmail.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ColinIanKing authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    99adc8b View commit details
    Browse the repository at this point in the history
  11. riscv: Fix build error if !CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION

    [ Upstream commit fc325b1 ]
    
    The new riscv specific arch_hugetlb_migration_supported() must be
    guarded with a #ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION to avoid
    the following build error:
    
    In file included from include/linux/hugetlb.h:851,
                        from kernel/fork.c:52:
    >> arch/riscv/include/asm/hugetlb.h:15:42: error: static declaration of 'arch_hugetlb_migration_supported' follows non-static declaration
          15 | #define arch_hugetlb_migration_supported arch_hugetlb_migration_supported
             |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       include/linux/hugetlb.h:916:20: note: in expansion of macro 'arch_hugetlb_migration_supported'
         916 | static inline bool arch_hugetlb_migration_supported(struct hstate *h)
             |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       arch/riscv/include/asm/hugetlb.h:14:6: note: previous declaration of 'arch_hugetlb_migration_supported' with type 'bool(struct hstate *)' {aka '_Bool(struct hstate *)'}
          14 | bool arch_hugetlb_migration_supported(struct hstate *h);
             |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Reported-by: kernel test robot <lkp@intel.com>
    Closes: https://lore.kernel.org/oe-kbuild-all/202402110258.CV51JlEI-lkp@intel.com/
    Fixes: ce68c03 ("riscv: Fix arch_hugetlb_migration_supported() for NAPOT")
    Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
    Link: https://lore.kernel.org/r/20240211083640.756583-1-alexghiti@rivosinc.com
    Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Alexandre Ghiti authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    cc698db View commit details
    Browse the repository at this point in the history
  12. ASoC: cs35l56: cs35l56_component_remove() must clear cs35l56->component

    [ Upstream commit ae861c4 ]
    
    The cs35l56->component pointer is used by the suspend-resume handling to
    know whether the driver is fully instantiated. This is to prevent it
    queuing dsp_work which would result in calling wm_adsp when the driver
    is not an instantiated ASoC component. So this pointer must be cleared
    by cs35l56_component_remove().
    
    Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
    Fixes: e496112 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56")
    Link: https://msgid.link/r/20240129162737.497-4-rf@opensource.cirrus.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    rfvirgil authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    93fc01f View commit details
    Browse the repository at this point in the history
  13. ASoC: cs35l56: cs35l56_component_remove() must clean up wm_adsp

    [ Upstream commit cd38ccb ]
    
    cs35l56_component_remove() must call wm_adsp_power_down() and
    wm_adsp2_component_remove().
    
    Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
    Fixes: e496112 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56")
    Link: https://msgid.link/r/20240129162737.497-5-rf@opensource.cirrus.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    rfvirgil authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    a2f0a68 View commit details
    Browse the repository at this point in the history
  14. ASoC: cs35l56: Don't add the same register patch multiple times

    [ Upstream commit 07687cd ]
    
    Move the call to cs35l56_set_patch() earlier in cs35l56_init() so
    that it only adds the register patch on first-time initialization.
    
    The call was after the post_soft_reset label, so every time this
    function was run to re-initialize the hardware after a reset it would
    call regmap_register_patch() and add the same reg_sequence again.
    
    Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
    Fixes: 898673b ("ASoC: cs35l56: Move shared data into a common data structure")
    Link: https://msgid.link/r/20240129162737.497-6-rf@opensource.cirrus.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    rfvirgil authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    044edc1 View commit details
    Browse the repository at this point in the history
  15. ASoC: cs35l56: Fix for initializing ASP1 mixer registers

    [ Upstream commit 07f7d6e ]
    
    Defer initializing the state of the ASP1 mixer registers until
    the firmware has been downloaded and rebooted.
    
    On a SoundWire system the ASP is free for use as a chip-to-chip
    interconnect. This can be either for the firmware on multiple
    CS35L56 to share reference audio; or as a bridge to another
    device. If it is a firmware interconnect it is owned by the
    firmware and the Linux driver should avoid writing the registers.
    However, if it is a bridge then Linux may take over and handle
    it as a normal codec-to-codec link. Even if the ASP is used
    as a firmware-firmware interconnect it is useful to have
    ALSA controls for the ASP mixer. They are at least useful for
    debugging.
    
    CS35L56 is designed for SDCA and a generic SDCA driver would
    know nothing about these chip-specific registers. So if the
    ASP is being used on a SoundWire system the firmware sets up the
    ASP mixer registers. This means that we can't assume the default
    state of these registers. But we don't know the initial state
    that the firmware set them to until after the firmware has been
    downloaded and booted, which can take several seconds when
    downloading multiple amps.
    
    DAPM normally reads the initial state of mux registers during
    probe() but this would mean blocking probe() for several seconds
    until the firmware has initialized them. To avoid this, the
    mixer muxes are set SND_SOC_NOPM to prevent DAPM trying to read
    the register state. Custom get/set callbacks are implemented for
    ALSA control access, and these can safely block waiting for the
    firmware download.
    
    After the firmware download has completed, the state of the
    mux registers is known so a work job is queued to call
    snd_soc_dapm_mux_update_power() on each of the mux widgets.
    
    Backport note:
    This won't apply cleanly to kernels older than v6.6.
    
    Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
    Fixes: e496112 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56")
    Link: https://msgid.link/r/20240129162737.497-11-rf@opensource.cirrus.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    rfvirgil authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    c249f04 View commit details
    Browse the repository at this point in the history
  16. ASoC: cs35l56: Fix misuse of wm_adsp 'part' string for silicon revision

    [ Upstream commit f6c9679 ]
    
    Put the silicon revision and secured flag in the wm_adsp fwf_name
    string instead of including them in the part string.
    
    This changes the format of the firmware name string from
    
     cs35l56[s]-rev-misc[-system_name]
    
    to
     cs35l56-rev[-s]-misc[-system_name]
    
    No firmware files have been published, so this doesn't cause a
    compatibility break.
    
    Silicon revision and secured flag are included in the firmware
    filename to pick a firmware compatible with the part. These strings
    were being added to the part string, but that is a misuse of the
    string. The correct place for these is the fwf_name string, which
    is specifically intended to select between multiple firmware files
    for the same part.
    
    Backport note:
    This won't apply to kernels older than v6.6.
    
    Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
    Fixes: 608f1b0 ("ASoC: cs35l56: Move DSP part string generation so that it is done only once")
    Link: https://msgid.link/r/20240129162737.497-12-rf@opensource.cirrus.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    rfvirgil authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    9f05fe5 View commit details
    Browse the repository at this point in the history
  17. ASoC: cs35l56: Fix deadlock in ASP1 mixer register initialization

    [ Upstream commit c14f09f ]
    
    Rewrite the handling of ASP1 TX mixer mux initialization to prevent a
    deadlock during component_remove().
    
    The firmware can overwrite the ASP1 TX mixer registers with
    system-specific settings. This is mainly for hardware that uses the
    ASP as a chip-to-chip link controlled by the firmware. Because of this
    the driver cannot know the starting state of the ASP1 mixer muxes until
    the firmware has been downloaded and rebooted.
    
    The original workaround for this was to queue a work function from the
    dsp_work() job. This work then read the register values (populating the
    regmap cache the first time around) and then called
    snd_soc_dapm_mux_update_power(). The problem with this is that it was
    ultimately triggered by cs35l56_component_probe() queueing dsp_work,
    which meant that it would be running in parallel with the rest of the
    ASoC component and card initialization. To prevent accessing DAPM before
    it was fully initialized the work function took the card mutex. But this
    would deadlock if cs35l56_component_remove() was called before the work job
    had completed, because ASoC calls component_remove() with the card mutex
    held.
    
    This new version removes the work function. Instead the regmap cache and
    DAPM mux widgets are initialized the first time any of the associated ALSA
    controls is read or written.
    
    Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
    Fixes: 07f7d6e ("ASoC: cs35l56: Fix for initializing ASP1 mixer registers")
    Link: https://lore.kernel.org/r/20240208123742.1278104-1-rf@opensource.cirrus.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    rfvirgil authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    4b5d89a View commit details
    Browse the repository at this point in the history
  18. ASoC: soc-card: Fix missing locking in snd_soc_card_get_kcontrol()

    [ Upstream commit eba2eb2 ]
    
    snd_soc_card_get_kcontrol() must be holding a read lock on
    card->controls_rwsem while walking the controls list.
    
    Compare with snd_ctl_find_numid().
    
    The existing function is renamed snd_soc_card_get_kcontrol_locked()
    so that it can be called from contexts that are already holding
    card->controls_rwsem (for example, control get/put functions).
    
    There are few direct or indirect callers of
    snd_soc_card_get_kcontrol(), and most are safe. Three require
    changes, which have been included in this patch:
    
    codecs/cs35l45.c:
      cs35l45_activate_ctl() is called from a control put() function so
      is changed to call snd_soc_card_get_kcontrol_locked().
    
    codecs/cs35l56.c:
      cs35l56_sync_asp1_mixer_widgets_with_firmware() is called from
      control get()/put() functions so is changed to call
      snd_soc_card_get_kcontrol_locked().
    
    fsl/fsl_xcvr.c:
      fsl_xcvr_activate_ctl() is called from three places, one of which
      already holds card->controls_rwsem:
      1. fsl_xcvr_mode_put(), a control put function, which will
         already be holding card->controls_rwsem.
      2. fsl_xcvr_startup(), a DAI startup function.
      3. fsl_xcvr_shutdown(), a DAI shutdown function.
    
      To fix this, fsl_xcvr_activate_ctl() has been changed to call
      snd_soc_card_get_kcontrol_locked() so that it is safe to call
      directly from fsl_xcvr_mode_put().
      The fsl_xcvr_startup() and fsl_xcvr_shutdown() functions have been
      changed to take a read lock on card->controls_rsem() around calls
      to fsl_xcvr_activate_ctl(). While this is not very elegant, it
      keeps the change small, to avoid this patch creating a large
      collateral churn in fsl/fsl_xcvr.c.
    
    Analysis of other callers of snd_soc_card_get_kcontrol() is that
    they do not need any changes, they are not holding card->controls_rwsem
    when they call snd_soc_card_get_kcontrol().
    
    Direct callers of snd_soc_card_get_kcontrol():
      fsl/fsl_spdif.c: fsl_spdif_dai_probe() - DAI probe function
      fsl/fsl_micfil.c: voice_detected_fn() - IRQ handler
    
    Indirect callers via soc_component_notify_control():
      codecs/cs42l43: cs42l43_mic_shutter() - IRQ handler
      codecs/cs42l43: cs42l43_spk_shutter() - IRQ handler
      codecs/ak4118.c: ak4118_irq_handler() - IRQ handler
      codecs/wm_adsp.c: wm_adsp_write_ctl() - not currently used
    
    Indirect callers via snd_soc_limit_volume():
      qcom/sc8280xp.c: sc8280xp_snd_init() - DAIlink init function
      ti/rx51.c: rx51_aic34_init() - DAI init function
    
    I don't have hardware to test the fsl/*, qcom/sc828xp.c, ti/rx51.c
    and ak4118.c changes.
    
    Backport note:
    The fsl/, qcom/, cs35l45, cs35l56 and cs42l43 callers were added
    since the Fixes commit so won't all be present on older kernels.
    
    Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
    Fixes: 209c6cd ("ASoC: soc-card: move snd_soc_card_get_kcontrol() to soc-card")
    Link: https://lore.kernel.org/r/20240221123710.690224-1-rf@opensource.cirrus.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    rfvirgil authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    fb3618f View commit details
    Browse the repository at this point in the history
  19. RISC-V: Ignore V from the riscv,isa DT property on older T-Head CPUs

    [ Upstream commit d82f322 ]
    
    Before attempting to support the pre-ratification version of vector
    found on older T-Head CPUs, disallow "v" in riscv,isa on these
    platforms. The deprecated property has no clear way to communicate
    the specific version of vector that is supported and much of the vendor
    provided software puts "v" in the isa string. riscv,isa-extensions
    should be used instead. This should not be too much of a burden for
    these systems, as the vendor shipped devicetrees and firmware do not
    work with a mainline kernel and will require updating.
    
    We can limit this restriction to only ignore v in riscv,isa on CPUs
    that report T-Head's vendor ID and a zero marchid. Newer T-Head CPUs
    that support the ratified version of vector should report non-zero
    marchid, according to Guo Ren [1].
    
    Link: https://lore.kernel.org/linux-riscv/CAJF2gTRy5eK73=d6s7CVy9m9pB8p4rAoMHM3cZFwzg=AuF7TDA@mail.gmail.com/ [1]
    Fixes: dc6667a ("riscv: Extending cpufeature.c to detect V-extension")
    Co-developed-by: Conor Dooley <conor.dooley@microchip.com>
    Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
    Acked-by: Guo Ren <guoren@kernel.org>
    Link: https://lore.kernel.org/r/20240223-tidings-shabby-607f086cb4d7@spud
    Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ConchuOD authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    274bf3c View commit details
    Browse the repository at this point in the history
  20. drm/tegra: Remove existing framebuffer only if we support display

    [ Upstream commit 86bf8cf ]
    
    Tegra DRM doesn't support display on Tegra234 and later, so make sure
    not to remove any existing framebuffers in that case.
    
    v2: - add comments explaining how this situation can come about
        - clear DRIVER_MODESET and DRIVER_ATOMIC feature bits
    
    Fixes: 6848c29 ("drm/aperture: Convert drivers to aperture interfaces")
    Signed-off-by: Thierry Reding <treding@nvidia.com>
    Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
    Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
    Signed-off-by: Robert Foss <rfoss@kernel.org>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240223150333.1401582-1-thierry.reding@gmail.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    thierryreding authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    8e8c66a View commit details
    Browse the repository at this point in the history
  21. fbcon: always restore the old font data in fbcon_do_set_font()

    [ Upstream commit 00d6a28 ]
    
    Commit a5a9230 (fbdev: fbcon: Properly revert changes when
    vc_resize() failed) started restoring old font data upon failure (of
    vc_resize()). But it performs so only for user fonts. It means that the
    "system"/internal fonts are not restored at all. So in result, the very
    first call to fbcon_do_set_font() performs no restore at all upon
    failing vc_resize().
    
    This can be reproduced by Syzkaller to crash the system on the next
    invocation of font_get(). It's rather hard to hit the allocation failure
    in vc_resize() on the first font_set(), but not impossible. Esp. if
    fault injection is used to aid the execution/failure. It was
    demonstrated by Sirius:
      BUG: unable to handle page fault for address: fffffffffffffff8
      #PF: supervisor read access in kernel mode
      #PF: error_code(0x0000) - not-present page
      PGD cb7b067 P4D cb7b067 PUD cb7d067 PMD 0
      Oops: 0000 [#1] PREEMPT SMP KASAN
      CPU: 1 PID: 8007 Comm: poc Not tainted 6.7.0-g9d1694dc91ce torvalds#20
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
      RIP: 0010:fbcon_get_font+0x229/0x800 drivers/video/fbdev/core/fbcon.c:2286
      Call Trace:
       <TASK>
       con_font_get drivers/tty/vt/vt.c:4558 [inline]
       con_font_op+0x1fc/0xf20 drivers/tty/vt/vt.c:4673
       vt_k_ioctl drivers/tty/vt/vt_ioctl.c:474 [inline]
       vt_ioctl+0x632/0x2ec0 drivers/tty/vt/vt_ioctl.c:752
       tty_ioctl+0x6f8/0x1570 drivers/tty/tty_io.c:2803
       vfs_ioctl fs/ioctl.c:51 [inline]
      ...
    
    So restore the font data in any case, not only for user fonts. Note the
    later 'if' is now protected by 'old_userfont' and not 'old_data' as the
    latter is always set now. (And it is supposed to be non-NULL. Otherwise
    we would see the bug above again.)
    
    Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
    Fixes: a5a9230 ("fbdev: fbcon: Properly revert changes when vc_resize() failed")
    Reported-and-tested-by: Ubisectech Sirius <bugreport@ubisectech.com>
    Cc: Ubisectech Sirius <bugreport@ubisectech.com>
    Cc: Daniel Vetter <daniel@ffwll.ch>
    Cc: Helge Deller <deller@gmx.de>
    Cc: linux-fbdev@vger.kernel.org
    Cc: dri-devel@lists.freedesktop.org
    Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240208114411.14604-1-jirislaby@kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Jiri Slaby (SUSE) authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    73a6bd6 View commit details
    Browse the repository at this point in the history
  22. afs: Fix endless loop in directory parsing

    [ Upstream commit 5f7a076 ]
    
    If a directory has a block with only ".__afsXXXX" files in it (from
    uncompleted silly-rename), these .__afsXXXX files are skipped but without
    advancing the file position in the dir_context.  This leads to
    afs_dir_iterate() repeating the block again and again.
    
    Fix this by making the code that skips the .__afsXXXX file also manually
    advance the file position.
    
    The symptoms are a soft lookup:
    
            watchdog: BUG: soft lockup - CPU#3 stuck for 52s! [check:5737]
            ...
            RIP: 0010:afs_dir_iterate_block+0x39/0x1fd
            ...
             ? watchdog_timer_fn+0x1a6/0x213
            ...
             ? asm_sysvec_apic_timer_interrupt+0x16/0x20
             ? afs_dir_iterate_block+0x39/0x1fd
             afs_dir_iterate+0x10a/0x148
             afs_readdir+0x30/0x4a
             iterate_dir+0x93/0xd3
             __do_sys_getdents64+0x6b/0xd4
    
    This is almost certainly the actual fix for:
    
            https://bugzilla.kernel.org/show_bug.cgi?id=218496
    
    Fixes: 57e9d49 ("afs: Hide silly-rename files from userspace")
    Signed-off-by: David Howells <dhowells@redhat.com>
    Link: https://lore.kernel.org/r/786185.1708694102@warthog.procyon.org.uk
    Reviewed-by: Marc Dionne <marc.dionne@auristor.com>
    cc: Marc Dionne <marc.dionne@auristor.com>
    cc: Markus Suvanto <markus.suvanto@gmail.com>
    cc: linux-afs@lists.infradead.org
    Signed-off-by: Christian Brauner <brauner@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    dhowells authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    f678988 View commit details
    Browse the repository at this point in the history
  23. drivers: perf: added capabilities for legacy PMU

    [ Upstream commit 65730fe ]
    
    Added the PERF_PMU_CAP_NO_INTERRUPT flag because the legacy pmu driver
    does not provide sampling capabilities
    
    Added the PERF_PMU_CAP_NO_EXCLUDE flag because the legacy pmu driver
    does not provide the ability to disable counter incrementation in
    different privilege modes
    
    Suggested-by: Atish Patra <atishp@rivosinc.com>
    Signed-off-by: Vadim Shakirov <vadim.shakirov@syntacore.com>
    Reviewed-by: Atish Patra <atishp@rivosinc.com>
    Fixes: 9b3e150 ("RISC-V: Add a simple platform driver for RISC-V  legacy perf")
    Link: https://lore.kernel.org/r/20240227170002.188671-2-vadim.shakirov@syntacore.com
    Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    vdsh-sc authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    2f8c094 View commit details
    Browse the repository at this point in the history
  24. drivers: perf: ctr_get_width function for legacy is not defined

    [ Upstream commit 682dc13 ]
    
    With parameters CONFIG_RISCV_PMU_LEGACY=y and CONFIG_RISCV_PMU_SBI=n
    linux kernel crashes when you try perf record:
    
    $ perf record ls
    [ 46.749286] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
    [ 46.750199] Oops [#1]
    [ 46.750342] Modules linked in:
    [ 46.750608] CPU: 0 PID: 107 Comm: perf-exec Not tainted 6.6.0 #2
    [ 46.750906] Hardware name: riscv-virtio,qemu (DT)
    [ 46.751184] epc : 0x0
    [ 46.751430] ra : arch_perf_update_userpage+0x54/0x13e
    [ 46.751680] epc : 0000000000000000 ra : ffffffff8072ee52 sp : ff2000000022b8f0
    [ 46.751958] gp : ffffffff81505988 tp : ff6000000290d400 t0 : ff2000000022b9c0
    [ 46.752229] t1 : 0000000000000001 t2 : 0000000000000003 s0 : ff2000000022b930
    [ 46.752451] s1 : ff600000028fb000 a0 : 0000000000000000 a1 : ff600000028fb000
    [ 46.752673] a2 : 0000000ae2751268 a3 : 00000000004fb708 a4 : 0000000000000004
    [ 46.752895] a5 : 0000000000000000 a6 : 000000000017ffe3 a7 : 00000000000000d2
    [ 46.753117] s2 : ff600000028fb000 s3 : 0000000ae2751268 s4 : 0000000000000000
    [ 46.753338] s5 : ffffffff8153e290 s6 : ff600000863b9000 s7 : ff60000002961078
    [ 46.753562] s8 : ff60000002961048 s9 : ff60000002961058 s10: 0000000000000001
    [ 46.753783] s11: 0000000000000018 t3 : ffffffffffffffff t4 : ffffffffffffffff
    [ 46.754005] t5 : ff6000000292270c t6 : ff2000000022bb30
    [ 46.754179] status: 0000000200000100 badaddr: 0000000000000000 cause: 000000000000000c
    [ 46.754653] Code: Unable to access instruction at 0xffffffffffffffec.
    [ 46.754939] ---[ end trace 0000000000000000 ]---
    [ 46.755131] note: perf-exec[107] exited with irqs disabled
    [ 46.755546] note: perf-exec[107] exited with preempt_count 4
    
    This happens because in the legacy case the ctr_get_width function was not
    defined, but it is used in arch_perf_update_userpage.
    
    Also remove extra check in riscv_pmu_ctr_get_width_mask
    
    Signed-off-by: Vadim Shakirov <vadim.shakirov@syntacore.com>
    Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
    Reviewed-by: Atish Patra <atishp@rivosinc.com>
    Fixes: cc4c07c ("drivers: perf: Implement perf event mmap support  in the SBI backend")
    Link: https://lore.kernel.org/r/20240227170002.188671-3-vadim.shakirov@syntacore.com
    Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    vdsh-sc authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    e0d17ee View commit details
    Browse the repository at this point in the history
  25. Revert "riscv: mm: support Svnapot in huge vmap"

    [ Upstream commit 16ab464 ]
    
    This reverts commit ce17347.
    
    We cannot correctly deal with NAPOT mappings in vmalloc/vmap because if
    some part of a NAPOT mapping is unmapped, the remaining mapping is not
    updated accordingly. For example:
    
    ptr = vmalloc_huge(64 * 1024, GFP_KERNEL);
    vunmap_range((unsigned long)(ptr + PAGE_SIZE),
    	     (unsigned long)(ptr + 64 * 1024));
    
    leads to the following kernel page table dump:
    
    0xffff8f8000ef0000-0xffff8f8000ef1000    0x00000001033c0000         4K PTE N   ..     ..   D A G . . W R V
    
    Meaning the first entry which was not unmapped still has the N bit set,
    which, if accessed first and cached in the TLB, could allow access to the
    unmapped range.
    
    That's because the logic to break the NAPOT mapping does not exist and
    likely won't. Indeed, to break a NAPOT mapping, we first have to clear
    the whole mapping, flush the TLB and then set the new mapping ("break-
    before-make" equivalent). That works fine in userspace since we can handle
    any pagefault occurring on the remaining mapping but we can't handle a kernel
    pagefault on such mapping.
    
    So fix this by reverting the commit that introduced the vmap/vmalloc
    support.
    
    Fixes: ce17347 ("riscv: mm: support Svnapot in huge vmap")
    Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
    Link: https://lore.kernel.org/r/20240227205016.121901-2-alexghiti@rivosinc.com
    Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Alexandre Ghiti authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    2b7ce74 View commit details
    Browse the repository at this point in the history
  26. riscv: Fix pte_leaf_size() for NAPOT

    [ Upstream commit e0fe5ab ]
    
    pte_leaf_size() must be reimplemented to add support for NAPOT mappings.
    
    Fixes: 82a1a1f ("riscv: mm: support Svnapot in hugetlb page")
    Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
    Link: https://lore.kernel.org/r/20240227205016.121901-3-alexghiti@rivosinc.com
    Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Alexandre Ghiti authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    eb25716 View commit details
    Browse the repository at this point in the history
  27. riscv: Sparse-Memory/vmemmap out-of-bounds fix

    [ Upstream commit a11dd49 ]
    
    Offset vmemmap so that the first page of vmemmap will be mapped
    to the first page of physical memory in order to ensure that
    vmemmap’s bounds will be respected during
    pfn_to_page()/page_to_pfn() operations.
    The conversion macros will produce correct SV39/48/57 addresses
    for every possible/valid DRAM_BASE inside the physical memory limits.
    
    v2:Address Alex's comments
    
    Suggested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
    Signed-off-by: Dimitris Vlachos <dvlachos@ics.forth.gr>
    Reported-by: Dimitris Vlachos <dvlachos@ics.forth.gr>
    Closes: https://lore.kernel.org/linux-riscv/20240202135030.42265-1-csd4492@csd.uoc.gr
    Fixes: d95f1a5 ("RISC-V: Implement sparsemem")
    Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
    Link: https://lore.kernel.org/r/20240229191723.32779-1-dvlachos@ics.forth.gr
    Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Jvlachos authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    a278d5c View commit details
    Browse the repository at this point in the history
  28. btrfs: fix race between ordered extent completion and fiemap

    [ Upstream commit a1a4a9c ]
    
    For fiemap we recently stopped locking the target extent range for the
    whole duration of the fiemap call, in order to avoid a deadlock in a
    scenario where the fiemap buffer happens to be a memory mapped range of
    the same file. This use case is very unlikely to be useful in practice but
    it may be triggered by fuzz testing (syzbot, etc).
    
    However by not locking the target extent range for the whole duration of
    the fiemap call we can race with an ordered extent. This happens like
    this:
    
    1) The fiemap task finishes processing a file extent item that covers
       the file range [512K, 1M[, and that file extent item is the last item
       in the leaf currently being processed;
    
    2) And ordered extent for the file range [768K, 2M[, in COW mode,
       completes (btrfs_finish_one_ordered()) and the file extent item
       covering the range [512K, 1M[ is trimmed to cover the range
       [512K, 768K[ and then a new file extent item for the range [768K, 2M[
       is inserted in the inode's subvolume tree;
    
    3) The fiemap task calls fiemap_next_leaf_item(), which then calls
       btrfs_next_leaf() to find the next leaf / item. This finds that the
       the next key following the one we previously processed (its type is
       BTRFS_EXTENT_DATA_KEY and its offset is 512K), is the key corresponding
       to the new file extent item inserted by the ordered extent, which has
       a type of BTRFS_EXTENT_DATA_KEY and an offset of 768K;
    
    4) Later the fiemap code ends up at emit_fiemap_extent() and triggers
       the warning:
    
          if (cache->offset + cache->len > offset) {
                   WARN_ON(1);
                   return -EINVAL;
          }
    
       Since we get 1M > 768K, because the previously emitted entry for the
       old extent covering the file range [512K, 1M[ ends at an offset that
       is greater than the new extent's start offset (768K). This makes fiemap
       fail with -EINVAL besides triggering the warning that produces a stack
       trace like the following:
    
         [1621.677651] ------------[ cut here ]------------
         [1621.677656] WARNING: CPU: 1 PID: 204366 at fs/btrfs/extent_io.c:2492 emit_fiemap_extent+0x84/0x90 [btrfs]
         [1621.677899] Modules linked in: btrfs blake2b_generic (...)
         [1621.677951] CPU: 1 PID: 204366 Comm: pool Not tainted 6.8.0-rc5-btrfs-next-151+ #1
         [1621.677954] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014
         [1621.677956] RIP: 0010:emit_fiemap_extent+0x84/0x90 [btrfs]
         [1621.678033] Code: 2b 4c 89 63 (...)
         [1621.678035] RSP: 0018:ffffab16089ffd20 EFLAGS: 00010206
         [1621.678037] RAX: 00000000004fa000 RBX: ffffab16089ffe08 RCX: 0000000000009000
         [1621.678039] RDX: 00000000004f9000 RSI: 00000000004f1000 RDI: ffffab16089ffe90
         [1621.678040] RBP: 00000000004f9000 R08: 0000000000001000 R09: 0000000000000000
         [1621.678041] R10: 0000000000000000 R11: 0000000000001000 R12: 0000000041d78000
         [1621.678043] R13: 0000000000001000 R14: 0000000000000000 R15: ffff9434f0b17850
         [1621.678044] FS:  00007fa6e20006c0(0000) GS:ffff943bdfa40000(0000) knlGS:0000000000000000
         [1621.678046] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
         [1621.678048] CR2: 00007fa6b0801000 CR3: 000000012d404002 CR4: 0000000000370ef0
         [1621.678053] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
         [1621.678055] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
         [1621.678056] Call Trace:
         [1621.678074]  <TASK>
         [1621.678076]  ? __warn+0x80/0x130
         [1621.678082]  ? emit_fiemap_extent+0x84/0x90 [btrfs]
         [1621.678159]  ? report_bug+0x1f4/0x200
         [1621.678164]  ? handle_bug+0x42/0x70
         [1621.678167]  ? exc_invalid_op+0x14/0x70
         [1621.678170]  ? asm_exc_invalid_op+0x16/0x20
         [1621.678178]  ? emit_fiemap_extent+0x84/0x90 [btrfs]
         [1621.678253]  extent_fiemap+0x766/0xa30 [btrfs]
         [1621.678339]  btrfs_fiemap+0x45/0x80 [btrfs]
         [1621.678420]  do_vfs_ioctl+0x1e4/0x870
         [1621.678431]  __x64_sys_ioctl+0x6a/0xc0
         [1621.678434]  do_syscall_64+0x52/0x120
         [1621.678445]  entry_SYSCALL_64_after_hwframe+0x6e/0x76
    
    There's also another case where before calling btrfs_next_leaf() we are
    processing a hole or a prealloc extent and we had several delalloc ranges
    within that hole or prealloc extent. In that case if the ordered extents
    complete before we find the next key, we may end up finding an extent item
    with an offset smaller than (or equals to) the offset in cache->offset.
    
    So fix this by changing emit_fiemap_extent() to address these three
    scenarios like this:
    
    1) For the first case, steps listed above, adjust the length of the
       previously cached extent so that it does not overlap with the current
       extent, emit the previous one and cache the current file extent item;
    
    2) For the second case where he had a hole or prealloc extent with
       multiple delalloc ranges inside the hole or prealloc extent's range,
       and the current file extent item has an offset that matches the offset
       in the fiemap cache, just discard what we have in the fiemap cache and
       assign the current file extent item to the cache, since it's more up
       to date;
    
    3) For the third case where he had a hole or prealloc extent with
       multiple delalloc ranges inside the hole or prealloc extent's range
       and the offset of the file extent item we just found is smaller than
       what we have in the cache, just skip the current file extent item
       if its range end at or behind the cached extent's end, because we may
       have emitted (to the fiemap user space buffer) delalloc ranges that
       overlap with the current file extent item's range. If the file extent
       item's range goes beyond the end offset of the cached extent, just
       emit the cached extent and cache a subrange of the file extent item,
       that goes from the end offset of the cached extent to the end offset
       of the file extent item.
    
    Dealing with those cases in those ways makes everything consistent by
    reflecting the current state of file extent items in the btree and
    without emitting extents that have overlapping ranges (which would be
    confusing and violating expectations).
    
    This issue could be triggered often with test case generic/561, and was
    also hit and reported by Wang Yugui.
    
    Reported-by: Wang Yugui <wangyugui@e16-tech.com>
    Link: https://lore.kernel.org/linux-btrfs/20240223104619.701F.409509F4@e16-tech.com/
    Fixes: b0ad381 ("btrfs: fix deadlock with fiemap and extent locking")
    Reviewed-by: Josef Bacik <josef@toxicpanda.com>
    Signed-off-by: Filipe Manana <fdmanana@suse.com>
    Signed-off-by: David Sterba <dsterba@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    fdmanana authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    d43f8e5 View commit details
    Browse the repository at this point in the history
  29. of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing

    [ Upstream commit 7cb50f6 ]
    
    Introduced a stupid bug in commit 782bfd0 ("of: property: Improve
    finding the supplier of a remote-endpoint property") due to a last minute
    incorrect edit of "index !=0" into "!index". This patch fixes it to be
    "index > 0" to match the comment right next to it.
    
    Reported-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
    Link: https://lore.kernel.org/lkml/20240223171849.10f9901d@booty/
    Fixes: 782bfd0 ("of: property: Improve finding the supplier of a remote-endpoint property")
    Signed-off-by: Saravana Kannan <saravanak@google.com>
    Reviewed-by: Herve Codina <herve.codina@bootlin.com>
    Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
    Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
    Link: https://lore.kernel.org/r/20240224052436.3552333-1-saravanak@google.com
    Signed-off-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Saravana Kannan authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    6f72b44 View commit details
    Browse the repository at this point in the history
  30. tomoyo: fix UAF write bug in tomoyo_write_control()

    commit 2f03fc3 upstream.
    
    Since tomoyo_write_control() updates head->write_buf when write()
    of long lines is requested, we need to fetch head->write_buf after
    head->io_sem is held.  Otherwise, concurrent write() requests can
    cause use-after-free-write and double-free problems.
    
    Reported-by: Sam Sun <samsun1006219@gmail.com>
    Closes: https://lkml.kernel.org/r/CAEkJfYNDspuGxYx5kym8Lvp--D36CMDUErg4rxfWFJuPbbji8g@mail.gmail.com
    Fixes: bd03a3e ("TOMOYO: Add policy namespace support.")
    Cc:  <stable@vger.kernel.org> # Linux 3.1+
    Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Tetsuo Handa authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    2caa605 View commit details
    Browse the repository at this point in the history
  31. ALSA: firewire-lib: fix to check cycle continuity

    commit 77ce965 upstream.
    
    The local helper function to compare the given pair of cycle count
    evaluates them. If the left value is less than the right value, the
    function returns negative value.
    
    If the safe cycle is less than the current cycle, it is the case of
    cycle lost. However, it is not currently handled properly.
    
    This commit fixes the bug.
    
    Cc: <stable@vger.kernel.org>
    Fixes: 705794c ("ALSA: firewire-lib: check cycle continuity")
    Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Link: https://lore.kernel.org/r/20240218033026.72577-1-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    takaswie authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    22df6ff View commit details
    Browse the repository at this point in the history
  32. ALSA: ump: Fix the discard error code from snd_ump_legacy_open()

    commit 49cbb7b upstream.
    
    snd_ump_legacy_open() didn't return the error code properly even if it
    couldn't open.  Fix it.
    
    Fixes: 0b5288f ("ALSA: ump: Add legacy raw MIDI support")
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20240220150843.28630-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    tiwai authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    bb06ffb View commit details
    Browse the repository at this point in the history
  33. ALSA: hda/realtek: tas2781: enable subwoofer volume control

    commit c1947ce upstream.
    
    The volume of subwoofer channels is always at maximum with the
    ALC269_FIXUP_THINKPAD_ACPI chain.
    
    Use ALC285_FIXUP_THINKPAD_HEADSET_JACK to align it to the master volume.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=208555#c827
    
    Fixes: 3babae9 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Gergo Koteles <soyer@irl.hu>
    Link: https://lore.kernel.org/r/7ffae10ebba58601d25fe2ff8381a6ae3a926e62.1708687813.git.soyer@irl.hu
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    soyersoyer authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    d6ac6ff View commit details
    Browse the repository at this point in the history
  34. ALSA: hda/realtek: Enable Mute LED on HP 840 G8 (MB 8AB8)

    commit 1fdf4e8 upstream.
    
    On my EliteBook 840 G8 Notebook PC (ProdId 5S7R6EC#ABD; built 2022 for
    german market) the Mute LED is always on. The mute button itself works
    as expected. alsa-info.sh shows a different subsystem-id 0x8ab9 for
    Realtek ALC285 Codec, thus the existing quirks for HP 840 G8 don't work.
    Therefore, add a new quirk for this type of EliteBook.
    
    Signed-off-by: Hans Peter <flurry123@gmx.ch>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20240219164518.4099-1-flurry123@gmx.ch
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Hans Peter authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    46fb5e7 View commit details
    Browse the repository at this point in the history
  35. ALSA: hda/realtek: fix mute/micmute LED For HP mt440

    commit 67c3d77 upstream.
    
    The HP mt440 Thin Client uses an ALC236 codec and needs the
    ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk to make the mute and
    micmute LEDs work.
    
    There are two variants of the USB-C PD chip on this device. Each uses
    a different BIOS and board ID, hence the two entries.
    
    Signed-off-by: Eniac Zhang <eniac-xw.zhang@hp.com>
    Signed-off-by: Alexandru Gagniuc <alexandru.gagniuc@hp.com>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20240220175812.782687-1-alexandru.gagniuc@hp.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    eniachp authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    5cdf76f View commit details
    Browse the repository at this point in the history
  36. ALSA: hda/realtek: Add special fixup for Lenovo 14IRP8

    commit 0ac32a3 upstream.
    
    Lenovo Slim/Yoga Pro 9 14IRP8 requires a special fixup because there is
    a collision of its PCI SSID (17aa:3802) with Lenovo Yoga DuetITL 2021
    codec SSID.
    
    Fixes: 3babae9 ("ALSA: hda/tas2781: Add tas2781 HDA driver")
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=208555
    Link: https://lore.kernel.org/all/d5b42e483566a3815d229270abd668131a0d9f3a.camel@irl.hu
    Cc: stable@vger.kernel.org
    Signed-off-by: Willian Wang <git@willian.wang>
    Reviewed-by: Gergo Koteles <soyer@irl.hu>
    Link: https://lore.kernel.org/r/170879111795.8.6687687359006700715.273812184@willian.wang
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    wangwillian0 authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    a4904b3 View commit details
    Browse the repository at this point in the history
  37. Bluetooth: hci_bcm4377: do not mark valid bd_addr as invalid

    commit c17d2a7 upstream.
    
    A recent commit restored the original (and still documented) semantics
    for the HCI_QUIRK_USE_BDADDR_PROPERTY quirk so that the device address
    is considered invalid unless an address is provided by firmware.
    
    This specifically means that this flag must only be set for devices with
    invalid addresses, but the Broadcom BCM4377 driver has so far been
    setting this flag unconditionally.
    
    Fortunately the driver already checks for invalid addresses during setup
    and sets the HCI_QUIRK_INVALID_BDADDR flag, which can simply be replaced
    with HCI_QUIRK_USE_BDADDR_PROPERTY to indicate that the default address
    is invalid but can be overridden by firmware (long term, this should
    probably just always be allowed).
    
    Fixes: 6945795 ("Bluetooth: fix use-bdaddr-property quirk")
    Cc: stable@vger.kernel.org      # 6.5
    Reported-by: Felix Zhang <mrman@mrman314.tech>
    Link: https://lore.kernel.org/r/77419ffacc5b4875e920e038332575a2a5bff29f.camel@mrman314.tech/
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    Reported-by: Felix Zhang <mrman@mrman314.tech>
    Reviewed-by: Neal Gompa <neal@gompa.dev>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    jhovold authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    0be289b View commit details
    Browse the repository at this point in the history
  38. landlock: Fix asymmetric private inodes referring

    commit d9818b3 upstream.
    
    When linking or renaming a file, if only one of the source or
    destination directory is backed by an S_PRIVATE inode, then the related
    set of layer masks would be used as uninitialized by
    is_access_to_paths_allowed().  This would result to indeterministic
    access for one side instead of always being allowed.
    
    This bug could only be triggered with a mounted filesystem containing
    both S_PRIVATE and !S_PRIVATE inodes, which doesn't seem possible.
    
    The collect_domain_accesses() calls return early if
    is_nouser_or_private() returns false, which means that the directory's
    superblock has SB_NOUSER or its inode has S_PRIVATE.  Because rename or
    link actions are only allowed on the same mounted filesystem, the
    superblock is always the same for both source and destination
    directories.  However, it might be possible in theory to have an
    S_PRIVATE parent source inode with an !S_PRIVATE parent destination
    inode, or vice versa.
    
    To make sure this case is not an issue, explicitly initialized both set
    of layer masks to 0, which means to allow all actions on the related
    side.  If at least on side has !S_PRIVATE, then
    collect_domain_accesses() and is_access_to_paths_allowed() check for the
    required access rights.
    
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Christian Brauner <brauner@kernel.org>
    Cc: Günther Noack <gnoack@google.com>
    Cc: Jann Horn <jannh@google.com>
    Cc: Shervin Oloumi <enlightened@chromium.org>
    Cc: stable@vger.kernel.org
    Fixes: b91c3e4 ("landlock: Add support for file reparenting with LANDLOCK_ACCESS_FS_REFER")
    Link: https://lore.kernel.org/r/20240219190345.2928627-1-mic@digikod.net
    Signed-off-by: Mickaël Salaün <mic@digikod.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    l0kod authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    f490693 View commit details
    Browse the repository at this point in the history
  39. gtp: fix use-after-free and null-ptr-deref in gtp_newlink()

    commit 616d82c upstream.
    
    The gtp_link_ops operations structure for the subsystem must be
    registered after registering the gtp_net_ops pernet operations structure.
    
    Syzkaller hit 'general protection fault in gtp_genl_dump_pdp' bug:
    
    [ 1010.702740] gtp: GTP module unloaded
    [ 1010.715877] general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] SMP KASAN NOPTI
    [ 1010.715888] KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
    [ 1010.715895] CPU: 1 PID: 128616 Comm: a.out Not tainted 6.8.0-rc6-std-def-alt1 #1
    [ 1010.715899] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.0-alt1 04/01/2014
    [ 1010.715908] RIP: 0010:gtp_newlink+0x4d7/0x9c0 [gtp]
    [ 1010.715915] Code: 80 3c 02 00 0f 85 41 04 00 00 48 8b bb d8 05 00 00 e8 ed f6 ff ff 48 89 c2 48 89 c5 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 4f 04 00 00 4c 89 e2 4c 8b 6d 00 48 b8 00 00 00
    [ 1010.715920] RSP: 0018:ffff888020fbf180 EFLAGS: 00010203
    [ 1010.715929] RAX: dffffc0000000000 RBX: ffff88800399c000 RCX: 0000000000000000
    [ 1010.715933] RDX: 0000000000000001 RSI: ffffffff84805280 RDI: 0000000000000282
    [ 1010.715938] RBP: 000000000000000d R08: 0000000000000001 R09: 0000000000000000
    [ 1010.715942] R10: 0000000000000001 R11: 0000000000000001 R12: ffff88800399cc80
    [ 1010.715947] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000400
    [ 1010.715953] FS:  00007fd1509ab5c0(0000) GS:ffff88805b300000(0000) knlGS:0000000000000000
    [ 1010.715958] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [ 1010.715962] CR2: 0000000000000000 CR3: 000000001c07a000 CR4: 0000000000750ee0
    [ 1010.715968] PKRU: 55555554
    [ 1010.715972] Call Trace:
    [ 1010.715985]  ? __die_body.cold+0x1a/0x1f
    [ 1010.715995]  ? die_addr+0x43/0x70
    [ 1010.716002]  ? exc_general_protection+0x199/0x2f0
    [ 1010.716016]  ? asm_exc_general_protection+0x1e/0x30
    [ 1010.716026]  ? gtp_newlink+0x4d7/0x9c0 [gtp]
    [ 1010.716034]  ? gtp_net_exit+0x150/0x150 [gtp]
    [ 1010.716042]  __rtnl_newlink+0x1063/0x1700
    [ 1010.716051]  ? rtnl_setlink+0x3c0/0x3c0
    [ 1010.716063]  ? is_bpf_text_address+0xc0/0x1f0
    [ 1010.716070]  ? kernel_text_address.part.0+0xbb/0xd0
    [ 1010.716076]  ? __kernel_text_address+0x56/0xa0
    [ 1010.716084]  ? unwind_get_return_address+0x5a/0xa0
    [ 1010.716091]  ? create_prof_cpu_mask+0x30/0x30
    [ 1010.716098]  ? arch_stack_walk+0x9e/0xf0
    [ 1010.716106]  ? stack_trace_save+0x91/0xd0
    [ 1010.716113]  ? stack_trace_consume_entry+0x170/0x170
    [ 1010.716121]  ? __lock_acquire+0x15c5/0x5380
    [ 1010.716139]  ? mark_held_locks+0x9e/0xe0
    [ 1010.716148]  ? kmem_cache_alloc_trace+0x35f/0x3c0
    [ 1010.716155]  ? __rtnl_newlink+0x1700/0x1700
    [ 1010.716160]  rtnl_newlink+0x69/0xa0
    [ 1010.716166]  rtnetlink_rcv_msg+0x43b/0xc50
    [ 1010.716172]  ? rtnl_fdb_dump+0x9f0/0x9f0
    [ 1010.716179]  ? lock_acquire+0x1fe/0x560
    [ 1010.716188]  ? netlink_deliver_tap+0x12f/0xd50
    [ 1010.716196]  netlink_rcv_skb+0x14d/0x440
    [ 1010.716202]  ? rtnl_fdb_dump+0x9f0/0x9f0
    [ 1010.716208]  ? netlink_ack+0xab0/0xab0
    [ 1010.716213]  ? netlink_deliver_tap+0x202/0xd50
    [ 1010.716220]  ? netlink_deliver_tap+0x218/0xd50
    [ 1010.716226]  ? __virt_addr_valid+0x30b/0x590
    [ 1010.716233]  netlink_unicast+0x54b/0x800
    [ 1010.716240]  ? netlink_attachskb+0x870/0x870
    [ 1010.716248]  ? __check_object_size+0x2de/0x3b0
    [ 1010.716254]  netlink_sendmsg+0x938/0xe40
    [ 1010.716261]  ? netlink_unicast+0x800/0x800
    [ 1010.716269]  ? __import_iovec+0x292/0x510
    [ 1010.716276]  ? netlink_unicast+0x800/0x800
    [ 1010.716284]  __sock_sendmsg+0x159/0x190
    [ 1010.716290]  ____sys_sendmsg+0x712/0x880
    [ 1010.716297]  ? sock_write_iter+0x3d0/0x3d0
    [ 1010.716304]  ? __ia32_sys_recvmmsg+0x270/0x270
    [ 1010.716309]  ? lock_acquire+0x1fe/0x560
    [ 1010.716315]  ? drain_array_locked+0x90/0x90
    [ 1010.716324]  ___sys_sendmsg+0xf8/0x170
    [ 1010.716331]  ? sendmsg_copy_msghdr+0x170/0x170
    [ 1010.716337]  ? lockdep_init_map_type+0x2c7/0x860
    [ 1010.716343]  ? lockdep_hardirqs_on_prepare+0x430/0x430
    [ 1010.716350]  ? debug_mutex_init+0x33/0x70
    [ 1010.716360]  ? percpu_counter_add_batch+0x8b/0x140
    [ 1010.716367]  ? lock_acquire+0x1fe/0x560
    [ 1010.716373]  ? find_held_lock+0x2c/0x110
    [ 1010.716384]  ? __fd_install+0x1b6/0x6f0
    [ 1010.716389]  ? lock_downgrade+0x810/0x810
    [ 1010.716396]  ? __fget_light+0x222/0x290
    [ 1010.716403]  __sys_sendmsg+0xea/0x1b0
    [ 1010.716409]  ? __sys_sendmsg_sock+0x40/0x40
    [ 1010.716419]  ? lockdep_hardirqs_on_prepare+0x2b3/0x430
    [ 1010.716425]  ? syscall_enter_from_user_mode+0x1d/0x60
    [ 1010.716432]  do_syscall_64+0x30/0x40
    [ 1010.716438]  entry_SYSCALL_64_after_hwframe+0x62/0xc7
    [ 1010.716444] RIP: 0033:0x7fd1508cbd49
    [ 1010.716452] Code: 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d ef 70 0d 00 f7 d8 64 89 01 48
    [ 1010.716456] RSP: 002b:00007fff18872348 EFLAGS: 00000202 ORIG_RAX: 000000000000002e
    [ 1010.716463] RAX: ffffffffffffffda RBX: 000055f72bf0eac0 RCX: 00007fd1508cbd49
    [ 1010.716468] RDX: 0000000000000000 RSI: 0000000020000280 RDI: 0000000000000006
    [ 1010.716473] RBP: 00007fff18872360 R08: 00007fff18872360 R09: 00007fff18872360
    [ 1010.716478] R10: 00007fff18872360 R11: 0000000000000202 R12: 000055f72bf0e1b0
    [ 1010.716482] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
    [ 1010.716491] Modules linked in: gtp(+) udp_tunnel ib_core uinput af_packet rfkill qrtr joydev hid_generic usbhid hid kvm_intel iTCO_wdt intel_pmc_bxt iTCO_vendor_support kvm snd_hda_codec_generic ledtrig_audio irqbypass crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel snd_hda_intel nls_utf8 snd_intel_dspcfg nls_cp866 psmouse aesni_intel vfat crypto_simd fat cryptd glue_helper snd_hda_codec pcspkr snd_hda_core i2c_i801 snd_hwdep i2c_smbus xhci_pci snd_pcm lpc_ich xhci_pci_renesas xhci_hcd qemu_fw_cfg tiny_power_button button sch_fq_codel vboxvideo drm_vram_helper drm_ttm_helper ttm vboxsf vboxguest snd_seq_midi snd_seq_midi_event snd_seq snd_rawmidi snd_seq_device snd_timer snd soundcore msr fuse efi_pstore dm_mod ip_tables x_tables autofs4 virtio_gpu virtio_dma_buf drm_kms_helper cec rc_core drm virtio_rng virtio_scsi rng_core virtio_balloon virtio_blk virtio_net virtio_console net_failover failover ahci libahci libata evdev scsi_mod input_leds serio_raw virtio_pci intel_agp
    [ 1010.716674]  virtio_ring intel_gtt virtio [last unloaded: gtp]
    [ 1010.716693] ---[ end trace 04990a4ce61e174b ]---
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Alexander Ofitserov <oficerovas@altlinux.org>
    Fixes: 459aa66 ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)")
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Link: https://lore.kernel.org/r/20240228114703.465107-1-oficerovas@altlinux.org
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Alexander Ofitserov authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    93dd420 View commit details
    Browse the repository at this point in the history
  40. mm: cachestat: fix folio read-after-free in cache walk

    commit 3a75cb0 upstream.
    
    In cachestat, we access the folio from the page cache's xarray to compute
    its page offset, and check for its dirty and writeback flags.  However, we
    do not hold a reference to the folio before performing these actions,
    which means the folio can concurrently be released and reused as another
    folio/page/slab.
    
    Get around this altogether by just using xarray's existing machinery for
    the folio page offsets and dirty/writeback states.
    
    This changes behavior for tmpfs files to now always report zeroes in their
    dirty and writeback counters.  This is okay as tmpfs doesn't follow
    conventional writeback cache behavior: its pages get "cleaned" during
    swapout, after which they're no longer resident etc.
    
    Link: https://lkml.kernel.org/r/20240220153409.GA216065@cmpxchg.org
    Fixes: cf264e1 ("cachestat: implement cachestat syscall")
    Reported-by: Jann Horn <jannh@google.com>
    Suggested-by: Matthew Wilcox <willy@infradead.org>
    Signed-off-by: Nhat Pham <nphamcs@gmail.com>
    Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
    Tested-by: Jann Horn <jannh@google.com>
    Cc: <stable@vger.kernel.org>	[6.4+]
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    nhatsmrt authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    ba60fdf View commit details
    Browse the repository at this point in the history
  41. mtd: rawnand: marvell: fix layouts

    commit e6a30d0 upstream.
    
    The check in nand_base.c, nand_scan_tail() : has the following code:
    (ecc->steps * ecc->size != mtd->writesize) which fails for some NAND chips.
    Remove ECC entries in this driver which are not integral multiplications,
    and adjust the number of chunks for entries which fails the above
    calculation so it will calculate correctly (this was previously done
    automatically before the check and was removed in a later commit).
    
    Fixes: 68c18da ("mtd: rawnand: marvell: add missing layouts")
    Cc: stable@vger.kernel.org
    Signed-off-by: Elad Nachman <enachman@marvell.com>
    Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    eladnachman authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    ad8ff8c View commit details
    Browse the repository at this point in the history
  42. wifi: nl80211: reject iftype change with mesh ID change

    commit f78c137 upstream.
    
    It's currently possible to change the mesh ID when the
    interface isn't yet in mesh mode, at the same time as
    changing it into mesh mode. This leads to an overwrite
    of data in the wdev->u union for the interface type it
    currently has, causing cfg80211_change_iface() to do
    wrong things when switching.
    
    We could probably allow setting an interface to mesh
    while setting the mesh ID at the same time by doing a
    different order of operations here, but realistically
    there's no userspace that's going to do this, so just
    disallow changes in iftype when setting mesh ID.
    
    Cc: stable@vger.kernel.org
    Fixes: 29cbe68 ("cfg80211/mac80211: add mesh join/leave commands")
    Reported-by: syzbot+dd4779978217b1973180@syzkaller.appspotmail.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    jmberg-intel authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    177d574 View commit details
    Browse the repository at this point in the history
  43. btrfs: fix double free of anonymous device after snapshot creation fa…

    …ilure
    
    commit e2b54ea upstream.
    
    When creating a snapshot we may do a double free of an anonymous device
    in case there's an error committing the transaction. The second free may
    result in freeing an anonymous device number that was allocated by some
    other subsystem in the kernel or another btrfs filesystem.
    
    The steps that lead to this:
    
    1) At ioctl.c:create_snapshot() we allocate an anonymous device number
       and assign it to pending_snapshot->anon_dev;
    
    2) Then we call btrfs_commit_transaction() and end up at
       transaction.c:create_pending_snapshot();
    
    3) There we call btrfs_get_new_fs_root() and pass it the anonymous device
       number stored in pending_snapshot->anon_dev;
    
    4) btrfs_get_new_fs_root() frees that anonymous device number because
       btrfs_lookup_fs_root() returned a root - someone else did a lookup
       of the new root already, which could some task doing backref walking;
    
    5) After that some error happens in the transaction commit path, and at
       ioctl.c:create_snapshot() we jump to the 'fail' label, and after
       that we free again the same anonymous device number, which in the
       meanwhile may have been reallocated somewhere else, because
       pending_snapshot->anon_dev still has the same value as in step 1.
    
    Recently syzbot ran into this and reported the following trace:
    
      ------------[ cut here ]------------
      ida_free called for id=51 which is not allocated.
      WARNING: CPU: 1 PID: 31038 at lib/idr.c:525 ida_free+0x370/0x420 lib/idr.c:525
      Modules linked in:
      CPU: 1 PID: 31038 Comm: syz-executor.2 Not tainted 6.8.0-rc4-syzkaller-00410-gc02197fc9076 #0
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
      RIP: 0010:ida_free+0x370/0x420 lib/idr.c:525
      Code: 10 42 80 3c 28 (...)
      RSP: 0018:ffffc90015a67300 EFLAGS: 00010246
      RAX: be5130472f5dd000 RBX: 0000000000000033 RCX: 0000000000040000
      RDX: ffffc90009a7a000 RSI: 000000000003ffff RDI: 0000000000040000
      RBP: ffffc90015a673f0 R08: ffffffff81577992 R09: 1ffff92002b4cdb4
      R10: dffffc0000000000 R11: fffff52002b4cdb5 R12: 0000000000000246
      R13: dffffc0000000000 R14: ffffffff8e256b80 R15: 0000000000000246
      FS:  00007fca3f4b46c0(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00007f167a17b978 CR3: 000000001ed26000 CR4: 0000000000350ef0
      Call Trace:
       <TASK>
       btrfs_get_root_ref+0xa48/0xaf0 fs/btrfs/disk-io.c:1346
       create_pending_snapshot+0xff2/0x2bc0 fs/btrfs/transaction.c:1837
       create_pending_snapshots+0x195/0x1d0 fs/btrfs/transaction.c:1931
       btrfs_commit_transaction+0xf1c/0x3740 fs/btrfs/transaction.c:2404
       create_snapshot+0x507/0x880 fs/btrfs/ioctl.c:848
       btrfs_mksubvol+0x5d0/0x750 fs/btrfs/ioctl.c:998
       btrfs_mksnapshot+0xb5/0xf0 fs/btrfs/ioctl.c:1044
       __btrfs_ioctl_snap_create+0x387/0x4b0 fs/btrfs/ioctl.c:1306
       btrfs_ioctl_snap_create_v2+0x1ca/0x400 fs/btrfs/ioctl.c:1393
       btrfs_ioctl+0xa74/0xd40
       vfs_ioctl fs/ioctl.c:51 [inline]
       __do_sys_ioctl fs/ioctl.c:871 [inline]
       __se_sys_ioctl+0xfe/0x170 fs/ioctl.c:857
       do_syscall_64+0xfb/0x240
       entry_SYSCALL_64_after_hwframe+0x6f/0x77
      RIP: 0033:0x7fca3e67dda9
      Code: 28 00 00 00 (...)
      RSP: 002b:00007fca3f4b40c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
      RAX: ffffffffffffffda RBX: 00007fca3e7abf80 RCX: 00007fca3e67dda9
      RDX: 00000000200005c0 RSI: 0000000050009417 RDI: 0000000000000003
      RBP: 00007fca3e6ca47a R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
      R13: 000000000000000b R14: 00007fca3e7abf80 R15: 00007fff6bf95658
       </TASK>
    
    Where we get an explicit message where we attempt to free an anonymous
    device number that is not currently allocated. It happens in a different
    code path from the example below, at btrfs_get_root_ref(), so this change
    may not fix the case triggered by syzbot.
    
    To fix at least the code path from the example above, change
    btrfs_get_root_ref() and its callers to receive a dev_t pointer argument
    for the anonymous device number, so that in case it frees the number, it
    also resets it to 0, so that up in the call chain we don't attempt to do
    the double free.
    
    CC: stable@vger.kernel.org # 5.10+
    Link: https://lore.kernel.org/linux-btrfs/000000000000f673a1061202f630@google.com/
    Fixes: e03ee2f ("btrfs: do not ASSERT() if the newly created subvolume already got read")
    Signed-off-by: Filipe Manana <fdmanana@suse.com>
    Reviewed-by: David Sterba <dsterba@suse.com>
    Signed-off-by: David Sterba <dsterba@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    fdmanana authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    eb34410 View commit details
    Browse the repository at this point in the history
  44. btrfs: dev-replace: properly validate device names

    commit 9845664 upstream.
    
    There's a syzbot report that device name buffers passed to device
    replace are not properly checked for string termination which could lead
    to a read out of bounds in getname_kernel().
    
    Add a helper that validates both source and target device name buffers.
    For devid as the source initialize the buffer to empty string in case
    something tries to read it later.
    
    This was originally analyzed and fixed in a different way by Edward Adam
    Davis (see links).
    
    Link: https://lore.kernel.org/linux-btrfs/000000000000d1a1d1060cc9c5e7@google.com/
    Link: https://lore.kernel.org/linux-btrfs/tencent_44CA0665C9836EF9EEC80CB9E7E206DF5206@qq.com/
    CC: stable@vger.kernel.org # 4.19+
    CC: Edward Adam Davis <eadavis@qq.com>
    Reported-and-tested-by: syzbot+33f23b49ac24f986c9e8@syzkaller.appspotmail.com
    Reviewed-by: Boris Burkov <boris@bur.io>
    Signed-off-by: David Sterba <dsterba@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    kdave authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    b1690ce View commit details
    Browse the repository at this point in the history
  45. btrfs: send: don't issue unnecessary zero writes for trailing hole

    commit 5897710 upstream.
    
    If we have a sparse file with a trailing hole (from the last extent's end
    to i_size) and then create an extent in the file that ends before the
    file's i_size, then when doing an incremental send we will issue a write
    full of zeroes for the range that starts immediately after the new extent
    ends up to i_size. While this isn't incorrect because the file ends up
    with exactly the same data, it unnecessarily results in using extra space
    at the destination with one or more extents full of zeroes instead of
    having a hole. In same cases this results in using megabytes or even
    gigabytes of unnecessary space.
    
    Example, reproducer:
    
       $ cat test.sh
       #!/bin/bash
    
       DEV=/dev/sdh
       MNT=/mnt/sdh
    
       mkfs.btrfs -f $DEV
       mount $DEV $MNT
    
       # Create 1G sparse file.
       xfs_io -f -c "truncate 1G" $MNT/foobar
    
       # Create base snapshot.
       btrfs subvolume snapshot -r $MNT $MNT/mysnap1
    
       # Create send stream (full send) for the base snapshot.
       btrfs send -f /tmp/1.snap $MNT/mysnap1
    
       # Now write one extent at the beginning of the file and one somewhere
       # in the middle, leaving a gap between the end of this second extent
       # and the file's size.
       xfs_io -c "pwrite -S 0xab 0 128K" \
              -c "pwrite -S 0xcd 512M 128K" \
              $MNT/foobar
    
       # Now create a second snapshot which is going to be used for an
       # incremental send operation.
       btrfs subvolume snapshot -r $MNT $MNT/mysnap2
    
       # Create send stream (incremental send) for the second snapshot.
       btrfs send -p $MNT/mysnap1 -f /tmp/2.snap $MNT/mysnap2
    
       # Now recreate the filesystem by receiving both send streams and
       # verify we get the same content that the original filesystem had
       # and file foobar has only two extents with a size of 128K each.
       umount $MNT
       mkfs.btrfs -f $DEV
       mount $DEV $MNT
    
       btrfs receive -f /tmp/1.snap $MNT
       btrfs receive -f /tmp/2.snap $MNT
    
       echo -e "\nFile fiemap in the second snapshot:"
       # Should have:
       #
       # 128K extent at file range [0, 128K[
       # hole at file range [128K, 512M[
       # 128K extent file range [512M, 512M + 128K[
       # hole at file range [512M + 128K, 1G[
       xfs_io -r -c "fiemap -v" $MNT/mysnap2/foobar
    
       # File should be using 256K of data (two 128K extents).
       echo -e "\nSpace used by the file: $(du -h $MNT/mysnap2/foobar | cut -f 1)"
    
       umount $MNT
    
    Running the test, we can see with fiemap that we get an extent for the
    range [512M, 1G[, while in the source filesystem we have an extent for
    the range [512M, 512M + 128K[ and a hole for the rest of the file (the
    range [512M + 128K, 1G[):
    
       $ ./test.sh
       (...)
       File fiemap in the second snapshot:
       /mnt/sdh/mysnap2/foobar:
        EXT: FILE-OFFSET        BLOCK-RANGE        TOTAL FLAGS
          0: [0..255]:          26624..26879         256   0x0
          1: [256..1048575]:    hole             1048320
          2: [1048576..2097151]: 2156544..3205119 1048576   0x1
    
       Space used by the file: 513M
    
    This happens because once we finish processing an inode, at
    finish_inode_if_needed(), we always issue a hole (write operations full
    of zeros) if there's a gap between the end of the last processed extent
    and the file's size, even if that range is already a hole in the parent
    snapshot. Fix this by issuing the hole only if the range is not already
    a hole.
    
    After this change, running the test above, we get the expected layout:
    
       $ ./test.sh
       (...)
       File fiemap in the second snapshot:
       /mnt/sdh/mysnap2/foobar:
        EXT: FILE-OFFSET        BLOCK-RANGE      TOTAL FLAGS
          0: [0..255]:          26624..26879       256   0x0
          1: [256..1048575]:    hole             1048320
          2: [1048576..1048831]: 26880..27135       256   0x1
          3: [1048832..2097151]: hole             1048320
    
       Space used by the file: 256K
    
    A test case for fstests will follow soon.
    
    CC: stable@vger.kernel.org # 6.1+
    Reported-by: Dorai Ashok S A <dash.btrfs@inix.me>
    Link: https://lore.kernel.org/linux-btrfs/c0bf7818-9c45-46a8-b3d3-513230d0c86e@inix.me/
    Reviewed-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
    Reviewed-by: Josef Bacik <josef@toxicpanda.com>
    Signed-off-by: Filipe Manana <fdmanana@suse.com>
    Reviewed-by: David Sterba <dsterba@suse.com>
    Signed-off-by: David Sterba <dsterba@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    fdmanana authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    202e4f4 View commit details
    Browse the repository at this point in the history
  46. Revert "drm/amd/pm: resolve reboot exception for si oland"

    commit 9555580 upstream.
    
    This reverts commit e490d60.
    
    This causes hangs on SI when DC is enabled and errors on driver
    reboot and power off cycles.
    
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3216
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/2755
    Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    alexdeucher authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    baac292 View commit details
    Browse the repository at this point in the history
  47. drm/buddy: fix range bias

    commit f41900e upstream.
    
    There is a corner case here where start/end is after/before the block
    range we are currently checking. If so we need to be sure that splitting
    the block will eventually give use the block size we need. To do that we
    should adjust the block range to account for the start/end, and only
    continue with the split if the size/alignment will fit the requested
    size. Not doing so can result in leaving split blocks unmerged when it
    eventually fails.
    
    Fixes: afea229 ("drm: improve drm_buddy_alloc function")
    Signed-off-by: Matthew Auld <matthew.auld@intel.com>
    Cc: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
    Cc: Christian König <christian.koenig@amd.com>
    Cc: <stable@vger.kernel.org> # v5.18+
    Reviewed-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240219121851.25774-4-matthew.auld@intel.com
    Signed-off-by: Christian König <christian.koenig@amd.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    matt-auld authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    5e47662 View commit details
    Browse the repository at this point in the history
  48. drm/amd/display: Add monitor patch for specific eDP

    commit b7cdccc upstream.
    
    [WHY]
    Some eDP panels' ext caps don't write initial values. The value of
    dpcd_addr (0x317) can be random and the backlight control interface
    will be incorrect.
    
    [HOW]
    Add new panel patches to remove sink ext caps.
    
    Cc: Mario Limonciello <mario.limonciello@amd.com>
    Cc: Alex Deucher <alexander.deucher@amd.com>
    Cc: stable@vger.kernel.org # 6.5.x
    Cc: Tsung-hua Lin <tsung-hua.lin@amd.com>
    Cc: Chris Chi <moukong.chi@amd.com>
    Reviewed-by: Wayne Lin <wayne.lin@amd.com>
    Acked-by: Alex Hung <alex.hung@amd.com>
    Signed-off-by: Ryan Lin <tsung-hua.lin@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    tsunglinx authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    82dacc2 View commit details
    Browse the repository at this point in the history
  49. soc: qcom: pmic_glink: Fix boot when QRTR=m

    commit f79ee78 upstream.
    
    We need to bail out before adding/removing devices if we are going to
    -EPROBE_DEFER. Otherwise boot can get stuck in a probe deferral loop due
    to a long-standing issue in driver core (see commit fbc35b4 ("Add
    documentation on meaning of -EPROBE_DEFER")).
    
    Deregistering the altmode child device can potentially also trigger bugs
    in the DRM bridge implementation, which does not expect bridges to go
    away.
    
    [DB: slightly fixed commit message by adding the word 'commit']
    Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
    Signed-off-by: Rob Clark <robdclark@chromium.org>
    Link: https://lore.kernel.org/r/20231213210644.8702-1-robdclark@gmail.com
    [ johan: rebase on 6.8-rc4, amend commit message and mention DRM ]
    Fixes: 58ef4ec ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver")
    Cc: <stable@vger.kernel.org>      # 6.3
    Cc: Bjorn Andersson <andersson@kernel.org>
    Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
    Reviewed-by: Bjorn Andersson <andersson@kernel.org>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
    Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
    Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
    Link: https://patchwork.freedesktop.org/patch/msgid/20240217150228.5788-5-johan+linaro@kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    robclark authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    737d2e9 View commit details
    Browse the repository at this point in the history
  50. dmaengine: fsl-qdma: fix SoC may hang on 16 byte unaligned read

    commit 9d739bc upstream.
    
    There is chip (ls1028a) errata:
    
    The SoC may hang on 16 byte unaligned read transactions by QDMA.
    
    Unaligned read transactions initiated by QDMA may stall in the NOC
    (Network On-Chip), causing a deadlock condition. Stalled transactions will
    trigger completion timeouts in PCIe controller.
    
    Workaround:
    Enable prefetch by setting the source descriptor prefetchable bit
    ( SD[PF] = 1 ).
    
    Implement this workaround.
    
    Cc: stable@vger.kernel.org
    Fixes: b092529 ("dmaengine: fsl-qdma: Add qDMA controller driver for Layerscape SoCs")
    Signed-off-by: Peng Ma <peng.ma@nxp.com>
    Signed-off-by: Frank Li <Frank.Li@nxp.com>
    Link: https://lore.kernel.org/r/20240201215007.439503-1-Frank.Li@nxp.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Peng Ma authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    5b696e9 View commit details
    Browse the repository at this point in the history
  51. crypto: arm64/neonbs - fix out-of-bounds access on short input

    commit 1c0cf6d upstream.
    
    The bit-sliced implementation of AES-CTR operates on blocks of 128
    bytes, and will fall back to the plain NEON version for tail blocks or
    inputs that are shorter than 128 bytes to begin with.
    
    It will call straight into the plain NEON asm helper, which performs all
    memory accesses in granules of 16 bytes (the size of a NEON register).
    For this reason, the associated plain NEON glue code will copy inputs
    shorter than 16 bytes into a temporary buffer, given that this is a rare
    occurrence and it is not worth the effort to work around this in the asm
    code.
    
    The fallback from the bit-sliced NEON version fails to take this into
    account, potentially resulting in out-of-bounds accesses. So clone the
    same workaround, and use a temp buffer for short in/outputs.
    
    Fixes: fc074e1 ("crypto: arm64/aes-neonbs-ctr - fallback to plain NEON for final chunk")
    Cc: <stable@vger.kernel.org>
    Reported-by: syzbot+f1ceaa1a09ab891e1934@syzkaller.appspotmail.com
    Reviewed-by: Eric Biggers <ebiggers@google.com>
    Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ardbiesheuvel authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    1291d27 View commit details
    Browse the repository at this point in the history
  52. dmaengine: ptdma: use consistent DMA masks

    commit df2515a upstream.
    
    The PTDMA driver sets DMA masks in two different places for the same
    device inconsistently. First call is in pt_pci_probe(), where it uses
    48bit mask. The second call is in pt_dmaengine_register(), where it
    uses a 64bit mask. Using 64bit dma mask causes IO_PAGE_FAULT errors
    on DMA transfers between main memory and other devices.
    Without the extra call it works fine. Additionally the second call
    doesn't check the return value so it can silently fail.
    Remove the superfluous dma_set_mask() call and only use 48bit mask.
    
    Cc: stable@vger.kernel.org
    Fixes: b0b4a6b ("dmaengine: ptdma: register PTDMA controller as a DMA resource")
    Reviewed-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
    Signed-off-by: Tadeusz Struk <tstruk@gigaio.com>
    Link: https://lore.kernel.org/r/20240222163053.13842-1-tstruk@gigaio.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    tstruk authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    4e0fe15 View commit details
    Browse the repository at this point in the history
  53. dmaengine: fsl-edma: correct calculation of 'nbytes' in multi-fifo sc…

    …enario
    
    commit 9ba17de upstream.
    
    The 'nbytes' should be equivalent to burst * width in audio multi-fifo
    setups. Given that the FIFO width is fixed at 32 bits, adjusts the burst
    size for multi-fifo configurations to match the slave maxburst in the
    configuration.
    
    Cc: stable@vger.kernel.org
    Fixes: 72f5801 ("dmaengine: fsl-edma: integrate v3 support")
    Signed-off-by: Joy Zou <joy.zou@nxp.com>
    Signed-off-by: Frank Li <Frank.Li@nxp.com>
    Link: https://lore.kernel.org/r/20240131163318.360315-1-Frank.Li@nxp.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    1991Joyzou authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    91b001f View commit details
    Browse the repository at this point in the history
  54. dmaengine: fsl-qdma: init irq after reg initialization

    commit 87a3907 upstream.
    
    Initialize the qDMA irqs after the registers are configured so that
    interrupts that may have been pending from a primary kernel don't get
    processed by the irq handler before it is ready to and cause panic with
    the following trace:
    
      Call trace:
       fsl_qdma_queue_handler+0xf8/0x3e8
       __handle_irq_event_percpu+0x78/0x2b0
       handle_irq_event_percpu+0x1c/0x68
       handle_irq_event+0x44/0x78
       handle_fasteoi_irq+0xc8/0x178
       generic_handle_irq+0x24/0x38
       __handle_domain_irq+0x90/0x100
       gic_handle_irq+0x5c/0xb8
       el1_irq+0xb8/0x180
       _raw_spin_unlock_irqrestore+0x14/0x40
       __setup_irq+0x4bc/0x798
       request_threaded_irq+0xd8/0x190
       devm_request_threaded_irq+0x74/0xe8
       fsl_qdma_probe+0x4d4/0xca8
       platform_drv_probe+0x50/0xa0
       really_probe+0xe0/0x3f8
       driver_probe_device+0x64/0x130
       device_driver_attach+0x6c/0x78
       __driver_attach+0xbc/0x158
       bus_for_each_dev+0x5c/0x98
       driver_attach+0x20/0x28
       bus_add_driver+0x158/0x220
       driver_register+0x60/0x110
       __platform_driver_register+0x44/0x50
       fsl_qdma_driver_init+0x18/0x20
       do_one_initcall+0x48/0x258
       kernel_init_freeable+0x1a4/0x23c
       kernel_init+0x10/0xf8
       ret_from_fork+0x10/0x18
    
    Cc: stable@vger.kernel.org
    Fixes: b092529 ("dmaengine: fsl-qdma: Add qDMA controller driver for Layerscape SoCs")
    Signed-off-by: Curtis Klein <curtis.klein@hpe.com>
    Signed-off-by: Yi Zhao <yi.zhao@nxp.com>
    Signed-off-by: Frank Li <Frank.Li@nxp.com>
    Link: https://lore.kernel.org/r/20240201220406.440145-1-Frank.Li@nxp.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    curtistklein authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    a69c8bb View commit details
    Browse the repository at this point in the history
  55. mmc: mmci: stm32: fix DMA API overlapping mappings warning

    commit 6b1ba3f upstream.
    
    Turning on CONFIG_DMA_API_DEBUG_SG results in the following warning:
    
    DMA-API: mmci-pl18x 48220000.mmc: cacheline tracking EEXIST,
    overlapping mappings aren't supported
    WARNING: CPU: 1 PID: 51 at kernel/dma/debug.c:568
    add_dma_entry+0x234/0x2f4
    Modules linked in:
    CPU: 1 PID: 51 Comm: kworker/1:2 Not tainted 6.1.28 #1
    Hardware name: STMicroelectronics STM32MP257F-EV1 Evaluation Board (DT)
    Workqueue: events_freezable mmc_rescan
    Call trace:
    add_dma_entry+0x234/0x2f4
    debug_dma_map_sg+0x198/0x350
    __dma_map_sg_attrs+0xa0/0x110
    dma_map_sg_attrs+0x10/0x2c
    sdmmc_idma_prep_data+0x80/0xc0
    mmci_prep_data+0x38/0x84
    mmci_start_data+0x108/0x2dc
    mmci_request+0xe4/0x190
    __mmc_start_request+0x68/0x140
    mmc_start_request+0x94/0xc0
    mmc_wait_for_req+0x70/0x100
    mmc_send_tuning+0x108/0x1ac
    sdmmc_execute_tuning+0x14c/0x210
    mmc_execute_tuning+0x48/0xec
    mmc_sd_init_uhs_card.part.0+0x208/0x464
    mmc_sd_init_card+0x318/0x89c
    mmc_attach_sd+0xe4/0x180
    mmc_rescan+0x244/0x320
    
    DMA API debug brings to light leaking dma-mappings as dma_map_sg and
    dma_unmap_sg are not correctly balanced.
    
    If an error occurs in mmci_cmd_irq function, only mmci_dma_error
    function is called and as this API is not managed on stm32 variant,
    dma_unmap_sg is never called in this error path.
    
    Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
    Fixes: 46b723d ("mmc: mmci: add stm32 sdmmc variant")
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20240207143951.938144-1-christophe.kerello@foss.st.com
    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Christophe Kerello authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    176e662 View commit details
    Browse the repository at this point in the history
  56. mmc: core: Fix eMMC initialization with 1-bit bus connection

    commit ff3206d upstream.
    
    Initializing an eMMC that's connected via a 1-bit bus is current failing,
    if the HW (DT) informs that 4-bit bus is supported. In fact this is a
    regression, as we were earlier capable of falling back to 1-bit mode, when
    switching to 4/8-bit bus failed. Therefore, let's restore the behaviour.
    
    Log for Samsung eMMC 5.1 chip connected via 1bit bus (only D0 pin)
    Before patch:
    [134509.044225] mmc0: switch to bus width 4 failed
    [134509.044509] mmc0: new high speed MMC card at address 0001
    [134509.054594] mmcblk0: mmc0:0001 BGUF4R 29.1 GiB
    [134509.281602] mmc0: switch to bus width 4 failed
    [134509.282638] I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
    [134509.282657] Buffer I/O error on dev mmcblk0, logical block 0, async page read
    [134509.284598] I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
    [134509.284602] Buffer I/O error on dev mmcblk0, logical block 0, async page read
    [134509.284609] ldm_validate_partition_table(): Disk read failed.
    [134509.286495] I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
    [134509.286500] Buffer I/O error on dev mmcblk0, logical block 0, async page read
    [134509.288303] I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
    [134509.288308] Buffer I/O error on dev mmcblk0, logical block 0, async page read
    [134509.289540] I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
    [134509.289544] Buffer I/O error on dev mmcblk0, logical block 0, async page read
    [134509.289553]  mmcblk0: unable to read partition table
    [134509.289728] mmcblk0boot0: mmc0:0001 BGUF4R 31.9 MiB
    [134509.290283] mmcblk0boot1: mmc0:0001 BGUF4R 31.9 MiB
    [134509.294577] I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2
    [134509.295835] I/O error, dev mmcblk0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
    [134509.295841] Buffer I/O error on dev mmcblk0, logical block 0, async page read
    
    After patch:
    
    [134551.089613] mmc0: switch to bus width 4 failed
    [134551.090377] mmc0: new high speed MMC card at address 0001
    [134551.102271] mmcblk0: mmc0:0001 BGUF4R 29.1 GiB
    [134551.113365]  mmcblk0: p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 p16 p17 p18 p19 p20 p21
    [134551.114262] mmcblk0boot0: mmc0:0001 BGUF4R 31.9 MiB
    [134551.114925] mmcblk0boot1: mmc0:0001 BGUF4R 31.9 MiB
    
    Fixes: 577fb13 ("mmc: rework selection of bus speed mode")
    Cc: stable@vger.kernel.org
    Signed-off-by: Ivan Semenov <ivan@semenov.dev>
    Link: https://lore.kernel.org/r/20240206172845.34316-1-ivan@semenov.dev
    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Ivan Semenov authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    4344444 View commit details
    Browse the repository at this point in the history
  57. mmc: sdhci-xenon: add timeout for PHY init complete

    commit 09e2382 upstream.
    
    AC5X spec says PHY init complete bit must be polled until zero.
    We see cases in which timeout can take longer than the standard
    calculation on AC5X, which is expected following the spec comment above.
    According to the spec, we must wait as long as it takes for that bit to
    toggle on AC5X.
    Cap that with 100 delay loops so we won't get stuck forever.
    
    Fixes: 06c8b66 ("mmc: sdhci-xenon: Add support to PHYs of Marvell Xenon SDHC")
    Acked-by: Adrian Hunter <adrian.hunter@intel.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Elad Nachman <enachman@marvell.com>
    Link: https://lore.kernel.org/r/20240222191714.1216470-3-enachman@marvell.com
    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    eladnachman authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    b4eacb3 View commit details
    Browse the repository at this point in the history
  58. mmc: sdhci-xenon: fix PHY init clock stability

    commit 8e9f25a upstream.
    
    Each time SD/mmc phy is initialized, at times, in some of
    the attempts, phy fails to completes its initialization
    which results into timeout error. Per the HW spec, it is
    a pre-requisite to ensure a stable SD clock before a phy
    initialization is attempted.
    
    Fixes: 06c8b66 ("mmc: sdhci-xenon: Add support to PHYs of Marvell Xenon SDHC")
    Acked-by: Adrian Hunter <adrian.hunter@intel.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Elad Nachman <enachman@marvell.com>
    Link: https://lore.kernel.org/r/20240222200930.1277665-1-enachman@marvell.com
    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    eladnachman authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    aebd67a View commit details
    Browse the repository at this point in the history
  59. RISC-V: Drop invalid test from CONFIG_AS_HAS_OPTION_ARCH

    commit 3aff0c4 upstream.
    
    Commit e4bb020 ("riscv: detect assembler support for .option arch")
    added two tests, one for a valid value to '.option arch' that should
    succeed and one for an invalid value that is expected to fail to make
    sure that support for '.option arch' is properly detected because Clang
    does not error when '.option arch' is not supported:
    
      $ clang --target=riscv64-linux-gnu -Werror -x assembler -c -o /dev/null <(echo '.option arch, +m')
      /dev/fd/63:1:9: warning: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'relax' or 'norelax'
      .option arch, +m
              ^
      $ echo $?
      0
    
    Unfortunately, the invalid test started being accepted by Clang after
    the linked llvm-project change, which causes CONFIG_AS_HAS_OPTION_ARCH
    and configurations that depend on it to be silently disabled, even
    though those versions do support '.option arch'.
    
    The invalid test can be avoided altogether by using
    '-Wa,--fatal-warnings', which will turn all assembler warnings into
    errors, like '-Werror' does for the compiler:
    
      $ clang --target=riscv64-linux-gnu -Werror -Wa,--fatal-warnings -x assembler -c -o /dev/null <(echo '.option arch, +m')
      /dev/fd/63:1:9: error: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'relax' or 'norelax'
      .option arch, +m
              ^
      $ echo $?
      1
    
    The as-instr macros have been updated to make use of this flag, so
    remove the invalid test, which allows CONFIG_AS_HAS_OPTION_ARCH to work
    for all compiler versions.
    
    Cc: stable@vger.kernel.org
    Fixes: e4bb020 ("riscv: detect assembler support for .option arch")
    Link: llvm/llvm-project@3ac9fe6
    Reported-by: Eric Biggers <ebiggers@kernel.org>
    Closes: https://lore.kernel.org/r/20240121011341.GA97368@sol.localdomain/
    Signed-off-by: Nathan Chancellor <nathan@kernel.org>
    Tested-by: Eric Biggers <ebiggers@google.com>
    Tested-by: Andy Chiu <andybnac@gmail.com>
    Reviewed-by: Andy Chiu <andybnac@gmail.com>
    Tested-by: Conor Dooley <conor.dooley@microchip.com>
    Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
    Acked-by: Masahiro Yamada <masahiroy@kernel.org>
    Link: https://lore.kernel.org/r/20240125-fix-riscv-option-arch-llvm-18-v1-2-390ac9cc3cd0@kernel.org
    Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    nathanchance authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    0c8a3d3 View commit details
    Browse the repository at this point in the history
  60. riscv: add CALLER_ADDRx support

    commit 6803413 upstream.
    
    CALLER_ADDRx returns caller's address at specified level, they are used
    for several tracers. These macros eventually use
    __builtin_return_address(n) to get the caller's address if arch doesn't
    define their own implementation.
    
    In RISC-V, __builtin_return_address(n) only works when n == 0, we need
    to walk the stack frame to get the caller's address at specified level.
    
    data.level started from 'level + 3' due to the call flow of getting
    caller's address in RISC-V implementation. If we don't have additional
    three iteration, the level is corresponding to follows:
    
    callsite -> return_address -> arch_stack_walk -> walk_stackframe
    |           |                 |                  |
    level 3     level 2           level 1            level 0
    
    Fixes: 10626c3 ("riscv/ftrace: Add basic support")
    Cc: stable@vger.kernel.org
    Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
    Signed-off-by: Zong Li <zong.li@sifive.com>
    Link: https://lore.kernel.org/r/20240202015102.26251-1-zong.li@sifive.com
    Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    zongbox authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    9537603 View commit details
    Browse the repository at this point in the history
  61. kbuild: Add -Wa,--fatal-warnings to as-instr invocation

    commit 0ee695a upstream.
    
    Certain assembler instruction tests may only induce warnings from the
    assembler on an unsupported instruction or option, which causes as-instr
    to succeed when it was expected to fail. Some tests workaround this
    limitation by additionally testing that invalid input fails as expected.
    However, this is fragile if the assembler is changed to accept the
    invalid input, as it will cause the instruction/option to be unavailable
    like it was unsupported even when it is.
    
    Use '-Wa,--fatal-warnings' in the as-instr macro to turn these warnings
    into hard errors, which avoids this fragility and makes tests more
    robust and well formed.
    
    Cc: stable@vger.kernel.org
    Suggested-by: Eric Biggers <ebiggers@kernel.org>
    Signed-off-by: Nathan Chancellor <nathan@kernel.org>
    Tested-by: Eric Biggers <ebiggers@google.com>
    Tested-by: Andy Chiu <andybnac@gmail.com>
    Reviewed-by: Andy Chiu <andybnac@gmail.com>
    Tested-by: Conor Dooley <conor.dooley@microchip.com>
    Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
    Acked-by: Masahiro Yamada <masahiroy@kernel.org>
    Link: https://lore.kernel.org/r/20240125-fix-riscv-option-arch-llvm-18-v1-1-390ac9cc3cd0@kernel.org
    Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    nathanchance authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    8db4f87 View commit details
    Browse the repository at this point in the history
  62. iommufd: Fix iopt_access_list_id overwrite bug

    commit aeb004c upstream.
    
    Syzkaller reported the following WARN_ON:
      WARNING: CPU: 1 PID: 4738 at drivers/iommu/iommufd/io_pagetable.c:1360
    
      Call Trace:
       iommufd_access_change_ioas+0x2fe/0x4e0
       iommufd_access_destroy_object+0x50/0xb0
       iommufd_object_remove+0x2a3/0x490
       iommufd_object_destroy_user
       iommufd_access_destroy+0x71/0xb0
       iommufd_test_staccess_release+0x89/0xd0
       __fput+0x272/0xb50
       __fput_sync+0x4b/0x60
       __do_sys_close
       __se_sys_close
       __x64_sys_close+0x8b/0x110
       do_syscall_x64
    
    The mismatch between the access pointer in the list and the passed-in
    pointer is resulting from an overwrite of access->iopt_access_list_id, in
    iopt_add_access(). Called from iommufd_access_change_ioas() when
    xa_alloc() succeeds but iopt_calculate_iova_alignment() fails.
    
    Add a new_id in iopt_add_access() and only update iopt_access_list_id when
    returning successfully.
    
    Cc: stable@vger.kernel.org
    Fixes: 9227da7 ("iommufd: Add iommufd_access_change_ioas(_id) helpers")
    Link: https://lore.kernel.org/r/2dda7acb25b8562ec5f1310de828ef5da9ef509c.1708636627.git.nicolinc@nvidia.com
    Reported-by: Jason Gunthorpe <jgg@nvidia.com>
    Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
    Signed-off-by: Nicolin Chen <nicolinc@nvidia.com>
    Reviewed-by: Kevin Tian <kevin.tian@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    nicolinc authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    f1fb745 View commit details
    Browse the repository at this point in the history
  63. efivarfs: Request at most 512 bytes for variable names

    commit f45812c upstream.
    
    Work around a quirk in a few old (2011-ish) UEFI implementations, where
    a call to `GetNextVariableName` with a buffer size larger than 512 bytes
    will always return EFI_INVALID_PARAMETER.
    
    There is some lore around EFI variable names being up to 1024 bytes in
    size, but this has no basis in the UEFI specification, and the upper
    bounds are typically platform specific, and apply to the entire variable
    (name plus payload).
    
    Given that Linux does not permit creating files with names longer than
    NAME_MAX (255) bytes, 512 bytes (== 256 UTF-16 characters) is a
    reasonable limit.
    
    Cc: <stable@vger.kernel.org> # 6.1+
    Signed-off-by: Tim Schumacher <timschumi@gmx.de>
    Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    timschumi authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    71da10e View commit details
    Browse the repository at this point in the history
  64. pmdomain: qcom: rpmhpd: Fix enabled_corner aggregation

    commit 2a93c6c upstream.
    
    Commit 'e3e56c050ab6 ("soc: qcom: rpmhpd: Make power_on actually enable
    the domain")' aimed to make sure that a power-domain that is being
    enabled without any particular performance-state requested will at least
    turn the rail on, to avoid filling DeviceTree with otherwise unnecessary
    required-opps properties.
    
    But in the event that aggregation happens on a disabled power-domain, with
    an enabled peer without performance-state, both the local and peer
    corner are 0. The peer's enabled_corner is not considered, with the
    result that the underlying (shared) resource is disabled.
    
    One case where this can be observed is when the display stack keeps mmcx
    enabled (but without a particular performance-state vote) in order to
    access registers and sync_state happens in the rpmhpd driver. As mmcx_ao
    is flushed the state of the peer (mmcx) is not considered and mmcx_ao
    ends up turning off "mmcx.lvl" underneath mmcx. This has been observed
    several times, but has been painted over in DeviceTree by adding an
    explicit vote for the lowest non-disabled performance-state.
    
    Fixes: e3e56c0 ("soc: qcom: rpmhpd: Make power_on actually enable the domain")
    Reported-by: Johan Hovold <johan@kernel.org>
    Closes: https://lore.kernel.org/linux-arm-msm/ZdMwZa98L23mu3u6@hovoldconsulting.com/
    Cc:  <stable@vger.kernel.org>
    Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
    Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
    Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
    Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
    Reviewed-by: Stephen Boyd <swboyd@chromium.org>
    Tested-by: Johan Hovold <johan+linaro@kernel.org>
    Link: https://lore.kernel.org/r/20240226-rpmhpd-enable-corner-fix-v1-1-68c004cec48c@quicinc.com
    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    quic-bjorande authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    e9eeb0d View commit details
    Browse the repository at this point in the history
  65. mm/debug_vm_pgtable: fix BUG_ON with pud advanced test

    commit 720da1e upstream.
    
    Architectures like powerpc add debug checks to ensure we find only devmap
    PUD pte entries.  These debug checks are only done with CONFIG_DEBUG_VM.
    This patch marks the ptes used for PUD advanced test devmap pte entries so
    that we don't hit on debug checks on architecture like ppc64 as below.
    
    WARNING: CPU: 2 PID: 1 at arch/powerpc/mm/book3s64/radix_pgtable.c:1382 radix__pud_hugepage_update+0x38/0x138
    ....
    NIP [c0000000000a7004] radix__pud_hugepage_update+0x38/0x138
    LR [c0000000000a77a8] radix__pudp_huge_get_and_clear+0x28/0x60
    Call Trace:
    [c000000004a2f950] [c000000004a2f9a0] 0xc000000004a2f9a0 (unreliable)
    [c000000004a2f980] [000d34c100000000] 0xd34c100000000
    [c000000004a2f9a0] [c00000000206ba98] pud_advanced_tests+0x118/0x334
    [c000000004a2fa40] [c00000000206db34] debug_vm_pgtable+0xcbc/0x1c48
    [c000000004a2fc10] [c00000000000fd28] do_one_initcall+0x60/0x388
    
    Also
    
     kernel BUG at arch/powerpc/mm/book3s64/pgtable.c:202!
     ....
    
     NIP [c000000000096510] pudp_huge_get_and_clear_full+0x98/0x174
     LR [c00000000206bb34] pud_advanced_tests+0x1b4/0x334
     Call Trace:
     [c000000004a2f950] [000d34c100000000] 0xd34c100000000 (unreliable)
     [c000000004a2f9a0] [c00000000206bb34] pud_advanced_tests+0x1b4/0x334
     [c000000004a2fa40] [c00000000206db34] debug_vm_pgtable+0xcbc/0x1c48
     [c000000004a2fc10] [c00000000000fd28] do_one_initcall+0x60/0x388
    
    Link: https://lkml.kernel.org/r/20240129060022.68044-1-aneesh.kumar@kernel.org
    Fixes: 27af67f ("powerpc/book3s64/mm: enable transparent pud hugepage")
    Signed-off-by: Aneesh Kumar K.V (IBM) <aneesh.kumar@kernel.org>
    Cc: Anshuman Khandual <anshuman.khandual@arm.com>
    Cc: Michael Ellerman <mpe@ellerman.id.au>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    kvaneesh authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    d2a9510 View commit details
    Browse the repository at this point in the history
  66. x86/e820: Don't reserve SETUP_RNG_SEED in e820

    commit 7fd817c upstream.
    
    SETUP_RNG_SEED in setup_data is supplied by kexec and should
    not be reserved in the e820 map.
    
    Doing so reserves 16 bytes of RAM when booting with kexec.
    (16 bytes because data->len is zeroed by parse_setup_data so only
    sizeof(setup_data) is reserved.)
    
    When kexec is used repeatedly, each boot adds two entries in the
    kexec-provided e820 map as the 16-byte range splits a larger
    range of usable memory. Eventually all of the 128 available entries
    get used up. The next split will result in losing usable memory
    as the new entries cannot be added to the e820 map.
    
    Fixes: 68b8e97 ("x86/setup: Use rng seeds from setup_data")
    Signed-off-by: Jiri Bohac <jbohac@suse.cz>
    Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
    Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: <stable@kernel.org>
    Link: https://lore.kernel.org/r/ZbmOjKnARGiaYBd5@dwarf.suse.cz
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    jiribohac authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    c43b984 View commit details
    Browse the repository at this point in the history
  67. x86/cpu/intel: Detect TME keyid bits before setting MTRR mask registers

    commit 6890cb1 upstream.
    
    MKTME repurposes the high bit of physical address to key id for encryption
    key and, even though MAXPHYADDR in CPUID[0x80000008] remains the same,
    the valid bits in the MTRR mask register are based on the reduced number
    of physical address bits.
    
    detect_tme() in arch/x86/kernel/cpu/intel.c detects TME and subtracts
    it from the total usable physical bits, but it is called too late.
    Move the call to early_init_intel() so that it is called in setup_arch(),
    before MTRRs are setup.
    
    This fixes boot on TDX-enabled systems, which until now only worked with
    "disable_mtrr_cleanup".  Without the patch, the values written to the
    MTRRs mask registers were 52-bit wide (e.g. 0x000fffff_80000800) and
    the writes failed; with the patch, the values are 46-bit wide, which
    matches the reduced MAXPHYADDR that is shown in /proc/cpuinfo.
    
    Reported-by: Zixi Chen <zixchen@redhat.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
    Cc:stable@vger.kernel.org
    Link: https://lore.kernel.org/all/20240131230902.1867092-3-pbonzini%40redhat.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    bonzini authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    dff60a5 View commit details
    Browse the repository at this point in the history
  68. mptcp: map v4 address to v6 when destroying subflow

    commit 535d620 upstream.
    
    Address family of server side mismatches with that of client side, like
    in "userspace pm add & remove address" test:
    
        userspace_pm_add_addr $ns1 10.0.2.1 10
        userspace_pm_rm_sf $ns1 "::ffff:10.0.2.1" $SUB_ESTABLISHED
    
    That's because on the server side, the family is set to AF_INET6 and the
    v4 address is mapped in a v6 one.
    
    This patch fixes this issue. In mptcp_pm_nl_subflow_destroy_doit(), before
    checking local address family with remote address family, map an IPv4
    address to an IPv6 address if the pair is a v4-mapped address.
    
    Closes: multipath-tcp/mptcp_net-next#387
    Fixes: 702c2f6 ("mptcp: netlink: allow userspace-driven subflow establishment")
    Cc: stable@vger.kernel.org
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Reviewed-by: Mat Martineau <martineau@kernel.org>
    Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-1-162e87e48497@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Geliang Tang authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    a49ecbe View commit details
    Browse the repository at this point in the history
  69. mptcp: avoid printing warning once on client side

    commit 5b49c41 upstream.
    
    After the 'Fixes' commit mentioned below, the client side might print
    the following warning once when a subflow is fully established at the
    reception of any valid additional ack:
    
      MPTCP: bogus mpc option on established client sk
    
    That's a normal situation, and no warning should be printed for that. We
    can then skip the check when the label is used.
    
    Fixes: e4a0fa4 ("mptcp: corner case locking for rx path fields initialization")
    Cc: stable@vger.kernel.org
    Suggested-by: Paolo Abeni <pabeni@redhat.com>
    Reviewed-by: Mat Martineau <martineau@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-3-162e87e48497@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    matttbe authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    fca4e6a View commit details
    Browse the repository at this point in the history
  70. mptcp: push at DSS boundaries

    commit b9cd26f upstream.
    
    when inserting not contiguous data in the subflow write queue,
    the protocol creates a new skb and prevent the TCP stack from
    merging it later with already queued skbs by setting the EOR marker.
    
    Still no push flag is explicitly set at the end of previous GSO
    packet, making the aggregation on the receiver side sub-optimal -
    and packetdrill self-tests less predictable.
    
    Explicitly mark the end of not contiguous DSS with the push flag.
    
    Fixes: 6d0060f ("mptcp: Write MPTCP DSS headers to outgoing data packets")
    Cc: stable@vger.kernel.org
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Reviewed-by: Mat Martineau <martineau@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-4-162e87e48497@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Paolo Abeni authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    48428b0 View commit details
    Browse the repository at this point in the history
  71. selftests: mptcp: join: add ss mptcp support check

    commit 9480f38 upstream.
    
    Commands 'ss -M' are used in script mptcp_join.sh to display only MPTCP
    sockets. So it must be checked if ss tool supports MPTCP in this script.
    
    Fixes: e274f71 ("selftests: mptcp: add subflow limits test-cases")
    Cc: stable@vger.kernel.org
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-7-162e87e48497@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Geliang Tang authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    536a661 View commit details
    Browse the repository at this point in the history
  72. mptcp: fix snd_wnd initialization for passive socket

    commit adf1bb7 upstream.
    
    Such value should be inherited from the first subflow, but
    passive sockets always used 'rsk_rcv_wnd'.
    
    Fixes: 6f8a612 ("mptcp: keep track of advertised windows right edge")
    Cc: stable@vger.kernel.org
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Reviewed-by: Mat Martineau <martineau@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-5-162e87e48497@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Paolo Abeni authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    ae5530c View commit details
    Browse the repository at this point in the history
  73. mptcp: fix potential wake-up event loss

    commit b111d8f upstream.
    
    After the blamed commit below, the send buffer auto-tuning can
    happen after that the mptcp_propagate_sndbuf() completes - via
    the delegated action infrastructure.
    
    We must check for write space even after such change or we risk
    missing the wake-up event.
    
    Fixes: 8005184 ("mptcp: refactor sndbuf auto-tuning")
    Cc: stable@vger.kernel.org
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Reviewed-by: Mat Martineau <martineau@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-6-162e87e48497@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Paolo Abeni authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    b609ecd View commit details
    Browse the repository at this point in the history
  74. mptcp: fix double-free on socket dismantle

    commit 1004868 upstream.
    
    when MPTCP server accepts an incoming connection, it clones its listener
    socket. However, the pointer to 'inet_opt' for the new socket has the same
    value as the original one: as a consequence, on program exit it's possible
    to observe the following splat:
    
      BUG: KASAN: double-free in inet_sock_destruct+0x54f/0x8b0
      Free of addr ffff888485950880 by task swapper/25/0
    
      CPU: 25 PID: 0 Comm: swapper/25 Kdump: loaded Not tainted 6.8.0-rc1+ torvalds#609
      Hardware name: Supermicro SYS-6027R-72RF/X9DRH-7TF/7F/iTF/iF, BIOS 3.0  07/26/2013
      Call Trace:
       <IRQ>
       dump_stack_lvl+0x32/0x50
       print_report+0xca/0x620
       kasan_report_invalid_free+0x64/0x90
       __kasan_slab_free+0x1aa/0x1f0
       kfree+0xed/0x2e0
       inet_sock_destruct+0x54f/0x8b0
       __sk_destruct+0x48/0x5b0
       rcu_do_batch+0x34e/0xd90
       rcu_core+0x559/0xac0
       __do_softirq+0x183/0x5a4
       irq_exit_rcu+0x12d/0x170
       sysvec_apic_timer_interrupt+0x6b/0x80
       </IRQ>
       <TASK>
       asm_sysvec_apic_timer_interrupt+0x16/0x20
      RIP: 0010:cpuidle_enter_state+0x175/0x300
      Code: 30 00 0f 84 1f 01 00 00 83 e8 01 83 f8 ff 75 e5 48 83 c4 18 44 89 e8 5b 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc fb 45 85 ed <0f> 89 60 ff ff ff 48 c1 e5 06 48 c7 43 18 00 00 00 00 48 83 44 2b
      RSP: 0018:ffff888481cf7d90 EFLAGS: 00000202
      RAX: 0000000000000000 RBX: ffff88887facddc8 RCX: 0000000000000000
      RDX: 1ffff1110ff588b1 RSI: 0000000000000019 RDI: ffff88887fac4588
      RBP: 0000000000000004 R08: 0000000000000002 R09: 0000000000043080
      R10: 0009b02ea273363f R11: ffff88887fabf42b R12: ffffffff932592e0
      R13: 0000000000000004 R14: 0000000000000000 R15: 00000022c880ec80
       cpuidle_enter+0x4a/0xa0
       do_idle+0x310/0x410
       cpu_startup_entry+0x51/0x60
       start_secondary+0x211/0x270
       secondary_startup_64_no_verify+0x184/0x18b
       </TASK>
    
      Allocated by task 6853:
       kasan_save_stack+0x1c/0x40
       kasan_save_track+0x10/0x30
       __kasan_kmalloc+0xa6/0xb0
       __kmalloc+0x1eb/0x450
       cipso_v4_sock_setattr+0x96/0x360
       netlbl_sock_setattr+0x132/0x1f0
       selinux_netlbl_socket_post_create+0x6c/0x110
       selinux_socket_post_create+0x37b/0x7f0
       security_socket_post_create+0x63/0xb0
       __sock_create+0x305/0x450
       __sys_socket_create.part.23+0xbd/0x130
       __sys_socket+0x37/0xb0
       __x64_sys_socket+0x6f/0xb0
       do_syscall_64+0x83/0x160
       entry_SYSCALL_64_after_hwframe+0x6e/0x76
    
      Freed by task 6858:
       kasan_save_stack+0x1c/0x40
       kasan_save_track+0x10/0x30
       kasan_save_free_info+0x3b/0x60
       __kasan_slab_free+0x12c/0x1f0
       kfree+0xed/0x2e0
       inet_sock_destruct+0x54f/0x8b0
       __sk_destruct+0x48/0x5b0
       subflow_ulp_release+0x1f0/0x250
       tcp_cleanup_ulp+0x6e/0x110
       tcp_v4_destroy_sock+0x5a/0x3a0
       inet_csk_destroy_sock+0x135/0x390
       tcp_fin+0x416/0x5c0
       tcp_data_queue+0x1bc8/0x4310
       tcp_rcv_state_process+0x15a3/0x47b0
       tcp_v4_do_rcv+0x2c1/0x990
       tcp_v4_rcv+0x41fb/0x5ed0
       ip_protocol_deliver_rcu+0x6d/0x9f0
       ip_local_deliver_finish+0x278/0x360
       ip_local_deliver+0x182/0x2c0
       ip_rcv+0xb5/0x1c0
       __netif_receive_skb_one_core+0x16e/0x1b0
       process_backlog+0x1e3/0x650
       __napi_poll+0xa6/0x500
       net_rx_action+0x740/0xbb0
       __do_softirq+0x183/0x5a4
    
      The buggy address belongs to the object at ffff888485950880
       which belongs to the cache kmalloc-64 of size 64
      The buggy address is located 0 bytes inside of
       64-byte region [ffff888485950880, ffff8884859508c0)
    
      The buggy address belongs to the physical page:
      page:0000000056d1e95e refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888485950700 pfn:0x485950
      flags: 0x57ffffc0000800(slab|node=1|zone=2|lastcpupid=0x1fffff)
      page_type: 0xffffffff()
      raw: 0057ffffc0000800 ffff88810004c640 ffffea00121b8ac0 dead000000000006
      raw: ffff888485950700 0000000000200019 00000001ffffffff 0000000000000000
      page dumped because: kasan: bad access detected
    
      Memory state around the buggy address:
       ffff888485950780: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
       ffff888485950800: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
      >ffff888485950880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
                         ^
       ffff888485950900: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
       ffff888485950980: 00 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc
    
    Something similar (a refcount underflow) happens with CALIPSO/IPv6. Fix
    this by duplicating IP / IPv6 options after clone, so that
    ip{,6}_sock_destruct() doesn't end up freeing the same memory area twice.
    
    Fixes: cf7da0d ("mptcp: Create SUBFLOW socket for incoming connections")
    Cc: stable@vger.kernel.org
    Signed-off-by: Davide Caratti <dcaratti@redhat.com>
    Reviewed-by: Mat Martineau <martineau@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-8-162e87e48497@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    dcaratti authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    ce0809a View commit details
    Browse the repository at this point in the history
  75. mptcp: fix possible deadlock in subflow diag

    commit d6a9608 upstream.
    
    Syzbot and Eric reported a lockdep splat in the subflow diag:
    
       WARNING: possible circular locking dependency detected
       6.8.0-rc4-syzkaller-00212-g40b9385dd8e6 #0 Not tainted
    
       syz-executor.2/24141 is trying to acquire lock:
       ffff888045870130 (k-sk_lock-AF_INET6){+.+.}-{0:0}, at:
       tcp_diag_put_ulp net/ipv4/tcp_diag.c:100 [inline]
       ffff888045870130 (k-sk_lock-AF_INET6){+.+.}-{0:0}, at:
       tcp_diag_get_aux+0x738/0x830 net/ipv4/tcp_diag.c:137
    
       but task is already holding lock:
       ffffc9000135e488 (&h->lhash2[i].lock){+.+.}-{2:2}, at: spin_lock
       include/linux/spinlock.h:351 [inline]
       ffffc9000135e488 (&h->lhash2[i].lock){+.+.}-{2:2}, at:
       inet_diag_dump_icsk+0x39f/0x1f80 net/ipv4/inet_diag.c:1038
    
       which lock already depends on the new lock.
    
       the existing dependency chain (in reverse order) is:
    
       -> #1 (&h->lhash2[i].lock){+.+.}-{2:2}:
       lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754
       __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
       _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154
       spin_lock include/linux/spinlock.h:351 [inline]
       __inet_hash+0x335/0xbe0 net/ipv4/inet_hashtables.c:743
       inet_csk_listen_start+0x23a/0x320 net/ipv4/inet_connection_sock.c:1261
       __inet_listen_sk+0x2a2/0x770 net/ipv4/af_inet.c:217
       inet_listen+0xa3/0x110 net/ipv4/af_inet.c:239
       rds_tcp_listen_init+0x3fd/0x5a0 net/rds/tcp_listen.c:316
       rds_tcp_init_net+0x141/0x320 net/rds/tcp.c:577
       ops_init+0x352/0x610 net/core/net_namespace.c:136
       __register_pernet_operations net/core/net_namespace.c:1214 [inline]
       register_pernet_operations+0x2cb/0x660 net/core/net_namespace.c:1283
       register_pernet_device+0x33/0x80 net/core/net_namespace.c:1370
       rds_tcp_init+0x62/0xd0 net/rds/tcp.c:735
       do_one_initcall+0x238/0x830 init/main.c:1236
       do_initcall_level+0x157/0x210 init/main.c:1298
       do_initcalls+0x3f/0x80 init/main.c:1314
       kernel_init_freeable+0x42f/0x5d0 init/main.c:1551
       kernel_init+0x1d/0x2a0 init/main.c:1441
       ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
       ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242
    
       -> #0 (k-sk_lock-AF_INET6){+.+.}-{0:0}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain+0x18ca/0x58e0 kernel/locking/lockdep.c:3869
       __lock_acquire+0x1345/0x1fd0 kernel/locking/lockdep.c:5137
       lock_acquire+0x1e3/0x530 kernel/locking/lockdep.c:5754
       lock_sock_fast include/net/sock.h:1723 [inline]
       subflow_get_info+0x166/0xd20 net/mptcp/diag.c:28
       tcp_diag_put_ulp net/ipv4/tcp_diag.c:100 [inline]
       tcp_diag_get_aux+0x738/0x830 net/ipv4/tcp_diag.c:137
       inet_sk_diag_fill+0x10ed/0x1e00 net/ipv4/inet_diag.c:345
       inet_diag_dump_icsk+0x55b/0x1f80 net/ipv4/inet_diag.c:1061
       __inet_diag_dump+0x211/0x3a0 net/ipv4/inet_diag.c:1263
       inet_diag_dump_compat+0x1c1/0x2d0 net/ipv4/inet_diag.c:1371
       netlink_dump+0x59b/0xc80 net/netlink/af_netlink.c:2264
       __netlink_dump_start+0x5df/0x790 net/netlink/af_netlink.c:2370
       netlink_dump_start include/linux/netlink.h:338 [inline]
       inet_diag_rcv_msg_compat+0x209/0x4c0 net/ipv4/inet_diag.c:1405
       sock_diag_rcv_msg+0xe7/0x410
       netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2543
       sock_diag_rcv+0x2a/0x40 net/core/sock_diag.c:280
       netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline]
       netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1367
       netlink_sendmsg+0xa3b/0xd70 net/netlink/af_netlink.c:1908
       sock_sendmsg_nosec net/socket.c:730 [inline]
       __sock_sendmsg+0x221/0x270 net/socket.c:745
       ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584
       ___sys_sendmsg net/socket.c:2638 [inline]
       __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667
       do_syscall_64+0xf9/0x240
       entry_SYSCALL_64_after_hwframe+0x6f/0x77
    
    As noted by Eric we can break the lock dependency chain avoid
    dumping any extended info for the mptcp subflow listener:
    nothing actually useful is presented there.
    
    Fixes: b8adb69 ("mptcp: fix lockless access in subflow ULP diag")
    Cc: stable@vger.kernel.org
    Reported-by: Eric Dumazet <edumazet@google.com>
    Closes: https://lore.kernel.org/netdev/CANn89iJ=Oecw6OZDwmSYc9HJKQ_G32uN11L+oUcMu+TOD5Xiaw@mail.gmail.com/
    Suggested-by: Eric Dumazet <edumazet@google.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-9-162e87e48497@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Paolo Abeni authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    fa8c776 View commit details
    Browse the repository at this point in the history
  76. NFS: Fix data corruption caused by congestion.

    when AOP_WRITEPAGE_ACTIVATE is returned (as NFS does when it detects
    congestion) it is important that the folio is redirtied.
    nfs_writepage_locked() doesn't do this, so files can become corrupted as
    writes can be lost.
    
    Note that this is not needed in v6.8 as AOP_WRITEPAGE_ACTIVATE cannot be
    returned.  It is needed for kernels v5.18..v6.7.  Prior to 6.3 the patch
    is different as it needs to mention "page", not "folio".
    
    Reported-and-tested-by: Jacek Tomaka <Jacek.Tomaka@poczta.fm>
    Fixes: 6df25e5 ("nfs: remove reliance on bdi congestion")
    Signed-off-by: NeilBrown <neilb@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    neilbrown authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    be8a177 View commit details
    Browse the repository at this point in the history
  77. af_unix: Fix task hung while purging oob_skb in GC.

    commit 25236c9 upstream.
    
    syzbot reported a task hung; at the same time, GC was looping infinitely
    in list_for_each_entry_safe() for OOB skb.  [0]
    
    syzbot demonstrated that the list_for_each_entry_safe() was not actually
    safe in this case.
    
    A single skb could have references for multiple sockets.  If we free such
    a skb in the list_for_each_entry_safe(), the current and next sockets could
    be unlinked in a single iteration.
    
    unix_notinflight() uses list_del_init() to unlink the socket, so the
    prefetched next socket forms a loop itself and list_for_each_entry_safe()
    never stops.
    
    Here, we must use while() and make sure we always fetch the first socket.
    
    [0]:
    Sending NMI from CPU 0 to CPUs 1:
    NMI backtrace for cpu 1
    CPU: 1 PID: 5065 Comm: syz-executor236 Not tainted 6.8.0-rc3-syzkaller-00136-g1f719a2f3fa6 #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
    RIP: 0010:preempt_count arch/x86/include/asm/preempt.h:26 [inline]
    RIP: 0010:check_kcov_mode kernel/kcov.c:173 [inline]
    RIP: 0010:__sanitizer_cov_trace_pc+0xd/0x60 kernel/kcov.c:207
    Code: cc cc cc cc 66 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 65 48 8b 14 25 40 c2 03 00 <65> 8b 05 b4 7c 78 7e a9 00 01 ff 00 48 8b 34 24 74 0f f6 c4 01 74
    RSP: 0018:ffffc900033efa58 EFLAGS: 00000283
    RAX: ffff88807b077800 RBX: ffff88807b077800 RCX: 1ffffffff27b1189
    RDX: ffff88802a5a3b80 RSI: ffffffff8968488d RDI: ffff88807b077f70
    RBP: ffffc900033efbb0 R08: 0000000000000001 R09: fffffbfff27a900c
    R10: ffffffff93d48067 R11: ffffffff8ae000eb R12: ffff88807b077800
    R13: dffffc0000000000 R14: ffff88807b077e40 R15: 0000000000000001
    FS:  0000000000000000(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000564f4fc1e3a8 CR3: 000000000d57a000 CR4: 00000000003506f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    Call Trace:
     <NMI>
     </NMI>
     <TASK>
     unix_gc+0x563/0x13b0 net/unix/garbage.c:319
     unix_release_sock+0xa93/0xf80 net/unix/af_unix.c:683
     unix_release+0x91/0xf0 net/unix/af_unix.c:1064
     __sock_release+0xb0/0x270 net/socket.c:659
     sock_close+0x1c/0x30 net/socket.c:1421
     __fput+0x270/0xb80 fs/file_table.c:376
     task_work_run+0x14f/0x250 kernel/task_work.c:180
     exit_task_work include/linux/task_work.h:38 [inline]
     do_exit+0xa8a/0x2ad0 kernel/exit.c:871
     do_group_exit+0xd4/0x2a0 kernel/exit.c:1020
     __do_sys_exit_group kernel/exit.c:1031 [inline]
     __se_sys_exit_group kernel/exit.c:1029 [inline]
     __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:1029
     do_syscall_x64 arch/x86/entry/common.c:52 [inline]
     do_syscall_64+0xd5/0x270 arch/x86/entry/common.c:83
     entry_SYSCALL_64_after_hwframe+0x6f/0x77
    RIP: 0033:0x7f9d6cbdac09
    Code: Unable to access opcode bytes at 0x7f9d6cbdabdf.
    RSP: 002b:00007fff5952feb8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
    RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9d6cbdac09
    RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
    RBP: 00007f9d6cc552b0 R08: ffffffffffffffb8 R09: 0000000000000006
    R10: 0000000000000006 R11: 0000000000000246 R12: 00007f9d6cc552b0
    R13: 0000000000000000 R14: 00007f9d6cc55d00 R15: 00007f9d6cbabe70
     </TASK>
    
    Reported-by: syzbot+4fa4a2d1f5a5ee06f006@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=4fa4a2d1f5a5ee06f006
    Fixes: 1279f9d ("af_unix: Call kfree_skb() for dead unix_(sk)->oob_skb in GC.")
    Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
    Link: https://lore.kernel.org/r/20240209220453.96053-1-kuniyu@amazon.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    q2ven authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    69e0f04 View commit details
    Browse the repository at this point in the history
  78. af_unix: Drop oob_skb ref before purging queue in GC.

    commit aa82ac5 upstream.
    
    syzbot reported another task hung in __unix_gc().  [0]
    
    The current while loop assumes that all of the left candidates
    have oob_skb and calling kfree_skb(oob_skb) releases the remaining
    candidates.
    
    However, I missed a case that oob_skb has self-referencing fd and
    another fd and the latter sk is placed before the former in the
    candidate list.  Then, the while loop never proceeds, resulting
    the task hung.
    
    __unix_gc() has the same loop just before purging the collected skb,
    so we can call kfree_skb(oob_skb) there and let __skb_queue_purge()
    release all inflight sockets.
    
    [0]:
    Sending NMI from CPU 0 to CPUs 1:
    NMI backtrace for cpu 1
    CPU: 1 PID: 2784 Comm: kworker/u4:8 Not tainted 6.8.0-rc4-syzkaller-01028-g71b605d32017 #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
    Workqueue: events_unbound __unix_gc
    RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x70 kernel/kcov.c:200
    Code: 89 fb e8 23 00 00 00 48 8b 3d 84 f5 1a 0c 48 89 de 5b e9 43 26 57 00 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 <f3> 0f 1e fa 48 8b 04 24 65 48 8b 0d 90 52 70 7e 65 8b 15 91 52 70
    RSP: 0018:ffffc9000a17fa78 EFLAGS: 00000287
    RAX: ffffffff8a0a6108 RBX: ffff88802b6c2640 RCX: ffff88802c0b3b80
    RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000000
    RBP: ffffc9000a17fbf0 R08: ffffffff89383f1d R09: 1ffff1100ee5ff84
    R10: dffffc0000000000 R11: ffffed100ee5ff85 R12: 1ffff110056d84ee
    R13: ffffc9000a17fae0 R14: 0000000000000000 R15: ffffffff8f47b840
    FS:  0000000000000000(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007ffef5687ff8 CR3: 0000000029b34000 CR4: 00000000003506f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    Call Trace:
     <NMI>
     </NMI>
     <TASK>
     __unix_gc+0xe69/0xf40 net/unix/garbage.c:343
     process_one_work kernel/workqueue.c:2633 [inline]
     process_scheduled_works+0x913/0x1420 kernel/workqueue.c:2706
     worker_thread+0xa5f/0x1000 kernel/workqueue.c:2787
     kthread+0x2ef/0x390 kernel/kthread.c:388
     ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
     ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242
     </TASK>
    
    Reported-and-tested-by: syzbot+ecab4d36f920c3574bf9@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=ecab4d36f920c3574bf9
    Fixes: 25236c9 ("af_unix: Fix task hung while purging oob_skb in GC.")
    Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    q2ven authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    e9eac26 View commit details
    Browse the repository at this point in the history
  79. ASoC: cs35l56: fix reversed if statement in cs35l56_dspwait_asp1tx_put()

    commit 4703b01 upstream.
    
    It looks like the "!" character was added accidentally.  The
    regmap_update_bits_check() function is normally going to succeed.  This
    means the rest of the function is unreachable and we don't handle the
    situation where "changed" is true correctly.
    
    Fixes: 07f7d6e ("ASoC: cs35l56: Fix for initializing ASP1 mixer registers")
    Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
    Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com>
    Link: https://lore.kernel.org/r/0c254c07-d1c0-4a5c-a22b-7e135cab032c@moroto.mountain
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Dan Carpenter authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    57e869b View commit details
    Browse the repository at this point in the history
  80. dmaengine: dw-edma: Fix the ch_count hdma callback

    [ Upstream commit cd665bf ]
    
    The current check of ch_en enabled to know the maximum number of available
    hardware channels is wrong as it check the number of ch_en register set
    but all of them are unset at probe. This register is set at the
    dw_hdma_v0_core_start function which is run lately before a DMA transfer.
    
    The HDMA IP have no way to know the number of hardware channels available
    like the eDMA IP, then let set it to maximum channels and let the platform
    set the right number of channels.
    
    Fixes: e74c395 ("dmaengine: dw-edma: Add support for native HDMA")
    Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
    Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
    Link: https://lore.kernel.org/r/20240129-b4-feature_hdma_mainline-v7-1-8e8c1acb7a46@bootlin.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    kmaincent authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    3adea99 View commit details
    Browse the repository at this point in the history
  81. dmaengine: dw-edma: Fix wrong interrupt bit set for HDMA

    [ Upstream commit 7b52ba8 ]
    
    Instead of setting HDMA_V0_LOCAL_ABORT_INT_EN bit, HDMA_V0_LOCAL_STOP_INT_EN
    bit got set twice, due to which the abort interrupt is not getting generated for
    HDMA. Fix it by setting the correct interrupt enable bit.
    
    Fixes: e74c395 ("dmaengine: dw-edma: Add support for native HDMA")
    Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
    Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
    Link: https://lore.kernel.org/r/20240129-b4-feature_hdma_mainline-v7-2-8e8c1acb7a46@bootlin.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    kmaincent authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    8b5657a View commit details
    Browse the repository at this point in the history
  82. dmaengine: dw-edma: HDMA_V0_REMOTEL_STOP_INT_EN typo fix

    [ Upstream commit 930a8a0 ]
    
    Fix "HDMA_V0_REMOTEL_STOP_INT_EN" typo error
    
    Fixes: e74c395 ("dmaengine: dw-edma: Add support for native HDMA")
    Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
    Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
    Link: https://lore.kernel.org/r/20240129-b4-feature_hdma_mainline-v7-3-8e8c1acb7a46@bootlin.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    kmaincent authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    3fa3dfc View commit details
    Browse the repository at this point in the history
  83. dmaengine: dw-edma: Add HDMA remote interrupt configuration

    [ Upstream commit e2f6a57 ]
    
    Only the local interruption was configured, remote interrupt was left
    behind. This patch fix it by setting stop and abort remote interrupts when
    the DW_EDMA_CHIP_LOCAL flag is not set.
    
    Fixes: e74c395 ("dmaengine: dw-edma: Add support for native HDMA")
    Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
    Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
    Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Link: https://lore.kernel.org/r/20240129-b4-feature_hdma_mainline-v7-4-8e8c1acb7a46@bootlin.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    kmaincent authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    55501b7 View commit details
    Browse the repository at this point in the history
  84. dmaengine: dw-edma: HDMA: Add sync read before starting the DMA trans…

    …fer in remote setup
    
    [ Upstream commit 712a92a ]
    
    The Linked list element and pointer are not stored in the same memory as
    the HDMA controller register. If the doorbell register is toggled before
    the full write of the linked list a race condition error will occur.
    In remote setup we can only use a readl to the memory to assure the full
    write has occurred.
    
    Fixes: e74c395 ("dmaengine: dw-edma: Add support for native HDMA")
    Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
    Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
    Link: https://lore.kernel.org/r/20240129-b4-feature_hdma_mainline-v7-5-8e8c1acb7a46@bootlin.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    kmaincent authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    227ef58 View commit details
    Browse the repository at this point in the history
  85. dmaengine: dw-edma: eDMA: Add sync read before starting the DMA trans…

    …fer in remote setup
    
    [ Upstream commit bbcc1c8 ]
    
    The Linked list element and pointer are not stored in the same memory as
    the eDMA controller register. If the doorbell register is toggled before
    the full write of the linked list a race condition error will occur.
    In remote setup we can only use a readl to the memory to assure the full
    write has occurred.
    
    Fixes: 7e4b8a4 ("dmaengine: Add Synopsys eDMA IP version 0 support")
    Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
    Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
    Link: https://lore.kernel.org/r/20240129-b4-feature_hdma_mainline-v7-6-8e8c1acb7a46@bootlin.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    kmaincent authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    d24fe6d View commit details
    Browse the repository at this point in the history
  86. phy: freescale: phy-fsl-imx8-mipi-dphy: Fix alias name to use dashes

    [ Upstream commit 7936378 ]
    
    Devicetree spec lists only dashes as valid characters for alias names.
    Table 3.2: Valid characters for alias names, Devicee Specification,
    Release v0.4
    
    Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
    Fixes: 3fbae28 ("phy: freescale: phy-fsl-imx8-mipi-dphy: Add i.MX8qxp LVDS PHY mode support")
    Link: https://lore.kernel.org/r/20240110093343.468810-1-alexander.stein@ew.tq-group.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    tq-steina authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    9819177 View commit details
    Browse the repository at this point in the history
  87. dmaengine: idxd: Remove shadow Event Log head stored in idxd

    [ Upstream commit ecec7c9 ]
    
    head is defined in idxd->evl as a shadow of head in the EVLSTATUS register.
    There are two issues related to the shadow head:
    
    1. Mismatch between the shadow head and the state of the EVLSTATUS
       register:
       If Event Log is supported, upon completion of the Enable Device command,
       the Event Log head in the variable idxd->evl->head should be cleared to
       match the state of the EVLSTATUS register. But the variable is not reset
       currently, leading mismatch between the variable and the register state.
       The mismatch causes incorrect processing of Event Log entries.
    
    2. Unnecessary shadow head definition:
       The shadow head is unnecessary as head can be read directly from the
       EVLSTATUS register. Reading head from the register incurs no additional
       cost because event log head and tail are always read together and
       tail is already read directly from the register as required by hardware.
    
    Remove the shadow Event Log head stored in idxd->evl to address the
    mentioned issues.
    
    Fixes: 244da66 ("dmaengine: idxd: setup event log configuration")
    Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
    Reviewed-by: Dave Jiang <dave.jiang@intel.com>
    Link: https://lore.kernel.org/r/20240215024931.1739621-1-fenghua.yu@intel.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    fyu1 authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    4d6e793 View commit details
    Browse the repository at this point in the history
  88. dmaengine: idxd: Ensure safe user copy of completion record

    [ Upstream commit d3ea125 ]
    
    If CONFIG_HARDENED_USERCOPY is enabled, copying completion record from
    event log cache to user triggers a kernel bug.
    
    [ 1987.159822] usercopy: Kernel memory exposure attempt detected from SLUB object 'dsa0' (offset 74, size 31)!
    [ 1987.170845] ------------[ cut here ]------------
    [ 1987.176086] kernel BUG at mm/usercopy.c:102!
    [ 1987.180946] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
    [ 1987.186866] CPU: 17 PID: 528 Comm: kworker/17:1 Not tainted 6.8.0-rc2+ #5
    [ 1987.194537] Hardware name: Intel Corporation AvenueCity/AvenueCity, BIOS BHSDCRB1.86B.2492.D03.2307181620 07/18/2023
    [ 1987.206405] Workqueue: wq0.0 idxd_evl_fault_work [idxd]
    [ 1987.212338] RIP: 0010:usercopy_abort+0x72/0x90
    [ 1987.217381] Code: 58 65 9c 50 48 c7 c2 17 85 61 9c 57 48 c7 c7 98 fd 6b 9c 48 0f 44 d6 48 c7 c6 b3 08 62 9c 4c 89 d1 49 0f 44 f3 e8 1e 2e d5 ff <0f> 0b 49 c7 c1 9e 42 61 9c 4c 89 cf 4d 89 c8 eb a9 66 66 2e 0f 1f
    [ 1987.238505] RSP: 0018:ff62f5cf20607d60 EFLAGS: 00010246
    [ 1987.244423] RAX: 000000000000005f RBX: 000000000000001f RCX: 0000000000000000
    [ 1987.252480] RDX: 0000000000000000 RSI: ffffffff9c61429e RDI: 00000000ffffffff
    [ 1987.260538] RBP: ff62f5cf20607d78 R08: ff2a6a89ef3fffe8 R09: 00000000fffeffff
    [ 1987.268595] R10: ff2a6a89eed00000 R11: 0000000000000003 R12: ff2a66934849c89a
    [ 1987.276652] R13: 0000000000000001 R14: ff2a66934849c8b9 R15: ff2a66934849c899
    [ 1987.284710] FS:  0000000000000000(0000) GS:ff2a66b22fe40000(0000) knlGS:0000000000000000
    [ 1987.293850] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [ 1987.300355] CR2: 00007fe291a37000 CR3: 000000010fbd4005 CR4: 0000000000f71ef0
    [ 1987.308413] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [ 1987.316470] DR3: 0000000000000000 DR6: 00000000fffe07f0 DR7: 0000000000000400
    [ 1987.324527] PKRU: 55555554
    [ 1987.327622] Call Trace:
    [ 1987.330424]  <TASK>
    [ 1987.332826]  ? show_regs+0x6e/0x80
    [ 1987.336703]  ? die+0x3c/0xa0
    [ 1987.339988]  ? do_trap+0xd4/0xf0
    [ 1987.343662]  ? do_error_trap+0x75/0xa0
    [ 1987.347922]  ? usercopy_abort+0x72/0x90
    [ 1987.352277]  ? exc_invalid_op+0x57/0x80
    [ 1987.356634]  ? usercopy_abort+0x72/0x90
    [ 1987.360988]  ? asm_exc_invalid_op+0x1f/0x30
    [ 1987.365734]  ? usercopy_abort+0x72/0x90
    [ 1987.370088]  __check_heap_object+0xb7/0xd0
    [ 1987.374739]  __check_object_size+0x175/0x2d0
    [ 1987.379588]  idxd_copy_cr+0xa9/0x130 [idxd]
    [ 1987.384341]  idxd_evl_fault_work+0x127/0x390 [idxd]
    [ 1987.389878]  process_one_work+0x13e/0x300
    [ 1987.394435]  ? __pfx_worker_thread+0x10/0x10
    [ 1987.399284]  worker_thread+0x2f7/0x420
    [ 1987.403544]  ? _raw_spin_unlock_irqrestore+0x2b/0x50
    [ 1987.409171]  ? __pfx_worker_thread+0x10/0x10
    [ 1987.414019]  kthread+0x107/0x140
    [ 1987.417693]  ? __pfx_kthread+0x10/0x10
    [ 1987.421954]  ret_from_fork+0x3d/0x60
    [ 1987.426019]  ? __pfx_kthread+0x10/0x10
    [ 1987.430281]  ret_from_fork_asm+0x1b/0x30
    [ 1987.434744]  </TASK>
    
    The issue arises because event log cache is created using
    kmem_cache_create() which is not suitable for user copy.
    
    Fix the issue by creating event log cache with
    kmem_cache_create_usercopy(), ensuring safe user copy.
    
    Fixes: c2f156b ("dmaengine: idxd: create kmem cache for event log fault items")
    Reported-by: Tony Zhu <tony.zhu@intel.com>
    Tested-by: Tony Zhu <tony.zhu@intel.com>
    Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
    Reviewed-by: Lijun Pan <lijun.pan@intel.com>
    Reviewed-by: Dave Jiang <dave.jiang@intel.com>
    Link: https://lore.kernel.org/r/20240209191412.1050270-1-fenghua.yu@intel.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    fyu1 authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    5e3022e View commit details
    Browse the repository at this point in the history
  89. powerpc/pseries/iommu: IOMMU table is not initialized for kdump over …

    …SR-IOV
    
    [ Upstream commit 09a3c1e ]
    
    When kdump kernel tries to copy dump data over SR-IOV, LPAR panics due
    to NULL pointer exception:
    
      Kernel attempted to read user page (0) - exploit attempt? (uid: 0)
      BUG: Kernel NULL pointer dereference on read at 0x00000000
      Faulting instruction address: 0xc000000020847ad4
      Oops: Kernel access of bad area, sig: 11 [#1]
      LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries
      Modules linked in: mlx5_core(+) vmx_crypto pseries_wdt papr_scm libnvdimm mlxfw tls psample sunrpc fuse overlay squashfs loop
      CPU: 12 PID: 315 Comm: systemd-udevd Not tainted 6.4.0-Test102+ torvalds#12
      Hardware name: IBM,9080-HEX POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1060.00 (NH1060_008) hv:phyp pSeries
      NIP:  c000000020847ad4 LR: c00000002083b2dc CTR: 00000000006cd18c
      REGS: c000000029162ca0 TRAP: 0300   Not tainted  (6.4.0-Test102+)
      MSR:  800000000280b033 <SF,VEC,VSX,EE,FP,ME,IR,DR,RI,LE>  CR: 48288244  XER: 00000008
      CFAR: c00000002083b2d8 DAR: 0000000000000000 DSISR: 40000000 IRQMASK: 1
      ...
      NIP _find_next_zero_bit+0x24/0x110
      LR  bitmap_find_next_zero_area_off+0x5c/0xe0
      Call Trace:
        dev_printk_emit+0x38/0x48 (unreliable)
        iommu_area_alloc+0xc4/0x180
        iommu_range_alloc+0x1e8/0x580
        iommu_alloc+0x60/0x130
        iommu_alloc_coherent+0x158/0x2b0
        dma_iommu_alloc_coherent+0x3c/0x50
        dma_alloc_attrs+0x170/0x1f0
        mlx5_cmd_init+0xc0/0x760 [mlx5_core]
        mlx5_function_setup+0xf0/0x510 [mlx5_core]
        mlx5_init_one+0x84/0x210 [mlx5_core]
        probe_one+0x118/0x2c0 [mlx5_core]
        local_pci_probe+0x68/0x110
        pci_call_probe+0x68/0x200
        pci_device_probe+0xbc/0x1a0
        really_probe+0x104/0x540
        __driver_probe_device+0xb4/0x230
        driver_probe_device+0x54/0x130
        __driver_attach+0x158/0x2b0
        bus_for_each_dev+0xa8/0x130
        driver_attach+0x34/0x50
        bus_add_driver+0x16c/0x300
        driver_register+0xa4/0x1b0
        __pci_register_driver+0x68/0x80
        mlx5_init+0xb8/0x100 [mlx5_core]
        do_one_initcall+0x60/0x300
        do_init_module+0x7c/0x2b0
    
    At the time of LPAR dump, before kexec hands over control to kdump
    kernel, DDWs (Dynamic DMA Windows) are scanned and added to the FDT.
    For the SR-IOV case, default DMA window "ibm,dma-window" is removed from
    the FDT and DDW added, for the device.
    
    Now, kexec hands over control to the kdump kernel.
    
    When the kdump kernel initializes, PCI busses are scanned and IOMMU
    group/tables created, in pci_dma_bus_setup_pSeriesLP(). For the SR-IOV
    case, there is no "ibm,dma-window". The original commit: b1fc44e,
    fixes the path where memory is pre-mapped (direct mapped) to the DDW.
    When TCEs are direct mapped, there is no need to initialize IOMMU
    tables.
    
    iommu_table_setparms_lpar() only considers "ibm,dma-window" property
    when initiallizing IOMMU table. In the scenario where TCEs are
    dynamically allocated for SR-IOV, newly created IOMMU table is not
    initialized. Later, when the device driver tries to enter TCEs for the
    SR-IOV device, NULL pointer execption is thrown from iommu_area_alloc().
    
    The fix is to initialize the IOMMU table with DDW property stored in the
    FDT. There are 2 points to remember:
    
    	1. For the dedicated adapter, kdump kernel would encounter both
    	   default and DDW in FDT. In this case, DDW property is used to
    	   initialize the IOMMU table.
    
    	2. A DDW could be direct or dynamic mapped. kdump kernel would
    	   initialize IOMMU table and mark the existing DDW as
    	   "dynamic". This works fine since, at the time of table
    	   initialization, iommu_table_clear() makes some space in the
    	   DDW, for some predefined number of TCEs which are needed for
    	   kdump to succeed.
    
    Fixes: b1fc44e ("pseries/iommu/ddw: Fix kdump to work in absence of ibm,dma-window")
    Signed-off-by: Gaurav Batra <gbatra@linux.vnet.ibm.com>
    Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://msgid.link/20240125203017.61014-1-gbatra@linux.ibm.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Gaurav Batra authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    d4d1e4b View commit details
    Browse the repository at this point in the history
  90. powerpc/rtas: use correct function name for resetting TCE tables

    [ Upstream commit fad87db ]
    
    The PAPR spec spells the function name as
    
      "ibm,reset-pe-dma-windows"
    
    but in practice firmware uses the singular form:
    
      "ibm,reset-pe-dma-window"
    
    in the device tree. Since we have the wrong spelling in the RTAS
    function table, reverse lookups (token -> name) fail and warn:
    
      unexpected failed lookup for token 86
      WARNING: CPU: 1 PID: 545 at arch/powerpc/kernel/rtas.c:659 __do_enter_rtas_trace+0x2a4/0x2b4
      CPU: 1 PID: 545 Comm: systemd-udevd Not tainted 6.8.0-rc4 torvalds#30
      Hardware name: IBM,9105-22A POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1060.00 (NL1060_028) hv:phyp pSeries
      NIP [c0000000000417f0] __do_enter_rtas_trace+0x2a4/0x2b4
      LR [c0000000000417ec] __do_enter_rtas_trace+0x2a0/0x2b4
      Call Trace:
       __do_enter_rtas_trace+0x2a0/0x2b4 (unreliable)
       rtas_call+0x1f8/0x3e0
       enable_ddw.constprop.0+0x4d0/0xc84
       dma_iommu_dma_supported+0xe8/0x24c
       dma_set_mask+0x5c/0xd8
       mlx5_pci_init.constprop.0+0xf0/0x46c [mlx5_core]
       probe_one+0xfc/0x32c [mlx5_core]
       local_pci_probe+0x68/0x12c
       pci_call_probe+0x68/0x1ec
       pci_device_probe+0xbc/0x1a8
       really_probe+0x104/0x570
       __driver_probe_device+0xb8/0x224
       driver_probe_device+0x54/0x130
       __driver_attach+0x158/0x2b0
       bus_for_each_dev+0xa8/0x120
       driver_attach+0x34/0x48
       bus_add_driver+0x174/0x304
       driver_register+0x8c/0x1c4
       __pci_register_driver+0x68/0x7c
       mlx5_init+0xb8/0x118 [mlx5_core]
       do_one_initcall+0x60/0x388
       do_init_module+0x7c/0x2a4
       init_module_from_file+0xb4/0x108
       idempotent_init_module+0x184/0x34c
       sys_finit_module+0x90/0x114
    
    And oopses are possible when lockdep is enabled or the RTAS
    tracepoints are active, since those paths dereference the result of
    the lookup.
    
    Use the correct spelling to match firmware's behavior, adjusting the
    related constants to match.
    
    Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>
    Fixes: 8252b88 ("powerpc/rtas: improve function information lookups")
    Reported-by: Gaurav Batra <gbatra@linux.ibm.com>
    Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
    Link: https://msgid.link/20240222-rtas-fix-ibm-reset-pe-dma-window-v1-1-7aaf235ac63c@linux.ibm.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    nathanlynch authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    6b6282d View commit details
    Browse the repository at this point in the history
  91. gpio: 74x164: Enable output pins after registers are reset

    [ Upstream commit 530b1db ]
    
    Chip outputs are enabled[1] before actual reset is performed[2] which might
    cause pin output value to flip flop if previous pin value was set to 1.
    Fix that behavior by making sure chip is fully reset before all outputs are
    enabled.
    
    Flip-flop can be noticed when module is removed and inserted again and one of
    the pins was changed to 1 before removal. 100 microsecond flipping is
    noticeable on oscilloscope (100khz SPI bus).
    
    For a properly reset chip - output is enabled around 100 microseconds (on 100khz
    SPI bus) later during probing process hence should be irrelevant behavioral
    change.
    
    Fixes: 7ebc194 (gpio: 74x164: Introduce 'enable-gpios' property)
    Link: https://elixir.bootlin.com/linux/v6.7.4/source/drivers/gpio/gpio-74x164.c#L130 [1]
    Link: https://elixir.bootlin.com/linux/v6.7.4/source/drivers/gpio/gpio-74x164.c#L150 [2]
    Signed-off-by: Arturas Moskvinas <arturas.moskvinas@gmail.com>
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    artms authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    92515c4 View commit details
    Browse the repository at this point in the history
  92. gpiolib: Fix the error path order in gpiochip_add_data_with_key()

    [ Upstream commit e4aec4d ]
    
    After shuffling the code, error path wasn't updated correctly.
    Fix it here.
    
    Fixes: 2f4133b ("gpiolib: No need to call gpiochip_remove_pin_ranges() twice")
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    andy-shev authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    9c7c161 View commit details
    Browse the repository at this point in the history
  93. gpio: fix resource unwinding order in error path

    [ Upstream commit ec5c54a ]
    
    Hogs are added *after* ACPI so should be removed *before* in error path.
    
    Fixes: a411e81 ("gpiolib: add hogs support for machine code")
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
    Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Bartosz Golaszewski authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    21bbe84 View commit details
    Browse the repository at this point in the history
  94. block: define bvec_iter as __packed __aligned(4)

    [ Upstream commit 7838b46 ]
    
    In commit 1941612 ("block: define 'struct bvec_iter' as packed"),
    what we need is to save the 4byte padding, and avoid `bio` to spread on
    one extra cache line.
    
    It is enough to define it as '__packed __aligned(4)', as '__packed'
    alone means byte aligned, and can cause compiler to generate horrible
    code on architectures that don't support unaligned access in case that
    bvec_iter is embedded in other structures.
    
    Cc: Mikulas Patocka <mpatocka@redhat.com>
    Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
    Fixes: 1941612 ("block: define 'struct bvec_iter' as packed")
    Signed-off-by: Ming Lei <ming.lei@redhat.com>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Ming Lei authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    2664bb2 View commit details
    Browse the repository at this point in the history
  95. x86/entry_64: Add VERW just before userspace transition

    commit 3c75017 upstream.
    
    Mitigation for MDS is to use VERW instruction to clear any secrets in
    CPU Buffers. Any memory accesses after VERW execution can still remain
    in CPU buffers. It is safer to execute VERW late in return to user path
    to minimize the window in which kernel data can end up in CPU buffers.
    There are not many kernel secrets to be had after SWITCH_TO_USER_CR3.
    
    Add support for deploying VERW mitigation after user register state is
    restored. This helps minimize the chances of kernel data ending up into
    CPU buffers after executing VERW.
    
    Note that the mitigation at the new location is not yet enabled.
    
      Corner case not handled
      =======================
      Interrupts returning to kernel don't clear CPUs buffers since the
      exit-to-user path is expected to do that anyways. But, there could be
      a case when an NMI is generated in kernel after the exit-to-user path
      has cleared the buffers. This case is not handled and NMI returning to
      kernel don't clear CPU buffers because:
    
      1. It is rare to get an NMI after VERW, but before returning to userspace.
      2. For an unprivileged user, there is no known way to make that NMI
         less rare or target it.
      3. It would take a large number of these precisely-timed NMIs to mount
         an actual attack.  There's presumably not enough bandwidth.
      4. The NMI in question occurs after a VERW, i.e. when user state is
         restored and most interesting data is already scrubbed. Whats left
         is only the data that NMI touches, and that may or may not be of
         any interest.
    
      [ pawan: resolved conflict for hunk swapgs_restore_regs_and_return_to_usermode in backport ]
    
    Suggested-by: Dave Hansen <dave.hansen@intel.com>
    Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
    Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
    Link: https://lore.kernel.org/all/20240213-delay-verw-v8-2-a6216d83edb7%40linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    pa1gupta authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    7caf330 View commit details
    Browse the repository at this point in the history
  96. x86/entry_32: Add VERW just before userspace transition

    commit a0e2dab upstream.
    
    As done for entry_64, add support for executing VERW late in exit to
    user path for 32-bit mode.
    
    Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
    Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
    Link: https://lore.kernel.org/all/20240213-delay-verw-v8-3-a6216d83edb7%40linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    pa1gupta authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    ca13d8c View commit details
    Browse the repository at this point in the history
  97. x86/bugs: Use ALTERNATIVE() instead of mds_user_clear static key

    commit 6613d82 upstream.
    
    The VERW mitigation at exit-to-user is enabled via a static branch
    mds_user_clear. This static branch is never toggled after boot, and can
    be safely replaced with an ALTERNATIVE() which is convenient to use in
    asm.
    
    Switch to ALTERNATIVE() to use the VERW mitigation late in exit-to-user
    path. Also remove the now redundant VERW in exc_nmi() and
    arch_exit_to_user_mode().
    
    Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
    Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
    Link: https://lore.kernel.org/all/20240213-delay-verw-v8-4-a6216d83edb7%40linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    pa1gupta authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    7a62647 View commit details
    Browse the repository at this point in the history
  98. KVM/VMX: Use BT+JNC, i.e. EFLAGS.CF to select VMRESUME vs. VMLAUNCH

    From: Sean Christopherson <seanjc@google.com>
    
    commit 706a189 upstream.
    
    Use EFLAGS.CF instead of EFLAGS.ZF to track whether to use VMRESUME versus
    VMLAUNCH.  Freeing up EFLAGS.ZF will allow doing VERW, which clobbers ZF,
    for MDS mitigations as late as possible without needing to duplicate VERW
    for both paths.
    
    Signed-off-by: Sean Christopherson <seanjc@google.com>
    Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
    Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
    Reviewed-by: Nikolay Borisov <nik.borisov@suse.com>
    Link: https://lore.kernel.org/all/20240213-delay-verw-v8-5-a6216d83edb7%40linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    pa1gupta authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    ae46691 View commit details
    Browse the repository at this point in the history
  99. KVM/VMX: Move VERW closer to VMentry for MDS mitigation

    commit 43fb862 upstream.
    
    During VMentry VERW is executed to mitigate MDS. After VERW, any memory
    access like register push onto stack may put host data in MDS affected
    CPU buffers. A guest can then use MDS to sample host data.
    
    Although likelihood of secrets surviving in registers at current VERW
    callsite is less, but it can't be ruled out. Harden the MDS mitigation
    by moving the VERW mitigation late in VMentry path.
    
    Note that VERW for MMIO Stale Data mitigation is unchanged because of
    the complexity of per-guest conditional VERW which is not easy to handle
    that late in asm with no GPRs available. If the CPU is also affected by
    MDS, VERW is unconditionally executed late in asm regardless of guest
    having MMIO access.
    
    Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
    Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
    Acked-by: Sean Christopherson <seanjc@google.com>
    Link: https://lore.kernel.org/all/20240213-delay-verw-v8-6-a6216d83edb7%40linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    pa1gupta authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    e81742f View commit details
    Browse the repository at this point in the history
  100. selftests: mptcp: add evts_get_info helper

    commit 06848c0 upstream.
    
    This patch adds a new helper get_info_value(), using 'sed' command to
    parse the value of the given item name in the line with the given keyword,
    to make chk_mptcp_info() and pedit_action_pkts() more readable.
    
    Also add another helper evts_get_info() to use get_info_value() to parse
    the output of 'pm_nl_ctl events' command, to make all the userspace pm
    selftests more readable, both in mptcp_join.sh and userspace_pm.sh.
    
    Reviewed-by: Matthieu Baerts <matttbe@kernel.org>
    Signed-off-by: Geliang Tang <geliang.tang@suse.com>
    Signed-off-by: Mat Martineau <martineau@kernel.org>
    Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-2-8d6b94150f6b@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    geliangtang authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    ae1fa39 View commit details
    Browse the repository at this point in the history
  101. selftests: mptcp: add chk_subflows_total helper

    commit 8077541 upstream.
    
    This patch adds a new helper chk_subflows_total(), in it use the newly
    added counter mptcpi_subflows_total to get the "correct" amount of
    subflows, including the initial one.
    
    To be compatible with old 'ss' or kernel versions not supporting this
    counter, get the total subflows by listing TCP connections that are
    MPTCP subflows:
    
        ss -ti state state established state syn-sent state syn-recv |
            grep -c tcp-ulp-mptcp.
    
    Reviewed-by: Matthieu Baerts <matttbe@kernel.org>
    Signed-off-by: Geliang Tang <geliang.tang@suse.com>
    Signed-off-by: Mat Martineau <martineau@kernel.org>
    Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-3-8d6b94150f6b@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    geliangtang authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    f9190d7 View commit details
    Browse the repository at this point in the history
  102. selftests: mptcp: update userspace pm test helpers

    commit 757c828 upstream.
    
    This patch adds a new argument namespace to userspace_pm_add_addr() and
    userspace_pm_add_sf() to make these two helper more versatile.
    
    Add two more versatile helpers for userspace pm remove subflow or address:
    userspace_pm_rm_addr() and userspace_pm_rm_sf(). The original test helpers
    userspace_pm_rm_sf_addr_ns1() and userspace_pm_rm_sf_addr_ns2() can be
    replaced by these new helpers.
    
    Reviewed-by: Matthieu Baerts <matttbe@kernel.org>
    Signed-off-by: Geliang Tang <geliang.tang@suse.com>
    Signed-off-by: Mat Martineau <martineau@kernel.org>
    Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-4-8d6b94150f6b@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    geliangtang authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    9d71f43 View commit details
    Browse the repository at this point in the history
  103. selftests: mptcp: add mptcp_lib_is_v6

    commit b850f2c upstream.
    
    To avoid duplicated code in different MPTCP selftests, we can add
    and use helpers defined in mptcp_lib.sh.
    
    is_v6() helper is defined in mptcp_connect.sh, mptcp_join.sh and
    mptcp_sockopt.sh, so export it into mptcp_lib.sh and rename it as
    mptcp_lib_is_v6(). Use this new helper in all scripts.
    
    Reviewed-by: Matthieu Baerts <matttbe@kernel.org>
    Signed-off-by: Geliang Tang <geliang.tang@suse.com>
    Signed-off-by: Mat Martineau <martineau@kernel.org>
    Link: https://lore.kernel.org/r/20231128-send-net-next-2023107-v4-10-8d6b94150f6b@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    geliangtang authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    8e7f31b View commit details
    Browse the repository at this point in the history
  104. selftests: mptcp: rm subflow with v4/v4mapped addr

    commit 7092dbe upstream.
    
    Now both a v4 address and a v4-mapped address are supported when
    destroying a userspace pm subflow, this patch adds a second subflow
    to "userspace pm add & remove address" test, and two subflows could
    be removed two different ways, one with the v4mapped and one with v4.
    
    Closes: multipath-tcp/mptcp_net-next#387
    Fixes: 48d73f6 ("selftests: mptcp: update userspace pm addr tests")
    Cc: stable@vger.kernel.org
    Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
    Reviewed-by: Mat Martineau <martineau@kernel.org>
    Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://lore.kernel.org/r/20240223-upstream-net-20240223-misc-fixes-v1-2-162e87e48497@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Geliang Tang authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    ece1aae View commit details
    Browse the repository at this point in the history
  105. drm/nouveau: don't fini scheduler before entity flush

    This bug is present in v6.7 only, since the scheduler design has been
    re-worked in v6.8.
    
    Client scheduler entities must be flushed before an associated GPU
    scheduler is teared down. Otherwise the entitiy might still hold a
    pointer to the scheduler's runqueue which is freed at scheduler tear
    down already.
    
    [  305.224293] ==================================================================
    [  305.224297] BUG: KASAN: slab-use-after-free in drm_sched_entity_flush+0x6c4/0x7b0 [gpu_sched]
    [  305.224310] Read of size 8 at addr ffff8881440a8f48 by task rmmod/4436
    
    [  305.224317] CPU: 10 PID: 4436 Comm: rmmod Tainted: G     U             6.7.6-100.fc38.x86_64+debug #1
    [  305.224321] Hardware name: Dell Inc. Precision 7550/01PXFR, BIOS 1.27.0 11/08/2023
    [  305.224324] Call Trace:
    [  305.224327]  <TASK>
    [  305.224329]  dump_stack_lvl+0x76/0xd0
    [  305.224336]  print_report+0xcf/0x670
    [  305.224342]  ? drm_sched_entity_flush+0x6c4/0x7b0 [gpu_sched]
    [  305.224352]  ? __virt_addr_valid+0x215/0x410
    [  305.224359]  ? drm_sched_entity_flush+0x6c4/0x7b0 [gpu_sched]
    [  305.224368]  kasan_report+0xa6/0xe0
    [  305.224373]  ? drm_sched_entity_flush+0x6c4/0x7b0 [gpu_sched]
    [  305.224385]  drm_sched_entity_flush+0x6c4/0x7b0 [gpu_sched]
    [  305.224395]  ? __pfx_drm_sched_entity_flush+0x10/0x10 [gpu_sched]
    [  305.224406]  ? rcu_is_watching+0x15/0xb0
    [  305.224413]  drm_sched_entity_destroy+0x17/0x20 [gpu_sched]
    [  305.224422]  nouveau_cli_fini+0x6c/0x120 [nouveau]
    [  305.224658]  nouveau_drm_device_fini+0x2ac/0x490 [nouveau]
    [  305.224871]  nouveau_drm_remove+0x18e/0x220 [nouveau]
    [  305.225082]  ? __pfx_nouveau_drm_remove+0x10/0x10 [nouveau]
    [  305.225290]  ? rcu_is_watching+0x15/0xb0
    [  305.225295]  ? _raw_spin_unlock_irqrestore+0x66/0x80
    [  305.225299]  ? trace_hardirqs_on+0x16/0x100
    [  305.225304]  ? _raw_spin_unlock_irqrestore+0x4f/0x80
    [  305.225310]  pci_device_remove+0xa3/0x1d0
    [  305.225316]  device_release_driver_internal+0x379/0x540
    [  305.225322]  driver_detach+0xc5/0x180
    [  305.225327]  bus_remove_driver+0x11e/0x2a0
    [  305.225333]  pci_unregister_driver+0x2a/0x250
    [  305.225339]  nouveau_drm_exit+0x1f/0x970 [nouveau]
    [  305.225548]  __do_sys_delete_module+0x350/0x580
    [  305.225554]  ? __pfx___do_sys_delete_module+0x10/0x10
    [  305.225562]  ? syscall_enter_from_user_mode+0x26/0x90
    [  305.225567]  ? rcu_is_watching+0x15/0xb0
    [  305.225571]  ? syscall_enter_from_user_mode+0x26/0x90
    [  305.225575]  ? trace_hardirqs_on+0x16/0x100
    [  305.225580]  do_syscall_64+0x61/0xe0
    [  305.225584]  ? rcu_is_watching+0x15/0xb0
    [  305.225587]  ? syscall_exit_to_user_mode+0x1f/0x50
    [  305.225592]  ? trace_hardirqs_on_prepare+0xe3/0x100
    [  305.225596]  ? do_syscall_64+0x70/0xe0
    [  305.225600]  ? trace_hardirqs_on_prepare+0xe3/0x100
    [  305.225604]  entry_SYSCALL_64_after_hwframe+0x6e/0x76
    [  305.225609] RIP: 0033:0x7f6148f3592b
    [  305.225650] Code: 73 01 c3 48 8b 0d dd 04 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d ad 04 0c 00 f7 d8 64 89 01 48
    [  305.225653] RSP: 002b:00007ffe89986f08 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0
    [  305.225659] RAX: ffffffffffffffda RBX: 000055cbb036e900 RCX: 00007f6148f3592b
    [  305.225662] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 000055cbb036e968
    [  305.225664] RBP: 00007ffe89986f30 R08: 1999999999999999 R09: 0000000000000000
    [  305.225667] R10: 00007f6148fa6ac0 R11: 0000000000000206 R12: 0000000000000000
    [  305.225670] R13: 00007ffe89987190 R14: 000055cbb036e900 R15: 0000000000000000
    [  305.225678]  </TASK>
    
    [  305.225683] Allocated by task 484:
    [  305.225685]  kasan_save_stack+0x33/0x60
    [  305.225690]  kasan_set_track+0x25/0x30
    [  305.225693]  __kasan_kmalloc+0x8f/0xa0
    [  305.225696]  drm_sched_init+0x3c7/0xce0 [gpu_sched]
    [  305.225705]  nouveau_sched_init+0xd2/0x110 [nouveau]
    [  305.225913]  nouveau_drm_device_init+0x130/0x3290 [nouveau]
    [  305.226121]  nouveau_drm_probe+0x1ab/0x6b0 [nouveau]
    [  305.226329]  local_pci_probe+0xda/0x190
    [  305.226333]  pci_device_probe+0x23a/0x780
    [  305.226337]  really_probe+0x3df/0xb80
    [  305.226341]  __driver_probe_device+0x18c/0x450
    [  305.226345]  driver_probe_device+0x4a/0x120
    [  305.226348]  __driver_attach+0x1e5/0x4a0
    [  305.226351]  bus_for_each_dev+0x106/0x190
    [  305.226355]  bus_add_driver+0x2a1/0x570
    [  305.226358]  driver_register+0x134/0x460
    [  305.226361]  do_one_initcall+0xd3/0x430
    [  305.226366]  do_init_module+0x238/0x770
    [  305.226370]  load_module+0x5581/0x6f10
    [  305.226374]  __do_sys_init_module+0x1f2/0x220
    [  305.226377]  do_syscall_64+0x61/0xe0
    [  305.226381]  entry_SYSCALL_64_after_hwframe+0x6e/0x76
    
    [  305.226387] Freed by task 4436:
    [  305.226389]  kasan_save_stack+0x33/0x60
    [  305.226392]  kasan_set_track+0x25/0x30
    [  305.226396]  kasan_save_free_info+0x2b/0x50
    [  305.226399]  __kasan_slab_free+0x10b/0x1a0
    [  305.226402]  slab_free_freelist_hook+0x12b/0x1e0
    [  305.226406]  __kmem_cache_free+0xd4/0x1d0
    [  305.226410]  drm_sched_fini+0x178/0x320 [gpu_sched]
    [  305.226418]  nouveau_drm_device_fini+0x2a0/0x490 [nouveau]
    [  305.226624]  nouveau_drm_remove+0x18e/0x220 [nouveau]
    [  305.226832]  pci_device_remove+0xa3/0x1d0
    [  305.226836]  device_release_driver_internal+0x379/0x540
    [  305.226840]  driver_detach+0xc5/0x180
    [  305.226843]  bus_remove_driver+0x11e/0x2a0
    [  305.226847]  pci_unregister_driver+0x2a/0x250
    [  305.226850]  nouveau_drm_exit+0x1f/0x970 [nouveau]
    [  305.227056]  __do_sys_delete_module+0x350/0x580
    [  305.227060]  do_syscall_64+0x61/0xe0
    [  305.227064]  entry_SYSCALL_64_after_hwframe+0x6e/0x76
    
    [  305.227070] The buggy address belongs to the object at ffff8881440a8f00
                    which belongs to the cache kmalloc-128 of size 128
    [  305.227073] The buggy address is located 72 bytes inside of
                    freed 128-byte region [ffff8881440a8f00, ffff8881440a8f80)
    
    [  305.227078] The buggy address belongs to the physical page:
    [  305.227081] page:00000000627efa0a refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1440a8
    [  305.227085] head:00000000627efa0a order:1 entire_mapcount:0 nr_pages_mapped:0 pincount:0
    [  305.227088] flags: 0x17ffffc0000840(slab|head|node=0|zone=2|lastcpupid=0x1fffff)
    [  305.227093] page_type: 0xffffffff()
    [  305.227097] raw: 0017ffffc0000840 ffff8881000428c0 ffffea0005b33500 dead000000000002
    [  305.227100] raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000
    [  305.227102] page dumped because: kasan: bad access detected
    
    [  305.227106] Memory state around the buggy address:
    [  305.227109]  ffff8881440a8e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [  305.227112]  ffff8881440a8e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    [  305.227114] >ffff8881440a8f00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    [  305.227117]                                               ^
    [  305.227120]  ffff8881440a8f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    [  305.227122]  ffff8881440a9000: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc
    [  305.227125] ==================================================================
    
    Cc: <stable@vger.kernel.org> # v6.7 only
    Reported-by: Karol Herbst <kherbst@redhat.com>
    Closes: https://gist.githubusercontent.com/karolherbst/a20eb0f937a06ed6aabe2ac2ca3d11b5/raw/9cd8b1dc5894872d0eeebbee3dd0fdd28bb576bc/gistfile1.txt
    Fixes: b88baab ("drm/nouveau: implement new VM_BIND uAPI")
    Signed-off-by: Danilo Krummrich <dakr@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    dakr authored and gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    d6ac0ee View commit details
    Browse the repository at this point in the history
  106. Linux 6.6.21

    Link: https://lore.kernel.org/r/20240304211549.876981797@linuxfoundation.org
    Tested-by: SeongJae Park <sj@kernel.org>
    Tested-by: Luna Jernberg <droidbittin@gmail.com>
    Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
    Tested-by: Ron Economos <re@w6rz.net>
    Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
    Tested-by: Jon Hunter <jonathanh@nvidia.com>
    Tested-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
    Tested-by: Shuah Khan <skhan@linuxfoundation.org>
    Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
    Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    gregkh committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    62e5ae5 View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2024

  1. jtag: aspeed: Fix the interrupt wait event.

    The wait event of for the wait_event_interruptible api should be the
    aspeed_jtag->flag can't use another local variable to replace it.
    
    Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
    Change-Id: Icb573c5e44d5af1bd23b66f2fd2ccfe66f6069aa
    billy-tsai committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    7595b6a View commit details
    Browse the repository at this point in the history
  2. i3c: ast2600: Implement JESD403 timed reset via SW force mode

    The hardware timed reset pattern cannot be sent if the SDA is held low
    by the target device. This commit implement it via software force mode.
    
    Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
    Change-Id: I06e39b9bf8ec0ed2c08ad7517ea1eec68ee26238
    aspeeddylan committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    fe09be0 View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2024

  1. clk:ast2700 fix clk name

    fix duplicate clk name
    
    Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
    Change-Id: Ie9faa2e1c469f55c2b60f1e65e189c1d2102e502
    aspeedtech committed Mar 8, 2024
    Configuration menu
    Copy the full SHA
    1b51a5d View commit details
    Browse the repository at this point in the history
  2. clk:ast2700: Modify attributes of D1/D2 clk

    D1/D2 clk should be critical since they are used for VGA0/VGA1.
    
    Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
    Change-Id: Ib2c192d6f0d1511f71f4351aad6d0c846d2f1481
    jammyaspeed committed Mar 8, 2024
    Configuration menu
    Copy the full SHA
    20824d2 View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2024

  1. drivers: crypto: aspeed: add sha3 simple self-tests

    Add HW SHA3 simple self-tests.
    
    Signed-off-by: Neal Liu <neal_liu@aspeedtech.com>
    Change-Id: Ib5b6ef458903816af151462697415f21a63f8f46
    Neal-liu committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    d7abc87 View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2024

  1. dts: ast2700-dcscm AvenueCity bring up.

    1. Add more SGPIOS inintial value for AvenueCity power sequence.
    2. Enable UART2 and UART3 for obmc-console.
    3. Remove GPIOB[0:7] and GPIOC[0:7] line label, it will use for SCM_GPO
    and SCM_GPI.
    4. Remove dummy POST_COMPLETE.
    
    Change-Id: Idfe08f4bc16911fce22b0c9930bb19b445fb564b
    VinceChang6637 committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    5bffd3a View commit details
    Browse the repository at this point in the history
  2. hwmon: (aspeed-g6-pwm-tacho): Align with upstream YAML filed

    The patches for aspeed-g6-pwm-tacho have been accepted by the Linux
    community. This patch aims to align the YAML files with the upstream.
    
    Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
    Change-Id: I4e1bed0bb073482b90c8284e1bfd55904a3e0d81
    billy-tsai committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    06a47fb View commit details
    Browse the repository at this point in the history
  3. hwmon: (aspeed-g6-pwm-tacho): Align with upstream driver

    The patches for aspeed-g6-pwm-tacho have been accepted by the Linux
    community. This patch aims to align the driver with the upstream.
    
    Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
    Change-Id: Id433bb5009dd486675d4cb9f5d96001b998cd99b
    billy-tsai committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    dc2731e View commit details
    Browse the repository at this point in the history
  4. pinctrl: pinctrl-aspeed-g6: Fix register offset for pinconf of GPIOR-T

    The register offset to disable the internal pull-down of GPIOR~T is 0x630
    instead of 0x620, as specified in the Ast2600 datasheet v15
    The datasheet can download from the official Aspeed website.
    
    Fixes: 15711ba ("pinctrl: aspeed-g6: Add AST2600 pinconf support")
    Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
    Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
    Change-Id: Iaa8e09a7d357c84c10798a9b7342e065ef374b0b
    billy-tsai committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    38f2ade View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2024

  1. Merge tag 'v6.6.17' into dev-6.6

    This is the 6.6.17 stable release
    amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    695c312 View commit details
    Browse the repository at this point in the history
  2. Merge tag 'v6.6.18' into dev-6.6

    This is the 6.6.18 stable release
    amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    c595db6 View commit details
    Browse the repository at this point in the history
  3. Merge tag 'v6.6.19' into dev-6.6

    This is the 6.6.19 stable release
    amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    96d3c5a View commit details
    Browse the repository at this point in the history
  4. Merge tag 'v6.6.20' into dev-6.6

    This is the 6.6.20 stable release
    amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    07346b9 View commit details
    Browse the repository at this point in the history
  5. Merge tag 'v6.6.21' into dev-6.6

    This is the 6.6.21 stable release
    amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    816ffd2 View commit details
    Browse the repository at this point in the history
  6. dt-bindings: arm: aspeed: add Meta Harma board

    Document the new compatibles used on Meta Harma.
    
    Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
    Link: https://lore.kernel.org/r/20231211162656.2564267-2-peteryin.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Peter Yin authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    1829446 View commit details
    Browse the repository at this point in the history
  7. ARM: dts: aspeed: Harma: Add Meta Harma (AST2600) BMC

    Add linux device tree entry related to
    the Meta(Facebook) computer-node system use an AT2600 BMC.
    This node is named "Harma".
    
    Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
    Reviewed-by: Joel Stanley <joel@jms.id.au>
    Link: https://lore.kernel.org/r/20231211162656.2564267-3-peteryin.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Peter Yin authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    c75374d View commit details
    Browse the repository at this point in the history
  8. ARM: dts: aspeed: minerva: Revise the name of DTS

    The project Minerva which is the platform used by Meta has two boards: the
    Chassis Management Module (Minerva) and the Motherboard (Harma), so change
    the DTS name to minerva here for CMM use.
    
    Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com>
    Reviewed-by: Joel Stanley <joel@jms.id.au>
    Link: https://lore.kernel.org/r/20231212075200.983536-2-yangchen.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Quanta-YangChen authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    d242c10 View commit details
    Browse the repository at this point in the history
  9. ARM: dts: aspeed: minerva: Modify mac3 setting

    Remove the unuse setting and fix the link to 100 M
    
    Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com>
    Reviewed-by: Joel Stanley <joel@jms.id.au>
    Link: https://lore.kernel.org/r/20231212075200.983536-3-yangchen.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Quanta-YangChen authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    09a2d41 View commit details
    Browse the repository at this point in the history
  10. ARM: dts: aspeed: minerva: Change sgpio use

    Correct the sgpio use from sgpiom1 to sgpiom0
    
    Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com>
    Reviewed-by: Joel Stanley <joel@jms.id.au>
    Link: https://lore.kernel.org/r/20231212075200.983536-4-yangchen.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Quanta-YangChen authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    374105e View commit details
    Browse the repository at this point in the history
  11. ARM: dts: aspeed: minerva: Enable power monitor device

    Enable power monitor device ina230 and ltc2945 on the i2c bus 0
    
    Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com>
    Reviewed-by: Joel Stanley <joel@jms.id.au>
    Link: https://lore.kernel.org/r/20231212075200.983536-5-yangchen.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Quanta-YangChen authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    293b44c View commit details
    Browse the repository at this point in the history
  12. ARM: dts: aspeed: minerva: Add temperature sensor

    Add one temperature sensor on i2c bus 1
    
    Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com>
    Reviewed-by: Joel Stanley <joel@jms.id.au>
    Link: https://lore.kernel.org/r/20231212075200.983536-6-yangchen.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Quanta-YangChen authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    ee11c7a View commit details
    Browse the repository at this point in the history
  13. ARM: dts: aspeed: minerva: correct the address of eeprom

    Correct the address from 0x51 to 0x54 of eeprom on the i2c bus 1
    
    Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com>
    Reviewed-by: Joel Stanley <joel@jms.id.au>
    Link: https://lore.kernel.org/r/20231212075200.983536-7-yangchen.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Quanta-YangChen authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    1088752 View commit details
    Browse the repository at this point in the history
  14. ARM: dts: aspeed: minerva: add bus labels and aliases

    Add bus labels and aliases for the fan control board.
    
    Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com>
    Reviewed-by: Joel Stanley <joel@jms.id.au>
    Link: https://lore.kernel.org/r/20231212075200.983536-8-yangchen.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Quanta-YangChen authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    272b70a View commit details
    Browse the repository at this point in the history
  15. ARM: dts: aspeed: minerva: add fan rpm controller

    Add fan rpm controller max31790 on all bus of FCB.
    
    Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com>
    Reviewed-by: Joel Stanley <joel@jms.id.au>
    Link: https://lore.kernel.org/r/20231212075200.983536-9-yangchen.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Quanta-YangChen authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    75d0edd View commit details
    Browse the repository at this point in the history
  16. ARM: dts: aspeed: minerva: Add led-fan-fault gpio

    Add led-fan-fault gpio pin on the PCA9555 on the i2c bus 0.
    
    Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com>
    Reviewed-by: Joel Stanley <joel@jms.id.au>
    Link: https://lore.kernel.org/r/20231212075200.983536-10-yangchen.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Quanta-YangChen authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    e82fe62 View commit details
    Browse the repository at this point in the history
  17. ARM: dts: aspeed: minerva: add gpio line name

    Add the GPIO line name that the project's function can use by the
    meaningful name.
    
    Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com>
    Reviewed-by: Joel Stanley <joel@jms.id.au>
    Link: https://lore.kernel.org/r/20231212075200.983536-11-yangchen.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Quanta-YangChen authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    bc69b93 View commit details
    Browse the repository at this point in the history
  18. ARM: dts: aspeed: minerva: add sgpio line name

    Add the SGPIO line name that the project's function can use by the
    meaningful name.
    
    Signed-off-by: Yang Chen <yangchen.openbmc@gmail.com>
    Reviewed-by: Joel Stanley <joel@jms.id.au>
    Link: https://lore.kernel.org/r/20231212075200.983536-12-yangchen.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Quanta-YangChen authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    89efc54 View commit details
    Browse the repository at this point in the history
  19. ARM: dts: aspeed: Harma: Revise SGPIO line name.

    The same name as reset-control-smb-e1s
    change to reset-control-smb-e1s-0 and reset-control-smb-e1s-0.
    
    Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
    Link: https://lore.kernel.org/r/20240221093925.2393604-2-peteryin.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Peter Yin authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    4435874 View commit details
    Browse the repository at this point in the history
  20. ARM: dts: aspeed: Harma: mapping ttyS2 to UART4.

    Change routing to match SOL(Serial Over LAN) settings.
    
    Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
    Link: https://lore.kernel.org/r/20240221093925.2393604-3-peteryin.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Peter Yin authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    9d1063f View commit details
    Browse the repository at this point in the history
  21. ARM: dts: aspeed: Harma: Remove Vuart

    Remove vuart to avoid port conflict with uart2
    
    Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
    Link: https://lore.kernel.org/r/20240221093925.2393604-4-peteryin.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Peter Yin authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    850d2bc View commit details
    Browse the repository at this point in the history
  22. ARM: dts: aspeed: Harma: Add cpu power good line name

    Add a line name for cpu power good.
    
    Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
    Link: https://lore.kernel.org/r/20240221093925.2393604-5-peteryin.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Peter Yin authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    4bf71f2 View commit details
    Browse the repository at this point in the history
  23. ARM: dts: aspeed: Harma: Add spi-gpio

    Add spi-gpio for tpm device.
    
    Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
    Link: https://lore.kernel.org/r/20240221093925.2393604-6-peteryin.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Peter Yin authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    3a03473 View commit details
    Browse the repository at this point in the history
  24. ARM: dts: aspeed: Harma: Add PDB temperature

    Add PDB temperature sensor.
    
    Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
    Link: https://lore.kernel.org/r/20240221093925.2393604-7-peteryin.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Peter Yin authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    f02e9bb View commit details
    Browse the repository at this point in the history
  25. ARM: dts: aspeed: Harma: Revise max31790 address

    Revise max31790 address from 0x30 to 0x5e
    
    Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
    Link: https://lore.kernel.org/r/20240221093925.2393604-8-peteryin.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Peter Yin authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    7651bf1 View commit details
    Browse the repository at this point in the history
  26. ARM: dts: aspeed: Harma: Add NIC Fru device

    Add MB NIC Device
    
    Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
    Link: https://lore.kernel.org/r/20240221093925.2393604-9-peteryin.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Peter Yin authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    d5a352f View commit details
    Browse the repository at this point in the history
  27. ARM: dts: aspeed: Harma: Add ltc4286 device

    Add ltc4286 device.
    
    Signed-off-by: Peter Yin <peteryin.openbmc@gmail.com>
    Link: https://lore.kernel.org/r/20240221093925.2393604-10-peteryin.openbmc@gmail.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Peter Yin authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    e712f9c View commit details
    Browse the repository at this point in the history
  28. ARM: dts: aspeed: FSI interrupt support

    Enable FSI interrupt controllers for AST2600 and P10BMC hub master.
    
    Signed-off-by: Eddie James <eajames@linux.ibm.com>
    Link: https://lore.kernel.org/r/20240215220759.976998-27-eajames@linux.ibm.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    Eddie James authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    f33722b View commit details
    Browse the repository at this point in the history
  29. dt-bindings: arm: aspeed: add IBM system1-bmc

    Document the new compatibles used on IBM system1-bmc
    
    Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
    Link: https://lore.kernel.org/r/20240125212154.4028640-2-ninad@linux.ibm.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    ninadpalsule authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    dfccf1f View commit details
    Browse the repository at this point in the history
  30. ARM: dts: aspeed: system1: IBM System1 BMC board

    Added a device tree for IBM system1 BMC board, which uses AST2600 SoC.
    
    Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
    Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
    Link: https://lore.kernel.org/r/20240125212154.4028640-3-ninad@linux.ibm.com
    Signed-off-by: Joel Stanley <joel@jms.id.au>
    geissonator authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    b21d927 View commit details
    Browse the repository at this point in the history
  31. ARM: dts: aspeed: asrock: Use MAC address from FRU EEPROM

    Like the more recently added ASRock BMC platforms, e3c246d4i and
    romed8hm3 also have the BMC's MAC address available in the baseboard
    FRU EEPROM, so let's add support for using it.
    
    Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
    Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
    zevweiss authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    fde0cde View commit details
    Browse the repository at this point in the history
  32. ARM: dts: aspeed: Add vendor prefixes to lm25066 compat strings

    Due to the way i2c driver matching works (falling back to the driver's
    id_table if of_match_table fails) this didn't actually cause any
    misbehavior, but let's add the vendor prefixes so things actually work
    the way they were intended to.
    
    Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
    Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
    Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
    zevweiss authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    471c23e View commit details
    Browse the repository at this point in the history
  33. ARM: dts: aspeed: asrock: Add BIOS SPI flash chips

    On e3c246d4i, e3c256d4i, romed8hm3, and spc621d8hm3 the host firmware
    flash is accessible to the BMC via the AST2500 SPI1 interface with an
    external GPIO-controlled mux switching the flash chip between the host
    and the BMC.
    
    The default state of the mux GPIO leaves it connected to the host, so
    the BMC's attempt to bind a driver to it during its boot sequence will
    fail, but a write to a sysfs 'bind' file after toggling the mux GPIO
    (along with whatever other preparatory steps are required) can later
    allow it to be attached and accessed by the BMC.  It's not an ideal
    arrangement, but in the absence of DT overlays or any other
    alternative it is at least a functional one, if somewhat clumsily so.
    
    Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
    Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
    zevweiss authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    cdeefb4 View commit details
    Browse the repository at this point in the history
  34. hwmon: (pmbus/lm25066) Use PMBUS_REGULATOR_ONE to declare regulator

    If a chip only provides a single regulator, it should be named 'vout'
    and not 'vout0'. Declare regulator using PMBUS_REGULATOR_ONE() to make
    that happen.
    
    Cc: Conor Dooley <conor@kernel.org>
    Cc: Naresh Solanki <naresh.solanki@9elements.com>
    Cc: Zev Weiss <zev@bewilderbeest.net>
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
    Link: https://lore.kernel.org/r/20240223-player-buckskin-01405c5889c4@spud
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    (cherry picked from commit 8f832d2)
    Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
    groeck authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    3481ef5 View commit details
    Browse the repository at this point in the history
  35. ARM: dts: aspeed: ahe50dc: Update lm25066 regulator name

    A recent change to the lm25066 driver changed the name of its
    regulator from vout0 to vout; device-tree users of lm25066's regulator
    functionality (of which ahe50dc is the only one) thus require a
    corresponding update.
    
    Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
    Cc: Conor Dooley <conor+dt@kernel.org>
    Cc: Guenter Roeck <linux@roeck-us.net>
    Acked-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
    zevweiss authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    7af851f View commit details
    Browse the repository at this point in the history
  36. dt-bindings: arm: aspeed: add ASUS X4TF board

    Document the new compatibles used on ASUS X4TF.
    
    Signed-off-by: Kelly Hung <Kelly_Hung@asus.com>
    Acked-by: Conor Dooley <conor.dooley@microchip.com>
    Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
    Kelly Hung authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    2bce9ea View commit details
    Browse the repository at this point in the history
  37. ARM: dts: aspeed: x4tf: Add dts for asus x4tf project

    Base on aspeed-g6.dtsi and can boot into BMC console.
    
    Signed-off-by: Kelly Hung <Kelly_Hung@asus.com>
    Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
    Kelly Hung authored and amboar committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    82717c1 View commit details
    Browse the repository at this point in the history
  38. aspeed_g7: dirvers: dtsi: usb: Update USB PHY3 controller driver

    Modify PHY3 controller driver to use bypass SRAM mode by default.
    Also set DWC specific registers by driver itself without DTSI file support.
    
    Signed-off-by: Joe Wang <joe_wang@aspeedtech.com>
    Change-Id: If1259de93fafbe36c9c2d35a7b6c4e25c73b3157
    joe-aspeed committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    57dc8c2 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2024

  1. hwmon: (pmbus/core) Add helper macro to define single pmbus regulator

    The bindings for single instance regulator should be named with no instance
    (e.g., buck not buck0). Introduce a new helper macro to define the single pmbus
    regulator.
    
    Signed-off-by: Saravanan Sekar <saravanan@linumiz.com>
    Link: https://lore.kernel.org/r/20231011164754.449399-4-saravanan@linumiz.com
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    (cherry picked from commit 88b5970)
    Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
    ssekar15 authored and amboar committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    fceec5d View commit details
    Browse the repository at this point in the history
  2. pcie: Fixed that not release mutex when the bitmap was not found

    The function returns error when the bitmap is not found.
    It do not release the mutex. This will lead to starvation when
    trying to obtain mutex later.
    
    Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
    Change-Id: I4deb2f0ad453236f1a6296bc570c4b8b8d847edb
    aspeedJacky committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    a79f702 View commit details
    Browse the repository at this point in the history
  3. dt-bindings: dma: fsl-edma: Add fsl-edma.h to prevent hardcoding in dts

    [ Upstream commit 1e9b052 ]
    
    Introduce a common dt-bindings header file, fsl-edma.h, shared between
    the driver and dts files. This addition aims to eliminate hardcoded values
    in dts files, promoting maintainability and consistency.
    
    DTS header file not support BIT() macro yet. Directly use 2^n number.
    
    Signed-off-by: Frank Li <Frank.Li@nxp.com>
    Reviewed-by: Rob Herring <robh@kernel.org>
    Link: https://lore.kernel.org/r/20231114154824.3617255-3-Frank.Li@nxp.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Stable-dep-of: a79f949 ("dmaengine: fsl-edma: correct max_segment_size setting")
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    nxpfrankli authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    fb2f43e View commit details
    Browse the repository at this point in the history
  4. dmaengine: fsl-edma: utilize common dt-binding header file

    [ Upstream commit d0e217b ]
    
    Refactor the code to use the common dt-binding header file, fsl-edma.h.
    Renaming ARGS* to FSL_EDMA*, ensuring no functional changes.
    
    Signed-off-by: Frank Li <Frank.Li@nxp.com>
    Link: https://lore.kernel.org/r/20231114154824.3617255-4-Frank.Li@nxp.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Stable-dep-of: a79f949 ("dmaengine: fsl-edma: correct max_segment_size setting")
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    nxpfrankli authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    525c139 View commit details
    Browse the repository at this point in the history
  5. dmaengine: fsl-edma: correct max_segment_size setting

    [ Upstream commit a79f949 ]
    
    Correcting the previous setting of 0x3fff to the actual value of 0x7fff.
    
    Introduced new macro 'EDMA_TCD_ITER_MASK' for improved code clarity and
    utilization of FIELD_GET to obtain the accurate maximum value.
    
    Cc: stable@vger.kernel.org
    Fixes: e067485 ("dmaengine: fsl-edma: support edma memcpy")
    Signed-off-by: Frank Li <Frank.Li@nxp.com>
    Link: https://lore.kernel.org/r/20240207194733.2112870-1-Frank.Li@nxp.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    nxpfrankli authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    3b897ea View commit details
    Browse the repository at this point in the history
  6. ceph: switch to corrected encoding of max_xattr_size in mdsmap

    [ Upstream commit 51d3114 ]
    
    The addition of bal_rank_mask with encoding version 17 was merged
    into ceph.git in Oct 2022 and made it into v18.2.0 release normally.
    A few months later, the much delayed addition of max_xattr_size got
    merged, also with encoding version 17, placed before bal_rank_mask
    in the encoding -- but it didn't make v18.2.0 release.
    
    The way this ended up being resolved on the MDS side is that
    bal_rank_mask will continue to be encoded in version 17 while
    max_xattr_size is now encoded in version 18.  This does mean that
    older kernels will misdecode version 17, but this is also true for
    v18.2.0 and v18.2.1 clients in userspace.
    
    The best we can do is backport this adjustment -- see ceph.git
    commit 78abfeaff27fee343fb664db633de5b221699a73 for details.
    
    [ idryomov: changelog ]
    
    Cc: stable@vger.kernel.org
    Link: https://tracker.ceph.com/issues/64440
    Fixes: d93231a ("ceph: prevent a client from exceeding the MDS maximum xattr size")
    Signed-off-by: Xiubo Li <xiubli@redhat.com>
    Reviewed-by: Patrick Donnelly <pdonnell@ibm.com>
    Reviewed-by: Venky Shankar <vshankar@redhat.com>
    Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    lxbsz authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    641eb2d View commit details
    Browse the repository at this point in the history
  7. mm/vmscan: fix a bug calling wakeup_kswapd() with a wrong zone index

    [ Upstream commit 2774f25 ]
    
    With numa balancing on, when a numa system is running where a numa node
    doesn't have its local memory so it has no managed zones, the following
    oops has been observed.  It's because wakeup_kswapd() is called with a
    wrong zone index, -1.  Fixed it by checking the index before calling
    wakeup_kswapd().
    
    > BUG: unable to handle page fault for address: 00000000000033f3
    > #PF: supervisor read access in kernel mode
    > #PF: error_code(0x0000) - not-present page
    > PGD 0 P4D 0
    > Oops: 0000 [#1] PREEMPT SMP NOPTI
    > CPU: 2 PID: 895 Comm: masim Not tainted 6.6.0-dirty torvalds#255
    > Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
    >    rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
    > RIP: 0010:wakeup_kswapd (./linux/mm/vmscan.c:7812)
    > Code: (omitted)
    > RSP: 0000:ffffc90004257d58 EFLAGS: 00010286
    > RAX: ffffffffffffffff RBX: ffff88883fff0480 RCX: 0000000000000003
    > RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff88883fff0480
    > RBP: ffffffffffffffff R08: ff0003ffffffffff R09: ffffffffffffffff
    > R10: ffff888106c95540 R11: 0000000055555554 R12: 0000000000000003
    > R13: 0000000000000000 R14: 0000000000000000 R15: ffff88883fff0940
    > FS:  00007fc4b8124740(0000) GS:ffff888827c00000(0000) knlGS:0000000000000000
    > CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    > CR2: 00000000000033f3 CR3: 000000026cc08004 CR4: 0000000000770ee0
    > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    > DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    > PKRU: 55555554
    > Call Trace:
    >  <TASK>
    > ? __die
    > ? page_fault_oops
    > ? __pte_offset_map_lock
    > ? exc_page_fault
    > ? asm_exc_page_fault
    > ? wakeup_kswapd
    > migrate_misplaced_page
    > __handle_mm_fault
    > handle_mm_fault
    > do_user_addr_fault
    > exc_page_fault
    > asm_exc_page_fault
    > RIP: 0033:0x55b897ba0808
    > Code: (omitted)
    > RSP: 002b:00007ffeefa821a0 EFLAGS: 00010287
    > RAX: 000055b89983acd0 RBX: 00007ffeefa823f8 RCX: 000055b89983acd0
    > RDX: 00007fc2f8122010 RSI: 0000000000020000 RDI: 000055b89983acd0
    > RBP: 00007ffeefa821a0 R08: 0000000000000037 R09: 0000000000000075
    > R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000
    > R13: 00007ffeefa82410 R14: 000055b897ba5dd8 R15: 00007fc4b8340000
    >  </TASK>
    
    Link: https://lkml.kernel.org/r/20240216111502.79759-1-byungchul@sk.com
    Signed-off-by: Byungchul Park <byungchul@sk.com>
    Reported-by: Hyeongtak Ji <hyeongtak.ji@sk.com>
    Fixes: c574bbe ("NUMA balancing: optimize page placement for memory tiering system")
    Reviewed-by: Oscar Salvador <osalvador@suse.de>
    Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
    Cc: "Huang, Ying" <ying.huang@intel.com>
    Cc: Johannes Weiner <hannes@cmpxchg.org>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Byungchul Park authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    d6159bd View commit details
    Browse the repository at this point in the history
  8. xfrm: Pass UDP encapsulation in TX packet offload

    [ Upstream commit 983a73d ]
    
    In addition to citied commit in Fixes line, allow UDP encapsulation in
    TX path too.
    
    Fixes: 89edf40 ("xfrm: Support UDP encapsulation in packet offload mode")
    CC: Steffen Klassert <steffen.klassert@secunet.com>
    Reported-by: Mike Yu <yumike@google.com>
    Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    rleon authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    f6edcad View commit details
    Browse the repository at this point in the history
  9. net: lan78xx: fix runtime PM count underflow on link stop

    [ Upstream commit 1eecc7a ]
    
    Current driver has some asymmetry in the runtime PM calls. On lan78xx_open()
    it will call usb_autopm_get() and unconditionally usb_autopm_put(). And
    on lan78xx_stop() it will call only usb_autopm_put(). So far, it was
    working only because this driver do not activate autosuspend by default,
    so it was visible only by warning "Runtime PM usage count underflow!".
    
    Since, with current driver, we can't use runtime PM with active link,
    execute lan78xx_open()->usb_autopm_put() only in error case. Otherwise,
    keep ref counting high as long as interface is open.
    
    Fixes: 55d7de9 ("Microchip's LAN7800 family USB 2/3 to 10/100/1000 Ethernet device driver")
    Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    olerem authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    550fe71 View commit details
    Browse the repository at this point in the history
  10. ixgbe: {dis, en}able irqs in ixgbe_txrx_ring_{dis, en}able

    [ Upstream commit cbf996f ]
    
    Currently routines that are supposed to toggle state of ring pair do not
    take care of associated interrupt with queue vector that these rings
    belong to. This causes funky issues such as dead interface due to irq
    misconfiguration, as per Pavel's report from Closes: tag.
    
    Add a function responsible for disabling single IRQ in EIMC register and
    call this as a very first thing when disabling ring pair during xsk_pool
    setup. For enable let's reuse ixgbe_irq_enable_queues(). Besides this,
    disable/enable NAPI as first/last thing when dealing with closing or
    opening ring pair that xsk_pool is being configured on.
    
    Reported-by: Pavel Vazharov <pavel@x3me.net>
    Closes: https://lore.kernel.org/netdev/CAJEV1ijxNyPTwASJER1bcZzS9nMoZJqfR86nu_3jFFVXzZQ4NA@mail.gmail.com/
    Fixes: 024aa58 ("ixgbe: added Rx/Tx ring disable/enable functions")
    Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
    Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
    Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com> (A Contingent Worker at Intel)
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    mfijalko authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    2e60e95 View commit details
    Browse the repository at this point in the history
  11. i40e: disable NAPI right after disabling irqs when handling xsk_pool

    [ Upstream commit d562b11 ]
    
    Disable NAPI before shutting down queues that this particular NAPI
    contains so that the order of actions in i40e_queue_pair_disable()
    mirrors what we do in i40e_queue_pair_enable().
    
    Fixes: 123cecd ("i40e: added queue pair disable/enable functions")
    Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
    Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com> (A Contingent Worker at Intel)
    Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    mfijalko authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    484c8e3 View commit details
    Browse the repository at this point in the history
  12. ice: reorder disabling IRQ and NAPI in ice_qp_dis

    [ Upstream commit 99099c6 ]
    
    ice_qp_dis() currently does things in very mixed way. Tx is stopped
    before disabling IRQ on related queue vector, then it takes care of
    disabling Rx and finally NAPI is disabled.
    
    Let us start with disabling IRQs in the first place followed by turning
    off NAPI. Then it is safe to handle queues.
    
    One subtle change on top of that is that even though ice_qp_ena() looks
    more sane, clear ICE_CFG_BUSY as the last thing there.
    
    Fixes: 2d4238f ("ice: Add support for AF_XDP")
    Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
    Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com> (A Contingent Worker at Intel)
    Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    mfijalko authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    4c0b028 View commit details
    Browse the repository at this point in the history
  13. Revert "net/mlx5: Block entering switchdev mode with ns inconsistency"

    [ Upstream commit 8deeefb ]
    
    This reverts commit 662404b.
    The revert is required due to the suspicion it is not good for anything
    and cause crash.
    
    Fixes: 662404b ("net/mlx5e: Block entering switchdev mode with ns inconsistency")
    Signed-off-by: Gavin Li <gavinl@nvidia.com>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    GavinLi-NV authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    3fba8ea View commit details
    Browse the repository at this point in the history
  14. Revert "net/mlx5e: Check the number of elements before walk TC rhasht…

    …able"
    
    [ Upstream commit b7bbd69 ]
    
    This reverts commit 4e25b66.
    
    This Commit was mistakenly applied by pulling the wrong tag, remove it.
    
    Fixes: 4e25b66 ("net/mlx5e: Check the number of elements before walk TC rhashtable")
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Saeed Mahameed authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    ba888f1 View commit details
    Browse the repository at this point in the history
  15. net/mlx5: E-switch, Change flow rule destination checking

    [ Upstream commit 85ea2c5 ]
    
    The checking in the cited commit is not accurate. In the common case,
    VF destination is internal, and uplink destination is external.
    However, uplink destination with packet reformat is considered as
    internal because firmware uses LB+hairpin to support it. Update the
    checking so header rewrite rules with both internal and external
    destinations are not allowed.
    
    Fixes: e0e22d5 ("net/mlx5: E-switch, Add checking for flow rule destinations")
    Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
    Reviewed-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Jianbo Liu authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    c8d7228 View commit details
    Browse the repository at this point in the history
  16. net/mlx5: Check capability for fw_reset

    [ Upstream commit 5e6107b ]
    
    Functions which can't access MFRL (Management Firmware Reset Level)
    register, have no use of fw_reset structures or events. Remove fw_reset
    structures allocation and registration for fw reset events notifications
    for these functions.
    
    Having the devlink param enable_remote_dev_reset on functions that don't
    have this capability is misleading as these functions are not allowed to
    influence the reset flow. Hence, this patch removes this parameter for
    such functions.
    
    In addition, return not supported on devlink reload action fw_activate
    for these functions.
    
    Fixes: 38b9f90 ("net/mlx5: Handle sync reset request event")
    Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
    Reviewed-by: Aya Levin <ayal@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    mosheshemesh2 authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    c11138f View commit details
    Browse the repository at this point in the history
  17. net/mlx5e: Change the warning when ignore_flow_level is not supported

    [ Upstream commit dd238b7 ]
    
    Downgrade the print from mlx5_core_warn() to mlx5_core_dbg(), as it
    is just a statement of fact that firmware doesn't support ignore flow
    level.
    
    And change the wording to "firmware flow level support is missing", to
    make it more accurate.
    
    Fixes: ae2ee3b ("net/mlx5: CT: Remove warning of ignore_flow_level support for VFs")
    Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
    Suggested-by: Elliott, Robert (Servers) <elliott@hpe.com>
    Reviewed-by: Roi Dayan <roid@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Jianbo Liu authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    6d6bb52 View commit details
    Browse the repository at this point in the history
  18. net/mlx5e: Fix MACsec state loss upon state update in offload path

    [ Upstream commit a71f214 ]
    
    The packet number attribute of the SA is incremented by the device rather
    than the software stack when enabling hardware offload. Because the packet
    number attribute is managed by the hardware, the software has no insight
    into the value of the packet number attribute actually written by the
    device.
    
    Previously when MACsec offload was enabled, the hardware object for
    handling the offload was destroyed when the SA was disabled. Re-enabling
    the SA would lead to a new hardware object being instantiated. This new
    hardware object would not have any recollection of the correct packet
    number for the SA. Instead, destroy the flow steering rule when
    deactivating the SA and recreate it upon reactivation, preserving the
    original hardware object.
    
    Fixes: 8ff0ac5 ("net/mlx5: Add MACsec offload Tx command support")
    Signed-off-by: Emeel Hakim <ehakim@nvidia.com>
    Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
    Reviewed-by: Gal Pressman <gal@nvidia.com>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Emeel Hakim authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    b526c31 View commit details
    Browse the repository at this point in the history
  19. net/mlx5e: Use a memory barrier to enforce PTP WQ xmit submission tra…

    …cking occurs after populating the metadata_map
    
    [ Upstream commit b7cf075 ]
    
    Just simply reordering the functions mlx5e_ptp_metadata_map_put and
    mlx5e_ptpsq_track_metadata in the mlx5e_txwqe_complete context is not good
    enough since both the compiler and CPU are free to reorder these two
    functions. If reordering does occur, the issue that was supposedly fixed by
    7e3f3ba ("net/mlx5e: Track xmit submission to PTP WQ after populating
    metadata map") will be seen. This will lead to NULL pointer dereferences in
    mlx5e_ptpsq_mark_ts_cqes_undelivered in the NAPI polling context due to the
    tracking list being populated before the metadata map.
    
    Fixes: 7e3f3ba ("net/mlx5e: Track xmit submission to PTP WQ after populating metadata map")
    Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    CC: Vadim Fedorenko <vadfed@meta.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Binary-Eater authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    d1f7161 View commit details
    Browse the repository at this point in the history
  20. net/mlx5e: Switch to using _bh variant of of spinlock API in port tim…

    …estamping NAPI poll context
    
    [ Upstream commit 90502d4 ]
    
    The NAPI poll context is a softirq context. Do not use normal spinlock API
    in this context to prevent concurrency issues.
    
    Fixes: 3178308 ("net/mlx5e: Make tx_port_ts logic resilient to out-of-order CQEs")
    Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
    Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
    CC: Vadim Fedorenko <vadfed@meta.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Binary-Eater authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    d98d364 View commit details
    Browse the repository at this point in the history
  21. tracing/net_sched: Fix tracepoints that save qdisc_dev() as a string

    [ Upstream commit 51270d5 ]
    
    I'm updating __assign_str() and will be removing the second parameter. To
    make sure that it does not break anything, I make sure that it matches the
    __string() field, as that is where the string is actually going to be
    saved in. To make sure there's nothing that breaks, I added a WARN_ON() to
    make sure that what was used in __string() is the same that is used in
    __assign_str().
    
    In doing this change, an error was triggered as __assign_str() now expects
    the string passed in to be a char * value. I instead had the following
    warning:
    
    include/trace/events/qdisc.h: In function ‘trace_event_raw_event_qdisc_reset’:
    include/trace/events/qdisc.h:91:35: error: passing argument 1 of 'strcmp' from incompatible pointer type [-Werror=incompatible-pointer-types]
       91 |                 __assign_str(dev, qdisc_dev(q));
    
    That's because the qdisc_enqueue() and qdisc_reset() pass in qdisc_dev(q)
    to __assign_str() and to __string(). But that function returns a pointer
    to struct net_device and not a string.
    
    It appears that these events are just saving the pointer as a string and
    then reading it as a string as well.
    
    Use qdisc_dev(q)->name to save the device instead.
    
    Fixes: a34dac0 ("net_sched: add tracepoints for qdisc_reset() and qdisc_destroy()")
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
    Reviewed-by: Jamal Hadi Salim <jhs@mojatatu.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    rostedt authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    24d5a89 View commit details
    Browse the repository at this point in the history
  22. geneve: make sure to pull inner header in geneve_rx()

    [ Upstream commit 1ca1ba4 ]
    
    syzbot triggered a bug in geneve_rx() [1]
    
    Issue is similar to the one I fixed in commit 8d975c1
    ("ip6_tunnel: make sure to pull inner header in __ip6_tnl_rcv()")
    
    We have to save skb->network_header in a temporary variable
    in order to be able to recompute the network_header pointer
    after a pskb_inet_may_pull() call.
    
    pskb_inet_may_pull() makes sure the needed headers are in skb->head.
    
    [1]
    BUG: KMSAN: uninit-value in IP_ECN_decapsulate include/net/inet_ecn.h:302 [inline]
     BUG: KMSAN: uninit-value in geneve_rx drivers/net/geneve.c:279 [inline]
     BUG: KMSAN: uninit-value in geneve_udp_encap_recv+0x36f9/0x3c10 drivers/net/geneve.c:391
      IP_ECN_decapsulate include/net/inet_ecn.h:302 [inline]
      geneve_rx drivers/net/geneve.c:279 [inline]
      geneve_udp_encap_recv+0x36f9/0x3c10 drivers/net/geneve.c:391
      udp_queue_rcv_one_skb+0x1d39/0x1f20 net/ipv4/udp.c:2108
      udp_queue_rcv_skb+0x6ae/0x6e0 net/ipv4/udp.c:2186
      udp_unicast_rcv_skb+0x184/0x4b0 net/ipv4/udp.c:2346
      __udp4_lib_rcv+0x1c6b/0x3010 net/ipv4/udp.c:2422
      udp_rcv+0x7d/0xa0 net/ipv4/udp.c:2604
      ip_protocol_deliver_rcu+0x264/0x1300 net/ipv4/ip_input.c:205
      ip_local_deliver_finish+0x2b8/0x440 net/ipv4/ip_input.c:233
      NF_HOOK include/linux/netfilter.h:314 [inline]
      ip_local_deliver+0x21f/0x490 net/ipv4/ip_input.c:254
      dst_input include/net/dst.h:461 [inline]
      ip_rcv_finish net/ipv4/ip_input.c:449 [inline]
      NF_HOOK include/linux/netfilter.h:314 [inline]
      ip_rcv+0x46f/0x760 net/ipv4/ip_input.c:569
      __netif_receive_skb_one_core net/core/dev.c:5534 [inline]
      __netif_receive_skb+0x1a6/0x5a0 net/core/dev.c:5648
      process_backlog+0x480/0x8b0 net/core/dev.c:5976
      __napi_poll+0xe3/0x980 net/core/dev.c:6576
      napi_poll net/core/dev.c:6645 [inline]
      net_rx_action+0x8b8/0x1870 net/core/dev.c:6778
      __do_softirq+0x1b7/0x7c5 kernel/softirq.c:553
      do_softirq+0x9a/0xf0 kernel/softirq.c:454
      __local_bh_enable_ip+0x9b/0xa0 kernel/softirq.c:381
      local_bh_enable include/linux/bottom_half.h:33 [inline]
      rcu_read_unlock_bh include/linux/rcupdate.h:820 [inline]
      __dev_queue_xmit+0x2768/0x51c0 net/core/dev.c:4378
      dev_queue_xmit include/linux/netdevice.h:3171 [inline]
      packet_xmit+0x9c/0x6b0 net/packet/af_packet.c:276
      packet_snd net/packet/af_packet.c:3081 [inline]
      packet_sendmsg+0x8aef/0x9f10 net/packet/af_packet.c:3113
      sock_sendmsg_nosec net/socket.c:730 [inline]
      __sock_sendmsg net/socket.c:745 [inline]
      __sys_sendto+0x735/0xa10 net/socket.c:2191
      __do_sys_sendto net/socket.c:2203 [inline]
      __se_sys_sendto net/socket.c:2199 [inline]
      __x64_sys_sendto+0x125/0x1c0 net/socket.c:2199
      do_syscall_x64 arch/x86/entry/common.c:52 [inline]
      do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
     entry_SYSCALL_64_after_hwframe+0x63/0x6b
    
    Uninit was created at:
      slab_post_alloc_hook mm/slub.c:3819 [inline]
      slab_alloc_node mm/slub.c:3860 [inline]
      kmem_cache_alloc_node+0x5cb/0xbc0 mm/slub.c:3903
      kmalloc_reserve+0x13d/0x4a0 net/core/skbuff.c:560
      __alloc_skb+0x352/0x790 net/core/skbuff.c:651
      alloc_skb include/linux/skbuff.h:1296 [inline]
      alloc_skb_with_frags+0xc8/0xbd0 net/core/skbuff.c:6394
      sock_alloc_send_pskb+0xa80/0xbf0 net/core/sock.c:2783
      packet_alloc_skb net/packet/af_packet.c:2930 [inline]
      packet_snd net/packet/af_packet.c:3024 [inline]
      packet_sendmsg+0x70c2/0x9f10 net/packet/af_packet.c:3113
      sock_sendmsg_nosec net/socket.c:730 [inline]
      __sock_sendmsg net/socket.c:745 [inline]
      __sys_sendto+0x735/0xa10 net/socket.c:2191
      __do_sys_sendto net/socket.c:2203 [inline]
      __se_sys_sendto net/socket.c:2199 [inline]
      __x64_sys_sendto+0x125/0x1c0 net/socket.c:2199
      do_syscall_x64 arch/x86/entry/common.c:52 [inline]
      do_syscall_64+0xcf/0x1e0 arch/x86/entry/common.c:83
     entry_SYSCALL_64_after_hwframe+0x63/0x6b
    
    Fixes: 2d07dc7 ("geneve: add initial netdev driver for GENEVE tunnels")
    Reported-and-tested-by: syzbot+6a1423ff3f97159aae64@syzkaller.appspotmail.com
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reviewed-by: Jiri Pirko <jiri@nvidia.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Eric Dumazet authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    0ece581 View commit details
    Browse the repository at this point in the history
  23. net: sparx5: Fix use after free inside sparx5_del_mact_entry

    [ Upstream commit 89d72d4 ]
    
    Based on the static analyzis of the code it looks like when an entry
    from the MAC table was removed, the entry was still used after being
    freed. More precise the vid of the mac_entry was used after calling
    devm_kfree on the mac_entry.
    The fix consists in first using the vid of the mac_entry to delete the
    entry from the HW and after that to free it.
    
    Fixes: b37a1ba ("net: sparx5: add mactable support")
    Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://lore.kernel.org/r/20240301080608.3053468-1-horatiu.vultur@microchip.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    HoratiuVultur authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    e83bebb View commit details
    Browse the repository at this point in the history
  24. ice: virtchnl: stop pretending to support RSS over AQ or registers

    [ Upstream commit 2652b99 ]
    
    The E800 series hardware uses the same iAVF driver as older devices,
    including the virtchnl negotiation scheme.
    
    This negotiation scheme includes a mechanism to determine what type of RSS
    should be supported, including RSS over PF virtchnl messages, RSS over
    firmware AdminQ messages, and RSS via direct register access.
    
    The PF driver will always prefer VIRTCHNL_VF_OFFLOAD_RSS_PF if its
    supported by the VF driver. However, if an older VF driver is loaded, it
    may request only VIRTCHNL_VF_OFFLOAD_RSS_REG or VIRTCHNL_VF_OFFLOAD_RSS_AQ.
    
    The ice driver happily agrees to support these methods. Unfortunately, the
    underlying hardware does not support these mechanisms. The E800 series VFs
    don't have the appropriate registers for RSS_REG. The mailbox queue used by
    VFs for VF to PF communication blocks messages which do not have the
    VF-to-PF opcode.
    
    Stop lying to the VF that it could support RSS over AdminQ or registers, as
    these interfaces do not work when the hardware is operating on an E800
    series device.
    
    In practice this is unlikely to be hit by any normal user. The iAVF driver
    has supported RSS over PF virtchnl commands since 2016, and always defaults
    to using RSS_PF if possible.
    
    In principle, nothing actually stops the existing VF from attempting to
    access the registers or send an AQ command. However a properly coded VF
    will check the capability flags and will report a more useful error if it
    detects a case where the driver does not support the RSS offloads that it
    does.
    
    Fixes: 1071a83 ("ice: Implement virtchnl commands for AVF support")
    Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
    Reviewed-by: Alan Brady <alan.brady@intel.com>
    Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    jacob-keller authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    671a286 View commit details
    Browse the repository at this point in the history
  25. net: ice: Fix potential NULL pointer dereference in ice_bridge_setlink()

    [ Upstream commit 06e456a ]
    
    The function ice_bridge_setlink() may encounter a NULL pointer dereference
    if nlmsg_find_attr() returns NULL and br_spec is dereferenced subsequently
    in nla_for_each_nested(). To address this issue, add a check to ensure that
    br_spec is not NULL before proceeding with the nested attribute iteration.
    
    Fixes: b1edc14 ("ice: Implement ice_bridge_getlink and ice_bridge_setlink")
    Signed-off-by: Rand Deeb <rand.sec96@gmail.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    RandDeeb authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    1a77092 View commit details
    Browse the repository at this point in the history
  26. igc: avoid returning frame twice in XDP_REDIRECT

    [ Upstream commit ef27f65 ]
    
    When a frame can not be transmitted in XDP_REDIRECT
    (e.g. due to a full queue), it is necessary to free
    it by calling xdp_return_frame_rx_napi.
    
    However, this is the responsibility of the caller of
    the ndo_xdp_xmit (see for example bq_xmit_all in
    kernel/bpf/devmap.c) and thus calling it inside
    igc_xdp_xmit (which is the ndo_xdp_xmit of the igc
    driver) as well will lead to memory corruption.
    
    In fact, bq_xmit_all expects that it can return all
    frames after the last successfully transmitted one.
    Therefore, break for the first not transmitted frame,
    but do not call xdp_return_frame_rx_napi in igc_xdp_xmit.
    This is equally implemented in other Intel drivers
    such as the igb.
    
    There are two alternatives to this that were rejected:
    1. Return num_frames as all the frames would have been
       transmitted and release them inside igc_xdp_xmit.
       While it might work technically, it is not what
       the return value is meant to represent (i.e. the
       number of SUCCESSFULLY transmitted packets).
    2. Rework kernel/bpf/devmap.c and all drivers to
       support non-consecutively dropped packets.
       Besides being complex, it likely has a negative
       performance impact without a significant gain
       since it is anyway unlikely that the next frame
       can be transmitted if the previous one was dropped.
    
    The memory corruption can be reproduced with
    the following script which leads to a kernel panic
    after a few seconds.  It basically generates more
    traffic than a i225 NIC can transmit and pushes it
    via XDP_REDIRECT from a virtual interface to the
    physical interface where frames get dropped.
    
       #!/bin/bash
       INTERFACE=enp4s0
       INTERFACE_IDX=`cat /sys/class/net/$INTERFACE/ifindex`
    
       sudo ip link add dev veth1 type veth peer name veth2
       sudo ip link set up $INTERFACE
       sudo ip link set up veth1
       sudo ip link set up veth2
    
       cat << EOF > redirect.bpf.c
    
       SEC("prog")
       int redirect(struct xdp_md *ctx)
       {
           return bpf_redirect($INTERFACE_IDX, 0);
       }
    
       char _license[] SEC("license") = "GPL";
       EOF
       clang -O2 -g -Wall -target bpf -c redirect.bpf.c -o redirect.bpf.o
       sudo ip link set veth2 xdp obj redirect.bpf.o
    
       cat << EOF > pass.bpf.c
    
       SEC("prog")
       int pass(struct xdp_md *ctx)
       {
           return XDP_PASS;
       }
    
       char _license[] SEC("license") = "GPL";
       EOF
       clang -O2 -g -Wall -target bpf -c pass.bpf.c -o pass.bpf.o
       sudo ip link set $INTERFACE xdp obj pass.bpf.o
    
       cat << EOF > trafgen.cfg
    
       {
         /* Ethernet Header */
         0xe8, 0x6a, 0x64, 0x41, 0xbf, 0x46,
         0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
         const16(ETH_P_IP),
    
         /* IPv4 Header */
         0b01000101, 0,   # IPv4 version, IHL, TOS
         const16(1028),   # IPv4 total length (UDP length + 20 bytes (IP header))
         const16(2),      # IPv4 ident
         0b01000000, 0,   # IPv4 flags, fragmentation off
         64,              # IPv4 TTL
         17,              # Protocol UDP
         csumip(14, 33),  # IPv4 checksum
    
         /* UDP Header */
         10,  0, 1, 1,    # IP Src - adapt as needed
         10,  0, 1, 2,    # IP Dest - adapt as needed
         const16(6666),   # UDP Src Port
         const16(6666),   # UDP Dest Port
         const16(1008),   # UDP length (UDP header 8 bytes + payload length)
         csumudp(14, 34), # UDP checksum
    
         /* Payload */
         fill('W', 1000),
       }
       EOF
    
       sudo trafgen -i trafgen.cfg -b3000MB -o veth1 --cpp
    
    Fixes: 4ff3203 ("igc: Add support for XDP_REDIRECT action")
    Signed-off-by: Florian Kauer <florian.kauer@linutronix.de>
    Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
    Tested-by: Naama Meir <naamax.meir@linux.intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    koalo authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    8df393a View commit details
    Browse the repository at this point in the history
  27. net/ipv6: avoid possible UAF in ip6_route_mpath_notify()

    [ Upstream commit 685f7d5 ]
    
    syzbot found another use-after-free in ip6_route_mpath_notify() [1]
    
    Commit f722517 ("net/ipv6: prevent use after free in
    ip6_route_mpath_notify") was not able to fix the root cause.
    
    We need to defer the fib6_info_release() calls after
    ip6_route_mpath_notify(), in the cleanup phase.
    
    [1]
    BUG: KASAN: slab-use-after-free in rt6_fill_node+0x1460/0x1ac0
    Read of size 4 at addr ffff88809a07fc64 by task syz-executor.2/23037
    
    CPU: 0 PID: 23037 Comm: syz-executor.2 Not tainted 6.8.0-rc4-syzkaller-01035-gea7f3cfaa588 #0
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
    Call Trace:
     <TASK>
      __dump_stack lib/dump_stack.c:88 [inline]
      dump_stack_lvl+0x1e7/0x2e0 lib/dump_stack.c:106
      print_address_description mm/kasan/report.c:377 [inline]
      print_report+0x167/0x540 mm/kasan/report.c:488
      kasan_report+0x142/0x180 mm/kasan/report.c:601
     rt6_fill_node+0x1460/0x1ac0
      inet6_rt_notify+0x13b/0x290 net/ipv6/route.c:6184
      ip6_route_mpath_notify net/ipv6/route.c:5198 [inline]
      ip6_route_multipath_add net/ipv6/route.c:5404 [inline]
      inet6_rtm_newroute+0x1d0f/0x2300 net/ipv6/route.c:5517
      rtnetlink_rcv_msg+0x885/0x1040 net/core/rtnetlink.c:6597
      netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2543
      netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline]
      netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1367
      netlink_sendmsg+0xa3b/0xd70 net/netlink/af_netlink.c:1908
      sock_sendmsg_nosec net/socket.c:730 [inline]
      __sock_sendmsg+0x221/0x270 net/socket.c:745
      ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584
      ___sys_sendmsg net/socket.c:2638 [inline]
      __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667
     do_syscall_64+0xf9/0x240
     entry_SYSCALL_64_after_hwframe+0x6f/0x77
    RIP: 0033:0x7f73dd87dda9
    Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
    RSP: 002b:00007f73de6550c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
    RAX: ffffffffffffffda RBX: 00007f73dd9ac050 RCX: 00007f73dd87dda9
    RDX: 0000000000000000 RSI: 0000000020000140 RDI: 0000000000000005
    RBP: 00007f73dd8ca47a R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
    R13: 000000000000006e R14: 00007f73dd9ac050 R15: 00007ffdbdeb7858
     </TASK>
    
    Allocated by task 23037:
      kasan_save_stack mm/kasan/common.c:47 [inline]
      kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
      poison_kmalloc_redzone mm/kasan/common.c:372 [inline]
      __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:389
      kasan_kmalloc include/linux/kasan.h:211 [inline]
      __do_kmalloc_node mm/slub.c:3981 [inline]
      __kmalloc+0x22e/0x490 mm/slub.c:3994
      kmalloc include/linux/slab.h:594 [inline]
      kzalloc include/linux/slab.h:711 [inline]
      fib6_info_alloc+0x2e/0xf0 net/ipv6/ip6_fib.c:155
      ip6_route_info_create+0x445/0x12b0 net/ipv6/route.c:3758
      ip6_route_multipath_add net/ipv6/route.c:5298 [inline]
      inet6_rtm_newroute+0x744/0x2300 net/ipv6/route.c:5517
      rtnetlink_rcv_msg+0x885/0x1040 net/core/rtnetlink.c:6597
      netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2543
      netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline]
      netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1367
      netlink_sendmsg+0xa3b/0xd70 net/netlink/af_netlink.c:1908
      sock_sendmsg_nosec net/socket.c:730 [inline]
      __sock_sendmsg+0x221/0x270 net/socket.c:745
      ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584
      ___sys_sendmsg net/socket.c:2638 [inline]
      __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667
     do_syscall_64+0xf9/0x240
     entry_SYSCALL_64_after_hwframe+0x6f/0x77
    
    Freed by task 16:
      kasan_save_stack mm/kasan/common.c:47 [inline]
      kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
      kasan_save_free_info+0x4e/0x60 mm/kasan/generic.c:640
      poison_slab_object+0xa6/0xe0 mm/kasan/common.c:241
      __kasan_slab_free+0x34/0x70 mm/kasan/common.c:257
      kasan_slab_free include/linux/kasan.h:184 [inline]
      slab_free_hook mm/slub.c:2121 [inline]
      slab_free mm/slub.c:4299 [inline]
      kfree+0x14a/0x380 mm/slub.c:4409
      rcu_do_batch kernel/rcu/tree.c:2190 [inline]
      rcu_core+0xd76/0x1810 kernel/rcu/tree.c:2465
      __do_softirq+0x2bb/0x942 kernel/softirq.c:553
    
    Last potentially related work creation:
      kasan_save_stack+0x3f/0x60 mm/kasan/common.c:47
      __kasan_record_aux_stack+0xae/0x100 mm/kasan/generic.c:586
      __call_rcu_common kernel/rcu/tree.c:2715 [inline]
      call_rcu+0x167/0xa80 kernel/rcu/tree.c:2829
      fib6_info_release include/net/ip6_fib.h:341 [inline]
      ip6_route_multipath_add net/ipv6/route.c:5344 [inline]
      inet6_rtm_newroute+0x114d/0x2300 net/ipv6/route.c:5517
      rtnetlink_rcv_msg+0x885/0x1040 net/core/rtnetlink.c:6597
      netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2543
      netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline]
      netlink_unicast+0x7ea/0x980 net/netlink/af_netlink.c:1367
      netlink_sendmsg+0xa3b/0xd70 net/netlink/af_netlink.c:1908
      sock_sendmsg_nosec net/socket.c:730 [inline]
      __sock_sendmsg+0x221/0x270 net/socket.c:745
      ____sys_sendmsg+0x525/0x7d0 net/socket.c:2584
      ___sys_sendmsg net/socket.c:2638 [inline]
      __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2667
     do_syscall_64+0xf9/0x240
     entry_SYSCALL_64_after_hwframe+0x6f/0x77
    
    The buggy address belongs to the object at ffff88809a07fc00
     which belongs to the cache kmalloc-512 of size 512
    The buggy address is located 100 bytes inside of
     freed 512-byte region [ffff88809a07fc00, ffff88809a07fe00)
    
    The buggy address belongs to the physical page:
    page:ffffea0002681f00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x9a07c
    head:ffffea0002681f00 order:2 entire_mapcount:0 nr_pages_mapped:0 pincount:0
    flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff)
    page_type: 0xffffffff()
    raw: 00fff00000000840 ffff888014c41c80 dead000000000122 0000000000000000
    raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000
    page dumped because: kasan: bad access detected
    page_owner tracks the page as allocated
    page last allocated via order 2, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 23028, tgid 23027 (syz-executor.4), ts 2340253595219, free_ts 2339107097036
      set_page_owner include/linux/page_owner.h:31 [inline]
      post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1533
      prep_new_page mm/page_alloc.c:1540 [inline]
      get_page_from_freelist+0x33ea/0x3580 mm/page_alloc.c:3311
      __alloc_pages+0x255/0x680 mm/page_alloc.c:4567
      __alloc_pages_node include/linux/gfp.h:238 [inline]
      alloc_pages_node include/linux/gfp.h:261 [inline]
      alloc_slab_page+0x5f/0x160 mm/slub.c:2190
      allocate_slab mm/slub.c:2354 [inline]
      new_slab+0x84/0x2f0 mm/slub.c:2407
      ___slab_alloc+0xd17/0x13e0 mm/slub.c:3540
      __slab_alloc mm/slub.c:3625 [inline]
      __slab_alloc_node mm/slub.c:3678 [inline]
      slab_alloc_node mm/slub.c:3850 [inline]
      __do_kmalloc_node mm/slub.c:3980 [inline]
      __kmalloc+0x2e0/0x490 mm/slub.c:3994
      kmalloc include/linux/slab.h:594 [inline]
      kzalloc include/linux/slab.h:711 [inline]
      new_dir fs/proc/proc_sysctl.c:956 [inline]
      get_subdir fs/proc/proc_sysctl.c:1000 [inline]
      sysctl_mkdir_p fs/proc/proc_sysctl.c:1295 [inline]
      __register_sysctl_table+0xb30/0x1440 fs/proc/proc_sysctl.c:1376
      neigh_sysctl_register+0x416/0x500 net/core/neighbour.c:3859
      devinet_sysctl_register+0xaf/0x1f0 net/ipv4/devinet.c:2644
      inetdev_init+0x296/0x4d0 net/ipv4/devinet.c:286
      inetdev_event+0x338/0x15c0 net/ipv4/devinet.c:1555
      notifier_call_chain+0x18f/0x3b0 kernel/notifier.c:93
      call_netdevice_notifiers_extack net/core/dev.c:1987 [inline]
      call_netdevice_notifiers net/core/dev.c:2001 [inline]
      register_netdevice+0x15b2/0x1a20 net/core/dev.c:10340
      br_dev_newlink+0x27/0x100 net/bridge/br_netlink.c:1563
      rtnl_newlink_create net/core/rtnetlink.c:3497 [inline]
      __rtnl_newlink net/core/rtnetlink.c:3717 [inline]
      rtnl_newlink+0x158f/0x20a0 net/core/rtnetlink.c:3730
    page last free pid 11583 tgid 11583 stack trace:
      reset_page_owner include/linux/page_owner.h:24 [inline]
      free_pages_prepare mm/page_alloc.c:1140 [inline]
      free_unref_page_prepare+0x968/0xa90 mm/page_alloc.c:2346
      free_unref_page+0x37/0x3f0 mm/page_alloc.c:2486
      kasan_depopulate_vmalloc_pte+0x74/0x90 mm/kasan/shadow.c:415
      apply_to_pte_range mm/memory.c:2619 [inline]
      apply_to_pmd_range mm/memory.c:2663 [inline]
      apply_to_pud_range mm/memory.c:2699 [inline]
      apply_to_p4d_range mm/memory.c:2735 [inline]
      __apply_to_page_range+0x8ec/0xe40 mm/memory.c:2769
      kasan_release_vmalloc+0x9a/0xb0 mm/kasan/shadow.c:532
      __purge_vmap_area_lazy+0x163f/0x1a10 mm/vmalloc.c:1770
      drain_vmap_area_work+0x40/0xd0 mm/vmalloc.c:1804
      process_one_work kernel/workqueue.c:2633 [inline]
      process_scheduled_works+0x913/0x1420 kernel/workqueue.c:2706
      worker_thread+0xa5f/0x1000 kernel/workqueue.c:2787
      kthread+0x2ef/0x390 kernel/kthread.c:388
      ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
      ret_from_fork_asm+0x1b/0x30 arch/x86/entry/entry_64.S:242
    
    Memory state around the buggy address:
     ffff88809a07fb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
     ffff88809a07fb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    >ffff88809a07fc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                           ^
     ffff88809a07fc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
     ffff88809a07fd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    
    Fixes: 3b1137f ("net: ipv6: Change notifications for multipath add to RTA_MULTIPATH")
    Reported-by: syzbot <syzkaller@googlegroups.com>
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reviewed-by: David Ahern <dsahern@kernel.org>
    Link: https://lore.kernel.org/r/20240303144801.702646-1-edumazet@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Eric Dumazet authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    ed88306 View commit details
    Browse the repository at this point in the history
  28. bpf: check bpf_func_state->callback_depth when pruning states

    [ Upstream commit e9a8e5a ]
    
    When comparing current and cached states verifier should consider
    bpf_func_state->callback_depth. Current state cannot be pruned against
    cached state, when current states has more iterations left compared to
    cached state. Current state has more iterations left when it's
    callback_depth is smaller.
    
    Below is an example illustrating this bug, minimized from mailing list
    discussion [0] (assume that BPF_F_TEST_STATE_FREQ is set).
    The example is not a safe program: if loop_cb point (1) is followed by
    loop_cb point (2), then division by zero is possible at point (4).
    
        struct ctx {
        	__u64 a;
        	__u64 b;
        	__u64 c;
        };
    
        static void loop_cb(int i, struct ctx *ctx)
        {
        	/* assume that generated code is "fallthrough-first":
        	 * if ... == 1 goto
        	 * if ... == 2 goto
        	 * <default>
        	 */
        	switch (bpf_get_prandom_u32()) {
        	case 1:  /* 1 */ ctx->a = 42; return 0; break;
        	case 2:  /* 2 */ ctx->b = 42; return 0; break;
        	default: /* 3 */ ctx->c = 42; return 0; break;
        	}
        }
    
        SEC("tc")
        __failure
        __flag(BPF_F_TEST_STATE_FREQ)
        int test(struct __sk_buff *skb)
        {
        	struct ctx ctx = { 7, 7, 7 };
    
        	bpf_loop(2, loop_cb, &ctx, 0);              /* 0 */
        	/* assume generated checks are in-order: .a first */
        	if (ctx.a == 42 && ctx.b == 42 && ctx.c == 7)
        		asm volatile("r0 /= 0;":::"r0");    /* 4 */
        	return 0;
        }
    
    Prior to this commit verifier built the following checkpoint tree for
    this example:
    
     .------------------------------------- Checkpoint / State name
     |    .-------------------------------- Code point number
     |    |   .---------------------------- Stack state {ctx.a,ctx.b,ctx.c}
     |    |   |        .------------------- Callback depth in frame #0
     v    v   v        v
       - (0) {7P,7P,7},depth=0
         - (3) {7P,7P,7},depth=1
           - (0) {7P,7P,42},depth=1
             - (3) {7P,7,42},depth=2
               - (0) {7P,7,42},depth=2      loop terminates because of depth limit
                 - (4) {7P,7,42},depth=0    predicted false, ctx.a marked precise
                 - (6) exit
    (a)      - (2) {7P,7,42},depth=2
               - (0) {7P,42,42},depth=2     loop terminates because of depth limit
                 - (4) {7P,42,42},depth=0   predicted false, ctx.a marked precise
                 - (6) exit
    (b)      - (1) {7P,7P,42},depth=2
               - (0) {42P,7P,42},depth=2    loop terminates because of depth limit
                 - (4) {42P,7P,42},depth=0  predicted false, ctx.{a,b} marked precise
                 - (6) exit
         - (2) {7P,7,7},depth=1             considered safe, pruned using checkpoint (a)
    (c)  - (1) {7P,7P,7},depth=1            considered safe, pruned using checkpoint (b)
    
    Here checkpoint (b) has callback_depth of 2, meaning that it would
    never reach state {42,42,7}.
    While checkpoint (c) has callback_depth of 1, and thus
    could yet explore the state {42,42,7} if not pruned prematurely.
    This commit makes forbids such premature pruning,
    allowing verifier to explore states sub-tree starting at (c):
    
    (c)  - (1) {7,7,7P},depth=1
           - (0) {42P,7,7P},depth=1
             ...
             - (2) {42,7,7},depth=2
               - (0) {42,42,7},depth=2      loop terminates because of depth limit
                 - (4) {42,42,7},depth=0    predicted true, ctx.{a,b,c} marked precise
                   - (5) division by zero
    
    [0] https://lore.kernel.org/bpf/9b251840-7cb8-4d17-bd23-1fc8071d8eef@linux.dev/
    
    Fixes: bb124da ("bpf: keep track of max number of bpf_loop callback iterations")
    Suggested-by: Yonghong Song <yonghong.song@linux.dev>
    Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
    Acked-by: Yonghong Song <yonghong.song@linux.dev>
    Link: https://lore.kernel.org/r/20240222154121.6991-2-eddyz87@gmail.com
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    eddyz87 authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    ff4d600 View commit details
    Browse the repository at this point in the history
  29. xdp, bonding: Fix feature flags when there are no slave devs anymore

    [ Upstream commit f267f26 ]
    
    Commit 9b0ed89 ("bonding: do not report NETDEV_XDP_ACT_XSK_ZEROCOPY")
    changed the driver from reporting everything as supported before a device
    was bonded into having the driver report that no XDP feature is supported
    until a real device is bonded as it seems to be more truthful given
    eventually real underlying devices decide what XDP features are supported.
    
    The change however did not take into account when all slave devices get
    removed from the bond device. In this case after 9b0ed89, the driver
    keeps reporting a feature mask of 0x77, that is, NETDEV_XDP_ACT_MASK &
    ~NETDEV_XDP_ACT_XSK_ZEROCOPY whereas it should have reported a feature
    mask of 0.
    
    Fix it by resetting XDP feature flags in the same way as if no XDP program
    is attached to the bond device. This was uncovered by the XDP bond selftest
    which let BPF CI fail. After adjusting the starting masks on the latter
    to 0 instead of NETDEV_XDP_ACT_MASK the test passes again together with
    this fix.
    
    Fixes: 9b0ed89 ("bonding: do not report NETDEV_XDP_ACT_XSK_ZEROCOPY")
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Cc: Magnus Karlsson <magnus.karlsson@intel.com>
    Cc: Prashant Batra <prbatra.mail@gmail.com>
    Cc: Toke Høiland-Jørgensen <toke@redhat.com>
    Cc: Jakub Kicinski <kuba@kernel.org>
    Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
    Message-ID: <20240305090829.17131-1-daniel@iogearbox.net>
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    borkmann authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    586a2f4 View commit details
    Browse the repository at this point in the history
  30. selftests/bpf: Fix up xdp bonding test wrt feature flags

    [ Upstream commit 0bfc033 ]
    
    Adjust the XDP feature flags for the bond device when no bond slave
    devices are attached. After 9b0ed89 ("bonding: do not report
    NETDEV_XDP_ACT_XSK_ZEROCOPY"), the empty bond device must report 0
    as flags instead of NETDEV_XDP_ACT_MASK.
    
      # ./vmtest.sh -- ./test_progs -t xdp_bond
      [...]
      [    3.983311] bond1 (unregistering): (slave veth1_1): Releasing backup interface
      [    3.995434] bond1 (unregistering): Released all slaves
      [    4.022311] bond2: (slave veth2_1): Releasing backup interface
      torvalds#507/1   xdp_bonding/xdp_bonding_attach:OK
      torvalds#507/2   xdp_bonding/xdp_bonding_nested:OK
      torvalds#507/3   xdp_bonding/xdp_bonding_features:OK
      torvalds#507/4   xdp_bonding/xdp_bonding_roundrobin:OK
      torvalds#507/5   xdp_bonding/xdp_bonding_activebackup:OK
      torvalds#507/6   xdp_bonding/xdp_bonding_xor_layer2:OK
      torvalds#507/7   xdp_bonding/xdp_bonding_xor_layer23:OK
      torvalds#507/8   xdp_bonding/xdp_bonding_xor_layer34:OK
      torvalds#507/9   xdp_bonding/xdp_bonding_redirect_multi:OK
      torvalds#507     xdp_bonding:OK
      Summary: 1/9 PASSED, 0 SKIPPED, 0 FAILED
      [    4.185255] bond2 (unregistering): Released all slaves
      [...]
    
    Fixes: 9b0ed89 ("bonding: do not report NETDEV_XDP_ACT_XSK_ZEROCOPY")
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
    Message-ID: <20240305090829.17131-2-daniel@iogearbox.net>
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    borkmann authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    02e3549 View commit details
    Browse the repository at this point in the history
  31. cpumap: Zero-initialise xdp_rxq_info struct before running XDP program

    [ Upstream commit 2487007 ]
    
    When running an XDP program that is attached to a cpumap entry, we don't
    initialise the xdp_rxq_info data structure being used in the xdp_buff
    that backs the XDP program invocation. Tobias noticed that this leads to
    random values being returned as the xdp_md->rx_queue_index value for XDP
    programs running in a cpumap.
    
    This means we're basically returning the contents of the uninitialised
    memory, which is bad. Fix this by zero-initialising the rxq data
    structure before running the XDP program.
    
    Fixes: 9216477 ("bpf: cpumap: Add the possibility to attach an eBPF program to cpumap")
    Reported-by: Tobias Böhm <tobias@aibor.de>
    Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
    Link: https://lore.kernel.org/r/20240305213132.11955-1-toke@redhat.com
    Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    tohojo authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    f562e4c View commit details
    Browse the repository at this point in the history
  32. net: dsa: microchip: fix register write order in ksz8_ind_write8()

    [ Upstream commit b7fb772 ]
    
    This bug was noticed while re-implementing parts of the kernel
    driver in userspace using spidev. The goal was to enable some
    of the errata workarounds that Microchip describes in their
    errata sheet [1].
    
    Both the errata sheet and the regular datasheet of e.g. the KSZ8795
    imply that you need to do this for indirect register accesses:
    - write a 16-bit value to a control register pair (this value
      consists of the indirect register table, and the offset inside
      the table)
    - either read or write an 8-bit value from the data storage
      register (indicated by REG_IND_BYTE in the kernel)
    
    The current implementation has the order swapped. It can be
    proven, by reading back some indirect register with known content
    (the EEE register modified in ksz8_handle_global_errata() is one of
    these), that this implementation does not work.
    
    Private discussion with Oleksij Rempel of Pengutronix has revealed
    that the workaround was apparantly never tested on actual hardware.
    
    [1] https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/Errata/KSZ87xx-Errata-DS80000687C.pdf
    
    Signed-off-by: Tobias Jakobi (Compleo) <tobias.jakobi.compleo@gmail.com>
    Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
    Fixes: 7b6e623 ("net: dsa: microchip: ksz8795: handle eee specif erratum")
    Link: https://lore.kernel.org/r/20240304154135.161332-1-tobias.jakobi.compleo@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Tobias Jakobi (Compleo) authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    782c5fa View commit details
    Browse the repository at this point in the history
  33. net/rds: fix WARNING in rds_conn_connect_if_down

    [ Upstream commit c055fc0 ]
    
    If connection isn't established yet, get_mr() will fail, trigger connection after
    get_mr().
    
    Fixes: 584a827 ("RDS: RDMA: return appropriate error on rdma map failures")
    Reported-and-tested-by: syzbot+d4faee732755bba9838e@syzkaller.appspotmail.com
    Signed-off-by: Edward Adam Davis <eadavis@qq.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Edward-AD authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    2b505d0 View commit details
    Browse the repository at this point in the history
  34. netfilter: nft_ct: fix l3num expectations with inet pseudo family

    [ Upstream commit 9999378 ]
    
    Following is rejected but should be allowed:
    
    table inet t {
            ct expectation exp1 {
                    [..]
                    l3proto ip
    
    Valid combos are:
    table ip t, l3proto ip
    table ip6 t, l3proto ip6
    table inet t, l3proto ip OR l3proto ip6
    
    Disallow inet pseudeo family, the l3num must be a on-wire protocol known
    to conntrack.
    
    Retain NFPROTO_INET case to make it clear its rejected
    intentionally rather as oversight.
    
    Fixes: 8059918 ("netfilter: nft_ct: sanitize layer 3 and 4 protocol number in custom expectations")
    Signed-off-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Florian Westphal authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    b7f885c View commit details
    Browse the repository at this point in the history
  35. netfilter: nf_conntrack_h323: Add protection for bmp length out of range

    [ Upstream commit 7671466 ]
    
    UBSAN load reports an exception of BRK#5515 SHIFT_ISSUE:Bitwise shifts
    that are out of bounds for their data type.
    
    vmlinux   get_bitmap(b=75) + 712
    <net/netfilter/nf_conntrack_h323_asn1.c:0>
    vmlinux   decode_seq(bs=0xFFFFFFD008037000, f=0xFFFFFFD008037018, level=134443100) + 1956
    <net/netfilter/nf_conntrack_h323_asn1.c:592>
    vmlinux   decode_choice(base=0xFFFFFFD0080370F0, level=23843636) + 1216
    <net/netfilter/nf_conntrack_h323_asn1.c:814>
    vmlinux   decode_seq(f=0xFFFFFFD0080371A8, level=134443500) + 812
    <net/netfilter/nf_conntrack_h323_asn1.c:576>
    vmlinux   decode_choice(base=0xFFFFFFD008037280, level=0) + 1216
    <net/netfilter/nf_conntrack_h323_asn1.c:814>
    vmlinux   DecodeRasMessage() + 304
    <net/netfilter/nf_conntrack_h323_asn1.c:833>
    vmlinux   ras_help() + 684
    <net/netfilter/nf_conntrack_h323_main.c:1728>
    vmlinux   nf_confirm() + 188
    <net/netfilter/nf_conntrack_proto.c:137>
    
    Due to abnormal data in skb->data, the extension bitmap length
    exceeds 32 when decoding ras message then uses the length to make
    a shift operation. It will change into negative after several loop.
    UBSAN load could detect a negative shift as an undefined behaviour
    and reports exception.
    So we add the protection to avoid the length exceeding 32. Or else
    it will return out of range error and stop decoding.
    
    Fixes: 5e35941 ("[NETFILTER]: Add H.323 conntrack/NAT helper")
    Signed-off-by: Lena Wang <lena.wang@mediatek.com>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    wanglena authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    014a807 View commit details
    Browse the repository at this point in the history
  36. erofs: apply proper VMA alignment for memory mapped files on THP

    [ Upstream commit 4127cae ]
    
    There are mainly two reasons that thp_get_unmapped_area() should be
    used for EROFS as other filesystems:
    
     - It's needed to enable PMD mappings as a FSDAX filesystem, see
       commit 74d2fad ("thp, dax: add thp_get_unmapped_area for pmd
       mappings");
    
     - It's useful together with large folios and
       CONFIG_READ_ONLY_THP_FOR_FS which enable THPs for mmapped files
       (e.g. shared libraries) even without FSDAX.  See commit 1854bc6
       ("mm/readahead: Align file mappings for non-DAX").
    
    Fixes: 06252e9 ("erofs: dax support for non-tailpacking regular file")
    Fixes: ce529cc ("erofs: enable large folios for iomap mode")
    Fixes: e6687b8 ("erofs: enable large folios for fscache mode")
    Reviewed-by: Jingbo Xu <jefflexu@linux.alibaba.com>
    Reviewed-by: Chao Yu <chao@kernel.org>
    Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
    Link: https://lore.kernel.org/r/20240306053138.2240206-1-hsiangkao@linux.alibaba.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    hsiangkao authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    b3b8752 View commit details
    Browse the repository at this point in the history
  37. netrom: Fix a data-race around sysctl_netrom_default_path_quality

    [ Upstream commit 958d614 ]
    
    We need to protect the reader reading sysctl_netrom_default_path_quality
    because the value can be changed concurrently.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    JasonXing authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    7510b08 View commit details
    Browse the repository at this point in the history
  38. netrom: Fix a data-race around sysctl_netrom_obsolescence_count_initi…

    …aliser
    
    [ Upstream commit cfd9f4a ]
    
    We need to protect the reader reading the sysctl value
    because the value can be changed concurrently.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    JasonXing authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    7e1e258 View commit details
    Browse the repository at this point in the history
  39. netrom: Fix data-races around sysctl_netrom_network_ttl_initialiser

    [ Upstream commit 119cae5 ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    JasonXing authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    5731369 View commit details
    Browse the repository at this point in the history
  40. netrom: Fix a data-race around sysctl_netrom_transport_timeout

    [ Upstream commit 60a7a15 ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    JasonXing authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    5d5c14e View commit details
    Browse the repository at this point in the history
  41. netrom: Fix a data-race around sysctl_netrom_transport_maximum_tries

    [ Upstream commit e799299 ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    JasonXing authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    fa3f3ab View commit details
    Browse the repository at this point in the history
  42. netrom: Fix a data-race around sysctl_netrom_transport_acknowledge_delay

    [ Upstream commit 806f462 ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    JasonXing authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    7d56ffc View commit details
    Browse the repository at this point in the history
  43. netrom: Fix a data-race around sysctl_netrom_transport_busy_delay

    [ Upstream commit 43547d8 ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    JasonXing authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    4ccad39 View commit details
    Browse the repository at this point in the history
  44. netrom: Fix a data-race around sysctl_netrom_transport_requested_wind…

    …ow_size
    
    [ Upstream commit a2e7068 ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    JasonXing authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    db006d7 View commit details
    Browse the repository at this point in the history
  45. netrom: Fix a data-race around sysctl_netrom_transport_no_activity_ti…

    …meout
    
    [ Upstream commit f99b494 ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    JasonXing authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    2309b36 View commit details
    Browse the repository at this point in the history
  46. netrom: Fix a data-race around sysctl_netrom_routing_control

    [ Upstream commit b5dffcb ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    JasonXing authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    d732b83 View commit details
    Browse the repository at this point in the history
  47. netrom: Fix a data-race around sysctl_netrom_link_fails_count

    [ Upstream commit bc76645 ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    JasonXing authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    db36485 View commit details
    Browse the repository at this point in the history
  48. netrom: Fix data-races around sysctl_net_busy_read

    [ Upstream commit d380ce7 ]
    
    We need to protect the reader reading the sysctl value because the
    value can be changed concurrently.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Jason Xing <kernelxing@tencent.com>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    JasonXing authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    34cab94 View commit details
    Browse the repository at this point in the history
  49. net: pds_core: Fix possible double free in error handling path

    [ Upstream commit ba18ded ]
    
    When auxiliary_device_add() returns error and then calls
    auxiliary_device_uninit(), Callback function pdsc_auxbus_dev_release
    calls kfree(padev) to free memory. We shouldn't call kfree(padev)
    again in the error handling path.
    
    Fix this by cleaning up the redundant kfree() and putting
    the error handling back to where the errors happened.
    
    Fixes: 4569cce ("pds_core: add auxiliary_bus devices")
    Signed-off-by: Yongzhi Liu <hyperlyzcs@gmail.com>
    Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
    Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>
    Link: https://lore.kernel.org/r/20240306105714.20597-1-hyperlyzcs@gmail.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Yongzhi Liu authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    995f802 View commit details
    Browse the repository at this point in the history
  50. KVM: s390: add stat counter for shadow gmap events

    [ Upstream commit c3235e2 ]
    
    The shadow gmap tracks memory of nested guests (guest-3). In certain
    scenarios, the shadow gmap needs to be rebuilt, which is a costly operation
    since it involves a SIE exit into guest-1 for every entry in the respective
    shadow level.
    
    Add kvm stat counters when new shadow structures are created at various
    levels. Also add a counter gmap_shadow_create when a completely fresh
    shadow gmap is created as well as a counter gmap_shadow_reuse when an
    existing gmap is being reused.
    
    Note that when several levels are shadowed at once, counters on all
    affected levels will be increased.
    
    Also note that not all page table levels need to be present and a ASCE
    can directly point to e.g. a segment table. In this case, a new segment
    table will always be equivalent to a new shadow gmap and hence will be
    counted as gmap_shadow_create and not as gmap_shadow_segment.
    
    Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
    Reviewed-by: David Hildenbrand <david@redhat.com>
    Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
    Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
    Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
    Link: https://lore.kernel.org/r/20231009093304.2555344-2-nrb@linux.ibm.com
    Message-Id: <20231009093304.2555344-2-nrb@linux.ibm.com>
    Stable-dep-of: fe75233 ("KVM: s390: vsie: fix race during shadow creation")
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Nico Boehr authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    99b86c9 View commit details
    Browse the repository at this point in the history
  51. KVM: s390: vsie: fix race during shadow creation

    [ Upstream commit fe75233 ]
    
    Right now it is possible to see gmap->private being zero in
    kvm_s390_vsie_gmap_notifier resulting in a crash.  This is due to the
    fact that we add gmap->private == kvm after creation:
    
    static int acquire_gmap_shadow(struct kvm_vcpu *vcpu,
                                   struct vsie_page *vsie_page)
    {
    [...]
            gmap = gmap_shadow(vcpu->arch.gmap, asce, edat);
            if (IS_ERR(gmap))
                    return PTR_ERR(gmap);
            gmap->private = vcpu->kvm;
    
    Let children inherit the private field of the parent.
    
    Reported-by: Marc Hartmayer <mhartmay@linux.ibm.com>
    Fixes: a3508fb ("KVM: s390: vsie: initial support for nested virtualization")
    Cc: <stable@vger.kernel.org>
    Cc: David Hildenbrand <david@redhat.com>
    Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
    Reviewed-by: David Hildenbrand <david@redhat.com>
    Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
    Signed-off-by: Christian Borntraeger <borntraeger@linux.ibm.com>
    Link: https://lore.kernel.org/r/20231220125317.4258-1-borntraeger@linux.ibm.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    borntraeger authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    f5572c0 View commit details
    Browse the repository at this point in the history
  52. readahead: avoid multiple marked readahead pages

    [ Upstream commit ab4443f ]
    
    ra_alloc_folio() marks a page that should trigger next round of async
    readahead.  However it rounds up computed index to the order of page being
    allocated.  This can however lead to multiple consecutive pages being
    marked with readahead flag.  Consider situation with index == 1, mark ==
    1, order == 0.  We insert order 0 page at index 1 and mark it.  Then we
    bump order to 1, index to 2, mark (still == 1) is rounded up to 2 so page
    at index 2 is marked as well.  Then we bump order to 2, index is
    incremented to 4, mark gets rounded to 4 so page at index 4 is marked as
    well.  The fact that multiple pages get marked within a single readahead
    window confuses the readahead logic and results in readahead window being
    trimmed back to 1.  This situation is triggered in particular when maximum
    readahead window size is not a power of two (in the observed case it was
    768 KB) and as a result sequential read throughput suffers.
    
    Fix the problem by rounding 'mark' down instead of up.  Because the index
    is naturally aligned to 'order', we are guaranteed 'rounded mark' == index
    iff 'mark' is within the page we are allocating at 'index' and thus
    exactly one page is marked with readahead flag as required by the
    readahead code and sequential read performance is restored.
    
    This effectively reverts part of commit b9ff43d ("mm/readahead: Fix
    readahead with large folios").  The commit changed the rounding with the
    rationale:
    
    "...  we were setting the readahead flag on the folio which contains the
    last byte read from the block.  This is wrong because we will trigger
    readahead at the end of the read without waiting to see if a subsequent
    read is going to use the pages we just read."
    
    Although this is true, the fact is this was always the case with read
    sizes not aligned to folio boundaries and large folios in the page cache
    just make the situation more obvious (and frequent).  Also for sequential
    read workloads it is better to trigger the readahead earlier rather than
    later.  It is true that the difference in the rounding and thus earlier
    triggering of the readahead can result in reading more for semi-random
    workloads.  However workloads really suffering from this seem to be rare.
    In particular I have verified that the workload described in commit
    b9ff43d ("mm/readahead: Fix readahead with large folios") of reading
    random 100k blocks from a file like:
    
    [reader]
    bs=100k
    rw=randread
    numjobs=1
    size=64g
    runtime=60s
    
    is not impacted by the rounding change and achieves ~70MB/s in both cases.
    
    [jack@suse.cz: fix one more place where mark rounding was done as well]
      Link: https://lkml.kernel.org/r/20240123153254.5206-1-jack@suse.cz
    Link: https://lkml.kernel.org/r/20240104085839.21029-1-jack@suse.cz
    Fixes: b9ff43d ("mm/readahead: Fix readahead with large folios")
    Signed-off-by: Jan Kara <jack@suse.cz>
    Cc: Matthew Wilcox <willy@infradead.org>
    Cc: Guo Xuenan <guoxuenan@huawei.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    jankara authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    de5c36a View commit details
    Browse the repository at this point in the history
  53. selftests: mptcp: decrease BW in simult flows

    [ Upstream commit 5e2f3c6 ]
    
    When running the simult_flow selftest in slow environments -- e.g. QEmu
    without KVM support --, the results can be unstable. This selftest
    checks if the aggregated bandwidth is (almost) fully used as expected.
    
    To help improving the stability while still keeping the same validation
    in place, the BW and the delay are reduced to lower the pressure on the
    CPU.
    
    Fixes: 1a418cb ("mptcp: simult flow self-tests")
    Fixes: 219d049 ("mptcp: push pending frames when subflow has free space")
    Cc: stable@vger.kernel.org
    Suggested-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://lore.kernel.org/r/20240131-upstream-net-20240131-mptcp-ci-issues-v1-6-4c1c11e571ff@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    matttbe authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    e2ee3c6 View commit details
    Browse the repository at this point in the history
  54. x86/mmio: Disable KVM mitigation when X86_FEATURE_CLEAR_CPU_BUF is set

    commit e95df4e upstream.
    
    Currently MMIO Stale Data mitigation for CPUs not affected by MDS/TAA is
    to only deploy VERW at VMentry by enabling mmio_stale_data_clear static
    branch. No mitigation is needed for kernel->user transitions. If such
    CPUs are also affected by RFDS, its mitigation may set
    X86_FEATURE_CLEAR_CPU_BUF to deploy VERW at kernel->user and VMentry.
    This could result in duplicate VERW at VMentry.
    
    Fix this by disabling mmio_stale_data_clear static branch when
    X86_FEATURE_CLEAR_CPU_BUF is enabled.
    
    Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
    Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
    Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    pa1gupta authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    c35ca09 View commit details
    Browse the repository at this point in the history
  55. Documentation/hw-vuln: Add documentation for RFDS

    commit 4e42765 upstream.
    
    Add the documentation for transient execution vulnerability Register
    File Data Sampling (RFDS) that affects Intel Atom CPUs.
    
    Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
    Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
    Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    pa1gupta authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    ddfd385 View commit details
    Browse the repository at this point in the history
  56. x86/rfds: Mitigate Register File Data Sampling (RFDS)

    commit 8076fcd upstream.
    
    RFDS is a CPU vulnerability that may allow userspace to infer kernel
    stale data previously used in floating point registers, vector registers
    and integer registers. RFDS only affects certain Intel Atom processors.
    
    Intel released a microcode update that uses VERW instruction to clear
    the affected CPU buffers. Unlike MDS, none of the affected cores support
    SMT.
    
    Add RFDS bug infrastructure and enable the VERW based mitigation by
    default, that clears the affected buffers just before exiting to
    userspace. Also add sysfs reporting and cmdline parameter
    "reg_file_data_sampling" to control the mitigation.
    
    For details see:
    Documentation/admin-guide/hw-vuln/reg-file-data-sampling.rst
    
    Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
    Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
    Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    pa1gupta authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    77018fb View commit details
    Browse the repository at this point in the history
  57. KVM/x86: Export RFDS_NO and RFDS_CLEAR to guests

    commit 2a01801 upstream.
    
    Mitigation for RFDS requires RFDS_CLEAR capability which is enumerated
    by MSR_IA32_ARCH_CAPABILITIES bit 27. If the host has it set, export it
    to guests so that they can deploy the mitigation.
    
    RFDS_NO indicates that the system is not vulnerable to RFDS, export it
    to guests so that they don't deploy the mitigation unnecessarily. When
    the host is not affected by X86_BUG_RFDS, but has RFDS_NO=0, synthesize
    RFDS_NO to the guest.
    
    Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
    Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
    Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
    Acked-by: Josh Poimboeuf <jpoimboe@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    pa1gupta authored and Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    4a5b5bf View commit details
    Browse the repository at this point in the history
  58. Linux 6.6.22

    Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
    Tested-by: Ron Economos <re@w6rz.net>
    Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
    Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
    Tested-by: Mark Brown <broonie@kernel.org>
    Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
    Tested-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Sasha Levin committed Mar 15, 2024
    Configuration menu
    Copy the full SHA
    6a646d9 View commit details
    Browse the repository at this point in the history

Commits on Mar 16, 2024

  1. RVAS: update mmap function

    Change-Id: Ie434c64fa2ec136c80bb0838c81b01447ce68b8e
    lxuxx committed Mar 16, 2024
    Configuration menu
    Copy the full SHA
    7bc580e View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2024

  1. i3c: mipi-i3c-hci: Add the reset assert.

    Ensure that the I3C controller is reset to its initialization status to
    avoid unexpected errors. For example, if the interrupt remains active, the
    controller may enter the isr immediately upon requesting the interrupt.
    
    Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
    Change-Id: Ic5b5da7017e25162e9d528abdb04b09cdabe3a14
    billy-tsai committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    ca83bc8 View commit details
    Browse the repository at this point in the history
  2. Merge tag 'v6.6.22' into dev-6.6

    Linux 6.6.22
    amboar committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    f8b0448 View commit details
    Browse the repository at this point in the history
  3. ARM: dts: aspeed: yosemite4: Enable ipmb device for OCP debug card

    Add OCP debug card devicetree config
    
    Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
    Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
    DelphineCCChiu authored and amboar committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    f6daa12 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2024

  1. i3c: mipi-i3c-hci: Identify the target transfer.

    Using different TIDs to identify the IBI and master read transfer issued
    by the slave side.
    
    Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
    Change-Id: I6a993c6099a0762eb2d9a51a5ce3e956d3d5e168
    billy-tsai committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    a048d73 View commit details
    Browse the repository at this point in the history
  2. i3c: mipi-i3c-hci: Make pending_read_notify be a blocking API

    The `pending_read_notify` API must be a blocking API. Otherwise, the
    pending read data in the transmit queue may be issued to the bus if
    another process triggers calls to `generate_ibi`.
    
    Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
    Change-Id: I931ce51bed104d77a4e430c7d7860cc1716d8cc8
    billy-tsai committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    d46ab9d View commit details
    Browse the repository at this point in the history
  3. clk: ast2700: Add the workaroud for A0 i3c.

    I3C reset should assert all of the I3C controllers simultaneously instead
    of asserting/deasserting them one by one, which may lead to I3C register
    access failure. Therefore, this patch asserts all of the I3C resets during
    reset driver initialization to avoid the aforementioned issue.
    
    Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
    Change-Id: I40f338bd7fc0e95f08dbbc7e26ec74979391e140
    billy-tsai committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    74eedca View commit details
    Browse the repository at this point in the history
  4. i3c: ast2600: Recover the bus if SDA stuck low

    Toggle the SCL pulses (up tp 19 pulses) when failed to transfer and the
    SDA stuck low.
    
    Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
    Change-Id: I278717be992e43edec8bccf183d0ca563cdd19f3
    aspeeddylan committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    55f09f8 View commit details
    Browse the repository at this point in the history
  5. i3c: dw: Rework JESD403 timed reset

    Try to prevent using a software-forced timed reset, as this approach
    doesn't take care of ongoing transfers and IBIs. The new implementation
    lets the controller enter a halt state first to ensure that ongoing
    transfers are completed. Then, it recovers the bus to an idle state if
    the current SDA level is tied low by the target devices. If the SDA
    remains low, it uses a software-forced mode; otherwise, it uses the
    hardware mode.
    
    Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
    Change-Id: I8bd47c317941b9ddf32dddb9271c2f274fe18bdc
    aspeeddylan committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    c3c61f0 View commit details
    Browse the repository at this point in the history
  6. i3c: dw: Separate the ISR of the controller and target

    No need to check the controller transfer response and IBI status in the
    target mode.
    
    Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
    Change-Id: I38e94e680612672a242e093ead5e657899adb8ee
    aspeeddylan committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    637fc63 View commit details
    Browse the repository at this point in the history
  7. i3c: ast2600: Merge IBI error handling codes from v5.15

    Merge IBI error handling codes from aspeed-dev-v5.15.
    
    Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
    Change-Id: Ia44b9ea0dd2fe8bf834ed17be0afcdc2afedc1fc
    aspeeddylan committed Mar 19, 2024
    Configuration menu
    Copy the full SHA
    89c1c0b View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2024

  1. mtd: spi-nor: Add support for s35hl256t flash part

    Support s35hl256t flash part.
    
    Signed-off-by: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
    Change-Id: I5ced4be50a8b8dfc41e899096e493bf232bcb414
    chintingkuo committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    8fe5788 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'dev-6.6' into merge-v6.6.22-fix

    Change-Id: Iba0543cf116039b899eba28681e2d28d235821fb
    Signed-off-by: Kevin Chen <kevin_chen@aspeedtech.com>
    aspeedkevin committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    875d89d View commit details
    Browse the repository at this point in the history
  3. arm64/dts: aspeed-ltpi: Assign aliases for I3C controllers on LTPI

    I3C controllers on LTPI0: ltpi0_i3cX -> i3c10X
    I3C controllers on LTPI1: ltpi1_i3cX -> i3c20x
    
    Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
    Change-Id: Ia814f1d2afdebe5b1ed4b3ca4434d9c9df1b9331
    aspeeddylan committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    bcd6d6d View commit details
    Browse the repository at this point in the history
  4. arm64: configs: aspeed_g7: Enable BPF/cgroup firewalling.

    Due to the following boot warnning, enable BPF/cgroup firewalling.
    [8.320707] systemd[1]: File System Check on Root Device was skipped because of an unmet condition check (ConditionPathIsReadWrite=!/).
    [8.335463] systemd[1]: systemd-journald.service: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
    [8.349877] systemd[1]: systemd-journald.service: (This warning is only shown for the first unit using IP firewalling.)
    [8.393876] systemd[1]: Starting Journal Service...
             Starting Journal Service...
    
    Enable CONFIG_CGROUP_BPF in make menuconfig.
    And make savedefconfig to replace aspeed_g7_defconfig.
    
    Change-Id: Id13521cb5ddfab9d07946d3c1efee25fb2f6e12b
    Signed-off-by: Kevin Chen <kevin_chen@aspeedtech.com>
    aspeedkevin committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    d14c77e View commit details
    Browse the repository at this point in the history
  5. arm64/dts: ast2700: Add dts for ast2700-dcscm plus ast1700-demo

    Add board level dts for ast2700-dcscm plus ast1700-demo board.
    
    Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
    Change-Id: Ic9490d83fa08d6330767140d39210571aaaf5e3b
    aspeeddylan committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    1d417d5 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2024

  1. arm64: configs: aspeed_g7: Enable I3CDEV

    Enable I3CDEV for debugging on target devices without driver binding.
    
    Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
    Change-Id: Icaab9d1357a61f98ac8df0b8fe8ef9bf717cfe26
    aspeeddylan committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    8b6ed5d View commit details
    Browse the repository at this point in the history
  2. i3c: mipi-i3c-hci: Replace the dev_dbg to DBG.

    Unify all debug message controls under the same macro DBG in hci.h.
    
    Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
    Change-Id: I607335e5c450b5029f76b57b465f004d75f9df6d
    billy-tsai committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    3b44579 View commit details
    Browse the repository at this point in the history
  3. dts: ast2700-dcscm-1700demo: Use AST1700 I2C devices

    Use AST1700 I2C devices instead of AST2700 I2C devices tunneling through
    LTPI, as AST1700 I2C devices support both controller mode and target
    mode for flexibility.
    
    Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
    Change-Id: Ic796c6a01c0b769e6e9083efe719bb49ef303019
    aspeeddylan committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    dcfab48 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2024

  1. soc: aspeed: Add disp-intf driver

    This driver will export 2 files, dac_src/dp_src, in /sys/class to
    control the source of these 2 display interfaces. 2600/2700 only
    
    Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
    Change-Id: Ifb2a4590f3b4224fb22f6ca57b6310fc7b8cfe92
    jammyaspeed committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    8b91f3f View commit details
    Browse the repository at this point in the history
  2. ARM: dts: aspeed-g6: Add disp-intf node

    Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
    Change-Id: I6d8f31c19b62e6b9879203a7ce59fb48adf1d2aa
    jammyaspeed committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    c73a80b View commit details
    Browse the repository at this point in the history
  3. ARM: dts: aspeed-g7: Add disp-intf node

    Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
    Change-Id: I7353fdb1567257f8d2e06aae46174ec7ab0b7f92
    jammyaspeed committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    4e8b15d View commit details
    Browse the repository at this point in the history
  4. dts: ast2700-dcscm-1700demo: Disable SPI0 CS1 and SPI1 CS1

    Disable SPI0 CS0 and SPI1 CS1 device nodes which doesn't
    exist on AST2700 dc-scm board.
    
    Signed-off-by: Chin-Ting Kuo <chin-ting_kuo@aspeedtech.com>
    Change-Id: If421cabf595d710a3f59c321065b46c393b1abdb
    chintingkuo committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    0c866d5 View commit details
    Browse the repository at this point in the history
  5. arm: dts: aspeed-g6: Complete the interrupt property for sgpiom

    The interrupt controller node needs the #interrupt-cells property to
    inform the consumer about how to specify its parameters. This patch adds
    it to complete the interrupt property for sgpiom as an interrupt
    controller
    
    Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
    Change-Id: I702948771de1d41aa96861a09c59871e1921f634
    billy-tsai committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    d8f6789 View commit details
    Browse the repository at this point in the history
  6. arm: dts: aspeed-g7: Complete the interrupt property for sgpio

    The interrupt controller node needs the #interrupt-cells property to
    inform the consumer about how to specify its parameters. This patch adds
    it to complete the interrupt property for sgpio as an interrupt
    controller
    
    Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
    Change-Id: I084b2c33791d591862ef6b2548f765ea3cf850c3
    billy-tsai committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    8a0ac33 View commit details
    Browse the repository at this point in the history
  7. soc: aspeed: socinfo: Add new systems of AST27X0.

    Aspeed's u-boot sdk has been updated with the SoC IDs for the
    AST2750/AST2700/AST2720 variant, as well as A0 variants of the 2700 family.
    
    >From u-boot's arch/arm/mach-aspeed/ast2700/cpu-info.c:
    
    	SOC_ID("AST2750-A0", 0x0600000306000003),
    	SOC_ID("AST2700-A0", 0x0600010306000103),
    	SOC_ID("AST2720-A0", 0x0600020306000203),
    
    Change-Id: I40a33742aff40307b963595f61636317e5ae513e
    Signed-off-by: Kevin Chen <kevin_chen@aspeedtech.com>
    aspeedkevin committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    e2681f2 View commit details
    Browse the repository at this point in the history
  8. aspeed_g7: dirvers: usb: Update USB PHY3 default settings

    Set protocol1_ext signals as default PHY3 settings based on SNPS documents.
    This includes previous PCFGI[54]: protocol1_ext_rx_los_lfps_en as 1 for
    better SS/SSP devices compatibility
    
    Signed-off-by: Joe Wang <joe_wang@aspeedtech.com>
    Change-Id: I3a67d04816d6b30f5d7840da66b592480f9603e8
    joe-aspeed committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    e54f6dc View commit details
    Browse the repository at this point in the history
  9. dts: ast2700-dcscm: add power button input

    1. Add SGPIOS line 18 FP_PWR_BTN_PFR_N_BMC_IN for x86-power-control
    power button input.
    2. Update L75 slave address.
    3. Fix typo.
    
    Signed-off-by: VinceChang6637 <vince_chang@aspeedtech.com>
    Change-Id: Ieff8661628ce55f180880525881a16319023911c
    VinceChang6637 committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    c87d3af View commit details
    Browse the repository at this point in the history
  10. Revert "arm64: configs: aspeed_g7: Enable BPF/cgroup firewalling."

    This reverts commit d14c77e.
    
    After enable CONFIG_CGROUP_BPF, need to check the following log.
    [   45.132333] audit: type=1334 audit(1711018135.936:15): prog-id=13 op=UNLOAD
    [   45.140128] audit: type=1334 audit(1711018135.936:16): prog-id=12 op=UNLOAD
    [   46.488530] audit: type=1334 audit(1711018137.300:17): prog-id=17 op=UNLOAD
    [   46.496356] audit: type=1334 audit(1711018137.300:18): prog-id=16 op=UNLOAD
    [   46.504143] audit: type=1334 audit(1711018137.300:19): prog-id=15 op=UNLOAD
    [   47.069839] audit: type=1334 audit(1711103402.725:20): prog-id=18 op=LOAD
    [   47.276496] audit: type=1334 audit(1711103402.933:21): prog-id=18 op=UNLOAD
    
    Signed-off-by: Kevin Chen <kevin_chen@aspeedtech.com>
    Change-Id: Ic6c703702bea0768b46f62731220d5cf31f05019
    aspeedkevin committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    5577cdd View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2024

  1. i3c: dw: Wake up the process with the proper interrupt.

    Add the condition to separate the ibi and response ready interrupt.
    Before this patch the master will signal the completion of the thread,
    either ibi or response ready interrupt. However, the completion should
    only wait for response ready interrupts instead of the ibi. The
    unexpected wake-up by ibi will result in the process stuck or kernel panic
    
    Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
    Change-Id: I4861b01419831feb95f1d1a24908b330191326d7
    billy-tsai committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    1c2d779 View commit details
    Browse the repository at this point in the history
  2. i3c: dw: Transfer error interrupt has the response data.

    Transfer error interrupt will generate one response data, so append this
    condition to handle the response data for the xfer error.
    
    Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
    Change-Id: I046c1c5457fded8c1c795d3b7d53d7421b040f7e
    billy-tsai committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    5397a41 View commit details
    Browse the repository at this point in the history
  3. arm64/dts: aspeed-g7: Add PECI controller.

     Add the PECI dts node to dtsi.
    
    Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
    Change-Id: I059cfa2c1581ed25062fb7c593fd628cc7a74fcd
    billy-tsai committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    f994861 View commit details
    Browse the repository at this point in the history
  4. dts: ast2700_evb: Enable PECI device.

    Enable the PECI device on the EVB by default.
    
    Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
    Change-Id: Iedff2746c11043683ce1c0350ab5007deaab7424
    billy-tsai committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    ef5ec05 View commit details
    Browse the repository at this point in the history
  5. arm64/dts: aspeed-g7: Rename ast2700 boards

    Apply the new naming rule for all the ast2700-based boards:
    
    ```
    <soc>-<type>-<feature0>-<feature1>_<soc>-<type>-<feature0>-..
    ```
    
    This helps to distinguish the combo boards (e.g., AST2700-EVB connected
    to AST1700-EVB through LTPI) from each other.
    
    Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
    Change-Id: I12bc5897a50acce9ae0b169696aae8b5a22d3b77
    aspeeddylan committed Mar 25, 2024
    Configuration menu
    Copy the full SHA
    2f7ad30 View commit details
    Browse the repository at this point in the history

Commits on Mar 26, 2024

  1. dts: ast2700-dcscm: Enable PECI device.

    Enable the PECI device on AST2700-DCSCM.
    
    Signed-off-by: VinceChang6637 <vince_chang@aspeedtech.com>
    Change-Id: I3a916c55d9c7f633fbc8f1c503bd5abed066f152
    VinceChang6637 committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    414a627 View commit details
    Browse the repository at this point in the history
  2. arm64/dts: aspeed-g7: Add ast2700-dcscm_ast1700-evb board dts

    Add a new combo board: ast2700-dcscm connected with ast1700-evb
    
    Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
    Change-Id: I27b087c3d8092cb29173edc1b038c347cc041e8f
    aspeeddylan committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    c86d643 View commit details
    Browse the repository at this point in the history
  3. arm64/dts: ast1700-demo: Rework dts based on ast2700-dcscm

    Include ast2700-dcscm.dts and add/modify the device nodes on
    AST1700-DEMO board.
    
    Signed-off-by: Dylan Hung <dylan_hung@aspeedtech.com>
    Change-Id: I67c2401b54687dc91df54524b18dd798d3d04267
    aspeeddylan committed Mar 26, 2024
    Configuration menu
    Copy the full SHA
    fb8a1ec View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2024

  1. fix PCIE reset number

    Signed-off-by: Ryan Chen <ryan_chen@aspeedtech.com>
    Change-Id: Icadf8c6d64388d2becb90e4f8c88433ccf6bcdbc
    aspeedtech authored and billy-tsai committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    77459a9 View commit details
    Browse the repository at this point in the history
  2. dt-bindings: clock: ast2600: Add MAC reset id

    The reset ID for MAC1 and MAC2 is 11 and 12 respectively, which are
    relative to SCU040 bits 11 and 12
    
    Signed-off-by: Billy Tsai <billy_tsai@aspeedtech.com>
    Change-Id: If9cc82e0109fce1b1bcad493497b02d8f9eccf43
    billy-tsai committed Mar 27, 2024
    Configuration menu
    Copy the full SHA
    1062a07 View commit details
    Browse the repository at this point in the history