+ uml-fix-uname-under-setarch-i386.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     uml: fix uname under setarch i386

has been added to the -mm tree.  Its filename is

     uml-fix-uname-under-setarch-i386.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: uml: fix uname under setarch i386
From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@xxxxxxxx>

On a 64bit Uml, if run under "setarch i386" (which a user did), uname()
currently returns the obtained i686 as machine - fix that.  Btw, I'm quite
surprised that under setarch i386 a 64-bit binary can run.

Cc: Andi Kleen <ak@xxxxxxx>
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@xxxxxxxx>
Cc: Jeff Dike <jdike@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/um/os-Linux/util.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletion(-)

diff -puN arch/um/os-Linux/util.c~uml-fix-uname-under-setarch-i386 arch/um/os-Linux/util.c
--- a/arch/um/os-Linux/util.c~uml-fix-uname-under-setarch-i386
+++ a/arch/um/os-Linux/util.c
@@ -80,11 +80,18 @@ void setup_machinename(char *machine_out
 	struct utsname host;
 
 	uname(&host);
-#if defined(UML_CONFIG_UML_X86) && !defined(UML_CONFIG_64BIT)
+#ifdef UML_CONFIG_UML_X86
+# ifndef UML_CONFIG_64BIT
 	if (!strcmp(host.machine, "x86_64")) {
 		strcpy(machine_out, "i686");
 		return;
 	}
+# else
+	if (!strcmp(host.machine, "i686")) {
+		strcpy(machine_out, "x86_64");
+		return;
+	}
+# endif
 #endif
 	strcpy(machine_out, host.machine);
 }
_

Patches currently in -mm which might be from blaisorblade@xxxxxxxx are

uml-fix-compilation-options-for-user_objs.patch
uml-revert-wrong-patch.patch
uml-correct-removal-of-pte_mkexec.patch
uml-readd-forgot-prototype.patch
uml-make-tt-mode-compile-after-setjmp-related-changes.patch
uml-make-uml_setjmp-always-safe.patch
uml-fix-processor-selection-to-exclude-unsupported-processors-and-features.patch
uml-fix-uname-under-setarch-i386.patch
uml-declare-in-kconfig-our-partial-lockdep-support.patch
uml-allow-using-again-x86-x86_64-crypto-code.patch
uml-asm-offsets-duplication-removal.patch
uml-remove-duplicate-export.patch
uml-deprecate-config_mode_tt.patch
uml-allow-finer-tuning-for-host-vmsplit-setting.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux