Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933898AbbLPL0V (ORCPT ); Wed, 16 Dec 2015 06:26:21 -0500 Received: from mail.skyhub.de ([78.46.96.112]:34449 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752872AbbLPL0T (ORCPT ); Wed, 16 Dec 2015 06:26:19 -0500 Date: Wed, 16 Dec 2015 12:26:10 +0100 From: Borislav Petkov 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 Message-ID: <20151216112610.GC29775@pd.tnic> References: <20151103195934.GC3620@pd.tnic> 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 Content-Length: 1005 Lines: 28 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. ECO tip #101: Trim your mails when you reply. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/