Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp947722imm; Fri, 1 Jun 2018 12:24:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL1rrta0xmAG1hFhqX4Tp+mcYo4VekJgVxUztdwQifu0+mDmz/c1cSoK3Ug9qJu87vI6zj7 X-Received: by 2002:a63:4004:: with SMTP id n4-v6mr10031340pga.248.1527881077839; Fri, 01 Jun 2018 12:24:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527881077; cv=none; d=google.com; s=arc-20160816; b=RCtCW36vRh9DeJzdZQCbcDySBy/bsuDQNtcXESvk+xvNA8eaA55Q5WS6lVp5lPCCWS NVWsfugemVj2gxnMFeh1sDOUcBCOBt/v4C9SqyHGJvX11XI74KZjJGjZojoFe7xoC/CZ 3qYNR2PvbWqRg6WlCz/UylE4zqWSOLPvOEe/G9CBljvGp6azi92EPkYvl6dS0HqDbb7S 2Bzgfnkvh4BJY+ZyxITt2Y4qUrcUuwGOSibC+uA5+C13JpX/MP3eaO5pCaFvUv+Wl9nP LZ23NS6edZ3smiswZ/QvquWjUTRk3AX8gxsMSTFtIQ9wNbMtcnUt68winHfl5RWZgqVF NG5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=51cyFPputSGu4gQVwI800Ge8+Fm8RMwJbHBeKRv4m5E=; b=XcaTm8DJrEp6P3gbTBMatKyk6glyO/cEMz9V6vx+/IKgKW2w1s0PGcgWuLFFyHAwtC lkl1hm0tPknkoxdPXa2PEnL2PFxKl1//8O409Ga17G00psNYqQn3nYGITN2LOcxOs1Ov YwiIxBN8wSUZd4Wj2wrjfH5nzuo/uEBUbKoELp03AfBuFNVzksGZcihi5GuQIiJygCZn BrMrIAvaJYJZSDm7twZ2PwEpJmPE+YdH0VGlbfC6ZRMf3W7cbmXb/aWv1UqSEU0XYnNK O10dQ5sQ01LSxMbVEXz+3uAkUSgdY4tZpFfDnVCqxh/jPevSzlPj2zUeDbG8Q+LLbtQz qI9Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 88-v6si39646334pla.315.2018.06.01.12.24.23; Fri, 01 Jun 2018 12:24:37 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753578AbeFATXz (ORCPT + 99 others); Fri, 1 Jun 2018 15:23:55 -0400 Received: from mx2.suse.de ([195.135.220.15]:49179 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752019AbeFATXv (ORCPT ); Fri, 1 Jun 2018 15:23:51 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id A3FCFAE78; Fri, 1 Jun 2018 19:23:48 +0000 (UTC) Date: Fri, 1 Jun 2018 21:23:46 +0200 From: "Luis R. Rodriguez" To: "Luis R. Rodriguez" Cc: Martijn Coenen , Andy Gross , David Brown , Bjorn Andersson , Mimi Zohar , Stephen Boyd , Vikram Mulukutla , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Todd Kjos , Andrew Morton , linux-security-module@vger.kernel.org, Chris Wright , David Howells , Alan Cox , Kees Cook , Hans de Goede , Darren Hart , Andy Shevchenko , Ard Biesheuvel , Greg Kroah-Hartman , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , platform-driver-x86@vger.kernel.org, LKML , Peter Jones , Dave Olsthoorn , Will Deacon , Andy Lutomirski , Matt Fleming , Josh Triplett , dmitry.torokhov@gmail.com, mfuzzey@parkeon.com, Kalle Valo , Arend Van Spriel , Linus Torvalds , nbroeking@me.com, Torsten Duwe , x86@kernel.org, linux-efi , "open list:ANDROID DRIVERS" , linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v3 2/5] efi: Add embedded peripheral firmware support Message-ID: <20180601192346.GQ4511@wotan.suse.de> References: <20180408174014.21908-1-hdegoede@redhat.com> <20180408174014.21908-3-hdegoede@redhat.com> <20180423211143.GZ14440@wotan.suse.de> <71e6a45a-398d-b7a4-dab0-8b9936683226@redhat.com> <1524586021.3364.20.camel@linux.vnet.ibm.com> <20180424234219.GX14440@wotan.suse.de> <1524632409.3371.48.camel@linux.vnet.ibm.com> <20180425175557.GY14440@wotan.suse.de> <20180508153805.GC27853@wotan.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180508153805.GC27853@wotan.suse.de> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 08, 2018 at 03:38:05PM +0000, Luis R. Rodriguez wrote: > On Fri, May 04, 2018 at 12:44:37PM -0700, Martijn Coenen wrote: > > On Wed, Apr 25, 2018 at 10:55 AM, Luis R. Rodriguez wrote: > > > Is ptr below > > > > > > ret = request_firmware_into_buf(&seg_fw, fw_name, dev, > > > ptr, phdr->p_filesz); > > > > > > Also part of the DMA buffer allocated earlier via: > > > > > > ret = qcom_scm_pas_init_image(pas_id, fw->data, fw->size); > > > > > > Android folks? > > > > I think the Qualcomm folks owning this (Andy, David, Bjorn, already > > cc'd here) are better suited to answer that question. > > Andy, David, Bjorn? Andy, David, Bjorn? Note: as-is we have no option but to assume this is DMA memory for now. We cannot keep IMA's guarantees with the current prealloc firmware API buffer, so I've suggested: a) The prealloc buffer API be expanded to enable the caller to descrbe it b) Have the qcom driver say this is DMA c) IMA would reject it to ensure it stays true to what it needs to gaurantee d) Future platforms which want to use IMA but want to trust DMA buffers would need to devise a way to describe IMA can trust some of these calls. I'll leave it up to you guys (Andy, David, Bjorn) to come up with the code for d) once and if you guys want to use IMA later. But since what is pressing here is to stay to true to IMA, with a-c IMA would reject such calls for now. Luis