[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241016035154.91327-1-kuniyu@amazon.com>
Date: Tue, 15 Oct 2024 20:51:54 -0700
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <gustavoars@...nel.org>
CC: <davem@...emloft.net>, <dsahern@...nel.org>, <edumazet@...gle.com>,
<kees@...nel.org>, <kuba@...nel.org>, <linux-hardening@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
<pabeni@...hat.com>, Kuniyuki Iwashima <kuniyu@...zon.com>
Subject: Re: [PATCH 5/5][next] uapi: net: Avoid -Wflex-array-member-not-at-end warnings
From: "Gustavo A. R. Silva" <gustavoars@...nel.org>
Date: Tue, 15 Oct 2024 18:33:23 -0600
> diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
> index b068651984fe..aac82a4af36f 100644
> --- a/net/appletalk/ddp.c
> +++ b/net/appletalk/ddp.c
> @@ -1832,7 +1832,7 @@ static int atalk_compat_routing_ioctl(struct sock *sk, unsigned int cmd,
> struct rtentry rt;
>
> if (copy_from_user(&rt.rt_dst, &ur->rt_dst,
> - 3 * sizeof(struct sockaddr)) ||
> + 3 * sizeof(struct sockaddr_legacy)) ||
While at it, please fix the indent.
> get_user(rt.rt_flags, &ur->rt_flags) ||
> get_user(rt.rt_metric, &ur->rt_metric) ||
> get_user(rt.rt_mtu, &ur->rt_mtu) ||
> diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
> index b24d74616637..75bd15d884e3 100644
> --- a/net/ipv4/af_inet.c
> +++ b/net/ipv4/af_inet.c
> @@ -1021,7 +1021,7 @@ static int inet_compat_routing_ioctl(struct sock *sk, unsigned int cmd,
> struct rtentry rt;
>
> if (copy_from_user(&rt.rt_dst, &ur->rt_dst,
> - 3 * sizeof(struct sockaddr)) ||
> + 3 * sizeof(struct sockaddr_legacy)) ||
Same here.
Otherwise looks good to me.
Reviewed-by: Kuniyuki Iwashima <kuniyu@...zon.com>
> get_user(rt.rt_flags, &ur->rt_flags) ||
> get_user(rt.rt_metric, &ur->rt_metric) ||
> get_user(rt.rt_mtu, &ur->rt_mtu) ||
Powered by blists - more mailing lists