# git rev-parse -q --verify c12ab8dbc492b992e1ea717db933cee568780c47^{commit} c12ab8dbc492b992e1ea717db933cee568780c47 already have revision, skipping fetch # git checkout -q -f -B kisskb c12ab8dbc492b992e1ea717db933cee568780c47 # git clean -qxdf # < git log -1 # commit c12ab8dbc492b992e1ea717db933cee568780c47 # Author: Christophe Leroy # Date: Fri Oct 29 17:10:45 2021 +0200 # # powerpc/8xx: Fix Oops with STRICT_KERNEL_RWX without DEBUG_RODATA_TEST # # Until now, all tests involving CONFIG_STRICT_KERNEL_RWX were done with # DEBUG_RODATA_TEST to check the result. But now that # CONFIG_STRICT_KERNEL_RWX is selected by default, it came without # CONFIG_DEBUG_RODATA_TEST and led to the following Oops # # [ 6.830908] Freeing unused kernel image (initmem) memory: 352K # [ 6.840077] BUG: Unable to handle kernel data access on write at 0xc1285200 # [ 6.846836] Faulting instruction address: 0xc0004b6c # [ 6.851745] Oops: Kernel access of bad area, sig: 11 [#1] # [ 6.857075] BE PAGE_SIZE=16K PREEMPT CMPC885 # [ 6.861348] SAF3000 DIE NOTIFICATION # [ 6.864830] CPU: 0 PID: 1 Comm: swapper Not tainted 5.15.0-rc5-s3k-dev-02255-g2747d7b7916f #451 # [ 6.873429] NIP: c0004b6c LR: c0004b60 CTR: 00000000 # [ 6.878419] REGS: c902be60 TRAP: 0300 Not tainted (5.15.0-rc5-s3k-dev-02255-g2747d7b7916f) # [ 6.886852] MSR: 00009032 CR: 53000335 XER: 8000ff40 # [ 6.893564] DAR: c1285200 DSISR: 82000000 # [ 6.893564] GPR00: 0c000000 c902bf20 c20f4000 08000000 00000001 04001f00 c1800000 00000035 # [ 6.893564] GPR08: ff0001ff c1280000 00000002 c0004b60 00001000 00000000 c0004b1c 00000000 # [ 6.893564] GPR16: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 # [ 6.893564] GPR24: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 c1060000 # [ 6.932034] NIP [c0004b6c] kernel_init+0x50/0x138 # [ 6.936682] LR [c0004b60] kernel_init+0x44/0x138 # [ 6.941245] Call Trace: # [ 6.943653] [c902bf20] [c0004b60] kernel_init+0x44/0x138 (unreliable) # [ 6.950022] [c902bf30] [c001122c] ret_from_kernel_thread+0x5c/0x64 # [ 6.956135] Instruction dump: # [ 6.959060] 48ffc521 48045469 4800d8cd 3d20c086 89295fa0 2c090000 41820058 480796c9 # [ 6.966890] 4800e48d 3d20c128 39400002 3fe0c106 <91495200> 3bff8000 4806fa1d 481f7d75 # [ 6.974902] ---[ end trace 1e397bacba4aa610 ]--- # # 0xc1285200 corresponds to 'system_state' global var that the kernel is trying to set to # SYSTEM_RUNNING. This var is above the RO/RW limit so it shouldn't Oops. # # It oopses because the dirty bit is missing. # # Signed-off-by: Christophe Leroy # Signed-off-by: Michael Ellerman # Link: https://lore.kernel.org/r/3d5800b0bbcd7b19761b98f50421358667b45331.1635520232.git.christophe.leroy@csgroup.eu # < /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 c12ab8dbc492b992e1ea717db933cee568780c47 # < make -s -j 24 ARCH=powerpc O=/kisskb/build/powerpc-next_ppc64le_defconfig_powerpc-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- ppc64le_defconfig # < make -s -j 24 ARCH=powerpc O=/kisskb/build/powerpc-next_ppc64le_defconfig_powerpc-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 24 ARCH=powerpc O=/kisskb/build/powerpc-next_ppc64le_defconfig_powerpc-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig # make -s -j 24 ARCH=powerpc O=/kisskb/build/powerpc-next_ppc64le_defconfig_powerpc-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- Completed OK # rm -rf /kisskb/build/powerpc-next_ppc64le_defconfig_powerpc-gcc11 # Build took: 0:04:03.770940