From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [RFC PATCH] lib: Introduce generic __cmpxchg_u64() and use it where needed Date: Mon, 5 Nov 2018 11:38:57 +0100 Message-ID: <20181105103857.GB22431@hirez.programming.kicks-ass.net> References: <1541015538-11382-1-git-send-email-linux@roeck-us.net> <20181031213240.zhh7dfcm47ucuyfl@pburton-laptop> <20181031220253.GA15505@roeck-us.net> <20181031233235.qbedw3pinxcuk7me@pburton-laptop> <4e2438a23d2edf03368950a72ec058d1d299c32e.camel@hammerspace.com> <20181101131846.biyilr2msonljmij@lakrids.cambridge.arm.com> <20181101145926.GE3178@hirez.programming.kicks-ass.net> <20181101163212.GF3159@hirez.programming.kicks-ass.net> <5a846924-e642-d9d1-4e0e-810bd4d01c26@virtuozzo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "mark.rutland@arm.com" , "linux-mips@linux-mips.org" , "will.deacon@arm.com" , "bfields@fieldses.org" , "paulus@samba.org" , Trond Myklebust , "jhogan@kernel.org" , Paul McKenney , "linux@roeck-us.net" , "arnd@arndb.de" , "boqun.feng@gmail.com" , dvyukov@google.com, "linux-nfs@vger.kernel.org" , "netdev@vger.kernel.org" , "jlayton@kernel.org" , "linux-kernel@vger.kernel.org" , "ralf@linux-mips.org" , "anna.schumaker@netapp.com" , "paul.burton@mips.com" , "akpm@linu To: Andrey Ryabinin Return-path: Content-Disposition: inline In-Reply-To: <5a846924-e642-d9d1-4e0e-810bd4d01c26@virtuozzo.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" List-Id: netdev.vger.kernel.org On Fri, Nov 02, 2018 at 07:19:15PM +0300, Andrey Ryabinin wrote: > UBSAN warns about signed overflows despite -fno-strict-overflow if gcc > version is < 8. I have learned recently that UBSAN in GCC 8 ignores > signed overflows if -fno-strict-overflow of fwrapv is used. Ah, good. > We can always just drop -fsanitize=signed-integer-overflow if it considered too noisy. I think that is the most consistent beahviour. signed overflow is not UB in the kernel. > Although it did catch some real bugs. If we want an over/under-flow checker, then that should be a separate plugin and not specific to signed or unsigned.