Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp864843ybh; Tue, 10 Mar 2020 09:40:26 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtjBaH9Cgpdlswf6AqJGzSAwpeb3sb8rr6iVc4ymlXQiNkMMZvLz//FmePcJCfIx8fmMNyu X-Received: by 2002:aca:dc45:: with SMTP id t66mr688520oig.39.1583858426094; Tue, 10 Mar 2020 09:40:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583858426; cv=none; d=google.com; s=arc-20160816; b=AaWO+uAHxO/Gxt35naPdoS5zbFtNbFTAR+zG2aS4iRoMjfG6QoQ5fR4zzbDSdlxyng oID+C7LKdaihmWJPNwCZ4VtlXr2NWBCfAuUWS+dhLMrbjdUMJoyBAibDiSnjB9LhcHkO vbTrdFiJ4zwSv2IVfQHqVq6kAiozbEyjNxkN4NIY+IZEGHXpVjF/P5Kfa/vF5frvmiK+ zzMRfR6m4p7H7VzGbvHrEw+mZx1UEKmwz1LFVemVWENVmAXQPv0AmAj7JkptdB/lkdTt wPPGDU0GJ0B4/aaBdpdkB2Mf6RWk04gDljD29DuW6pYK/ksMz4Oa9qorK1DAGsOEUMT5 ufdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=xYhHxnh3I5hDjDnCk3LUb/siMEW7EEBPsDc/iTuC030=; b=PAYbe4gqPgZX7sSnc8YzPcQslJQ9kjtBasZ7qSJXkY9UrT5xsFiOEWFSKzjgwrYyiB h2NSZl4jB2iQrddGjHGl5Q05Oo8D+HMwFGmQDJja+X+J6BQiWJmkZLxVwYP3hxmLaOUP datyYpt9f1MnCKCUci9dv/sFijOfUtkKaa6qAsvuM5InhHBQgmezcoOpC0m3KKwQQdD+ XsZvNnaJ5WU9iwWUjV4/AY2DJlFbcVD6S0/1tfgO/6E8pBPf5fnV5zE/xXo1ugY+Xwqd DpYJ0ZvPTVax9zmr3WuIOCWPIj3EYwNGh9gzefPBDAC4ZabPV51mzvOQ7kofFUCw1tdk jORw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f15si5809534otp.314.2020.03.10.09.40.13; Tue, 10 Mar 2020 09:40:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726986AbgCJQiP (ORCPT + 99 others); Tue, 10 Mar 2020 12:38:15 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:34313 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726481AbgCJQiP (ORCPT ); Tue, 10 Mar 2020 12:38:15 -0400 Received: from [5.158.153.52] (helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jBhtK-000791-Ez; Tue, 10 Mar 2020 17:38:02 +0100 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id D9EFB1040A5; Tue, 10 Mar 2020 17:38:01 +0100 (CET) From: Thomas Gleixner To: Alexandre Chartre , LKML Cc: x86@kernel.org, Steven Rostedt , Brian Gerst , Juergen Gross , Frederic Weisbecker Subject: Re: [patch part-II V2 11/13] x86/speculation/mds: Mark mds_user_clear_cpu_buffers() __always_inline In-Reply-To: References: <20200308222359.370649591@linutronix.de> <20200308222610.040107039@linutronix.de> Date: Tue, 10 Mar 2020 17:38:01 +0100 Message-ID: <87lfo85fo6.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alexandre Chartre writes: > On 3/8/20 11:24 PM, Thomas Gleixner wrote: >> -static inline void mds_user_clear_cpu_buffers(void) >> +static __always_inline void mds_user_clear_cpu_buffers(void) >> { >> if (static_branch_likely(&mds_user_clear)) >> mds_clear_cpu_buffers(); >> > > Reviewed-by: Alexandre Chartre > > I am just wondering if it would be worth defining a new function attribute to > identify functions which shouldn't be trace/probe more clearly. For example: > > #define no_trace_and_probe __always_inline > > static no_trace_and_probe void mds_user_clear_cpu_buffers(void) > { > ... > } > > I am just concerned that overtime we might forgot that a function is defined > __always_inline just because it shouldn't be traced/probed. True, for exactly that reason we are reconsidering the whole annotation business by putting stuff into a separate section so we get tools support for finding things which escape. See the discussion at: https://lore.kernel.org/lkml/87mu8p797b.fsf@nanos.tec.linutronix.de/ Peter and I are working on this right now, so you might end up reviewing this pile in different form yet another time :( Thanks, tglx