From nobody Tue Jan 02 20:52:43 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 4T4Q635Dpqz56J1Y; Tue, 2 Jan 2024 20:52:43 +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 4T4Q632dS9z4Xr6; Tue, 2 Jan 2024 20:52:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704228763; 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=EFHBHP6AsE3kQA0341th/0DxpuanZwTw3uFmOPRNEIw=; b=aHM9iEVL6Vs1K9WxfIcwHylG4y6M77HegAlDFNWnm9yYa9yfxAlT9dGXLWal0JpLmpb9F1 ZNTTMD9tjDYTN/iQBHHPT8Xkpl5hVnxFx0ujm5dj9ploxGwqFfTyv+m0+eiIw6upFuuAXU bEtfc2wh9Mtz8AEO77gcxRFHofKynuHyK7patPDC5FGEnfFsApWRkboEFrEWUhz2MphVb2 ILnuf2pgnPszkB5Drc9CuniSNzyYLeqKLErbm+TBZYEpeoAWGdOd+R5pDLyid4iGJvgwD1 tX89Hiznpdi7gMqi7Vnp1ZFqhfD1yqr17Ebp3/jPR3Gq4bihK5TGNTQXoshoFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704228763; a=rsa-sha256; cv=none; b=ZcoI/4aq3ER0oMFR3S46KTaglCEKbZD1gQIpwm2nDe963JMq5e4fbF29hTtv5F7GISFjsS uVzJlOcqFRYEvsgexzbxWE6h0oYNJcqzl1yptYUVNl0Eyl7j6t63v4aT2ont/T5S2quU61 G7DM15tXN4mRGg4JoO02bQzcVIWatxxIqfscBA4C90l3BKvEw/BJzv8Q2uqXGN8iF2rpIi JnqyHu85M8hJMgpP+/DfqPx+PrKVqtbH8cWXUqwvO3OZU6j8v0IGrAsu9h1znziCowmklo KtHnLx29A5uohDUqlM+L+7nWSxoszurkurf+y7TACgHdxgmSiKFKJV7cvewJmQ== 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=1704228763; 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=EFHBHP6AsE3kQA0341th/0DxpuanZwTw3uFmOPRNEIw=; b=qL4OSW9LKmlDy+YaOdntllau8mTG6yM1T78xRa6iweWJWVe/VVdCsAyU5boxMyzC2h+S3I XFRQkDNUS/FprA7hM8x9F+Ehv0o3k/3TGopSKJfbKv+NpaMrOG8bCe70nEL+ZP60jlx2Ie of2QcPUaMstjf01TN9z9gzoT7Qd5KotPpBuZU8CriWNBy39StTHyjldeDZOZDF2BRetzkc pSQFNa3UKJru+3XIW9NAFJaAjyZXJeLDzeecDRw64i3xDa/FSWb9Sm7jUrkP6Umvdt/EnZ 9D+h47hPYIHa7pXHeRJTb2VBVfxBSfk49v6EUlzJzV4PQ+Vn1L1fxSzeKBPlrA== 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 4T4Q631l4cz1FmY; Tue, 2 Jan 2024 20:52: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 402KqhmN037201; Tue, 2 Jan 2024 20:52:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 402KqhF5037198; Tue, 2 Jan 2024 20:52:43 GMT (envelope-from git) Date: Tue, 2 Jan 2024 20:52:43 GMT Message-Id: <202401022052.402KqhF5037198@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: e74b03451f55 - stable/14 - abort2: Generate a core dump 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e74b03451f552088c6d82c51331b5ad8657aa800 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e74b03451f552088c6d82c51331b5ad8657aa800 commit e74b03451f552088c6d82c51331b5ad8657aa800 Author: John Baldwin AuthorDate: 2023-11-14 01:00:52 +0000 Commit: John Baldwin CommitDate: 2024-01-02 19:20:37 +0000 abort2: Generate a core dump Call sigexit rather than exit1 so that a core is generated. If running the SIGABRT handler is desired, this would need to use kern_psignal() instead. In that case a userspace wrapper in libc would be needed to force an exit if the handler doesn't exit. Given that abort2(2)'s intended use case is when userland is in a sufficiently bad state such that it can't safely call syslog(3) before abort(3), a userspace abort2(3) wrapper in libc might be dubious. Reviewed by: Olivier Certner , emaste Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42163 (cherry picked from commit 9b57e30cf5b6036263a1a2551df8574571c6f5a4) --- sys/kern/kern_exit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 965f4a431755..f9445a481d92 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -827,8 +827,9 @@ out: sbuf_finish(sb); log(LOG_INFO, "%s", sbuf_data(sb)); sbuf_delete(sb); - exit1(td, 0, sig); - return (0); + PROC_LOCK(p); + sigexit(td, sig); + /* NOTREACHED */ } #ifdef COMPAT_43