netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@kernel.org>
To: zhanggenjian <zhanggenjian123@gmail.com>,
	pabeni@redhat.com, edumazet@google.com, davem@davemloft.net,
	yoshfuji@linux-ipv6.org, kuba@kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, huhai@kylinos.cn
Subject: Re: [PATCH v2] net: ipv4: Avoid bounds check warning
Date: Mon, 30 May 2022 10:10:11 -0600	[thread overview]
Message-ID: <928aa148-e666-783b-dbd4-9ea3172efafb@kernel.org> (raw)
In-Reply-To: <20220526101213.2392980-1-zhanggenjian@kylinos.cn>

On 5/26/22 4:12 AM, zhanggenjian wrote:
> From: huhai <huhai@kylinos.cn>
> 
> Fix the following build warning when CONFIG_IPV6 is not set:
> 
> In function ‘fortify_memcpy_chk’,
>     inlined from ‘tcp_md5_do_add’ at net/ipv4/tcp_ipv4.c:1210:2:
> ./include/linux/fortify-string.h:328:4: error: call to ‘__write_overflow_field’ declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
>   328 |    __write_overflow_field(p_size_field, size);
>       |    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Suggested-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-by: huhai <huhai@kylinos.cn>
> ---
>  net/ipv4/tcp_ipv4.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>


  reply	other threads:[~2022-05-30 16:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-26 10:12 [PATCH v2] net: ipv4: Avoid bounds check warning zhanggenjian
2022-05-30 16:10 ` David Ahern [this message]
2022-05-31  4:40 ` patchwork-bot+netdevbpf

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=928aa148-e666-783b-dbd4-9ea3172efafb@kernel.org \
    --to=dsahern@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=huhai@kylinos.cn \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=yoshfuji@linux-ipv6.org \
    --cc=zhanggenjian123@gmail.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).