public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>, Pavel Machek <pavel@ucw.cz>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	"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 2/3] x86, acpi: On S3 failure, just fall through
Date: Mon, 15 Jun 2015 12:35:25 +0200	[thread overview]
Message-ID: <20150615103525.GH4255@pd.tnic> (raw)
In-Reply-To: <1434288190-24993-2-git-send-email-dvlasenk@redhat.com>

On Sun, Jun 14, 2015 at 03:23:09PM +0200, Denys Vlasenko wrote:
> Th "jmp" deleted by this patch in fact compiles to "jmp to next insn",
> since ".p2align 4,,7" happens to not do any alignment -
> aligning to 2^4 would require more than 7 bytes of padding:
> 
> 000000b0 <do_suspend_lowlevel>:
>   b0:   e8 fc ff ff ff          call   <save_processor_state>
>   b5:   e8 8d ff ff ff          call   47 <save_registers>
>   ba:   6a 03                   push   $0x3
>   bc:   e8 fc ff ff ff          call   <x86_acpi_enter_sleep_state>
>   c1:   83 c4 04                add    $0x4,%esp
>   c4:   eb 00                   jmp    c6 <ret_point>   <============ THIS
> 000000c6 <ret_point>:
>   c6:   e8 c4 ff ff ff          call   8f <restore_registers>
> 
> Run-tested.
> 
> Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
> CC: Pavel Machek <pavel@ucw.cz>
> CC: Linus Torvalds <torvalds@linux-foundation.org>
> CC: Steven Rostedt <rostedt@goodmis.org>
> CC: Ingo Molnar <mingo@kernel.org>
> CC: Borislav Petkov <bp@alien8.de>
> CC: "H. Peter Anvin" <hpa@zytor.com>
> CC: Andy Lutomirski <luto@amacapital.net>
> CC: Oleg Nesterov <oleg@redhat.com>
> CC: Frederic Weisbecker <fweisbec@gmail.com>
> CC: Alexei Starovoitov <ast@plumgrid.com>
> CC: Will Drewry <wad@chromium.org>
> CC: Kees Cook <keescook@chromium.org>
> CC: x86@kernel.org
> CC: linux-kernel@vger.kernel.org
> ---
>  arch/x86/kernel/acpi/wakeup_32.S | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S
> index eef2bd3..5fec9b0 100644
> --- a/arch/x86/kernel/acpi/wakeup_32.S
> +++ b/arch/x86/kernel/acpi/wakeup_32.S
> @@ -68,11 +68,8 @@ ENTRY(do_suspend_lowlevel)
>  	pushl	$3
>  	call	x86_acpi_enter_sleep_state
>  	addl	$4, %esp
> +# If S3 fails, we simply fall through to S3 wakeup code:
>  
> -#	In case of S3 failure, we'll emerge here.  Jump
> -# 	to ret_point to recover
> -	jmp	ret_point
> -	.p2align 4,,7
>  ret_point:
>  	call	restore_registers
>  	call	restore_processor_state

Reviewed-by: Borislav Petkov <bp@suse.de>

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

  reply	other threads:[~2015-06-15 10:35 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 [this message]
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

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=20150615103525.GH4255@pd.tnic \
    --to=bp@alien8.de \
    --cc=ast@plumgrid.com \
    --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=pavel@ucw.cz \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox