Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754254AbbFOKfi (ORCPT ); Mon, 15 Jun 2015 06:35:38 -0400 Received: from mail.skyhub.de ([78.46.96.112]:43242 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750885AbbFOKfb (ORCPT ); Mon, 15 Jun 2015 06:35:31 -0400 Date: Mon, 15 Jun 2015 12:35:25 +0200 From: Borislav Petkov To: Denys Vlasenko Cc: Ingo Molnar , Pavel Machek , Linus Torvalds , Steven Rostedt , "H. Peter Anvin" , Andy Lutomirski , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/3] x86, acpi: On S3 failure, just fall through Message-ID: <20150615103525.GH4255@pd.tnic> References: <1434288190-24993-1-git-send-email-dvlasenk@redhat.com> <1434288190-24993-2-git-send-email-dvlasenk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1434288190-24993-2-git-send-email-dvlasenk@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2417 Lines: 67 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 : > b0: e8 fc ff ff ff call > b5: e8 8d ff ff ff call 47 > ba: 6a 03 push $0x3 > bc: e8 fc ff ff ff call > c1: 83 c4 04 add $0x4,%esp > c4: eb 00 jmp c6 <============ THIS > 000000c6 : > c6: e8 c4 ff ff ff call 8f > > Run-tested. > > Signed-off-by: Denys Vlasenko > CC: Pavel Machek > CC: Linus Torvalds > CC: Steven Rostedt > CC: Ingo Molnar > CC: Borislav Petkov > CC: "H. Peter Anvin" > CC: Andy Lutomirski > CC: Oleg Nesterov > CC: Frederic Weisbecker > CC: Alexei Starovoitov > CC: Will Drewry > CC: Kees Cook > 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 -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/