⬢ DragonFlyBSD Kernel Audit
DF-4582 / build.log
← back to finding ↓ download raw
DF-4582 build log (guest, DragonFly 6.5-DEVELOPMENT, gcc 8.3 [DragonFly]).

$ cc -O0 -o rs690_div0_o0 rs690_div0.c            # clean
$ make clean; make                                # vulnerable KLD
cc  -O2 -pipe   -D_KERNEL -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes  -Wpointer-arith -Wcast-qual  -Wold-style-definition -Wmissing-include-dirs  -Wno-pointer-sign -Winit-self -Wundef -Wno-unused-but-set-variable -std=gnu11 -Werror -DKLD_MODULE -nostdinc  -I. -Idragonfly -I/root/df4582/forwarder_x86_64/include -Idragonfly/../include -I/usr/include  -Wold-style-declaration -fno-common -ffreestanding -fno-stack-protector -fno-strict-aliasing -fno-strict-overflow -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -mno-fp-ret-in-387 -mindirect-branch=thunk-inline   -c rs690_div0_kmod.c
-> df4582_div0.ko built (no errors; earlier iterations fixed include
   ordering (KERNEL guard) and dfixed_div 'inline+noinline' conflict)

$ make clean; make WITH_FIX=1                      # fixed KLD
cc  ... same flags ... -DDF4582_SCENARIO=0 -DDF4582_FIXED ... -c rs690_div0_kmod.c
-> df4582_div0.ko built with -DDF4582_FIXED (verified present in cc line)

Note: the Makefile must append CFLAGS AFTER `.include <kmod.mk>` (kmod.mk
reassigns CFLAGS); an earlier attempt that set them before the include
silently dropped the defines — documented so the run is reproducible.