From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f197.google.com (mail-wr0-f197.google.com [209.85.128.197]) by kanga.kvack.org (Postfix) with ESMTP id B91CA6B03A2 for ; Tue, 28 Mar 2017 06:15:37 -0400 (EDT) Received: by mail-wr0-f197.google.com with SMTP id f50so51604041wrf.7 for ; Tue, 28 Mar 2017 03:15:37 -0700 (PDT) Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com. [2a00:1450:400c:c0c::242]) by mx.google.com with ESMTPS id z65si4158978wrc.101.2017.03.28.03.15.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Mar 2017 03:15:36 -0700 (PDT) Received: by mail-wr0-x242.google.com with SMTP id u18so1712535wrc.0 for ; Tue, 28 Mar 2017 03:15:36 -0700 (PDT) Date: Tue, 28 Mar 2017 12:15:32 +0200 From: Ingo Molnar 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: Sender: owner-linux-mm@kvack.org List-ID: 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" * 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 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org