Received: by 10.223.185.116 with SMTP id b49csp2638056wrg; Thu, 15 Feb 2018 15:09:40 -0800 (PST) X-Google-Smtp-Source: AH8x2252vipOUDai2clu0lfcTH37cmaZ1TV5k6W+6l24NfeJCvdjIXqal9k47gExxPZQmhUq//j4 X-Received: by 10.99.65.199 with SMTP id o190mr3534176pga.238.1518736180351; Thu, 15 Feb 2018 15:09:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518736180; cv=none; d=google.com; s=arc-20160816; b=zFTQ2FAQ79+KGxs7j9Owbe6x9m+9x6PN+iEhKlZcvF0d/WXMCyePdO7b8eZDr+Z2PI 4NJV1rfSFkVpZkEgItZ+nUcJDLs7ZqfDl6xpjd1cdgWknlQ6/PpJfQMS139bbGVe0/3M ZdXdPkpZnYJ6xPIUugeF8kdqMHshSxoNerY+uRR5f2Q+CqT5I2FTXbJ9KdOZYWSSqHKI m9400A/8QIY1Brko10+H8UC7tPo+QRA/70u3I9tLiu+MXS2zbZtD4FftvoAP0Yow5arF NZJl1z0bfXzLce2MWKLj1yi9bEFWeFzYH2NbWhSl6rwTNSMSHhecoP/B65l/0cEpO310 AOQw== 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=zwv7/SNqKMvsivwwD/A1nr6HpQrTAljCrPip0fKmRG4=; b=VtiamrQz6YFPIn3P2XHH66ZIxBsrXA95AdVzxsnyxskU3Mpja6Qy+wL07JAUi1t6f9 bIaCNttHwkag18azBZxCmB91xoiCi2oEKHYN+oYvF+z7cuYBgX0dsC/nxvc4U/FoLO0C 451jsR/DcdXJHaQiu7WsI48dKxNReyVid0ZSVWrFwTde3oPxGK5O2tJuhMnG63FuhTfb XYf9B/dNwSKPjVFdoV2mAanr8UmXdXV/2Ut2AGSzVRFW9N+FKAlYG7h05DJf/z8seLHP a61qIV5tMkCADazQbECJrVoP0rgM/zSknpdO6Qf7XX/S9l6PGWqIHU0cMAFVwYvteJfw LMnA== 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 g33-v6si3478450plb.251.2018.02.15.15.09.25; Thu, 15 Feb 2018 15:09:40 -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 S1422687AbeBOPfJ (ORCPT + 99 others); Thu, 15 Feb 2018 10:35:09 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:57364 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1165194AbeBOPfG (ORCPT ); Thu, 15 Feb 2018 10:35:06 -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 0439C1134; Thu, 15 Feb 2018 15:35:05 +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.14 091/195] [Variant 2/Spectre-v2] arm/arm64: smccc: Make function identifiers an unsigned quantity Date: Thu, 15 Feb 2018 16:16:22 +0100 Message-Id: <20180215151710.259634874@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180215151705.738773577@linuxfoundation.org> References: <20180215151705.738773577@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.14-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: Ard Biesheuvel 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