]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commit
x86, smap: Reduce the SMAP overhead for signal handling
authorH. Peter Anvin <hpa@linux.intel.com>
Fri, 21 Sep 2012 19:43:15 +0000 (12:43 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Fri, 21 Sep 2012 19:45:27 +0000 (12:45 -0700)
commit5e88353d8b5f483bc1c873ad24ac2b59a6b66c73
treef5651873e535e4feabea0da5d253d0326b4bd029
parent40d3cd6695014bf3c44e2ca66b610b18acaf923d
x86, smap: Reduce the SMAP overhead for signal handling

Signal handling contains a bunch of accesses to individual user space
items, which causes an excessive number of STAC and CLAC
instructions.  Instead, let get/put_user_try ... get/put_user_catch()
contain the STAC and CLAC instructions.

This means that get/put_user_try no longer nests, and furthermore that
it is no longer legal to use user space access functions other than
__get/put_user_ex() inside those blocks.  However, these macros are
x86-specific anyway and are only used in the signal-handling paths; a
simple reordering of moving the larger subroutine calls out of the
try...catch blocks resolves that problem.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/1348256595-29119-12-git-send-email-hpa@linux.intel.com
arch/x86/ia32/ia32_signal.c
arch/x86/include/asm/uaccess.h
arch/x86/kernel/signal.c