Received: by 10.223.185.116 with SMTP id b49csp179203wrg; Thu, 15 Feb 2018 19:22:12 -0800 (PST) X-Google-Smtp-Source: AH8x225PVwjujB+0oqPwf6djN/XVD1Crz6FtdhLcpDmhdLoXiEsBuMNiZuyXYsy8jZHpFAT2UADV X-Received: by 10.101.88.205 with SMTP id e13mr4043256pgu.121.1518751331930; Thu, 15 Feb 2018 19:22:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518751331; cv=none; d=google.com; s=arc-20160816; b=nQRg+fIMRSxv8RABegDcarO/fgK8x34gSHgWkb538nWuKueTy2UMnYi4RdjtbYT+tP iL21AFy/YlY1HdsL90SgMoA5GGseSbE/tINcf/gwMKw/N5d7NCO1x5GVabQ+/2G9ng6d ZZmQlcHCdTqSL9o9lfLVwJt49Vpx6dmZiS2lPBVbEgLI5lQbndUp85tB6vXtjNuixMZt vu6d7AXaTksC3KOJnBEdtjUSerg/2mnPKR7CTYAjjJvzO68P2b1QMdCKTxeqZjhJOaAn zIr0Q5HqcIi040SSosfF3+aYuvhdPaPVdrq5jyuG30NQ5FG4VB6XYEwq4B2Ip+uvJprk T2uA== 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=OFuEkDtMaVoBS23I8OMq2CMwnUhW+6/tzyebb43u+30=; b=q+fZ6SxANKAJjL1eJYuq4oicwNlRYJaIqISEOTrY0eLu+nG48BXliq7qsz747f6+Mm XxWs7ECkP2saCIi+YCYn6CyFXfNOwERPQYahpgzB0Ifot4dLGTGxPDxl9eI4cmuFZdSc UJQ2PLAyR3jiQqEoNUmUUEZav+mERGaxk4MiZx6mkBy30Gm5lRSjm8wTkkU8BG3TFfMF rU1MGXOYPMq4ShL4FTAa0W2ZHYxh5WePN20tORhI2sHNqS3zXTM83TL4MqPA4a3G6dE1 mFGEnCTS5QDTgYaSWfm7zRHmZax+JRSY670imUAGwKrnBgqzQ4sZj48ucFGfZW/urc/P Rv/g== 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 x6-v6si630608plo.104.2018.02.15.19.21.44; Thu, 15 Feb 2018 19:22:11 -0800 (PST) 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 S1165523AbeBOPok (ORCPT + 99 others); Thu, 15 Feb 2018 10:44:40 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:34404 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1165417AbeBOPoh (ORCPT ); Thu, 15 Feb 2018 10:44:37 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 6FCE811A6; Thu, 15 Feb 2018 15:44:36 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ard Biesheuvel , Robin Murphy , Marc Zyngier , Catalin Marinas , Will Deacon Subject: [PATCH 4.15 084/202] [Variant 2/Spectre-v2] arm/arm64: smccc: Make function identifiers an unsigned quantity Date: Thu, 15 Feb 2018 16:16:24 +0100 Message-Id: <20180215151717.855351532@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180215151712.768794354@linuxfoundation.org> References: <20180215151712.768794354@linuxfoundation.org> User-Agent: quilt/0.65 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: Marc Zyngier Commit ded4c39e93f3 upstream. Function identifiers are a 32bit, unsigned quantity. But we never tell so to the compiler, resulting in the following: 4ac: b26187e0 mov x0, #0xffffffff80000001 We thus rely on the firmware narrowing it for us, which is not always a reasonable expectation. Cc: stable@vger.kernel.org Reported-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Reviewed-by: Robin Murphy Tested-by: Ard Biesheuvel Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- include/linux/arm-smccc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/include/linux/arm-smccc.h +++ b/include/linux/arm-smccc.h @@ -14,14 +14,16 @@ #ifndef __LINUX_ARM_SMCCC_H #define __LINUX_ARM_SMCCC_H +#include + /* * This file provides common defines for ARM SMC Calling Convention as * specified in * http://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html */ -#define ARM_SMCCC_STD_CALL 0 -#define ARM_SMCCC_FAST_CALL 1 +#define ARM_SMCCC_STD_CALL _AC(0,U) +#define ARM_SMCCC_FAST_CALL _AC(1,U) #define ARM_SMCCC_TYPE_SHIFT 31 #define ARM_SMCCC_SMC_32 0