Received: by 10.213.65.68 with SMTP id h4csp1725172imn; Mon, 19 Mar 2018 11:30:57 -0700 (PDT) X-Google-Smtp-Source: AG47ELtL8HluJDNBNM9ihBqnzHcV1dnogyR/7MAbFDN7J9HXz5SNQtu87coaUWuu6njKds58rErO X-Received: by 10.99.120.196 with SMTP id t187mr9988326pgc.149.1521484257338; Mon, 19 Mar 2018 11:30:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521484257; cv=none; d=google.com; s=arc-20160816; b=NfoUdxIb6sraQBhLJAUuOSilKHa2uMMETqfUF9pwpk7uqVS2YfbKpsFadf3IUpplav fLg8hL1pIZAR1gxFXnEU/KGFsPHCIz6gdC/FLXiju0zj2R0LHXY8cIMC333OH5zaebyx fbRlXjY47Mc/K2nz/QVtlhgIiTaRx6j4fVGUlucmCRIRXmuN3fkrhWY1roG8o1Mpkkxb GTjYbXE7Qx2a2CAH89t4WqZ+1vRCy8r+XWhZl+/tSeIO4xpO/ArcmpjTM+BfY7X9bApn umOrb3LQZ9H6G9/casqG0gZOW4mT+ptmESZm9BEsWsy/dz+khTeFzRLpyV2HxDCTTZ6n HyTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=0vlMpjRgSTncHAVhq5whgq4r1EmYcJNfzvr/cUfpugs=; b=FG+HE3X9EdLvS/yIyEJiSPIpEwrSfspVkub3gPH1yKrVM+UD2veRcRMizLRwe41okH kSa3V8sdnRdnu0VBBHiRe6IN1mLGujjwXZ7HD3nexJZemtcHTo1RzH1xzsaNGb33rVk3 vhB/UkOEX4Rg85Ko4EuqR0xdEeVO//ZWgHsJ6DtOmGUco9t8K71szb1sTy3eDJheLOdp RhML8JuqlVW5b5BGkY7IryesYTYRBM0XgdhlJdFULlESajLqFXgzhYQWkh2vqNUcrzHm Y1zD3H+DRYblQdJSHe9vlKcFTI7V4/Wxrgl1tNg3M8e79IPqcDW0Y8ythn0bKLf0vwX6 nOfw== 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 h12si286288pgn.317.2018.03.19.11.30.42; Mon, 19 Mar 2018 11:30:57 -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 S1031794AbeCSS3E (ORCPT + 99 others); Mon, 19 Mar 2018 14:29:04 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52436 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968149AbeCSS2v (ORCPT ); Mon, 19 Mar 2018 14:28:51 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C45F31099; Mon, 19 Mar 2018 18:28:50 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Whitcroft , "Peter Zijlstra (Intel)" , Andy Lutomirski , Arjan van de Ven , Borislav Petkov , Dan Williams , Dave Hansen , David Woodhouse , David Woodhouse , Josh Poimboeuf , Linus Torvalds , Thomas Gleixner , Ingo Molnar Subject: [PATCH 4.9 218/241] x86/speculation, objtool: Annotate indirect calls/jumps for objtool on 32-bit kernels Date: Mon, 19 Mar 2018 19:08:03 +0100 Message-Id: <20180319180800.202827162@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andy Whitcroft commit a14bff131108faf50cc0cf864589fd71ee216c96 upstream. In the following commit: 9e0e3c5130e9 ("x86/speculation, objtool: Annotate indirect calls/jumps for objtool") ... we added annotations for CALL_NOSPEC/JMP_NOSPEC on 64-bit x86 kernels, but we did not annotate the 32-bit path. Annotate it similarly. Signed-off-by: Andy Whitcroft Acked-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Arjan van de Ven Cc: Borislav Petkov Cc: Dan Williams Cc: Dave Hansen Cc: David Woodhouse Cc: David Woodhouse Cc: Greg Kroah-Hartman Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180314112427.22351-1-apw@canonical.com Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- arch/x86/include/asm/nospec-branch.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/arch/x86/include/asm/nospec-branch.h +++ b/arch/x86/include/asm/nospec-branch.h @@ -183,7 +183,10 @@ * otherwise we'll run out of registers. We don't care about CET * here, anyway. */ -# define CALL_NOSPEC ALTERNATIVE("call *%[thunk_target]\n", \ +# define CALL_NOSPEC \ + ALTERNATIVE( \ + ANNOTATE_RETPOLINE_SAFE \ + "call *%[thunk_target]\n", \ " jmp 904f;\n" \ " .align 16\n" \ "901: call 903f;\n" \