commit 1f8eb295790001e0f498e62c186130055d3d496f
Author: Thorsten Blum <thorsten.blum@linux.dev>
Date:   Tue Mar 4 19:14:00 2025 +0100

    scsi: target: Remove size arguments when calling strscpy()
    
    The size parameter of strscpy() is optional because strscpy() uses
    sizeof() to determine the length of the destination buffer if it is not
    provided as an argument. Remove it to simplify the code.
    
    Remove some unnecessary curly braces.
    
    No functional changes intended.
    
    Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
    Link: https://lore.kernel.org/r/20250304181400.78325-1-thorsten.blum@linux.dev
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

commit fc8a5ee50743516700d10a83c598b6adb3c2dbef
Author: Kees Cook <kees@kernel.org>
Date:   Mon Mar 10 15:25:54 2025 -0700

    scsi: pm80xx: Add __nonstring annotations for unterminated strings
    
    When a character array without a terminating NUL character has a static
    initializer, GCC 15's -Wunterminated-string-initialization will only
    warn if the array lacks the "nonstring" attribute[1]. Mark the arrays
    with __nonstring to and correctly identify the char array as "not a C
    string" and thereby eliminate the warning.
    
    Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178 [1]
    Cc: Jack Wang <jinpu.wang@cloud.ionos.com>
    Cc: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
    Cc: Martin K. Petersen <martin.petersen@oracle.com>
    Cc: linux-scsi@vger.kernel.org
    Signed-off-by: Kees Cook <kees@kernel.org>
    Link: https://lore.kernel.org/r/20250310222553.work.437-kees@kernel.org
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

commit 500d4b742e0cc712160054413e129a568467a7de
Author: Huan Tang <tanghuan@vivo.com>
Date:   Fri Apr 11 17:29:24 2025 +0800

    scsi: ufs: core: Add WB buffer resize support
    
    Follow JESD220G, support a WB buffer resize function through sysfs. The
    host can obtain resize hint and resize status, and enable the resize
    operation. Add three sysfs nodes:
    
            1. wb_resize_enable
    
            2. wb_resize_hint
    
            3. wb_resize_status
    
    The detailed definition of the three nodes can be found in the sysfs
    documentation.
    
    Signed-off-by: Huan Tang <tanghuan@vivo.com>
    Signed-off-by: Lu Hongfei <luhongfei@vivo.com>
    Link: https://lore.kernel.org/r/20250411092924.1116-1-tanghuan@vivo.com
    Reviewed-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

commit ae82eaf4aeea060bb736c3e20c0568b67c701d7d
Author: Daniel Wagner <wagi@kernel.org>
Date:   Wed Apr 9 13:34:22 2025 +0200

    scsi: lpfc: Use memcpy() for BIOS version
    
    The strlcat() with FORTIFY support is triggering a panic because it
    thinks the target buffer will overflow although the correct target
    buffer size is passed in.
    
    Anyway, instead of memset() with 0 followed by a strlcat(), just use
    memcpy() and ensure that the resulting buffer is NULL terminated.
    
    BIOSVersion is only used for the lpfc_printf_log() which expects a
    properly terminated string.
    
    Signed-off-by: Daniel Wagner <wagi@kernel.org>
    Link: https://lore.kernel.org/r/20250409-fix-lpfc-bios-str-v1-1-05dac9e51e13@kernel.org
    Reviewed-by: Justin Tee <justin.tee@broadcom.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

commit cdcb08d5710bc9b543551a85ad551f44d6a4bfc0
Author: Thorsten Blum <thorsten.blum@linux.dev>
Date:   Tue Apr 8 12:28:40 2025 +0200

    scsi: elx: sli4: Replace deprecated strncpy() with strscpy()
    
    strncpy() is deprecated for NUL-terminated destination buffers; use
    strscpy() instead.
    
    Since sli_config_cmd_init() already zeroes out the destination buffers,
    the potential NUL-padding by strncpy() is unnecessary. strscpy() copies
    only the required characters and guarantees NUL-termination.
    
    And since all three destination buffers have a fixed length, strscpy()
    automatically determines their size using sizeof() when the argument is
    omitted. This makes any explicit sizeof() calls unnecessary.
    
    The source strings are also NUL-terminated and meet the __must_be_cstr()
    requirement of strscpy().
    
    No functional changes intended.
    
    Link: https://github.com/KSPP/linux/issues/90
    Cc: linux-hardening@vger.kernel.org
    Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
    Link: https://lore.kernel.org/r/20250408102843.804083-2-thorsten.blum@linux.dev
    Reviewed-by: Kees Cook <kees@kernel.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

commit 3c7ac40d732232fec0ba31d0a5e3cc9c112fc2e7
Author: Neil Armstrong <neil.armstrong@linaro.org>
Date:   Mon Apr 7 12:17:05 2025 +0200

    scsi: ufs: core: Delegate the interrupt service routine to a threaded IRQ handler
    
    On systems with a large number request slots and unavailable MCQ ESI,
    the current design of the interrupt handler can delay handling of other
    subsystems interrupts causing display artifacts, GPU stalls or system
    firmware requests timeouts.
    
    Since the interrupt routine can take quite some time, it's preferable to
    move it to a threaded handler and leave the hard interrupt handler wake
    up the threaded interrupt routine, the interrupt line would be masked
    until the processing is finished in the thread thanks to the
    IRQS_ONESHOT flag.
    
    When MCQ & ESI interrupts are enabled the I/O completions are now
    directly handled in the "hard" interrupt routine to keep IOPs high since
    queues handling is done in separate per-queue interrupt routines.
    
    This fixes all encountered issued when running FIO tests on the Qualcomm
    SM8650 platform.
    
    Example of errors reported on a loaded system:
     [drm:dpu_encoder_frame_done_timeout:2706] [dpu error]enc32 frame done timeout
     msm_dpu ae01000.display-controller: [drm:hangcheck_handler [msm]] *ERROR* 67.5.20.1: hangcheck detected gpu lockup rb 2!
     msm_dpu ae01000.display-controller: [drm:hangcheck_handler [msm]] *ERROR* 67.5.20.1:     completed fence: 74285
     msm_dpu ae01000.display-controller: [drm:hangcheck_handler [msm]] *ERROR* 67.5.20.1:     submitted fence: 74286
     Error sending AMC RPMH requests (-110)
    
    Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
    Link: https://lore.kernel.org/r/20250407-topic-ufs-use-threaded-irq-v3-3-08bee980f71e@linaro.org
    Reviewed-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

commit 2d6c7bcc6cca63238fce0a95874b053500a1112e
Author: Neil Armstrong <neil.armstrong@linaro.org>
Date:   Mon Apr 7 12:17:04 2025 +0200

    scsi: ufs: core: Track when MCQ ESI is enabled
    
    In preparation of adding a threaded interrupt handler, track when the
    MCQ ESI interrupt handlers were installed so we can optimize the MCQ
    interrupt handling to avoid walking the threaded handler in the case ESI
    handlers are enabled.
    
    Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
    Link: https://lore.kernel.org/r/20250407-topic-ufs-use-threaded-irq-v3-2-08bee980f71e@linaro.org
    Reviewed-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

commit 56f4beffc9a056f70e56f53d01451441106bd4ff
Author: Neil Armstrong <neil.armstrong@linaro.org>
Date:   Mon Apr 7 12:17:03 2025 +0200

    scsi: ufs: core: Drop last_intr_status/ts stats
    
    In order to prepare introduction of a threaded interrupt handler, drop
    last_intr_status & last_intr_ts drop the ufs_stats struct, and the
    associated debug code.
    
    Suggested-by: Bart Van Assche <bvanassche@acm.org>
    Reviewed-by: Bart Van Assche <bvanassche@acm.org>
    Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
    Link: https://lore.kernel.org/r/20250407-topic-ufs-use-threaded-irq-v3-1-08bee980f71e@linaro.org
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

commit 50dda49835073433840fdffe8c4d7624daf6d9ba
Author: Eric Biggers <ebiggers@google.com>
Date:   Fri Apr 4 16:15:32 2025 -0700

    scsi: ufs: qcom: Add support for wrapped keys
    
    Wire up the wrapped key support for ufs-qcom by implementing the needed
    methods in struct blk_crypto_ll_ops and setting the appropriate flag in
    blk_crypto_profile::key_types_supported.
    
    For more information about this feature and how to use it, refer to the
    sections about hardware-wrapped keys in
    Documentation/block/inline-encryption.rst and
    Documentation/filesystems/fscrypt.rst.
    
    Based on patches by Gaurav Kashyap <quic_gaurkash@quicinc.com>.
    Reworked to use the custom crypto profile support.
    
    Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Tested-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> # sm8650
    Signed-off-by: Eric Biggers <ebiggers@google.com>
    Link: https://lore.kernel.org/r/20250404231533.174419-4-ebiggers@kernel.org
    Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # For MMC
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

commit 7cc6e0c34b21b6e981afde695132f38e174c7aa5
Author: Gaurav Kashyap <quic_gaurkash@quicinc.com>
Date:   Fri Apr 4 16:15:31 2025 -0700

    scsi: soc: qcom: ice: Add HWKM support to the ICE driver
    
    Qualcomm's Inline Crypto Engine (ICE) version 3.2 and later includes a
    key management hardware block called the Hardware Key Manager (HWKM).
    Add support for HWKM to the ICE driver.  HWKM provides hardware-wrapped
    key support where the ICE (storage) keys are not exposed to software and
    instead are protected in hardware.  Later patches will wire up this
    feature to ufs-qcom and sdhci-msm using the support added in this patch.
    
    HWKM and legacy mode are currently mutually exclusive.  The selection of
    which mode to use has to be made before the storage driver(s) registers
    any inline encryption capable disk(s) with the block layer (i.e.,
    generally at boot time) so that the appropriate crypto capabilities can
    be advertised to upper layers.  Therefore, make the ICE driver select
    HWKM mode when the all of the following are true:
    
     - The new module parameter qcom_ice.use_wrapped_keys=1 is specified.
    
     - HWKM is present and is at least v2, i.e. ICE is v3.2.1 or later.
    
     - The SCM calls needed to fully use HWKM are supported by TrustZone.
    
    [EB: merged related patches; fixed the module parameter to work
         correctly; dropped unnecessary support for HWKM v1; fixed error
         handling; improved log messages, comments, and commit message;
         fixed naming; merged enable and init functions; and other cleanups]
    
    Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
    Co-developed-by: Eric Biggers <ebiggers@google.com>
    Signed-off-by: Eric Biggers <ebiggers@google.com>
    Link: https://lore.kernel.org/r/20250404231533.174419-3-ebiggers@kernel.org
    Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # For MMC
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

commit 11d4c388a38ab6e95a7be82a44a55ecc32cd6a14
Author: Eric Biggers <ebiggers@google.com>
Date:   Fri Apr 4 16:15:30 2025 -0700

    scsi: soc: qcom: ice: Make qcom_ice_program_key() take struct blk_crypto_key
    
    qcom_ice_program_key() currently accepts the key as an array of bytes,
    algorithm ID, key size enum, and data unit size.  However both callers
    have a struct blk_crypto_key which contains all that information.  Thus
    they both have similar code that converts the blk_crypto_key into the
    form that qcom_ice_program_key() wants.  Once wrapped key support is
    added, the key type would need to be added to the arguments too.
    
    Therefore, this patch changes qcom_ice_program_key() to take in all this
    information as a struct blk_crypto_key directly.  The calling code is
    updated accordingly.  This ends up being much simpler, and it makes the
    key type be passed down automatically once wrapped key support is added.
    
    Based on a patch by Gaurav Kashyap <quic_gaurkash@quicinc.com> that
    replaced the byte array argument only.  This patch makes the
    blk_crypto_key replace other arguments like the algorithm ID too,
    ensuring that there remains only one source of truth.
    
    Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Tested-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> # sm8650
    Signed-off-by: Eric Biggers <ebiggers@google.com>
    Link: https://lore.kernel.org/r/20250404231533.174419-2-ebiggers@kernel.org
    Acked-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
    Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # For MMC
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

commit d19dc8d4dfca33f5957422d4a23963ee8fac12f5
Author: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Date:   Mon Mar 10 17:55:57 2025 +0200

    scsi: scsi_debug: Add ERASE for tapes
    
    The command ERASE(6) for tape devices is added.
    
    Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
    Link: https://lore.kernel.org/r/20250310155557.2872-6-Kai.Makisara@kolumbus.fi
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

commit 34252036774b19f66eb9241e4b0b5a07f3461dbe
Author: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Date:   Mon Mar 10 17:55:56 2025 +0200

    scsi: scsi_debug: Use scsi_device->type instead os sdebug_ptype where possible
    
    Devices of several types can be created for a single host. The module
    device type should be used only when the devices are created.
    
    Scsi_scan sets the device type initially to 0xff and sets the correct
    type based in Inquiry results. This means that Inquiry must report
    sdebug_ptype as long as scsi_device->type is not set (the limit 32
    comes from the 5-bit length of the Peripheral Device Type in Inquiry).
    
    Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
    Link: https://lore.kernel.org/r/20250310155557.2872-5-Kai.Makisara@kolumbus.fi
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

commit 5b0cb8c984bf68dc98aa02ab534e7ddb47157693
Author: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Date:   Mon Mar 10 17:55:55 2025 +0200

    scsi: scsi_debug: Move some tape-specific commands to separate definitions
    
    New definitions (struct opcode_info_t) are created for READ(6),
    WRITE(6), READ POSITION(10) for tape devices.
    
    Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
    Link: https://lore.kernel.org/r/20250310155557.2872-4-Kai.Makisara@kolumbus.fi
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

commit eaa326f5a8e8996711c0cb6d0aa70fa9b2ea38ea
Author: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Date:   Mon Mar 10 17:55:54 2025 +0200

    scsi: scsi_debug: Enable different command definitions for different device types
    
    Add mask field devsel to the struct opcode_info_t to enable different
    definitions for different device types. Add checking of device mask to
    command queuing and reporting of supported opcodes.
    
    Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
    Link: https://lore.kernel.org/r/20250310155557.2872-3-Kai.Makisara@kolumbus.fi
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

commit a040adb78005cc35de61318975768c3d82138232
Author: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
Date:   Mon Mar 10 17:55:53 2025 +0200

    scsi: scsi_debug: Fix two typos in command definitions
    
    Fix two command definitions:
    
     - Flags and service action reversed in SEND DIAGNOSTIC
    
     - ATOMIC WRITE missing opcode
    
    Signed-off-by: Kai Mäkisara <Kai.Makisara@kolumbus.fi>
    Link: https://lore.kernel.org/r/20250310155557.2872-2-Kai.Makisara@kolumbus.fi
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>