Re: [PATCH v2 2/2] x86, stackvalidate: Add asm frame pointer setup macros

2015-05-04 Thread Josh Poimboeuf
On Mon, May 04, 2015 at 01:33:53PM -0700, H. Peter Anvin wrote: > On 05/04/2015 01:23 PM, Josh Poimboeuf wrote: > > + __ASM_SIZE(push, _cfi) %_ASM_BP > > + __ASM_SIZE(pop, _cfi) %_ASM_BP > > This seems ridiculous. push/pop only come in one size per > architecture(*). Can we make it so that j

Re: [PATCH v2 2/2] x86, stackvalidate: Add asm frame pointer setup macros

2015-05-04 Thread H. Peter Anvin
On 05/04/2015 01:23 PM, Josh Poimboeuf wrote: > + __ASM_SIZE(push, _cfi) %_ASM_BP > + __ASM_SIZE(pop, _cfi) %_ASM_BP This seems ridiculous. push/pop only come in one size per architecture(*). Can we make it so that just push_cfi and pop_cfi do the right things? -hpa (*) Intenti

[PATCH v2 2/2] x86, stackvalidate: Add asm frame pointer setup macros

2015-05-04 Thread Josh Poimboeuf
Add some helper macros for asm functions so that they can comply with stackvalidate. The FUNC_ENTER and FUNC_RETURN macros help asm functions save, set up, and restore frame pointers. The RET_NOVALIDATE and FILE_NOVALIDATE macros can be used to whitelist the few locations which need a return inst