From: tip-bot for Peter Jones <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, pjones@redhat.com, hpa@zytor.com,
mingo@kernel.org, tglx@linutronix.de
Subject: [tip:x86/urgent] x86, doc: Be explicit about what the x86 struct boot_params requires
Date: Wed, 6 Mar 2013 20:54:18 -0800 [thread overview]
Message-ID: <tip-3c4aff6b9a183b4f24eb7b8dd6c8a92cdba3bc75@git.kernel.org> (raw)
In-Reply-To: <1362592823-28967-1-git-send-email-pjones@redhat.com>
Commit-ID: 3c4aff6b9a183b4f24eb7b8dd6c8a92cdba3bc75
Gitweb: http://git.kernel.org/tip/3c4aff6b9a183b4f24eb7b8dd6c8a92cdba3bc75
Author: Peter Jones <pjones@redhat.com>
AuthorDate: Wed, 6 Mar 2013 13:00:23 -0500
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Wed, 6 Mar 2013 20:34:43 -0800
x86, doc: Be explicit about what the x86 struct boot_params requires
If the sentinel triggers, we do not want the boot loader authors to
just poke it and make the error go away, we want them to actually fix
the problem.
This should help avoid making the incorrect change in non-compliant
bootloaders.
[ hpa: dropped the Documentation/x86/boot.txt hunk pending
clarifications ]
Signed-off-by: Peter Jones <pjones@redhat.com>
Link: http://lkml.kernel.org/r/1362592823-28967-1-git-send-email-pjones@redhat.com
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
arch/x86/include/asm/bootparam_utils.h | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/bootparam_utils.h b/arch/x86/include/asm/bootparam_utils.h
index ff808ef..653668d 100644
--- a/arch/x86/include/asm/bootparam_utils.h
+++ b/arch/x86/include/asm/bootparam_utils.h
@@ -19,8 +19,22 @@
*/
static void sanitize_boot_params(struct boot_params *boot_params)
{
+ /*
+ * IMPORTANT NOTE TO BOOTLOADER AUTHORS: do not simply clear
+ * this field. The purpose of this field is to guarantee
+ * compliance with the x86 boot spec located in
+ * Documentation/x86/boot.txt . That spec says that the
+ * *whole* structure should be cleared, after which only the
+ * portion defined by struct setup_header (boot_params->hdr)
+ * should be copied in.
+ *
+ * If you're having an issue because the sentinel is set, you
+ * need to change the whole structure to be cleared, not this
+ * (or any other) individual field, or you will soon have
+ * problems again.
+ */
if (boot_params->sentinel) {
- /*fields in boot_params are not valid, clear them */
+ /* fields in boot_params are left uninitialized, clear them */
memset(&boot_params->olpc_ofw_header, 0,
(char *)&boot_params->efi_info -
(char *)&boot_params->olpc_ofw_header);
next prev parent reply other threads:[~2013-03-07 4:55 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 20:52 Revert commit 5dcd14ecd4 - breaks EFI boot with SLES11 elilo.efi Robin Holt
2013-02-28 21:05 ` H. Peter Anvin
2013-02-28 21:09 ` Robin Holt
2013-02-28 21:12 ` H. Peter Anvin
2013-02-28 23:02 ` Yinghai Lu
2013-02-28 23:09 ` H. Peter Anvin
2013-03-05 8:15 ` Robin Holt
2013-03-05 15:22 ` H. Peter Anvin
2013-03-05 19:12 ` Yinghai Lu
2013-03-05 19:52 ` Robin Holt
2013-03-05 20:14 ` Yinghai Lu
2013-03-05 20:22 ` Robin Holt
2013-03-06 16:53 ` Josh Boyer
2013-03-06 17:26 ` H. Peter Anvin
2013-03-06 17:36 ` Josh Boyer
2013-03-06 17:37 ` H. Peter Anvin
2013-03-06 20:40 ` Josh Boyer
2013-03-06 20:43 ` H. Peter Anvin
2013-03-07 4:53 ` [tip:x86/urgent] x86: Don' t clear efi_info even if the sentinel hits tip-bot for Josh Boyer
2013-03-06 18:00 ` [PATCH] Be explicit about what the x86 0x020c boot parameter version requires Peter Jones
2013-03-07 4:31 ` H. Peter Anvin
2013-03-07 8:39 ` Matt Fleming
2013-03-07 4:54 ` tip-bot for Peter Jones [this message]
2013-03-06 16:55 ` Revert commit 5dcd14ecd4 - breaks EFI boot with SLES11 elilo.efi Peter Jones
2013-03-06 17:14 ` H. Peter Anvin
2013-03-06 17:32 ` Peter Jones
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-3c4aff6b9a183b4f24eb7b8dd6c8a92cdba3bc75@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=pjones@redhat.com \
--cc=tglx@linutronix.de \
/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