Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-16 Thread Andy Lutomirski
On Mar 13, 2015 7:42 AM, "Greg Kroah-Hartman" wrote: > > On Thu, Mar 12, 2015 at 10:47:54PM +, Matt Fleming wrote: > > On Tue, 10 Mar, at 08:51:59AM, Andy Lutomirski wrote: > > > > > > I'm not 100% happy with write(2) (which is all we have in sysfs) for > > > two reasons: > > > > > > 1. If we

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-16 Thread Andy Lutomirski
On Mar 13, 2015 7:42 AM, Greg Kroah-Hartman gre...@linuxfoundation.org wrote: On Thu, Mar 12, 2015 at 10:47:54PM +, Matt Fleming wrote: On Tue, 10 Mar, at 08:51:59AM, Andy Lutomirski wrote: I'm not 100% happy with write(2) (which is all we have in sysfs) for two reasons: 1.

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-13 Thread Greg Kroah-Hartman
On Thu, Mar 12, 2015 at 10:47:54PM +, Matt Fleming wrote: > On Tue, 10 Mar, at 08:51:59AM, Andy Lutomirski wrote: > > > > I'm not 100% happy with write(2) (which is all we have in sysfs) for > > two reasons: > > > > 1. If we write a file name, eww. That's more complicated, requires > >

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-13 Thread Greg Kroah-Hartman
On Thu, Mar 12, 2015 at 10:47:54PM +, Matt Fleming wrote: On Tue, 10 Mar, at 08:51:59AM, Andy Lutomirski wrote: I'm not 100% happy with write(2) (which is all we have in sysfs) for two reasons: 1. If we write a file name, eww. That's more complicated, requires temporary files,

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-12 Thread Matt Fleming
On Tue, 10 Mar, at 08:51:59AM, Andy Lutomirski wrote: > > I'm not 100% happy with write(2) (which is all we have in sysfs) for > two reasons: > > 1. If we write a file name, eww. That's more complicated, requires > temporary files, has annoying mount namespace issues, etc. > > 2. If we write

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-12 Thread Matt Fleming
On Tue, 10 Mar, at 08:51:59AM, Andy Lutomirski wrote: I'm not 100% happy with write(2) (which is all we have in sysfs) for two reasons: 1. If we write a file name, eww. That's more complicated, requires temporary files, has annoying mount namespace issues, etc. 2. If we write the full

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-10 Thread Andy Lutomirski
On Tue, Mar 10, 2015 at 10:26 AM, Peter Jones wrote: > On Tue, Mar 10, 2015 at 08:51:59AM -0700, Andy Lutomirski wrote: >> On Tue, Mar 10, 2015 at 8:40 AM, Peter Jones wrote: >> > >> >> >> So, for the sysfs interface, let's not allow loading from /lib. Let's >> >> >> not require a userland tool.

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-10 Thread Peter Jones
On Tue, Mar 10, 2015 at 08:51:59AM -0700, Andy Lutomirski wrote: > On Tue, Mar 10, 2015 at 8:40 AM, Peter Jones wrote: > > > >> >> So, for the sysfs interface, let's not allow loading from /lib. Let's > >> >> not require a userland tool. Let's just do, > >> >> > >> >> # echo

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-10 Thread Andy Lutomirski
On Tue, Mar 10, 2015 at 8:40 AM, Peter Jones wrote: > >> >> 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. >> >> >>

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-10 Thread Peter Jones
> >> 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

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-10 Thread Andy Lutomirski
On Tue, Mar 10, 2015 at 8:21 AM, Peter Jones wrote: > On Tue, Mar 10, 2015 at 12:26:52PM +, Matt Fleming wrote: >> On Fri, 06 Mar, at 04:39:12PM, Peter Jones wrote: >> > >> > So again: do we really need or want to do this? >> >> One thing that we totally lose the ability to do is use the

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-10 Thread Peter Jones
On Tue, Mar 10, 2015 at 12:26:52PM +, Matt Fleming wrote: > On Fri, 06 Mar, at 04:39:12PM, Peter Jones wrote: > > > > So again: do we really need or want to do this? > > One thing that we totally lose the ability to do is use the capsule > interface for things *other* than firmware updates,

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-10 Thread Matt Fleming
On Fri, 06 Mar, at 04:39:12PM, Peter Jones wrote: > > So again: do we really need or want to do this? One thing that we totally lose the ability to do is use the capsule interface for things *other* than firmware updates, e.g. https://lkml.org/lkml/2013/10/16/327 Also, requiring embedded or

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-10 Thread Matt Fleming
On Fri, 06 Mar, at 04:39:12PM, Peter Jones wrote: So again: do we really need or want to do this? One thing that we totally lose the ability to do is use the capsule interface for things *other* than firmware updates, e.g. https://lkml.org/lkml/2013/10/16/327 Also, requiring embedded or

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-10 Thread Peter Jones
On Tue, Mar 10, 2015 at 08:51:59AM -0700, Andy Lutomirski wrote: On Tue, Mar 10, 2015 at 8:40 AM, Peter Jones pjo...@redhat.com wrote: So, for the sysfs interface, let's not allow loading from /lib. Let's not require a userland tool. Let's just do, # echo

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-10 Thread Andy Lutomirski
On Tue, Mar 10, 2015 at 10:26 AM, Peter Jones pjo...@redhat.com wrote: On Tue, Mar 10, 2015 at 08:51:59AM -0700, Andy Lutomirski wrote: On Tue, Mar 10, 2015 at 8:40 AM, Peter Jones pjo...@redhat.com wrote: So, for the sysfs interface, let's not allow loading from /lib. Let's not require

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-10 Thread Peter Jones
On Tue, Mar 10, 2015 at 12:26:52PM +, Matt Fleming wrote: On Fri, 06 Mar, at 04:39:12PM, Peter Jones wrote: So again: do we really need or want to do this? One thing that we totally lose the ability to do is use the capsule interface for things *other* than firmware updates, e.g.

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-10 Thread Andy Lutomirski
On Tue, Mar 10, 2015 at 8:21 AM, Peter Jones pjo...@redhat.com wrote: On Tue, Mar 10, 2015 at 12:26:52PM +, Matt Fleming wrote: On Fri, 06 Mar, at 04:39:12PM, Peter Jones wrote: So again: do we really need or want to do this? One thing that we totally lose the ability to do is use the

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-10 Thread Andy Lutomirski
On Tue, Mar 10, 2015 at 8:40 AM, Peter Jones pjo...@redhat.com wrote: 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

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-10 Thread Peter Jones
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

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-06 Thread Peter Jones
On Fri, Mar 06, 2015 at 01:49:20PM -0800, Roy Franz wrote: > On Fri, Mar 6, 2015 at 1:39 PM, Peter Jones wrote: > > On Tue, Feb 24, 2015 at 12:49:09PM +, Kweh, Hock Leong wrote: > >> Hi All, > >> > >> After some internal discussion and re-design prototyping & testing on > >> this efi capsule

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-06 Thread Roy Franz
On Fri, Mar 6, 2015 at 1:39 PM, Peter Jones wrote: > On Tue, Feb 24, 2015 at 12:49:09PM +, Kweh, Hock Leong wrote: >> Hi All, >> >> After some internal discussion and re-design prototyping & testing on >> this efi capsule interface kernel module, I would like to start a discussion >> here on

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-06 Thread Peter Jones
On Tue, Feb 24, 2015 at 12:49:09PM +, Kweh, Hock Leong wrote: > Hi All, > > After some internal discussion and re-design prototyping & testing on > this efi capsule interface kernel module, I would like to start a discussion > here on the new idea and wish to get input for the implementation

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-06 Thread Andy Lutomirski
On Mar 6, 2015 4:20 AM, "Kweh, Hock Leong" wrote: > > > -Original Message- > > From: Andy Lutomirski [mailto:l...@amacapital.net] > > Sent: Friday, March 06, 2015 7:09 AM > > > > On Mar 5, 2015 1:19 AM, "Kweh, Hock Leong" > > wrote: > > > > > > > > This really is not a big deal. User

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-06 Thread Borislav Petkov
On Fri, Mar 06, 2015 at 11:41:57AM +, Kweh, Hock Leong wrote: > # cat /any/path/capsule.bin > /sys/devices/platform/efi_capsule/capsule_load This is straight-forward and clean. > or doing: > # echo "/any/path/capsule.bin" > > /sys/devices/platform/efi_capsule/capsule_load This is strange

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-06 Thread Kweh, Hock Leong
> -Original Message- > From: Andy Lutomirski [mailto:l...@amacapital.net] > Sent: Friday, March 06, 2015 7:09 AM > > On Mar 5, 2015 1:19 AM, "Kweh, Hock Leong" > wrote: > > > > > > This really is not a big deal. User should cope with it. > > > > > > No, it's a big deal, and the user

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-06 Thread Kweh, Hock Leong
> -Original Message- > From: Borislav Petkov [mailto:b...@alien8.de] > Sent: Friday, March 06, 2015 4:14 PM > > On Thu, Mar 05, 2015 at 03:08:42PM -0800, Andy Lutomirski wrote: > > No. Only root should be able to load capsules, but even root may not > > be able to write to /lib. > > So

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-06 Thread Borislav Petkov
On Thu, Mar 05, 2015 at 03:08:42PM -0800, Andy Lutomirski wrote: > No. Only root should be able to load capsules, but even root may not > be able to write to /lib. So basically what we want to do is: # cat /any/path/to/efi/capsule/accessible/to/root/efi_capsule.img > /sys/firmware/efi/update

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-06 Thread Borislav Petkov
On Fri, Mar 06, 2015 at 11:41:57AM +, Kweh, Hock Leong wrote: # cat /any/path/capsule.bin /sys/devices/platform/efi_capsule/capsule_load This is straight-forward and clean. or doing: # echo /any/path/capsule.bin /sys/devices/platform/efi_capsule/capsule_load This is strange and

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-06 Thread Kweh, Hock Leong
-Original Message- From: Andy Lutomirski [mailto:l...@amacapital.net] Sent: Friday, March 06, 2015 7:09 AM On Mar 5, 2015 1:19 AM, Kweh, Hock Leong hock.leong.k...@intel.com wrote: This really is not a big deal. User should cope with it. No, it's a big deal, and the user

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-06 Thread Kweh, Hock Leong
-Original Message- From: Borislav Petkov [mailto:b...@alien8.de] Sent: Friday, March 06, 2015 4:14 PM On Thu, Mar 05, 2015 at 03:08:42PM -0800, Andy Lutomirski wrote: No. Only root should be able to load capsules, but even root may not be able to write to /lib. So basically

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-06 Thread Andy Lutomirski
On Mar 6, 2015 4:20 AM, Kweh, Hock Leong hock.leong.k...@intel.com wrote: -Original Message- From: Andy Lutomirski [mailto:l...@amacapital.net] Sent: Friday, March 06, 2015 7:09 AM On Mar 5, 2015 1:19 AM, Kweh, Hock Leong hock.leong.k...@intel.com wrote: This really is

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-06 Thread Peter Jones
On Tue, Feb 24, 2015 at 12:49:09PM +, Kweh, Hock Leong wrote: Hi All, After some internal discussion and re-design prototyping testing on this efi capsule interface kernel module, I would like to start a discussion here on the new idea and wish to get input for the implementation and

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-06 Thread Roy Franz
On Fri, Mar 6, 2015 at 1:39 PM, Peter Jones pjo...@redhat.com wrote: On Tue, Feb 24, 2015 at 12:49:09PM +, Kweh, Hock Leong wrote: Hi All, After some internal discussion and re-design prototyping testing on this efi capsule interface kernel module, I would like to start a discussion

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-06 Thread Peter Jones
On Fri, Mar 06, 2015 at 01:49:20PM -0800, Roy Franz wrote: On Fri, Mar 6, 2015 at 1:39 PM, Peter Jones pjo...@redhat.com wrote: On Tue, Feb 24, 2015 at 12:49:09PM +, Kweh, Hock Leong wrote: Hi All, After some internal discussion and re-design prototyping testing on this efi capsule

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-06 Thread Borislav Petkov
On Thu, Mar 05, 2015 at 03:08:42PM -0800, Andy Lutomirski wrote: No. Only root should be able to load capsules, but even root may not be able to write to /lib. So basically what we want to do is: # cat /any/path/to/efi/capsule/accessible/to/root/efi_capsule.img /sys/firmware/efi/update Now

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-05 Thread Andy Lutomirski
On Mar 5, 2015 1:19 AM, "Kweh, Hock Leong" wrote: > > > -Original Message- > > From: Andy Lutomirski [mailto:l...@amacapital.net] > > Sent: Wednesday, March 04, 2015 4:38 AM > > > > On Mon, Mar 2, 2015 at 9:56 PM, Kweh, Hock Leong > > wrote: > > > > > > Just to call out that using

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-05 Thread Kweh, Hock Leong
> -Original Message- > From: Andy Lutomirski [mailto:l...@amacapital.net] > Sent: Wednesday, March 04, 2015 4:38 AM > > On Mon, Mar 2, 2015 at 9:56 PM, Kweh, Hock Leong > wrote: > > > > Just to call out that using firmware class auto locate binary feature is > > limited > > to

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-05 Thread Andy Lutomirski
On Mar 5, 2015 1:19 AM, Kweh, Hock Leong hock.leong.k...@intel.com wrote: -Original Message- From: Andy Lutomirski [mailto:l...@amacapital.net] Sent: Wednesday, March 04, 2015 4:38 AM On Mon, Mar 2, 2015 at 9:56 PM, Kweh, Hock Leong hock.leong.k...@intel.com wrote: Just

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-05 Thread Kweh, Hock Leong
-Original Message- From: Andy Lutomirski [mailto:l...@amacapital.net] Sent: Wednesday, March 04, 2015 4:38 AM On Mon, Mar 2, 2015 at 9:56 PM, Kweh, Hock Leong hock.leong.k...@intel.com wrote: Just to call out that using firmware class auto locate binary feature is limited

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-03 Thread Andy Lutomirski
On Mar 3, 2015 12:51 PM, "Borislav Petkov" wrote: > > On Tue, Mar 03, 2015 at 12:37:54PM -0800, Andy Lutomirski wrote: > > The user *should not* be required to have write access to anything in > > /lib to install a UEFI capsule that they download from their > > motherboard vendor's website. /lib

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-03 Thread Borislav Petkov
On Tue, Mar 03, 2015 at 12:37:54PM -0800, Andy Lutomirski wrote: > The user *should not* be required to have write access to anything in > /lib to install a UEFI capsule that they download from their > motherboard vendor's website. /lib belongs to the distro, and UEFI > capsules do not belong to

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-03 Thread Andy Lutomirski
On Mon, Mar 2, 2015 at 9:56 PM, Kweh, Hock Leong wrote: >> -Original Message- >> From: Matt Fleming [mailto:m...@console-pimps.org] >> Sent: Monday, March 02, 2015 8:30 PM >> >> On Mon, 02 Mar, at 10:59:00AM, Kweh Hock Leong wrote: >> > > -Original Message- >> > > From: Borislav

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-03 Thread Borislav Petkov
On Tue, Mar 03, 2015 at 12:37:54PM -0800, Andy Lutomirski wrote: The user *should not* be required to have write access to anything in /lib to install a UEFI capsule that they download from their motherboard vendor's website. /lib belongs to the distro, and UEFI capsules do not belong to the

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-03 Thread Andy Lutomirski
On Mon, Mar 2, 2015 at 9:56 PM, Kweh, Hock Leong hock.leong.k...@intel.com wrote: -Original Message- From: Matt Fleming [mailto:m...@console-pimps.org] Sent: Monday, March 02, 2015 8:30 PM On Mon, 02 Mar, at 10:59:00AM, Kweh Hock Leong wrote: -Original Message- From:

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-03 Thread Andy Lutomirski
On Mar 3, 2015 12:51 PM, Borislav Petkov b...@alien8.de wrote: On Tue, Mar 03, 2015 at 12:37:54PM -0800, Andy Lutomirski wrote: The user *should not* be required to have write access to anything in /lib to install a UEFI capsule that they download from their motherboard vendor's website.

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-02 Thread Kweh, Hock Leong
> -Original Message- > From: Matt Fleming [mailto:m...@console-pimps.org] > Sent: Monday, March 02, 2015 8:30 PM > > On Mon, 02 Mar, at 10:59:00AM, Kweh Hock Leong wrote: > > > -Original Message- > > > From: Borislav Petkov [mailto:b...@alien8.de] > > > Sent: Wednesday, February

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-02 Thread Matt Fleming
On Mon, 02 Mar, at 10:59:00AM, Kweh Hock Leong wrote: > > -Original Message- > > From: Borislav Petkov [mailto:b...@alien8.de] > > Sent: Wednesday, February 25, 2015 8:49 PM > > > > On Wed, Feb 25, 2015 at 12:38:20PM +, Kweh, Hock Leong wrote: > > > The reason we use this interface

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-02 Thread Matt Fleming
On Thu, 26 Feb, at 04:54:58PM, Borislav Petkov wrote: > On Thu, Feb 26, 2015 at 07:30:54AM -0800, Andy Lutomirski wrote: > > How can the error code be propagated? Would that echo command fail in > > case of error? > > Yeah, either that or we can put the error code in the sysfs file which >

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-02 Thread Kweh, Hock Leong
> -Original Message- > From: Borislav Petkov [mailto:b...@alien8.de] > Sent: Wednesday, February 25, 2015 8:49 PM > > On Wed, Feb 25, 2015 at 12:38:20PM +, Kweh, Hock Leong wrote: > > The reason we use this interface for efi capsule is that efi capsule > > support multi binaries to be

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-02 Thread Kweh, Hock Leong
-Original Message- From: Matt Fleming [mailto:m...@console-pimps.org] Sent: Monday, March 02, 2015 8:30 PM On Mon, 02 Mar, at 10:59:00AM, Kweh Hock Leong wrote: -Original Message- From: Borislav Petkov [mailto:b...@alien8.de] Sent: Wednesday, February 25, 2015 8:49

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-02 Thread Matt Fleming
On Mon, 02 Mar, at 10:59:00AM, Kweh Hock Leong wrote: -Original Message- From: Borislav Petkov [mailto:b...@alien8.de] Sent: Wednesday, February 25, 2015 8:49 PM On Wed, Feb 25, 2015 at 12:38:20PM +, Kweh, Hock Leong wrote: The reason we use this interface for efi capsule

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-02 Thread Kweh, Hock Leong
-Original Message- From: Borislav Petkov [mailto:b...@alien8.de] Sent: Wednesday, February 25, 2015 8:49 PM On Wed, Feb 25, 2015 at 12:38:20PM +, Kweh, Hock Leong wrote: The reason we use this interface for efi capsule is that efi capsule support multi binaries to be uploaded

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-03-02 Thread Matt Fleming
On Thu, 26 Feb, at 04:54:58PM, Borislav Petkov wrote: On Thu, Feb 26, 2015 at 07:30:54AM -0800, Andy Lutomirski wrote: How can the error code be propagated? Would that echo command fail in case of error? Yeah, either that or we can put the error code in the sysfs file which userspace can

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-02-26 Thread Borislav Petkov
On Thu, Feb 26, 2015 at 07:30:54AM -0800, Andy Lutomirski wrote: > How can the error code be propagated? Would that echo command fail in > case of error? Yeah, either that or we can put the error code in the sysfs file which userspace can cat. -- Regards/Gruss, Boris. ECO tip #101: Trim

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-02-26 Thread Andy Lutomirski
On Wed, Feb 25, 2015 at 3:47 AM, Borislav Petkov wrote: > On Tue, Feb 24, 2015 at 12:49:09PM +, Kweh, Hock Leong wrote: >> So the process steps basically look like this: >> 1.) cat capsule_ticket===> acquire a number and lock mutex then >>

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-02-26 Thread Borislav Petkov
On Thu, Feb 26, 2015 at 07:30:54AM -0800, Andy Lutomirski wrote: How can the error code be propagated? Would that echo command fail in case of error? Yeah, either that or we can put the error code in the sysfs file which userspace can cat. -- Regards/Gruss, Boris. ECO tip #101: Trim

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-02-26 Thread Andy Lutomirski
On Wed, Feb 25, 2015 at 3:47 AM, Borislav Petkov b...@alien8.de wrote: On Tue, Feb 24, 2015 at 12:49:09PM +, Kweh, Hock Leong wrote: So the process steps basically look like this: 1.) cat capsule_ticket=== acquire a number and lock mutex then

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-02-25 Thread Borislav Petkov
On Wed, Feb 25, 2015 at 12:38:20PM +, Kweh, Hock Leong wrote: > The reason we use this interface for efi capsule is that efi capsule > support multi binaries to be uploaded and each binary file name > can be different. So you can write the file path to a second file and reload then, once per

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-02-25 Thread Kweh, Hock Leong
> -Original Message- > From: Borislav Petkov [mailto:b...@alien8.de] > Sent: Wednesday, February 25, 2015 7:48 PM > > On Tue, Feb 24, 2015 at 12:49:09PM +, Kweh, Hock Leong wrote: > > So this sounds pretty overengineered for no reason, or maybe I'm missing > the reason. > > If I had

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-02-25 Thread Borislav Petkov
On Tue, Feb 24, 2015 at 12:49:09PM +, Kweh, Hock Leong wrote: > So the process steps basically look like this: > 1.) cat capsule_ticket===> acquire a number and lock mutex then > expose > firmware_class user helper >

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-02-25 Thread Kweh, Hock Leong
-Original Message- From: Borislav Petkov [mailto:b...@alien8.de] Sent: Wednesday, February 25, 2015 7:48 PM On Tue, Feb 24, 2015 at 12:49:09PM +, Kweh, Hock Leong wrote: So this sounds pretty overengineered for no reason, or maybe I'm missing the reason. If I had to give

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-02-25 Thread Borislav Petkov
On Tue, Feb 24, 2015 at 12:49:09PM +, Kweh, Hock Leong wrote: So the process steps basically look like this: 1.) cat capsule_ticket=== acquire a number and lock mutex then expose firmware_class user helper

Re: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-02-25 Thread Borislav Petkov
On Wed, Feb 25, 2015 at 12:38:20PM +, Kweh, Hock Leong wrote: The reason we use this interface for efi capsule is that efi capsule support multi binaries to be uploaded and each binary file name can be different. So you can write the file path to a second file and reload then, once per

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-02-24 Thread Kweh, Hock Leong
> -Original Message- > From: Kweh, Hock Leong > Sent: Tuesday, February 24, 2015 6:54 PM > > In callbackfn_efi_capsule, you call request_firmware_nowait. When that > callback is invoked, I think that the /sys/class/firmware/efi-capsule-file > directory doesn't exist at all. > If the

RE: Re: [PATCH v2 3/3] efi: Capsule update with user helper interface

2015-02-24 Thread Kweh, Hock Leong
-Original Message- From: Kweh, Hock Leong Sent: Tuesday, February 24, 2015 6:54 PM In callbackfn_efi_capsule, you call request_firmware_nowait. When that callback is invoked, I think that the /sys/class/firmware/efi-capsule-file directory doesn't exist at all. If the callback