netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <gustavoars@kernel.org>
Cc: <davem@davemloft.net>, <dsahern@kernel.org>,
	<edumazet@google.com>, <kees@kernel.org>, <kuba@kernel.org>,
	<linux-hardening@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<netdev@vger.kernel.org>, <pabeni@redhat.com>,
	Kuniyuki Iwashima <kuniyu@amazon.com>
Subject: Re: [PATCH 5/5][next] uapi: net: Avoid -Wflex-array-member-not-at-end warnings
Date: Tue, 15 Oct 2024 20:51:54 -0700	[thread overview]
Message-ID: <20241016035154.91327-1-kuniyu@amazon.com> (raw)
In-Reply-To: <d64af418459145b7d8eb94cd300fb4b7d2659a3c.1729037131.git.gustavoars@kernel.org>

From: "Gustavo A. R. Silva" <gustavoars@kernel.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@amazon.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) ||

      reply	other threads:[~2024-10-16  3:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-16  0:25 [PATCH 0/5][next] net: Avoid thousands of -Wflex-array-member-not-at-end warnings Gustavo A. R. Silva
2024-10-16  0:27 ` [PATCH 1/5][next] net: dev: Introduce struct sockaddr_legacy Gustavo A. R. Silva
2024-10-16  3:30   ` Kuniyuki Iwashima
2024-10-22 17:07     ` Gustavo A. R. Silva
2024-10-22 12:13   ` David Laight
2024-10-22 17:30     ` Gustavo A. R. Silva
2024-10-16  0:32 ` [PATCH 4/5][next] uapi: net: arp: Avoid -Wflex-array-member-not-at-end warnings Gustavo A. R. Silva
2024-10-16  3:44   ` Kuniyuki Iwashima
2024-10-16 12:30   ` Andrew Lunn
2024-10-16 16:45     ` Kees Cook
2024-10-18 18:55       ` Gustavo A. R. Silva
2024-10-16  0:33 ` [PATCH 5/5][next] uapi: net: " Gustavo A. R. Silva
2024-10-16  3:51   ` Kuniyuki Iwashima [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241016035154.91327-1-kuniyu@amazon.com \
    --to=kuniyu@amazon.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=gustavoars@kernel.org \
    --cc=kees@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).