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:	Thu, 31 Mar 2016 08:01:02 -0700
From:	Daniel Walker <danielwa@...co.com>
To:	Andy Whitcroft <apw@...onical.com>,
	open list <linux-kernel@...r.kernel.org>,
	Joe Perches <joe@...ches.com>,
	Daniel Walker <dwalker@...o99.com>,
	"xe-kernel@...ernal.cisco.com" <xe-kernel@...ernal.cisco.com>
Subject: checkpatch false positon on EXPORT_SYMBOL


The below looks like normal code but the last export symbol gets the 
warning,


WARNING:EXPORT_SYMBOL: EXPORT_SYMBOL(foo); should immediately follw its 
function/variable
#16: FILE: kernel/acct.c:70:
+EXPORT_SYMBOL(test_export);    /* Error ! */

It seems to have to do with the comments at the end of the line. The 
first two examples don't have warnings because I removed the comments on 
different lines. comments on the variable and export symbol lines gets 
the error tho.

(warning may not be a proper patch)

diff --git a/kernel/acct.c b/kernel/acct.c
index 8d6e145..a0cc002 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -60,6 +60,15 @@
  #include <linux/blkdev.h> /* sector_div */
  #include <linux/pid_namespace.h>

+int test_export;
+EXPORT_SYMBOL(test_export);    /* No Error ! */
+
+int test_export;    /* No Error below */
+EXPORT_SYMBOL(test_export);
+
+int test_export;    /* Error below */
+EXPORT_SYMBOL(test_export);    /* Error ! */
+
  /*
   * These constants control the amount of freespace that suspend and
   * resume the process accounting system, and the time delay between

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ