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]
Date:	Tue, 26 Jan 2010 11:05:54 +0800
From:	Américo Wang <xiyou.wangcong@...il.com>
To:	Hui Zhu <hui.zhu@...driver.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Arjan van de Ven <arjan@...ux.intel.com>,
	Sam Ravnborg <sam@...nborg.org>, ozan@...dus.org.tr,
	Matthew Wilcox <willy@...ux.intel.com>,
	linux-kernel@...r.kernel.org, teawater@...il.com
Subject: Re: [PATCH] markup_oops.pl: add options to improve cross-sompilation 
	environments

On Tue, Jan 26, 2010 at 11:11 AM, Hui Zhu <hui.zhu@...driver.com> wrote:
> Sorry guys, the prev mail still have some format trouble.  I send a new mail
> for it.
>
> The markup_oops.pl have 3 troubles to support cross-compiler environment:
> 1.  It use objdump directly.
> 2.  It use modinfo to get the message of module.
> 3.  It use hex function that cannot support 64-bit number in 32-bit arch.
>
> This patch add 3 options to markup_oops.pl:
> 1. -c CROSS_COMPILE     Specify the prefix used for toolchain.
> 2. -m MODULE_DIRNAME    Specify the module directory name.
> 3. Change hex function to Math::BigInt->from_hex.
>
> After this patch, parse the x8664 oops in x86, we can:
> cat amd64m | perl ~/kernel/tmp/m.pl -c /home/teawater/kernel/bin/x8664- -m
> ./e.ko vmlinux
>
> Thanks,
> Hui
>
> Signed-off-by: Hui Zhu <teawater@...il.com>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Arjan van de Ven <arjan@...ux.intel.com>
> Cc: Sam Ravnborg <sam@...nborg.org>
> Cc: ozan@...dus.org.tr
> Cc: Matthew Wilcox <willy@...ux.intel.com>
>
> ---
> scripts/markup_oops.pl |   71
> ++++++++++++++++++++++++++++++++++++++++++-------
> 1 file changed, 61 insertions(+), 10 deletions(-)
>
> --- a/scripts/markup_oops.pl
> +++ b/scripts/markup_oops.pl
> @@ -15,8 +15,46 @@ use Math::BigInt;
> #       Arjan van de Ven <arjan@...ux.intel.com>
>
>
> -my $vmlinux_name = $ARGV[0];
> -if (!defined($vmlinux_name)) {
> +my $cross_compile = "";
> +my $vmlinux_name = "";
> +my $modulefile = "";
> +
> +# Get options
> +my $option = 0;
> +for (my $i = 0; $i <= $#ARGV; $i++) {
> +       if ($option == 0) {
> +               if ($ARGV[$i] eq "-c") {
> +                       $option = 1;
> +               }
> +               elsif ($ARGV[$i] eq "-m") {
> +                       $option = 2;
> +               }
> +               elsif ($ARGV[$i] eq "-h") {
> +                       usage();
> +                       exit;
> +               }
> +               elsif ($i == $#ARGV) {
> +                       $vmlinux_name = $ARGV[$i];
> +               }
> +               else {
> +                       usage();
> +                       exit;
> +               }
> +       }
> +       elsif ($option == 1) {
> +               $cross_compile = $ARGV[$i];
> +               $option = 0;
> +       }
> +       elsif ($option == 2) {
> +               $modulefile = $ARGV[$i];
> +               $option = 0;
> +       }
> +}
> +
> +if ($vmlinux_name ne "") {
> +       $vmlinux_name = $ARGV[$#ARGV];
> +}

Why not using the Perl module 'Getopt' to do this?
--
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