On Fri, Jun 27, 2025 at 01:38:51PM +0000, Qing Zhao wrote: > The good news is: With the above simple heuristic and a simple back tracing > of the CFG, all the > current testing cases for the following PRs passed without any issue: > > PR109071 > PR88771 > PR85788 > PR108770 > PR106762 > PR115274 > PR117179 > > I will continue working on this to add more testing cases and also more > warnings per the following discussion: > https://gcc.gnu.org/pipermail/gcc-patches/2025-May/684126.html > https://gcc.gnu.org/pipermail/gcc-patches/2025-June/686323.html > https://gcc.gnu.org/pipermail/gcc-patches/2025-June/685852.html > https://gcc.gnu.org/pipermail/gcc-patches/2025-June/685854.html > > Let me know if you have any comments or suggestions.
Thanks great! Here are the patches I got landed in Linux that were uncovered using the earlier -fdiagnostics-details implementation: https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/log/?qt=grep&q=diagnostics-details Reverting these patches show the warnings again for me. If you want to test them against the new implementation, this should work: ### Set up build... $ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git $ cd linux $ git revert --no-edit 8a39f1c870e9d6fbac5638f3a42a6a6363829c49 $ git revert --no-edit 4a6f18f28627e121bd1f74b5fcc9f945d6dbeb1e $ git revert --no-edit 239d87327dcd361b0098038995f8908f3296864f $ git revert --no-edit ac6f0825e582f2216a582c9edf0cee7bfe347ba6 $ CPUS=$(getconf _NPROCESSORS_ONLN) $ FLAGS="-Warray-bounds -fdiagnostic-show-context=1" $ make -j$CPUS KCFLAGS="$FLAGS" allmodconfig # These three targets are stable, the 4th one is harder to hit, so # I've left it off (kernel/padata.o): $ make -j$CPUS KCFLAGS="$FLAGS" fs/overlayfs/util.o $ make -j$CPUS KCFLAGS="$FLAGS" drivers/net/ethernet/mellanox/mlx4/alloc.o $ make -j$CPUS KCFLAGS="$FLAGS" drivers/pinctrl/mediatek/pinctrl-airoha.o If you prefer, I can also do this once the new implementation is posted. :) -Kees -- Kees Cook