From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752673AbcEKMnn (ORCPT ); Wed, 11 May 2016 08:43:43 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:35956 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751360AbcEKMnl (ORCPT ); Wed, 11 May 2016 08:43:41 -0400 Date: Wed, 11 May 2016 13:43:38 +0100 From: Matt Fleming To: "Compostella, Jeremy" Cc: "Elliott, Robert (Persistent Memory)" , Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" , Ard Biesheuvel , "linux-kernel@vger.kernel.org" , "linux-efi@vger.kernel.org" , Arnd Bergmann Subject: Re: [PATCH 2/5] efibc: Fix excessive stack footprint warning Message-ID: <20160511124338.GW2839@codeblueprint.co.uk> References: <1462570771-13324-1-git-send-email-matt@codeblueprint.co.uk> <1462570771-13324-3-git-send-email-matt@codeblueprint.co.uk> <94D0CD8314A33A4D9D801C0FE68B4029639618A2@G4W3202.americas.hpqcorp.net> <87r3dauwzt.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87r3dauwzt.fsf@intel.com> User-Agent: Mutt/1.5.24+41 (02bc14ed1569) (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 10 May, at 10:40:22AM, Jeremy Compostella wrote: > Why not. See patch as attachment. > > Thanks, > > Jérémy > > From 8a9b07e2d7242fa8a36157f1025202a96c3c7c9a Mon Sep 17 00:00:00 2001 > From: Jeremy Compostella > Date: Tue, 10 May 2016 10:34:21 +0200 > Subject: [PATCH] efibc: report the EFI variable name in the error messages > > Report the name of the EFI variable if the value is incorrect or if > efibc_set_variable() fails to allocate the struct efivar_entry object. > > Signed-off-by: Jeremy Compostella > --- > drivers/firmware/efi/efibc.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/firmware/efi/efibc.c b/drivers/firmware/efi/efibc.c > index cb4f573..93d34a1 100644 > --- a/drivers/firmware/efi/efibc.c > +++ b/drivers/firmware/efi/efibc.c > @@ -37,13 +37,14 @@ static int efibc_set_variable(const char *name, const char *value) > size_t size = (strlen(value) + 1) * sizeof(efi_char16_t); > > if (size > sizeof(entry->var.Data)) { > - pr_err("value is too large"); > + pr_err("value is too large for %s EFI variable", name); > return -EINVAL; > } It'd be a good idea to print 'size' too. > > entry = kmalloc(sizeof(*entry), GFP_KERNEL); > if (!entry) { > - pr_err("failed to allocate efivar entry"); > + pr_err("failed to allocate efivar entry for %s EFI variable", > + name); > return -ENOMEM; > } Aren't these pr_err() calls missing newline characters?