lkml.org 
[lkml]   [2020]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] net: revert "net: get rid of an signed integer overflow in ip_idents_reserve()"
From
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.

\
 
 \ /
  Last update: 2020-05-17 21:34    [W:0.060 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site