Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp213380ybk; Tue, 19 May 2020 20:21:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKaG5Tmu/s0SU1N9t4Pl5xC3BrlHF0roPhClHoV9RZxk1Kmpao1uJdJRk4pXmknU2tFy6G X-Received: by 2002:aa7:d1d9:: with SMTP id g25mr1512943edp.301.1589944861791; Tue, 19 May 2020 20:21:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589944861; cv=none; d=google.com; s=arc-20160816; b=ol4KyTufGJhzx6M7Bb6KfziwHQeAV+J5B9YNy188OmrAUB+bA9aIN5PipgpBoewDNw ecrk1GVb7beIpEQSVuvjdY0peasW2OM/8cKpIY4XM5yBaneQK9dxQ0ckIup2w7Y7b2k+ 3Bq29BTWAu339U9qKfEPTWwwxwKm3mxzZbMOBfd4J7Wgvvwo8yfDgxAQJ59wDx4sZ1H7 eAqMQDQFKmqSSH8VfcOTTqy0yaQKOTIQyQiYKqLb1Hg4I1uKwAUlyTDP3HI0aRdbVGmM 0K0f7aiWmrcOyssf1p1ow2zeM9flxHbL1vgKwcLLrpCPj/jiUhC3iDAtXHv+ym7hEHHm dRpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=dsjqUKLAoPyWanOv8aTbF0H7d0vvqgBqr3qnWwKSiI0=; b=cop+1WJbJmP/SguV8SPEZAwfUbMBgqBp1Z83RmUDxFs2I+ynmicoTcAXr1VBQdoVVV 5RT3O+/TmvqOeTwC61HSQhIcFUQX7pJ4FCobXFGfbRE0BWClm99UGD1jNnHzQjF46Dt5 9wA0VTx2KY7H5dtSme4/FbFfX9OdK1XbcONCz4W77pyAtv3AlXRXa5MOi/v0CBp7AWgO 9OGaDyP1AVqqIiClPW/TkfIFsS1TYSa6j7aFZp+V3GWxAat8hEp9doCAOEyEioa+Mhcz kqPooyWxmQ7y1CVt7WqB0NnzvAS/1EmcbcxHYq15Qoa5xEyyPaLr8G5TlM3evJxNRAWZ Hegg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=g05ihPzT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v3si732428edf.513.2020.05.19.20.20.38; Tue, 19 May 2020 20:21:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b=g05ihPzT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728329AbgETDQi (ORCPT + 99 others); Tue, 19 May 2020 23:16:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728129AbgETDQh (ORCPT ); Tue, 19 May 2020 23:16:37 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE3EFC061A0E for ; Tue, 19 May 2020 20:16:36 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id bs4so1212115edb.6 for ; Tue, 19 May 2020 20:16:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=dsjqUKLAoPyWanOv8aTbF0H7d0vvqgBqr3qnWwKSiI0=; b=g05ihPzTKTH8r7WtEFbtcqj2ZeF6/IrsMm7VWloVdmxpAtIdo8jrvJL6YidOeYIqm8 oHeeA4jnYg9FBq5wzouhF2QhoQztCqZsUb/jsKgdCRUcNw/XZtjjN3Dm64CsmzTEgynY HcHxo5tJhOYqyXcw0to1yx8nW7l4mOUjhEFRi07iCFmoEmsUUsyY0quGse4Fw6qRryPc qn47AB0+p+emI0YhleZg4zCI907eFQaTkOm7kttzuu9qH6HtrCATsoc9zcC4XdKN5hBH 5y8OziXyn522+FGLaOz4x7hhj5Y2dvBoyz0fbQq7WZvluJOxWPU04+0vKx3cySI8suR0 Qh7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=dsjqUKLAoPyWanOv8aTbF0H7d0vvqgBqr3qnWwKSiI0=; b=hGruuoAFnfLvEz6b+72Lbn7GtIUdQImbAG7IAgL0Ag+iWyDGXG2A3y/6GO4UirVjg6 tbQQVbEQwEqI6Wr396cROps4egdMwXZiR7t810Ka0P/o0p5XTpOQ1gOwj/0svsHyPnAZ JT0OGfgx8b9ifK8zVnZOYuZBUblEMNqXyMXSNFeQH62wulupJYfGSVidTNXSOXLvmSzS +62nf7Jor8B7XTsCJs48hZZmYz3P+1R5/3dw89SK8Ydqnxx3uTfCQFmyWYw7/uZ5Sn0m RobLiDPjfy6zmXuqJncPqGOCnuaXoHIZPx3+tkf/uCZtFlneRorrvT+FZU1LN9FwpIOm Sc1g== X-Gm-Message-State: AOAM533nU2XzWNzBND/g8BQLvFKlzP91mreyRcp0dbjdERawDiTKa461 k1liwKA3wKRKtnTucQR5hVqeXqAsLXJDwMf4aIi4GA== X-Received: by 2002:aa7:cc84:: with SMTP id p4mr1427232edt.157.1589944595021; Tue, 19 May 2020 20:16:35 -0700 (PDT) MIME-Version: 1.0 References: <87y2pn60ob.fsf@nanos.tec.linutronix.de> <360AFD09-27EC-4133-A5E3-149B8C0C4232@lca.pw> <20200520024736.GA854786@ubuntu-s3-xlarge-x86> In-Reply-To: <20200520024736.GA854786@ubuntu-s3-xlarge-x86> From: Qian Cai Date: Tue, 19 May 2020 23:16:24 -0400 Message-ID: Subject: Re: [PATCH] READ_ONCE, WRITE_ONCE, kcsan: Perform checks in __*_ONCE variants To: Nathan Chancellor Cc: Thomas Gleixner , Marco Elver , Peter Zijlstra , Linux Kernel Mailing List , kasan-dev , Will Deacon , "Paul E . McKenney" , Ingo Molnar , clang-built-linux Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 19, 2020 at 10:47 PM Nathan Chancellor wrote: > > On Tue, May 19, 2020 at 10:28:41PM -0400, Qian Cai wrote: > > > > > > > On May 19, 2020, at 6:05 PM, Thomas Gleixner wro= te: > > > > > > Yes, it's unfortunate, but we have to stop making major concessions j= ust > > > because tools are not up to the task. > > > > > > We've done that way too much in the past and this particular problem > > > clearly demonstrates that there are limits. > > > > > > Making brand new technology depend on sane tools is not asked too > > > much. And yes, it's inconvenient, but all of us have to build tools > > > every now and then to get our job done. It's not the end of the world= . > > > > > > Building clang is trivial enough and pointing the make to the right > > > compiler is not rocket science either. > > > > Yes, it all make sense from that angle. On the other hand, I want to be= focus on kernel rather than compilers by using a stable and rocket-solid v= ersion. Not mentioned the time lost by compiling and properly manage my own= toolchain in an automated environment, using such new version of compilers= means that I have to inevitably deal with compiler bugs occasionally. Anyw= ay, it is just some other more bugs I have to deal with, and I don=E2=80=99= t have a better solution to offer right now. > > Hi Qian, > > Shameless plug but I have made a Python script to efficiently configure > then build clang specifically for building the kernel (turn off a lot of > different things that the kernel does not need). > > https://github.com/ClangBuiltLinux/tc-build > > I added an option '--use-good-revision', which uses an older master > version (basically somewhere between clang-10 and current master) that > has been qualified against the kernel. I currently update it every > Linux release but I am probably going to start doing it every month as > I have written a pretty decent framework to ensure that nothing is > breaking on either the LLVM or kernel side. > > $ ./build-llvm.py --use-good-revision > > should be all you need to get off the ground and running if you wanted > to give it a shot. The script is completely self contained by default so > it won't mess with the rest of your system. Additionally, leaving off > '--use-good-revision' will just use the master branch, which can > definitely be broken but not as often as you would think (although I > totally understand wanting to focus on kernel regressions only). Great, thanks. I'll try it in a bit.