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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri,  5 Sep 2014 16:16:45 -0700
From:	behanw@...verseincode.com
To:	hpa@...or.com, mingo@...hat.com, tglx@...utronix.de, x86@...nel.org
Cc:	linux-kernel@...r.kernel.org, torvalds@...ux-foundation.org,
	Jan-Simon Möller <dl9pf@....de>,
	Behan Webster <behanw@...verseincode.com>
Subject: [PATCH] mm: Apply the section attribute to the variable, not its type

From: Jan-Simon Möller <dl9pf@....de>

This fixes a compilation error in clang in that a linker section attribute
can't be added to a type.

arch/x86/mm/mmap.c:34:8: error: '__section__' attribute only applies to functions and global variables
struct __read_mostly va_alignment va_align = {
       ^
arch/x86/include/asm/cache.h:10:38: note: expanded from macro '__read_mostly'
#define __read_mostly __attribute__((__section__(".data..read_mostly")))
                                     ^
1 error generated.

By moving the section attribute to the variable declaration, the desired effect
is acheived.

Signed-off-by: Jan-Simon Möller <dl9pf@....de>
Signed-off-by: Behan Webster <behanw@...verseincode.com>
---
 arch/x86/mm/mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
index 25e7e13..919b912 100644
--- a/arch/x86/mm/mmap.c
+++ b/arch/x86/mm/mmap.c
@@ -31,7 +31,7 @@
 #include <linux/sched.h>
 #include <asm/elf.h>
 
-struct __read_mostly va_alignment va_align = {
+struct va_alignment __read_mostly va_align = {
 	.flags = -1,
 };
 
-- 
1.9.1

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