From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753349AbbCJPkQ (ORCPT ); Tue, 10 Mar 2015 11:40:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54251 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751797AbbCJPkO (ORCPT ); Tue, 10 Mar 2015 11:40:14 -0400 Date: Tue, 10 Mar 2015 11:40:00 -0400 From: Peter Jones To: Andy Lutomirski Cc: Matt Fleming , "Kweh, Hock Leong" , Sam Protsenko , Ming Lei , Greg Kroah-Hartman , "Ong, Boon Leong" , LKML , "linux-efi@vger.kernel.org" Subject: Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface Message-ID: <20150310154000.GD1208@fenchurch.internal.datastacks.com> References: <20150306213912.GA8020@fenchurch.internal.datastacks.com> <20150310122652.GA17573@codeblueprint.co.uk> <20150310152155.GB1208@fenchurch.internal.datastacks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > >> So, for the sysfs interface, let's not allow loading from /lib. Let's > >> not require a userland tool. Let's just do, > >> > >> # echo /path/to/my/awesome/capsule.bin > /sys/../capsule > > > >> > >> and be done with it. > >> > >> Hmmm? > > > > I assume you're implying a) the capsule header with the guid is embedded > > in the .bin there already, and b) one contiguous write(2) with error > > reporting coming through something like vars.c's efi_status_to_err()? > > > > If so, yes, I prefer this API. > > > > Is using a char device really so bad? I have a "simple_char" that > makes this really easy that's pending review. As long as there's straightforward propagation of the EFI_STATUS return from UpdateCapsule() back, sysfs file vs char device makes very little difference to me. Either way it's open(), write(), close(). Using the runtime firmware upload interface designed for wifi and scsi devices is the part I don't really like. -- Peter