Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755812AbbLQB7e (ORCPT ); Wed, 16 Dec 2015 20:59:34 -0500 Received: from mga04.intel.com ([192.55.52.120]:58062 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755778AbbLQB7b (ORCPT ); Wed, 16 Dec 2015 20:59:31 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,438,1444719600"; d="scan'208";a="862496662" 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 , "Anvin, H Peter" , "'Matt Fleming'" 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: AdEVOlP9hQNoWcS1T4iHCDqqnRvIpQA9MbYACHBOK5D//4JcAP/+hjMw Date: Thu, 17 Dec 2015 01:59:26 +0000 Message-ID: References: <20151103195934.GC3620@pd.tnic> <20151216112610.GC29775@pd.tnic> In-Reply-To: <20151216112610.GC29775@pd.tnic> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.30.20.206] 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 tBH1xbM7013318 Content-Length: 1462 Lines: 40 > -----Original Message----- > From: Borislav Petkov [mailto:bp@alien8.de] > Sent: Wednesday, December 16, 2015 7:26 PM > To: Kweh, Hock Leong > 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; 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 +0000, 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 running on an EFI system or > not. > > efi_capsule_loader_init() simply loads the driver on *any* system, > even a !UEFI one. And when I write some garbage to the device file, it > explodes. > > What it should do instead is check whether it is being loaded on en EFI > system and whether all it needs to function properly is initialized > already, like runtime services. If not, it should refuse to load. > > -- > Regards/Gruss, > Boris. Hi Borislav, I catch your point now. I will fix that in v10 patch. Thanks & Regards, Wilson ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?