lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-ee1b06ea6aed979da3b4e6b6ffea98ad55a3c5c1@git.kernel.org>
Date:	Sat, 19 Feb 2011 01:25:13 GMT
From:	"tip-bot for H. Peter Anvin" <hpa@...ux.intel.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	brgerst@...il.com, castet.matthieu@...e.fr, tglx@...utronix.de,
	sfr@...b.auug.org.au, hpa@...ux.intel.com, rjw@...k.pl
Subject: [tip:x86/trampoline] x86, reboot: Fix the use of passed arguments in 32-bit BIOS reboot

Commit-ID:  ee1b06ea6aed979da3b4e6b6ffea98ad55a3c5c1
Gitweb:     http://git.kernel.org/tip/ee1b06ea6aed979da3b4e6b6ffea98ad55a3c5c1
Author:     H. Peter Anvin <hpa@...ux.intel.com>
AuthorDate: Fri, 18 Feb 2011 15:47:42 -0800
Committer:  H. Peter Anvin <hpa@...ux.intel.com>
CommitDate: Fri, 18 Feb 2011 15:47:42 -0800

x86, reboot: Fix the use of passed arguments in 32-bit BIOS reboot

The initial version of this patch had %eax being a segment and %ecx
being the mode.  I had changed the interfaces, but not the actual
implementation!

Reported-by: Brian Gerst <brgerst@...il.com>
LKML-Reference: <AANLkTikxqk=HEw9R-Du=v-1ti1HDGAY9vaNUep2XARaz@...l.gmail.com>
Cc: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Rafael J. Wysocki <rjw@...k.pl>
Cc: Matthieu Castet <castet.matthieu@...e.fr>
---
 arch/x86/kernel/reboot_32.S |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/reboot_32.S b/arch/x86/kernel/reboot_32.S
index f242356..29092b3 100644
--- a/arch/x86/kernel/reboot_32.S
+++ b/arch/x86/kernel/reboot_32.S
@@ -23,10 +23,14 @@ r_base = .
 1:	popl	%ebx
 	subl	$1b, %ebx
 
+	/* Compute the equivalent real-mode segment */
+	movl	%ebx, %ecx
+	shrl	$4, %ecx
+	
 	/* Patch post-real-mode segment jump */
-	movw	dispatch_table(%ebx,%ecx,2),%cx
-	movw	%cx, 101f(%ebx)
-	movw	%ax, 102f(%ebx)
+	movw	dispatch_table(%ebx,%eax,2),%ax
+	movw	%ax, 101f(%ebx)
+	movw	%cx, 102f(%ebx)
 
 	/* Set up the IDT for real mode. */
 	lidtl	machine_real_restart_idt(%ebx)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ