From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Matt_Domsch@dell.com, matthew.e.tolentino@intel.com,
linux-kernel@vger.kernel.org,
mactel-linux-devel@lists.sourceforge.net
Subject: [PATCH] - make sure that EFI variable data size is always 64 bit
Date: Sun, 19 Mar 2006 18:43:25 +0000 [thread overview]
Message-ID: <20060319184325.GA7605@srcf.ucam.org> (raw)
The EFI spec states that the data size of an EFI variable is 64 bits.
"unsigned long", on the other hand, isn't on IA32.
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index bda5bce..488c24c 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -110,7 +110,7 @@ static LIST_HEAD(efivar_list);
struct efi_variable {
efi_char16_t VariableName[1024/sizeof(efi_char16_t)];
efi_guid_t VendorGuid;
- unsigned long DataSize;
+ __u64 DataSize;
__u8 Data[1024];
efi_status_t Status;
__u32 Attributes;
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 9e97bc2..3f0a179 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -163,7 +163,7 @@ typedef efi_status_t efi_get_wakeup_time
efi_time_t *tm);
typedef efi_status_t efi_set_wakeup_time_t (efi_bool_t enabled, efi_time_t *tm);
typedef efi_status_t efi_get_variable_t (efi_char16_t *name, efi_guid_t *vendor, u32 *attr,
- unsigned long *data_size, void *data);
+ __u64 *data_size, void *data);
typedef efi_status_t efi_get_next_variable_t (unsigned long *name_size, efi_char16_t *name,
efi_guid_t *vendor);
typedef efi_status_t efi_set_variable_t (efi_char16_t *name, efi_guid_t *vendor,
--
Matthew Garrett | mjg59@srcf.ucam.org
next reply other threads:[~2006-03-19 18:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-19 18:43 Matthew Garrett [this message]
2006-03-19 21:29 ` [PATCH] - make sure that EFI variable data size is always 64 bit Matt Domsch
2006-03-19 21:33 ` Matthew Garrett
2006-03-19 22:49 ` Matt Domsch
2006-03-19 23:17 ` Matthew Garrett
2006-03-20 8:54 ` Pavel Machek
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=20060319184325.GA7605@srcf.ucam.org \
--to=mjg59@srcf.ucam.org \
--cc=Matt_Domsch@dell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mactel-linux-devel@lists.sourceforge.net \
--cc=matthew.e.tolentino@intel.com \
/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