Ok, acabei encontrando. É chamado debug.exception-trace
.
sysctl -w debug.exception-trace=0
ou echo 0 > /proc/sys/debug/exception-trace
desativará.
# dmesg -c
# dmesg
# echo 'main;' | gcc -xc - && ./a.out
<stdin>:1:1: warning: data definition has no type or storage class
Segmentation fault
# dmesg
[ 539.421736] a.out[1875]: segfault at 600874 ip 0000000000600874 sp 00007ffed85e7018 error 15 in a.out[600000+1000]
# sysctl debug.exception-trace
debug.exception-trace = 1
# ./a.out
Segmentation fault
# dmesg
[ 539.421736] a.out[1875]: segfault at 600874 ip 0000000000600874 sp 00007ffed85e7018 error 15 in a.out[600000+1000]
[ 584.492171] a.out[1878]: segfault at 600874 ip 0000000000600874 sp 00007ffc6b0d2358 error 15 in a.out[600000+1000]
# sysctl -w debug.exception-trace=0
debug.exception-trace = 0
# ./a.out
Segmentation fault
# dmesg
[ 539.421736] a.out[1875]: segfault at 600874 ip 0000000000600874 sp 00007ffed85e7018 error 15 in a.out[600000+1000]
[ 584.492171] a.out[1878]: segfault at 600874 ip 0000000000600874 sp 00007ffc6b0d2358 error 15 in a.out[600000+1000]
O último segfault não está registrado.