4 ms·
You probably already did this, but for the audience: one of the best ways to make sure you're using a function reasonably is to use elixir.bootlin.com to look a
by sweettea 6y ago
You probably already did this, but for the audience: one of the best ways to make sure you're using a function reasonably is to use elixir.bootlin.com to look at other uses and make sure you're using the function similarly. For instance, check out https://elixir.bootlin.com/linux/latest/A/ident/for_each_process https://elixir.bootlin.com/linux/latest/A/ident/for_each_pro... .
- ksml 6y agoElixir was extremely helpful to me! It didn't always help me understand _why_ code was written the way it was (hence my incorrect use of rcu_read_lock), but it was very helpful to see some examples.
- stevekemp 6y agoI've not done too much kernel programming, but for sure I know that looking for existing uses of code is very helpful. It looks like the author of the piece did something similar, and noted other people doing similar things to themselves. I wrote some modules to experiment with the Security Module API, because working with the APIs seemed like a good way to learn how they worked, and what was possible beyond just SELinux,Apparmor, etc.: https://github.com/skx/linux-security-modules https://github.com/skx/linux-security-modules