Re: [PATCH v2] bitmap: Switch from inline to __always_inline

From: Yury Norov
Date: Fri Jul 12 2024 - 19:55:00 EST


On Fri, Jul 12, 2024 at 11:01:13AM -0700, Kees Cook wrote:
> On Fri, Jul 12, 2024 at 10:02:55AM -0700, Yury Norov wrote:
> > Hi Brian,
> >
> > Thanks for taking over this!
> >
> > + Kees Cook for GCC
> > [...]
> > But I'm not sure about that and don't know how to check what happens
> > under the compilers' hood. Can compiler gurus please clarify?
>
> I don't know much about GCC internals. I just ask GCC devs nicely to
> help us where they can. :)

My concern here is that this __always_inline may hide a compiler's
inability to inline things like that properly. In that case, we
shouldn't convert bitmaps, and should file a bug to compilers.

>From your and LLVM people comments, it seems it's OK to convert
kernel code. I just want to make it explicit before moving forward.

> > > Subject: [PATCH 1/3] bitmap: switch from inline to __always_inline
>
> We always expected them to be inline, and if we need to hit the
> compilers harder with __always_inline, that seems sensible to me.
>
> Reviewed-by: Kees Cook <kees@xxxxxxxxxx>

Is that for bitmaps only, or for all files in the patch?