RE: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware

2015-12-16 Thread Kweh, Hock Leong
irski; Roy > Franz; James Bottomley; Linux FS Devel; Anvin, H Peter; 'Matt Fleming' > Subject: Re: [PATCH v9 1/1] efi: a misc char interface for user to update efi > firmware > > On Wed, Dec 16, 2015 at 11:09:50AM +, Kweh, Hock Leong wrote: > > So, my conclusion is

Re: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware

2015-12-16 Thread Borislav Petkov
On Wed, Dec 16, 2015 at 11:09:50AM +, Kweh, Hock Leong wrote: > So, my conclusion is that this module is not able to be tested on QEMU > environment. That's not the point. The module should better handle writing to the device file gracefully and not explode. Regardless of whether it is runnin

RE: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware

2015-12-16 Thread Kweh, Hock Leong
> -Original Message- > From: Borislav Petkov [mailto:b...@alien8.de] > Sent: Wednesday, November 04, 2015 4:00 AM > > On Mon, Nov 02, 2015 at 06:47:29AM +, Kweh, Hock Leong wrote: > > By looking at your dmesg log, the above print out message seem that > > someone has called the flush()

RE: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware

2015-11-04 Thread Kweh, Hock Leong
> -Original Message- > From: Borislav Petkov [mailto:b...@alien8.de] > Sent: Wednesday, November 04, 2015 4:15 AM > > On Mon, Nov 02, 2015 at 07:17:28AM +, Kweh, Hock Leong wrote: > > This is not a return value to indicate what is going now. It is a flag > > used in "cap_info->index" w

Re: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware

2015-11-03 Thread Borislav Petkov
On Mon, Nov 02, 2015 at 07:17:28AM +, Kweh, Hock Leong wrote: > This is not a return value to indicate what is going now. It is a flag > used in "cap_info->index" which positive value has a meaning of index > number. I am using the negative value for the flag which similar to > the implementati

Re: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware

2015-11-03 Thread Borislav Petkov
On Mon, Nov 02, 2015 at 06:47:29AM +, Kweh, Hock Leong wrote: > By looking at your dmesg log, the above print out message seem that > someone has called the flush() after the write(2). In my environment, flush() > only being called in 2 places which are before write(2) and during close(2). > Th

RE: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware

2015-11-01 Thread Kweh, Hock Leong
> -Original Message- > From: Borislav Petkov [mailto:b...@alien8.de] > Sent: Sunday, November 01, 2015 8:59 PM > > On Sun, Nov 01, 2015 at 11:11:23AM +, Kweh, Hock Leong wrote: > > Hmm If I combine these 2 flags to become one as > > "NO_MORE_WRITE_ACTION" to better describing the

RE: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware

2015-11-01 Thread Kweh, Hock Leong
> -Original Message- > From: Borislav Petkov [mailto:b...@alien8.de] > Sent: Sunday, November 01, 2015 6:30 PM > > > > Example method to load the capsule binary: > > cat firmware.bin > /dev/efi_capsule_loader > > $ cat "some_dumb_file" > /dev/efi_capsule_loader > Killed > > and in dmesg:

Re: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware

2015-11-01 Thread Borislav Petkov
On Sun, Nov 01, 2015 at 11:11:23AM +, Kweh, Hock Leong wrote: > Hmm If I combine these 2 flags to become one as > "NO_MORE_WRITE_ACTION" to better describing the situation, you Okay > with it? I don't understand, why combine? Why not simply make UPLOAD_DONE a positive value: #define UPL

RE: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware

2015-11-01 Thread Kweh, Hock Leong
> -Original Message- > From: Borislav Petkov [mailto:b...@alien8.de] > Sent: Sunday, November 01, 2015 6:58 PM > > On Sun, Nov 01, 2015 at 10:52:52AM +, Kweh, Hock Leong wrote: > > Could you share me your dumb file? I did perform negative test, but I did > > not get these dump stack in

Re: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware

2015-11-01 Thread Borislav Petkov
On Sun, Nov 01, 2015 at 10:52:52AM +, Kweh, Hock Leong wrote: > Could you share me your dumb file? I did perform negative test, but I did > not get these dump stack in dmesg. Thanks. I think almost any file works: cat /bin/ls > /dev/efi_capsule_loader > > > +#define UPLOAD_DONE -1 > > > > I

RE: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware

2015-11-01 Thread Kweh, Hock Leong
> -Original Message- > From: Borislav Petkov [mailto:b...@alien8.de] > Sent: Sunday, November 01, 2015 6:30 PM > > > > Example method to load the capsule binary: > > cat firmware.bin > /dev/efi_capsule_loader > > $ cat "some_dumb_file" > /dev/efi_capsule_loader Killed > > and in dmesg: >

Re: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware

2015-11-01 Thread Borislav Petkov
On Thu, Oct 29, 2015 at 01:58:57AM +0800, Kweh, Hock Leong wrote: > From: "Kweh, Hock Leong" > > Introducing a kernel module to expose capsule loader interface > (misc char device file note) for user to upload capsule binaries. > > Example method to load the capsule binary: > cat firmware.bin >

[PATCH v9 1/1] efi: a misc char interface for user to update efi firmware

2015-10-28 Thread Kweh, Hock Leong
From: "Kweh, Hock Leong" Introducing a kernel module to expose capsule loader interface (misc char device file note) for user to upload capsule binaries. Example method to load the capsule binary: cat firmware.bin > /dev/efi_capsule_loader This patch also export efi_capsule_supported() function