From patchwork Fri Aug 18 19:49:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 110433 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp1343667qge; Fri, 18 Aug 2017 12:50:17 -0700 (PDT) X-Received: by 10.98.9.90 with SMTP id e87mr2681988pfd.138.1503085817021; Fri, 18 Aug 2017 12:50:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503085817; cv=none; d=google.com; s=arc-20160816; b=sY/cQ/rFT7gJWYZLR+nvITYfCO6lz8AdudFfuO+1mqAet/FHiifW47rJZrAtiwA3Ia GuMcDWnnioEuAhYIWxZcw8oOlhyfk9D0ybJx+bnDywPnZg1QwMBb3UziUu0k9fvhEq6y WZ00+HRRxbaVyuTn2kN/obbbavTT1qNrVdZrkfTyoYLFJsMkE/PZV/KUZzJdKsuuH1qL wS8Ti+6tjBOuISWNt7iyNRZ3ktwOiLa0c5EPdPJ9A0xtg6087VvwPI804DR14HIcCY4s jOm4nBdVuCqgdp9OZWRVkosVvUTYJ4K1OcOWbpUcyLHo2VA00Ww8W6UMzDM9l++Hw9Hb Dp0g== 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:arc-authentication-results; bh=ZyojkDGMz02bC8VQ7FJyIznradwGR+lqn0g7/b/GgKM=; b=D4CHXJjVouAhhRRDAbAbP7MNG1ffFc1/sfeRoKxYSkere8A15kvWXRAAwtZbLC4q29 jn28T7gNmKrVH8TNxYx/T26armc3Lzsn18AaXh0YoXWuA5H0Hw1/buhIHor9c5XWxoz5 SV4j+YXp9sSZY1GSiBbUQGoqNYhl16Y0hDV2NqAXz/f5CjLq17Sh3Z9A1pCYXcHW6DI0 ZXZ++l3tmmfHdQ/o/VnvLKaOG4bYDdf11jgRAMeoTYG8I0QTm09LG5LANxB++E1pDNTD 1q9BD3pyin4p6zYpJCj0CHdWbKNkT9EbC/7/UJd0W3z4n5bjRXcF5L21jZXkQTaX2T3C Ckwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=GBCdAd1W; 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=fail (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 y42si3194122plh.167.2017.08.18.12.50.16; Fri, 18 Aug 2017 12:50:17 -0700 (PDT) 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=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=GBCdAd1W; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752250AbdHRTuP (ORCPT + 2 others); Fri, 18 Aug 2017 15:50:15 -0400 Received: from mail-wr0-f172.google.com ([209.85.128.172]:33989 "EHLO mail-wr0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752322AbdHRTuN (ORCPT ); Fri, 18 Aug 2017 15:50:13 -0400 Received: by mail-wr0-f172.google.com with SMTP id y96so70961706wrc.1 for ; Fri, 18 Aug 2017 12:50:12 -0700 (PDT) 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=8U7GZ5wuSwpXnJUqUv+ilpkVQflbNiuZaWgFCf6bPfg=; b=GBCdAd1W7MJYUYnjjuLB1ywsnwDCXniqx2gZvhFM/EXRSTQNY+lvgwR4/H1T3q3HWd m2xQJGOrdSLqAYVMogtzcN7EuBSAjVKlAfGxdHzN+nLQDHbZtnH1D8t0BLysXhYvRxFH JComkMoiphDJaluzQ75IwBu6Ykj2+kvuxTH6g= 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=8U7GZ5wuSwpXnJUqUv+ilpkVQflbNiuZaWgFCf6bPfg=; b=j/FfArJMj/BBm1v4ZnysUS0d4qqlIenNgGMkPS/EAO7baKVMmbNqNJQF8wIeOYVxok HSqMe2KHxmELcb7k8utoT4J7b+b+oKukKk+pX4X4HtpNYfn/8ufpPSb6vqhYEqaDwWLm JspDxpphenDr64JAY6YZq0EwWQmp5cMIk9xhW6FhQNziwnNifaA4/DPNbtsNnJyBXdnO eL5lOYb97cF1FWOMwonAKPTcQecBWLCo+XGreB3zrxq7t/ZX5gyPmBRpdSQyOc3D+ueI Nxe5JQJaMShhIslzXIfLl6ACV+WU6MF0k/nn/SiRLRyH1sWwErJRcbnu5fXbwy/e/YS1 izEQ== X-Gm-Message-State: AHYfb5gFUVmuz9wo7jUVh8eUUE3KmwXSpqpZJTzPZMWDpDolB2+rZ+sk Mb45/zvXsDuKXw8QpCvV0Q== X-Received: by 10.223.166.41 with SMTP id k38mr6923177wrc.284.1503085811890; Fri, 18 Aug 2017 12:50:11 -0700 (PDT) Received: from localhost.localdomain ([154.146.161.128]) by smtp.gmail.com with ESMTPSA id k29sm5571168wrk.56.2017.08.18.12.50.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Aug 2017 12:50:11 -0700 (PDT) From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Matt Fleming Subject: [PATCH 05/14] efi: arm/arm64: Add missing assignment of efi.config_table Date: Fri, 18 Aug 2017 20:49:38 +0100 Message-Id: <20170818194947.19347-6-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170818194947.19347-1-ard.biesheuvel@linaro.org> References: <20170818194947.19347-1-ard.biesheuvel@linaro.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org The ARM EFI init code never assigns the config_table member of the efi struct, which means the sysfs device node is missing, and other in-kernel users will not work correctly. So add the missing assignment. Note that, for now, the runtime and fw_vendor members are still omitted. This is deliberate: exposing physical addresses via sysfs nodes encourages behavior that we would like to avoid on ARM (given how it is more finicky about using correct memory attributes when mapping memory in userland that may be mapped by the kernel already as well) Cc: Matt Fleming Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/arm-init.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-efi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c index 0aa4ce7b4fbb..80d1a885def5 100644 --- a/drivers/firmware/efi/arm-init.c +++ b/drivers/firmware/efi/arm-init.c @@ -145,6 +145,9 @@ static int __init uefi_init(void) sizeof(efi_config_table_t), arch_tables); + if (!retval) + efi.config_table = (unsigned long)efi.systab->tables; + early_memunmap(config_tables, table_size); out: early_memunmap(efi.systab, sizeof(efi_system_table_t));