Date: Thu, 22 Feb 2024 10:31:20 GMT From: Roger Pau =?utf-8?Q?Monn=C3=A9?= <royger@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: e283c994ab27 - main - x86/xen: fill hypercall page with int3 Message-ID: <202402221031.41MAVKDV016689@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=e283c994ab270706142ef5dde9092950000af901 commit e283c994ab270706142ef5dde9092950000af901 Author: Roger Pau Monné <royger@FreeBSD.org> AuthorDate: 2024-02-02 08:50:16 +0000 Commit: Roger Pau Monné <royger@FreeBSD.org> CommitDate: 2024-02-22 10:08:04 +0000 x86/xen: fill hypercall page with int3 Filling the hypercall page with nops is not helpful from a debugging point of view, as for example attempting to execute an hypercall before the page is initialized will result in the execution flow falling through into xen_start32, making the mistake less obvious to spot. Instead fill the page with int3 (0xcc) which will result in a #BP trap. Sponsored by: Cloud Software Group Reviewed by: markj Differential revision: https://reviews.freebsd.org/D43930 --- sys/amd64/amd64/xen-locore.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/xen-locore.S b/sys/amd64/amd64/xen-locore.S index db949af1e7ca..ed2aae038b6d 100644 --- a/sys/amd64/amd64/xen-locore.S +++ b/sys/amd64/amd64/xen-locore.S @@ -67,7 +67,7 @@ .p2align PAGE_SHIFT, 0x90 /* Hypercall_page needs to be PAGE aligned */ ENTRY(hypercall_page) - .skip 0x1000, 0x90 /* Fill with "nop"s */ + .skip 0x1000, 0xcc /* Fill with `int3` to generate a #BP trap. */ /* PVH entry point. */ .code32
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402221031.41MAVKDV016689>