History log of /openbsd-current/sys/kern/subr_kubsan.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.12 06-Nov-2019 anton

Use atomic operations consistently while writing to kubsan_slot.
Otherwise, reports might go by unnoticed.

Prodded by and ok visa@


# 1.11 04-Nov-2019 anton

Regularly poll and report kubsan findings using the timeout(9) API
instead of task(9). Undefined behavior can potentially be present in any
context and calling task_add() isn't always safe.

ok visa@


# 1.10 03-Nov-2019 anton

rework kubsan_state into simpler boolean named kubsan_cold


# 1.9 03-Nov-2019 anton

add missing handler for float cast overflow; caused by code in
sys/dev/pci/drm/amd/display/dc/calcs/dcn_calc_auto.c


Revision tags: OPENBSD_6_6_BASE
# 1.8 20-Jun-2019 anton

Undefined behavior (UB) can potentially be present anywhere in the
kernel. kubsan reports findings using printf() and assuming that calling
printf() is safe in all contexts can be problematic. Instead, defer
reporting of findings to the systq task queue.

Storage for findings is allocated early in the boot process in order to
catch potential UB during boot. The same findings are reported once the
task queue subsystem has been initialized.

Feedback from kettenis@ and ok mpi@


# 1.7 03-Jun-2019 anton

sort struct declarations


# 1.6 24-May-2019 anton

rename struct for consistency


# 1.5 24-May-2019 anton

fix incorrect order of arguments


# 1.4 24-May-2019 anton

A source location in kubsan is an absolute path making reports quite
long. Instead, use everything after the first /sys/ segment as the path.


# 1.3 24-May-2019 anton

The latest inteldrm update brought along code making use of
__attribute__((nonnull)); which the undefined behavior sanitizer in
clang is aware of. A new handler is therefore needed in order to compile
a kernel with kubsan enabled.

ok visa@


Revision tags: OPENBSD_6_5_BASE
# 1.2 19-Mar-2019 anton

correct LOCATION_REPORTED mask


# 1.1 18-Mar-2019 anton

Add kubsan(4), a undefined behavior sanitizer for the kernel. It's
capable of detecting undefined behavior at runtime and all findings are
printed to the system console, including the offending line in the
source code.

kubsan is limited to architectures using Clang as their default compiler
and is not enabled by default.

Derived from the NetBSD implementation.

ok kettenis@ visa@


# 1.11 04-Nov-2019 anton

Regularly poll and report kubsan findings using the timeout(9) API
instead of task(9). Undefined behavior can potentially be present in any
context and calling task_add() isn't always safe.

ok visa@


# 1.10 03-Nov-2019 anton

rework kubsan_state into simpler boolean named kubsan_cold


# 1.9 03-Nov-2019 anton

add missing handler for float cast overflow; caused by code in
sys/dev/pci/drm/amd/display/dc/calcs/dcn_calc_auto.c


Revision tags: OPENBSD_6_6_BASE
# 1.8 20-Jun-2019 anton

Undefined behavior (UB) can potentially be present anywhere in the
kernel. kubsan reports findings using printf() and assuming that calling
printf() is safe in all contexts can be problematic. Instead, defer
reporting of findings to the systq task queue.

Storage for findings is allocated early in the boot process in order to
catch potential UB during boot. The same findings are reported once the
task queue subsystem has been initialized.

Feedback from kettenis@ and ok mpi@


# 1.7 03-Jun-2019 anton

sort struct declarations


# 1.6 24-May-2019 anton

rename struct for consistency


# 1.5 24-May-2019 anton

fix incorrect order of arguments


# 1.4 24-May-2019 anton

A source location in kubsan is an absolute path making reports quite
long. Instead, use everything after the first /sys/ segment as the path.


# 1.3 24-May-2019 anton

The latest inteldrm update brought along code making use of
__attribute__((nonnull)); which the undefined behavior sanitizer in
clang is aware of. A new handler is therefore needed in order to compile
a kernel with kubsan enabled.

ok visa@


Revision tags: OPENBSD_6_5_BASE
# 1.2 19-Mar-2019 anton

correct LOCATION_REPORTED mask


# 1.1 18-Mar-2019 anton

Add kubsan(4), a undefined behavior sanitizer for the kernel. It's
capable of detecting undefined behavior at runtime and all findings are
printed to the system console, including the offending line in the
source code.

kubsan is limited to architectures using Clang as their default compiler
and is not enabled by default.

Derived from the NetBSD implementation.

ok kettenis@ visa@


# 1.10 03-Nov-2019 anton

rework kubsan_state into simpler boolean named kubsan_cold


# 1.9 03-Nov-2019 anton

add missing handler for float cast overflow; caused by code in
sys/dev/pci/drm/amd/display/dc/calcs/dcn_calc_auto.c


Revision tags: OPENBSD_6_6_BASE
# 1.8 20-Jun-2019 anton

Undefined behavior (UB) can potentially be present anywhere in the
kernel. kubsan reports findings using printf() and assuming that calling
printf() is safe in all contexts can be problematic. Instead, defer
reporting of findings to the systq task queue.

Storage for findings is allocated early in the boot process in order to
catch potential UB during boot. The same findings are reported once the
task queue subsystem has been initialized.

Feedback from kettenis@ and ok mpi@


# 1.7 03-Jun-2019 anton

sort struct declarations


# 1.6 24-May-2019 anton

rename struct for consistency


# 1.5 24-May-2019 anton

fix incorrect order of arguments


# 1.4 24-May-2019 anton

A source location in kubsan is an absolute path making reports quite
long. Instead, use everything after the first /sys/ segment as the path.


# 1.3 24-May-2019 anton

The latest inteldrm update brought along code making use of
__attribute__((nonnull)); which the undefined behavior sanitizer in
clang is aware of. A new handler is therefore needed in order to compile
a kernel with kubsan enabled.

ok visa@


Revision tags: OPENBSD_6_5_BASE
# 1.2 19-Mar-2019 anton

correct LOCATION_REPORTED mask


# 1.1 18-Mar-2019 anton

Add kubsan(4), a undefined behavior sanitizer for the kernel. It's
capable of detecting undefined behavior at runtime and all findings are
printed to the system console, including the offending line in the
source code.

kubsan is limited to architectures using Clang as their default compiler
and is not enabled by default.

Derived from the NetBSD implementation.

ok kettenis@ visa@


# 1.8 20-Jun-2019 anton

Undefined behavior (UB) can potentially be present anywhere in the
kernel. kubsan reports findings using printf() and assuming that calling
printf() is safe in all contexts can be problematic. Instead, defer
reporting of findings to the systq task queue.

Storage for findings is allocated early in the boot process in order to
catch potential UB during boot. The same findings are reported once the
task queue subsystem has been initialized.

Feedback from kettenis@ and ok mpi@


# 1.7 03-Jun-2019 anton

sort struct declarations


# 1.6 24-May-2019 anton

rename struct for consistency


# 1.5 24-May-2019 anton

fix incorrect order of arguments


# 1.4 24-May-2019 anton

A source location in kubsan is an absolute path making reports quite
long. Instead, use everything after the first /sys/ segment as the path.


# 1.3 24-May-2019 anton

The latest inteldrm update brought along code making use of
__attribute__((nonnull)); which the undefined behavior sanitizer in
clang is aware of. A new handler is therefore needed in order to compile
a kernel with kubsan enabled.

ok visa@


Revision tags: OPENBSD_6_5_BASE
# 1.2 19-Mar-2019 anton

correct LOCATION_REPORTED mask


# 1.1 18-Mar-2019 anton

Add kubsan(4), a undefined behavior sanitizer for the kernel. It's
capable of detecting undefined behavior at runtime and all findings are
printed to the system console, including the offending line in the
source code.

kubsan is limited to architectures using Clang as their default compiler
and is not enabled by default.

Derived from the NetBSD implementation.

ok kettenis@ visa@


# 1.7 03-Jun-2019 anton

sort struct declarations


# 1.6 24-May-2019 anton

rename struct for consistency


# 1.5 24-May-2019 anton

fix incorrect order of arguments


# 1.4 24-May-2019 anton

A source location in kubsan is an absolute path making reports quite
long. Instead, use everything after the first /sys/ segment as the path.


# 1.3 24-May-2019 anton

The latest inteldrm update brought along code making use of
__attribute__((nonnull)); which the undefined behavior sanitizer in
clang is aware of. A new handler is therefore needed in order to compile
a kernel with kubsan enabled.

ok visa@


Revision tags: OPENBSD_6_5_BASE
# 1.2 19-Mar-2019 anton

correct LOCATION_REPORTED mask


# 1.1 18-Mar-2019 anton

Add kubsan(4), a undefined behavior sanitizer for the kernel. It's
capable of detecting undefined behavior at runtime and all findings are
printed to the system console, including the offending line in the
source code.

kubsan is limited to architectures using Clang as their default compiler
and is not enabled by default.

Derived from the NetBSD implementation.

ok kettenis@ visa@


# 1.6 24-May-2019 anton

rename struct for consistency


# 1.5 24-May-2019 anton

fix incorrect order of arguments


# 1.4 24-May-2019 anton

A source location in kubsan is an absolute path making reports quite
long. Instead, use everything after the first /sys/ segment as the path.


# 1.3 24-May-2019 anton

The latest inteldrm update brought along code making use of
__attribute__((nonnull)); which the undefined behavior sanitizer in
clang is aware of. A new handler is therefore needed in order to compile
a kernel with kubsan enabled.

ok visa@


Revision tags: OPENBSD_6_5_BASE
# 1.2 19-Mar-2019 anton

correct LOCATION_REPORTED mask


# 1.1 18-Mar-2019 anton

Add kubsan(4), a undefined behavior sanitizer for the kernel. It's
capable of detecting undefined behavior at runtime and all findings are
printed to the system console, including the offending line in the
source code.

kubsan is limited to architectures using Clang as their default compiler
and is not enabled by default.

Derived from the NetBSD implementation.

ok kettenis@ visa@


Revision tags: OPENBSD_6_5_BASE
# 1.2 19-Mar-2019 anton

correct LOCATION_REPORTED mask


# 1.1 18-Mar-2019 anton

Add kubsan(4), a undefined behavior sanitizer for the kernel. It's
capable of detecting undefined behavior at runtime and all findings are
printed to the system console, including the offending line in the
source code.

kubsan is limited to architectures using Clang as their default compiler
and is not enabled by default.

Derived from the NetBSD implementation.

ok kettenis@ visa@