Taking a look into every fall-through warning is not the most glamorous and sexy thing. But the ongoing efforts to enabling -Wimplicit-fallthrough
keep paying off. :) lore.kernel.org/patchwork/patc…
This bug has been out there for almost two years.
Roses are red,
Violets are blue,
I'm almost done,
With the -Wimplicit-fallthrough 💻🔍
Bugs, bugs, ancient bugs!
Another years-old bug found while working on the -Wimplicit-fallthrough stuff: lore.kernel.org/patchwork/patc…
Stephen Rothwell is now building linux-next with -Wimplicit-fallthrough. Newly introduced code that is buggy is detected, and now a bugfix takes hours instead of months or years: lore.kernel.org/lkml/201904021…
Once -Wimplicit-fallthrough finally makes it to mainline, a bugfix should take seconds or minutes before the code is even submitted; therefore completely eliminating this bug class. 🐧
There are only 5 of 2311 of these warnings left in linux-next. 🐧
All of them have a patch now.
Work progress: 99.78%
Stop introducing fall-through warnings, please. There are many cases in which it's much clearer (hence better for code maintenance) to add breaks instead of letting the code to fall through: lore.kernel.org/patchwork/patc…
Last week we'd only 2 warnings left in linux-next. Today we've 4
Stress is waiting for Linus to merge your final changes to complete a task you've been working on since the fall of 2017, hours before the merge window closes. So, here's a #Caturday pic for stress relief.
Two more of these bugfixes will land in -stable, soon:
After almost two years of work, -Wimplicit-fallthrough will be finally globally enabled in Linux v5.3. I'll go grab a beer. Have a great weekend everybody. 🐧 git.kernel.org/pub/scm/linux/…
"The C language allows switch cases to "fall through" when a "break" statement is missing at the end of a case. This, however, introduces ambiguity in the code, as it's not always clear if the missing break is intentional or a bug..." 🐧 kernel.org/doc/html/lates…
"One source of kernel bugs has been closed, a switch that can only be seen as a best-case scenario.". 🐧 lwn.net/SubscriberLink…
Friday night, casually building ARCH=sh for the first time, I found a 10-year-old bug thanks to -Wimplicit-fallthrough: lore.kernel.org/patchwork/patc… 🐧
This is the perfect way to officially start my weekend. Cheers! 🍻
Happy to see other people finding more bugs (this time in ARM64) thanks to -Wimplicit-fallthrough: git.kernel.org/pub/scm/linux/… 🐧
This bug was introduced in December 2017. It's fixed in mainline now and will be applied to 4.17+ stable kernels, soon.
Today's linux-next (next-20190821): lore.kernel.org/linux-next/5d5…
0 fall-through warnings on x86_64, i386, arm, arm64, mips, riscv, arc and sh. 😀🐧
And yet another years-old bug is still out there in the wild. Hopefully, the bugfix will make it to mainline and land in stable, soon: lore.kernel.org/lkml/201909090… 🐧
This bug was introduced in 2015.
ARCH=powerpc
mpc83xx_defconfig
Happy to see this bugfix finally landing in mainline. It should be applied to multiple stable trees, soon: git.kernel.org/pub/scm/linux/… 🐧
This bugfix has now been applied to stable trees 5.3.2, 5.2.18 and 4.19.76: lwn.net/Articles/80101… 🐧
As commented at @KernelRecipes a couple of weeks ago, 'fallthrough' pseudo-keyword will replace all /* fallthrough */ markings. So, yeah, we are now forking C to make the kernel more secure.😃