From nobody Thu Nov 28 13:30:10 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 4Xzccg21SHz5fjTc; Thu, 28 Nov 2024 13:30:11 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xzccg06lNz4lsP; Thu, 28 Nov 2024 13:30:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732800611; 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=GA8T/HjDT/9cxoSAtA7eO5vk+cNJJASZn2il8gGLmwg=; b=soVL0P+KqvA67kkVD9EWeuibCcKx+J497GyW8/IHtPRVOAg3USIGJSOIPtPUjHTCFj4uSp Ae2XkGNt7C6HfFEkxLvHMETzaiwI8ftGEytjgdYOEAPzXAaRyUphHBbJrrOqtpTDyHt3iF ZUsU9cf3W1XJBHfyN4zbKLMaOKpys7jGSH7WMZRu1j0+TymWHlxLs8WXuEhTjBVVvki/H4 B9CfhkVPPERQlCrtyu3fVQU74KSP2qfXJzmgyFTWIxYGzLr7kcwF7t/wfw5waITUgrS8iX +yaPnHAzh3U4iDjpuMPQdvzeuFJ5r+tRwIKz8zEcGiJ2GEFlHK1TbKirjkBAnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732800611; 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=GA8T/HjDT/9cxoSAtA7eO5vk+cNJJASZn2il8gGLmwg=; b=vV6icHaDoOI0EXveG3+Xz+pX5c7MbFyYzQRcjs6XMgoq5xj8kpoXn/5VDFIP5e9bRa/r4D Y5O6vWb0BjiD2fMy2yMWkPPoaUVWnfnJrinGQFRx6p/tBZohOIexbrT2eOmnB9ecDC44W7 Apf7UnNnsX+AXDgBlUlDYa5AtEp+y8r7eOkg6GPv4P3jk2Y+mT1brWQfSD2N13xeze0+3z 0M02KXYAKiGGM5u3yevolDN2K+dfivKev9uq4HzVLWYVzgM/b2Kl1aKOesnNBdrZfNBT6J Qi82jPa1/7iSgRKC3PrEwMgmixr2APap4FHnN/PEuw8+8aMVe9JGzPGLY+Z40g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732800611; a=rsa-sha256; cv=none; b=TwFNzCpfKBGQoBqnmLPCcGoJCzNV2UWw8eOeQd0h1Ira5bGG+DoBQ1dSsLx1DdWdrBEDGl Hkq1CpGWDJhDalPr5zrolSaNC4brC26SLA/mmMBeFfudnwdgZ7XBxqyyiJNpawAramcFUD x+IsMM6giDWULC6XLojRMWI+3WbuSCPO8WjTlI8TBFs42m/UiKlTitNZPBY1yAquNPFLED JLfUsqa4IfW0LzM7PFGL5zJG8iDnKm1Qwc4F+VYKt7lP0aUZXTntrI7dHdvbdIzggxvgdF NikU+8EjTJsmhRJAXSjUX619JHHSmi2bJSfPg24fmG9beVaEvEyotNcq3PIxcg== 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 4Xzccf6rhWzh9L; Thu, 28 Nov 2024 13:30:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4ASDUAKF010312; Thu, 28 Nov 2024 13:30:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4ASDUALV010302; Thu, 28 Nov 2024 13:30:10 GMT (envelope-from git) Date: Thu, 28 Nov 2024 13:30:10 GMT Message-Id: <202411281330.4ASDUALV010302@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 5f5b47e37416 - stable/14 - amd64 efi rt: handle #BP 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5f5b47e37416df46b52e0d43b94d9c2f37d15397 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5f5b47e37416df46b52e0d43b94d9c2f37d15397 commit 5f5b47e37416df46b52e0d43b94d9c2f37d15397 Author: Konstantin Belousov AuthorDate: 2024-11-21 04:57:58 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-28 12:53:17 +0000 amd64 efi rt: handle #BP PR: 282860 (cherry picked from commit e6ec41fa86d88f80bd663e55455a6844619a9b24) --- sys/amd64/amd64/trap.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index f5ea035b3e3c..d7e365f6874e 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -600,6 +600,18 @@ trap(struct trapframe *frame) * FALLTHROUGH (TRCTRAP kernel mode, kernel address) */ case T_BPTFLT: + /* + * Most likely, EFI RT hitting INT3. This + * check prevents kdb from handling + * breakpoints set on the BIOS text, if such + * option is ever needed. + */ + if ((td->td_pflags2 & TDP2_EFIRT) != 0 && + curpcb->pcb_onfault != NULL) { + frame->tf_rip = (long)curpcb->pcb_onfault; + return; + } + /* * If KDB is enabled, let it handle the debugger trap. * Otherwise, debugger traps "can't happen".