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] [day] [month] [year] [list]
Message-ID: <20080128185236.GA2391@uranus.ravnborg.org>
Date:	Mon, 28 Jan 2008 19:52:36 +0100
From:	Sam Ravnborg <sam@...nborg.org>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Ingo Molnar <mingo@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] x86: fix usage of .section .sched.text in assembler code

On Mon, Jan 28, 2008 at 11:13:34AM +0100, Ingo Molnar wrote:
> 
> > It would be better to have a definition we could use from assembler 
> > code but I did not find a suitable header file for it.
> 
> hm, include/asm-x86/linkage.h?
No - it is for general use so it should live in include/linux/*
Suggestion:

diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index ff203dd..4ac87bf 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -48,6 +48,15 @@
   END(name);		 \
   .popsection
 
+#define SCHED_ENTRY(name)				\
+	.pushsection .sched.text, "ax", %progbits;	\
+	ENTRY(name)
+
+#define SCHED_END(name)	\
+	END(name);	\
+	.popsection
+
+
 #ifndef END
 #define END(name) \
   .size name, .-name

Note - the use of '%' is due to '@' is a comment identifier on arm
and '%' seems to works across all arch's assemblers.

> 
> btw., i guess this in include/linux/linkage.h:
> 
> #ifndef __ALIGN
> #define __ALIGN         .align 4,0x90
> #define __ALIGN_STR     ".align 4,0x90"
> #endif
> 
> is an x86-ism (0x90 is the x86 NOP instruction) that should move into 
> include/asm-x86/linkge.h and the default filler should be 0x00 instead?
To specialized for my knowledge..

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