Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1015107imu; Fri, 11 Jan 2019 13:19:03 -0800 (PST) X-Google-Smtp-Source: ALg8bN4BuTTP6OQTt1+UI2z7gDRFQT9U67qfKteujQbmBStVePn/qyksiE2uK3YQjzk22ZrEtm3j X-Received: by 2002:a17:902:bb98:: with SMTP id m24mr15752086pls.71.1547241543760; Fri, 11 Jan 2019 13:19:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547241543; cv=none; d=google.com; s=arc-20160816; b=qQLkKn78AH0ni2m1vj0o5uGkCj1GepsEB6xj6vT5kucdEgyxRBKGiYLUDGJL4i3s06 bAhBKwefjugaioDX0Lf2IpCEGc3iwSVyJWl5N+jCKav5fJOeizCFyThwQujWXjqwSlpN R+h6h1KRKOnSTPu24G9eXk+AtTrK4HWv56hy1dSavM4vHl8dEYDw3X2if1rejCmmxBj2 FMnoNgPJdEApl2bQxtdtp4e7JjLvo5TofPJ+Jrfc2cJcXz+d/Y+ySpKLz3n0JTMZ3EJM Vlx7USfKwgHt+ZQO61mqEWzEOQLT88JF2LS8cBrJsU6ioRBJcFgElZM2yUxNyjmxOlhc faIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=HtTyKuyyHjubgyVS72rPvdcBbOVujNnJOLm0/ACH8oU=; b=Wv+L5xByljPYWhIWUQXY9rAFxAoxuwg0enJgFCb0AhbclCiYo57V+JjyuQgnoewesg w1xNVovbqi7PeM6ptL/V3ad9j5Rvq51re1menIWptwk5PX7LU513M/Zfk06h52aeOPMS wdwFWwKsawTyh9erGWX2zz+Djd8nbU8mK+Qja/KUKFSm30PWGykxvmnXsOIKr03/S/Ij zLQcRUFjFgG4VGggAso6nLzY21QSUgWM+H3LitBL8On2t4N8TCxy1PliUTWnXzdK/ao2 auFKghmQojGkYIrYkJB+veZHjbQrmTgrKaiwAemqcU61LVW5ahrE1MkBilJ6PGelUTU1 xoQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bh5si9208398plb.42.2019.01.11.13.18.48; Fri, 11 Jan 2019 13:19:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726399AbfAKUkE (ORCPT + 99 others); Fri, 11 Jan 2019 15:40:04 -0500 Received: from terminus.zytor.com ([198.137.202.136]:37913 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725799AbfAKUkC (ORCPT ); Fri, 11 Jan 2019 15:40:02 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x0BKds2Z805158 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 11 Jan 2019 12:39:54 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x0BKdsBv805155; Fri, 11 Jan 2019 12:39:54 -0800 Date: Fri, 11 Jan 2019 12:39:54 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Daniel Drake Message-ID: Cc: drake@endlessm.com, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de Reply-To: linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com, drake@endlessm.com In-Reply-To: <20190107034024.15005-1-drake@endlessm.com> References: <20190107034024.15005-1-drake@endlessm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/kaslr: Fix incorrect i8254 outb() parameters Git-Commit-ID: 7e6fc2f50a3197d0e82d1c0e86282976c9e6c8a4 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 7e6fc2f50a3197d0e82d1c0e86282976c9e6c8a4 Gitweb: https://git.kernel.org/tip/7e6fc2f50a3197d0e82d1c0e86282976c9e6c8a4 Author: Daniel Drake AuthorDate: Mon, 7 Jan 2019 11:40:24 +0800 Committer: Thomas Gleixner 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 Signed-off-by: Thomas Gleixner 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;