Received: by 10.213.65.68 with SMTP id h4csp700298imn; Fri, 6 Apr 2018 07:30:13 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/+9Q73/Gojl9ZJqD7hIWYzsJW7/+lvCfeCkSfFrLXaJQgz7oSgrl3cRip36c5pcvnDFWad X-Received: by 2002:a17:902:566:: with SMTP id 93-v6mr26787487plf.327.1523025012989; Fri, 06 Apr 2018 07:30:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523025012; cv=none; d=google.com; s=arc-20160816; b=rGM3HPpnMybU8wVD9rOArZYIYyuJUyps+abndRe51w16FlvKzZBNr6xYbMOrv+pu5B dYeOKTblERMx4zLyBo+cnnyiub0hj6owfwjwPHWCtO9D+NmSFrdabHybIQIuLzv5bfoz 2RKue8i0FwznkGucjq4WRrr+lwnuvmKqxmm5t1QoBC/kMAUIX/joMoQzxxNeogOnAE0N uRiw/UAgA+2Eu6A4x1W/yAkDYmXYOv9vmB0bDQD8AB/zPE8yLCZD4SjJGLwkv6Z3f8v3 U/RbXWEIwhj4zTFD4kDGxf86QczlB7g1LmXudxfozbJ9bm84YlltHbVU/i+fnaS2I2dR hc1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=XOdBtSYADHYdXp5Fg39L/KynQDB3LAThxw9WcOEdfdk=; b=r2f+TJGlpEjN1OnigjUXWg7SiHcABwVaITpK1Eyg8zvNdCBZmtLRR9pKeFgp8um1zu ggzpqhcFwTOrdJwmDgEH0Fxh0tZ+J01yrA4vs1/ZXWyK63API33wVLRE4YYgc21m6uU1 tWSCn67sJKicYJGCamDoPeJSjCbBiTEo/X0fJ6U57jhfcgooWXY3onSbAKCwe7BL3LFs hQ51H5XgosjtV6vh9ewsrE51o9E1BZmdT8Jdn/CTneYLD7Z5nFFBmiAdJ9FIJee86C1f 2UVl4PC8kfJyaO45m4VLxamLyei3B98PF4xYEYB2SQJo7ETem2gn9okTtNlziW5qh6/x 0CVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OMAy3RrU; 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 n77si8057118pfh.307.2018.04.06.07.29.59; Fri, 06 Apr 2018 07:30:12 -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; dkim=pass header.i=@linaro.org header.s=google header.b=OMAy3RrU; 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 S1756776AbeDFO24 (ORCPT + 99 others); Fri, 6 Apr 2018 10:28:56 -0400 Received: from mail-io0-f181.google.com ([209.85.223.181]:44474 "EHLO mail-io0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752974AbeDFO2v (ORCPT ); Fri, 6 Apr 2018 10:28:51 -0400 Received: by mail-io0-f181.google.com with SMTP id d7so1931163ioc.11 for ; Fri, 06 Apr 2018 07:28:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=XOdBtSYADHYdXp5Fg39L/KynQDB3LAThxw9WcOEdfdk=; b=OMAy3RrUHuaCBDNJ6T++dG41Odb0jrxIZYUf1SNv2jK+7tPpwCA0vFJYTFqEjhwazj bjh4111LRDY8/J0hZV1aDKd9urEsksSGw5DjKNK2Ll8diomJE/noYqk8PM0U1p3UX+vu s3f467HNe/eRxylzh0+5cY7NzpKLdM+cqBack= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=XOdBtSYADHYdXp5Fg39L/KynQDB3LAThxw9WcOEdfdk=; b=p0SKFFHCjeNUdVjOcY1uXpbl4h5ovxIl9ngOk0LqBM/W4Vbi3k/PJ0LzLHXIrX0xV4 biX2INnW6GNbGeoPoATSojQcflFXV5rBx3cRxzoBzrFJ+kszbKM3DE8CNlRDfr6h/ucI Gkozh4TkYmNEalta6Il1M7hOgWMMPNMzP5/eqWJpbkeKnKvu9d6eSYrPXtQW3asWuWR6 0CC9W2BNyx+Pn4Fn2t92GU1lXYo5eUPN9+CxlpvBGcZviCTYrZVf6UZRYXgheInygxK+ QLeIFbqfUOIMapD48iuQjT5O5Y4qULffurkDDcbrkyWTKAweMgWTLz20pC/7B4aPLnyI a0NA== X-Gm-Message-State: AElRT7Eu6Pb5wiYBxsvx+AnQa8oxmTmSCNF8QNEoh4c6XSAQEA8+J5JR sza2Eha2xGHd+KrubyEqeVDsi1+LTUGONJNeBsp1cA== X-Received: by 10.107.14.136 with SMTP id 130mr23882406ioo.170.1523024930561; Fri, 06 Apr 2018 07:28:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.187.67 with HTTP; Fri, 6 Apr 2018 07:28:49 -0700 (PDT) In-Reply-To: References: <78ae4d18-8964-5748-a69f-0017d0dca5f7@redhat.com> <20180404171835.xvllgcqirl3b5gd5@redhat.com> <20180405054349.GA25653@wunner.de> <20180406140832.GF30543@wotan.suse.de> From: Ard Biesheuvel Date: Fri, 6 Apr 2018 16:28:49 +0200 Message-ID: Subject: Re: [PATCH 2/2] efi: Add embedded peripheral firmware support To: "Luis R. Rodriguez" Cc: Lukas Wunner , Peter Jones , Hans de Goede , Greg Kroah-Hartman , Thomas Gleixner , Kalle Valo , Arend Van Spriel , Ingo Molnar , "H . Peter Anvin" , Linux Kernel Mailing List , Dave Olsthoorn , "the arch/x86 maintainers" , linux-efi@vger.kernel.org, Will Deacon , Andy Lutomirski , Matt Fleming , David Howells , Mimi Zohar , Josh Triplett , Matthew Garrett , One Thousand Gnomes , Linus Torvalds , Dmitry Torokhov , Martin Fuzzey , Kees Cook , Nicolas Broeking , Bjorn Andersson , Torsten Duwe 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 On 6 April 2018 at 16:14, Ard Biesheuvel wrote: > On 6 April 2018 at 16:08, Luis R. Rodriguez wrote: >> On Thu, Apr 05, 2018 at 07:43:49AM +0200, Lukas Wunner wrote: >>> On Wed, Apr 04, 2018 at 01:18:36PM -0400, Peter Jones wrote: >>> > > On Tue, Apr 03, 2018 at 08:07:11PM +0200, Lukas Wunner wrote: >>> > > > * Add the EFI Firmware Volume Protocol to include/linux/efi.h: >>> > > > https://www.intel.com/content/dam/doc/reference-guide/efi-firmware-file-volume-specification.pdf >>> > > > >>> > > > * Amend arch/x86/boot/compressed/eboot.c to read the files with the >>> > > > GUIDs you're interested in into memory and pass the files to the >>> > > > kernel as setup_data payloads. >>> > >>> > To be honest, I'm a bit skeptical about the firmware volume approach. >>> > Tools like UEFITool[0] and uefi-firmware-parser[1] have existed for >>> > years, still don't seem to reliably parse firmware images I see in the >>> > wild, and have a fairly regular need for fixes. These are tools >>> > maintained by smart people who are making a real effort, and it still >>> > looks pretty hard to do a good job that applies across a lot of >>> > platforms. >>> > >>> > So I'd rather use Hans's existing patches, at least for now, and if >>> > someone is interested in hacking on making an efi firmware volume parser >>> > for the kernel, switch them to that when such a thing is ready. >>> >>> Hello? As I've written in the above-quoted e-mail the kernel should >>> read the files using EFI_FIRMWARE_VOLUME_PROTOCOL.ReadFile(). >>> >>> *Not* by parsing the firmware volume! >>> >>> Parsing the firmware volume is only necessary to find out the GUIDs >>> of the files you're looking for. You only do that *once*. >> >> How do you get the GUIDs for each driver BTW? >> >> Hans, I do believe we should *try* this approach at the very least. >> >> Why not? >> >> Otherwise it would be wise to provide a technical reason for why >> we'd choose one custom mechanism which would only serve a few tablets >> over a mechanism which could serve more devices. >> > > Because EFI_FIRMWARE_VOLUME_PROTOCOL is not part of the UEFI spec but > of the PI spec, and so we will be adding dependencies on > implementation details of the firmware. I am aware we may already have > done so for the Apple properties support ... or maybe not: I thought Lukas alluded to that in this thread, but I can't actually find any traces of that in the code so I must have misunderstood. , but I think it makes sense > to make an exception there, given that Mac UEFI firmware is 'special' > already.