From: Greg Kroah-Hartman Date: Fri, 3 Jun 2022 16:13:54 +0000 (+0200) Subject: 5.18-stable patches X-Git-Tag: v4.9.317~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e36bf31cea1fa923de29d923a58e80d3e699f196;p=thirdparty%2Fkernel%2Fstable-queue.git 5.18-stable patches added patches: alsa-usb-audio-add-missing-ep_idx-in-fixed-ep-quirks.patch alsa-usb-audio-configure-sync-endpoints-before-data.patch alsa-usb-audio-workaround-for-clock-setup-on-teac-devices.patch arm-dts-s5pv210-correct-interrupt-name-for-bluetooth-in-aries.patch bluetooth-hci_qca-use-del_timer_sync-before-freeing.patch crypto-caam-fix-i.mx6sx-entropy-delay-value.patch crypto-ecrdsa-fix-incorrect-use-of-vli_cmp.patch crypto-qat-rework-the-vf2pf-interrupt-handling-logic.patch dm-crypt-make-printing-of-the-key-constant-time.patch dm-integrity-fix-error-code-in-dm_integrity_ctr.patch dm-stats-add-cond_resched-when-looping-over-entries.patch dm-verity-set-dm_target_immutable-feature-flag.patch fs-ntfs3-validate-boot-sectors_per_clusters.patch hid-multitouch-add-quirks-to-enable-lenovo-x12-trackpoint.patch hid-multitouch-add-support-for-google-whiskers-touchpad.patch raid5-introduce-md_broken.patch tools-memory-model-readme-update-klitmus7-compat-table.patch zsmalloc-fix-races-between-asynchronous-zspage-free-and-page-migration.patch --- diff --git a/queue-5.18/alsa-usb-audio-add-missing-ep_idx-in-fixed-ep-quirks.patch b/queue-5.18/alsa-usb-audio-add-missing-ep_idx-in-fixed-ep-quirks.patch new file mode 100644 index 00000000000..8c0df6951c5 --- /dev/null +++ b/queue-5.18/alsa-usb-audio-add-missing-ep_idx-in-fixed-ep-quirks.patch @@ -0,0 +1,56 @@ +From 7b0efea4baf02f5e2f89e5f9b75ef891571b45f1 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Sat, 21 May 2022 08:53:25 +0200 +Subject: ALSA: usb-audio: Add missing ep_idx in fixed EP quirks +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Takashi Iwai + +commit 7b0efea4baf02f5e2f89e5f9b75ef891571b45f1 upstream. + +The quirk entry for Focusrite Saffire 6 had no proper ep_idx for the +capture endpoint, and this confused the driver, resulting in the +broken sound. This patch adds the missing ep_idx in the entry. + +While we are at it, a couple of other entries (for Digidesign MBox and +MOTU MicroBook II) seem to have the same problem, and those are +covered as well. + +Fixes: bf6313a0ff76 ("ALSA: usb-audio: Refactor endpoint management") +Reported-by: André Kapelrud +Cc: +Link: https://lore.kernel.org/r/20220521065325.426-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/quirks-table.h | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/sound/usb/quirks-table.h ++++ b/sound/usb/quirks-table.h +@@ -2672,6 +2672,7 @@ YAMAHA_DEVICE(0x7010, "UB99"), + .altset_idx = 1, + .attributes = 0, + .endpoint = 0x82, ++ .ep_idx = 1, + .ep_attr = USB_ENDPOINT_XFER_ISOC, + .datainterval = 1, + .maxpacksize = 0x0126, +@@ -2875,6 +2876,7 @@ YAMAHA_DEVICE(0x7010, "UB99"), + .altset_idx = 1, + .attributes = 0x4, + .endpoint = 0x81, ++ .ep_idx = 1, + .ep_attr = USB_ENDPOINT_XFER_ISOC | + USB_ENDPOINT_SYNC_ASYNC, + .maxpacksize = 0x130, +@@ -3391,6 +3393,7 @@ YAMAHA_DEVICE(0x7010, "UB99"), + .altset_idx = 1, + .attributes = 0, + .endpoint = 0x03, ++ .ep_idx = 1, + .rates = SNDRV_PCM_RATE_96000, + .ep_attr = USB_ENDPOINT_XFER_ISOC | + USB_ENDPOINT_SYNC_ASYNC, diff --git a/queue-5.18/alsa-usb-audio-configure-sync-endpoints-before-data.patch b/queue-5.18/alsa-usb-audio-configure-sync-endpoints-before-data.patch new file mode 100644 index 00000000000..071558de462 --- /dev/null +++ b/queue-5.18/alsa-usb-audio-configure-sync-endpoints-before-data.patch @@ -0,0 +1,58 @@ +From 0e85a22d01dfe9ad9a9d9e87cd4a88acce1aad65 Mon Sep 17 00:00:00 2001 +From: Craig McLure +Date: Tue, 24 May 2022 08:21:15 +0200 +Subject: ALSA: usb-audio: Configure sync endpoints before data + +From: Craig McLure + +commit 0e85a22d01dfe9ad9a9d9e87cd4a88acce1aad65 upstream. + +Devices such as the TC-Helicon GoXLR require the sync endpoint to be +configured in advance of the data endpoint in order for sound output +to work. + +This patch simply changes the ordering of EP configuration to resolve +this. + +Fixes: bf6313a0ff76 ("ALSA: usb-audio: Refactor endpoint management") +BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215079 +Signed-off-by: Craig McLure +Reviewed-by: Jaroslav Kysela +Cc: +Link: https://lore.kernel.org/r/20220524062115.25968-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/pcm.c | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) + +--- a/sound/usb/pcm.c ++++ b/sound/usb/pcm.c +@@ -439,16 +439,21 @@ static int configure_endpoints(struct sn + /* stop any running stream beforehand */ + if (stop_endpoints(subs, false)) + sync_pending_stops(subs); ++ if (subs->sync_endpoint) { ++ err = snd_usb_endpoint_configure(chip, subs->sync_endpoint); ++ if (err < 0) ++ return err; ++ } + err = snd_usb_endpoint_configure(chip, subs->data_endpoint); + if (err < 0) + return err; + snd_usb_set_format_quirk(subs, subs->cur_audiofmt); +- } +- +- if (subs->sync_endpoint) { +- err = snd_usb_endpoint_configure(chip, subs->sync_endpoint); +- if (err < 0) +- return err; ++ } else { ++ if (subs->sync_endpoint) { ++ err = snd_usb_endpoint_configure(chip, subs->sync_endpoint); ++ if (err < 0) ++ return err; ++ } + } + + return 0; diff --git a/queue-5.18/alsa-usb-audio-workaround-for-clock-setup-on-teac-devices.patch b/queue-5.18/alsa-usb-audio-workaround-for-clock-setup-on-teac-devices.patch new file mode 100644 index 00000000000..7c8e6677b92 --- /dev/null +++ b/queue-5.18/alsa-usb-audio-workaround-for-clock-setup-on-teac-devices.patch @@ -0,0 +1,55 @@ +From 5ce0b06ae5e69e23142e73c5c3c0260e9f2ccb4b Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Sat, 21 May 2022 08:46:27 +0200 +Subject: ALSA: usb-audio: Workaround for clock setup on TEAC devices + +From: Takashi Iwai + +commit 5ce0b06ae5e69e23142e73c5c3c0260e9f2ccb4b upstream. + +Maris reported that TEAC UD-501 (0644:8043) doesn't work with the +typical "clock source 41 is not valid, cannot use" errors on the +recent kernels. The currently known workaround so far is to restore +(partially) what we've done unconditionally at the clock setup; +namely, re-setup the USB interface immediately after the clock is +changed. This patch re-introduces the behavior conditionally for TEAC +devices. + +Further notes: +- The USB interface shall be set later in + snd_usb_endpoint_configure(), but this seems to be too late. +- Even calling usb_set_interface() right after + sne_usb_init_sample_rate() doesn't help; so this must be related + with the clock validation, too. +- The device may still spew the "clock source 41 is not valid" error + at the first clock setup. This seems happening at the very first + try of clock setup, but it disappears at later attempts. + The error is likely harmless because the driver retries the clock + setup (such an error is more or less expected on some devices). + +Fixes: bf6313a0ff76 ("ALSA: usb-audio: Refactor endpoint management") +Reported-and-tested-by: Maris Abele +Cc: +Link: https://lore.kernel.org/r/20220521064627.29292-1-tiwai@suse.de +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman +--- + sound/usb/clock.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/sound/usb/clock.c ++++ b/sound/usb/clock.c +@@ -572,6 +572,13 @@ static int set_sample_rate_v2v3(struct s + /* continue processing */ + } + ++ /* FIXME - TEAC devices require the immediate interface setup */ ++ if (rate != prev_rate && USB_ID_VENDOR(chip->usb_id) == 0x0644) { ++ usb_set_interface(chip->dev, fmt->iface, fmt->altsetting); ++ if (chip->quirk_flags & QUIRK_FLAG_IFACE_DELAY) ++ msleep(50); ++ } ++ + validation: + /* validate clock after rate change */ + if (!uac_clock_source_is_valid(chip, fmt, clock)) diff --git a/queue-5.18/arm-dts-s5pv210-correct-interrupt-name-for-bluetooth-in-aries.patch b/queue-5.18/arm-dts-s5pv210-correct-interrupt-name-for-bluetooth-in-aries.patch new file mode 100644 index 00000000000..5207e7561bc --- /dev/null +++ b/queue-5.18/arm-dts-s5pv210-correct-interrupt-name-for-bluetooth-in-aries.patch @@ -0,0 +1,33 @@ +From 3f5e3d3a8b895c8a11da8b0063ba2022dd9e2045 Mon Sep 17 00:00:00 2001 +From: Jonathan Bakker +Date: Sun, 27 Mar 2022 11:08:51 -0700 +Subject: ARM: dts: s5pv210: Correct interrupt name for bluetooth in Aries + +From: Jonathan Bakker + +commit 3f5e3d3a8b895c8a11da8b0063ba2022dd9e2045 upstream. + +Correct the name of the bluetooth interrupt from host-wake to +host-wakeup. + +Fixes: 1c65b6184441b ("ARM: dts: s5pv210: Correct BCM4329 bluetooth node") +Cc: +Signed-off-by: Jonathan Bakker +Link: https://lore.kernel.org/r/CY4PR04MB0567495CFCBDC8D408D44199CB1C9@CY4PR04MB0567.namprd04.prod.outlook.com +Signed-off-by: Krzysztof Kozlowski +Signed-off-by: Greg Kroah-Hartman +--- + arch/arm/boot/dts/s5pv210-aries.dtsi | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm/boot/dts/s5pv210-aries.dtsi ++++ b/arch/arm/boot/dts/s5pv210-aries.dtsi +@@ -895,7 +895,7 @@ + device-wakeup-gpios = <&gpg3 4 GPIO_ACTIVE_HIGH>; + interrupt-parent = <&gph2>; + interrupts = <5 IRQ_TYPE_LEVEL_HIGH>; +- interrupt-names = "host-wake"; ++ interrupt-names = "host-wakeup"; + }; + }; + diff --git a/queue-5.18/bluetooth-hci_qca-use-del_timer_sync-before-freeing.patch b/queue-5.18/bluetooth-hci_qca-use-del_timer_sync-before-freeing.patch new file mode 100644 index 00000000000..6a54779210b --- /dev/null +++ b/queue-5.18/bluetooth-hci_qca-use-del_timer_sync-before-freeing.patch @@ -0,0 +1,44 @@ +From 72ef98445aca568a81c2da050532500a8345ad3a Mon Sep 17 00:00:00 2001 +From: Steven Rostedt +Date: Tue, 5 Apr 2022 10:02:00 -0400 +Subject: Bluetooth: hci_qca: Use del_timer_sync() before freeing + +From: Steven Rostedt + +commit 72ef98445aca568a81c2da050532500a8345ad3a upstream. + +While looking at a crash report on a timer list being corrupted, which +usually happens when a timer is freed while still active. This is +commonly triggered by code calling del_timer() instead of +del_timer_sync() just before freeing. + +One possible culprit is the hci_qca driver, which does exactly that. + +Eric mentioned that wake_retrans_timer could be rearmed via the work +queue, so also move the destruction of the work queue before +del_timer_sync(). + +Cc: Eric Dumazet +Cc: stable@vger.kernel.org +Fixes: 0ff252c1976da ("Bluetooth: hciuart: Add support QCA chipset for UART") +Signed-off-by: Steven Rostedt (Google) +Signed-off-by: Marcel Holtmann +Signed-off-by: Greg Kroah-Hartman +--- + drivers/bluetooth/hci_qca.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/bluetooth/hci_qca.c ++++ b/drivers/bluetooth/hci_qca.c +@@ -696,9 +696,9 @@ static int qca_close(struct hci_uart *hu + skb_queue_purge(&qca->tx_wait_q); + skb_queue_purge(&qca->txq); + skb_queue_purge(&qca->rx_memdump_q); +- del_timer(&qca->tx_idle_timer); +- del_timer(&qca->wake_retrans_timer); + destroy_workqueue(qca->workqueue); ++ del_timer_sync(&qca->tx_idle_timer); ++ del_timer_sync(&qca->wake_retrans_timer); + qca->hu = NULL; + + kfree_skb(qca->rx_skb); diff --git a/queue-5.18/crypto-caam-fix-i.mx6sx-entropy-delay-value.patch b/queue-5.18/crypto-caam-fix-i.mx6sx-entropy-delay-value.patch new file mode 100644 index 00000000000..b98b61e871e --- /dev/null +++ b/queue-5.18/crypto-caam-fix-i.mx6sx-entropy-delay-value.patch @@ -0,0 +1,85 @@ +From 4ee4cdad368a26de3967f2975806a9ee2fa245df Mon Sep 17 00:00:00 2001 +From: Fabio Estevam +Date: Wed, 20 Apr 2022 09:06:01 -0300 +Subject: crypto: caam - fix i.MX6SX entropy delay value +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Fabio Estevam + +commit 4ee4cdad368a26de3967f2975806a9ee2fa245df upstream. + +Since commit 358ba762d9f1 ("crypto: caam - enable prediction resistance +in HRWNG") the following CAAM errors can be seen on i.MX6SX: + +caam_jr 2101000.jr: 20003c5b: CCB: desc idx 60: RNG: Hardware error +hwrng: no data available + +This error is due to an incorrect entropy delay for i.MX6SX. + +Fix it by increasing the minimum entropy delay for i.MX6SX +as done in U-Boot: +https://patchwork.ozlabs.org/project/uboot/patch/20220415111049.2565744-1-gaurav.jain@nxp.com/ + +As explained in the U-Boot patch: + +"RNG self tests are run to determine the correct entropy delay. +Such tests are executed with different voltages and temperatures to identify +the worst case value for the entropy delay. For i.MX6SX, it was determined +that after adding a margin value of 1000 the minimum entropy delay should be +at least 12000." + +Cc: +Fixes: 358ba762d9f1 ("crypto: caam - enable prediction resistance in HRWNG") +Signed-off-by: Fabio Estevam +Reviewed-by: Horia Geantă +Reviewed-by: Vabhav Sharma +Reviewed-by: Gaurav Jain +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman +--- + drivers/crypto/caam/ctrl.c | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) + +--- a/drivers/crypto/caam/ctrl.c ++++ b/drivers/crypto/caam/ctrl.c +@@ -609,6 +609,13 @@ static bool check_version(struct fsl_mc_ + } + #endif + ++static bool needs_entropy_delay_adjustment(void) ++{ ++ if (of_machine_is_compatible("fsl,imx6sx")) ++ return true; ++ return false; ++} ++ + /* Probe routine for CAAM top (controller) level */ + static int caam_probe(struct platform_device *pdev) + { +@@ -855,6 +862,8 @@ static int caam_probe(struct platform_de + * Also, if a handle was instantiated, do not change + * the TRNG parameters. + */ ++ if (needs_entropy_delay_adjustment()) ++ ent_delay = 12000; + if (!(ctrlpriv->rng4_sh_init || inst_handles)) { + dev_info(dev, + "Entropy delay = %u\n", +@@ -871,6 +880,15 @@ static int caam_probe(struct platform_de + */ + ret = instantiate_rng(dev, inst_handles, + gen_sk); ++ /* ++ * Entropy delay is determined via TRNG characterization. ++ * TRNG characterization is run across different voltages ++ * and temperatures. ++ * If worst case value for ent_dly is identified, ++ * the loop can be skipped for that platform. ++ */ ++ if (needs_entropy_delay_adjustment()) ++ break; + if (ret == -EAGAIN) + /* + * if here, the loop will rerun, diff --git a/queue-5.18/crypto-ecrdsa-fix-incorrect-use-of-vli_cmp.patch b/queue-5.18/crypto-ecrdsa-fix-incorrect-use-of-vli_cmp.patch new file mode 100644 index 00000000000..8b8ec0af6c6 --- /dev/null +++ b/queue-5.18/crypto-ecrdsa-fix-incorrect-use-of-vli_cmp.patch @@ -0,0 +1,51 @@ +From 7cc7ab73f83ee6d50dc9536bc3355495d8600fad Mon Sep 17 00:00:00 2001 +From: Vitaly Chikunov +Date: Thu, 21 Apr 2022 20:25:10 +0300 +Subject: crypto: ecrdsa - Fix incorrect use of vli_cmp + +From: Vitaly Chikunov + +commit 7cc7ab73f83ee6d50dc9536bc3355495d8600fad upstream. + +Correctly compare values that shall be greater-or-equal and not just +greater. + +Fixes: 0d7a78643f69 ("crypto: ecrdsa - add EC-RDSA (GOST 34.10) algorithm") +Cc: +Signed-off-by: Vitaly Chikunov +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman +--- + crypto/ecrdsa.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/crypto/ecrdsa.c ++++ b/crypto/ecrdsa.c +@@ -113,15 +113,15 @@ static int ecrdsa_verify(struct akcipher + + /* Step 1: verify that 0 < r < q, 0 < s < q */ + if (vli_is_zero(r, ndigits) || +- vli_cmp(r, ctx->curve->n, ndigits) == 1 || ++ vli_cmp(r, ctx->curve->n, ndigits) >= 0 || + vli_is_zero(s, ndigits) || +- vli_cmp(s, ctx->curve->n, ndigits) == 1) ++ vli_cmp(s, ctx->curve->n, ndigits) >= 0) + return -EKEYREJECTED; + + /* Step 2: calculate hash (h) of the message (passed as input) */ + /* Step 3: calculate e = h \mod q */ + vli_from_le64(e, digest, ndigits); +- if (vli_cmp(e, ctx->curve->n, ndigits) == 1) ++ if (vli_cmp(e, ctx->curve->n, ndigits) >= 0) + vli_sub(e, e, ctx->curve->n, ndigits); + if (vli_is_zero(e, ndigits)) + e[0] = 1; +@@ -137,7 +137,7 @@ static int ecrdsa_verify(struct akcipher + /* Step 6: calculate point C = z_1P + z_2Q, and R = x_c \mod q */ + ecc_point_mult_shamir(&cc, z1, &ctx->curve->g, z2, &ctx->pub_key, + ctx->curve); +- if (vli_cmp(cc.x, ctx->curve->n, ndigits) == 1) ++ if (vli_cmp(cc.x, ctx->curve->n, ndigits) >= 0) + vli_sub(cc.x, cc.x, ctx->curve->n, ndigits); + + /* Step 7: if R == r signature is valid */ diff --git a/queue-5.18/crypto-qat-rework-the-vf2pf-interrupt-handling-logic.patch b/queue-5.18/crypto-qat-rework-the-vf2pf-interrupt-handling-logic.patch new file mode 100644 index 00000000000..daee5b37f82 --- /dev/null +++ b/queue-5.18/crypto-qat-rework-the-vf2pf-interrupt-handling-logic.patch @@ -0,0 +1,385 @@ +From c690c7f6312ce69b426af08ae1da2b9e48a0246f Mon Sep 17 00:00:00 2001 +From: Marco Chiappero +Date: Thu, 7 Apr 2022 17:54:51 +0100 +Subject: crypto: qat - rework the VF2PF interrupt handling logic + +From: Marco Chiappero + +commit c690c7f6312ce69b426af08ae1da2b9e48a0246f upstream. + +Change the VF2PF interrupt handler in the PF ISR and the definition of +the internal PFVF API to correct the current implementation, which can +result in missed interrupts. + +More specifically, current HW generations consider a write to the mask +register, regardless of the value, as an acknowledge of any pending +VF2PF interrupt. Therefore, if there is an interrupt between the source +register read and the mask register write, such interrupt will not be +delivered and silently acknowledged, resulting in a lost VF2PF message. + +To work around the problem, rather than disabling specific interrupts, +disable all the interrupts and re-enable only the ones that we are not +serving (excluding the already disabled ones too). This will force any +other pending interrupt to be triggered and be serviced by a subsequent +ISR. + +This new approach requires, however, changes to the interrupt related +pfvf_ops functions. In particular, get_vf2pf_sources() has now been +removed in favor of disable_pending_vf2pf_interrupts(), which not only +retrieves and returns the pending (and enabled) sources, but also +disables them. +As a consequence, introduce the adf_disable_pending_vf2pf_interrupts() +utility in place of adf_disable_vf2pf_interrupts_irq(), which is no +longer needed. + +Cc: stable@vger.kernel.org +Fixes: 993161d ("crypto: qat - fix handling of VF to PF interrupts") +Signed-off-by: Marco Chiappero +Co-developed-by: Giovanni Cabiddu +Signed-off-by: Giovanni Cabiddu +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman +--- + drivers/crypto/qat/qat_common/adf_accel_devices.h | 2 + drivers/crypto/qat/qat_common/adf_gen2_pfvf.c | 58 ++++++++---- + drivers/crypto/qat/qat_common/adf_gen4_pfvf.c | 44 +++++++-- + drivers/crypto/qat/qat_common/adf_isr.c | 17 +-- + drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c | 76 +++++++++++------ + 5 files changed, 132 insertions(+), 65 deletions(-) + +--- a/drivers/crypto/qat/qat_common/adf_accel_devices.h ++++ b/drivers/crypto/qat/qat_common/adf_accel_devices.h +@@ -152,9 +152,9 @@ struct adf_pfvf_ops { + int (*enable_comms)(struct adf_accel_dev *accel_dev); + u32 (*get_pf2vf_offset)(u32 i); + u32 (*get_vf2pf_offset)(u32 i); +- u32 (*get_vf2pf_sources)(void __iomem *pmisc_addr); + void (*enable_vf2pf_interrupts)(void __iomem *pmisc_addr, u32 vf_mask); + void (*disable_vf2pf_interrupts)(void __iomem *pmisc_addr, u32 vf_mask); ++ u32 (*disable_pending_vf2pf_interrupts)(void __iomem *pmisc_addr); + int (*send_msg)(struct adf_accel_dev *accel_dev, struct pfvf_message msg, + u32 pfvf_offset, struct mutex *csr_lock); + struct pfvf_message (*recv_msg)(struct adf_accel_dev *accel_dev, +--- a/drivers/crypto/qat/qat_common/adf_gen2_pfvf.c ++++ b/drivers/crypto/qat/qat_common/adf_gen2_pfvf.c +@@ -13,6 +13,7 @@ + #include "adf_pfvf_utils.h" + + /* VF2PF interrupts */ ++#define ADF_GEN2_VF_MSK 0xFFFF + #define ADF_GEN2_ERR_REG_VF2PF(vf_src) (((vf_src) & 0x01FFFE00) >> 9) + #define ADF_GEN2_ERR_MSK_VF2PF(vf_mask) (((vf_mask) & 0xFFFF) << 9) + +@@ -50,23 +51,6 @@ static u32 adf_gen2_vf_get_pfvf_offset(u + return ADF_GEN2_VF_PF2VF_OFFSET; + } + +-static u32 adf_gen2_get_vf2pf_sources(void __iomem *pmisc_addr) +-{ +- u32 errsou3, errmsk3, vf_int_mask; +- +- /* Get the interrupt sources triggered by VFs */ +- errsou3 = ADF_CSR_RD(pmisc_addr, ADF_GEN2_ERRSOU3); +- vf_int_mask = ADF_GEN2_ERR_REG_VF2PF(errsou3); +- +- /* To avoid adding duplicate entries to work queue, clear +- * vf_int_mask_sets bits that are already masked in ERRMSK register. +- */ +- errmsk3 = ADF_CSR_RD(pmisc_addr, ADF_GEN2_ERRMSK3); +- vf_int_mask &= ~ADF_GEN2_ERR_REG_VF2PF(errmsk3); +- +- return vf_int_mask; +-} +- + static void adf_gen2_enable_vf2pf_interrupts(void __iomem *pmisc_addr, + u32 vf_mask) + { +@@ -89,6 +73,44 @@ static void adf_gen2_disable_vf2pf_inter + } + } + ++static u32 adf_gen2_disable_pending_vf2pf_interrupts(void __iomem *pmisc_addr) ++{ ++ u32 sources, disabled, pending; ++ u32 errsou3, errmsk3; ++ ++ /* Get the interrupt sources triggered by VFs */ ++ errsou3 = ADF_CSR_RD(pmisc_addr, ADF_GEN2_ERRSOU3); ++ sources = ADF_GEN2_ERR_REG_VF2PF(errsou3); ++ ++ if (!sources) ++ return 0; ++ ++ /* Get the already disabled interrupts */ ++ errmsk3 = ADF_CSR_RD(pmisc_addr, ADF_GEN2_ERRMSK3); ++ disabled = ADF_GEN2_ERR_REG_VF2PF(errmsk3); ++ ++ pending = sources & ~disabled; ++ if (!pending) ++ return 0; ++ ++ /* Due to HW limitations, when disabling the interrupts, we can't ++ * just disable the requested sources, as this would lead to missed ++ * interrupts if ERRSOU3 changes just before writing to ERRMSK3. ++ * To work around it, disable all and re-enable only the sources that ++ * are not in vf_mask and were not already disabled. Re-enabling will ++ * trigger a new interrupt for the sources that have changed in the ++ * meantime, if any. ++ */ ++ errmsk3 |= ADF_GEN2_ERR_MSK_VF2PF(ADF_GEN2_VF_MSK); ++ ADF_CSR_WR(pmisc_addr, ADF_GEN2_ERRMSK3, errmsk3); ++ ++ errmsk3 &= ADF_GEN2_ERR_MSK_VF2PF(sources | disabled); ++ ADF_CSR_WR(pmisc_addr, ADF_GEN2_ERRMSK3, errmsk3); ++ ++ /* Return the sources of the (new) interrupt(s) */ ++ return pending; ++} ++ + static u32 gen2_csr_get_int_bit(enum gen2_csr_pos offset) + { + return ADF_PFVF_INT << offset; +@@ -362,9 +384,9 @@ void adf_gen2_init_pf_pfvf_ops(struct ad + pfvf_ops->enable_comms = adf_enable_pf2vf_comms; + pfvf_ops->get_pf2vf_offset = adf_gen2_pf_get_pfvf_offset; + pfvf_ops->get_vf2pf_offset = adf_gen2_pf_get_pfvf_offset; +- pfvf_ops->get_vf2pf_sources = adf_gen2_get_vf2pf_sources; + pfvf_ops->enable_vf2pf_interrupts = adf_gen2_enable_vf2pf_interrupts; + pfvf_ops->disable_vf2pf_interrupts = adf_gen2_disable_vf2pf_interrupts; ++ pfvf_ops->disable_pending_vf2pf_interrupts = adf_gen2_disable_pending_vf2pf_interrupts; + pfvf_ops->send_msg = adf_gen2_pf2vf_send; + pfvf_ops->recv_msg = adf_gen2_vf2pf_recv; + } +--- a/drivers/crypto/qat/qat_common/adf_gen4_pfvf.c ++++ b/drivers/crypto/qat/qat_common/adf_gen4_pfvf.c +@@ -15,6 +15,7 @@ + /* VF2PF interrupt source registers */ + #define ADF_4XXX_VM2PF_SOU 0x41A180 + #define ADF_4XXX_VM2PF_MSK 0x41A1C0 ++#define ADF_GEN4_VF_MSK 0xFFFF + + #define ADF_PFVF_GEN4_MSGTYPE_SHIFT 2 + #define ADF_PFVF_GEN4_MSGTYPE_MASK 0x3F +@@ -36,16 +37,6 @@ static u32 adf_gen4_pf_get_vf2pf_offset( + return ADF_4XXX_VM2PF_OFFSET(i); + } + +-static u32 adf_gen4_get_vf2pf_sources(void __iomem *pmisc_addr) +-{ +- u32 sou, mask; +- +- sou = ADF_CSR_RD(pmisc_addr, ADF_4XXX_VM2PF_SOU); +- mask = ADF_CSR_RD(pmisc_addr, ADF_4XXX_VM2PF_MSK); +- +- return sou & ~mask; +-} +- + static void adf_gen4_enable_vf2pf_interrupts(void __iomem *pmisc_addr, + u32 vf_mask) + { +@@ -64,6 +55,37 @@ static void adf_gen4_disable_vf2pf_inter + ADF_CSR_WR(pmisc_addr, ADF_4XXX_VM2PF_MSK, val); + } + ++static u32 adf_gen4_disable_pending_vf2pf_interrupts(void __iomem *pmisc_addr) ++{ ++ u32 sources, disabled, pending; ++ ++ /* Get the interrupt sources triggered by VFs */ ++ sources = ADF_CSR_RD(pmisc_addr, ADF_4XXX_VM2PF_SOU); ++ if (!sources) ++ return 0; ++ ++ /* Get the already disabled interrupts */ ++ disabled = ADF_CSR_RD(pmisc_addr, ADF_4XXX_VM2PF_MSK); ++ ++ pending = sources & ~disabled; ++ if (!pending) ++ return 0; ++ ++ /* Due to HW limitations, when disabling the interrupts, we can't ++ * just disable the requested sources, as this would lead to missed ++ * interrupts if VM2PF_SOU changes just before writing to VM2PF_MSK. ++ * To work around it, disable all and re-enable only the sources that ++ * are not in vf_mask and were not already disabled. Re-enabling will ++ * trigger a new interrupt for the sources that have changed in the ++ * meantime, if any. ++ */ ++ ADF_CSR_WR(pmisc_addr, ADF_4XXX_VM2PF_MSK, ADF_GEN4_VF_MSK); ++ ADF_CSR_WR(pmisc_addr, ADF_4XXX_VM2PF_MSK, disabled | sources); ++ ++ /* Return the sources of the (new) interrupt(s) */ ++ return pending; ++} ++ + static int adf_gen4_pfvf_send(struct adf_accel_dev *accel_dev, + struct pfvf_message msg, u32 pfvf_offset, + struct mutex *csr_lock) +@@ -115,9 +137,9 @@ void adf_gen4_init_pf_pfvf_ops(struct ad + pfvf_ops->enable_comms = adf_enable_pf2vf_comms; + pfvf_ops->get_pf2vf_offset = adf_gen4_pf_get_pf2vf_offset; + pfvf_ops->get_vf2pf_offset = adf_gen4_pf_get_vf2pf_offset; +- pfvf_ops->get_vf2pf_sources = adf_gen4_get_vf2pf_sources; + pfvf_ops->enable_vf2pf_interrupts = adf_gen4_enable_vf2pf_interrupts; + pfvf_ops->disable_vf2pf_interrupts = adf_gen4_disable_vf2pf_interrupts; ++ pfvf_ops->disable_pending_vf2pf_interrupts = adf_gen4_disable_pending_vf2pf_interrupts; + pfvf_ops->send_msg = adf_gen4_pfvf_send; + pfvf_ops->recv_msg = adf_gen4_pfvf_recv; + } +--- a/drivers/crypto/qat/qat_common/adf_isr.c ++++ b/drivers/crypto/qat/qat_common/adf_isr.c +@@ -76,32 +76,29 @@ void adf_disable_vf2pf_interrupts(struct + spin_unlock_irqrestore(&accel_dev->pf.vf2pf_ints_lock, flags); + } + +-static void adf_disable_vf2pf_interrupts_irq(struct adf_accel_dev *accel_dev, +- u32 vf_mask) ++static u32 adf_disable_pending_vf2pf_interrupts(struct adf_accel_dev *accel_dev) + { + void __iomem *pmisc_addr = adf_get_pmisc_base(accel_dev); ++ u32 pending; + + spin_lock(&accel_dev->pf.vf2pf_ints_lock); +- GET_PFVF_OPS(accel_dev)->disable_vf2pf_interrupts(pmisc_addr, vf_mask); ++ pending = GET_PFVF_OPS(accel_dev)->disable_pending_vf2pf_interrupts(pmisc_addr); + spin_unlock(&accel_dev->pf.vf2pf_ints_lock); ++ ++ return pending; + } + + static bool adf_handle_vf2pf_int(struct adf_accel_dev *accel_dev) + { +- void __iomem *pmisc_addr = adf_get_pmisc_base(accel_dev); + bool irq_handled = false; + unsigned long vf_mask; + +- /* Get the interrupt sources triggered by VFs */ +- vf_mask = GET_PFVF_OPS(accel_dev)->get_vf2pf_sources(pmisc_addr); +- ++ /* Get the interrupt sources triggered by VFs, except for those already disabled */ ++ vf_mask = adf_disable_pending_vf2pf_interrupts(accel_dev); + if (vf_mask) { + struct adf_accel_vf_info *vf_info; + int i; + +- /* Disable VF2PF interrupts for VFs with pending ints */ +- adf_disable_vf2pf_interrupts_irq(accel_dev, vf_mask); +- + /* + * Handle VF2PF interrupt unless the VF is malicious and + * is attempting to flood the host OS with VF2PF interrupts. +--- a/drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c ++++ b/drivers/crypto/qat/qat_dh895xcc/adf_dh895xcc_hw_data.c +@@ -7,6 +7,8 @@ + #include "adf_dh895xcc_hw_data.h" + #include "icp_qat_hw.h" + ++#define ADF_DH895XCC_VF_MSK 0xFFFFFFFF ++ + /* Worker thread to service arbiter mappings */ + static const u32 thrd_to_arb_map[ADF_DH895XCC_MAX_ACCELENGINES] = { + 0x12222AAA, 0x11666666, 0x12222AAA, 0x11666666, +@@ -114,29 +116,6 @@ static void adf_enable_ints(struct adf_a + ADF_DH895XCC_SMIA1_MASK); + } + +-static u32 get_vf2pf_sources(void __iomem *pmisc_bar) +-{ +- u32 errsou3, errmsk3, errsou5, errmsk5, vf_int_mask; +- +- /* Get the interrupt sources triggered by VFs */ +- errsou3 = ADF_CSR_RD(pmisc_bar, ADF_GEN2_ERRSOU3); +- vf_int_mask = ADF_DH895XCC_ERR_REG_VF2PF_L(errsou3); +- +- /* To avoid adding duplicate entries to work queue, clear +- * vf_int_mask_sets bits that are already masked in ERRMSK register. +- */ +- errmsk3 = ADF_CSR_RD(pmisc_bar, ADF_GEN2_ERRMSK3); +- vf_int_mask &= ~ADF_DH895XCC_ERR_REG_VF2PF_L(errmsk3); +- +- /* Do the same for ERRSOU5 */ +- errsou5 = ADF_CSR_RD(pmisc_bar, ADF_GEN2_ERRSOU5); +- errmsk5 = ADF_CSR_RD(pmisc_bar, ADF_GEN2_ERRMSK5); +- vf_int_mask |= ADF_DH895XCC_ERR_REG_VF2PF_U(errsou5); +- vf_int_mask &= ~ADF_DH895XCC_ERR_REG_VF2PF_U(errmsk5); +- +- return vf_int_mask; +-} +- + static void enable_vf2pf_interrupts(void __iomem *pmisc_addr, u32 vf_mask) + { + /* Enable VF2PF Messaging Ints - VFs 0 through 15 per vf_mask[15:0] */ +@@ -150,7 +129,6 @@ static void enable_vf2pf_interrupts(void + if (vf_mask >> 16) { + u32 val = ADF_CSR_RD(pmisc_addr, ADF_GEN2_ERRMSK5) + & ~ADF_DH895XCC_ERR_MSK_VF2PF_U(vf_mask); +- + ADF_CSR_WR(pmisc_addr, ADF_GEN2_ERRMSK5, val); + } + } +@@ -173,6 +151,54 @@ static void disable_vf2pf_interrupts(voi + } + } + ++static u32 disable_pending_vf2pf_interrupts(void __iomem *pmisc_addr) ++{ ++ u32 sources, pending, disabled; ++ u32 errsou3, errmsk3; ++ u32 errsou5, errmsk5; ++ ++ /* Get the interrupt sources triggered by VFs */ ++ errsou3 = ADF_CSR_RD(pmisc_addr, ADF_GEN2_ERRSOU3); ++ errsou5 = ADF_CSR_RD(pmisc_addr, ADF_GEN2_ERRSOU5); ++ sources = ADF_DH895XCC_ERR_REG_VF2PF_L(errsou3) ++ | ADF_DH895XCC_ERR_REG_VF2PF_U(errsou5); ++ ++ if (!sources) ++ return 0; ++ ++ /* Get the already disabled interrupts */ ++ errmsk3 = ADF_CSR_RD(pmisc_addr, ADF_GEN2_ERRMSK3); ++ errmsk5 = ADF_CSR_RD(pmisc_addr, ADF_GEN2_ERRMSK5); ++ disabled = ADF_DH895XCC_ERR_REG_VF2PF_L(errmsk3) ++ | ADF_DH895XCC_ERR_REG_VF2PF_U(errmsk5); ++ ++ pending = sources & ~disabled; ++ if (!pending) ++ return 0; ++ ++ /* Due to HW limitations, when disabling the interrupts, we can't ++ * just disable the requested sources, as this would lead to missed ++ * interrupts if sources changes just before writing to ERRMSK3 and ++ * ERRMSK5. ++ * To work around it, disable all and re-enable only the sources that ++ * are not in vf_mask and were not already disabled. Re-enabling will ++ * trigger a new interrupt for the sources that have changed in the ++ * meantime, if any. ++ */ ++ errmsk3 |= ADF_DH895XCC_ERR_MSK_VF2PF_L(ADF_DH895XCC_VF_MSK); ++ errmsk5 |= ADF_DH895XCC_ERR_MSK_VF2PF_U(ADF_DH895XCC_VF_MSK); ++ ADF_CSR_WR(pmisc_addr, ADF_GEN2_ERRMSK3, errmsk3); ++ ADF_CSR_WR(pmisc_addr, ADF_GEN2_ERRMSK5, errmsk5); ++ ++ errmsk3 &= ADF_DH895XCC_ERR_MSK_VF2PF_L(sources | disabled); ++ errmsk5 &= ADF_DH895XCC_ERR_MSK_VF2PF_U(sources | disabled); ++ ADF_CSR_WR(pmisc_addr, ADF_GEN2_ERRMSK3, errmsk3); ++ ADF_CSR_WR(pmisc_addr, ADF_GEN2_ERRMSK5, errmsk5); ++ ++ /* Return the sources of the (new) interrupt(s) */ ++ return pending; ++} ++ + static void configure_iov_threads(struct adf_accel_dev *accel_dev, bool enable) + { + adf_gen2_cfg_iov_thds(accel_dev, enable, +@@ -220,9 +246,9 @@ void adf_init_hw_data_dh895xcc(struct ad + hw_data->disable_iov = adf_disable_sriov; + + adf_gen2_init_pf_pfvf_ops(&hw_data->pfvf_ops); +- hw_data->pfvf_ops.get_vf2pf_sources = get_vf2pf_sources; + hw_data->pfvf_ops.enable_vf2pf_interrupts = enable_vf2pf_interrupts; + hw_data->pfvf_ops.disable_vf2pf_interrupts = disable_vf2pf_interrupts; ++ hw_data->pfvf_ops.disable_pending_vf2pf_interrupts = disable_pending_vf2pf_interrupts; + adf_gen2_init_hw_csr_ops(&hw_data->csr_ops); + } + diff --git a/queue-5.18/dm-crypt-make-printing-of-the-key-constant-time.patch b/queue-5.18/dm-crypt-make-printing-of-the-key-constant-time.patch new file mode 100644 index 00000000000..486de37cf4c --- /dev/null +++ b/queue-5.18/dm-crypt-make-printing-of-the-key-constant-time.patch @@ -0,0 +1,58 @@ +From 567dd8f34560fa221a6343729474536aa7ede4fd Mon Sep 17 00:00:00 2001 +From: Mikulas Patocka +Date: Mon, 25 Apr 2022 08:53:29 -0400 +Subject: dm crypt: make printing of the key constant-time + +From: Mikulas Patocka + +commit 567dd8f34560fa221a6343729474536aa7ede4fd upstream. + +The device mapper dm-crypt target is using scnprintf("%02x", cc->key[i]) to +report the current key to userspace. However, this is not a constant-time +operation and it may leak information about the key via timing, via cache +access patterns or via the branch predictor. + +Change dm-crypt's key printing to use "%c" instead of "%02x". Also +introduce hex2asc() that carefully avoids any branching or memory +accesses when converting a number in the range 0 ... 15 to an ascii +character. + +Cc: stable@vger.kernel.org +Signed-off-by: Mikulas Patocka +Tested-by: Milan Broz +Signed-off-by: Mike Snitzer +Signed-off-by: Greg Kroah-Hartman +--- + drivers/md/dm-crypt.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +--- a/drivers/md/dm-crypt.c ++++ b/drivers/md/dm-crypt.c +@@ -3439,6 +3439,11 @@ static int crypt_map(struct dm_target *t + return DM_MAPIO_SUBMITTED; + } + ++static char hex2asc(unsigned char c) ++{ ++ return c + '0' + ((unsigned)(9 - c) >> 4 & 0x27); ++} ++ + static void crypt_status(struct dm_target *ti, status_type_t type, + unsigned status_flags, char *result, unsigned maxlen) + { +@@ -3457,9 +3462,12 @@ static void crypt_status(struct dm_targe + if (cc->key_size > 0) { + if (cc->key_string) + DMEMIT(":%u:%s", cc->key_size, cc->key_string); +- else +- for (i = 0; i < cc->key_size; i++) +- DMEMIT("%02x", cc->key[i]); ++ else { ++ for (i = 0; i < cc->key_size; i++) { ++ DMEMIT("%c%c", hex2asc(cc->key[i] >> 4), ++ hex2asc(cc->key[i] & 0xf)); ++ } ++ } + } else + DMEMIT("-"); + diff --git a/queue-5.18/dm-integrity-fix-error-code-in-dm_integrity_ctr.patch b/queue-5.18/dm-integrity-fix-error-code-in-dm_integrity_ctr.patch new file mode 100644 index 00000000000..8b0f194bd77 --- /dev/null +++ b/queue-5.18/dm-integrity-fix-error-code-in-dm_integrity_ctr.patch @@ -0,0 +1,37 @@ +From d3f2a14b8906df913cb04a706367b012db94a6e8 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Mon, 25 Apr 2022 14:56:48 +0300 +Subject: dm integrity: fix error code in dm_integrity_ctr() + +From: Dan Carpenter + +commit d3f2a14b8906df913cb04a706367b012db94a6e8 upstream. + +The "r" variable shadows an earlier "r" that has function scope. It +means that we accidentally return success instead of an error code. +Smatch has a warning for this: + + drivers/md/dm-integrity.c:4503 dm_integrity_ctr() + warn: missing error code 'r' + +Fixes: 7eada909bfd7 ("dm: add integrity target") +Cc: stable@vger.kernel.org +Signed-off-by: Dan Carpenter +Reviewed-by: Mikulas Patocka +Signed-off-by: Mike Snitzer +Signed-off-by: Greg Kroah-Hartman +--- + drivers/md/dm-integrity.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/drivers/md/dm-integrity.c ++++ b/drivers/md/dm-integrity.c +@@ -4494,8 +4494,6 @@ try_smaller_buffer: + } + + if (should_write_sb) { +- int r; +- + init_journal(ic, 0, ic->journal_sections, 0); + r = dm_integrity_failed(ic); + if (unlikely(r)) { diff --git a/queue-5.18/dm-stats-add-cond_resched-when-looping-over-entries.patch b/queue-5.18/dm-stats-add-cond_resched-when-looping-over-entries.patch new file mode 100644 index 00000000000..d0144d56fe3 --- /dev/null +++ b/queue-5.18/dm-stats-add-cond_resched-when-looping-over-entries.patch @@ -0,0 +1,80 @@ +From bfe2b0146c4d0230b68f5c71a64380ff8d361f8b Mon Sep 17 00:00:00 2001 +From: Mikulas Patocka +Date: Sun, 24 Apr 2022 16:43:00 -0400 +Subject: dm stats: add cond_resched when looping over entries + +From: Mikulas Patocka + +commit bfe2b0146c4d0230b68f5c71a64380ff8d361f8b upstream. + +dm-stats can be used with a very large number of entries (it is only +limited by 1/4 of total system memory), so add rescheduling points to +the loops that iterate over the entries. + +Cc: stable@vger.kernel.org +Signed-off-by: Mikulas Patocka +Signed-off-by: Mike Snitzer +Signed-off-by: Greg Kroah-Hartman +--- + drivers/md/dm-stats.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/md/dm-stats.c ++++ b/drivers/md/dm-stats.c +@@ -225,6 +225,7 @@ void dm_stats_cleanup(struct dm_stats *s + atomic_read(&shared->in_flight[READ]), + atomic_read(&shared->in_flight[WRITE])); + } ++ cond_resched(); + } + dm_stat_free(&s->rcu_head); + } +@@ -330,6 +331,7 @@ static int dm_stats_create(struct dm_sta + for (ni = 0; ni < n_entries; ni++) { + atomic_set(&s->stat_shared[ni].in_flight[READ], 0); + atomic_set(&s->stat_shared[ni].in_flight[WRITE], 0); ++ cond_resched(); + } + + if (s->n_histogram_entries) { +@@ -342,6 +344,7 @@ static int dm_stats_create(struct dm_sta + for (ni = 0; ni < n_entries; ni++) { + s->stat_shared[ni].tmp.histogram = hi; + hi += s->n_histogram_entries + 1; ++ cond_resched(); + } + } + +@@ -362,6 +365,7 @@ static int dm_stats_create(struct dm_sta + for (ni = 0; ni < n_entries; ni++) { + p[ni].histogram = hi; + hi += s->n_histogram_entries + 1; ++ cond_resched(); + } + } + } +@@ -497,6 +501,7 @@ static int dm_stats_list(struct dm_stats + } + DMEMIT("\n"); + } ++ cond_resched(); + } + mutex_unlock(&stats->mutex); + +@@ -774,6 +779,7 @@ static void __dm_stat_clear(struct dm_st + local_irq_enable(); + } + } ++ cond_resched(); + } + } + +@@ -889,6 +895,8 @@ static int dm_stats_print(struct dm_stat + + if (unlikely(sz + 1 >= maxlen)) + goto buffer_overflow; ++ ++ cond_resched(); + } + + if (clear) diff --git a/queue-5.18/dm-verity-set-dm_target_immutable-feature-flag.patch b/queue-5.18/dm-verity-set-dm_target_immutable-feature-flag.patch new file mode 100644 index 00000000000..d75985b2dd6 --- /dev/null +++ b/queue-5.18/dm-verity-set-dm_target_immutable-feature-flag.patch @@ -0,0 +1,35 @@ +From 4caae58406f8ceb741603eee460d79bacca9b1b5 Mon Sep 17 00:00:00 2001 +From: Sarthak Kukreti +Date: Tue, 31 May 2022 15:56:40 -0400 +Subject: dm verity: set DM_TARGET_IMMUTABLE feature flag + +From: Sarthak Kukreti + +commit 4caae58406f8ceb741603eee460d79bacca9b1b5 upstream. + +The device-mapper framework provides a mechanism to mark targets as +immutable (and hence fail table reloads that try to change the target +type). Add the DM_TARGET_IMMUTABLE flag to the dm-verity target's +feature flags to prevent switching the verity target with a different +target type. + +Fixes: a4ffc152198e ("dm: add verity target") +Cc: stable@vger.kernel.org +Signed-off-by: Sarthak Kukreti +Reviewed-by: Kees Cook +Signed-off-by: Mike Snitzer +Signed-off-by: Greg Kroah-Hartman +--- + drivers/md/dm-verity-target.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/md/dm-verity-target.c ++++ b/drivers/md/dm-verity-target.c +@@ -1312,6 +1312,7 @@ bad: + + static struct target_type verity_target = { + .name = "verity", ++ .features = DM_TARGET_IMMUTABLE, + .version = {1, 8, 0}, + .module = THIS_MODULE, + .ctr = verity_ctr, diff --git a/queue-5.18/fs-ntfs3-validate-boot-sectors_per_clusters.patch b/queue-5.18/fs-ntfs3-validate-boot-sectors_per_clusters.patch new file mode 100644 index 00000000000..fa3728c1042 --- /dev/null +++ b/queue-5.18/fs-ntfs3-validate-boot-sectors_per_clusters.patch @@ -0,0 +1,63 @@ +From a3b774342fa752a5290c0de36375289dfcf4a260 Mon Sep 17 00:00:00 2001 +From: Randy Dunlap +Date: Thu, 12 May 2022 20:38:37 -0700 +Subject: fs/ntfs3: validate BOOT sectors_per_clusters + +From: Randy Dunlap + +commit a3b774342fa752a5290c0de36375289dfcf4a260 upstream. + +When the NTFS BOOT sectors_per_clusters field is > 0x80, it represents a +shift value. Make sure that the shift value is not too large before using +it (NTFS max cluster size is 2MB). Return -EVINVAL if it too large. + +This prevents negative shift values and shift values that are larger than +the field size. + +Prevents this UBSAN error: + + UBSAN: shift-out-of-bounds in ../fs/ntfs3/super.c:673:16 + shift exponent -192 is negative + +Link: https://lkml.kernel.org/r/20220502175342.20296-1-rdunlap@infradead.org +Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") +Signed-off-by: Randy Dunlap +Reported-by: syzbot+1631f09646bc214d2e76@syzkaller.appspotmail.com +Reviewed-by: Namjae Jeon +Cc: Konstantin Komarov +Cc: Alexander Viro +Cc: Kari Argillander +Cc: Namjae Jeon +Cc: Matthew Wilcox +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + fs/ntfs3/super.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +--- a/fs/ntfs3/super.c ++++ b/fs/ntfs3/super.c +@@ -668,9 +668,11 @@ static u32 format_size_gb(const u64 byte + + static u32 true_sectors_per_clst(const struct NTFS_BOOT *boot) + { +- return boot->sectors_per_clusters <= 0x80 +- ? boot->sectors_per_clusters +- : (1u << (0 - boot->sectors_per_clusters)); ++ if (boot->sectors_per_clusters <= 0x80) ++ return boot->sectors_per_clusters; ++ if (boot->sectors_per_clusters >= 0xf4) /* limit shift to 2MB max */ ++ return 1U << (0 - boot->sectors_per_clusters); ++ return -EINVAL; + } + + /* +@@ -713,6 +715,8 @@ static int ntfs_init_from_boot(struct su + + /* cluster size: 512, 1K, 2K, 4K, ... 2M */ + sct_per_clst = true_sectors_per_clst(boot); ++ if ((int)sct_per_clst < 0) ++ goto out; + if (!is_power_of_2(sct_per_clst)) + goto out; + diff --git a/queue-5.18/hid-multitouch-add-quirks-to-enable-lenovo-x12-trackpoint.patch b/queue-5.18/hid-multitouch-add-quirks-to-enable-lenovo-x12-trackpoint.patch new file mode 100644 index 00000000000..dfce767ae28 --- /dev/null +++ b/queue-5.18/hid-multitouch-add-quirks-to-enable-lenovo-x12-trackpoint.patch @@ -0,0 +1,50 @@ +From 95cd2cdc88c755dcd0a58b951faeb77742c733a4 Mon Sep 17 00:00:00 2001 +From: Tao Jin +Date: Sun, 3 Apr 2022 12:57:44 -0400 +Subject: HID: multitouch: add quirks to enable Lenovo X12 trackpoint + +From: Tao Jin + +commit 95cd2cdc88c755dcd0a58b951faeb77742c733a4 upstream. + +This applies the similar quirks used by previous generation devices +such as X1 tablet for X12 tablet, so that the trackpoint and buttons +can work. + +This patch was applied and tested working on 5.17.1 . + +Cc: stable@vger.kernel.org # 5.8+ given that it relies on 40d5bb87377a +Signed-off-by: Tao Jin +Signed-off-by: Benjamin Tissoires +Link: https://lore.kernel.org/r/CO6PR03MB6241CB276FCDC7F4CEDC34F6E1E29@CO6PR03MB6241.namprd03.prod.outlook.com +Signed-off-by: Greg Kroah-Hartman +--- + drivers/hid/hid-ids.h | 1 + + drivers/hid/hid-multitouch.c | 6 ++++++ + 2 files changed, 7 insertions(+) + +--- a/drivers/hid/hid-ids.h ++++ b/drivers/hid/hid-ids.h +@@ -768,6 +768,7 @@ + #define USB_DEVICE_ID_LENOVO_X1_COVER 0x6085 + #define USB_DEVICE_ID_LENOVO_X1_TAB 0x60a3 + #define USB_DEVICE_ID_LENOVO_X1_TAB3 0x60b5 ++#define USB_DEVICE_ID_LENOVO_X12_TAB 0x60fe + #define USB_DEVICE_ID_LENOVO_OPTICAL_USB_MOUSE_600E 0x600e + #define USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_608D 0x608d + #define USB_DEVICE_ID_LENOVO_PIXART_USB_MOUSE_6019 0x6019 +--- a/drivers/hid/hid-multitouch.c ++++ b/drivers/hid/hid-multitouch.c +@@ -2034,6 +2034,12 @@ static const struct hid_device_id mt_dev + USB_VENDOR_ID_LENOVO, + USB_DEVICE_ID_LENOVO_X1_TAB3) }, + ++ /* Lenovo X12 TAB Gen 1 */ ++ { .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT, ++ HID_DEVICE(BUS_USB, HID_GROUP_MULTITOUCH_WIN_8, ++ USB_VENDOR_ID_LENOVO, ++ USB_DEVICE_ID_LENOVO_X12_TAB) }, ++ + /* MosArt panels */ + { .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE, + MT_USB_DEVICE(USB_VENDOR_ID_ASUS, diff --git a/queue-5.18/hid-multitouch-add-support-for-google-whiskers-touchpad.patch b/queue-5.18/hid-multitouch-add-support-for-google-whiskers-touchpad.patch new file mode 100644 index 00000000000..f57fcbbf96a --- /dev/null +++ b/queue-5.18/hid-multitouch-add-support-for-google-whiskers-touchpad.patch @@ -0,0 +1,33 @@ +From 1d07cef7fd7599450b3d03e1915efc2a96e1f03f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Ma=C5=9Blanka?= +Date: Tue, 5 Apr 2022 17:04:07 +0200 +Subject: HID: multitouch: Add support for Google Whiskers Touchpad + +From: Marek Maślanka + +commit 1d07cef7fd7599450b3d03e1915efc2a96e1f03f upstream. + +The Google Whiskers touchpad does not work properly with the default +multitouch configuration. Instead, use the same configuration as Google +Rose. + +Signed-off-by: Marek Maslanka +Acked-by: Benjamin Tissoires +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman +--- + drivers/hid/hid-multitouch.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/hid/hid-multitouch.c ++++ b/drivers/hid/hid-multitouch.c +@@ -2178,6 +2178,9 @@ static const struct hid_device_id mt_dev + { .driver_data = MT_CLS_GOOGLE, + HID_DEVICE(HID_BUS_ANY, HID_GROUP_ANY, USB_VENDOR_ID_GOOGLE, + USB_DEVICE_ID_GOOGLE_TOUCH_ROSE) }, ++ { .driver_data = MT_CLS_GOOGLE, ++ HID_DEVICE(BUS_USB, HID_GROUP_MULTITOUCH_WIN_8, USB_VENDOR_ID_GOOGLE, ++ USB_DEVICE_ID_GOOGLE_WHISKERS) }, + + /* Generic MT device */ + { HID_DEVICE(HID_BUS_ANY, HID_GROUP_MULTITOUCH, HID_ANY_ID, HID_ANY_ID) }, diff --git a/queue-5.18/raid5-introduce-md_broken.patch b/queue-5.18/raid5-introduce-md_broken.patch new file mode 100644 index 00000000000..233e7c12f0a --- /dev/null +++ b/queue-5.18/raid5-introduce-md_broken.patch @@ -0,0 +1,159 @@ +From 57668f0a4cc4083a120cc8c517ca0055c4543b59 Mon Sep 17 00:00:00 2001 +From: Mariusz Tkaczyk +Date: Tue, 22 Mar 2022 16:23:39 +0100 +Subject: raid5: introduce MD_BROKEN + +From: Mariusz Tkaczyk + +commit 57668f0a4cc4083a120cc8c517ca0055c4543b59 upstream. + +Raid456 module had allowed to achieve failed state. It was fixed by +fb73b357fb9 ("raid5: block failing device if raid will be failed"). +This fix introduces a bug, now if raid5 fails during IO, it may result +with a hung task without completion. Faulty flag on the device is +necessary to process all requests and is checked many times, mainly in +analyze_stripe(). +Allow to set faulty on drive again and set MD_BROKEN if raid is failed. + +As a result, this level is allowed to achieve failed state again, but +communication with userspace (via -EBUSY status) will be preserved. + +This restores possibility to fail array via #mdadm --set-faulty command +and will be fixed by additional verification on mdadm side. + +Reproduction steps: + mdadm -CR imsm -e imsm -n 3 /dev/nvme[0-2]n1 + mdadm -CR r5 -e imsm -l5 -n3 /dev/nvme[0-2]n1 --assume-clean + mkfs.xfs /dev/md126 -f + mount /dev/md126 /mnt/root/ + + fio --filename=/mnt/root/file --size=5GB --direct=1 --rw=randrw +--bs=64k --ioengine=libaio --iodepth=64 --runtime=240 --numjobs=4 +--time_based --group_reporting --name=throughput-test-job +--eta-newline=1 & + + echo 1 > /sys/block/nvme2n1/device/device/remove + echo 1 > /sys/block/nvme1n1/device/device/remove + + [ 1475.787779] Call Trace: + [ 1475.793111] __schedule+0x2a6/0x700 + [ 1475.799460] schedule+0x38/0xa0 + [ 1475.805454] raid5_get_active_stripe+0x469/0x5f0 [raid456] + [ 1475.813856] ? finish_wait+0x80/0x80 + [ 1475.820332] raid5_make_request+0x180/0xb40 [raid456] + [ 1475.828281] ? finish_wait+0x80/0x80 + [ 1475.834727] ? finish_wait+0x80/0x80 + [ 1475.841127] ? finish_wait+0x80/0x80 + [ 1475.847480] md_handle_request+0x119/0x190 + [ 1475.854390] md_make_request+0x8a/0x190 + [ 1475.861041] generic_make_request+0xcf/0x310 + [ 1475.868145] submit_bio+0x3c/0x160 + [ 1475.874355] iomap_dio_submit_bio.isra.20+0x51/0x60 + [ 1475.882070] iomap_dio_bio_actor+0x175/0x390 + [ 1475.889149] iomap_apply+0xff/0x310 + [ 1475.895447] ? iomap_dio_bio_actor+0x390/0x390 + [ 1475.902736] ? iomap_dio_bio_actor+0x390/0x390 + [ 1475.909974] iomap_dio_rw+0x2f2/0x490 + [ 1475.916415] ? iomap_dio_bio_actor+0x390/0x390 + [ 1475.923680] ? atime_needs_update+0x77/0xe0 + [ 1475.930674] ? xfs_file_dio_aio_read+0x6b/0xe0 [xfs] + [ 1475.938455] xfs_file_dio_aio_read+0x6b/0xe0 [xfs] + [ 1475.946084] xfs_file_read_iter+0xba/0xd0 [xfs] + [ 1475.953403] aio_read+0xd5/0x180 + [ 1475.959395] ? _cond_resched+0x15/0x30 + [ 1475.965907] io_submit_one+0x20b/0x3c0 + [ 1475.972398] __x64_sys_io_submit+0xa2/0x180 + [ 1475.979335] ? do_io_getevents+0x7c/0xc0 + [ 1475.986009] do_syscall_64+0x5b/0x1a0 + [ 1475.992419] entry_SYSCALL_64_after_hwframe+0x65/0xca + [ 1476.000255] RIP: 0033:0x7f11fc27978d + [ 1476.006631] Code: Bad RIP value. + [ 1476.073251] INFO: task fio:3877 blocked for more than 120 seconds. + +Cc: stable@vger.kernel.org +Fixes: fb73b357fb9 ("raid5: block failing device if raid will be failed") +Reviewd-by: Xiao Ni +Signed-off-by: Mariusz Tkaczyk +Signed-off-by: Song Liu +Signed-off-by: Greg Kroah-Hartman +--- + drivers/md/raid5.c | 47 ++++++++++++++++++++++------------------------- + 1 file changed, 22 insertions(+), 25 deletions(-) + +--- a/drivers/md/raid5.c ++++ b/drivers/md/raid5.c +@@ -686,17 +686,17 @@ int raid5_calc_degraded(struct r5conf *c + return degraded; + } + +-static int has_failed(struct r5conf *conf) ++static bool has_failed(struct r5conf *conf) + { +- int degraded; ++ int degraded = conf->mddev->degraded; + +- if (conf->mddev->reshape_position == MaxSector) +- return conf->mddev->degraded > conf->max_degraded; ++ if (test_bit(MD_BROKEN, &conf->mddev->flags)) ++ return true; + +- degraded = raid5_calc_degraded(conf); +- if (degraded > conf->max_degraded) +- return 1; +- return 0; ++ if (conf->mddev->reshape_position != MaxSector) ++ degraded = raid5_calc_degraded(conf); ++ ++ return degraded > conf->max_degraded; + } + + struct stripe_head * +@@ -2863,34 +2863,31 @@ static void raid5_error(struct mddev *md + unsigned long flags; + pr_debug("raid456: error called\n"); + ++ pr_crit("md/raid:%s: Disk failure on %s, disabling device.\n", ++ mdname(mddev), bdevname(rdev->bdev, b)); ++ + spin_lock_irqsave(&conf->device_lock, flags); ++ set_bit(Faulty, &rdev->flags); ++ clear_bit(In_sync, &rdev->flags); ++ mddev->degraded = raid5_calc_degraded(conf); + +- if (test_bit(In_sync, &rdev->flags) && +- mddev->degraded == conf->max_degraded) { +- /* +- * Don't allow to achieve failed state +- * Don't try to recover this device +- */ ++ if (has_failed(conf)) { ++ set_bit(MD_BROKEN, &conf->mddev->flags); + conf->recovery_disabled = mddev->recovery_disabled; +- spin_unlock_irqrestore(&conf->device_lock, flags); +- return; ++ ++ pr_crit("md/raid:%s: Cannot continue operation (%d/%d failed).\n", ++ mdname(mddev), mddev->degraded, conf->raid_disks); ++ } else { ++ pr_crit("md/raid:%s: Operation continuing on %d devices.\n", ++ mdname(mddev), conf->raid_disks - mddev->degraded); + } + +- set_bit(Faulty, &rdev->flags); +- clear_bit(In_sync, &rdev->flags); +- mddev->degraded = raid5_calc_degraded(conf); + spin_unlock_irqrestore(&conf->device_lock, flags); + set_bit(MD_RECOVERY_INTR, &mddev->recovery); + + set_bit(Blocked, &rdev->flags); + set_mask_bits(&mddev->sb_flags, 0, + BIT(MD_SB_CHANGE_DEVS) | BIT(MD_SB_CHANGE_PENDING)); +- pr_crit("md/raid:%s: Disk failure on %s, disabling device.\n" +- "md/raid:%s: Operation continuing on %d devices.\n", +- mdname(mddev), +- bdevname(rdev->bdev, b), +- mdname(mddev), +- conf->raid_disks - mddev->degraded); + r5c_update_on_rdev_error(mddev, rdev); + } + diff --git a/queue-5.18/series b/queue-5.18/series index 098415fa2e8..ea834605331 100644 --- a/queue-5.18/series +++ b/queue-5.18/series @@ -26,3 +26,21 @@ kvm-x86-fix-the-intel_pt-pmi-handling-wrongly-considered-from-guest.patch kvm-x86-drop-warns-that-assert-a-triple-fault-never-escapes-from-l2.patch kvm-x86-mmu-don-t-rebuild-page-when-the-page-is-synced-and-no-tlb-flushing-is-required.patch kvm-svm-use-kzalloc-for-sev-ioctl-interfaces-to-prevent-kernel-data-leak.patch +crypto-caam-fix-i.mx6sx-entropy-delay-value.patch +crypto-ecrdsa-fix-incorrect-use-of-vli_cmp.patch +crypto-qat-rework-the-vf2pf-interrupt-handling-logic.patch +zsmalloc-fix-races-between-asynchronous-zspage-free-and-page-migration.patch +tools-memory-model-readme-update-klitmus7-compat-table.patch +alsa-usb-audio-workaround-for-clock-setup-on-teac-devices.patch +alsa-usb-audio-add-missing-ep_idx-in-fixed-ep-quirks.patch +alsa-usb-audio-configure-sync-endpoints-before-data.patch +bluetooth-hci_qca-use-del_timer_sync-before-freeing.patch +arm-dts-s5pv210-correct-interrupt-name-for-bluetooth-in-aries.patch +dm-integrity-fix-error-code-in-dm_integrity_ctr.patch +dm-crypt-make-printing-of-the-key-constant-time.patch +dm-stats-add-cond_resched-when-looping-over-entries.patch +dm-verity-set-dm_target_immutable-feature-flag.patch +raid5-introduce-md_broken.patch +fs-ntfs3-validate-boot-sectors_per_clusters.patch +hid-multitouch-add-support-for-google-whiskers-touchpad.patch +hid-multitouch-add-quirks-to-enable-lenovo-x12-trackpoint.patch diff --git a/queue-5.18/tools-memory-model-readme-update-klitmus7-compat-table.patch b/queue-5.18/tools-memory-model-readme-update-klitmus7-compat-table.patch new file mode 100644 index 00000000000..5a9885f3d85 --- /dev/null +++ b/queue-5.18/tools-memory-model-readme-update-klitmus7-compat-table.patch @@ -0,0 +1,39 @@ +From 5b759db44195bb779828a188bad6b745c18dcd55 Mon Sep 17 00:00:00 2001 +From: Akira Yokosawa +Date: Mon, 2 May 2022 21:05:09 +0900 +Subject: tools/memory-model/README: Update klitmus7 compat table + +From: Akira Yokosawa + +commit 5b759db44195bb779828a188bad6b745c18dcd55 upstream. + +EXPORT_SYMBOL of do_exec() was removed in v5.17. Unfortunately, +kernel modules from klitmus7 7.56 have do_exec() at the end of +each kthread. + +herdtools7 7.56.1 has addressed the issue. + +Update the compatibility table accordingly. + +Signed-off-by: Akira Yokosawa +Cc: Luc Maranget +Cc: Jade Alglave +Cc: stable@vger.kernel.org # v5.17+ +Signed-off-by: Paul E. McKenney +Signed-off-by: Greg Kroah-Hartman +--- + tools/memory-model/README | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/tools/memory-model/README ++++ b/tools/memory-model/README +@@ -54,7 +54,8 @@ klitmus7 Compatibility Table + -- 4.14 7.48 -- + 4.15 -- 4.19 7.49 -- + 4.20 -- 5.5 7.54 -- +- 5.6 -- 7.56 -- ++ 5.6 -- 5.16 7.56 -- ++ 5.17 -- 7.56.1 -- + ============ ========== + + diff --git a/queue-5.18/zsmalloc-fix-races-between-asynchronous-zspage-free-and-page-migration.patch b/queue-5.18/zsmalloc-fix-races-between-asynchronous-zspage-free-and-page-migration.patch new file mode 100644 index 00000000000..af8354b44b0 --- /dev/null +++ b/queue-5.18/zsmalloc-fix-races-between-asynchronous-zspage-free-and-page-migration.patch @@ -0,0 +1,86 @@ +From 2505a981114dcb715f8977b8433f7540854851d8 Mon Sep 17 00:00:00 2001 +From: Sultan Alsawaf +Date: Fri, 13 May 2022 15:11:26 -0700 +Subject: zsmalloc: fix races between asynchronous zspage free and page migration + +From: Sultan Alsawaf + +commit 2505a981114dcb715f8977b8433f7540854851d8 upstream. + +The asynchronous zspage free worker tries to lock a zspage's entire page +list without defending against page migration. Since pages which haven't +yet been locked can concurrently migrate off the zspage page list while +lock_zspage() churns away, lock_zspage() can suffer from a few different +lethal races. + +It can lock a page which no longer belongs to the zspage and unsafely +dereference page_private(), it can unsafely dereference a torn pointer to +the next page (since there's a data race), and it can observe a spurious +NULL pointer to the next page and thus not lock all of the zspage's pages +(since a single page migration will reconstruct the entire page list, and +create_page_chain() unconditionally zeroes out each list pointer in the +process). + +Fix the races by using migrate_read_lock() in lock_zspage() to synchronize +with page migration. + +Link: https://lkml.kernel.org/r/20220509024703.243847-1-sultan@kerneltoast.com +Fixes: 77ff465799c602 ("zsmalloc: zs_page_migrate: skip unnecessary loops but not return -EBUSY if zspage is not inuse") +Signed-off-by: Sultan Alsawaf +Acked-by: Minchan Kim +Cc: Nitin Gupta +Cc: Sergey Senozhatsky +Cc: +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman +--- + mm/zsmalloc.c | 37 +++++++++++++++++++++++++++++++++---- + 1 file changed, 33 insertions(+), 4 deletions(-) + +--- a/mm/zsmalloc.c ++++ b/mm/zsmalloc.c +@@ -1718,11 +1718,40 @@ static enum fullness_group putback_zspag + */ + static void lock_zspage(struct zspage *zspage) + { +- struct page *page = get_first_page(zspage); ++ struct page *curr_page, *page; + +- do { +- lock_page(page); +- } while ((page = get_next_page(page)) != NULL); ++ /* ++ * Pages we haven't locked yet can be migrated off the list while we're ++ * trying to lock them, so we need to be careful and only attempt to ++ * lock each page under migrate_read_lock(). Otherwise, the page we lock ++ * may no longer belong to the zspage. This means that we may wait for ++ * the wrong page to unlock, so we must take a reference to the page ++ * prior to waiting for it to unlock outside migrate_read_lock(). ++ */ ++ while (1) { ++ migrate_read_lock(zspage); ++ page = get_first_page(zspage); ++ if (trylock_page(page)) ++ break; ++ get_page(page); ++ migrate_read_unlock(zspage); ++ wait_on_page_locked(page); ++ put_page(page); ++ } ++ ++ curr_page = page; ++ while ((page = get_next_page(curr_page))) { ++ if (trylock_page(page)) { ++ curr_page = page; ++ } else { ++ get_page(page); ++ migrate_read_unlock(zspage); ++ wait_on_page_locked(page); ++ put_page(page); ++ migrate_read_lock(zspage); ++ } ++ } ++ migrate_read_unlock(zspage); + } + + static int zs_init_fs_context(struct fs_context *fc)