From nobody Mon Dec 11 14:16:36 2023 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 4SpkMB17F3z53f3D; Mon, 11 Dec 2023 14:16:38 +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 4SpkM86dvBz3YXC; Mon, 11 Dec 2023 14:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304196; 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=biwKtdyXgEWdc5jg6ENThT5i5AvaEKtUkbUOGDafvBU=; b=X3QLsgvDELdoChxbwZ0IvRMrLF3F3yRtARpzB86dkvX9px9SrdvMutDQsG70loRpfTt6yG aOtMZxZ76jmQH9zaVg/gSuck0zws20+Nwjm/HiAjNii9j+eRthGxT3as/mf5gqBgMm2sNv im58U56HcWOg7CJMAvo61ugOmbnUcjJENPTS1twx25YlMGrMgykAxdU3Wbpo9egIRqdn2c OjcMdffRvfHeHyORZR1iK02aS/m/xkVWOU7ySMuAce/q7XgDjXLIXy9pTCxPTB/7h+9ZAP rKQRmJAOVcNe+ixB7xoZY2oOX2FFoEf3YGTwGTx6fICTMnyfKdl0LNpCJhDevQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702304196; a=rsa-sha256; cv=none; b=DGTZ7CL+GdiWTTkdaJ4nzJuis8FuaB6AbMemKpH/W88VU4hDyvGVQfKXxtgyOtD0hC/7hg P33IY04K4yqkQVvItGyxtPal4IyRVpSudTELg7ya2xkcPRBkeYK0ELzladmtXtHEN991M7 PlBrKOmcbymoJoH4jAKkA2yBg9Ys3qjv2osF95w4ssF/Inpwcg5pSMnX2XVOE3lHwWaUzj 8UORzVT6Pj/gdMRCH+2XMDgxcr2GP22cb2k+idBHYLLVTRFqO/Mvhig8gdPjT+eEmFSjIx migs4NVXJj5mD54bvcPmUfbztPC1AeIRR5a+w91faEFJVTUq+/ayK5PpFUiCVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702304196; 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=biwKtdyXgEWdc5jg6ENThT5i5AvaEKtUkbUOGDafvBU=; b=FIKFUjSjNc0/mP+5n8a7uf/st104yxHOlugoWB6eM3eGsXKRtNpyoJUgrLlZS1e4QJSoTR RaUtF+sKhL7K/hq54BdWalE5ht8rGIJHqnpxekE1TOz+F3NlWJLZTuBO5gAaUWDmsKIMHq AeF6Yx0vGoFPwMN4qIhbvJ2YA55NV3ozMfTYSio7uW2+bAaVqpRV27hBPih2qgwV3X78Y7 Xjtz1JTU9S5jckbb04p6CMS7CzDxZaUUSjRSmq2UuInR2vNv6wNYV6EXzy5OHuJVcv/jMu OA3RxhxR82iL5XkGZ+zhC3bok1dwo4d55oDJ28ZV/WEHAMTTOs7c+CqZQNvHgA== 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 4SpkM85gdszZrZ; Mon, 11 Dec 2023 14:16:36 +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 3BBEGaUr071982; Mon, 11 Dec 2023 14:16:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BBEGapE071979; Mon, 11 Dec 2023 14:16:36 GMT (envelope-from git) Date: Mon, 11 Dec 2023 14:16:36 GMT Message-Id: <202312111416.3BBEGapE071979@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: ecc2e6deae71 - main - arm: Fix handling of undefined instructions in kernel mode 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ecc2e6deae71b69a30bf3b7e3354aba002a37d69 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ecc2e6deae71b69a30bf3b7e3354aba002a37d69 commit ecc2e6deae71b69a30bf3b7e3354aba002a37d69 Author: Mark Johnston AuthorDate: 2023-12-11 14:08:08 +0000 Commit: Mark Johnston CommitDate: 2023-12-11 14:08:08 +0000 arm: Fix handling of undefined instructions in kernel mode Only panic if no undefined instruction handler matched the exception. This can arise in practice if the VFP is enabled lazily. While here, fix the panic string to not include a newline. Reviewed by: andrew Obtained from: Stormshield Sponsored by: Klara, Inc. Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D42970 --- sys/arm/arm/undefined.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm/arm/undefined.c b/sys/arm/arm/undefined.c index 706033f5d570..dc29b55ae596 100644 --- a/sys/arm/arm/undefined.c +++ b/sys/arm/arm/undefined.c @@ -342,11 +342,11 @@ undefinedinstruction(struct trapframe *frame) #else printf("No debugger in kernel.\n"); #endif - return; - } - else - panic("Undefined instruction in kernel (0x%08x).\n", + } else if (uh == NULL) { + panic("Undefined instruction in kernel (0x%08x)", fault_instruction); + } + return; } userret(td, frame);