On Fri, Jan 23, 2026 at 11:00:55AM -0700, Jens Axboe wrote: > On 1/23/26 10:42 AM, Mark Brown wrote: > > inlined from 'io_uring_populate_bpf_ctx' at /tmp/next/build/io_uring/bpf_filter.c:33:2: > > /tmp/next/build/include/linux/fortify-string.h:480:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning] > > 480 | __write_overflow_field(p_size_field, size); > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... > memset(bctx->pad, 0, sizeof(bctx->pad) + sizeof(bctx->resv)); > which should clear from offset 10 (start of pad) for a total of 6 + 48 > bytes, which is 54 bytes. The size of the struct is 64b. I think so, it's checking that you're not overflowing the field you specified rather than the struct containing the field. > I guess the part it doesn't like is that it thinks we're clearing the > pad field, which would of course be way overwriting it. Guess we can do > something ala: > memset((void *) bctx + offsetof(struct io_uring_bpf_ctx, pad), 0, > sizeof(bctx->pad) + sizeof(bctx->resv)); > to make it happier. Lovely.