From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752529AbcFBCdf (ORCPT ); Wed, 1 Jun 2016 22:33:35 -0400 Received: from AUSXIPPS310.us.dell.com ([143.166.148.211]:54784 "EHLO ausxipps310.us.dell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752076AbcFBCde (ORCPT ); Wed, 1 Jun 2016 22:33:34 -0400 DomainKey-Signature: s=smtpout; d=dell.com; c=nofws; q=dns; h=X-LoopCount0:X-IronPort-AV:From:To:CC:Subject: Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language: X-MS-Has-Attach:X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader:x-originating-ip: Content-Type:Content-Transfer-Encoding:MIME-Version: Return-Path; b=epdrT3aXQkeprWZRU7h7mIMJpFSXTmIfVFbjlMQFl+3PCQ4ZGVSwM2I8 8nq1aqrBp39IYoETHRgNjWCQfmmDcShfaa9ESKX0/tCknpkO0wJTkz5Ic 0dIkqUuq07ixO7+jPbz4Og8gkHqyH6vYn876j89R6rdls/gswXtRExucX Q=; X-LoopCount0: from 10.175.216.249 X-IronPort-AV: E=Sophos;i="5.26,404,1459832400"; d="scan'208";a="322796536" From: To: CC: Subject: RE: [PATCH v2 1/3] dell_rbu: Don't fallback to userhelper Thread-Topic: [PATCH v2 1/3] dell_rbu: Don't fallback to userhelper Thread-Index: AQHRr6C9Yig3mXwREEmqugNlOeUrSZ/U1wGggAEJTYD//641UA== Date: Thu, 2 Jun 2016 02:33:32 +0000 Message-ID: <189fb98fc9eb4853badfacc517248c06@ausx13mpc124.AMER.DELL.COM> References: <1463423270-24348-1-git-send-email-mario_limonciello@dell.com> <669ce00ff2ff4641b78ee048cb0693e0@ausx13mpc124.AMER.DELL.COM> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.132.225.94] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id u522XdXO015657 > -----Original Message----- > From: Ming Lei [mailto:ming.lei@canonical.com] > Sent: Wednesday, June 1, 2016 9:24 PM > To: Limonciello, Mario > Cc: Linux Kernel Mailing List > Subject: Re: [PATCH v2 1/3] dell_rbu: Don't fallback to userhelper > > On Wed, Jun 1, 2016 at 11:35 PM, wrote: > >> -----Original Message----- > >> From: Limonciello, Mario > >> Sent: Monday, May 16, 2016 1:28 PM > >> To: ming.lei@canonical.com > >> Cc: LKML ; Limonciello, Mario > >> > >> Subject: [PATCH v2 1/3] dell_rbu: Don't fallback to userhelper > >> > >> when loading firmware dell_rbu previously would allow a userspace > >> application to craft the payload after dell_rbu was loaded and abuse > >> the udev userspace API. > >> > >> Instead require the payload to be crafted and placed in > >> /lib/firmware/dell_rbu ahead of time. > >> > >> This adjusts dell_rbu to immediately load the firmware from > >> /lib/firmware/dell_rbu when "init" is passed into image_type using > >> the kernel helper. > >> > >> Signed-off-by: Mario Limonciello > >> --- > >> drivers/firmware/Kconfig | 1 - > >> drivers/firmware/dell_rbu.c | 2 +- > >> 2 files changed, 1 insertion(+), 2 deletions(-) > >> > >> diff --git a/drivers/firmware/Kconfig b/drivers/firmware/Kconfig > >> index > >> 6664f11..85afe59 100644 > >> --- a/drivers/firmware/Kconfig > >> +++ b/drivers/firmware/Kconfig > >> @@ -86,7 +86,6 @@ config DELL_RBU > >> tristate "BIOS update support for DELL systems via sysfs" > >> depends on X86 > >> select FW_LOADER > >> - select FW_LOADER_USER_HELPER > >> help > >> Say m if you want to have the option of updating the BIOS for your > >> DELL system. Note you need a Dell OpenManage or Dell Update > >> package (DUP) diff --git a/drivers/firmware/dell_rbu.c > >> b/drivers/firmware/dell_rbu.c index 2f452f1..77b2a77 100644 > >> --- a/drivers/firmware/dell_rbu.c > >> +++ b/drivers/firmware/dell_rbu.c > >> @@ -620,7 +620,7 @@ static ssize_t write_rbu_image_type(struct file > >> *filp, struct kobject *kobj, > >> if (!rbu_data.entry_created) { > >> spin_unlock(&rbu_data.lock); > >> req_firm_rc = > >> request_firmware_nowait(THIS_MODULE, > >> - FW_ACTION_NOHOTPLUG, "dell_rbu", > >> + FW_ACTION_HOTPLUG, "dell_rbu", > >> &rbu_device->dev, GFP_KERNEL, &context, > >> callbackfn_rbu); > >> if (req_firm_rc) { > >> -- > >> 2.7.4 > > > > Hi Ming, > > > > Could you comment on these patches? There isn't currently a subsystem > maintainer for dell_rbu, so I think you are the most qualified to pull these in. > They have the best implications for you since you can drop all that fallback code > now too. > > Hi Mario, > > I am fine for the 1st two patches. > > But IMO it isn't good to drop support for FW_LOADER_USER_HELPER_FALLBACK > inside kernel now because udev isn't used everywhere, and not every distribution > always put the firmware files under the default builtin path. > > Thanks, Ming, OK that's fine to me. I just thought it would simplify your code, didn't realize anything there were distros still putting firmware in odd places or not using udev. If you could include the first two patches in your tree for next kernel I would appreciate. Thanks,