Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752652AbbKALLb (ORCPT ); Sun, 1 Nov 2015 06:11:31 -0500 Received: from mga01.intel.com ([192.55.52.88]:65363 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752382AbbKALL2 (ORCPT ); Sun, 1 Nov 2015 06:11:28 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,228,1444719600"; d="scan'208";a="839951478" From: "Kweh, Hock Leong" To: Borislav Petkov CC: Matt Fleming , Greg Kroah-Hartman , "Ong, Boon Leong" , LKML , "linux-efi@vger.kernel.org" , Sam Protsenko , Peter Jones , Andy Lutomirski , "Roy Franz" , James Bottomley , Linux FS Devel , "Fleming, Matt" , "Anvin, H Peter" Subject: RE: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware Thread-Topic: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware Thread-Index: AQHRFJBNC81W/lCPlUaMyOpZJhbG6Z6G+NDA//+ATICAAIi5gA== Date: Sun, 1 Nov 2015 11:11:23 +0000 Message-ID: References: <1446055138-26047-1-git-send-email-hock.leong.kweh@intel.com> <1446055138-26047-2-git-send-email-hock.leong.kweh@intel.com> <20151101102944.GA12711@pd.tnic> <20151101105801.GB12711@pd.tnic> In-Reply-To: <20151101105801.GB12711@pd.tnic> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.30.20.205] 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 tA1BCAOp026876 Content-Length: 1253 Lines: 36 > -----Original Message----- > From: Borislav Petkov [mailto:bp@alien8.de] > Sent: Sunday, November 01, 2015 6:58 PM > > On Sun, Nov 01, 2015 at 10:52:52AM +0000, 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 Ok. Will try this out. > > > > > +#define UPLOAD_DONE -1 > > > > > > Isn't the fact that upload was finished a success message? If so, why is it a > > > negative value? > > > > This is to indicate an upload is done and pending for close(2). If a > subsequence > > write(2) perform, return error. Comments inputted by Matt and Andy. > > But in that case you can return ERR_OCCURRED. UPLOAD_DONE still doesn't > look like a negative value to me as it signals that the upload was done > and thus successful as no errors happened during the upload. > Hmm .... If I combine these 2 flags to become one as "NO_MORE_WRITE_ACTION" to better describing the situation, you Okay with it? Regards, Wilson ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?