~/talk

Flexible Array Transformations and Array-bounds Checking

links:none on file
slides:none on file

Kernel code is being converted from one-element and zero-length trailing arrays into C99 flexible-array members so compilers and fortified memcpy can actually reason about sizes; transforming zero-length arrays is mostly done but one-element conversions need manual audit for off-by-one bugs and ABI-safe UAPI handling using the declare_flex_array helper. GCC currently treats all trailing arrays as flexible so __builtin_object_size returns -1; a new option -fstrict-flex-arrays (levels up to true-only) plus use of struct_size and tools like objdump and Ghidra are needed to finish enabling -Warray-bounds and hardened memcpy.

AI-written summary · about

  1. 0:00Start
  2. 12:15Problems with ambiguous flexible-array variants
  3. 34:28The case of UAPI
  4. 36:19Flexible array transformations in the Linux kernel
~/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.