From nobody Mon Dec 18 02:11:43 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 4StjxX1qtQz54djm; Mon, 18 Dec 2023 02:11:44 +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 4StjxW4dk7z3Kvq; Mon, 18 Dec 2023 02:11:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702865503; 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=8oLQgYdZ9i2k8aU6slQjzN4TGnxIv/BC214aQwb/pQM=; b=TynpmDZKTLWHEb0j0kHnN8hS5YZw15nGLPQ5cQ89mVb/m+9eryEISumDSMqgBNMwaB5g72 GfCDtqzZKTkfoliockPyE2KEmdT+hIrmCqxxCy86DSyNNV+9W0XmwrpXfuSFV+VRIW0bYZ +iPIgy6lAH4DI26DDQB0hrCLJoOTlb6afn8DU5YJV/Q+D29U1im+Ld1fgjYr1VeIceEWyk QR83xk7GoHOjfgcBG65EhTzcci14gQsOQYtSSMdMJDbwE7fAipkU+nRQL6F4idVJCm0kQ1 4S+R20/pW5tt2h4pEg8+ervfeIoxsFt/69zmxQQ1Q8D6dIu/4H59HpDSYvZrOg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702865503; a=rsa-sha256; cv=none; b=u/JIFOp8nf3tIyNGDLPUVNW551gni6nsMJMK1ts6DhNgaGdIELtYXgqT5bGIGyG+boMjEa emGA7UQS4lY2jPsixl+nTLTbFGqN6nmd61qb/+bbZx4Yt+RnLVUmhFdc5OxoA+qahKPXmY 0rwAqvgcU2wkkw1MlBwWoiGM2i5lTkHw+dG916qCR4TfSyUl4o2hBeSWSwbGVMZgrDSVRY kkQFwgy26JLyFLEXQfbQOUZZst1PhyTFlSYHX/5DGbwbTyieM0jIXxnQaCknG9JTFkCBBy BJpfLsHaZ9L5VJ0Vqwb2TRz482AJ9wE9W7ZE/mmTgxrywfT6JjQh4ShybW4xuQ== 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=1702865503; 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=8oLQgYdZ9i2k8aU6slQjzN4TGnxIv/BC214aQwb/pQM=; b=r6rKTXItMvXrkK49wwblgKvMcWYXso/PcQraFChSrbR/N2kT0FLukXWeqhLecmXJcZwU+i NNDeMnN0L1EQlMgXdk2HRDh/z248NL1crtkYOWuODGHhDoVks5XIzZcTtln33Lg0fklxyT LSHqngndgppWvLsiVUoLwXAZkdNKCKmgIDp70oH0i+lnD9YnT2WdpO9eQIuvokLvh6R+lh LTNRA1pJVueBBS+b6xgcvpH4Um71+OEDypJJzfhmpXd4/6cjNMMwmb2T3kSd27/y2YRltn PkgM1anO5bXSpbVHtLnY1vp8YBjUXbG2NJxoSJkP3ZJE6I7/45cyez0dVlQkKA== 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 4StjxW2nG4z12PD; Mon, 18 Dec 2023 02:11:43 +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 3BI2Bh64074637; Mon, 18 Dec 2023 02:11:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BI2BhOX074634; Mon, 18 Dec 2023 02:11:43 GMT (envelope-from git) Date: Mon, 18 Dec 2023 02:11:43 GMT Message-Id: <202312180211.3BI2BhOX074634@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: bc394ad824f5 - stable/14 - 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/stable/14 X-Git-Reftype: branch X-Git-Commit: bc394ad824f5f09b9ab659c445ed83ef36e7c313 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bc394ad824f5f09b9ab659c445ed83ef36e7c313 commit bc394ad824f5f09b9ab659c445ed83ef36e7c313 Author: Mark Johnston AuthorDate: 2023-12-11 14:08:08 +0000 Commit: Mark Johnston CommitDate: 2023-12-18 02:07:47 +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 (cherry picked from commit ecc2e6deae71b69a30bf3b7e3354aba002a37d69) --- 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 2ebe8797c503..7f93cc231fe7 100644 --- a/sys/arm/arm/undefined.c +++ b/sys/arm/arm/undefined.c @@ -343,11 +343,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);