Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1829818imm; Mon, 3 Sep 2018 10:31:10 -0700 (PDT) X-Google-Smtp-Source: ANB0VdajISTdet7NKnoKMb2N4QWDfV8K14a6dk2BSOnCJgxZ+4m4xNmbFOVXc45Ya4QpBSKtj/r5 X-Received: by 2002:a63:e841:: with SMTP id a1-v6mr12567461pgk.126.1535995870390; Mon, 03 Sep 2018 10:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535995870; cv=none; d=google.com; s=arc-20160816; b=cisMaV6GVj/RQTgjm6G/EEUFz1lVvVLGVSnw2fvQSGw7yMH42jrcrW4vt+EWV35hq9 IlurtXjQcHuAz2mE6BKmo+a2syuTWmaoUKXmdwlIu7upatFbFvM9yXva4NVjcxjpcTqJ ZojvWoSKfwyTNIToRcnKe/dE0UeBsgHUTBTkcdugjSjxwm993ubIml1mhgDv94/B2eBC Fs75VZiW6tVP2oeyP+Y7PuQUhUyNCjozDcaEZEcZlZEmZj2bToDqoDfuQiWYG1xsNJeh D7VaAukOly0I9QMUb0ey+hCiksPDrsFiS+HdTjqZJ9GK3w2WNXu2soxdoG9XcQcJbuYh bUmA== 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=NrX/qam7MV0wyXPZ9Le2Si+e4coNOl+0N5gDPZb/9sI=; b=FQx3d5XOpshz2MVbdJ87+n4HcSqJrEYuyyXX+7UdkX8cr7xkidg4aIrb12uOa3+lIu r45IuIfXo+OilOs9u7lVBibHQw7L8vHyojTPW4AcXxKt+Y4v762BjPS8ifgqtwgLepaw pDVcicGJkfxRxJI+DRi/l3rrXlgkGLc+DwqIWOemE58eX826SD6pAxkdsxTj2JfFHOeZ d4I03jP9z7HrkHtjRjA0+vDM13lPMlnXg4L1X+qh4NPbVBGeWVix7VgUWrARaoUpSrLO tY0FXp1viffRqeppMWX9W+M6TcsV6s5/jWzoxy97cUTll1U6Yc7XIQ12d3TFeBVpz15A 6Rtw== 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 b19-v6si20740602pfb.89.2018.09.03.10.30.55; Mon, 03 Sep 2018 10:31:10 -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 S1731015AbeICVts (ORCPT + 99 others); Mon, 3 Sep 2018 17:49:48 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46450 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728613AbeICVtr (ORCPT ); Mon, 3 Sep 2018 17:49:47 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 877CFCF4; Mon, 3 Sep 2018 17:28:39 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Samuel Neves , Thomas Gleixner , Andy Lutomirski Subject: [PATCH 4.14 135/165] x86/vdso: Fix lsl operand order Date: Mon, 3 Sep 2018 18:57:01 +0200 Message-Id: <20180903165702.321599261@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165655.003605184@linuxfoundation.org> References: <20180903165655.003605184@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.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Samuel Neves commit e78e5a91456fcecaa2efbb3706572fe043766f4d upstream. In the __getcpu function, lsl is using the wrong target and destination registers. Luckily, the compiler tends to choose %eax for both variables, so it has been working so far. Fixes: a582c540ac1b ("x86/vdso: Use RDPID in preference to LSL when available") Signed-off-by: Samuel Neves Signed-off-by: Thomas Gleixner Acked-by: Andy Lutomirski Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20180901201452.27828-1-sneves@dei.uc.pt Signed-off-by: Greg Kroah-Hartman --- arch/x86/include/asm/vgtod.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/x86/include/asm/vgtod.h +++ b/arch/x86/include/asm/vgtod.h @@ -93,7 +93,7 @@ static inline unsigned int __getcpu(void * * If RDPID is available, use it. */ - alternative_io ("lsl %[p],%[seg]", + alternative_io ("lsl %[seg],%[p]", ".byte 0xf3,0x0f,0xc7,0xf8", /* RDPID %eax/rax */ X86_FEATURE_RDPID, [p] "=a" (p), [seg] "r" (__PER_CPU_SEG));