From: tip-bot for Alexander Kuleshov <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: ryabinin.a.a@gmail.com, mingo@kernel.org, alpopov@ptsecurity.com,
linux-kernel@vger.kernel.org, luto@kernel.org,
luto@amacapital.net, brgerst@gmail.com, bp@alien8.de,
dvlasenk@redhat.com, peterz@infradead.org,
kuleshovmail@gmail.com, torvalds@linux-foundation.org,
tglx@linutronix.de, hpa@zytor.com, bp@suse.de
Subject: [tip:x86/boot] x86/boot: Simplify kernel load address alignment check
Date: Sat, 30 Jan 2016 05:20:52 -0800 [thread overview]
Message-ID: <tip-a4733143085d6c782ac1e6c85778655b6bac1d4e@git.kernel.org> (raw)
In-Reply-To: <1453842730-28463-11-git-send-email-bp@alien8.de>
Commit-ID: a4733143085d6c782ac1e6c85778655b6bac1d4e
Gitweb: http://git.kernel.org/tip/a4733143085d6c782ac1e6c85778655b6bac1d4e
Author: Alexander Kuleshov <kuleshovmail@gmail.com>
AuthorDate: Tue, 26 Jan 2016 22:12:10 +0100
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Sat, 30 Jan 2016 11:22:48 +0100
x86/boot: Simplify kernel load address alignment check
We are using %rax as temporary register to check the kernel
address alignment. We don't really have to since the TEST
instruction does not clobber the destination operand.
Suggested-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Alexander Popov <alpopov@ptsecurity.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1453531828-19291-1-git-send-email-kuleshovmail@gmail.com
Link: http://lkml.kernel.org/r/1453842730-28463-11-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/head_64.S | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index ffdc0e8..7c21029 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -76,9 +76,7 @@ startup_64:
subq $_text - __START_KERNEL_map, %rbp
/* Is the address not 2M aligned? */
- movq %rbp, %rax
- andl $~PMD_PAGE_MASK, %eax
- testl %eax, %eax
+ testl $~PMD_PAGE_MASK, %ebp
jnz bad_address
/*
next prev parent reply other threads:[~2016-01-30 13:22 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 21:12 [PATCH 00/10] tip-queue 2016-01-26, rest Borislav Petkov
2016-01-26 21:12 ` [PATCH 01/10] x86/asm: Add condition codes clobber to memory barrier macros Borislav Petkov
2016-01-26 21:12 ` [PATCH 02/10] x86/asm: Drop a comment left over from X86_OOSTORE Borislav Petkov
2016-01-26 21:12 ` [PATCH 03/10] x86/asm: Tweak the comment about wmb() use for IO Borislav Petkov
2016-01-26 21:12 ` [PATCH 04/10] x86/cpufeature: Carve out X86_FEATURE_* Borislav Petkov
2016-01-30 13:18 ` [tip:x86/asm] " tip-bot for Borislav Petkov
2016-01-26 21:12 ` [PATCH 05/10] x86/cpufeature: Replace the old static_cpu_has() with safe variant Borislav Petkov
2016-01-30 13:19 ` [tip:x86/asm] " tip-bot for Borislav Petkov
2016-01-26 21:12 ` [PATCH 06/10] x86/cpufeature: Get rid of the non-asm goto variant Borislav Petkov
2016-01-27 3:36 ` Brian Gerst
2016-01-27 8:41 ` Borislav Petkov
2016-01-27 8:43 ` [PATCH -v1.1 " Borislav Petkov
2016-01-30 13:19 ` [tip:x86/asm] " tip-bot for Borislav Petkov
2016-01-27 8:45 ` [PATCH -v1.1 8/10] x86/alternatives: Discard dynamic check after init Borislav Petkov
2016-01-30 13:20 ` [tip:x86/asm] " tip-bot for Brian Gerst
2016-01-26 21:12 ` [PATCH 07/10] x86/alternatives: Add an auxilary section Borislav Petkov
2016-01-30 13:19 ` [tip:x86/asm] " tip-bot for Borislav Petkov
2016-01-26 21:12 ` [PATCH 08/10] x86/alternatives: Discard dynamic check after init Borislav Petkov
2016-01-26 21:12 ` [PATCH 09/10] x86/vdso: Use static_cpu_has() Borislav Petkov
2016-01-30 13:20 ` [tip:x86/asm] " tip-bot for Borislav Petkov
2016-01-26 21:12 ` [PATCH 10/10] x86/head_64: Simplify kernel load address alignment check Borislav Petkov
2016-01-30 13:20 ` tip-bot for Alexander Kuleshov [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-01-23 6:50 [PATCH] x86/head_64.S: do not use temporary register to check alignment Alexander Kuleshov
2016-01-26 9:31 ` Borislav Petkov
2016-01-16 19:22 [PATCH] x86: static_cpu_has_safe: discard dynamic check after init Brian Gerst
2016-01-16 19:36 ` Borislav Petkov
2016-01-16 19:58 ` Brian Gerst
2016-01-17 10:33 ` Borislav Petkov
2016-01-18 16:52 ` Brian Gerst
2016-01-18 17:49 ` Andy Lutomirski
2016-01-18 18:14 ` Borislav Petkov
2016-01-18 18:29 ` Andy Lutomirski
2016-01-18 18:39 ` Borislav Petkov
2016-01-18 19:45 ` H. Peter Anvin
2016-01-18 23:05 ` Borislav Petkov
2016-01-18 23:13 ` H. Peter Anvin
2016-01-18 23:25 ` Borislav Petkov
2016-01-19 13:57 ` Borislav Petkov
2016-01-19 16:23 ` Borislav Petkov
2016-01-19 23:10 ` Borislav Petkov
2016-01-19 23:26 ` Andy Lutomirski
2016-01-19 23:49 ` Boris Petkov
2016-01-20 4:03 ` H. Peter Anvin
2016-01-20 10:33 ` Borislav Petkov
2016-01-20 10:41 ` H. Peter Anvin
2016-01-21 22:14 ` Borislav Petkov
2016-01-21 22:22 ` H. Peter Anvin
2016-01-21 22:56 ` Borislav Petkov
2016-01-21 23:36 ` H. Peter Anvin
2016-01-21 23:37 ` H. Peter Anvin
2016-01-22 10:32 ` Borislav Petkov
2016-01-18 18:51 ` Borislav Petkov
2016-01-19 1:10 ` Borislav Petkov
2016-01-19 1:33 ` H. Peter Anvin
2016-01-19 9:22 ` Borislav Petkov
2016-01-20 4:02 ` H. Peter Anvin
2016-01-20 4:39 ` Brian Gerst
2016-01-20 4:42 ` H. Peter Anvin
2016-01-20 10:50 ` Borislav Petkov
2016-01-20 10:55 ` H. Peter Anvin
2016-01-20 11:05 ` Borislav Petkov
2016-01-20 14:48 ` H. Peter Anvin
2016-01-20 15:01 ` Borislav Petkov
2016-01-20 15:09 ` H. Peter Anvin
2016-01-20 16:04 ` Borislav Petkov
2016-01-20 16:16 ` H. Peter Anvin
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=tip-a4733143085d6c782ac1e6c85778655b6bac1d4e@git.kernel.org \
--to=tipbot@zytor.com \
--cc=alpopov@ptsecurity.com \
--cc=bp@alien8.de \
--cc=bp@suse.de \
--cc=brgerst@gmail.com \
--cc=dvlasenk@redhat.com \
--cc=hpa@zytor.com \
--cc=kuleshovmail@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=ryabinin.a.a@gmail.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).