From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755174AbdC1KQW (ORCPT ); Tue, 28 Mar 2017 06:16:22 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:35611 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754333AbdC1KQV (ORCPT ); Tue, 28 Mar 2017 06:16:21 -0400 Date: Tue, 28 Mar 2017 12:15:32 +0200 From: Ingo Molnar To: Dmitry Vyukov Cc: Peter Zijlstra , Mark Rutland , Andrey Ryabinin , Ingo Molnar , Will Deacon , Andrew Morton , kasan-dev , "linux-mm@kvack.org" , "x86@kernel.org" , LKML , Linus Torvalds , Thomas Gleixner , "H. Peter Anvin" Subject: Re: [PATCH 2/3] asm-generic, x86: wrap atomic operations Message-ID: <20170328101532.GA13819@gmail.com> References: <6bb1c71b87b300d04977c34f0cd8586363bc6170.1489519233.git.dvyukov@google.com> <20170324065203.GA5229@gmail.com> <20170324105700.GB20282@gmail.com> <20170328075232.GA19590@gmail.com> <20170328092712.bk32k5iteqqm6pgh@hirez.programming.kicks-ass.net> <20170328095151.GC30567@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Dmitry Vyukov wrote: > > So I'm not convinced that it's true in this case. > > > > Could we see the C version and compare? I could be wrong about it all. > > Here it is (without instrumentation): > https://gist.github.com/dvyukov/e33d580f701019e0cd99429054ff1f9a Could you please include the full patch so that it can be discussed via email and such? > Instrumentation will add for each function: > > static __always_inline void atomic64_set(atomic64_t *v, long long i) > { > + kasan_check_write(v, sizeof(*v)); > arch_atomic64_set(v, i); > } That in itself looks sensible and readable. Thanks, Ingo