Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp211569ybt; Mon, 6 Jul 2020 07:35:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdr/MvceCAjgG3HPSHEtHuF4dROzSDJ+JOc17fzGJrFS24ZGI+7eHyShq1X9p0y43lIs9Z X-Received: by 2002:a17:906:4b59:: with SMTP id j25mr38225502ejv.301.1594046151783; Mon, 06 Jul 2020 07:35:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594046151; cv=none; d=google.com; s=arc-20160816; b=nb/naWiWcS80iTO2R9d7jy1AS44hzVCjXIKUqptz07KUm1EprgdD7+mvbajiY2zpVF +JXTPJeKcz6LSb8K9hwG42uj7nOQ1W/5TkOPM0APM47rVuYmshHbbfiqO6Gu2wDi9lRs PyYDFrs5KZ175ygZ1o+29UBm2WC6ZicV+SphYjBWXhKlYyFg48wEy78NlqW7SzzHZVMW 0Gafk1VHNhlD6iXvpCu49IDYFgS/ObMaxJNVxwJg6OGjdcERafCmtdPiYKpeb3F1GsCN cRcrh2J+3OSvTfhLQYvlTv4BvNXLzzf07HiRzJw2WT+Wzm0xKi/HZOswi98doElG/4gF L/Jw== 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=yTfkro5cHzke17V5815BcwuPcfPkV4tReADrZoIyi9k=; b=k8CMVtS6/Uqhj0DBbCG+OAEOcNuBBBp/yMI64QU5A7OXjvmUiDWcoTztyAowkCXlid XEixGN5JTIEA0F2qF2SHp9FabjZTi7b/4Zg5kXsk0AJWHA3Diw2LnjkJnaKdsmrQf5Jt 5iRg7oRCZF3IlZ223fOq+LYud7e5hJLD3yWMqs9/D6jWaBtJh5II8FIt7xZvt8X0lbX4 nkurzWJBxc6RzAe4XnEbedIDxi820H2eskwF8NK30qGJ9inI650KilMSkJoIv05GhHIq WHOZGbHmjpZCs0ml9r3GnDY/9fCfolRANkgOXxqR4YDRSGWQguwbHoAKxC+QHZYzef5w bPdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=Blw8NTT7; 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 r22si13801831edq.411.2020.07.06.07.35.28; Mon, 06 Jul 2020 07:35:51 -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=casper.20170209 header.b=Blw8NTT7; 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 S1729339AbgGFOed (ORCPT + 99 others); Mon, 6 Jul 2020 10:34:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729148AbgGFOed (ORCPT ); Mon, 6 Jul 2020 10:34:33 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64642C061755 for ; Mon, 6 Jul 2020 07:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=yTfkro5cHzke17V5815BcwuPcfPkV4tReADrZoIyi9k=; b=Blw8NTT7z/NtSn5D4AGCXycPHM Qnm9jbS0ORUe2v92VLKPzIVL2s5JMzkFJB2IlRkma/XNiR395F+SHmzQeas3dKSTAP2lcXElYZi3P 5dcIW/LOfXWxLnwrDErsl9uP5gfkc4/vlMBKpg5rxwOIwgeeY1iJtHhi7x+CmyjuQfT6e6ePKDLS0 LPIFndGQBgI+IUF3ecLbuglDX3tgkTh4e2+/o+9arN6feQ94LlQy+lk3sj7fpcZdgT0kwRiYx6tC/ xRJbOf0//zqFKda42clz6pcUqfAER/qONh+vxy1V+T+SgSEZtGamLVVJSfA5Abo4xhJnYqNxY7ce8 nxAwqa0Q==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jsSCQ-0004wY-Dq; Mon, 06 Jul 2020 14:34:28 +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 CB005304E03; Mon, 6 Jul 2020 16:34:25 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A41E2213C65B2; Mon, 6 Jul 2020 16:34:25 +0200 (CEST) Date: Mon, 6 Jul 2020 16:34:25 +0200 From: Peter Zijlstra To: Andy Lutomirski Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Andrew Cooper , Juergen Gross Subject: [PATCH] x86/entry: Mark check_user_regs() noinstr Message-ID: <20200706143425.GG4800@hirez.programming.kicks-ass.net> References: <52059e42bb0ab8551153d012d68f7be18d72ff8e.1593191971.git.luto@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <52059e42bb0ab8551153d012d68f7be18d72ff8e.1593191971.git.luto@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 26, 2020 at 10:21:11AM -0700, Andy Lutomirski wrote: > +static void check_user_regs(struct pt_regs *regs) --- Subject: x86/entry: Mark check_user_regs() noinstr vmlinux.o: warning: objtool: do_syscall_64()+0xb: call to check_user_regs() leaves .noinstr.text section vmlinux.o: warning: objtool: do_int80_syscall_32()+0x4: call to check_user_regs() leaves .noinstr.text section vmlinux.o: warning: objtool: do_fast_syscall_32()+0x25: call to check_user_regs() leaves .noinstr.text section vmlinux.o: warning: objtool: idtentry_enter_cond_rcu()+0x3d: call to check_user_regs() leaves .noinstr.text section vmlinux.o: warning: objtool: idtentry_enter_user()+0x0: call to check_user_regs() leaves .noinstr.text section Signed-off-by: Peter Zijlstra (Intel) --- arch/x86/entry/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c index e83b3f14897c..ea7b515e3bc2 100644 --- a/arch/x86/entry/common.c +++ b/arch/x86/entry/common.c @@ -46,7 +46,7 @@ #include /* Check that the stack and regs on entry from user mode are sane. */ -static void check_user_regs(struct pt_regs *regs) +static noinstr void check_user_regs(struct pt_regs *regs) { if (IS_ENABLED(CONFIG_DEBUG_ENTRY)) { /*