Re: linux-next: build failure after merge of the block tree

Mark Brown
2026-01-23T19:34:05Z

[-- Attachment #1: Type: text/plain, Size: 1232 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]