On Thu, 6 May 2021 14:20:25 -0700 Peter Collingbourne <pcc@xxxxxxxxxx> wrote: > These tests deliberately access these arrays out of bounds, > which will cause the dynamic local bounds checks inserted by > CONFIG_UBSAN_LOCAL_BOUNDS to fail and panic the kernel. To avoid this > problem, access the arrays via volatile pointers, which will prevent > the compiler from being able to determine the array bounds. Huh. Is this use of volatile the official way of suppressing the generation of the checking code or is it just something which happened to work? I'm wondering if this workaround should be formalized in some fashion (presumably a wrapper) rather than mysteriously and unexplainedly open-coding it like this.