From patchwork Fri Dec 21 11:54:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 154392 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp823830ljp; Fri, 21 Dec 2018 03:55:05 -0800 (PST) X-Google-Smtp-Source: ALg8bN4R0DCcagnMsnna9AHRPyOJapL0DV8xmjuMYzfVxIdIptWJvc2UA5usY+M/OwjbX60zt5NU X-Received: by 2002:a63:2e88:: with SMTP id u130mr2130792pgu.9.1545393305338; Fri, 21 Dec 2018 03:55:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545393305; cv=none; d=google.com; s=arc-20160816; b=xgGFnFyHhYj2IBGpV87t7+Mf7TuJB1mfUAGeLDaktAs/kIJG23fNTtZZ6BZ7UmmizM i1uYV83v0nm0aX+g6gBol7D2qcNaIWExjcQpb4oiF3Eid/WFOAkidCPN/S7Vi1R0q3J9 OIYrPNHYnYa5VzUac9bP9WfiinjKqjSl5KeWnP73LkJGuO7VsfN0Pda8V5FNkiwsLSQ0 3gREeJu4ngPhL9gx73TybqyxDWvBIzUedPQjsLVXU77ap3wIDi16/9R+liJEiYJuzTyi J0AMK93+lyHXthsk5XPpGLbiZ+ZefUPL27BQBQkNgL2AqEEhzRrIGKDUD+iQ2wgJDUqw 8CBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=M9HTCCaeALTLt/84Ytfm36opQM3Uh/gXyTXN87Cet1A=; b=wS5jFyxI2LuxSJJrwjgN/RL1jfkh325+p7wCk82n5FfYqX4IPcTwQGH5S34mq1F/tS hHcJph2uyljGKAA+zyTOokxX+4ygv4yTV7h2SLGcki5GFqG9+EgS+8yhcrhigoJRDT7T 4miqSBh1xyD5+4pitYqzRL7JJ/8lBO2WDPgBlzbUxgJJH9idhoh9cf0F+9TwSI0eJcfP UyHPhCCicJ33VXFGeOPtu6iNtXEnEAjkmvhIpUvHPmxjs9MslFZ5Vbhc4+cyCoqAcY27 U+5DPXSdUiVRQ9neCiDiMui9VqQ46k0Lhx4p/x0RX6Hzq1hahtcEz5sfM7gAgSQIdCzd jS/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d9KhiXhn; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-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 g184si6306150pfb.288.2018.12.21.03.55.04; Fri, 21 Dec 2018 03:55:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-efi-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=d9KhiXhn; spf=pass (google.com: best guess record for domain of linux-efi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-efi-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 S1725781AbeLULzE (ORCPT + 3 others); Fri, 21 Dec 2018 06:55:04 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42298 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389213AbeLULzE (ORCPT ); Fri, 21 Dec 2018 06:55:04 -0500 Received: by mail-wr1-f66.google.com with SMTP id q18so4960730wrx.9 for ; Fri, 21 Dec 2018 03:55:03 -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:mime-version :content-transfer-encoding; bh=M9HTCCaeALTLt/84Ytfm36opQM3Uh/gXyTXN87Cet1A=; b=d9KhiXhnkU3k46/TomBD7mKuYURwaM9swkvPfEPRKnuK/SH/M9rFnM0r0jarQ1Bjdl 6PW/uNOgg9XtQX+Z+AMhyKmkrEjBRXjRndTbZaQun74WTx+F0pJk8TDi9g+0zjiExAEk 5WZUlJosdmEXoyi0U7+gIkJCgYnMw7XxZX5e0= 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:mime-version :content-transfer-encoding; bh=M9HTCCaeALTLt/84Ytfm36opQM3Uh/gXyTXN87Cet1A=; b=d0XM+DWoh8I7xChv4NhJm/YdeZdus9nHmxsZdvgJ5KrA9GwRQR21QLmcCTD2IqGD06 pPGvDAuq3vxT8gq/4ngXDlKi8GVRC8iH+qAB2a9HNpkXsEX9lERfDpMvs55gdBZDvILj ltOvW4+IUFIeFxjD0IRBKlM7R+6eU+6wd3bpNb0lADZaqQEohMnf1oXOSYPEViHqNQDf eZuuO1ZE42cR3yy0c/fjJ4nfXclJHihlPpiRIkQrc2bphwbj4o/PLEoj/ewGos9dmoWm xtW5H0ljxUCV4X+zSYjAFMFHlJIKcEBMohyM+gOjJkCjqx3Zqs2rOsAD8gjWJGOQL3hS MNhw== X-Gm-Message-State: AJcUukeIPxk/fFT/+M55xLjyP/Bn27jreQHReTniduOw3e0ugGPHYAef U8gQCjkeON8JV19QCDVBect3eAjFnuq5hQ== X-Received: by 2002:adf:fe11:: with SMTP id n17mr2261138wrr.329.1545393302195; Fri, 21 Dec 2018 03:55:02 -0800 (PST) Received: from chuckie.home ([2a01:cb1d:112:6f00:cd25:3201:110c:550a]) by smtp.gmail.com with ESMTPSA id g9sm5392883wmg.44.2018.12.21.03.55.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Dec 2018 03:55:01 -0800 (PST) From: Ard Biesheuvel To: linux-efi@vger.kernel.org Cc: Ard Biesheuvel , Ingo Molnar , Andy Lutomirski , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , Linus Torvalds , Peter Zijlstra , Qian Cai , Rik van Riel , Thomas Gleixner Subject: [PATCH efi-urgent] Revert "efi: Align 'efi_guid_t' to 64 bits" Date: Fri, 21 Dec 2018 12:54:46 +0100 Message-Id: <20181221115446.2670-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org This reverts commit 793423cf07e51e3185b8680167115813589c057d. The 64-bit alignment affects the size of efi_config_table_32_t, which is used as an array type. On the other hand, the former byte alignment could trigger alignment faults during firmware calls on 32-bit ARM, since UEFI defines efi_guid_t as a struct of UINT32 + UINT16 + UINT16 + UINT8[8], and so it may use load/ store multiple instructions [requiring 32-bit alignment], e.g., on GUID pointers passed as function arguments since UEFI's view of the type has implicit 32-bit alignment. Let's sort this out for the next release, and revert the change for now. Fixes: 793423cf07e5 ("efi: Align 'efi_guid_t' to 64 bits") Reported-by: Heinrich Schuchardt Cc: Ingo Molnar Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Dave Hansen Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Qian Cai Cc: Rik van Riel Cc: Thomas Gleixner Signed-off-by: Ard Biesheuvel --- include/linux/efi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.19.2 diff --git a/include/linux/efi.h b/include/linux/efi.h index e6480c805932..100ce4a4aff6 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 __aligned(8); +typedef guid_t efi_guid_t; #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)