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] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 14 Feb 2009 11:21:42 +0300
From:	Cyrill Gorcunov <gorcunov@...il.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Alexander van Heukelum <heukelum@...tmail.fm>,
	Ingo Molnar <mingo@...e.hu>, Jan Beulich <jbeulich@...ell.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC 0/6] x86 tip asm ENTRY,ENDPROC cleanup

[H. Peter Anvin - Fri, Feb 13, 2009 at 04:34:00PM -0800]
> Alexander van Heukelum wrote:
>>
>> Hi Cyrill,
>>
>> I like this direction. If I understand correctly:
>>
>> ENTRY/END or GLOBAL/END for data.
>> ENTRY/ENDPROC or GLOBAL/ENDPROC for functions.
>>
>
> Fine for functions, but it's really not okay to use the same macros for  
> data.  Furthermore, we need to consider special entry points that don't  
> behave like normal functions -- like system call or interrupt entry.
>
> Why?  Because if we're compiling with frame pointers, we would like the  
> wrapper macros for functions to handle setting up and tearing down the  
> frame pointer, at least in the common case.
>
> 	-hpa
>

Peter, Alexander -- thanks for review!

>> ENTRY/END or GLOBAL/END for data.
>> ENTRY/ENDPROC or GLOBAL/ENDPROC for functions.

Well, there are nuances I believe. Plain .size without .cfi_...
for functions would not help in frame unwinding I think (in *.S
under debugger).

I wish we have strict rules for functions and data but it's not
that simple :)

For example, trampoline_64.S:
...
	.org 0x1000
trampoline_stack_end:
ENTRY(trampoline_level4_pgt)
...

we could use plain .globl (or new GLOBAL) here since we
have .org and ALIGN in ENTRY just not needed.

Same file:
...
ENTRY(trampoline_end)
...

I think we could have plain .globl here as well
(and we do that for 32bit version). Moreover TRAMPOLINE_SIZE
is page rounded anyway.

But in general I think you're right -- which means:
start with END for data and ENDPROC for functions and
then checkout the details as Peter mentioned. At least
I do ratiocinate like this. But I could be wrong :)

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