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-next>] [day] [month] [year] [list]
Date:	Tue, 7 Oct 2008 11:26:15 -0700
From:	"Ashutosh Naik" <ashutosh@...lsio.com>
To:	<linux-kernel@...r.kernel.org>, <stable@...nel.org>,
	<akpm@...l.org>, <rusty@...tcorp.com.au>,
	"Karen Xie" <kxie@...lsio.com>
Subject: [PATCH] Prevent modpost from looking for a .cmd file for a static library linked into a module


This patch prevents modpost to look for a .cmd file when a module is
linked with a static library

Signed-off-by: Ashutosh Naik <ashutosh.naik@...il.com>

diff -ruN linux-2.6.26.5/scripts/mod/sumversion.c
linux-2.6.26.5-mod/scripts/mod/sumversion.c
--- linux-2.6.26.5/scripts/mod/sumversion.c	2008-09-08
10:40:20.000000000 -0700
+++ linux-2.6.26.5-mod/scripts/mod/sumversion.c	2008-10-07
09:32:24.000000000 -0700
@@ -290,6 +290,15 @@
 	release_file(file, len);
 	return 1;
 }
+/* Check whether the file is a static library or not */
+static int is_static_library(const char *objfile)
+{
+	int len = strlen(objfile);
+	if((objfile[len -2]=='.') && (objfile[len - 1]=='a'))
+		return 1;
+	else
+		return 0;	
+}
 
 /* We have dir/file.o.  Open dir/.file.o.cmd, look for deps_ line to
  * figure out source file. */
@@ -420,7 +429,7 @@
 	while ((fname = strsep(&sources, " ")) != NULL) {
 		if (!*fname)
 			continue;
-		if (!parse_source_files(fname, &md))
+		if (!(is_static_library(fname)) &&
!parse_source_files(fname, &md))
 			goto release;
 	}
--
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