From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C76A8C433EF for ; Tue, 26 Apr 2022 16:31:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353009AbiDZQeQ (ORCPT ); Tue, 26 Apr 2022 12:34:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235283AbiDZQeO (ORCPT ); Tue, 26 Apr 2022 12:34:14 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA3A3157DCE; Tue, 26 Apr 2022 09:31:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description; bh=puEHxiHmekhBokZkfX+PosZYQtXEk03Xp8eQva9Bj+8=; b=rpiKOOQCl+wMo2ZBJybeim/aQ8 G1VVuExU8TbuASs4MvNBUwmEdSLk7CyKeYXO87gI/dpVXnNlnd7Y1cbBvBncRr1Y5cx4MLs6xyozY LZMaSZrC0Nv2UOoGmtyOjkSpqHQm8sZm8dPr3re9/byEZCQ8EjNc7KB+RlTSPlLn2qv2hAr8fwyV1 OG5rj4Kfo8vNDq8+Id4xcXeR8/ZMbUA2RAh5oWnSUiq9kbtMCMSedGJm37lfjpozOBe+QAacSL4+8 xH3bwTp6k+KFgbZZz/OkWRRo3cmV/I6CklqAQrNSUeT8++K+/eCrcuTWoByq+5ImtCef28FjkDHRz xZljr48g==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1njO5h-00FLzL-IP; Tue, 26 Apr 2022 16:31:05 +0000 Date: Tue, 26 Apr 2022 09:31:05 -0700 From: Luis Chamberlain To: =?iso-8859-1?Q?Thi=E9baud?= Weksteen Cc: Greg Kroah-Hartman , Jeffrey Vander Stoep , Saravana Kannan , Alistair Delva , Adam Shih , SElinux list , linux-kernel Subject: Re: [PATCH v2] firmware_loader: use kernel credentials when reading firmware Message-ID: References: <20220422013215.2301793-1-tweek@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 26, 2022 at 02:18:59PM +1000, Thiébaud Weksteen wrote: > > Can you elaborate on the last sentence? It's unclear how what you > > describe is used exactly to allow driver to use direct filesystem > > firmware loading. > > I realize my use of the word "device" here was unfortunate. I meant devices as > Android devices/systems. This may have contributed to the confusion. > > Previously, Android systems were not setting up the firmware_class.path > command line argument. It means that the userspace fallback was always > kicking-in when a driver called request_firmware. This was handled by the > ueventd process on Android, which is generally given access to all firmware > files. > > Now that more devices are setting up firmware_class.path, the call to > request_firmware will end up using kernel_read_file_from_path_initns, which > would have used the current process credentials. That makes it crystal clear. This would be useful in the commit log. > > And, given the feedback from Android it would seem this is a fix > > which likely may be desirable to backport to some stable kernels? > > Yes, that's right. Especially in light of this. Luis