[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<AS8PR02MB7237F03B3C7FDF92510049E88BE02@AS8PR02MB7237.eurprd02.prod.outlook.com>
Date: Sat, 11 May 2024 13:04:15 +0200
From: Erick Archer <erick.archer@...look.com>
To: Alexander Lobakin <aleksander.lobakin@...el.com>
Cc: Erick Archer <erick.archer@...look.com>,
Kees Cook <keescook@...omium.org>,
Alexey Dobriyan <adobriyan@...il.com>,
Miguel Ojeda <ojeda@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Dmitry Antipov <dmantipov@...dex.ru>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
Justin Stitt <justinstitt@...gle.com>, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH] uapi: stddef.h: Provide UAPI macros for
__counted_by_{le, be}
Hi Alexander,
On Tue, May 07, 2024 at 02:58:15PM +0200, Alexander Lobakin wrote:
> From: Erick Archer <erick.archer@...look.com>
> Date: Mon, 6 May 2024 19:42:08 +0200
>
> > Provide UAPI macros for UAPI structs that will gain annotations for
> > __counted_by_{le, be} attributes.
>
> Pls add me to Cc next time.
Ok.
> Why is this change needed? __counted_by_{le, be}() aren't used anywhere
> in the uAPI headers.
The goal of this commit is to be able to accept this another one [1].
In the "batman-adv" we annotate "struct batadv_tvlv_tt_data" with the
"__counted_by_be()" attribute.
[1] https://lore.kernel.org/linux-hardening/AS8PR02MB72371F89D188B047410B755E8B192@AS8PR02MB7237.eurprd02.prod.outlook.com/
Thanks,
Erick
>
> >
> > Signed-off-by: Erick Archer <erick.archer@...look.com>
> > ---
> > include/uapi/linux/stddef.h | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/include/uapi/linux/stddef.h b/include/uapi/linux/stddef.h
> > index 2ec6f35cda32..58154117d9b0 100644
> > --- a/include/uapi/linux/stddef.h
> > +++ b/include/uapi/linux/stddef.h
> > @@ -55,4 +55,12 @@
> > #define __counted_by(m)
> > #endif
> >
> > +#ifndef __counted_by_le
> > +#define __counted_by_le(m)
> > +#endif
> > +
> > +#ifndef __counted_by_be
> > +#define __counted_by_be(m)
> > +#endif
> > +
> > #endif /* _UAPI_LINUX_STDDEF_H */
>
> Thanks,
> Olek
Powered by blists - more mailing lists