Re: [PATCH v4] compiler_types: Allow opting out of __counted_by and __counted_by_ptr

From: Nathan Chancellor

Date: Thu Oct 08 2026 - 12:17:42 EST


On Thu, Oct 08, 2026 at 04:50:44PM +0200, Ard Biesheuvel wrote:
> On Wed, 7 Oct 2026, at 11:36, Nathan Chancellor wrote:
> > On Wed, Oct 07, 2026 at 02:32:45AM -0700, Bill Wendling wrote:
> >> Ard,
> >>
> >> What's the reason why x86 doesn't need the KBUILD_CFLAGS flags? Is
> >> there something that breaks things?
> >
> > I think it is mostly historical. See Kees's series to address it:
> >
> > https://lore.kernel.org/20261006204210.i.137-kees@xxxxxxxxxx/
> >
>
> I've queued that up now in the EFI tree.
>
> Do we still need this patch then?

I don't think so, since the efistub should now get
'-fexperimental-late-parse-attributes' from the main KBUILD_CFLAGS,
which is what prompted this patch in the first place:

https://lore.kernel.org/CAGG=3QWCmQ+LVvn2dtjEauj5WFwvx=pvg4Q6man_A2imdjRe7A@xxxxxxxxxxxxxx/

As I mentioned up thread and to Kees in person, we should still consider
adding '-fexperimental-late-parse-attributes' into CC_FLAGS_DIALECT to
cover other areas that may see __counted_by_ptr use but it is probably
not as high priority.

--
Cheers,
Nathan