From: "tip-bot for Compostella, Jeremy" <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: elliott@hpe.com, ard.biesheuvel@linaro.org, tglx@linutronix.de,
matt@codeblueprint.co.uk, hpa@zytor.com,
jeremy.compostella@intel.com, peterz@infradead.org,
torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
mingo@kernel.org, arnd@arndb.de
Subject: [tip:efi/core] efibc: Report more information in the error messages
Date: Mon, 27 Jun 2016 06:00:49 -0700 [thread overview]
Message-ID: <tip-5356c32742bd51c8c57065d2389a2c4bc036adcd@git.kernel.org> (raw)
In-Reply-To: <1466839230-12781-2-git-send-email-matt@codeblueprint.co.uk>
Commit-ID: 5356c32742bd51c8c57065d2389a2c4bc036adcd
Gitweb: http://git.kernel.org/tip/5356c32742bd51c8c57065d2389a2c4bc036adcd
Author: Compostella, Jeremy <jeremy.compostella@intel.com>
AuthorDate: Sat, 25 Jun 2016 08:20:24 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 27 Jun 2016 13:06:54 +0200
efibc: Report more information in the error messages
Report the name of the EFI variable if the value size is too large,
or if efibc_set_variable() fails to allocate the 'struct efivar_entry'
object.
If efibc_set_variable() fails because the 'size' value is too
large, it also reports this value in the error message.
Reported-by: Robert Elliott <elliott@hpe.com>
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/1466839230-12781-2-git-send-email-matt@codeblueprint.co.uk
[ Minor readability edits. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
drivers/firmware/efi/efibc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/firmware/efi/efibc.c b/drivers/firmware/efi/efibc.c
index 8dd0c70..503bbe2 100644
--- a/drivers/firmware/efi/efibc.c
+++ b/drivers/firmware/efi/efibc.c
@@ -37,13 +37,13 @@ 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 (%zu bytes) for '%s' EFI variable\n", size, name);
return -EINVAL;
}
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\n", name);
return -ENOMEM;
}
next prev parent reply other threads:[~2016-06-27 13:01 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-25 7:20 [GIT PULL 0/7] EFI changes for v4.8 Matt Fleming
2016-06-25 7:20 ` [PATCH 1/7] efibc: Report more information in the error messages Matt Fleming
2016-06-27 13:00 ` tip-bot for Compostella, Jeremy [this message]
2016-06-25 7:20 ` [PATCH 2/7] efi: Document #define FOO_PROTOCOL_GUID layout Matt Fleming
2016-06-27 10:49 ` Ingo Molnar
2016-06-27 11:14 ` Joe Perches
2016-07-04 13:17 ` Matt Fleming
2016-07-08 13:27 ` [tip:efi/core] efi: Reorganize the GUID table to make it easier to read tip-bot for Ingo Molnar
2016-06-27 13:01 ` [tip:efi/core] efi: Document #define FOO_PROTOCOL_GUID layout tip-bot for Peter Jones
2016-06-25 7:20 ` [PATCH 3/7] x86/efi: Remove unused variable efi Matt Fleming
2016-06-27 13:01 ` [tip:efi/core] x86/efi: Remove unused variable 'efi' tip-bot for Colin Ian King
2016-06-25 7:20 ` [PATCH 4/7] efi: Convert efi_call_virt to efi_call_virt_pointer Matt Fleming
2016-06-27 11:00 ` Ingo Molnar
2016-06-27 11:22 ` Mark Rutland
2016-07-04 13:18 ` Matt Fleming
2016-06-27 13:02 ` [tip:efi/core] efi: Convert efi_call_virt() to efi_call_virt_pointer() tip-bot for Alex Thorlton
2016-06-25 7:20 ` [PATCH 5/7] x86/uv: Update uv_bios_call to use efi_call_virt_pointer Matt Fleming
2016-06-27 13:02 ` [tip:efi/core] x86/uv: Update uv_bios_call() to use efi_call_virt_pointer() tip-bot for Alex Thorlton
2016-06-25 7:20 ` [PATCH 6/7] x86/efi: Update efi_thunk to use the the arch_efi_call_virt* macros Matt Fleming
2016-06-27 13:02 ` [tip:efi/core] x86/efi: Update efi_thunk() to use the the arch_efi_call_virt*() macros tip-bot for Alex Thorlton
2016-06-25 7:20 ` [PATCH 7/7] x86/efi: Remove unused efi_get_time function Matt Fleming
2016-06-27 13:03 ` [tip:efi/core] x86/efi: Remove the unused efi_get_time() function tip-bot for Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-5356c32742bd51c8c57065d2389a2c4bc036adcd@git.kernel.org \
--to=tipbot@zytor.com \
--cc=ard.biesheuvel@linaro.org \
--cc=arnd@arndb.de \
--cc=elliott@hpe.com \
--cc=hpa@zytor.com \
--cc=jeremy.compostella@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=matt@codeblueprint.co.uk \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).