summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@gmail.com>2023-12-21 09:25:08 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-23 08:46:00 +0000
commit1f246f28d7b2b37e8f35b3291c641fb1418f8cd5 (patch)
tree44aff479f79bc46310fc1b3aa5d7196c8f4327b7 /meta/recipes-kernel/linux
parentb9c8befbb895daabb9fbd6da9e792390f21fb660 (diff)
downloadpoky-1f246f28d7b2b37e8f35b3291c641fb1418f8cd5.tar.gz
linux-yocto/6.5: fix AB-INT: QEMU kernel panic: No irq handler for vector
Integrating the following commit(s) to linux-yocto/6.5: 1/2 [ Author: Thomas Gleixner Email: tglx@linutronix.de Subject: x86/alternatives: Sync core before enabling interrupts Date: Thu, 7 Dec 2023 20:49:24 +0100 text_poke_early() does: local_irq_save(flags); memcpy(addr, opcode, len); local_irq_restore(flags); sync_core(); That's not really correct because the synchronization should happen before interrupts are reenabled to ensure that a pending interrupt observes the complete update of the opcodes. It's not entirely clear whether the interrupt entry provides enough serialization already, but moving the sync_core() invocation into interrupt disabled region does no harm and is obviously correct. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> ] 2/2 [ Author: Thomas Gleixner Email: tglx@linutronix.de Subject: x86/alternatives: Disable interrupts and sync when optimizing NOPs in place Date: Thu, 7 Dec 2023 20:49:26 +0100 apply_alternatives() treats alternatives with the ALT_FLAG_NOT flag set special as it optimizes the existing NOPs in place. Unfortunately this happens with interrupts enabled and does not provide any form of core synchronization. So an interrupt hitting in the middle of the update and using the affected code path will observe a half updated NOP and crash and burn. The following 3 NOP sequence was observed to expose this crash halfways reliably under QEMU 32bit: 0x90 0x90 0x90 which is replaced by the optimized 3 byte NOP: 0x8d 0x76 0x00 So an interrupt can observe: 1) 0x90 0x90 0x90 nop nop nop 2) 0x8d 0x90 0x90 undefined 3) 0x8d 0x76 0x90 lea -0x70(%esi),%esi 4) 0x8d 0x76 0x00 lea 0x0(%esi),%esi Where only #1 and #4 are true NOPs. The same problem exists for 64bit obviously. Disable interrupts around this NOP optimization and invoke sync_core() before reenabling them. Fixes: 270a69c4485d ("x86/alternative: Support relocations in alternatives") Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> ] (From OE-Core rev: 1c8d29ab6b02c5b783429db3b67583deb1637142) Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/linux')
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-rt_6.5.bb2
-rw-r--r--meta/recipes-kernel/linux/linux-yocto-tiny_6.5.bb2
-rw-r--r--meta/recipes-kernel/linux/linux-yocto_6.5.bb22
3 files changed, 13 insertions, 13 deletions
diff --git a/meta/recipes-kernel/linux/linux-yocto-rt_6.5.bb b/meta/recipes-kernel/linux/linux-yocto-rt_6.5.bb
index fccf0252d0..0120b9ba63 100644
--- a/meta/recipes-kernel/linux/linux-yocto-rt_6.5.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-rt_6.5.bb
@@ -14,7 +14,7 @@ python () {
14 raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it") 14 raise bb.parse.SkipRecipe("Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it")
15} 15}
16 16
17SRCREV_machine ?= "1d89cd73350cad73ecf330ad3785e6d8bdec092d" 17SRCREV_machine ?= "3ad8578bcc3186cde9b35de8c56afc0cba68bc55"
18SRCREV_meta ?= "3b1f87ec237ec3ad9acffb3d75c55efe958085dc" 18SRCREV_meta ?= "3b1f87ec237ec3ad9acffb3d75c55efe958085dc"
19 19
20SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine;protocol=https \ 20SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;branch=${KBRANCH};name=machine;protocol=https \
diff --git a/meta/recipes-kernel/linux/linux-yocto-tiny_6.5.bb b/meta/recipes-kernel/linux/linux-yocto-tiny_6.5.bb
index b63d5ad893..cc24e3d346 100644
--- a/meta/recipes-kernel/linux/linux-yocto-tiny_6.5.bb
+++ b/meta/recipes-kernel/linux/linux-yocto-tiny_6.5.bb
@@ -17,7 +17,7 @@ DEPENDS += "openssl-native util-linux-native"
17KMETA = "kernel-meta" 17KMETA = "kernel-meta"
18KCONF_BSP_AUDIT_LEVEL = "2" 18KCONF_BSP_AUDIT_LEVEL = "2"
19 19
20SRCREV_machine ?= "95753fe2a7d507646224fe973e2a4fc48cb7694d" 20SRCREV_machine ?= "fc3138c70652b48a0bf3620fd7aa861fa1f14e27"
21SRCREV_meta ?= "3b1f87ec237ec3ad9acffb3d75c55efe958085dc" 21SRCREV_meta ?= "3b1f87ec237ec3ad9acffb3d75c55efe958085dc"
22 22
23PV = "${LINUX_VERSION}+git" 23PV = "${LINUX_VERSION}+git"
diff --git a/meta/recipes-kernel/linux/linux-yocto_6.5.bb b/meta/recipes-kernel/linux/linux-yocto_6.5.bb
index 984940d24c..e7abc9784a 100644
--- a/meta/recipes-kernel/linux/linux-yocto_6.5.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_6.5.bb
@@ -18,17 +18,17 @@ KBRANCH:qemux86-64 ?= "v6.5/standard/base"
18KBRANCH:qemuloongarch64 ?= "v6.5/standard/base" 18KBRANCH:qemuloongarch64 ?= "v6.5/standard/base"
19KBRANCH:qemumips64 ?= "v6.5/standard/mti-malta64" 19KBRANCH:qemumips64 ?= "v6.5/standard/mti-malta64"
20 20
21SRCREV_machine:qemuarm ?= "3fdf15eaa1db1b6fd1de804d03c6b4a10c2c3f4b" 21SRCREV_machine:qemuarm ?= "07ca2c1cc013343f9a47b5ac4f37ed60f66fd73b"
22SRCREV_machine:qemuarm64 ?= "70210986a1c554098fb6f75f6cd10ab85171506a" 22SRCREV_machine:qemuarm64 ?= "7af45f35fdcc82bbff07fa3d031620d5f5728b6b"
23SRCREV_machine:qemuloongarch64 ?= "7fe59b2e3f40a94ce4477854264e219aeb972990" 23SRCREV_machine:qemuloongarch64 ?= "e53dc7514de7d2fbe0f80547a50c0542928e2d11"
24SRCREV_machine:qemumips ?= "338cee0966e9ea856a696df0a9f5432f74b06270" 24SRCREV_machine:qemumips ?= "e0b08aab2ccc4257f0b34e7dcb1e054ea188a43d"
25SRCREV_machine:qemuppc ?= "2fbe7b92bda7afe7aca6e58b0ac124f2a26737ee" 25SRCREV_machine:qemuppc ?= "9e609ca17604c708fdc6e7e5c9355bb2c5b73bcd"
26SRCREV_machine:qemuriscv64 ?= "7fe59b2e3f40a94ce4477854264e219aeb972990" 26SRCREV_machine:qemuriscv64 ?= "e53dc7514de7d2fbe0f80547a50c0542928e2d11"
27SRCREV_machine:qemuriscv32 ?= "7fe59b2e3f40a94ce4477854264e219aeb972990" 27SRCREV_machine:qemuriscv32 ?= "e53dc7514de7d2fbe0f80547a50c0542928e2d11"
28SRCREV_machine:qemux86 ?= "7fe59b2e3f40a94ce4477854264e219aeb972990" 28SRCREV_machine:qemux86 ?= "e53dc7514de7d2fbe0f80547a50c0542928e2d11"
29SRCREV_machine:qemux86-64 ?= "7fe59b2e3f40a94ce4477854264e219aeb972990" 29SRCREV_machine:qemux86-64 ?= "e53dc7514de7d2fbe0f80547a50c0542928e2d11"
30SRCREV_machine:qemumips64 ?= "ff5efc72e961cf345f935ac14cdcaa9843ec5b23" 30SRCREV_machine:qemumips64 ?= "58ffd9a4a907262daaedd9aca1e95e65d9716de3"
31SRCREV_machine ?= "7fe59b2e3f40a94ce4477854264e219aeb972990" 31SRCREV_machine ?= "e53dc7514de7d2fbe0f80547a50c0542928e2d11"
32SRCREV_meta ?= "3b1f87ec237ec3ad9acffb3d75c55efe958085dc" 32SRCREV_meta ?= "3b1f87ec237ec3ad9acffb3d75c55efe958085dc"
33 33
34# set your preferred provider of linux-yocto to 'linux-yocto-upstream', and you'll 34# set your preferred provider of linux-yocto to 'linux-yocto-upstream', and you'll