Buildresult: powerpc-next/mpc85xx_defconfig+KVM/powerpc-gcc12 built on Jun 20 2023, 11:23
kisskb
Revisions
|
Branches
|
Compilers
|
Configs
|
Build Results
|
Build Failures
|
Status:
OK
Date/Time:
Jun 20 2023, 11:23
Duration:
0:03:10.860909
Builder:
alpine2
Revision:
powerpc: update ppc_save_regs to save current r1 in pt_regs (
b684c09f09e7a6af3794d4233ef785819e72db79)
Target:
powerpc-next/mpc85xx_defconfig+KVM/powerpc-gcc12
Branch:
powerpc-next
Compiler:
powerpc-gcc12
(powerpc64-linux-gcc (GCC) 12.2.0 / GNU ld (GNU Binutils) 2.39)
Config:
mpc85xx_defconfig+KVM
(
download
)
Log:
Download original
Possible warnings (7)
.config:4498:warning: override: reassigning to symbol PPC_E500MC .config:4499:warning: override: reassigning to symbol VIRTUALIZATION include/linux/err.h:22:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] arch/powerpc/boot/dts/fsl/mpc8555cds.dts:341.15-350.5: Warning (pci_device_reg): /pci@e0008000/i8259@19000: PCI unit address format error, expected "12,0" arch/powerpc/boot/dts/fsl/mpc8555cds.dts:330.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) arch/powerpc/boot/dts/fsl/mpc8541cds.dts:341.15-350.5: Warning (pci_device_reg): /pci@e0008000/i8259@19000: PCI unit address format error, expected "12,0" arch/powerpc/boot/dts/fsl/mpc8541cds.dts:330.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0)
Full Log
# git rev-parse -q --verify b684c09f09e7a6af3794d4233ef785819e72db79^{commit} b684c09f09e7a6af3794d4233ef785819e72db79 already have revision, skipping fetch # git checkout -q -f -B kisskb b684c09f09e7a6af3794d4233ef785819e72db79 # git clean -qxdf # < git log -1 # commit b684c09f09e7a6af3794d4233ef785819e72db79 # Author: Aditya Gupta <adityag@linux.ibm.com> # Date: Thu Jun 15 14:40:47 2023 +0530 # # powerpc: update ppc_save_regs to save current r1 in pt_regs # # ppc_save_regs() skips one stack frame while saving the CPU register states. # Instead of saving current R1, it pulls the previous stack frame pointer. # # When vmcores caused by direct panic call (such as `echo c > # /proc/sysrq-trigger`), are debugged with gdb, gdb fails to show the # backtrace correctly. On further analysis, it was found that it was because # of mismatch between r1 and NIP. # # GDB uses NIP to get current function symbol and uses corresponding debug # info of that function to unwind previous frames, but due to the # mismatching r1 and NIP, the unwinding does not work, and it fails to # unwind to the 2nd frame and hence does not show the backtrace. # # GDB backtrace with vmcore of kernel without this patch: # # --------- # (gdb) bt # #0 0xc0000000002a53e8 in crash_setup_regs (oldregs=<optimized out>, # newregs=0xc000000004f8f8d8) at ./arch/powerpc/include/asm/kexec.h:69 # #1 __crash_kexec (regs=<optimized out>) at kernel/kexec_core.c:974 # #2 0x0000000000000063 in ?? () # #3 0xc000000003579320 in ?? () # --------- # # Further analysis revealed that the mismatch occurred because # "ppc_save_regs" was saving the previous stack's SP instead of the current # r1. This patch fixes this by storing current r1 in the saved pt_regs. # # GDB backtrace with vmcore of patched kernel: # # -------- # (gdb) bt # #0 0xc0000000002a53e8 in crash_setup_regs (oldregs=0x0, newregs=0xc00000000670b8d8) # at ./arch/powerpc/include/asm/kexec.h:69 # #1 __crash_kexec (regs=regs@entry=0x0) at kernel/kexec_core.c:974 # #2 0xc000000000168918 in panic (fmt=fmt@entry=0xc000000001654a60 "sysrq triggered crash\n") # at kernel/panic.c:358 # #3 0xc000000000b735f8 in sysrq_handle_crash (key=<optimized out>) at drivers/tty/sysrq.c:155 # #4 0xc000000000b742cc in __handle_sysrq (key=key@entry=99, check_mask=check_mask@entry=false) # at drivers/tty/sysrq.c:602 # #5 0xc000000000b7506c in write_sysrq_trigger (file=<optimized out>, buf=<optimized out>, # count=2, ppos=<optimized out>) at drivers/tty/sysrq.c:1163 # #6 0xc00000000069a7bc in pde_write (ppos=<optimized out>, count=<optimized out>, # buf=<optimized out>, file=<optimized out>, pde=0xc00000000362cb40) at fs/proc/inode.c:340 # #7 proc_reg_write (file=<optimized out>, buf=<optimized out>, count=<optimized out>, # ppos=<optimized out>) at fs/proc/inode.c:352 # #8 0xc0000000005b3bbc in vfs_write (file=file@entry=0xc000000006aa6b00, # buf=buf@entry=0x61f498b4f60 <error: Cannot access memory at address 0x61f498b4f60>, # count=count@entry=2, pos=pos@entry=0xc00000000670bda0) at fs/read_write.c:582 # #9 0xc0000000005b4264 in ksys_write (fd=<optimized out>, # buf=0x61f498b4f60 <error: Cannot access memory at address 0x61f498b4f60>, count=2) # at fs/read_write.c:637 # #10 0xc00000000002ea2c in system_call_exception (regs=0xc00000000670be80, r0=<optimized out>) # at arch/powerpc/kernel/syscall.c:171 # #11 0xc00000000000c270 in system_call_vectored_common () # at arch/powerpc/kernel/interrupt_64.S:192 # -------- # # Nick adds: # So this now saves regs as though it was an interrupt taken in the # caller, at the instruction after the call to ppc_save_regs, whereas # previously the NIP was there, but R1 came from the caller's caller and # that mismatch is what causes gdb's dwarf unwinder to go haywire. # # Signed-off-by: Aditya Gupta <adityag@linux.ibm.com> # Fixes: d16a58f8854b1 ("powerpc: Improve ppc_save_regs()") # Reivewed-by: Nicholas Piggin <npiggin@gmail.com> # Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> # Link: https://msgid.link/20230615091047.90433-1-adityag@linux.ibm.com # < /opt/cross/kisskb/korg/gcc-12.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc --version # < /opt/cross/kisskb/korg/gcc-12.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux-ld --version # < git log --format=%s --max-count=1 b684c09f09e7a6af3794d4233ef785819e72db79 # make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_defconfig+KVM_powerpc-gcc12 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-12.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- mpc85xx_defconfig Using /kisskb/src/arch/powerpc/configs/mpc85xx_base.config as base Merging /kisskb/src/arch/powerpc/configs/85xx-32bit.config Merging /kisskb/src/arch/powerpc/configs/85xx-hw.config Merging /kisskb/src/arch/powerpc/configs/fsl-emb-nonhw.config # # merged configuration written to .config (needs make) # # Added to kconfig CONFIG_PPC_E500MC=y # Added to kconfig CONFIG_VIRTUALIZATION=y # Added to kconfig CONFIG_KVM_E500MC=y # Added to kconfig # < make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_defconfig+KVM_powerpc-gcc12 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-12.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_defconfig+KVM_powerpc-gcc12 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-12.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig .config:4498:warning: override: reassigning to symbol PPC_E500MC .config:4499:warning: override: reassigning to symbol VIRTUALIZATION # make -s -j 160 ARCH=powerpc O=/kisskb/build/powerpc-next_mpc85xx_defconfig+KVM_powerpc-gcc12 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-12.2.0-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/include/linux/build_bug.h:5, from /kisskb/src/include/linux/container_of.h:5, from /kisskb/src/include/linux/list.h:5, from /kisskb/src/include/linux/module.h:12, from /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:15: /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c: In function 'allocate_bd': /kisskb/src/include/linux/err.h:22:49: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 22 | #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) | ^ /kisskb/src/include/linux/compiler.h:78:45: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ /kisskb/src/drivers/net/ethernet/freescale/fs_enet/mac-scc.c:139:13: note: in expansion of macro 'IS_ERR_VALUE' 139 | if (IS_ERR_VALUE(fep->ring_mem_addr)) | ^~~~~~~~~~~~ /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8555cds.dts:341.15-350.5: Warning (pci_device_reg): /pci@e0008000/i8259@19000: PCI unit address format error, expected "12,0" /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8555cds.dts:330.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8541cds.dts:341.15-350.5: Warning (pci_device_reg): /pci@e0008000/i8259@19000: PCI unit address format error, expected "12,0" /kisskb/src/arch/powerpc/boot/dts/fsl/mpc8541cds.dts:330.3-21: Warning (pci_device_bus_num): /pci@e0008000/i8259@19000:bus-range: PCI bus number 1 out of range, expected (0 - 0) Completed OK # rm -rf /kisskb/build/powerpc-next_mpc85xx_defconfig+KVM_powerpc-gcc12 # Build took: 0:03:10.860909
© Michael Ellerman 2006-2018.