Thread (22 messages) flat view 22 messages, 4 authors, 2017-03-22

Re: [PATCH v3 2/4] x86/syscalls: Specific usage of verify_pre_usermode_state

From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2017-03-14 17:53:36

On 03/14/17 09:51, Thomas Garnier wrote:
quoted
I wanted to comment on that thing: why on earth isn't
verify_pre_usermode_state() an inline?  Making it an out-of-line
function adds pointless extra overhead to the C code when we are talking
about a few instructions.
Because outside of arch specific implementation it is called by each
syscall handler. it will increase the code size a lot.
Don't assume that.  On a lot of architectures a function call can be
more expensive than a simple compare and branch, because the compiler
has to assume a whole bunch of registers are lost at that point.

Either way, don't penalize the common architectures for it.  Not okay.

	-hpa
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help