Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp836997pxk; Thu, 3 Sep 2020 13:59:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHIQXfMczFpy0dNGHHQ387MXyn3W09Ec/R/hznOrIMHpTvw809CvF1Y8uLCyaXEbCUNEQI X-Received: by 2002:a50:9f22:: with SMTP id b31mr5233521edf.345.1599166780593; Thu, 03 Sep 2020 13:59:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599166780; cv=none; d=google.com; s=arc-20160816; b=jlyhzypbluGiE7Kknnt4WcLZUYFu3zm5SUtPgJNXjELYyw3d0sLGaAt0cqGdc6Ue9g QR9wxjPIAcpd6BWW2uYyIXY9GQkZAduWkCJ1RRoPKPpQq0g3ZAcBKMWxTkuVCdTibK8y xV5MKo7bHIOiP6RsYsgsZ3lhp6T37phBtimYLsKHJQha7Md4m5EK932EaPHkOd+eyIju DHNprg3mC0lJ/eEZCX7596eDH98G2tcHmITaW3wKXZEikbyS9XirD8234T0ePGN9y5Bz NEgcYckvhU/tzT2mrsdFsdbJeUDGvCBK2PSL82bSYrA91Ja0ye2J31ZpJlDEVKkwOa7X 7syQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:dkim-signature :dkim-signature:date; bh=rJ20J1YSqOfNWFeT2d2mdgWk7Y+euLW9UaUt0BBj1Ps=; b=jZVG+Keq4UfncIzDpAw8i8UPbX6ay1AtkDe8dNPCV5Siz/GdAg9es2W+kNDcAm6Zu7 5Dmhi3vPTnCdfgW9ALyitD3eInqr4B7xOGvc/4u4hwKlMGWzVGn+Sq3923J9MuNVXPui fsi0Ii/XwyfO2LbKsXbMVkZ2mOq+Onz3oOWxyjlPEm31QsyCptw/vqCzlx85wkXzOBQ/ YhA7Ic2eYldyUagZyVdkDh7y46nWMGrHbK4J4ZHH+hJBi52Svta4E6zBcVtm4AHkoJTN rcmQPetL4UTieHtNha5VfP1WuNqqKfGbtjI/ymkFxD73QTltfyk1deol44CVg95I91ox XyTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=hPf9J6SS; dkim=neutral (no key) header.i=@vger.kernel.org header.b=39at3G12; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r15si2578585ejx.326.2020.09.03.13.59.18; Thu, 03 Sep 2020 13:59:40 -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=@linutronix.de header.s=2020 header.b=hPf9J6SS; dkim=neutral (no key) header.i=@vger.kernel.org header.b=39at3G12; 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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728115AbgICU57 (ORCPT + 99 others); Thu, 3 Sep 2020 16:57:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726088AbgICU56 (ORCPT ); Thu, 3 Sep 2020 16:57:58 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9664C061244; Thu, 3 Sep 2020 13:57:57 -0700 (PDT) Date: Thu, 03 Sep 2020 20:57:53 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1599166674; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rJ20J1YSqOfNWFeT2d2mdgWk7Y+euLW9UaUt0BBj1Ps=; b=hPf9J6SSh/ic0F+Nv+pNMkyRTgsm2/xC9DmJ4N99inQArqfIWn9FGIkbOvfSNyI1RAM5DR YO7yrLz6ncrHEU0k5S4P4SHvjcEgjaeId+/r+uoi9ThxmmUp0y44dCUM3Ejdjs4Tl/49hO +muywDPpbGhZTbRSir/Z08BQH3KKYvx2DXT175r9zz3vp24rpR2qvy1X41p8NtfBxEE2c6 roI7UFtS8zOW/2ESBlbrUNvY+oe/nWO0eST7egUpc4tFgHgECU7/G7GPxdVRjehdZMp56I ovgvMK5/4xFzpcJW22RG4QROftqViiZFA/KfICZU9rfb1ncuwlsuc9+pfG2rcw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1599166674; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rJ20J1YSqOfNWFeT2d2mdgWk7Y+euLW9UaUt0BBj1Ps=; b=39at3G12Rg5PBDmWl306lDRgzDBXpFiKaviJxvhuQZzWOUG8g9EyeRE8inoYqpmxttP8+1 +Dhfd9sr5WBx95Ag== From: "tip-bot2 for Uros Bizjak" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/asm] x86/uaccess: Use XORL %0,%0 in __get_user_asm() Cc: Uros Bizjak , Borislav Petkov , "H. Peter Anvin (Intel)" , x86 , LKML In-Reply-To: <20200827180904.96399-1-ubizjak@gmail.com> References: <20200827180904.96399-1-ubizjak@gmail.com> MIME-Version: 1.0 Message-ID: <159916667349.20229.3414153735244091368.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the x86/asm branch of tip: Commit-ID: 767ec7289e83721fee205a13b459f12fb2cf922f Gitweb: https://git.kernel.org/tip/767ec7289e83721fee205a13b459f12fb2cf922f Author: Uros Bizjak AuthorDate: Thu, 27 Aug 2020 20:09:04 +02:00 Committer: Borislav Petkov CommitterDate: Thu, 03 Sep 2020 22:49:03 +02:00 x86/uaccess: Use XORL %0,%0 in __get_user_asm() XORL %0,%0 is equivalent to XORQ %0,%0 as both will zero the entire register. Use XORL %0,%0 for all operand sizes to avoid REX prefix byte when legacy registers are used and to avoid size prefix byte when 16bit registers are used. Zeroing the full register is OK in this use case. As a result, the size of the .fixup section decreases by 20 bytes. [ bp: Massage commit message. ] Signed-off-by: Uros Bizjak Signed-off-by: Borislav Petkov Reviewed-by: H. Peter Anvin (Intel) Link: https://lkml.kernel.org/r/20200827180904.96399-1-ubizjak@gmail.com --- arch/x86/include/asm/uaccess.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/uaccess.h b/arch/x86/include/asm/uaccess.h index ecefaff..2bffba2 100644 --- a/arch/x86/include/asm/uaccess.h +++ b/arch/x86/include/asm/uaccess.h @@ -343,7 +343,7 @@ do { \ "2:\n" \ ".section .fixup,\"ax\"\n" \ "3: mov %[efault],%[errout]\n" \ - " xor"itype" %[output],%[output]\n" \ + " xorl %k[output],%k[output]\n" \ " jmp 2b\n" \ ".previous\n" \ _ASM_EXTABLE_UA(1b, 3b) \