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:	Thu, 6 Aug 2009 07:11:29 -0700
From:	Arjan van de Ven <arjan@...radead.org>
To:	Ozan Çağlayan <ozan@...dus.org.tr>
Cc:	linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH] markup_oops: Use modinfo to avoid confusion with
 underscored module names

On Thu,  6 Aug 2009 15:21:55 +0300
Ozan Çağlayan <ozan@...dus.org.tr> wrote:

> When EIP is at a module having an underscore in its name, the current
> code fails to find it because the module filenames has '-' instead of
> '_'.
> 
> Use modinfo to correctly get the full path to the module.
> 
> Signed-off-by: Ozan Çağlayan <ozan@...dus.org.tr>

I like it, it's simple.
I don't mind about the module-init-tools dependency, everyone will have
that already.

Acked-by: Arjan van de Ven <arjan@...ux.intel.com>

Andrew: can you hover this one up and send to Linus when its time is
due?

> ---
> This is just a trivial patch to pinpoint the problem. Usage of
> modinfo is faster than searching through the filesystem but may not
> be desirable as it brings a dependency to module-init-tools.
> Replacing underscore occurences by '-' can be another solution.
> 
>  scripts/markup_oops.pl |    5 +----
>  1 files changed, 1 insertions(+), 4 deletions(-)
> 
> diff --git a/scripts/markup_oops.pl b/scripts/markup_oops.pl
> index 8977401..bc14f4c 100644
> --- a/scripts/markup_oops.pl
> +++ b/scripts/markup_oops.pl
> @@ -184,10 +184,7 @@ if ($target eq "0") {
>  
>  # if it's a module, we need to find the .ko file and calculate a
> load offset if ($module ne "") {
> -	my $dir = dirname($filename);
> -	$dir = $dir . "/";
> -	my $mod = $module . ".ko";
> -	my $modulefile = `find $dir -name $mod | head -1`;
> +	my $modulefile = `modinfo $module | grep 'filename' | gawk
> '{ print \$2 }'`; chomp($modulefile);
>  	$filename = $modulefile;
>  	if ($filename eq "") {


-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
--
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