Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp5357456imm; Sat, 19 May 2018 00:00:52 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp+kPTlo9XAeOqE4rE1hPEGSVBKdiGSy0c2OiRh0L4g2uJYhHMQasjwZ0E+cdlAeTmL5pVN X-Received: by 2002:a63:ab0b:: with SMTP id p11-v6mr9431297pgf.199.1526713252817; Sat, 19 May 2018 00:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526713252; cv=none; d=google.com; s=arc-20160816; b=QYlpVbrciklsmxCLvy+4sUAVpwUtliVTY3KjKgKFmOGB6rgGdKaIpg6eNVW/MlOFHA ToVJozYawzGRqBdDW0M9ltv+kXer0ZjXbK6GG2LWkfD9kqKcmLxk4CCbxujLQNdCoN2R FC4G165O/rpKV5ewAlrn9i+xYjPkZL3tDxvjSTvnfV56mns6+0lrw54YkR5gHq66qgCb kRa/oLXti2wH9CXRiInjanv8gMa5+7P+wlPe/9/zQ2gKnkM2KD1l3RVLm8tBGDvF/Uo0 g+wsoEWnE8vgoqVNsY4drEYTNXjdxGpalqvTDlO9jg3rNm/Vm3g1VhN8f5jRbxxsezmy hoSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=MgIPbwgwM7tHYznUS/hwnEInRsv0TWF/Sms/lk1BhRo=; b=ah/CnE/hPMBImnBO58jFFQmos3t48sbhOd7U2HUbsOdKyyfUFUYkOnkuBS1VfIz0KY 3L0Pa5Og57WXqQh2mnMipbLit+z02bV+bns8NnVVWEb4OlC/mcUsq2jfGfum366qv3Dj w08VRqqYXCkcIwEKiVrqzo3ILgleSmy12tjvYmidlvPR4vtIGmMw4JHw5gzW6YW3UBiO B2vPWIbHEER8AFgrnctPnXjliHngBpkQgYkBBfCHqrXF7B8xwEtPkpCSExJPcwAmwlxp DwBbBgeNui7L/BgDK+xsVGPXSIszEQItmkZ+3OOOq1RoBEcG3YNzXi4c/p71+gymoDbp 8HuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33-v6si9287363plb.19.2018.05.19.00.00.26; Sat, 19 May 2018 00:00:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750857AbeESHAN (ORCPT + 99 others); Sat, 19 May 2018 03:00:13 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:40615 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750743AbeESHAM (ORCPT ); Sat, 19 May 2018 03:00:12 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id DE62F80517; Sat, 19 May 2018 09:00:10 +0200 (CEST) Date: Sat, 19 May 2018 09:00:08 +0200 From: Pavel Machek To: Linus Torvalds , "Rafael J. Wysocki" Cc: Josh Poimboeuf , Alexey Dobriyan , Peter Anvin , kernel test robot , Ingo Molnar , Thomas Gleixner , Andrew Lutomirski , Borislav Petkov , Brian Gerst , Denys Vlasenko , Peter Zijlstra , Linux Kernel Mailing List , Peter Anvin , tipbuild@zytor.com, LKP Subject: "interesting" entry in hibernation code was Re: [lkp-robot] [x86/asm] 51bad67ffb: int3:#[##] Message-ID: <20180519070008.GC30676@amd> References: <20180515080033.GA7714@yexl-desktop> <20180515210757.GA12225@avx2> <20180515214337.GA18021@avx2> <20180515222211.ods5hzne46hozojq@treble> <20180515224354.zmygmsnlqj5lrdbo@treble> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YD3LsXFS42OYHhNZ" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --YD3LsXFS42OYHhNZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > Side note: doing some grepping, I find some other sequences that are a bit > scary, like this: >=20 > 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 >=20 > so apparently people are using ENTRY() for data too (the same pattern > exists in wakeup_64.S). >=20 > 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: =20 .data ALIGN -ENTRY(saved_magic) .long 0 -ENTRY(saved_eip) .long 0 +GLOBAL(saved_magic) .long 0 +saved_eip: .long 0 =20 # saved registers saved_idt: .long 0,0 Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --YD3LsXFS42OYHhNZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlr/y3gACgkQMOfwapXb+vK5DQCgm0W/piplkNmZpougS2ZoBuo+ y4wAoL7WJcAuG3J28+jWH4zqDBbDaz+B =/D+M -----END PGP SIGNATURE----- --YD3LsXFS42OYHhNZ--