Buildresult: powerpc-fixes/skiroot_defconfig/powerpc-gcc11 built on May 5 2022, 01:50
kisskb
Revisions
|
Branches
|
Compilers
|
Configs
|
Build Results
|
Build Failures
|
Status:
OK
Date/Time:
May 5 2022, 01:50
Duration:
0:00:49.397035
Builder:
ka4
Revision:
powerpc/vdso: Fix incorrect CFI in gettimeofday.S (
6d65028eb67dbb7627651adfc460d64196d38bd8)
Target:
powerpc-fixes/skiroot_defconfig/powerpc-gcc11
Branch:
powerpc-fixes
Compiler:
powerpc-gcc11
(powerpc64-linux-gcc (GCC) 11.1.0 / GNU ld (GNU Binutils) 2.36.1)
Config:
skiroot_defconfig
(
download
)
Log:
Download original
Possible warnings (3)
drivers/scsi/mpt3sas/mpt3sas_base.c:5396:40: warning: array subscript 'Mpi2SasIOUnitPage1_t {aka struct _MPI2_CONFIG_PAGE_SASIOUNIT_1}[0]' is partly outside array bounds of 'unsigned char[20]' [-Warray-bounds] drivers/scsi/mpt3sas/mpt3sas_base.c:5400:40: warning: array subscript 'Mpi2SasIOUnitPage1_t {aka struct _MPI2_CONFIG_PAGE_SASIOUNIT_1}[0]' is partly outside array bounds of 'unsigned char[20]' [-Warray-bounds] drivers/scsi/mpt3sas/mpt3sas_base.c:5403:43: warning: array subscript 'Mpi2SasIOUnitPage1_t {aka struct _MPI2_CONFIG_PAGE_SASIOUNIT_1}[0]' is partly outside array bounds of 'unsigned char[20]' [-Warray-bounds]
Full Log
# git rev-parse -q --verify 6d65028eb67dbb7627651adfc460d64196d38bd8^{commit} 6d65028eb67dbb7627651adfc460d64196d38bd8 already have revision, skipping fetch # git checkout -q -f -B kisskb 6d65028eb67dbb7627651adfc460d64196d38bd8 # git clean -qxdf # < git log -1 # commit 6d65028eb67dbb7627651adfc460d64196d38bd8 # Author: Michael Ellerman <mpe@ellerman.id.au> # Date: Mon May 2 22:50:10 2022 +1000 # # powerpc/vdso: Fix incorrect CFI in gettimeofday.S # # As reported by Alan, the CFI (Call Frame Information) in the VDSO time # routines is incorrect since commit ce7d8056e38b ("powerpc/vdso: Prepare # for switching VDSO to generic C implementation."). # # DWARF has a concept called the CFA (Canonical Frame Address), which on # powerpc is calculated as an offset from the stack pointer (r1). That # means when the stack pointer is changed there must be a corresponding # CFI directive to update the calculation of the CFA. # # The current code is missing those directives for the changes to r1, # which prevents gdb from being able to generate a backtrace from inside # VDSO functions, eg: # # Breakpoint 1, 0x00007ffff7f804dc in __kernel_clock_gettime () # (gdb) bt # #0 0x00007ffff7f804dc in __kernel_clock_gettime () # #1 0x00007ffff7d8872c in clock_gettime@@GLIBC_2.17 () from /lib64/libc.so.6 # #2 0x00007fffffffd960 in ?? () # #3 0x00007ffff7d8872c in clock_gettime@@GLIBC_2.17 () from /lib64/libc.so.6 # Backtrace stopped: frame did not save the PC # # Alan helpfully describes some rules for correctly maintaining the CFI information: # # 1) Every adjustment to the current frame address reg (ie. r1) must be # described, and exactly at the instruction where r1 changes. Why? # Because stack unwinding might want to access previous frames. # # 2) If a function changes LR or any non-volatile register, the save # location for those regs must be given. The CFI can be at any # instruction after the saves up to the point that the reg is # changed. # (Exception: LR save should be described before a bl. not after) # # 3) If asychronous unwind info is needed then restores of LR and # non-volatile regs must also be described. The CFI can be at any # instruction after the reg is restored up to the point where the # save location is (potentially) trashed. # # Fix the inability to backtrace by adding CFI directives describing the # changes to r1, ie. satisfying rule 1. # # Also change the information for LR to point to the copy saved on the # stack, not the value in r0 that will be overwritten by the function # call. # # Finally, add CFI directives describing the save/restore of r2. # # With the fix gdb can correctly back trace and navigate up and down the stack: # # Breakpoint 1, 0x00007ffff7f804dc in __kernel_clock_gettime () # (gdb) bt # #0 0x00007ffff7f804dc in __kernel_clock_gettime () # #1 0x00007ffff7d8872c in clock_gettime@@GLIBC_2.17 () from /lib64/libc.so.6 # #2 0x0000000100015b60 in gettime () # #3 0x000000010000c8bc in print_long_format () # #4 0x000000010000d180 in print_current_files () # #5 0x00000001000054ac in main () # (gdb) up # #1 0x00007ffff7d8872c in clock_gettime@@GLIBC_2.17 () from /lib64/libc.so.6 # (gdb) # #2 0x0000000100015b60 in gettime () # (gdb) # #3 0x000000010000c8bc in print_long_format () # (gdb) # #4 0x000000010000d180 in print_current_files () # (gdb) # #5 0x00000001000054ac in main () # (gdb) # Initial frame selected; you cannot go up. # (gdb) down # #4 0x000000010000d180 in print_current_files () # (gdb) # #3 0x000000010000c8bc in print_long_format () # (gdb) # #2 0x0000000100015b60 in gettime () # (gdb) # #1 0x00007ffff7d8872c in clock_gettime@@GLIBC_2.17 () from /lib64/libc.so.6 # (gdb) # #0 0x00007ffff7f804dc in __kernel_clock_gettime () # (gdb) # # Fixes: ce7d8056e38b ("powerpc/vdso: Prepare for switching VDSO to generic C implementation.") # Cc: stable@vger.kernel.org # v5.11+ # Reported-by: Alan Modra <amodra@gmail.com> # Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> # Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org> # Link: https://lore.kernel.org/r/20220502125010.1319370-1-mpe@ellerman.id.au # < /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 6d65028eb67dbb7627651adfc460d64196d38bd8 # < make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-fixes_skiroot_defconfig_powerpc-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- skiroot_defconfig # < make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-fixes_skiroot_defconfig_powerpc-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- help # make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-fixes_skiroot_defconfig_powerpc-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- olddefconfig # make -s -j 120 ARCH=powerpc O=/kisskb/build/powerpc-fixes_skiroot_defconfig_powerpc-gcc11 CROSS_COMPILE=/opt/cross/kisskb/korg/gcc-11.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- In file included from /kisskb/src/include/linux/byteorder/little_endian.h:5, from /kisskb/src/arch/powerpc/include/uapi/asm/byteorder.h:12, from /kisskb/src/include/asm-generic/bitops/le.h:6, from /kisskb/src/arch/powerpc/include/asm/bitops.h:336, from /kisskb/src/include/linux/bitops.h:33, from /kisskb/src/include/linux/kernel.h:22, from /kisskb/src/drivers/scsi/mpt3sas/mpt3sas_base.c:46: /kisskb/src/drivers/scsi/mpt3sas/mpt3sas_base.c: In function '_base_make_ioc_operational': /kisskb/src/drivers/scsi/mpt3sas/mpt3sas_base.c:5396:40: warning: array subscript 'Mpi2SasIOUnitPage1_t {aka struct _MPI2_CONFIG_PAGE_SASIOUNIT_1}[0]' is partly outside array bounds of 'unsigned char[20]' [-Warray-bounds] 5396 | (le16_to_cpu(sas_iounit_pg1->SASWideMaxQueueDepth)) ? /kisskb/src/include/uapi/linux/byteorder/little_endian.h:37:51: note: in definition of macro '__le16_to_cpu' 37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) | ^ /kisskb/src/drivers/scsi/mpt3sas/mpt3sas_base.c:5396:14: note: in expansion of macro 'le16_to_cpu' 5396 | (le16_to_cpu(sas_iounit_pg1->SASWideMaxQueueDepth)) ? | ^~~~~~~~~~~ /kisskb/src/drivers/scsi/mpt3sas/mpt3sas_base.c:5382:26: note: referencing an object of size 20 allocated by 'kzalloc' 5382 | sas_iounit_pg1 = kzalloc(sz, GFP_KERNEL); | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from /kisskb/src/include/linux/byteorder/little_endian.h:5, from /kisskb/src/arch/powerpc/include/uapi/asm/byteorder.h:12, from /kisskb/src/include/asm-generic/bitops/le.h:6, from /kisskb/src/arch/powerpc/include/asm/bitops.h:336, from /kisskb/src/include/linux/bitops.h:33, from /kisskb/src/include/linux/kernel.h:22, from /kisskb/src/drivers/scsi/mpt3sas/mpt3sas_base.c:46: /kisskb/src/drivers/scsi/mpt3sas/mpt3sas_base.c:5400:40: warning: array subscript 'Mpi2SasIOUnitPage1_t {aka struct _MPI2_CONFIG_PAGE_SASIOUNIT_1}[0]' is partly outside array bounds of 'unsigned char[20]' [-Warray-bounds] 5400 | (le16_to_cpu(sas_iounit_pg1->SASNarrowMaxQueueDepth)) ? /kisskb/src/include/uapi/linux/byteorder/little_endian.h:37:51: note: in definition of macro '__le16_to_cpu' 37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) | ^ /kisskb/src/drivers/scsi/mpt3sas/mpt3sas_base.c:5400:14: note: in expansion of macro 'le16_to_cpu' 5400 | (le16_to_cpu(sas_iounit_pg1->SASNarrowMaxQueueDepth)) ? | ^~~~~~~~~~~ /kisskb/src/drivers/scsi/mpt3sas/mpt3sas_base.c:5382:26: note: referencing an object of size 20 allocated by 'kzalloc' 5382 | sas_iounit_pg1 = kzalloc(sz, GFP_KERNEL); | ^~~~~~~~~~~~~~~~~~~~~~~ /kisskb/src/drivers/scsi/mpt3sas/mpt3sas_base.c:5403:43: warning: array subscript 'Mpi2SasIOUnitPage1_t {aka struct _MPI2_CONFIG_PAGE_SASIOUNIT_1}[0]' is partly outside array bounds of 'unsigned char[20]' [-Warray-bounds] 5403 | ioc->max_sata_qd = (sas_iounit_pg1->SATAMaxQDepth) ? | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /kisskb/src/drivers/scsi/mpt3sas/mpt3sas_base.c:5382:26: note: referencing an object of size 20 allocated by 'kzalloc' 5382 | sas_iounit_pg1 = kzalloc(sz, GFP_KERNEL); | ^~~~~~~~~~~~~~~~~~~~~~~ Completed OK # rm -rf /kisskb/build/powerpc-fixes_skiroot_defconfig_powerpc-gcc11 # Build took: 0:00:49.397035
© Michael Ellerman 2006-2018.