Date: Sun, 31 Dec 2017 02:48:16 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327403 - stable/11/sys/amd64/amd64 Message-ID: <201712310248.vBV2mGoC077608@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Sun Dec 31 02:48:16 2017 New Revision: 327403 URL: https://svnweb.freebsd.org/changeset/base/327403 Log: MFC r321922: amd64: annotate the syscall return address check with __predict_false before: 0xffffffff80b03ebb <+2059>: mov 0x460(%r14),%rax 0xffffffff80b03ec2 <+2066>: mov 0x98(%rax),%rax 0xffffffff80b03ec9 <+2073>: shr $0x2f,%rax 0xffffffff80b03ecd <+2077>: je 0xffffffff80b03edd <amd64_syscall+2093> 0xffffffff80b03ecf <+2079>: mov 0x3f8(%r14),%rax 0xffffffff80b03ed6 <+2086>: orl $0x1,0xc8(%rax) 0xffffffff80b03edd <+2093>: add $0xf8,%rsp after: 0xffffffff80b03ebb <+2059>: mov 0x460(%r14),%rax 0xffffffff80b03ec2 <+2066>: mov 0x98(%rax),%rax 0xffffffff80b03ec9 <+2073>: shr $0x2f,%rax 0xffffffff80b03ecd <+2077>: jne 0xffffffff80b03eef <amd64_syscall+2111> 0xffffffff80b03ecf <+2079>: add $0xf8,%rsp Modified: stable/11/sys/amd64/amd64/trap.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/amd64/amd64/trap.c ============================================================================== --- stable/11/sys/amd64/amd64/trap.c Sun Dec 31 02:31:01 2017 (r327402) +++ stable/11/sys/amd64/amd64/trap.c Sun Dec 31 02:48:16 2017 (r327403) @@ -947,6 +947,6 @@ amd64_syscall(struct thread *td, int traced) * not be safe. Instead, use the full return path which * catches the problem safely. */ - if (td->td_frame->tf_rip >= VM_MAXUSER_ADDRESS) + if (__predict_false(td->td_frame->tf_rip >= VM_MAXUSER_ADDRESS)) set_pcb_flags(td->td_pcb, PCB_FULL_IRET); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712310248.vBV2mGoC077608>