~/talk

Upstream Kernel Hardening: Progress on Enabling -Wflex-array-member-not-at-end

links:none on file
slides:none on file

GCC 14’s -Wflex-array-member-not-at-end flags flexible-array instances-in-the-middle, initially spitting ~64k warnings but ~650 unique problems; fixes cluster into removal, splitting headers, using str_group + container_of, DEFINE/DECLARE_FLEX for stack, and a new trailing_overlap helper. About 70 patches are merged, ~20 under review (≈100 total), and unique warnings drop from ~650 to ~135 (~80% addressed). Concrete commits and static_assert checks handle subtle trailing-padding and alignment bugs; the approach proves practical and reviewable.

AI-written summary · about

  1. 0:00Kernel hardening introduction
  2. 1:25Flexible array members
  3. 3:53-Wflex-array-member-not-at-end
  4. 5:37Flexible arrays in the middle
  5. 7:4660,000+ warnings discovered
  6. 10:38Four strategies to fix false positives
  7. 12:26Removing unused flexible arrays
  8. 13:51Header vs flexible array separation
  9. 16:20Strgroup to isolate flexible arrays
  10. 19:31Implicit unions case
  11. 21:41Trailing padding alignment
  12. 23:31Alignment fix with strgroup
  13. 26:23Accessing flexible arrays
  14. 27:26Stack-based flexible arrays
  15. 29:14declare_flex helper
  16. 31:00declare_flex limitations
  17. 32:24trailing_overlap helper
  18. 34:54Choosing strategies
  19. 36:41Approach evolution
  20. 38:06Current progress
  21. 39:10Summary next steps
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.