Received: by 10.223.176.5 with SMTP id f5csp950244wra; Tue, 6 Feb 2018 09:59:48 -0800 (PST) X-Google-Smtp-Source: AH8x2269EkLn+LvB4ThDfBARte91iyeOLjcpxcnKbc72T+VnqLTircWcyoptEOD7bEKstPiz9OfF X-Received: by 10.98.197.68 with SMTP id j65mr3186147pfg.93.1517939988265; Tue, 06 Feb 2018 09:59:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517939988; cv=none; d=google.com; s=arc-20160816; b=XQ+1VW2NDKY/h/NxYt/M+E1bJptiWNWChSqg/8hjCDDeEeRoXqSHXSPnMs9BK7QHrV xGvz5JnEcC4ylX3LYD77+QLeHxEavU58R0IQ2mDEpe/J36VVRnXaqCFpuT7Yzkf/lJpV DuBxwGVShitKymfi0uRGsbUWeravLyxVJ80RAR1SLrIRemhaxUdQGCTYRIeeN8pz70Nj /Scungv8YBzPtnCF4Krd2xyl/Jzcd9UE2uiLhwlWILFleCT/dlMNh1xL7pBzBmkUIi+J fp1AfUrWsXgIS3qvC1n1zSY3Rd0RLTmara2Qnh1IY3U2LRhAnJIdBzrqcHdNidLSuVO4 Tk9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=hY2TzPKftgCJRLSbkTcIIP9xyxZ0T00eZYSjnQx5h6U=; b=oDxAWRh0vMcQVyZtKy231izK6L/srr1br4157eKEBdtroqhkLDeUojUsk75lOyJFeJ zaejYIRDGsEhJVmL35emAV5Z+MLFfP/9wemSmd01IM9Z4tTE5y8/tElC7iSX/h1pjl1+ LhT44n//4jvo/R55HAU/I9LklBCpkpDL/16JPCRjN1hzb//UtwSI7j+q8lvwm6xoES2z OvVK3HQQoMk32XhZ05NTYnoyr0iT7aqFFOZ5auMtOP3bRGOg+uka6dS69RwbZBzab1ZK +Uq9LvyvhqKUGgENsoo/4gnspoYg+RseqftWymJZoECaIDuSHUMcRwzVPFkdzekekNIt zL3w== 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 v12-v6si1924443plk.577.2018.02.06.09.59.34; Tue, 06 Feb 2018 09:59:48 -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 S1753025AbeBFR60 (ORCPT + 99 others); Tue, 6 Feb 2018 12:58:26 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:41198 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752710AbeBFR51 (ORCPT ); Tue, 6 Feb 2018 12:57:27 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 68D2E1435; Tue, 6 Feb 2018 09:57:27 -0800 (PST) Received: from approximate.cambridge.arm.com (approximate.cambridge.arm.com [10.1.207.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DF2EC3F25C; Tue, 6 Feb 2018 09:57:24 -0800 (PST) From: Marc Zyngier To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Cc: Catalin Marinas , Will Deacon , Peter Maydell , Christoffer Dall , Lorenzo Pieralisi , Mark Rutland , Robin Murphy , Ard Biesheuvel , Andrew Jones , Hanjun Guo , Jayachandran C , Jon Masters , Russell King - ARM Linux Subject: [PATCH v4 14/17] arm/arm64: smccc: Make function identifiers an unsigned quantity Date: Tue, 6 Feb 2018 17:56:18 +0000 Message-Id: <20180206175621.929-15-marc.zyngier@arm.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180206175621.929-1-marc.zyngier@arm.com> References: <20180206175621.929-1-marc.zyngier@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- include/linux/arm-smccc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h index e1ef944ef1da..dd44d8458c04 100644 --- 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 -- 2.14.2