kaslr: fix incorrect i8254 outb parameters
PATCH 1/1 kaslr: fix incorrect i8254 outb parameters
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 <[email protected]>
--- arch/x86/lib/kaslr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/lib/kaslr.c +2 -2
@@ -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;
Signature · 1 line
2.19.1
tip-bot for Daniel Drake
merge bot[tip:x86/urgent] x86/kaslr: Fix incorrect i8254 outb() parameters
x86/kaslr: Fix incorrect i8254 outb() parameters
Commit-ID: 7e6fc2f50a3197d0e82d1c0e86282976c9e6c8a4 Gitweb: https://git.kernel.org/tip/7e6fc2f50a3197d0e82d1c0e86282976c9e6c8a4 Author: Daniel Drake <[email protected]> AuthorDate: Mon, 7 Jan 2019 11:40:24 +0800 Committer: Thomas Gleixner <[email protected]> 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 <[email protected]>
Signed-off-by Thomas Gleixner <[email protected]>
--- arch/x86/lib/kaslr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/lib/kaslr.c +2 -2
@@ -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;