* [PATCH] kaslr: fix incorrect i8254 outb parameters
@ 2019-01-07 3:40 Daniel Drake
2019-01-11 20:39 ` [tip:x86/urgent] x86/kaslr: Fix incorrect i8254 outb() parameters tip-bot for Daniel Drake
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Drake @ 2019-01-07 3:40 UTC (permalink / raw)
To: tglx, mingo, bp, hpa, x86; +Cc: linux-kernel, linux
The outb call takes parameters value and port, in that order.
Fix the parameters used in the kalsr i8254 fallback code.
Signed-off-by: Daniel Drake <drake@endlessm.com>
---
arch/x86/lib/kaslr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/lib/kaslr.c b/arch/x86/lib/kaslr.c
index 79778ab200e4..a53665116458 100644
--- a/arch/x86/lib/kaslr.c
+++ b/arch/x86/lib/kaslr.c
@@ -36,8 +36,8 @@ static inline u16 i8254(void)
u16 status, timer;
do {
- outb(I8254_PORT_CONTROL,
- I8254_CMD_READBACK | I8254_SELECT_COUNTER0);
+ outb(I8254_CMD_READBACK | I8254_SELECT_COUNTER0,
+ I8254_PORT_CONTROL);
status = inb(I8254_PORT_COUNTER0);
timer = inb(I8254_PORT_COUNTER0);
timer |= inb(I8254_PORT_COUNTER0) << 8;
--
2.19.1
^ permalink raw reply [flat|nested] 2+ messages in thread* [tip:x86/urgent] x86/kaslr: Fix incorrect i8254 outb() parameters
2019-01-07 3:40 [PATCH] kaslr: fix incorrect i8254 outb parameters Daniel Drake
@ 2019-01-11 20:39 ` tip-bot for Daniel Drake
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Daniel Drake @ 2019-01-11 20:39 UTC (permalink / raw)
To: linux-tip-commits; +Cc: drake, hpa, mingo, linux-kernel, tglx
Commit-ID: 7e6fc2f50a3197d0e82d1c0e86282976c9e6c8a4
Gitweb: https://git.kernel.org/tip/7e6fc2f50a3197d0e82d1c0e86282976c9e6c8a4
Author: Daniel Drake <drake@endlessm.com>
AuthorDate: Mon, 7 Jan 2019 11:40:24 +0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 11 Jan 2019 21:35:47 +0100
x86/kaslr: Fix incorrect i8254 outb() parameters
The outb() function takes parameters value and port, in that order. Fix
the parameters used in the kalsr i8254 fallback code.
Fixes: 5bfce5ef55cb ("x86, kaslr: Provide randomness functions")
Signed-off-by: Daniel Drake <drake@endlessm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: bp@alien8.de
Cc: hpa@zytor.com
Cc: linux@endlessm.com
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20190107034024.15005-1-drake@endlessm.com
---
arch/x86/lib/kaslr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/lib/kaslr.c b/arch/x86/lib/kaslr.c
index 79778ab200e4..a53665116458 100644
--- a/arch/x86/lib/kaslr.c
+++ b/arch/x86/lib/kaslr.c
@@ -36,8 +36,8 @@ static inline u16 i8254(void)
u16 status, timer;
do {
- outb(I8254_PORT_CONTROL,
- I8254_CMD_READBACK | I8254_SELECT_COUNTER0);
+ outb(I8254_CMD_READBACK | I8254_SELECT_COUNTER0,
+ I8254_PORT_CONTROL);
status = inb(I8254_PORT_COUNTER0);
timer = inb(I8254_PORT_COUNTER0);
timer |= inb(I8254_PORT_COUNTER0) << 8;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-11 20:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-07 3:40 [PATCH] kaslr: fix incorrect i8254 outb parameters Daniel Drake
2019-01-11 20:39 ` [tip:x86/urgent] x86/kaslr: Fix incorrect i8254 outb() parameters tip-bot for Daniel Drake
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®