Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp403507ybg; Wed, 3 Jun 2020 03:56:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTHzYJoF0MeoPy8EZ97uHhlmE1FocACcKsiiKWApWP1QhNMg3BzZVlrmUZDBohuMRNZLzX X-Received: by 2002:aa7:d9d6:: with SMTP id v22mr11925805eds.66.1591181813276; Wed, 03 Jun 2020 03:56:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591181813; cv=none; d=google.com; s=arc-20160816; b=IlwAT/gKEOKdeUpLV+RPPpxmza0Ht+XpA9YVAxMJyq/QXkeHxraK2efGDDhyGSjTjH cgQbyJa4dCj4CPP8mxndnYoA9kkMEeSJcPHA0ZWPEvDYNtXr++r1kJd1rVRhmZ+hTtQ6 4dF3GVfFhgrZ0D8tOBoUH/2squr6TAAykzaCpIwVbsLGXnXeCniCzlinM3CP9X9Cw6LU 2vsbqB9IL+FBnSNFJYDnaKltsTuIRWtOZON7fN80gIsTc8Zfwv04P7+QN2bCoeYxW84I 6OZvsqZUrTn9eS5poLs3o/G4/9Bg38f6D5jpyZB1WSsZSsvqomcPnVXbcenkPv0grTwF QE+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=gDAYBsNhd3MhHyd9Nfu4JI7C94w3l3VoucL+udwtlmg=; b=YDePy0/85UWSDjJnslqfHJK6lbgOqoy5MMN+9YH3Afe9oA65V5YCUdMguSDbtIvQ8I a2vd0JSuZ68Z8cbQuK6sYG2OnPnyoj/EjvXDp1/eT2rg4G10aKoJEUodyf2LaV/dZd8O KwcdwjJclbCFPHlDQTZpcQpdDgvtpsFnLtv6xHquy7QtK0Fj/YJfH6mb3XaTg4hTt06Y SqnsqGBYk7+KqIBRkTZEHEgv9R4jLY0qZsI0CxekvOyJWRHu5An16RYKYmAyRw5q21Ao qDitXtwr0j4X1YuaEsRWrxy25reRNj15Dh0Be0WwvgbboZzzRu9CK81iVGyPCkn78HyW TR2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=H+Nek6rC; 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 fx20si946702ejb.50.2020.06.03.03.56.29; Wed, 03 Jun 2020 03:56:53 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=H+Nek6rC; 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 S1725951AbgFCKwe (ORCPT + 99 others); Wed, 3 Jun 2020 06:52:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725828AbgFCKwe (ORCPT ); Wed, 3 Jun 2020 06:52:34 -0400 Received: from merlin.infradead.org (unknown [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E13B9C08C5C0 for ; Wed, 3 Jun 2020 03:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=gDAYBsNhd3MhHyd9Nfu4JI7C94w3l3VoucL+udwtlmg=; b=H+Nek6rCCT+THMCi0vc3MVZHoC 8UCON2zctiamF5TCDl3c+R16MbhjaAUVCCJGwC5ExdBBQTQYbbXB8jXHmCDAqofB/nyHCxhlFNkD8 g2wXDR0YOTE+V3rFCEz+r20nWVB4ZwK7ikQ2KsX57Y3NKthQ47eEBQY73GDn1orY5XSDz3mvjgT99 PgBY3LhXVXssIlS6GjKzlq4z0gLlI/O0dtGOcJxWTOnM2WHW3FHN+N1oS7JSVwNEPh105amNA+3J4 BAmPHRGN84+9iqUFk7muhGbz7R+CETmJHb0YdFE8Dv4Hffsg+Kq4q2guYoRq5spdwmThs0DTthHep vsURGVqQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgR0C-00053H-VC; Wed, 03 Jun 2020 10:52:09 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 50A6F30008D; Wed, 3 Jun 2020 12:52:06 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1E28A20598375; Wed, 3 Jun 2020 12:52:06 +0200 (CEST) Date: Wed, 3 Jun 2020 12:52:06 +0200 From: Peter Zijlstra To: "Paul E. McKenney" Cc: Marco Elver , Nick Desaulniers , Will Deacon , Borislav Petkov , Thomas Gleixner , Ingo Molnar , clang-built-linux , Dmitry Vyukov , Alexander Potapenko , Andrey Konovalov , kasan-dev , LKML Subject: Re: [PATCH] rcu: Fixup noinstr warnings Message-ID: <20200603105206.GG2604@hirez.programming.kicks-ass.net> References: <20200602184409.22142-1-elver@google.com> <20200602191936.GE2604@hirez.programming.kicks-ass.net> <20200602193853.GF2604@hirez.programming.kicks-ass.net> <20200603084818.GB2627@hirez.programming.kicks-ass.net> <20200603095932.GM29598@paulmck-ThinkPad-P72> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200603095932.GM29598@paulmck-ThinkPad-P72> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 03, 2020 at 02:59:32AM -0700, Paul E. McKenney wrote: > On Wed, Jun 03, 2020 at 10:48:18AM +0200, Peter Zijlstra wrote: > > On Tue, Jun 02, 2020 at 09:38:53PM +0200, Peter Zijlstra wrote: > > > > > That said; noinstr's __no_sanitize combined with atomic_t might be > > > 'interesting', because the regular atomic things have explicit > > > annotations in them. That should give validation warnings for the right > > > .config, I'll have to go try -- so far I've made sure to never enable > > > the *SAN stuff. > > > > --- > > Subject: rcu: Fixup noinstr warnings > > > > A KCSAN build revealed we have explicit annoations through atomic_t > > usage, switch to arch_atomic_*() for the respective functions. > > > > vmlinux.o: warning: objtool: rcu_nmi_exit()+0x4d: call to __kcsan_check_access() leaves .noinstr.text section > > vmlinux.o: warning: objtool: rcu_dynticks_eqs_enter()+0x25: call to __kcsan_check_access() leaves .noinstr.text section > > vmlinux.o: warning: objtool: rcu_nmi_enter()+0x4f: call to __kcsan_check_access() leaves .noinstr.text section > > vmlinux.o: warning: objtool: rcu_dynticks_eqs_exit()+0x2a: call to __kcsan_check_access() leaves .noinstr.text section > > vmlinux.o: warning: objtool: __rcu_is_watching()+0x25: call to __kcsan_check_access() leaves .noinstr.text section > > > > Signed-off-by: Peter Zijlstra (Intel) > > This one does not apply cleanly onto the -rcu tree's "dev" branch, so > I am guessing that it is intended to be carried in -tip with yours and > Thomas's patch series. Right, I've not played patch tetris yet so see how it should all fit together. I also didn't know you feel about loosing the instrumentation in these functions. One option would be do add explicit: instrument_atomic_write() calls before instrument_end() / after instrument_begin() in the respective callers that have that. Anyway, I'll shortly be posting a pile of patches resulting from various KCSAN and KASAN builds. The good news is that GCC-KASAN seems to behave quite well with Marco's patches, the bad news is that GCC-KASAN is retarded wrt inline and needs a bunch of kicks. That is, it out-of-lines: static inline bool foo(..) { return false; } just because..