summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorDaniel Drake <drake@endlessm.com>2019-01-07 11:40:24 +0800
committerBen Hutchings <ben@decadent.org.uk>2019-05-02 21:41:20 +0100
commitdefd94d177cef4cac1e31b0d97107ecbec0fab1b (patch)
tree5ed5e7b56354e26572676df084d3ec59e116da9f /arch/x86
parent6beb5579501fdda398c6b08f9af5771e72afc967 (diff)
x86/kaslr: Fix incorrect i8254 outb() parameters
commit 7e6fc2f50a3197d0e82d1c0e86282976c9e6c8a4 upstream. 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 Link: https://lkml.kernel.org/r/20190107034024.15005-1-drake@endlessm.com [bwh: Backported to 3.16: adjust filename] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/boot/compressed/aslr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/boot/compressed/aslr.c b/arch/x86/boot/compressed/aslr.c
index d39189ba7f8e..8ebb149a482e 100644
--- a/arch/x86/boot/compressed/aslr.c
+++ b/arch/x86/boot/compressed/aslr.c
@@ -25,8 +25,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;