Thread (11 messages) 11 messages, 4 authors, 2017-03-23

Re: [PATCH v4 1/4] syscalls: Restore address limit after a syscall

flat view

From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2017-03-22 21:17:10
Also in: linux-arm-kernel, linux-s390, lkml

On 03/22/17 13:44, Andy Lutomirski wrote:
While it's possible that silently papering over the bug is slightly
faster than BUGging, it will allow bugs to continue to exist
undetected.
It would also allow the test to be inlined (at least on architectures
which have a one-site implementation) and have only the failure case out
of line, with a __noreturn annotation (which allows it to be jumped to
rather than called, which is usually available as a conditional
operation whereas call often isn't.)

That is...

extern void __noreturn __pre_usermode_state_invalid(void);

static void verify_pre_usermode_state(void)
{
	if (unlikely(!segment_eq(get_fs(), USER_DS))
		__pre_usermode_state_invalid();
}

	-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