From: Paolo Ornati <ornati@fastwebnet.it>
To: "Dan Merillat" <dan.merillat@gmail.com>
Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: reset during bootup - solved
Date: Sun, 12 Aug 2007 13:09:04 +0200 [thread overview]
Message-ID: <20070812130904.7ecc9412@localhost> (raw)
In-Reply-To: <a56dfcf00708120244x3ae8f4w9183354cf5f33f93@mail.gmail.com>
On Sun, 12 Aug 2007 05:44:36 -0400
"Dan Merillat" <dan.merillat@gmail.com> wrote:
> However, a git-pull at 2am (b8d3f244) fixed it. Not sure where in
> there it started working again, I can bisect backwards to find out if
> need be.
I think it is was fixed by this one:
----
Do not replace whole memcpy in apply alternatives
apply_alternatives uses memcpy() to apply alternatives. Which has the
unfortunate effect that while applying memcpy alternative to memcpy
itself it tries to overwrite itself with nops - which causes #UD fault
as it overwrites half of an instruction in copy loop, and from this
point on only possible outcome is triplefault and reboot.
b8d3f2448b8f4ba24f301e23585547ba1acc1f04
arch/x86_64/lib/memcpy.S | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/x86_64/lib/memcpy.S b/arch/x86_64/lib/memcpy.S
index 0ea0ddc..c22981f 100644
--- a/arch/x86_64/lib/memcpy.S
+++ b/arch/x86_64/lib/memcpy.S
@@ -124,6 +124,8 @@ ENDPROC(__memcpy)
.quad memcpy
.quad 1b
.byte X86_FEATURE_REP_GOOD
- .byte .Lfinal - memcpy
+ /* Replace only beginning, memcpy is used to apply alternatives, so it
+ * is silly to overwrite itself with nops - reboot is only outcome... */
+ .byte 2b - 1b
.byte 2b - 1b
.previous
--
Paolo Ornati
Linux 2.6.23-rc2-gac078602 on x86_64
next prev parent reply other threads:[~2007-08-12 11:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-12 9:44 reset during bootup - solved Dan Merillat
2007-08-12 11:09 ` Paolo Ornati [this message]
2007-08-12 14:03 ` Andi Kleen
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=20070812130904.7ecc9412@localhost \
--to=ornati@fastwebnet.it \
--cc=dan.merillat@gmail.com \
--cc=linux-kernel@vger.kernel.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