Received: by 10.213.65.68 with SMTP id h4csp1733937imn; Mon, 19 Mar 2018 11:47:01 -0700 (PDT) X-Google-Smtp-Source: AG47ELvGFXKu9VDMKfxGo0YADpLr7T5S4dLWKjr39AfjuNpNz1oSZvFTIYw3NaqqSwzJrs3YAEZJ X-Received: by 10.99.177.66 with SMTP id g2mr9828156pgp.425.1521485221162; Mon, 19 Mar 2018 11:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521485221; cv=none; d=google.com; s=arc-20160816; b=I2vCbHhsFywjmyRRQDa04uzbPfzL2COfkDe1l6IxpVaBsVtizwnLjJf8J91zsXnvNC Tpy1D48pdwLaDn/yNAjrz8ewfennmm+43ymXVFanApsShytexwu7fs2Wxax+dRTE5MFO 6pmXWzCEExjhcHrLpdV4IHPqidRAzohjOGNwDbYpE6tEGNLi5RKa3bsARkkMNKtMZyxE t99s4kWqvJGg8mPW3fKtAdBUXAkU7pUFx3zdTt4feK/E3PFJDvrWdKpUQ9cZiMkwIaC7 fpF7CabhdmuEbZ2LNcLN5jlRhl+MQgfvqsvZNHlzptSL6HKmYatxYAIxWOaP/uRWiCHq 942w== 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=7CqXmprZ6k2c+XXWbrB8tOTpVJ6YFo1UH5INVR1Id/M=; b=vjGDRVRDY2bgTgSpP/xQnLE+x4aPz6SLcnI6RduwltEkGkz5P0ELRB+k8qxlM25G90 iFWsuPHdbrGriEwPhaVHQapfKGbx8f1cnzihzlJpbRSYfwpiPFaOW/INuuPqbNuDCb5i GvnHbEAhODFh6WCESdEKUR6NLRZEjLYPQiPCKnfm+iwf3NfzcyPtDBYDDBHnCmeLZZyL G+hVt1xVpWID12J+u3Ap1PvkkwsMTl5OWBaDNxL2jCyrzMfZIm0uQulAjRWugaoaPwsn LDtEXYYczayRuUi88tApJhHXhVjWjBNttD7SamQm/xKPX3mdEoHW5aK8Kz9GNQI7rwET qGkg== 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 d71si340522pgc.411.2018.03.19.11.46.46; Mon, 19 Mar 2018 11:47:01 -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 S970229AbeCSScI (ORCPT + 99 others); Mon, 19 Mar 2018 14:32:08 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:53806 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S970057AbeCSScD (ORCPT ); Mon, 19 Mar 2018 14:32:03 -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 C0496129E; Mon, 19 Mar 2018 18:32:02 +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.15 06/52] x86/speculation, objtool: Annotate indirect calls/jumps for objtool on 32-bit kernels Date: Mon, 19 Mar 2018 19:08:04 +0100 Message-Id: <20180319180735.398008576@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180734.976730813@linuxfoundation.org> References: <20180319180734.976730813@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.15-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" \