All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: zhangshaokun@hisilicon.com
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	jinyuqi@huawei.com, kuznet@ms2.inr.ac.ru,
	yoshfuji@linux-ipv6.org, kuba@kernel.org, jiri@resnulli.us,
	nivedita@alum.mit.edu, peterz@infradead.org, edumazet@google.com,
	jiongwang@huawei.com
Subject: Re: [PATCH v2] net: revert "net: get rid of an signed integer overflow in ip_idents_reserve()"
Date: Sun, 17 May 2020 12:34:37 -0700 (PDT)	[thread overview]
Message-ID: <20200517.123437.2084818619487673025.davem@davemloft.net> (raw)
In-Reply-To: <1589600809-18001-1-git-send-email-zhangshaokun@hisilicon.com>

From: Shaokun Zhang <zhangshaokun@hisilicon.com>
Date: Sat, 16 May 2020 11:46:49 +0800

> From: Yuqi Jin <jinyuqi@huawei.com>
> 
> Commit adb03115f459 ("net: get rid of an signed integer overflow in ip_idents_reserve()")
> used atomic_cmpxchg to replace "atomic_add_return" inside the function
> "ip_idents_reserve". The reason was to avoid UBSAN warning.
> However, this change has caused performance degrade and in GCC-8,
> fno-strict-overflow is now mapped to -fwrapv -fwrapv-pointer
> and signed integer overflow is now undefined by default at all
> optimization levels[1]. Moreover, it was a bug in UBSAN vs -fwrapv
> /-fno-strict-overflow, so Let's revert it safely.
> 
> [1] https://gcc.gnu.org/gcc-8/changes.html
> 
> Suggested-by: Peter Zijlstra <peterz@infradead.org>
> Suggested-by: Eric Dumazet <edumazet@google.com>
 ...
> Signed-off-by: Yuqi Jin <jinyuqi@huawei.com>
> Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>

Applied, thanks.

      reply	other threads:[~2020-05-17 19:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-16  3:46 [PATCH v2] net: revert "net: get rid of an signed integer overflow in ip_idents_reserve()" Shaokun Zhang
2020-05-17 19:34 ` David Miller [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=20200517.123437.2084818619487673025.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jinyuqi@huawei.com \
    --cc=jiongwang@huawei.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nivedita@alum.mit.edu \
    --cc=peterz@infradead.org \
    --cc=yoshfuji@linux-ipv6.org \
    --cc=zhangshaokun@hisilicon.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.