From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754670AbdCFPoN (ORCPT ); Mon, 6 Mar 2017 10:44:13 -0500 Received: from merlin.infradead.org ([205.233.59.134]:42696 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754305AbdCFPoD (ORCPT ); Mon, 6 Mar 2017 10:44:03 -0500 Date: Mon, 6 Mar 2017 16:20:13 +0100 From: Peter Zijlstra To: Dmitry Vyukov Cc: Andrew Morton , Andrey Ryabinin , Ingo Molnar , kasan-dev , "linux-mm@kvack.org" , LKML , "x86@kernel.org" , Mark Rutland , Will Deacon Subject: Re: [PATCH] x86, kasan: add KASAN checks to atomic operations Message-ID: <20170306152013.GN6500@twins.programming.kicks-ass.net> References: <20170306124254.77615-1-dvyukov@google.com> <20170306125851.GL6500@twins.programming.kicks-ass.net> <20170306130107.GK6536@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 06, 2017 at 03:24:23PM +0100, Dmitry Vyukov wrote: > We could also provide a parallel implementation of atomic ops based on > the new compiler builtins (__atomic_load_n and friends): > https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html > and enable it under KSAN. The nice thing about it is that it will > automatically support arm64 and KMSAN and KTSAN. > But it's more work. There's a summary out there somewhere, I think Will knows, that explain how the C/C++ memory model and the Linux Kernel Memory model differ and how its going to be 'interesting' to make using the C/C++ builtin crud with the kernel 'correct.