mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Daniel Drake <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: drake@endlessm.com, hpa@zytor.com, mingo@kernel.org,
	linux-kernel@vger.kernel.org, tglx@linutronix.de
Subject: [tip:x86/urgent] x86/kaslr: Fix incorrect i8254 outb() parameters
Date: Fri, 11 Jan 2019 12:39:54 -0800	[thread overview]
Message-ID: <tip-7e6fc2f50a3197d0e82d1c0e86282976c9e6c8a4@git.kernel.org> (raw)
In-Reply-To: <20190107034024.15005-1-drake@endlessm.com>

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;

      reply	other threads:[~2019-01-11 20:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07  3:40 [PATCH] kaslr: fix incorrect i8254 outb parameters Daniel Drake
2019-01-11 20:39 ` tip-bot for Daniel Drake [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-7e6fc2f50a3197d0e82d1c0e86282976c9e6c8a4@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=drake@endlessm.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®