The world's worst Linux kernel module(github.com)
github.com
The world's worst Linux kernel module
https://github.com/davidmalcolm/antipatterns.ko
71 コメント
Is it normal kernel style to use if blocks without braces if it's only one line? See https://github.com/davidmalcolm/antipatterns.ko/blob/main/bu...
From https://www.kernel.org/doc/html/v4.10/process/coding-style.h...
"Do not unnecessarily use braces where a single statement will do."
"Do not unnecessarily use braces where a single statement will do."
Apples famous "gotofail" SSL Security Bug was due to this
https://embeddedgurus.com/barr-code/2014/03/apples-gotofail-...
https://embeddedgurus.com/barr-code/2014/03/apples-gotofail-...
I wonder if anyone has done an analysis of kernel code to find all the cases where brace-less statements introduced bugs.
It's C, not Perl. The Linux kernel is not the best place to start with programming.
I've never worked with the C/make pipeline. Can anyone explain why this commit is getting so many votes?
Mistakenly read this as “World’s FIRST…”
The static analysis tools being developed to check this:
https://news.ycombinator.com/item?id=28638885
https://news.ycombinator.com/item?id=28638885
> Caveat: this is my first ever kernel module, so I may have committed more mistakes than I intended.
lol. Reminds me of the "hypocrite commits" fiasco where researchers at the University of Minnesota submitted kernel patches with what they thought were security vulnerabilities, but because of their inexperience, the first patch they sent was actually valid and had no vulnerabilities whatsoever[1].
[1] https://www-users.cse.umn.edu/~kjlu/papers/full-disclosure.p...
lol. Reminds me of the "hypocrite commits" fiasco where researchers at the University of Minnesota submitted kernel patches with what they thought were security vulnerabilities, but because of their inexperience, the first patch they sent was actually valid and had no vulnerabilities whatsoever[1].
[1] https://www-users.cse.umn.edu/~kjlu/papers/full-disclosure.p...
It doesn't sound like it was "because of their inexperience" but rather because determining whether Linux C code is buggy is really hard. That's kind of the whole point.
[deleted]
tempaccnt(4)
akdor1154(2)
GitHub Copilot will learn this code and suggest it. Bravo!
Potential idea to somehow have 51% of the programs on github be malicious to taint copilot?
[deleted]