~/talk

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

Talkat Open Source Summit Europe 2025 · on Monday, 2025-08-25· at 13:30· Auditorium (Level 0)· [security]
links:none on file
slides:none on file

GCC 14 -Wflex-array-member-not-at-end surfaces ~60,000 warnings in the kernel but only ~650 are unique; work under KSPP audits and fixes those cases and cuts uniques to ~200 so far. Practical fixes include converting fake zero/one-element arrays to C99 flex arrays, enabling strict-flex-arrays, annotating with the counted_by attribute, and adding helpers (st_group, container_of usage, DECLARE_FLEX/DECLARE_RO_FLEX and a new trailing_overlap helper) which preserve memory layout and remove false positives.

AI-written summary · about

  1. 0:00Introduction
  2. 2:06Flexible array members
  3. 5:44-Wflex-array-member-not-at-end explained
  4. 7:54Flexible arrays in middle
  5. 8:15Kernel hardening history
  6. 11:49Strict flex arrays discovery
  7. 15:45Warnings and unique issues
  8. 16:31Four warning categories
  9. 16:51Case 1: Unused flexible arrays
  10. 17:34Case 2: Non-composite access
  11. 20:00Fixing header issues with __group
  12. 22:57Case 3: Heap unions with flex arrays
  13. 26:27Flexible array access with container_of
  14. 27:13Case 4: Stack unions with flex arrays
  15. 28:59declare_flex and declare_row_flex helpers
  16. 31:03declare_row_flex challenges
  17. 32:48Introducing trailing_overlap
  18. 36:42Memory layout with trailing_overlap
  19. 38:07Solutions evolution
  20. 39:10Current strategies and work
  21. 40:13Progress and outlook
~/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.