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 -- To unsubscribe from this list: send the line "unsubscribe linux-api" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html