Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5008900imb; Thu, 7 Mar 2019 05:52:48 -0800 (PST) X-Google-Smtp-Source: APXvYqxIYmfgpqdbAF0FcRXNcSJS8bCt4tCIkAdtxkfCVjwkzerpDCydeHs1yOJ0EWIHSC3bBcvf X-Received: by 2002:a17:902:59c1:: with SMTP id d1mr12757455plj.324.1551966768023; Thu, 07 Mar 2019 05:52:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551966768; cv=none; d=google.com; s=arc-20160816; b=c2zcO9l+TJCUmezhimxEVTNM2VzFyOVRyl900bZwxhi5jJ4Eprzr5VtVfYK5hN9taU AsAt5AeMKAmBQnzYGkAFBmDnTAvW/eSqt6zHQcnff1mrbI+Lj5XV3ktigNP1XWaXp6zS Z9nayrrABid1ZkwAjR6RQYJG4QzsP24PcibOmLXSbw3fD4j7EewvyHxuHa4QlwdWzRMY Vr5s3/97piqasoe7AhLnFJ1vDd6c/wPfhkazaEh4hDyeuWbEUK6qRTJ3eEX1o4qCI5Cd FMa7qZ1wujMMj8f9RBC/5kzj/P0mCQ9Lh6Tr4MkGDkHhX9gXGVLZhqMf48dLZfiXEf/h pLxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vftNCW2KR+i5s0Bw7t4HeIZsPq3GFvzfFQczyldYbNk=; b=tX0tv0u1Zgn/fabLGrQHpTF5QzHpJvvuqbN2qKRy459U+u+B1l8kQwOtrQMAj0e2BU vHxXSTUjx0kqQNyeCqVaU61aOdROyMPz5weyXBfUU2S7BRWb2c2bVgn6UCzxVtIg+mO2 CwoMXF7uocHxVVNmm9I+NW7rPwhFCxo/qNTI8Qf/gIl5dpRcVI4e4cAMakt0cRZgFzSN mVeUWWcjS15QKWFMvWSot9Kqukyn5GTgXvInX2tqNa73bdGdJu+1KqUzXbJOyd4zWsk2 5xucItp+BnOMg3N8XAw2/cftFcUqfsfSKEV/+HK7qDItGBZlqZO3zW25rpoR2/567aVf hHsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=OjDJQely; 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 j97si4311324plb.292.2019.03.07.05.52.32; Thu, 07 Mar 2019 05:52:48 -0800 (PST) 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; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=OjDJQely; 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 S1726259AbfCGNuV (ORCPT + 99 others); Thu, 7 Mar 2019 08:50:21 -0500 Received: from merlin.infradead.org ([205.233.59.134]:52050 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726120AbfCGNuU (ORCPT ); Thu, 7 Mar 2019 08:50:20 -0500 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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=vftNCW2KR+i5s0Bw7t4HeIZsPq3GFvzfFQczyldYbNk=; b=OjDJQely6WUdJX0lrhYPjcOfl yVxys0ehphl6B7Rr7XRAA5tQv4mk0mMXvotoi9e0wwBmwj5LzgsQaaW1V540s5eV/6OwIvMnCN59F SaXOcs8wmuVAKaG4rNO8hwsScC7zy2gD/MzO1j0SqjADpjJQrMhmhaue/FCbqpNX8xnXlnoS+GH1/ mHr1CMRG8FMyT/3iQ6URxPw5NxfD024mnz3hRiJsJ8lQuqaUNCQi44ZCQRhiC8RstF9HhSPdEw0vD dEUct/g6tVbHedMKaah+oiAZMkh8sZ0SQU8jLNtGWekaqZ+AYK3Mb2GQB8iLo4UMrK0JgoJ8dhIvy bBfAKi+QQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h1tPU-00062q-B2; Thu, 07 Mar 2019 13:50:08 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C0813202A2A1F; Thu, 7 Mar 2019 14:50:06 +0100 (CET) Date: Thu, 7 Mar 2019 14:50:06 +0100 From: Peter Zijlstra To: torvalds@linux-foundation.org, tglx@linutronix.de, hpa@zytor.com, julien.thierry@arm.com, will.deacon@arm.com, luto@amacapital.net, mingo@kernel.org, catalin.marinas@arm.com, james.morse@arm.com, valentin.schneider@arm.com, brgerst@gmail.com, jpoimboe@redhat.com, luto@kernel.org, bp@alien8.de, dvlasenk@redhat.com Cc: linux-kernel@vger.kernel.org, dvyukov@google.com, rostedt@goodmis.org Subject: Re: [PATCH 07/20] x86/uaccess: Always inline force_valid_ss() Message-ID: <20190307135006.GG32477@hirez.programming.kicks-ass.net> References: <20190307114511.870090179@infradead.org> <20190307115159.708180729@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190307115159.708180729@infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 07, 2019 at 12:45:18PM +0100, Peter Zijlstra wrote: > arch/x86/kernel/signal.o: warning: objtool: restore_sigcontext()+0x3cc: call to force_valid_ss.isra.5() with UACCESS enabled > > XXX: move the callsite out of te AC=1 region instead? > > Signed-off-by: Peter Zijlstra (Intel) > --- > arch/x86/kernel/signal.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/arch/x86/kernel/signal.c > +++ b/arch/x86/kernel/signal.c > @@ -71,7 +71,7 @@ > * alone. Using this generally makes no sense unless > * user_64bit_mode(regs) would return true. > */ > -static void force_valid_ss(struct pt_regs *regs) > +static __always_inline void force_valid_ss(struct pt_regs *regs) > { > u32 ar; > asm volatile ("lar %[old_ss], %[ar]\n\t" arch/x86/kernel/signal.o: warning: objtool: do_signal()+0x384: call to frame_uc_flags.isra.0() with UACCESS enabled @@ -441,7 +441,7 @@ static int __setup_rt_frame(int sig, str return 0; } #else /* !CONFIG_X86_32 */ -static unsigned long frame_uc_flags(struct pt_regs *regs) +static __always_inline unsigned long frame_uc_flags(struct pt_regs *regs) { unsigned long flags;