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: <1303752502.2103.169.camel@deneb.localdomain>
Date:	Mon, 25 Apr 2011 13:28:22 -0400
From:	Mark Salter <msalter@...hat.com>
To:	linux-kernel@...r.kernel.org
Subject: should __modver_version_attr be const

Shouldn't __modver_version_attr be const? It is placed in section
__modver and asm-generic/vmlinux.lds.h puts section __modver in with
RO_DATA_SECTION. Without the const, section __modver has RW attribute.

diff --git a/include/linux/module.h b/include/linux/module.h
index 5de4204..e62f808 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -174,7 +174,7 @@ extern struct module __this_module;
 #define MODULE_VERSION(_version)					\
 	extern ssize_t __modver_version_show(struct module_attribute *,	\
 					     struct module *, char *);	\
-	static struct module_version_attribute __modver_version_attr	\
+	static const struct module_version_attribute __modver_version_attr \
 	__used								\
     __attribute__ ((__section__ ("__modver"),aligned(sizeof(void *)))) \
 	= {								\


--Mark


--
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