From nobody Thu Feb 22 10:31:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TgTvY35p8z5CMB3; Thu, 22 Feb 2024 10:31:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TgTvX6p29z4knb; Thu, 22 Feb 2024 10:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708597880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tBSEtycKBPwVq/BrrUgXMMuotw78kzmFz1UTd5qr3Vk=; b=D693hTdC8m0YhXhzn+U+ZQF4UUfGve3A4a18Ppy9JveLElYUxFpwHJ4uWOMClAqjgCDYIO cErQ/WV1I/PGvUkTP3yPmCBPibfs9WnjfTcsae2VBWuLpkgOIoviTd5YvZb4TPvlUWLoWL pr9kbVpRYNTXTJAj0jsYsaAHc57LWY/h/it9wyiMJw5PKvhPkxQpNn4hMP8S8lSqNoBV0T e1B2UOoiGAfgEaX4IeUQzwDQX3KCogMd11NS3NtvndeLACo0SXBj4F6rFc+QNxm2MYJ0EL NzxTy3GxhUzLKraST45t+JpFjMVqwx4x+yhpEa2hkYfbkqOQmoSZvXXgwXvqBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708597881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tBSEtycKBPwVq/BrrUgXMMuotw78kzmFz1UTd5qr3Vk=; b=Yp8jrgfyT4xkj/RvATjBWJNjnx3dYS0XDj1LuhNXtWTbmLEsed7oa75YZ1a6NIz84Wm0LC OPkF8h3VkSsJ73kWWOPm1CRSt9SKXJn0s76AFkiudS9jdvA+yfB+fIyiKO+f2VwG4hF38c kOm0LX9cbI3HaHQMS/5toy8rU2bttaBuIFI25wiF2Mr2I1O5MOmQYOXB7fNkMBGPrDeNAJ aGWlQrGsIOMuOdtemlOXwhHcwRts4EcQj4WusIgqtLDmfSjmPfHfpHcaL+jOCRAXHnSrlf q4FBAAjI8FYh++pRKGNS3rPmdEuFdEOEUFm4LgyNDXGrZ1or1GaPt4raVkvsTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708597881; a=rsa-sha256; cv=none; b=FfZyx6lniItbjtoArAXrciP2WvkhA/kAATAFxdMIN5fVdDggCOuDkBfOdJG9Zah3rmj+/R CYgv1LH0WflXx73/Zjfy9yyCArm6SfsS80V0QzOABtGXRxaxFue6QSxg5KIXJDNi8ZLQIx SK2RwxZHKQc4+ewJJvl++pdcyUh+ZgXLrhuzFTanDkTcUiPICN/AEMadSRXgu6spYL1tKm +NcftyKLl6c7WsHsZ31GUK3ADSFQyJCcTxgnOYeLkP3mcXYVP3qANc2ulMvFcshImLZ5Ca PIj+JZ24wpYft2U/X9c56aO0gUtZYDlFsLnt6g/Or1T0axi9SJ+eMm0qk8D4MQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TgTvX5v8bzSKB; Thu, 22 Feb 2024 10:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41MAVKoY016692; Thu, 22 Feb 2024 10:31:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41MAVKDV016689; Thu, 22 Feb 2024 10:31:20 GMT (envelope-from git) Date: Thu, 22 Feb 2024 10:31:20 GMT Message-Id: <202402221031.41MAVKDV016689@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Roger Pau =?utf-8?Q?Monn=C3=A9?= Subject: git: e283c994ab27 - main - x86/xen: fill hypercall page with int3 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: royger X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e283c994ab270706142ef5dde9092950000af901 Auto-Submitted: auto-generated The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=e283c994ab270706142ef5dde9092950000af901 commit e283c994ab270706142ef5dde9092950000af901 Author: Roger Pau Monné AuthorDate: 2024-02-02 08:50:16 +0000 Commit: Roger Pau Monné 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