From patchwork Mon Dec 17 18:02:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 154032 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2755642ljp; Mon, 17 Dec 2018 10:02:29 -0800 (PST) X-Google-Smtp-Source: AFSGD/UUSkPz3bd8Tt2egFDS4N4fdkWA8UjwfQzBmqlECuP6g55dMN0WiOIIcLz0rKwa3sozvvwd X-Received: by 2002:a62:520b:: with SMTP id g11mr13852011pfb.53.1545069749827; Mon, 17 Dec 2018 10:02:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545069749; cv=none; d=google.com; s=arc-20160816; b=jgrbCQjPr0LZkwY/KtA9xX6H+FzhWFhChoj63Hv7DJLbD0NiMOe1YEDwHuwMCRBJzg KMFXvJvMvPBWuN5t+DcqQJsP5ZPcXa+KyYKrBuY6+Goiuu4STAX0NWncK5Ri6rOr2j9s ThSLfuvuHr5U+/EaAfP4iiFGJHCD/aP1d2eb4EvV4k15jNbD/MkFTXRQomUYUWMRWB13 GsSfDjo7vU6CM0g703CAGMDA7pvx4/DO8ilzQzn9N4vXY1JydRoma+NHC0DdY0nrJk7j 2qQqUTl7+lxhFt0b87RlSSbbU4NsXvrUTAFk7yRKNNJ990pZ9AMlRQBddBWUfTam99sX A1Lw== 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:dkim-signature; bh=3UizkdkN0o9xnFgf0i3mdX9CPUyBVCA0xiH0LvZg15o=; b=Lm3luNsW7NCbpPyv7eHWMN3G9UkwlKUBkSXmNytkvKlfjTkOI+WewzIi+fF0sfkgU1 zSAPPFUpfBnWeKvnkt0x4rtSk2/j/lCw0rEEvpdu0cmsAe5RbBLHADolqtBb2ITX4bz+ P7S8mimwVIRm3XChpYQRnq6bs9kssqc5PoF//UJSCWGjriZGTX9QOrmUVQ7MQMW3EBCU QDMJY70Ck/E40jAhJpNstSDeIQCjlfcXnvFyqkOuOxYGOFN8W8HmDoVqxccub1dwR3Gm NuKS2YtBtvlb/+v27EAY1cmxXWF4HrpiDVS4KKBeMqkLK/6OnMa80YFB8ix5a13e0Z0g gVYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jJLWYhWM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 91si11391140ply.214.2018.12.17.10.02.28; Mon, 17 Dec 2018 10:02:29 -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; dkim=pass header.i=@linaro.org header.s=google header.b=jJLWYhWM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388549AbeLQSCX (ORCPT + 31 others); Mon, 17 Dec 2018 13:02:23 -0500 Received: from mail-ed1-f68.google.com ([209.85.208.68]:40052 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732476AbeLQSCW (ORCPT ); Mon, 17 Dec 2018 13:02:22 -0500 Received: by mail-ed1-f68.google.com with SMTP id g22so5486368edr.7 for ; Mon, 17 Dec 2018 10:02:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3UizkdkN0o9xnFgf0i3mdX9CPUyBVCA0xiH0LvZg15o=; b=jJLWYhWMc8Nf6kueqq417Icl80VNSh6rawjfdMnkh5kEvTDN/No8UHMbuzV6MR2AER 9po5Bx7x2hZ566LpKbxpRNfC7HRDsqKlreCN4pAUquXFChMPRg9HQkAkkCFQLwVKiYQo OXkPQjadB42gj3DTQSHKp/UZjqss6p58/2XRA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3UizkdkN0o9xnFgf0i3mdX9CPUyBVCA0xiH0LvZg15o=; b=UYHg7PeL4uYG02tKMfYXkesuVjWhIGDgMkonzfz5wRcKEfXCA3tc8SCpdn39Sp4W4P 6pwz1dYpf5Ha/I+juixPJuYVd0NsbldwMSdBMBK22gwa9b2c1IaXrvJphGfmjwXS1vNY fRTEBDABO4ZzQ+KVqJe60H4Q2BD+56mtFYy2M31Rvw9sSSIJmGF9JTr6GpToOGsoLA5N Rgq3JDAsOcc9WJXG9mcN8m6Zo26OMsgrWkzJdSerGz67HUfxWa5Xo09ggW5KPcAxdjBZ 8bhxL/1nIjsvPVxvgub9ASTqGguMWfJoGCj+2L30yNC/9J01qAbDKQJo4CSHcatG690k A0+w== X-Gm-Message-State: AA+aEWa1uMQemiduffgUOYHmXCNRcOP39q3FJyji5xqIX1YuXlwchVNg tZ+UKCVRWFDjzCryop6WpOqOBxkjWdVItxyU X-Received: by 2002:a17:906:6b99:: with SMTP id l25-v6mr10622266ejr.154.1545069740215; Mon, 17 Dec 2018 10:02:20 -0800 (PST) Received: from mba13.arnhem.chello.nl (dhcp-077-251-017-237.chello.nl. [77.251.17.237]) by smtp.gmail.com with ESMTPSA id j8sm3947678ede.55.2018.12.17.10.02.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Dec 2018 10:02:19 -0800 (PST) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Heinrich Schuchardt , Qian Cai Subject: [PATCH 2/2] efi: efi_guid_t must be 64-bit aligned Date: Mon, 17 Dec 2018 19:02:14 +0100 Message-Id: <20181217180214.9436-3-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181217180214.9436-1-ard.biesheuvel@linaro.org> References: <20181217180214.9436-1-ard.biesheuvel@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Heinrich Schuchardt The UEFI Specification Version 2.7 Errata A defines: "EFI_GUID 128-bit buffer containing a unique identifier value. Unless otherwise specified, aligned on a 64-bit boundary." Before this patch efi_guid_t was 8-bit aligned. Note that this could potentially trigger alignment faults during EFI runtime services calls on 32-bit ARM, given that it does not permit load/store double or load/store multiple instructions to operate on memory addresses that are not 32-bit aligned. Cc: # v4.9+, or earlier if possible Signed-off-by: Heinrich Schuchardt Signed-off-by: Ard Biesheuvel --- include/linux/efi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/include/linux/efi.h b/include/linux/efi.h index 100ce4a4aff6..e6480c805932 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -48,7 +48,7 @@ typedef u16 efi_char16_t; /* UNICODE character */ typedef u64 efi_physical_addr_t; typedef void *efi_handle_t; -typedef guid_t efi_guid_t; +typedef guid_t efi_guid_t __aligned(8); #define EFI_GUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \ GUID_INIT(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7)