[PATCH 11/12] slab: Remove __malloc attribute from realloc functions

Miguel Ojeda miguel.ojeda.sandonis at gmail.com
Thu Sep 22 17:41:07 UTC 2022


On Thu, Sep 22, 2022 at 5:56 PM Kees Cook <keescook at chromium.org> wrote:
>
> I wasn't sure if this "composite macro" was sane there, especially since
> it would be using __malloc before it was defined, etc. Would you prefer
> I move it?

Hmm... On one hand, they end up being attributes, so it could make
sense to have them there (after all, the big advantage of that header
is that there is no `#ifdef` nest like in others, and that it is only
for attributes).

On the other hand, you are right that the file so far is intended to
be as simple as possible (`__always_inline` having an extra `inline`
and `fallthrough` would be closest outliers), so if we do it, I would
prefer to do so in an independent series that carries its own rationale.

So I would leave the patch as it is here.

Cheers,
Miguel


More information about the dri-devel mailing list