1

For the past week, I was working on a simplistic kernel module that creates a character device driver that allows the passing of messages between user and kernel space.

All good and nice, I found KEDR (https://github.com/euspectre/kedr) and I can now detect memory leaks.

However, the question stands: Is there a way to detect out of bounds accesses and any other errors such as Uninitialized Memory etc? In userspace programs, we might sometimes see a segfault, or we can use valgrind to try and detect most of these errors.

I tried to artificially write out of the bounds of an array and the OS does not complain.

1 Answer 1

2

KASAN is a close equivalent to memcheck, which is what you mean when you say valgrind.

It is The kernel address sanitizer [LWN.net 2014]. See also Software-tag-based KASAN [LWN.net 2018].

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .