From: Pavel Machek <pavel@ucw.cz>
To: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Steven Rostedt <rostedt@goodmis.org>,
Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
Andy Lutomirski <luto@amacapital.net>,
Oleg Nesterov <oleg@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Alexei Starovoitov <ast@plumgrid.com>,
Will Drewry <wad@chromium.org>, Kees Cook <keescook@chromium.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] x86, acpi: Eliminate saved_eip
Date: Wed, 17 Jun 2015 11:28:32 +0200 [thread overview]
Message-ID: <20150617092832.GA17009@amd> (raw)
In-Reply-To: <55801A9C.9010207@redhat.com>
On Tue 2015-06-16 14:46:20, Denys Vlasenko wrote:
> On 06/16/2015 12:05 PM, Pavel Machek wrote:
> >
> >> diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S
> >> index 665c6b7..eef2bd3 100644
> >> --- a/arch/x86/kernel/acpi/wakeup_32.S
> >> +++ b/arch/x86/kernel/acpi/wakeup_32.S
> >> @@ -31,17 +31,11 @@ wakeup_pmode_return:
> >>
> >> movl %cs:saved_magic, %eax
> >> cmpl $0x12345678, %eax
> >> - jne bogus_magic
> >> -
> >> - # jump to place where we left off
> >> - movl saved_eip, %eax
> >> - jmp *%eax
> >> -
> >> + je ret_point
> >> bogus_magic:
> >
> > Longjump is supposed to flush the prefetch, but hopefully nothing
> > depends on that detail... ...
> >
> > no.
> >
> > https://en.wikibooks.org/wiki/X86_Assembly/Protected_Mode#Entering_Protected_Mode
> >
> > longjump is supposed to be there. Sorry about that. I guess indirect
> > jump is not neccessary, and we should add a comment there.
>
> What "long jump"? It's not a far (segment:offset) jump, it's a near
> jump (one which only changes the offset), indirect one through a register.
Yup, you are right, the ljmp is few instructions above that.
> And we aren't switching to or from protected mode here.
wakeup_pmode_return... that's just after switching to protected mode
AFAICT.
Anyway,
Acked-by: Pavel Machek <pavel@ucw.cz>
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
prev parent reply other threads:[~2015-06-17 9:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-14 13:23 [PATCH 1/3] x86, acpi: Eliminate saved_eip Denys Vlasenko
2015-06-14 13:23 ` [PATCH 2/3] x86, acpi: On S3 failure, just fall through Denys Vlasenko
2015-06-15 10:35 ` Borislav Petkov
2015-06-14 13:23 ` [PATCH 3/3] x86, acpi: Fold {save,restore}_registers into their single callers Denys Vlasenko
2015-06-15 8:58 ` [PATCH 1/3] x86, acpi: Eliminate saved_eip Borislav Petkov
2015-06-16 10:05 ` Pavel Machek
2015-06-16 12:46 ` Denys Vlasenko
2015-06-17 9:28 ` Pavel Machek [this message]
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=20150617092832.GA17009@amd \
--to=pavel@ucw.cz \
--cc=ast@plumgrid.com \
--cc=bp@alien8.de \
--cc=dvlasenk@redhat.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.org \
--cc=wad@chromium.org \
--cc=x86@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.