# git rev-parse -q --verify 4ff753feab021242144818b9a3ba011238218145^{commit} 4ff753feab021242144818b9a3ba011238218145 already have revision, skipping fetch # git checkout -q -f -B kisskb 4ff753feab021242144818b9a3ba011238218145 # git clean -qxdf # < git log -1 # commit 4ff753feab021242144818b9a3ba011238218145 # Author: Ganesh Goudar # Date: Fri Jul 24 12:09:46 2020 +0530 # # powerpc/pseries: Avoid using addr_to_pfn in real mode # # When an UE or memory error exception is encountered the MCE handler # tries to find the pfn using addr_to_pfn() which takes effective # address as an argument, later pfn is used to poison the page where # memory error occurred, recent rework in this area made addr_to_pfn # to run in real mode, which can be fatal as it may try to access # memory outside RMO region. # # Have two helper functions to separate things to be done in real mode # and virtual mode without changing any functionality. This also fixes # the following error as the use of addr_to_pfn is now moved to virtual # mode. # # Without this change following kernel crash is seen on hitting UE. # # [ 485.128036] Oops: Kernel access of bad area, sig: 11 [#1] # [ 485.128040] LE SMP NR_CPUS=2048 NUMA pSeries # [ 485.128047] Modules linked in: # [ 485.128067] CPU: 15 PID: 6536 Comm: insmod Kdump: loaded Tainted: G OE 5.7.0 #22 # [ 485.128074] NIP: c00000000009b24c LR: c0000000000398d8 CTR: c000000000cd57c0 # [ 485.128078] REGS: c000000003f1f970 TRAP: 0300 Tainted: G OE (5.7.0) # [ 485.128082] MSR: 8000000000001003 CR: 28008284 XER: 00000001 # [ 485.128088] CFAR: c00000000009b190 DAR: c0000001fab00000 DSISR: 40000000 IRQMASK: 1 # [ 485.128088] GPR00: 0000000000000001 c000000003f1fbf0 c000000001634300 0000b0fa01000000 # [ 485.128088] GPR04: d000000002220000 0000000000000000 00000000fab00000 0000000000000022 # [ 485.128088] GPR08: c0000001fab00000 0000000000000000 c0000001fab00000 c000000003f1fc14 # [ 485.128088] GPR12: 0000000000000008 c000000003ff5880 d000000002100008 0000000000000000 # [ 485.128088] GPR16: 000000000000ff20 000000000000fff1 000000000000fff2 d0000000021a1100 # [ 485.128088] GPR20: d000000002200000 c00000015c893c50 c000000000d49b28 c00000015c893c50 # [ 485.128088] GPR24: d0000000021a0d08 c0000000014e5da8 d0000000021a0818 000000000000000a # [ 485.128088] GPR28: 0000000000000008 000000000000000a c0000000017e2970 000000000000000a # [ 485.128125] NIP [c00000000009b24c] __find_linux_pte+0x11c/0x310 # [ 485.128130] LR [c0000000000398d8] addr_to_pfn+0x138/0x170 # [ 485.128133] Call Trace: # [ 485.128135] Instruction dump: # [ 485.128138] 3929ffff 7d4a3378 7c883c36 7d2907b4 794a1564 7d294038 794af082 3900ffff # [ 485.128144] 79291f24 790af00e 78e70020 7d095214 <7c69502a> 2fa30000 419e011c 70690040 # [ 485.128152] ---[ end trace d34b27e29ae0e340 ]--- # # Fixes: 9ca766f9891d ("powerpc/64s/pseries: machine check convert to use common event code") # Signed-off-by: Ganesh Goudar # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/20200724063946.21378-1-ganeshgr@linux.ibm.com # < /opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux-gcc --version # < /opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux-ld --version # < git log --format=%s --max-count=1 4ff753feab021242144818b9a3ba011238218145 # < make -s -j 80 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- defconfig # < make -s -j 80 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- help # make -s -j 80 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- olddefconfig # make -s -j 80 ARCH=mips O=/kisskb/build/powerpc-fixes_mips-defconfig_mipsel CROSS_COMPILE=/opt/cross/kisskb/br-mipsel-o32-full-2016.08-613-ge98b4dd/bin/mipsel-linux- FIT description: Linux 5.9.0-rc2-g4ff753feab02 Created: Fri Oct 23 20:11:26 2020 Image 0 (kernel@0) Description: Linux 5.9.0-rc2-g4ff753feab02 Created: Fri Oct 23 20:11:26 2020 Type: Kernel Image Compression: gzip compressed Data Size: 5076706 Bytes = 4957.72 KiB = 4.84 MiB Architecture: MIPS OS: Linux Load Address: 0x80100000 Entry Point: 0x80955b00 Hash algo: sha1 Hash value: 16b1fe6c9b0c07e73f84adbae96519c9544c1c3a Image 1 (fdt@boston) Description: img,boston Device Tree Created: Fri Oct 23 20:11:26 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 3793 Bytes = 3.70 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 4799f50d688573234da6e9d7701234d394759ef4 Image 2 (fdt@ni169445) Description: NI 169445 device tree Created: Fri Oct 23 20:11:26 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 1871 Bytes = 1.83 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 51b89b31605ee62038c8468c429af091dfc75ec7 Image 3 (fdt@ocelot_pcb123) Description: MSCC Ocelot PCB123 Device Tree Created: Fri Oct 23 20:11:26 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 4639 Bytes = 4.53 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: be2724f58b66c316a61da7c11ced633f4e7e86c7 Image 4 (fdt@ocelot_pcb120) Description: MSCC Ocelot PCB120 Device Tree Created: Fri Oct 23 20:11:26 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 5398 Bytes = 5.27 KiB = 0.01 MiB Architecture: MIPS Hash algo: sha1 Hash value: 2a757b83ef9e9d35fb6c43bdbde70d311b3e4555 Image 5 (fdt@xilfpga) Description: MIPSfpga (xilfpga) Device Tree Created: Fri Oct 23 20:11:26 2020 Type: Flat Device Tree Compression: uncompressed Data Size: 2708 Bytes = 2.64 KiB = 0.00 MiB Architecture: MIPS Hash algo: sha1 Hash value: 63d058b780f65e22da30f0a183433765f1807f1d Default Configuration: 'conf@default' Configuration 0 (conf@default) Description: Generic Linux kernel Kernel: kernel@0 Configuration 1 (conf@boston) Description: Boston Linux kernel Kernel: kernel@0 FDT: fdt@boston Configuration 2 (conf@ni169445) Description: NI 169445 Linux Kernel Kernel: kernel@0 FDT: fdt@ni169445 Configuration 3 (conf@ocelot_pcb123) Description: Ocelot Linux kernel Kernel: kernel@0 FDT: fdt@ocelot_pcb123 Configuration 4 (conf@ocelot_pcb120) Description: Ocelot Linux kernel Kernel: kernel@0 FDT: fdt@ocelot_pcb120 Configuration 5 (conf@xilfpga) Description: MIPSfpga Linux kernel Kernel: kernel@0 FDT: fdt@xilfpga Completed OK # rm -rf /kisskb/build/powerpc-fixes_mips-defconfig_mipsel # Build took: 0:01:56.279875