Received: by 10.192.165.156 with SMTP id m28csp243837imm; Tue, 17 Apr 2018 09:24:14 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/mvpBvsdfIizmIWQm9cPcVcdRX8BTdF3xMP22c3tJQ+aImh4WqNkvKh9AIlxN4HklX+7F0 X-Received: by 10.98.23.134 with SMTP id 128mr2564201pfx.120.1523982254369; Tue, 17 Apr 2018 09:24:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523982254; cv=none; d=google.com; s=arc-20160816; b=QQ8/0HxLDOAfSX1bNMDLDpzyqFxZ4KKCXR1zaHuLAEtHlD9ppTu/npjj1Jd4uO0dN7 tNEAcUWvsSoT4WU7S3hI5Tbqfm7ZgdWLNYFsIg+yBeiUAm1CjFXyZ4xJMCPPRSpaAX6r VXe/vNmw0E6vGc7L7COWBTkMJ17+khp8YIkKVke3PBcZK88KRoj5IqA3iMRhUcpFXgLB J/vkMknGk0PRgCOZKBacBq47QrD96mHu6zH7kQaWMMSkPftFJBNa9rkx4aWCq4A3eKvX bOyGHHQ/W+tyqIy4C1xvgrlJWzNJ5e81u3Gxf5QOgxjctwLxv6OY26mya2X38O2W/CdE WPLw== 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=Fo+/9j339oFgl7hAAM9r29QEP/UAj2HwmxAzqxArF4c=; b=I14//bXW63YEclKsNX1KZw+Y0mdwNCQ0HHjJQZyIn6+htcQBzucAXyjmlpHBrDoRLg 0P5GlASgeAV+2mHqb8YLVAlUzrhAswH0EAkpVpmOF3uFafzSGDziF02Yb9+prhexbv+Y nlSFbQzwtwm+SpIDImizc2cZ0Tnh97FNbv67sDzRbZSv3L/B1Kmcw4ML8IV9XbB7/QTj INyA3ihbJp8/XImPqMR1WsEaBkKTCN0PtUdFmYHRn7Xa7T89WoaES3pcxnqP1w5fAwHs kb2PegB+lfZZfYlj5zymEpMGSPwBZzaLSM3j1oNM+RBOWKcWRWarT2YTMUY/78AcgCeF cpog== 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 x3si11681358pgp.298.2018.04.17.09.23.59; Tue, 17 Apr 2018 09:24:14 -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 S1755416AbeDQQJv (ORCPT + 99 others); Tue, 17 Apr 2018 12:09:51 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36216 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755687AbeDQQJs (ORCPT ); Tue, 17 Apr 2018 12:09:48 -0400 Received: from localhost (unknown [46.44.180.42]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id B581AC00; Tue, 17 Apr 2018 16:09:47 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Ard Biesheuvel , Robin Murphy , Marc Zyngier , Catalin Marinas , Greg Hackmann , Mark Rutland Subject: [PATCH 4.9 47/66] arm/arm64: smccc: Make function identifiers an unsigned quantity Date: Tue, 17 Apr 2018 17:59:20 +0200 Message-Id: <20180417155647.924667395@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180417155645.868055442@linuxfoundation.org> References: <20180417155645.868055442@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.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mark Rutland From: Marc Zyngier commit ded4c39e93f3b72968fdb79baba27f3b83dad34c 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: Mark Rutland [v4.9 backport] Tested-by: Greg Hackmann 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