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>] [day] [month] [year] [list]
Message-Id: <20070629102108.c4b823bf.randy.dunlap@oracle.com>
Date:	Fri, 29 Jun 2007 10:21:08 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	lkml <linux-kernel@...r.kernel.org>
Cc:	akpm <akpm@...ux-foundation.org>
Subject: [PATCH -mm] scripts/decodecode: add AFLAGS

From: Randy Dunlap <randy.dunlap@...cle.com>

Add AFLAGS=options environment variable for the 'as' command.
This enables us to generate code for something other than the host
system architecture.  E.g., on an x86_64 system:

AFLAGS=--32 scripts/decodecode < i386.oops
generates code for i386 (and then objdump uses the object file's
arch. to disassemble it).

Signed-off-by: Randy Dunlap <randy.dunlap@...cle.com>
---
 scripts/decodecode |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

--- linux-2622-rc6mm1.orig/scripts/decodecode
+++ linux-2622-rc6mm1/scripts/decodecode
@@ -1,6 +1,10 @@
 #!/bin/sh
 # Disassemble the Code: line in Linux oopses
 # usage: decodecode < oops.file
+#
+# options: set env. variable AFLAGS=options to pass options to "as";
+# e.g., to decode an i386 oops on an x86_64 system, use:
+# AFLAGS=--32 decodecode < 386.oops
 
 T=`mktemp`
 code=
@@ -31,7 +35,7 @@ if [ $marker -ne 0 ]; then
 	beforemark=`echo "$code" | cut -c-$((${marker} - 1))`
 	echo -n "	.byte 0x" > $T.s
 	echo $beforemark | sed -e 's/ /,0x/g' >> $T.s
-	as -o $T.o $T.s
+	as $AFLAGS -o $T.o $T.s
 	objdump -S $T.o
 	rm $T.o $T.s
 
@@ -42,6 +46,6 @@ fi
 code=`echo $code | sed -e 's/ [<(]/ /;s/[>)] / /;s/ /,0x/g'`
 echo -n "	.byte 0x" > $T.s
 echo $code >> $T.s
-as -o $T.o $T.s
+as $AFLAGS -o $T.o $T.s
 objdump -S $T.o
 rm $T.o $T.s
-
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