Received: by 10.213.65.68 with SMTP id h4csp683794imn; Fri, 6 Apr 2018 07:15:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+NpeYOyw8OLunP3fLEr4xcJGkkh4SLkLDStDKAphLrEmp1St9xvs9DwGPj4mzhV5idM2c/ X-Received: by 2002:a17:902:7c96:: with SMTP id y22-v6mr20341514pll.347.1523024159862; Fri, 06 Apr 2018 07:15:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523024159; cv=none; d=google.com; s=arc-20160816; b=y2Br0Y7UQG6oNkFZVZKM+gbci7hS/1OjJ2Qw8F+qsWSdySrpk0ZPjeiZMn0uilteNp zQt5+5cUkT0v1hc95d3heQSv1jge5kEo53DokXG4WUo8ompXE/Ma/XVNqa7a68SKof3P syH6Qkwusoq6TrHCJBGqUkwxkN6kzhh4j7i0/qpgBjZ3xOqsVb8f2EOFDDEMezXMvjUa iIPbvz7G1hFRGjeYiUIJcoztSrSLhIZHRf0NUhApSeOU3MJigbWjBP+lEQQauL+GMXaX jCh4dZr27IGCnP450bUU6kbSQSd51L48jQot34NdlBSllXR0L1d/9h0+EDCxMuduMdew 20Jw== 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=Y4ne8D5PpMhjK21P9wY/BV/HlonFVsVqfmzaNnJek+Y=; b=T7RVG1nuPWCIEa49+7dSd5vids1z1slwQiNqt4EOp3MtUdEoatQYP0VoGkMLBCVUPN T0eQURnkedbnPh3ihapM5PHJ7H323DTU2wSozphiD4PeFZPcT+C7Zy1iPpoPum69ASCx RMNZNgJtORITx/Mfr0W3ddfNnJSgiIrxys0MEX2qupDqDjYS6ysXpfOqNRF7B5ZpzYZ+ EICPOJMnkM9PO3mbfwRVdOmYfMb0CRCPBB77xUSwI+HCtULLN+W0NWWd12himfKcn+iC hOnMUfo+e/GCzCp05VdfV+rvjz7nni32zi5ajiBID504y0thHul/lK+XwCrCwtmQK/8N mCmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JRPCc61T; 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 s36-v6si8299371pld.401.2018.04.06.07.15.45; Fri, 06 Apr 2018 07:15:59 -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=JRPCc61T; 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 S1756269AbeDFOOk (ORCPT + 99 others); Fri, 6 Apr 2018 10:14:40 -0400 Received: from mail-it0-f54.google.com ([209.85.214.54]:40082 "EHLO mail-it0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752739AbeDFOOE (ORCPT ); Fri, 6 Apr 2018 10:14:04 -0400 Received: by mail-it0-f54.google.com with SMTP id u62-v6so1905224ita.5 for ; Fri, 06 Apr 2018 07:14:04 -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=Y4ne8D5PpMhjK21P9wY/BV/HlonFVsVqfmzaNnJek+Y=; b=JRPCc61TCDhqDm75/aqekyHjzNiUwBv1b7ZbpyGnKNtleY7Ytlun/onaZIWaBzRP2p GVaWjKCOsWkexudVU1HxR0ARb4sMIaWYTjnLgv9HVTBZs7v1ZU7tW8Gl8bFxTRaDIh15 9qeR8gZLCR5+0DLcdLp3ti7o89DfypbhYH2eE= 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=Y4ne8D5PpMhjK21P9wY/BV/HlonFVsVqfmzaNnJek+Y=; b=c5/VzW/WeAIUlCfy+lNXMsDYZH/j8hCSW+OHX6+QiR6V11X6WS7Jok7Qx8imK0OsDk YIiQ2Fhj1oLA14adtQJ40pGnZMdtcpuF3aNgMR2xAspTlNwNl+C73q6+kb1FisUODfQ6 ZIAWKtCbZYHMb9eiQNfKvBQqO4eHe5CCP/6OM0EMJYgMQR/q5zwit0Re90nxbfT4kyx9 3k0wzfKop4FR0DDpTxe8QElG1bUH56tyEPnNuNaF621EhaXxLOmorg8zTDr1lHFvlOF5 Yt6Z+VvTxY6p479Yq0flOKbKREW3W4OpK+9AirCl9rDQXJC8+tQUfmq3PcBTDnmgqHh/ pSDg== X-Gm-Message-State: ALQs6tAg17XGJgOJcC9nbGj3XZZYuUJppcMf0cnhviW/cR5y6ev5jux7 cIHoNdlDVMbQVVeXZpaIGEQQ8yvKOvqLOHzO7hAm+g== X-Received: by 2002:a24:30c:: with SMTP id e12-v6mr18125944ite.50.1523024043693; Fri, 06 Apr 2018 07:14:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.187.67 with HTTP; Fri, 6 Apr 2018 07:14:03 -0700 (PDT) In-Reply-To: <20180406140832.GF30543@wotan.suse.de> 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:14:03 +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: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, but I think it makes sense to make an exception there, given that Mac UEFI firmware is 'special' already.