kernel: bump 6.1 to 6.1.64
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.64 Removed upstreamed: ixp4xx/patches-6.1/0001-mtd-cfi_cmdset_0001-Byte-swap-OTP-info.patch[1] mvebu/patches-6.1/106-Revert-i2c-pxa-move-to-generic-GPIO-recovery.patch[2] qualcommax/patches-6.1/0026-v6.7-clk-qcom-ipq8074-drop-the-CLK_SET_RATE_PARENT-flag-f.patch[3] Manually rebased: bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.64&id=3b93096d29c5b9ca2af94be4ee9949c1767acf17 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.64&id=b3fd9db79e30d5eb5f76ef1f5b7e4f444af574ea 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.64&id=877080a3490102da26b8d969588159b2385f739e Build system: x86/64 Build-tested: x86/64/AMD Cezanne Run-tested: x86/64/AMD Cezanne Signed-off-by: John Audia <therealgraysky@proton.me>
This commit is contained in:
committed by
Hauke Mehrtens
parent
507ad4f078
commit
c20bedf1f5
@@ -1,74 +0,0 @@
|
||||
From 4e242d6e08ad1d85b832e158cd0eafcb8f3f76a1 Mon Sep 17 00:00:00 2001
|
||||
From: Linus Walleij <linus.walleij@linaro.org>
|
||||
Date: Tue, 30 May 2023 22:40:31 +0200
|
||||
Subject: [PATCH v3] mtd: cfi_cmdset_0001: Byte swap OTP info
|
||||
|
||||
Currently the offset into the device when looking for OTP
|
||||
bits can go outside of the address of the MTD NOR devices,
|
||||
and if that memory isn't readable, bad things happen
|
||||
on the IXP4xx (added prints that illustrate the problem before
|
||||
the crash):
|
||||
|
||||
cfi_intelext_otp_walk walk OTP on chip 0 start at reg_prot_offset 0x00000100
|
||||
ixp4xx_copy_from copy from 0x00000100 to 0xc880dd78
|
||||
cfi_intelext_otp_walk walk OTP on chip 0 start at reg_prot_offset 0x12000000
|
||||
ixp4xx_copy_from copy from 0x12000000 to 0xc880dd78
|
||||
8<--- cut here ---
|
||||
Unable to handle kernel paging request at virtual address db000000
|
||||
[db000000] *pgd=00000000
|
||||
(...)
|
||||
|
||||
This happens in this case because the IXP4xx is big endian and
|
||||
the 32- and 16-bit fields in the struct cfi_intelext_otpinfo are not
|
||||
properly byteswapped. Compare to how the code in read_pri_intelext()
|
||||
byteswaps the fields in struct cfi_pri_intelext.
|
||||
|
||||
Adding a small byte swapping loop for the OTP in read_pri_intelext()
|
||||
and the crash goes away.
|
||||
|
||||
The problem went unnoticed for many years until I enabled
|
||||
CONFIG_MTD_OTP on the IXP4xx as well, triggering the bug.
|
||||
|
||||
Cc: Nicolas Pitre <npitre@baylibre.com>
|
||||
Cc: stable@vger.kernel.org
|
||||
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
|
||||
---
|
||||
ChangeLog v2->v3:
|
||||
- Move the byte swapping to a small loop in read_pri_intelext()
|
||||
so all bytes are swapped as we reach cfi_intelext_otp_walk().
|
||||
ChangeLog v1->v2:
|
||||
- Drill deeper and discover a big endian compatibility issue.
|
||||
---
|
||||
drivers/mtd/chips/cfi_cmdset_0001.c | 20 ++++++++++++++++++--
|
||||
1 file changed, 18 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
|
||||
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
|
||||
@@ -421,9 +421,25 @@ read_pri_intelext(struct map_info *map,
|
||||
extra_size = 0;
|
||||
|
||||
/* Protection Register info */
|
||||
- if (extp->NumProtectionFields)
|
||||
+ if (extp->NumProtectionFields) {
|
||||
+ struct cfi_intelext_otpinfo *otp =
|
||||
+ (struct cfi_intelext_otpinfo *)&extp->extra[0];
|
||||
+
|
||||
extra_size += (extp->NumProtectionFields - 1) *
|
||||
- sizeof(struct cfi_intelext_otpinfo);
|
||||
+ sizeof(struct cfi_intelext_otpinfo);
|
||||
+
|
||||
+ if (extp_size >= sizeof(*extp) + extra_size) {
|
||||
+ int i;
|
||||
+
|
||||
+ /* Do some byteswapping if necessary */
|
||||
+ for (i = 0; i < extp->NumProtectionFields - 1; i++) {
|
||||
+ otp->ProtRegAddr = le32_to_cpu(otp->ProtRegAddr);
|
||||
+ otp->FactGroups = le16_to_cpu(otp->FactGroups);
|
||||
+ otp->UserGroups = le16_to_cpu(otp->UserGroups);
|
||||
+ otp++;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
if (extp->MinorVersion >= '1') {
|
||||
Reference in New Issue
Block a user