BPF Archive mirror
 help / color / mirror / Atom feed
From: patchwork-bot+netdevbpf@kernel.org
To: David Faust <david.faust@oracle.com>
Cc: bpf@vger.kernel.org, jose.marchesi@oracle.com,
	cupertino.miranda@oracle.com, eddyz87@gmail.com,
	yonghong.song@linux.dev
Subject: Re: [PATCH bpf-next] bpf: avoid gcc overflow warning in test_xdp_vlan.c
Date: Mon, 13 May 2024 00:20:31 +0000	[thread overview]
Message-ID: <171555963167.28854.5804115900768160470.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20240508193512.152759-1-david.faust@oracle.com>

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Wed,  8 May 2024 12:35:12 -0700 you wrote:
> This patch fixes an integer overflow warning raised by GCC in
> xdp_prognum1 of progs/test_xdp_vlan.c:
> 
>   GCC-BPF  [test_maps] test_xdp_vlan.bpf.o
> progs/test_xdp_vlan.c: In function 'xdp_prognum1':
> progs/test_xdp_vlan.c:163:25: error: integer overflow in expression
>  '(short int)(((__builtin_constant_p((int)vlan_hdr->h_vlan_TCI)) != 0
>    ? (int)(short unsigned int)((short int)((int)vlan_hdr->h_vlan_TCI
>    << 8 >> 8) << 8 | (short int)((int)vlan_hdr->h_vlan_TCI << 0 >> 8
>    << 0)) & 61440 : (int)__builtin_bswap16(vlan_hdr->h_vlan_TCI)
>    & 61440) << 8 >> 8) << 8' of type 'short int' results in '0' [-Werror=overflow]
>   163 |                         bpf_htons((bpf_ntohs(vlan_hdr->h_vlan_TCI) & 0xf000)
>       |                         ^~~~~~~~~
> 
> [...]

Here is the summary with links:
  - [bpf-next] bpf: avoid gcc overflow warning in test_xdp_vlan.c
    https://git.kernel.org/bpf/bpf-next/c/792a04bed41c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



      reply	other threads:[~2024-05-13  0:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08 19:35 [PATCH bpf-next] bpf: avoid gcc overflow warning in test_xdp_vlan.c David Faust
2024-05-13  0:20 ` patchwork-bot+netdevbpf [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=171555963167.28854.5804115900768160470.git-patchwork-notify@kernel.org \
    --to=patchwork-bot+netdevbpf@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=cupertino.miranda@oracle.com \
    --cc=david.faust@oracle.com \
    --cc=eddyz87@gmail.com \
    --cc=jose.marchesi@oracle.com \
    --cc=yonghong.song@linux.dev \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).