Patch "arm64/signal: Restore TPIDR2 register rather than memory state" has been added to the 6.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    arm64/signal: Restore TPIDR2 register rather than memory state

to the 6.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     arm64-signal-restore-tpidr2-register-rather-than-memory-state.patch
and it can be found in the queue-6.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 616cb2f4b141852cac3dfffe8354c8bf19e9999d Mon Sep 17 00:00:00 2001
From: Mark Brown <broonie@xxxxxxxxxx>
Date: Thu, 22 Jun 2023 14:39:45 +0100
Subject: arm64/signal: Restore TPIDR2 register rather than memory state

From: Mark Brown <broonie@xxxxxxxxxx>

commit 616cb2f4b141852cac3dfffe8354c8bf19e9999d upstream.

Currently when restoring the TPIDR2 signal context we set the new value
from the signal frame in the thread data structure but not the register,
following the pattern for the rest of the data we are restoring. This does
not work in the case of TPIDR2, the register always has the value for the
current task. This means that either we return to userspace and ignore the
new value or we context switch and save the register value on top of the
newly restored value.

Load the value from the signal context into the register instead.

Fixes: 39e54499280f ("arm64/signal: Include TPIDR2 in the signal context")
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx> # 6.3.x
Link: https://lore.kernel.org/r/20230621-arm64-fix-tpidr2-signal-restore-v2-1-c8e8fcc10302@xxxxxxxxxx
Signed-off-by: Catalin Marinas <catalin.marinas@xxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 arch/arm64/kernel/signal.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/arm64/kernel/signal.c
+++ b/arch/arm64/kernel/signal.c
@@ -398,7 +398,7 @@ static int restore_tpidr2_context(struct
 
 	__get_user_error(tpidr2_el0, &user->tpidr2->tpidr2, err);
 	if (!err)
-		current->thread.tpidr2_el0 = tpidr2_el0;
+		write_sysreg_s(tpidr2_el0, SYS_TPIDR2_EL0);
 
 	return err;
 }


Patches currently in stable-queue which might be from broonie@xxxxxxxxxx are

queue-6.4/asoc-es8316-do-not-set-rate-constraints-for-unsuppor.patch
queue-6.4/soc-qcom-geni-se-add-interfaces-geni_se_tx_init_dma-.patch
queue-6.4/asoc-intel-sof_sdw-start-set-codec-init-function-wit.patch
queue-6.4/spi-spi-geni-qcom-enable-spi_controller_must_tx-for-.patch
queue-6.4/spi-spi-geni-qcom-do-not-do-dma-map-unmap-inside-dri.patch
queue-6.4/regulator-rk808-fix-asynchronous-probing.patch
queue-6.4/spi-bcm-qspi-return-error-if-neither-hif_mspi-nor-ms.patch
queue-6.4/asoc-es8316-increment-max-value-for-alc-capture-targ.patch
queue-6.4/asoc-imx-audmix-check-return-value-of-devm_kasprintf.patch
queue-6.4/selftests-ftace-fix-ktap-output-ordering.patch
queue-6.4/media-cec-i2c-ch7322-also-select-regmap.patch
queue-6.4/asoc-amd-acp-clear-pdm-dma-interrupt-mask.patch
queue-6.4/spi-spi-geni-qcom-correct-cs_toggle-bit-in-spi_trans.patch
queue-6.4/regulator-core-streamline-debugfs-operations.patch
queue-6.4/spi-dw-round-of-n_bytes-to-power-of-2.patch
queue-6.4/asoc-intel-sof_sdw-remove-sof_sdw_tgl_hdmi-for-meteo.patch
queue-6.4/regulator-core-fix-more-error-checking-for-debugfs_c.patch
queue-6.4/asoc-dt-bindings-mediatek-mt8188-afe-correct-clock-n.patch
queue-6.4/arm64-sme-use-str-p-to-clear-ffr-context-field-in-st.patch
queue-6.4/arm64-signal-restore-tpidr2-register-rather-than-memory-state.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux