google / kernel-sanitizers

Linux Kernel Sanitizers, fast bug-detectors for the Linux kernel
https://google.github.io/kernel-sanitizers/
436 stars 87 forks source link

Link in readme to an install guide #174

Closed exx8 closed 2 years ago

exx8 commented 3 years ago

I know that for the developer of KASAN it's clear that you need to build the kernel for KASAN to work. But I believe a full guide can be helpful, for those who are new to KASAN.

This PR adds a link to a full guide that clarify how to build kernel with KASAN. solves #172

google-cla[bot] commented 3 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

exx8 commented 3 years ago

@googlebot I signed it!

ramosian-glider commented 3 years ago

I think it is pretty clear from https://www.kernel.org/doc/html/latest/dev-tools/kasan.html (referenced just below the part you are changing) that one must build the kernel in order for CONFIG_KASAN to take effect. There are many online instructions on how to build the kernel, and someone wanting to fix bugs in it will be probably able to find one.

exx8 commented 3 years ago

I think it is pretty clear from https://www.kernel.org/doc/html/latest/dev-tools/kasan.html (referenced just below the part you are changing) that one must build the kernel in order for CONFIG_KASAN to take effect. There are many online instructions on how to build the kernel, and someone wanting to fix bugs in it will be probably able to find one.

see: https://unix.stackexchange.com/questions/580865/how-do-i-enable-a-configuration-in-a-kernel

KASAN is a must for a Linux kernel module programmer. Because, it's a bit exotic, probably there are large number of one time kernel module writers. Currently, it is not clear from the instructions that you need to rebuild the kernel with this option, nor how to do this. This PR tries, to make the first time, a bit easier.

dvyukov commented 3 years ago

KASAN is now upstream and docs are maintained upstream. The README page specifically only provides a few key references. If there is something missing in the upstream doc or they can be improved, I think the improvements should go there: https://www.kernel.org/doc/html/latest/dev-tools/kasan.html We don't want any active development/maintenance on the github page. Perhaps we need to reduce the docs even more to make it clearer that this is just a stub?

xairy commented 3 years ago

KASAN is now upstream and docs are maintained upstream. The README page specifically only provides a few key references. If there is something missing in the upstream doc or they can be improved, I think the improvements should go there: https://www.kernel.org/doc/html/latest/dev-tools/kasan.html We don't want any active development/maintenance on the github page. Perhaps we need to reduce the docs even more to make it clearer that this is just a stub?

Done: https://github.com/google/kasan/commit/c0f2681e7d9371caede2458dbb9fe6fa7ac8a0ab