[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <10737d34-0070-41f5-8903-dcae30ee7ba5@6wind.com>
Date: Tue, 5 Dec 2023 08:58:45 +0100
From: Nicolas Dichtel <nicolas.dichtel@...nd.com>
To: Kees Cook <keescook@...omium.org>
Cc: Jakub Kicinski <kuba@...nel.org>,
kernel test robot <lkp@...el.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Johannes Berg <johannes@...solutions.net>,
Jeff Johnson <quic_jjohnson@...cinc.com>,
Michael Walle <mwalle@...nel.org>,
Max Schulze <max.schulze@...ine.de>, netdev@...r.kernel.org,
linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2] netlink: Return unsigned value for nla_len()
Le 04/12/2023 à 23:21, Kees Cook a écrit :
[snip]
>>> diff --git a/include/uapi/linux/netlink.h b/include/uapi/linux/netlink.h
>>> index f87aaf28a649..270feed9fd63 100644
>>> --- a/include/uapi/linux/netlink.h
>>> +++ b/include/uapi/linux/netlink.h
>>> @@ -247,7 +247,7 @@ struct nlattr {
>>>
>>> #define NLA_ALIGNTO 4
>>> #define NLA_ALIGN(len) (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1))
>>> -#define NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr)))
>>> +#define NLA_HDRLEN ((__u16) NLA_ALIGN(sizeof(struct nlattr)))
>> I wonder if this may break the compilation of some userspace tools with errors
>> like comparing signed and unsigned values.
>
> Should I drop this part, then?
>
Yes please.
Thank you,
Nicolas
Powered by blists - more mailing lists