Re: Linux 5.9-rc1 (sparse? kernel/time/timekeeping.c)

From: Randy Dunlap
Date: Sun Aug 16 2020 - 21:35:38 EST


On 8/16/20 1:50 PM, Linus Torvalds wrote:
> This merge window felt a lot more normal than 5.8, and all the stats
> confirm thar it seems to be the usual size.
>

on x86_64, allmodconfig:

$ gcc --version
gcc (SUSE Linux) 7.5.0

$ sparse --version
0.6.2


I seem to be having some problems with kernel/time/timekeeping.c,
including a segfault.

a. Is it sparse that segfaults?

b. what prints this message?
make[3]: *** Deleting file 'kernel/time/timekeeping.o'

c. I would prefer to be able to tell the source of warning/error messages,
i.e., gcc or sparse. Especially when they are intermixed.
So one solution IMO would be to be able to do a full sparse check _only_,
without the gcc build. That way the messages would obviously be from sparse.

Another reason to do that is that I often do gcc builds and then would like
to follow that up with a sparse check build, but currently that means that
I have to do the full gcc + sparse build, which is really time consuming
since I have a wimpy laptop.



CC kernel/time/timekeeping.o
CHECK ../kernel/time/timekeeping.c
../kernel/time/timekeeping.c:461:23: warning: trying to copy expression type 31
../kernel/time/timekeeping.c:470:18: warning: trying to copy expression type 31
../include/linux/seqlock.h:214:1: warning: unreplaced symbol 's'
../include/linux/seqlock.h:214:1: warning: unreplaced symbol 'return'
../kernel/time/timekeeping.c:461:23: warning: unreplaced symbol 's'
../kernel/time/timekeeping.c:461:23: warning: unreplaced symbol 'return'
../include/linux/seqlock.h:214:1: warning: unreplaced symbol 's'
../include/linux/seqlock.h:214:1: warning: unreplaced symbol 'return'
../kernel/time/timekeeping.c:470:18: warning: unreplaced symbol 's'
../kernel/time/timekeeping.c:470:18: warning: unreplaced symbol 'return'
/bin/sh: line 1: 15126 Segmentation fault (core dumped) sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -Wno-return-void -Wno-unknown-attribute -D__x86_64__ --arch=x86_64 -mlittle-endian -m64 -Wp,-MMD,kernel/time/.timekeeping.o.d -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/7/include -I../arch/x86/include -I./arch/x86/include/generated -I../include -I./include -I../arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I../include/uapi -I./include/generated/uapi -include ../include/linux/kconfig.h -include ../include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -DCONFIG_X86_X32_ABI -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -O2 --param=allow-store-data-races=0 -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wimplicit-fallthrough -Wno-unused-const-variable -fno-var-tracking-assignments -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once -flive-patching=inline-clone -falign-functions=32 -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wno-array-bounds -Wno-stringop-overflow -Wno-restrict -Wno-maybe-uninitialized -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fsanitize-coverage=trace-pc -I ../kernel/time -I ./kernel/time -DKBUILD_MODFILE='"kernel/time/timekeeping"' -DKBUILD_BASENAME='"timekeeping"' -DKBUILD_MODNAME='"timekeeping"' ../kernel/time/timekeeping.c
make[3]: *** [../scripts/Makefile.build:283: kernel/time/timekeeping.o] Error 139
make[3]: *** Deleting file 'kernel/time/timekeeping.o'
make[3]: *** Waiting for unfinished jobs....


thanks.
--
~Randy