Received: by 10.192.165.148 with SMTP id m20csp438845imm; Fri, 4 May 2018 12:45:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr5n7c6+nX/7WBpJqq7AbVAtunRwILh/xlvgQHL7S3pv1TzOLS3rDzCzc+irIyip8kki0fu X-Received: by 2002:a17:902:7441:: with SMTP id e1-v6mr14847136plt.238.1525463137758; Fri, 04 May 2018 12:45:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525463137; cv=none; d=google.com; s=arc-20160816; b=gaDUQkbt+7XxhyXXe/T4YuWNx5peMZKsYb0QzZAQnyd/3eilfdq6HrDUq/OWYDGmWy MVZUG2lTAyRKh13JjVIJpLuz2wCcfVNHIc/x6vNgYqJdS+5HZvBT3XetGZGuQC0tGdOj Mspeln3Bx2TkgUegU1TP6+TX+poTI83EfrW2viyuEWJIjT8iDsVe78szzgxziwFJXb4Y zAswEEQhRxMWbr6DBW+wFitIxmhWc0cD8FerKdJ3/CGE1Kkv2TcWvOHumV0XQuB2Buc+ F3QHk9tZvDh8EHGwV+Z3Qqfi6q2T2lu3i4anVxd4Ey/6EVg3P9lrEAncbP8sFN0JSjXb LH1w== 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=+j2sUResMgaa4JVCFzD0zAB/f1rjseFwBqCCdn4Aqzo=; b=PiUjsWj424DsTf0/AEp/gGkHSDzXA17TYgewyOO3HBCHAsvOynn/+oR5Gwg66OSVXN hUJu1sdcojNV5P6vh56sYwJjHeI8PIRJ4eRh68G7dCARiCVf+ZJiEdTA3D7A8LeorJOi KuObtUKpgyFB9IyE1ccdvvDTOIyqS8BlY6XaNQoOtNzvu4DBrNR8HX15Und/uhVlFhWG NmpFAU1eJ9yqCcrTbOmZh6mAPyH5sKzNgxgmbCmi63Lj0SG61a+VQsPIpQIB/wInUQIK 7GzlUt3F+IGozuXqB2tDqyTSrpZPKtah7jUjC7fKzrEkZ+a7KsZxfBBoO0rIqwAaCtNk bWsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@android.com header.s=20161025 header.b=sE7QzmHr; 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=android.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t20-v6si13576731pgb.600.2018.05.04.12.45.23; Fri, 04 May 2018 12:45: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; dkim=pass header.i=@android.com header.s=20161025 header.b=sE7QzmHr; 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=android.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751823AbeEDTom (ORCPT + 99 others); Fri, 4 May 2018 15:44:42 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:38220 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751899AbeEDToi (ORCPT ); Fri, 4 May 2018 15:44:38 -0400 Received: by mail-it0-f65.google.com with SMTP id q4-v6so4787144ite.3 for ; Fri, 04 May 2018 12:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=android.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=+j2sUResMgaa4JVCFzD0zAB/f1rjseFwBqCCdn4Aqzo=; b=sE7QzmHre8jfPX0gL8jOO+ji9bE7a1X90XV6K3ur4U7uJAOjJR1FOF2DEbKRx6rQDY oEhzq9ObJ7qg9vKvLnmKyjh/crb1lunLYd65Yv22AXP7tCkKKP4+R7BVjiyN7XwK8e21 8z9cog/r/1PPQCMrs1uzqSzDHeKn92dnrJSyxILw+QR8O+IgQAp36h9WobfRWwRPUxBs QUq0lq3dCRidy9ThjSg6YtihlZdYsDcMA0qEPZ5VCn5Rg/e/HyOSUzE17yRTo418IkOP p2x9oCx7xfM4qiH6iYY/9I15TcB51t+V7/jx0ivb0yODQ7jkRm9Ar2ddoGymI7p342+i T7IQ== 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=+j2sUResMgaa4JVCFzD0zAB/f1rjseFwBqCCdn4Aqzo=; b=nqiyOX0jFX/Y0eWhm+KPYpHrs+UkT71OABsQ1icwcfksbViurR2p7itmrradqAi63g ZDc/ikkCJwKj9Dtg3fMebvXVogXdbaTN9tvhTovuwoVIAt1MOfAW3wUl2kFxDKwTRg9Z EARWqEVNqWA/v3uU/im3Uknx5g1CF1tIuUxXHN7r/19/eCKQfrpUAoXF2w9XaTnQPXeX zoYxwZVhNY0Qi45e2xX1BFkdeTc40UFFHcPaDVUBtQSCFwZ8BhqHTj061lr2Ir9sH3CQ yjdAzqLjALnlPS+XfcCLhszYHOsT5ZarkoC6dL5quK7H/PGuuU0jtStq+9q4YJ8x5yj0 pN3Q== X-Gm-Message-State: ALQs6tCdRl3rf/sr0T4810AQriS35lwBKvFItzrozBNUDtm5osUPdfFB 8KI5gbevtx38ZZIae+zo1bp77rIgqpwMdF93wqq8fA== X-Received: by 2002:a24:5304:: with SMTP id n4-v6mr17726312itb.123.1525463078070; Fri, 04 May 2018 12:44:38 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:60c5:0:0:0:0:0 with HTTP; Fri, 4 May 2018 12:44:37 -0700 (PDT) In-Reply-To: <20180425175557.GY14440@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> From: Martijn Coenen Date: Fri, 4 May 2018 12:44:37 -0700 Message-ID: Subject: Re: [PATCH v3 2/5] efi: Add embedded peripheral firmware support To: "Luis R. Rodriguez" Cc: Mimi Zohar , Stephen Boyd , Vikram Mulukutla , =?UTF-8?B?QXJ2ZSBIasO4bm5ldsOlZw==?= , Todd Kjos , Andy Gross , David Brown , 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, bjorn.andersson@linaro.org, Torsten Duwe , x86@kernel.org, linux-efi , "open list:ANDROID DRIVERS" , linux-arm-msm@vger.kernel.org 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 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. > > 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. Thanks, Martijn