From: tip-bot for Dan Williams <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: hpa@zytor.com, peterz@infradead.org,
torvalds@linux-foundation.org, dan.j.williams@intel.com,
tglx@linutronix.de, mingo@kernel.org, luto@kernel.org,
linux-kernel@vger.kernel.org
Subject: [tip:x86/pti] x86/speculation: Fix up array_index_nospec_mask() asm constraint
Date: Wed, 14 Feb 2018 16:27:34 -0800 [thread overview]
Message-ID: <tip-be3233fbfcb8f5acb6e3bcd0895c3ef9e100d470@git.kernel.org> (raw)
In-Reply-To: <151797010204.1289.1510000292250184993.stgit@dwillia2-desk3.amr.corp.intel.com>
Commit-ID: be3233fbfcb8f5acb6e3bcd0895c3ef9e100d470
Gitweb: https://git.kernel.org/tip/be3233fbfcb8f5acb6e3bcd0895c3ef9e100d470
Author: Dan Williams <dan.j.williams@intel.com>
AuthorDate: Tue, 6 Feb 2018 18:22:40 -0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 15 Feb 2018 01:15:50 +0100
x86/speculation: Fix up array_index_nospec_mask() asm constraint
Allow the compiler to handle @size as an immediate value or memory
directly rather than allocating a register.
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/151797010204.1289.1510000292250184993.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/include/asm/barrier.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/barrier.h b/arch/x86/include/asm/barrier.h
index 30d4061..e1259f0 100644
--- a/arch/x86/include/asm/barrier.h
+++ b/arch/x86/include/asm/barrier.h
@@ -40,7 +40,7 @@ static inline unsigned long array_index_mask_nospec(unsigned long index,
asm ("cmp %1,%2; sbb %0,%0;"
:"=r" (mask)
- :"r"(size),"r" (index)
+ :"g"(size),"r" (index)
:"cc");
return mask;
}
prev parent reply other threads:[~2018-02-15 0:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-07 2:22 [PATCH v2] x86/nospec: Fixup array_index_nospec_mask() asm constraint Dan Williams
2018-02-13 13:06 ` [tip:x86/pti] x86/speculation: Fix up " tip-bot for Dan Williams
2018-02-15 0:27 ` tip-bot for Dan Williams [this message]
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-be3233fbfcb8f5acb6e3bcd0895c3ef9e100d470@git.kernel.org \
--to=tipbot@zytor.com \
--cc=dan.j.williams@intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--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