Received: by 10.192.165.148 with SMTP id m20csp4451823imm; Tue, 8 May 2018 08:39:49 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrUiSpa1mAaivCseZ5qq1bnoMjyAsKi+ndQuvud39gVk7biJ5gviJoDk79I3V+g+iWbnxK+ X-Received: by 10.167.130.140 with SMTP id s12mr23848471pfm.136.1525793989938; Tue, 08 May 2018 08:39:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525793989; cv=none; d=google.com; s=arc-20160816; b=cPwT3AcHFRTHxKdGVIh+NvCtlBzjT4XaPolU5RUmlsnXp7ltx7AK1miM9S423eVDaL 6mMoJHcwT5936rWE+uREudTpwlz4jjeHYqt5hnHRZmO+bH+t/w1CyiaLBRpil7THFA7n V02AIpiCD2rWijW2ymuXy3w4BYPGi/jMajJHF7F7ebayZVQvWDvt/M7l0fXLpOsS8sgb o06xBJ28Y7iP1Dq1dPpCDu2OTq5h2BhdQqZwfATNjaJjlLh4hIfLWAKhMhryAodh5V5Z q+uJUWTBfJ+qkeq/W2O41HqGTFPzz8j0SRmqQ5GV0+pom/KcX+cIGiQpQGizCTKKH+H3 YePA== 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=vwmX6kBEdMn9WP8yOrvubyo+CsivRl0A7PmxACjflp0=; b=AVjt8X8eMEsNE6Ny3ojDiYz/CF7E4BRGXbmn55UraAJM65lnvz4MqAydLx0Ra+rP56 jy93J3bWPb7Grnq/TwagVfpsXRxntG0c9FAmex/hZjcE7VbHMiXYU7CB5tyh7mluQ0bc JcqrxCKDtPrAUmw6ngm1VW8uFLlAahMTGkN024oC7Jjsam7wvxlFSmyDXpNeqmfV4Qop 7mLGb2B8mcq8QvhA70sk2SAIk1eS4dFeSG3xvYud4XaVliqdI79CATW5mFOBEOdNuAHe sQOy0fvJ6ee6C0dXeO2+lkKIHdp8n74bv9uNs1FbXlel7NXukbNGR45uvTf/Kt+m+9yP HMaQ== 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 59-v6si24276995plc.103.2018.05.08.08.39.35; Tue, 08 May 2018 08:39:49 -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 S1755029AbeEHPiO (ORCPT + 99 others); Tue, 8 May 2018 11:38:14 -0400 Received: from mx2.suse.de ([195.135.220.15]:49340 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754554AbeEHPiL (ORCPT ); Tue, 8 May 2018 11:38:11 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0C709AC42; Tue, 8 May 2018 15:38:09 +0000 (UTC) Date: Tue, 8 May 2018 15:38:05 +0000 From: "Luis R. Rodriguez" To: Martijn Coenen , Andy Gross , David Brown , Bjorn Andersson Cc: "Luis R. Rodriguez" , 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: <20180508153805.GC27853@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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: > > Android became the primary user of CONFIG_FW_LOADER_USER_HELPER_FALLBACK. > > > > It would be good for us to hear from Android folks if their current use of > > request_firmware_into_buf() is designed in practice to *never* use the direct > > filesystem firmware loading interface, and always rely instead on the > > fallback mechanism. > > It's hard to answer this question for Android in general. As far as I > can tell the reasons we use CONFIG_FW_LOADER_USER_HELPER(_FALLBACK) > are: > 1) We have multiple different paths on our devices where firmware can > be located, and the direct loader only supports one custom path > 2) Most of those paths are not mounted by the time the corresponding > drivers are loaded, because pretty much all Android kernels today are > built without module support, and therefore drivers are loaded well > before the firmware partition is mounted > 3) I think we use _FALLBACK because doing this with uevents is just > the easiest thing to do; our init code has a firmware helper that > deals with this and searches the paths that we care about > > 2) will change at some point, because Android is moving towards a > model where device-specific peripheral drivers will be loaded as > modules, and since those modules would likely come from the same > partition as the firmware, it's possible that the direct load would > succeed (depending on whether the custom path is configured there or > not). But I don't think we can rely on the direct loader even in those > cases, unless we could configure it with multiple custom paths. > > I have no reason to believe request_firmware_into_buf() is special in > this regard; drivers that depend on it may have their corresponding > firmware in different locations, so just depending on the direct > loader would not be good enough. Thanks! This is very useful! This provides yet-another justification and use case to document for the fallback mechanism. I'll go and extend it. > > > > 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? Luis