lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 19 May 2018 09:00:08 +0200
From:   Pavel Machek <pavel@....cz>
To:     Linus Torvalds <torvalds@...ux-foundation.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:     Josh Poimboeuf <jpoimboe@...hat.com>,
        Alexey Dobriyan <adobriyan@...il.com>,
        Peter Anvin <h.peter.anvin@...el.com>,
        kernel test robot <xiaolong.ye@...el.com>,
        Ingo Molnar <mingo@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Andrew Lutomirski <luto@...nel.org>,
        Borislav Petkov <bp@...en8.de>,
        Brian Gerst <brgerst@...il.com>,
        Denys Vlasenko <dvlasenk@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Peter Anvin <hpa@...or.com>, tipbuild@...or.com,
        LKP <lkp@...org>
Subject: "interesting" entry in hibernation code was Re: [lkp-robot]
 [x86/asm] 51bad67ffb: int3:#[##]

Hi!

> Side note: doing some grepping, I find some other sequences that are a bit
> scary, like this:
> 
> arch/x86/kernel/acpi/wakeup_32.S-.data
> arch/x86/kernel/acpi/wakeup_32.S-ALIGN
> arch/x86/kernel/acpi/wakeup_32.S:ENTRY(saved_magic)     .long   0
> arch/x86/kernel/acpi/wakeup_32.S:ENTRY(saved_eip)       .long   0
> 
> so apparently people are using ENTRY() for data too (the same pattern
> exists in wakeup_64.S).
> 
> So we end up having those odd 0x90 bytes (now 0xcc) in the data section as
> "padding" between those two values. Crazy.

Sorry about that. I'm pretty sure intention was simply to use the
variable from C code.. and ENTRY() worked. I was not aware that it has
side effect of padding...

Let me see how this can be improved... (untested).

diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S
index 0c26b1b..d6f477f 100644
--- a/arch/x86/kernel/acpi/wakeup_32.S
+++ b/arch/x86/kernel/acpi/wakeup_32.S
@@ -89,8 +89,8 @@ ret_point:
 
 .data
 ALIGN
-ENTRY(saved_magic)	.long	0
-ENTRY(saved_eip)	.long	0
+GLOBAL(saved_magic)	.long	0
+saved_eip:	.long	0
 
 # saved registers
 saved_idt:	.long	0,0


									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ