提交 8eb2ba25 编写于 作者: E Eric W. Biederman

signal/powerpc: Call _exception_pkey directly from bad_key_fault_exception

This removes the need for other code paths to deal with pkey exceptions.
Reviewed-by: NStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
上级 9f2ee693
......@@ -145,7 +145,17 @@ static noinline int bad_area(struct pt_regs *regs, unsigned long address)
static int bad_key_fault_exception(struct pt_regs *regs, unsigned long address,
int pkey)
{
return __bad_area_nosemaphore(regs, address, SEGV_PKUERR, pkey);
/*
* If we are in kernel mode, bail out with a SEGV, this will
* be caught by the assembly which will restore the non-volatile
* registers before calling bad_page_fault()
*/
if (!user_mode(regs))
return SIGSEGV;
_exception_pkey(SIGSEGV, regs, SEGV_PKUERR, address, pkey);
return 0;
}
static noinline int bad_access(struct pt_regs *regs, unsigned long address)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册