From nobody Mon Aug 5 00:32:39 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 4Wccpc11s0z5S8V8; Mon, 05 Aug 2024 00:32:40 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wccpc0T0Nz4Cs3; Mon, 5 Aug 2024 00:32:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722817960; 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=DRBpGOlqvtZe1NtjaXr5FSfz2M08OCLstahvWaiamTk=; b=AxlDv0vjSUJX7k6G0AlZG/Um0SfBddbsfeAxj0vl3H+3dcwM2GpIi6sKpvKA3uGKNxsX7g Rs2bPh41CgggBaKeki10ssiuw166vZdEa2Fxn+0YxYOka5TSJS9APcrEjArIkeJD6/iwl3 M5XXXTh7qAP7fc+6ZJrpOOcEKqUhYXABrfALdEfr8O7UVFh3asv2EaSEc/uE5k0RUb7676 0mPyMQLhQWMlozGt4aRCYqBDYc0S/HoEL3oytVHm8k9vUuxOYaGChycHGwW4195t719dLj pa5Viz1T41H7u2aXIyqcIeoHq2Ojq0fB3SUvrJeXcBJwHQw3bVfqHU2zvs+9vA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722817960; a=rsa-sha256; cv=none; b=T32VS3m3KNll5JBfi4pH+i8Gur3PWdzs5lBMggV8HDyr7uAcRiWLwGCDhxBRljTeX3FVlm BAt21cFI3tpTf6UfWpJXFCY/0EiJnRPE8SrEzNsYHRVX37xjrVxxzAI82eIUCJyNVbjkTH l4wQ5qYrE5PDEswJOqjcJSNZfGBPlAsOXN98nAhoGFfLCkiUUsldIX9Y7tCm4U6giXNn1x 3+ZjZuxl3Aw8wuK0chePwjpRSZfyvROShOXRPOLv1/7mY5bNJKtFvWGzjIAlFLgmyoOx2j eBYN0fb5DAui0hNy1CRGHaPak2qBdobK0+ezPr09qNkeb5MbNYJcAzxt74zHlg== 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=1722817960; 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=DRBpGOlqvtZe1NtjaXr5FSfz2M08OCLstahvWaiamTk=; b=iyFKY05th+VoXYN4KkqgZ2gSowAQLAC8RqaPpIK2n0g7hQWcWIE9Aj5yPfWrMw/FEkW3m6 UtFdAhjS5Kk4Aa1Ss1cWS2eyXXyWss4MbS2xVrGva+wsm8m6gH7USzU1RQHZIb77PuGPwe zApCkbjybU540upN4LHiSKBMLCL3lZ4TccWVgUIVdvtRTWpqQXHOpiNGysoxC4Vkvjm7sE QQGNcQlQDYhE3/giifpzk7MRXyqiNRX/q6q2XsiAoKgOm+HwzKKTjcUkIW9Ejb773l56r5 /SNbVzXCm9ZdmjttCqNjAFl1Eaa0Iz/GyQMF/Fiz1tr/wF/n8bTVTLCmnbLC1w== 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 4Wccpc04HYz1G9j; Mon, 5 Aug 2024 00:32:40 +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 4750WdbL003055; Mon, 5 Aug 2024 00:32:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4750WdtB003052; Mon, 5 Aug 2024 00:32:39 GMT (envelope-from git) Date: Mon, 5 Aug 2024 00:32:39 GMT Message-Id: <202408050032.4750WdtB003052@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: f0d4329dc213 - stable/14 - rtld(1): Spell value as VALUE, not NAME 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: f0d4329dc213c7ef336d1bc3282b4f861f8ea8b3 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f0d4329dc213c7ef336d1bc3282b4f861f8ea8b3 commit f0d4329dc213c7ef336d1bc3282b4f861f8ea8b3 Author: Konstantin Belousov AuthorDate: 2024-07-25 11:50:01 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-05 00:32:11 +0000 rtld(1): Spell value as VALUE, not NAME (cherry picked from commit bc25bc6850e512c4c45effdff6178d20b5eca558) --- libexec/rtld-elf/rtld.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/rtld.1 b/libexec/rtld-elf/rtld.1 index 4cc5b639c89a..992138b1ffc0 100644 --- a/libexec/rtld-elf/rtld.1 +++ b/libexec/rtld-elf/rtld.1 @@ -352,7 +352,7 @@ The syntax of the direct invocation is .Op Fl b Ar exe .Op Fl d .Op Fl f Ar fd -.Op Fl o Ar OPT=NAME +.Op Fl o Ar OPT=VALUE .Op Fl p .Op Fl u .Op Fl v From nobody Mon Aug 5 00:32:41 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 4Wccpd37wYz5S8bB; Mon, 05 Aug 2024 00:32:41 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wccpd1l7xz4DF1; Mon, 5 Aug 2024 00:32:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722817961; 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=g4Pe8Xd6xEsyS40JCaeqdd23qoS0EYdOgKaq96C+iXQ=; b=psBSj4YJpOElRlvV0HG1m/4CaVS9TJRc7KgxvmmAwvT76Wl2brxjQiMMZ5lifkyqVMbx8K 0ecJHZJnUHFRuf+gip+sRO+TDbt1G0eJmgYoVZO/Qmmn8oWEP0cwe2mRSrQFNaTylzKZ/s qWR+KjLboBz5yuBFT9hpOYWnBlqc3yzrpjJLryRzAdYAT2OUhw8EzmS3B+CIRjeWZcLmM6 ajg9SAKrPbKU27ciIqLY19rgYhS2tEpnSiiQLxCrWU+CebAxvdfQoS7vyx3bH64ladja+W jsagFtDPb73yUHYUWzmktVK+IwKtTis6ZyA+5j9qYIiwTUtrFPXvGJAK3d+hSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722817961; a=rsa-sha256; cv=none; b=ntBW9V9FhGC/Yp25/b31Y/m+SB9igvLV6u3hFCYzGyM1XZ+81/KjCD5x1AS+ZtyvHxpQjg ulwTQTho6BIclJbgHC15Z/X39uimKrTOzyhVSWWrJ452pw4fOu2iEV7QVtLnYeEUgRj5g6 MwPsXWcHBhvksIqx9l9AxnUJggfEzfpUoVqb28v+cL1LrZBIo975FJqluMsYn5v5uqLDUX uPlemF5wfBEwIci9I75etMu2y8pBEZY5iFypAHF16FgIoyzDXs1rynVh4fH8o9xu4wcFH+ 3O/F7nI423SjKD9Vv3D5ucHnZ90OcEZq87xgc4su9ykfn0CRxnXdtKzXrg118w== 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=1722817961; 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=g4Pe8Xd6xEsyS40JCaeqdd23qoS0EYdOgKaq96C+iXQ=; b=Gxr5rTv3SGtPb6ST2IYB7T97UU98mZyMnuFirKR3dEuw6DcAxsS04aZF6Zz9/a7r33pZWG w7zAyMaO4TRsYdw6IedmXhddUpyhwdqxTq9Xnwq5aG7+NPjkUREHlq4ifXrI+O+o0lwFxF xGQM5MIE5mUfwKZQS0EgfXvHfTa8T5ffSNnmM+hHCmBnx2v9H/kn0I+KsX23faP8nibm6D ylfiDxErB59plx1GDeYfBI7T4IL+TKzphAlPO8IlaUQTKPaLr6N/RCk70rBLAB5dGB8pMY LFzPLtjvAicGk6xKH2wBDQGwBZXpF1JLLGe0Sd2tDbQmwD8gbDy2iSVhI8do+g== 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 4Wccpd12tQz1Ghp; Mon, 5 Aug 2024 00:32:41 +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 4750WfFM003109; Mon, 5 Aug 2024 00:32:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4750Wfld003106; Mon, 5 Aug 2024 00:32:41 GMT (envelope-from git) Date: Mon, 5 Aug 2024 00:32:41 GMT Message-Id: <202408050032.4750Wfld003106@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: da32a0616bdc - stable/14 - rtld: make ld_get_env_var() usable for all rtld source files 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: da32a0616bdc84e12791e280d9d92acc34f5dd70 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=da32a0616bdc84e12791e280d9d92acc34f5dd70 commit da32a0616bdc84e12791e280d9d92acc34f5dd70 Author: Konstantin Belousov AuthorDate: 2024-07-17 03:59:24 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-05 00:32:11 +0000 rtld: make ld_get_env_var() usable for all rtld source files (cherry picked from commit 47315d6d3562111883142bb09320d35f05d34a58) --- libexec/rtld-elf/rtld.c | 28 +--------------------------- libexec/rtld-elf/rtld.h | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 96042f7b5af3..411fe7956873 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -344,32 +344,6 @@ ld_utrace_log(int event, void *handle, void *mapbase, size_t mapsize, utrace(&ut, sizeof(ut)); } -enum { - LD_BIND_NOW = 0, - LD_PRELOAD, - LD_LIBMAP, - LD_LIBRARY_PATH, - LD_LIBRARY_PATH_FDS, - LD_LIBMAP_DISABLE, - LD_BIND_NOT, - LD_DEBUG, - LD_ELF_HINTS_PATH, - LD_LOADFLTR, - LD_LIBRARY_PATH_RPATH, - LD_PRELOAD_FDS, - LD_DYNAMIC_WEAK, - LD_TRACE_LOADED_OBJECTS, - LD_UTRACE, - LD_DUMP_REL_PRE, - LD_DUMP_REL_POST, - LD_TRACE_LOADED_OBJECTS_PROGNAME, - LD_TRACE_LOADED_OBJECTS_FMT1, - LD_TRACE_LOADED_OBJECTS_FMT2, - LD_TRACE_LOADED_OBJECTS_ALL, - LD_SHOW_AUXV, - LD_STATIC_TLS_EXTRA, -}; - struct ld_env_var_desc { const char * const n; const char *val; @@ -404,7 +378,7 @@ static struct ld_env_var_desc ld_env_vars[] = { LD_ENV_DESC(STATIC_TLS_EXTRA, false), }; -static const char * +const char * ld_get_env_var(int idx) { return (ld_env_vars[idx].val); diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index a4f2c35cc03f..96a9da3c4ea3 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -359,6 +359,32 @@ typedef struct Struct_SymLook { struct Struct_RtldLockState *lockstate; } SymLook; +enum { + LD_BIND_NOW = 0, + LD_PRELOAD, + LD_LIBMAP, + LD_LIBRARY_PATH, + LD_LIBRARY_PATH_FDS, + LD_LIBMAP_DISABLE, + LD_BIND_NOT, + LD_DEBUG, + LD_ELF_HINTS_PATH, + LD_LOADFLTR, + LD_LIBRARY_PATH_RPATH, + LD_PRELOAD_FDS, + LD_DYNAMIC_WEAK, + LD_TRACE_LOADED_OBJECTS, + LD_UTRACE, + LD_DUMP_REL_PRE, + LD_DUMP_REL_POST, + LD_TRACE_LOADED_OBJECTS_PROGNAME, + LD_TRACE_LOADED_OBJECTS_FMT1, + LD_TRACE_LOADED_OBJECTS_FMT2, + LD_TRACE_LOADED_OBJECTS_ALL, + LD_SHOW_AUXV, + LD_STATIC_TLS_EXTRA, +}; + void _rtld_error(const char *, ...) __printflike(1, 2) __exported; void rtld_die(void) __dead2; const char *rtld_strerror(int); @@ -380,6 +406,7 @@ void dump_Elf_Rela(Obj_Entry *, const Elf_Rela *, u_long); /* * Function declarations. */ +const char *ld_get_env_var(int idx); uintptr_t rtld_round_page(uintptr_t); uintptr_t rtld_trunc_page(uintptr_t); Elf32_Word elf_hash(const char *); From nobody Mon Aug 5 00:32:42 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 4Wccpf45dCz5S8SJ; Mon, 05 Aug 2024 00:32:42 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wccpf2Rfjz4DHH; Mon, 5 Aug 2024 00:32:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722817962; 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=P0BtX8PzPZqXtpcrGNck/esyisMx4DrGfzKjvTp3wbk=; b=YwBfWS4W2IgR4ECKgq4XJR9k+WCFplDP/gYdzFK1IOGImjaUplPcxqiTnhcIlQjPCJ6wna L/K7NCCilO/aguJuWMfJSzrd4WJBfbX6tUhssjwg8/a5BsefmJK6u9gX8kGX/ReIhZS3wU SNtcOGFt1ZjFbUDeRqfWSH0cnDT5IvXWTY8xeLfaiWvUeLpiPcrgMSHK7pTRJ2q9GmDI9/ DdJmhUlDWtHC1BymmSQp7KuuAmKqvFxUmUoyA1sgT11D2uYkaxejxq7O/zeVSevDQHlQIq eyKE2wubmQhxsoWYL6e24VQG4nOCSuj9lsgj4/vqPq5t+go/kx0OFB24fsLCVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722817962; a=rsa-sha256; cv=none; b=nZTA64e2oUX+jq2c2SlIf5dMN2Uj29t1m3Tn6a6mXbrayM2hPVhg5m2tVHmOIeDI3CCD3X ddtIbCRpR5RXezNn1sIL/MKRDr198O8o+8WTYXzwfYzhkO3e9NWxdb34T8raybOYaCEnAR H4x1d9tAOOmNFt0L/fRrj7m3OIBkUR2AZaZ6+BMckHJMvrCDGmMDvDEk6ETBBJWidpZxzR o0y59G8bQm2i7GTlrV/FBEtfB+nrc3jhMzIdjekGsUuu0S+MEWCwywP3TYtckGnzp9Zx+c 0G8jgHBVh0DtFKN3fGh+Pryl39WGb0DfiQQ7Hea3iDCCF5WGlWkXX85K2gmXbQ== 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=1722817962; 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=P0BtX8PzPZqXtpcrGNck/esyisMx4DrGfzKjvTp3wbk=; b=nvzCeRlLzW1Nbc87froh7JpowGFHZH7guuNOjae8buaawlm9cIPNu+rrgTf1jgifnDSyBS zKnK17bGRuPWGFqJ7Db2Bbkdx1Ph6UqOwRRCuCjH41JjJBaKwx4gUaFwlnj1g87X0l8bIp +yUcP5jR86sK3VgnOSqgVzzAOfAGikRmgqFsuV3KrICHpq8+Z2PzclRDworMK071h4dxtp 3LQvzQn8tds8kfbvIh/0+1/YaCMwrEyeVHBKlBrUP9suiZtAceeN6OhLgNE1Tct6yOc1HY YfhAMW+ec0u4butmxLRY99JLiu2PsPcMfh+n+YjPdYBoxXCOwyygqc8mOlxYuQ== 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 4Wccpf23P7z1Ghq; Mon, 5 Aug 2024 00:32:42 +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 4750WgYB003158; Mon, 5 Aug 2024 00:32:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4750WgOb003155; Mon, 5 Aug 2024 00:32:42 GMT (envelope-from git) Date: Mon, 5 Aug 2024 00:32:42 GMT Message-Id: <202408050032.4750WgOb003155@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: 279e543dc707 - stable/14 - rtld: add LD_NO_DL_ITERATE_PHDR_AFTER_FORK env var 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: 279e543dc707ee19b28cee8a00deafea1f8b8d8e Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=279e543dc707ee19b28cee8a00deafea1f8b8d8e commit 279e543dc707ee19b28cee8a00deafea1f8b8d8e Author: Konstantin Belousov AuthorDate: 2024-07-17 04:05:33 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-05 00:32:11 +0000 rtld: add LD_NO_DL_ITERATE_PHDR_AFTER_FORK env var PR: 280318 (cherry picked from commit 860c4d94ac46cee35a678cf3c9cdbd437dfed75e) --- libexec/rtld-elf/rtld.1 | 10 +++++++++- libexec/rtld-elf/rtld.c | 1 + libexec/rtld-elf/rtld.h | 1 + libexec/rtld-elf/rtld_lock.c | 7 +++++-- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/libexec/rtld-elf/rtld.1 b/libexec/rtld-elf/rtld.1 index 992138b1ffc0..31e046a5cdc4 100644 --- a/libexec/rtld-elf/rtld.1 +++ b/libexec/rtld-elf/rtld.1 @@ -26,7 +26,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 28, 2024 +.Dd July 24, 2025 .Dt RTLD 1 .Os .Sh NAME @@ -329,6 +329,14 @@ The static TLS extra space is used when loading objects compiled for initial-exec TLS code model with .Xr dlopen 3 . The minimum value that can be specified is \'128\'. +.It Ev LD_NO_DL_ITERATE_PHDR_AFTER_FORK +Allow +.Xr dl_iterate_phdr 3 +to block in callback, without causing deadlock with the +.Xr fork 2 . +The drawback is that the image started in this mode cannot use +.Xr dl_iterate_phdr 3 +after fork. .El .Sh DIRECT EXECUTION MODE .Nm diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 411fe7956873..e7fcfde8f474 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -376,6 +376,7 @@ static struct ld_env_var_desc ld_env_vars[] = { LD_ENV_DESC(TRACE_LOADED_OBJECTS_ALL, false), LD_ENV_DESC(SHOW_AUXV, false), LD_ENV_DESC(STATIC_TLS_EXTRA, false), + LD_ENV_DESC(NO_DL_ITERATE_PHDR_AFTER_FORK, false), }; const char * diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index 96a9da3c4ea3..97187b24ce84 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -383,6 +383,7 @@ enum { LD_TRACE_LOADED_OBJECTS_ALL, LD_SHOW_AUXV, LD_STATIC_TLS_EXTRA, + LD_NO_DL_ITERATE_PHDR_AFTER_FORK, }; void _rtld_error(const char *, ...) __printflike(1, 2) __exported; diff --git a/libexec/rtld-elf/rtld_lock.c b/libexec/rtld-elf/rtld_lock.c index 0c790450dcec..323bb7494c32 100644 --- a/libexec/rtld-elf/rtld_lock.c +++ b/libexec/rtld-elf/rtld_lock.c @@ -463,6 +463,7 @@ _rtld_atfork_pre(int *locks) if (locks == NULL) return; + bzero(ls, sizeof(ls)); /* * Warning: this did not worked well with the rtld compat @@ -472,7 +473,8 @@ _rtld_atfork_pre(int *locks) * _rtld_atfork_pre() must provide the working implementation * of the locks anyway, and libthr locks are fine. */ - wlock_acquire(rtld_phdr_lock, &ls[0]); + if (ld_get_env_var(LD_NO_DL_ITERATE_PHDR_AFTER_FORK) == NULL) + wlock_acquire(rtld_phdr_lock, &ls[0]); wlock_acquire(rtld_bind_lock, &ls[1]); /* XXXKIB: I am really sorry for this. */ @@ -492,5 +494,6 @@ _rtld_atfork_post(int *locks) ls[0].lockstate = locks[2]; ls[1].lockstate = locks[0]; lock_release(rtld_bind_lock, &ls[1]); - lock_release(rtld_phdr_lock, &ls[0]); + if (ld_get_env_var(LD_NO_DL_ITERATE_PHDR_AFTER_FORK) == NULL) + lock_release(rtld_phdr_lock, &ls[0]); } From nobody Mon Aug 5 00:32: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 4Wccpg4rQ3z5S8XT; Mon, 05 Aug 2024 00:32: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wccpg3ZKKz4D3P; Mon, 5 Aug 2024 00:32:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722817963; 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=OmVPCHmN+/5OB+UZLfAlOzRLEcO14QbMXGul3MCHHBQ=; b=KoVUMXK/NKx17lTZq6yoN/uLFHMgje9oM3IdAIkN/38hdpFFZt32QVvixHldi5wful95u0 6Fdy/shq42y7sqzd4m8u7hnDFGcVlFaLtIQWKYs0YpOJbpbnTBdpevSJNCfst4qaxhLf3e mnxR1oKudBbTJ9Rddf6QIXeQRlhTrv0XX/hdKGLLqqZQjUG4we8kKIIfCXV2LbIYWVvJfH 3T7JjJ0Id7QI01aW7+qlf+mgYfOnyo0aCFdDeRXIk0UBozg0u0nRcS0cedoZc4mj4z+nqx tPupSGwZ4T7aLC43enRsvXTAbQxiseEcLsEmoODR/+yA1J4EvgxBfNCPNCM6WA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722817963; a=rsa-sha256; cv=none; b=tVnsV208XyFBUpLHUHo4kTmVH2ksHHdeK4SZup73YCezE9FMd/IpkulEF14fd87TeGmBgH eqx11gTc3VhDGvVo8cvZa/aULBgKIqH6iYPGBqhKaL+At93vtvrU/r+XZj78VR2w9D1YAt 6JRkakRz2EkntwcEya/NQj6WdJD3gCVk24CSkGVGiam9nIHN7kxQD/EZwQfp0M1mDATCy/ FVvd1oTX2uzijaxvXxy6evnh/GDHrDSAoKtB/AujNNDeF7PZpLMw9V1Yj95dsCTlztPZvh ZjMsOMTDW4OhTAViQKBwYjOWvGCfcP2Ljz5n2ga9qdNg2hfmp1SmrtJKJyWT6w== 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=1722817963; 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=OmVPCHmN+/5OB+UZLfAlOzRLEcO14QbMXGul3MCHHBQ=; b=LnxWVVUJq7SXUmcz9eLNH/FqNPM9Zk52J6HxlJ/hlaJ1nqBqiSNtN7hlQwz2DqLthmyz9Y TMeZCHL8eFJEI8MrBCijmNXPrlcNK6pcYLSaO1USmiiCYI4GFEW2RCdXvpVW+fK/uog1wK gWzuGmXI6HpQbiGqzXovKnShQhQ7aPTK9vDo5IUTkei+sCOTOxAzwQlgbJa2nsH3+5jAEL YM1Suda+oEGal2TLTRpKY0WxnyLdfW2xXncOLB1RWRh+jaWIL2srN+gDAJ6WxCGeD/Lt3l LJAmprkfAwcAcoKekvitvgYvMF/wVWSX3j/xpBYEQJFUtwQfyFNZX/n24hB/eg== 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 4Wccpg33lYz1Gfr; Mon, 5 Aug 2024 00:32:43 +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 4750Whjh003200; Mon, 5 Aug 2024 00:32:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4750WhA6003197; Mon, 5 Aug 2024 00:32:43 GMT (envelope-from git) Date: Mon, 5 Aug 2024 00:32:43 GMT Message-Id: <202408050032.4750WhA6003197@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: 15ee14d0f7d0 - stable/14 - rtld: avoid division in __thr_map_stacks_exec() 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: 15ee14d0f7d0d8af7e12f16be7fe5b3fa5b2e5de Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=15ee14d0f7d0d8af7e12f16be7fe5b3fa5b2e5de commit 15ee14d0f7d0d8af7e12f16be7fe5b3fa5b2e5de Author: Konstantin Belousov AuthorDate: 2024-07-24 10:17:55 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-05 00:32:11 +0000 rtld: avoid division in __thr_map_stacks_exec() (cherry picked from commit 31f688a26d82ce00d1ec7ca9ed17b9914bf5176f) --- lib/libthr/thread/thr_stack.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/libthr/thread/thr_stack.c b/lib/libthr/thread/thr_stack.c index 5e888bbfe9b6..68a658a1ddfd 100644 --- a/lib/libthr/thread/thr_stack.c +++ b/lib/libthr/thread/thr_stack.c @@ -127,10 +127,7 @@ static char *last_stack = NULL; static inline size_t round_up(size_t size) { - if (size % _thr_page_size != 0) - size = ((size / _thr_page_size) + 1) * - _thr_page_size; - return size; + return (roundup2(size, _thr_page_size)); } void From nobody Mon Aug 5 08:00:29 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 4WcplL1Mmxz5SnCL; Mon, 05 Aug 2024 08:00:30 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcplL0ZTcz4mhK; Mon, 5 Aug 2024 08:00:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722844830; 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=GCQJps21LNS3m0BY0TlKE7scpJ30EnV9nC3qRHoDlFQ=; b=cgCAJpiYBVCqwHdpazjY5zXbouTUmDGxN/pcJw1aPLmbU1nVvUvm0jV6Jl7RL5eJvctwkj 6qAkYVQzsc+7tZlNDJZqY83T1h25j1FxpDx0ylL6JB+OaJNuC48RbzEBU16RUlJrjl4cf8 nbi7kazlr16HgML4s1iQRxor4FG6MGUR91WOrZIIK04K/NmPVsuaxCu2xqx6CEltFvcmHa v0F1jKWMXq6l9rIRKCe8kGGcbn+q8jbR8MGHjG4p9/2R9TpIgbDdC8DiF1rwSLqfr5wSSd 4HUOTdcaBfiiVPn+jK5QWyX2wFFOyKsBdqbENwuRBddLMtxfBYnnV8ctTBP2MQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722844830; a=rsa-sha256; cv=none; b=tytgsMUa2YgU0LkuZjTsWctch8jnNWlyoK7caDR9xSnnO704GiRkqp8ZGqM4BrdCFHwawR 39S/WkPzTaye4sWyUveIsTMoREYduXRa9wAXmIHbOJmmRePuRVD+Wzs4kmQpGC50eDmYRg md/HRkJ+b3l8+soOX8uqm2w7EI1wgQa6GnmUYzOOfBnVqsF+acY/FxYQq6enAtsddHKuAR p/ewiN+jq8OHHL0AKHkpPezStOIMkBQSBCOBWuzRkghGqXBHNMjzdtATnDxpjbAnyRc9w5 ZPbMXNmNefPmnt5X5r7FZ0DYOw023N5OBmJa0G2cXDMuirxoIHuGr3tk9slQEQ== 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=1722844830; 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=GCQJps21LNS3m0BY0TlKE7scpJ30EnV9nC3qRHoDlFQ=; b=g0EML6jCyGnZvJ51n7WCPmc0GeQYZeB35Ltel5IdRmPUUvQmYI0JvqySeNULj5d2A8mtTD Km62PjlX+pRy5C+ldPFDmEobX+JE3bm8r3rKAgxJAwTqOS7wuGy3CgWv4bTUTc7HOo4j3N NgUA9vaW0AxTPlqiZUwI8M81ZtXMVwPLLzZ1NXfu2vfERU/LEQcNNS8lS5nZEvZ64vm1m1 Vkbs4fVA6UtKHki0rbOioPQEiAdq+2CZUQ6G9lrSn6rx8L6FyUpluUVnORE2aluA7wKCqp b49EfR7cAqNBoHqWDWkm00iQhaj8DrG97nsENcEWfTOiIzoDxNXpmCLVeGUbZA== 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 4WcplL05FHzFxr; Mon, 5 Aug 2024 08:00:30 +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 47580TlU057250; Mon, 5 Aug 2024 08:00:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47580TxN057247; Mon, 5 Aug 2024 08:00:29 GMT (envelope-from git) Date: Mon, 5 Aug 2024 08:00:29 GMT Message-Id: <202408050800.47580TxN057247@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Corvin =?utf-8?Q?K=C3=B6hne?= Subject: git: 1f3bfc60550c - main - bhyve: avoid a potential deadlock 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: corvink X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f3bfc60550cdd019f00bf6d274db762fda4ed2c Auto-Submitted: auto-generated The branch main has been updated by corvink: URL: https://cgit.FreeBSD.org/src/commit/?id=1f3bfc60550cdd019f00bf6d274db762fda4ed2c commit 1f3bfc60550cdd019f00bf6d274db762fda4ed2c Author: Pierre Pronchery AuthorDate: 2024-08-05 07:46:01 +0000 Commit: Corvin Köhne CommitDate: 2024-08-05 07:48:22 +0000 bhyve: avoid a potential deadlock This unlocks a mutex in an error path, that would otherwise remain locked and potentially cause a deadlock later on. Reported by: Coverity Scan CID: 1521334 Reviewed by: corvink, markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45401 --- usr.sbin/bhyve/tpm_intf_crb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/tpm_intf_crb.c b/usr.sbin/bhyve/tpm_intf_crb.c index af0214dd1760..0f9a8d1dd53b 100644 --- a/usr.sbin/bhyve/tpm_intf_crb.c +++ b/usr.sbin/bhyve/tpm_intf_crb.c @@ -348,8 +348,10 @@ tpm_crb_mem_handler(struct vcpu *vcpu __unused, const int dir, pthread_mutex_lock(&crb->mutex); tpm_crb_mmiocpy(&start, val, size); - if (!start.start || crb->regs.ctrl_start.start) + if (!start.start || crb->regs.ctrl_start.start) { + pthread_mutex_unlock(&crb->mutex); break; + } crb->regs.ctrl_start.start = true; From nobody Mon Aug 5 11:13:52 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 4Wcv2S558Bz5T40x; Mon, 05 Aug 2024 11:13:52 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wcv2S3k3Kz45TD; Mon, 5 Aug 2024 11:13:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722856432; 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=nkUgRRhxqAzLv71kk5nA4WKgSr59iJeeT1ermElOG+g=; b=qVG1AKl77wh9uCMNMlNqRzQgYDEEEl7jQbJIsPRiOk4J2ImHD5yB6eITAQRVh6j/2qAOWP s5yTmQpIvbgZpFaxxxFo6mPti4151sWC+cIc5CaSfUzCn9o1geaB8FaoXhszJU4Gp6jOaA I68ke1+Pvp832qiE+BsVfn3sTTDoNoTzUkZca0Q4V9Fs8ieau25NyXyObkj0y4k7YZ4GIG 7lIdr2wPZwdJqKeBl4Tk/y5M74H4EWRsL23lymhKjmbCN7NAOTTf33BauzW/dQ6balO6WT /O1BQCuwVGcPJd4HI+Z55H1S0UTOKTt5TWJIfoApyGeLbklvkzGbGYx+x9a09w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722856432; a=rsa-sha256; cv=none; b=sE7GseQvKhHMOgVDsewJV72abuawuF3CPZZCncebG3Px9TxX1/rfvqwod//bOakPBYsdUJ tx18mLt+Iy7xh+MlHNJACtGy2dT/7XE/UIfn3w80Z07+4W59l2zOjLcefS4RZSF63Xf80O /2slrJiBq4LaJyhEPBXSPQj3PwBKAI9mJi0bbvC61eR+cBVjLOlaJ9SAm0FgI1oRqHm/RF BGGE6f2ErPGIPON/itQbZWEwD26PNqDKyym2VUOG1iTkwTFMqELaVoh+50ywpdKHvueehP KsZ0AGjxnKk4f9UkYEF9iONZk/qIZflT1teEdbmFOawhgV8Q+l/wJAvxzXsjtA== 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=1722856432; 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=nkUgRRhxqAzLv71kk5nA4WKgSr59iJeeT1ermElOG+g=; b=MH6S1L1hFAB/q2qNHf6Z/4fKl6PQJyCQmYImWfkaSHMfbFOgWWtZY/0PbEqvbRBw6u5cVo VqfOlshP8KThPc5l0usLsQL2G622F6XcIVwE3g20JHlSSkNRGCbvbosWoIhKfYgdgzPi5X 61mzyxnlacKDZ/VEz4dJYtmtos6wLKoqFz8QQzA4+SoUB0XjK6jn9dqaNn+YdXaZHmYYIo h7JT8Ha699M8c40u9W0hvjDuh9mTSZquy8x2oZ2vl/pZgZYa838WnJl5e3cn8/CytRoSbn BC8db/+vl525SRtZIVeBLzmJ9sq9dXXhwW6hq2LdXBNbUWprpyE9L9nqBXzgJw== 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 4Wcv2S2VVwzLfD; Mon, 5 Aug 2024 11:13:52 +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 475BDqaj087140; Mon, 5 Aug 2024 11:13:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 475BDq4L087136; Mon, 5 Aug 2024 11:13:52 GMT (envelope-from git) Date: Mon, 5 Aug 2024 11:13:52 GMT Message-Id: <202408051113.475BDq4L087136@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 6e744de1a3dc - main - mixer.3: Fix mixer_get_mode() description 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: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e744de1a3dc5dde8d2ee51e97a1224a01bdfb21 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6e744de1a3dc5dde8d2ee51e97a1224a01bdfb21 commit 6e744de1a3dc5dde8d2ee51e97a1224a01bdfb21 Author: Christos Margiolis AuthorDate: 2024-08-05 11:13:44 +0000 Commit: Christos Margiolis CommitDate: 2024-08-05 11:13:44 +0000 mixer.3: Fix mixer_get_mode() description Improve wording and also fix the constants' names. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D46220 --- lib/libmixer/mixer.3 | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/lib/libmixer/mixer.3 b/lib/libmixer/mixer.3 index 4008867ef2fb..04aa3bd1dca7 100644 --- a/lib/libmixer/mixer.3 +++ b/lib/libmixer/mixer.3 @@ -19,7 +19,7 @@ .\" OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN .\" THE SOFTWARE. .\" -.Dd May 22, 2024 +.Dd August 4, 2024 .Dt MIXER 3 .Os .Sh NAME @@ -388,18 +388,15 @@ controls. .Pp The .Fn mixer_get_mode -function returns the playback/recording mode of the audio device the mixer \ -belongs to. -The available values are the following: -.Bl -tag -width "MIX_STATUS_PLAY | MIX_STATUS_REC" -offset indent -.It Dv MIX_STATUS_NONE -Neither playback nor recording. -.It Dv MIX_STATUS_PLAY -Playback. -.It Dv MIX_STATUS_REC -Recording. -.It Dv MIX_STATUS_PLAY | MIX_STATUS_REC -Playback and recording. +function returns the operating mode of the audio device the mixer belongs to. +The following values can be OR'ed in case more than one mode is supported: +.Bl -tag -width "MIX_MODE_MIXER" -offset indent +.It Dv MIX_MODE_MIXER +The audio device has a mixer. +.It Dv MIX_MODE_PLAY +The audio device supports playback. +.It Dv MIX_MODE_REC +The audio device supports recording. .El .Pp The From nobody Mon Aug 5 13:01:30 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 4WcxQf6V7kz5S06g; Mon, 05 Aug 2024 13:01:30 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcxQf5l9qz4HCq; Mon, 5 Aug 2024 13:01:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722862890; 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=5EjChnGmjInYwfVngik9oDSumNcVSHd889GFiGnVbqA=; b=OqfQs9UaBJlkWVw2Bn5ztwUWNX85a4G62l4HMmWKm05XutHek9ygQQIEU5rc1UjJPhQ6OY eaC7MjKZmAT/Hx4Ukb1XUa5q2M//YQdUDvY9VFkAJL6Ok7s4d8bpYX5MnNCeZHV+OIcazK nQXit18Jlp2ioLqd3ar+5I14RjjLRxJf6IQDIwp+WfS9/jCZA0o/Pz7SBMbABl0/LYJjVL KKsXM0CMHMFtCnqOxzQyXM9ndPxTx7ZLqmwu05wohiWXRlW/gueLVheerCegTkW9sQKujn ukpH9FrYsjyR/AcvPPEJ2fUYxqSNRe5P+poC2qyojQbARrWZZnykTAaxIdvnxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722862890; a=rsa-sha256; cv=none; b=C1TC79ERP+/CCxClBmlwGnJdKKJA9FS4LtE+9tcxMGscnURqB22P29ZwXWdZE0cm7q+Vpv hXXwOSByLzyuWol9cJBfgP/qN2ynkPXpgSNEvpmXXMy5Db0lDZYPHHLg/YOahVflOCuKQT rzEuMkmVgGHW0jWImNpkIYxISiaU3855j0myKZPpGmCep7NPc0HBkOGtuaLIRxH6fJYJTI WUYV59+hjy1IIMcaxpPbtozJKR0buD3pCdetiFq8YYzvcJkIafGQwH7AvHi6lWj9nK4xT5 dwXgKhSw7P3BMfi3y0bpXpSBipGZB2XWOVWPtsDBnuYiqNK6f0nY4y19CqmfEg== 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=1722862890; 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=5EjChnGmjInYwfVngik9oDSumNcVSHd889GFiGnVbqA=; b=yg34488lIyBwIbH/ii4Fw23DXTws2NPEm6nuTWfqA4r5o3OHnT+5bSl73CEYp1U1QvMR6r SRn8tc0F6mXymh6Hp6/DmKZsniJOCOmn3+xbuomD62Ue+XLCcciNyxOxbIXTB0Z7Zy5VpY C6zEMwNGV+Gnxcfu7x3VZNxs+OvUUyREldrmFUTXKki4LJU0aHwIZOUyyxaOURJsVmG0zk sHTKWhK4saOywtFtUeRUuX0Q3Q+vD9g4GWIJRPEMkebjlL47gKVFQBNp6zcDownORTjaIU nq6tYnUMUMoP2ul5BYYTkIHZwXvHaUI+Skt11vZ8xqTriA5z9lxJdbvL0czR+g== 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 4WcxQf5LVXzP39; Mon, 5 Aug 2024 13:01:30 +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 475D1UeD072605; Mon, 5 Aug 2024 13:01:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 475D1Ur6072602; Mon, 5 Aug 2024 13:01:30 GMT (envelope-from git) Date: Mon, 5 Aug 2024 13:01:30 GMT Message-Id: <202408051301.475D1Ur6072602@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Navdeep Parhar Subject: git: fef0e39f64a1 - main - cxgbe/t4_tom: bugfixes in stop/restart. 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: np X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fef0e39f64a1db796ded8777dbee71fc287f6107 Auto-Submitted: auto-generated The branch main has been updated by np: URL: https://cgit.FreeBSD.org/src/commit/?id=fef0e39f64a1db796ded8777dbee71fc287f6107 commit fef0e39f64a1db796ded8777dbee71fc287f6107 Author: Navdeep Parhar AuthorDate: 2024-07-25 01:43:54 +0000 Commit: Navdeep Parhar CommitDate: 2024-08-05 12:56:22 +0000 cxgbe/t4_tom: bugfixes in stop/restart. 1. Remove toepcb from the toep_list on active open failure. 2. Purge the wr_list for an L2T entry on an adpater stop. Fixes: c1c524852f62 cxgbe/t4_tom: Implement uld_stop and uld_restart for ULD_TOM. MFC after: 2 weeks Sponsored by: Chelsio Communications --- sys/dev/cxgbe/tom/t4_connect.c | 14 ++++++++++ sys/dev/cxgbe/tom/t4_listen.c | 3 +++ sys/dev/cxgbe/tom/t4_tom.c | 58 +++++++++++++++++++++++++----------------- 3 files changed, 52 insertions(+), 23 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_connect.c b/sys/dev/cxgbe/tom/t4_connect.c index 1c98e70a4df5..99e4c222996d 100644 --- a/sys/dev/cxgbe/tom/t4_connect.c +++ b/sys/dev/cxgbe/tom/t4_connect.c @@ -115,10 +115,17 @@ act_open_failure_cleanup(struct adapter *sc, struct toepcb *toep, u_int status) struct inpcb *inp = toep->inp; struct toedev *tod = &toep->td->tod; struct epoch_tracker et; + struct tom_data *td = sc->tom_softc; if (toep->tid >= 0) { free_atid(sc, toep->tid); toep->tid = -1; + mtx_lock(&td->toep_list_lock); + if (toep->flags & TPF_IN_TOEP_LIST) { + toep->flags &= ~TPF_IN_TOEP_LIST; + TAILQ_REMOVE(&td->toep_list, toep, link); + } + mtx_unlock(&td->toep_list_lock); } CURVNET_SET(toep->vnet); @@ -234,6 +241,7 @@ t4_connect(struct toedev *tod, struct socket *so, struct nhop_object *nh, struct sockaddr *nam) { struct adapter *sc = tod->tod_softc; + struct tom_data *td; struct toepcb *toep = NULL; struct wrqe *wr = NULL; if_t rt_ifp = nh->nh_ifp; @@ -380,6 +388,12 @@ t4_connect(struct toedev *tod, struct socket *so, struct nhop_object *nh, } offload_socket(so, toep); + /* Add the TOE PCB to the active list */ + td = toep->td; + mtx_lock(&td->toep_list_lock); + TAILQ_INSERT_TAIL(&td->toep_list, toep, link); + toep->flags |= TPF_IN_TOEP_LIST; + mtx_unlock(&td->toep_list_lock); NET_EPOCH_ENTER(et); rc = t4_l2t_send(sc, wr, toep->l2te); NET_EPOCH_EXIT(et); diff --git a/sys/dev/cxgbe/tom/t4_listen.c b/sys/dev/cxgbe/tom/t4_listen.c index 897c5bcaab1e..f91d193c0fed 100644 --- a/sys/dev/cxgbe/tom/t4_listen.c +++ b/sys/dev/cxgbe/tom/t4_listen.c @@ -1090,7 +1090,10 @@ t4_offload_socket(struct toedev *tod, void *arg, struct socket *so) update_tid(sc, synqe->tid, toep); synqe->flags |= TPF_SYNQE_EXPANDED; mtx_lock(&td->toep_list_lock); + /* Remove synqe from its list and add the TOE PCB to the active list. */ TAILQ_REMOVE(&td->synqe_list, synqe, link); + TAILQ_INSERT_TAIL(&td->toep_list, toep, link); + toep->flags |= TPF_IN_TOEP_LIST; mtx_unlock(&td->toep_list_lock); inp->inp_flowtype = (inp->inp_vflag & INP_IPV6) ? M_HASHTYPE_RSS_TCP_IPV6 : M_HASHTYPE_RSS_TCP_IPV4; diff --git a/sys/dev/cxgbe/tom/t4_tom.c b/sys/dev/cxgbe/tom/t4_tom.c index 58a77ff93c86..9b1dcf304196 100644 --- a/sys/dev/cxgbe/tom/t4_tom.c +++ b/sys/dev/cxgbe/tom/t4_tom.c @@ -256,12 +256,6 @@ offload_socket(struct socket *so, struct toepcb *toep) toep->inp = inp; toep->flags |= TPF_ATTACHED; in_pcbref(inp); - - /* Add the TOE PCB to the active list */ - mtx_lock(&td->toep_list_lock); - TAILQ_INSERT_HEAD(&td->toep_list, toep, link); - toep->flags |= TPF_IN_TOEP_LIST; - mtx_unlock(&td->toep_list_lock); } void @@ -280,7 +274,6 @@ undo_offload_socket(struct socket *so) struct inpcb *inp = sotoinpcb(so); struct tcpcb *tp = intotcpcb(inp); struct toepcb *toep = tp->t_toe; - struct tom_data *td = toep->td; struct sockbuf *sb; INP_WLOCK_ASSERT(inp); @@ -303,11 +296,6 @@ undo_offload_socket(struct socket *so) toep->flags &= ~TPF_ATTACHED; if (in_pcbrele_wlocked(inp)) panic("%s: inp freed.", __func__); - - mtx_lock(&td->toep_list_lock); - toep->flags &= ~TPF_IN_TOEP_LIST; - TAILQ_REMOVE(&td->toep_list, toep, link); - mtx_unlock(&td->toep_list_lock); } static void @@ -331,6 +319,12 @@ release_offload_resources(struct toepcb *toep) remove_tid(sc, tid, toep->ce ? 2 : 1); release_tid(sc, tid, toep->ctrlq); toep->tid = -1; + mtx_lock(&td->toep_list_lock); + if (toep->flags & TPF_IN_TOEP_LIST) { + toep->flags &= ~TPF_IN_TOEP_LIST; + TAILQ_REMOVE(&td->toep_list, toep, link); + } + mtx_unlock(&td->toep_list_lock); } if (toep->ce) { t4_release_clip_entry(sc, toep->ce); @@ -346,8 +340,6 @@ release_offload_resources(struct toepcb *toep) static void done_with_toepcb(struct toepcb *toep) { - struct tom_data *td = toep->td; - KASSERT(!(toep->flags & TPF_CPL_PENDING), ("%s: %p has CPL pending.", __func__, toep)); KASSERT(!(toep->flags & TPF_ATTACHED), @@ -370,13 +362,7 @@ done_with_toepcb(struct toepcb *toep) MPASS(toep->tid == -1); MPASS(toep->l2te == NULL); MPASS(toep->ce == NULL); - - mtx_lock(&td->toep_list_lock); - if (toep->flags & TPF_IN_TOEP_LIST) { - toep->flags &= ~TPF_IN_TOEP_LIST; - TAILQ_REMOVE(&td->toep_list, toep, link); - } - mtx_unlock(&td->toep_list_lock); + MPASS((toep->flags & TPF_IN_TOEP_LIST) == 0); free_toepcb(toep); } @@ -2039,6 +2025,8 @@ stop_atids(struct adapter *sc) if ((uintptr_t)toep >= (uintptr_t)&t->atid_tab[0] && (uintptr_t)toep < (uintptr_t)&t->atid_tab[t->natids]) continue; + if (__predict_false(toep == NULL)) + continue; MPASS(toep->tid == atid); MPASS(toep->incarnation == sc->incarnation); /* @@ -2052,6 +2040,8 @@ stop_atids(struct adapter *sc) toep->tid = -1; #endif mtx_lock(&td->toep_list_lock); + toep->flags &= ~TPF_IN_TOEP_LIST; + TAILQ_REMOVE(&td->toep_list, toep, link); TAILQ_INSERT_TAIL(&td->stranded_atids, toep, link); mtx_unlock(&td->toep_list_lock); } @@ -2109,16 +2099,32 @@ static void stop_tom_l2t(struct adapter *sc) { struct l2t_data *d = sc->l2t; + struct tom_data *td = sc->tom_softc; struct l2t_entry *e; + struct wrqe *wr; int i; + /* + * This task cannot be enqueued because L2 state changes are not being + * processed. But if it's already scheduled or running then we need to + * wait for it to cleanup the atids in the unsent_wr_list. + */ + taskqueue_drain(taskqueue_thread, &td->reclaim_wr_resources); + MPASS(STAILQ_EMPTY(&td->unsent_wr_list)); + for (i = 0; i < d->l2t_size; i++) { e = &d->l2tab[i]; mtx_lock(&e->lock); if (e->state == L2T_STATE_VALID) e->state = L2T_STATE_RESOLVING; - if (!STAILQ_EMPTY(&e->wr_list)) - CXGBE_UNIMPLEMENTED("l2t e->wr_list"); + /* + * stop_atids is going to clean up _all_ atids in use, including + * these that were pending L2 resolution. Just discard the WRs. + */ + while ((wr = STAILQ_FIRST(&e->wr_list)) != NULL) { + STAILQ_REMOVE_HEAD(&e->wr_list, link); + free(wr, M_CXGBE); + } mtx_unlock(&e->lock); } } @@ -2140,6 +2146,12 @@ t4_tom_stop(struct adapter *sc) stop_tids(sc); taskqueue_enqueue(taskqueue_thread, &td->cleanup_stranded_tids); + /* + * L2T and atid_tab are restarted before t4_tom_restart so this assert + * is not valid in t4_tom_restart. This is the next best place for it. + */ + MPASS(STAILQ_EMPTY(&td->unsent_wr_list)); + return (0); } From nobody Mon Aug 5 15:07:41 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 4Wd0DF5cWqz5SBHr; Mon, 05 Aug 2024 15:07:41 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wd0DF55tcz4T9F; Mon, 5 Aug 2024 15:07:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722870461; 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=0R8oUJ7fJ2KrazO/jDvU/i7YqSVv3vQJ/K6rRHP6V2U=; b=gEZYwYzg02XDQ7c/g+ghlM8ZComGg/bMXKnY/hYUQqY9CE06hJT/WNlnZD3VyXqh4mFxSe jMY5pxMIW9ke9fqi5ZyPiiTmVppAKGNY5PuIwQ28/Bs+kTJm//uzTfFOqE4N3FOkQLb+qB ddG9Ju35rMs5eWNan1aX8vKzZUfQTTLGd8MNLXHcVqd56EdJxqt1OiEYuwSrLAZajEWpuk xQgA099A0lYGfell2EWg+iMaDRKJrITjII/7Utk357JSseQaOamOtcWHgWRLxyp0pxZ2BM g66ocRXMNhEAsWGSLnuEC7OYaS9WLzi/bohAbCZ0wCPxJrqYI8yUEOz8CREeBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722870461; a=rsa-sha256; cv=none; b=ed2Unb/HVvbHlJRRZ7zpNFG/2b313laAnXlTuys3HrSK8tD379eEsU/rDndpS1kZo3Kxj7 9HWS94lxZGO8NZZYTu/pIwiHsGnGw5O1pki41OSpYNASihox3z9LHZ+wp1iE/GWzkYJ9iw yciANzfPbg0ALelMihsLcWi2TJdgeXrJ/8kMOdKuOWuk9nuIYHErllPGr/81mIUK30OrEv eoK7tW9X1ZGEcEE2gdoINRoTo6rMTTw2PhQuUH0A4+44Kt1XumLEtecIx54N8w9j/GfvVe T9HKwXYwlJeq1ggkXCzs3gzrtgtEFP3q6LxoOzbzr+nRh7fEDeXRVtbnKoS10g== 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=1722870461; 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=0R8oUJ7fJ2KrazO/jDvU/i7YqSVv3vQJ/K6rRHP6V2U=; b=DwG7TU6QGfDpLDdFWQiEkfAD/gW1CuQOTnULJeVXTbxH3ZRvUjMTvzoC81obSow8/CvqK9 cFeIHiQ3meMyxKXYtT2wA1N59eUgBXqaSc2WlpuJ/tfjuk4niNw8EhDMfmDVrCYYit+a8Y ZnGVfo9tXrRpNbCdv70SD0+8tP5i8XCBZrBA3LtOkZakSvzeYc2DEAK9smuJvNxY0OKABu 13l9ElhLUcnGHpOmO6vbh/00ZLC1dGfL6WSVxiL0VcapGJWBnZYo2AjZbeE51E7c8uk9Hi 72pETV/lVbl1cwFZw1CDCOzcHFTzxghbssT11uPbHDlmiUYLOpNjsHTh9jbcLA== 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 4Wd0DF4hKzzSW3; Mon, 5 Aug 2024 15:07:41 +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 475F7fM9081459; Mon, 5 Aug 2024 15:07:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 475F7fPu081456; Mon, 5 Aug 2024 15:07:41 GMT (envelope-from git) Date: Mon, 5 Aug 2024 15:07:41 GMT Message-Id: <202408051507.475F7fPu081456@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 8bb6b413f6d3 - main - vm/vm_pageout.c: eliminate write-only variable 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/main X-Git-Reftype: branch X-Git-Commit: 8bb6b413f6d32a7db111246b5d2aa8a2b9e50734 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8bb6b413f6d32a7db111246b5d2aa8a2b9e50734 commit 8bb6b413f6d32a7db111246b5d2aa8a2b9e50734 Author: Konstantin Belousov AuthorDate: 2024-08-05 15:05:15 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-05 15:07:18 +0000 vm/vm_pageout.c: eliminate write-only variable PR: 280631 Fixes: acb4cb33d35838e3e86412202cd63d9021b21ce2 (non-debug builds) Sponsored by: The FreeBSD Foundation --- sys/vm/vm_pageout.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 0d054da34866..f6c5e6291692 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -366,12 +366,10 @@ vm_pageout_flushable(vm_page_t m) static int vm_pageout_cluster(vm_page_t m) { - vm_object_t object; vm_page_t mc[2 * vm_pageout_page_count - 1]; int alignment, num_ends, page_base, pageout_count; - object = m->object; - VM_OBJECT_ASSERT_WLOCKED(object); + VM_OBJECT_ASSERT_WLOCKED(m->object); vm_page_assert_xbusied(m); From nobody Mon Aug 5 16:46:27 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 4Wd2QC32SLz5SLCP; Mon, 05 Aug 2024 16:46:27 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wd2QC2Ld8z4dVr; Mon, 5 Aug 2024 16:46:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722876387; 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=qrUmjnFPcmxcAdMDd4YJ5L14rtBlNiKgK85FmU2Yg/A=; b=j3vVYjOdzpCzwW3Aka8EX8WiIRCmofHQ2iltXaUvpJffidi6F9TC1wEi7tdXHC7Mn3ZAeG LHnnHW1T3Or4YnkRqSF00+t+I+sbdDEDYiposz9ASnvjN+SQXJzZEcKRSx+aP24Lt14URE h55nBsvhcdGpaF1OFy4QlHpHXdVnUx2o2D2imqkOpO8nSSe0ghqJk2yBD1hW6ZsfwNhuyj aaSRqir7k1uNhHkHyvG/oXPpBWkXFmF6NQPHW7Jxjg0etrYiVCkI7RZ4HvDi9M/qRuAd25 zb2knEO93Uhlt9DUY7/4NfsUKGUHL9zg+Gmtup0biCI2uJFSYiQZIq0FfyCkNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722876387; a=rsa-sha256; cv=none; b=WITa4RkuroGsBMmhFxc9NC9lA3Q1e6Qj26J8SXn/C2+lxeY6GK7Q4L3Ia1BC4ztOXIFt4s kKB+JpbOptLP65+LvYOYM4/9TYH8NfmCroQP25LidJPFenxR64G7TtvytedP16ZJBjEsb5 atM5LuJF7+cHcG+zvr2SFLIgTm1goX2akfBhpA7pOKUogtxnt0qQPq5CtYLrNf0l+1PjYy xMya8ARIayZfGd1mddDH1cdrXbtw08JBGZxA+HVGkB4WUznMySPx37BkHTd9L8OFjsOQBm 2KZVMb4Kbd5hI/iMSfcqL6OFm8HUHi7S20ZfQZbNZAnzni79Am/ikQioT98VPw== 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=1722876387; 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=qrUmjnFPcmxcAdMDd4YJ5L14rtBlNiKgK85FmU2Yg/A=; b=TugMbBFPZd7BC0nlamPIRsdHwF/Kb1zF5lAaDEwngcn/YLtsGx+aLHR8dUwQU3vH4t4CNb r+IpsnbM8N+HzxyZcYVNMyE9Zue8FDQgcv1iDzobdUqPSclEEFWszgU/RKbDM/8AUibsjd BDRz8rak4Wnpt/Md306krazrpOylGtyketSW3rJlMhJHXZ8re5pbyeCeX04o4UjEH3o6qn TEtF75xM88L4OdPnn0FVuW0oaSca7eUheHD512t1kncasTO09WUC76nyUdDcKf8YZYDph9 KtKtRVnqv/Gp6L2FHTD4ybNL1DddNOfd2dKLsV6SV7fkrIs0Gh6cJEdD0udMfg== 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 4Wd2QC1n7CzXHL; Mon, 5 Aug 2024 16:46:27 +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 475GkRlE050419; Mon, 5 Aug 2024 16:46:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 475GkRU3050416; Mon, 5 Aug 2024 16:46:27 GMT (envelope-from git) Date: Mon, 5 Aug 2024 16:46:27 GMT Message-Id: <202408051646.475GkRU3050416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: 31cc65708c66 - main - man9: Document M_NEVERFREED and VM_ALLOC_NOFREE 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: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31cc65708c664c2a0257c26503d39ebc506f674e Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=31cc65708c664c2a0257c26503d39ebc506f674e commit 31cc65708c664c2a0257c26503d39ebc506f674e Author: Bojan Novković AuthorDate: 2024-07-31 17:36:55 +0000 Commit: Bojan Novković CommitDate: 2024-08-05 16:41:22 +0000 man9: Document M_NEVERFREED and VM_ALLOC_NOFREE Reviewed by: alc, kib, markj Differential Revision: https://reviews.freebsd.org/D46198 --- share/man/man9/malloc.9 | 11 ++++++++++- share/man/man9/vm_page_alloc.9 | 6 +++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/share/man/man9/malloc.9 b/share/man/man9/malloc.9 index 0ab5b2ed6e8d..d8759a255492 100644 --- a/share/man/man9/malloc.9 +++ b/share/man/man9/malloc.9 @@ -28,7 +28,7 @@ .\" .\" $NetBSD: malloc.9,v 1.3 1996/11/11 00:05:11 lukem Exp $ .\" -.Dd October 12, 2022 +.Dd August 4, 2024 .Dt MALLOC 9 .Os .Sh NAME @@ -269,6 +269,15 @@ This option should only be used in combination with .Dv M_NOWAIT when an allocation failure cannot be tolerated by the caller without catastrophic effects on the system. +.It Dv M_NEVERFREED +This is an internal flag used by the +.Xr UMA 9 +allocator and should not be used in regular +.Fn malloc +invocations. +See the description of VM_ALLOC_NOFREE in +.Xr vm_page_alloc 9 +for more details. .El .Pp Exactly one of either diff --git a/share/man/man9/vm_page_alloc.9 b/share/man/man9/vm_page_alloc.9 index 7d6cf1692bb1..4bf8db33a28d 100644 --- a/share/man/man9/vm_page_alloc.9 +++ b/share/man/man9/vm_page_alloc.9 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.Dd July 21, 2024 +.Dd August 4, 2024 .Dt VM_PAGE_ALLOC 9 .Os .Sh NAME @@ -307,6 +307,10 @@ pages will be allocated by the caller in the near future. must be no larger than 65535. If the system is short of free pages, this hint may cause the kernel to reclaim memory more aggressively than it would otherwise. +.It Dv VM_ALLOC_NOFREE +The caller asserts that the returned page will never be released. +If this flag is specified, the allocator will try to fetch a page from a +special per-domain arena in order to curb long-term physical memory fragmentation. .El .Sh RETURN VALUES If the allocation was successful, a pointer to the From nobody Mon Aug 5 16:46:28 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 4Wd2QD4llkz5SL92; Mon, 05 Aug 2024 16:46:28 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wd2QD2vPKz4dVs; Mon, 5 Aug 2024 16:46:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722876388; 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=NjPhvVaJqTFkWyIVNGg8p8WckB1D2dTXZTbPkzkWYqI=; b=pdm02SHb9tYRJLDRGrCqPW1PyUs/dHzPqqsvx8kRZT/gQvTiQiKDzhaGwp5GBfYlxul7ie 60Epocp6CA1lkMyTQf6snMhwreT63RVlZTjCYhroRpxnfyPrQ3ZnzC4w8JgIa9OcPspt7h tmlOKL/COlfkzJM9qfrnUWZ1CWkawEcEBRbkM/7qXU8sEimuRqQ8d4Lu7jL8Q6XMtz7IdZ X1rZu5bORv49w+MpN6yY65QeMdSK7kYK2hXZ+ion21jtnvEO/PA+nwxSxLzKA9osQfHsa/ jpmK4kMR5Zl+hK+7IlWxepJFVlvHzY3m3JjusXB5zsSTN8MHoHa8DnayxSQBDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722876388; a=rsa-sha256; cv=none; b=IoMnm0li27/SAko74UV8blhLNmqMqJpu8X3KXUJKSbN2JL9Eg2cnWiJmuKS7OTLDcIC7QL E5wNkehvJqGl8jSDCXhgfJIAh92sVdz5cZR0oT2o16sRHmbYu9wxf0OAmyT7fvfeXe4xaO pSkRo6fX1CEjwkIfs8JTBvXvZ7Syo2g8vqWvV7VsTU/DxIib6re5vTYrrXTkwMvXvyUUt4 3WPM7Pb7RpgdNtuJtPEejeHZv9oli9DGGRQQF0cp/F/GoJItnAGLlShPocfC+GG9bSdBCo T+GdYWGpu1t0oxp58UfMwsE8E7TpbaUCY/PddEHtEOjCBCZp8+D9bQtwsSj5pw== 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=1722876388; 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=NjPhvVaJqTFkWyIVNGg8p8WckB1D2dTXZTbPkzkWYqI=; b=JdHwS7VYfAg8swcBYvFH5X+nwSILT0UC2XsNrq3Vos/lEhL0PHeFzpruMVgV6nAKGBhCuP 1EMLm9Dz0GilUqib3g2G7PhJNhP7Sn4p7EaU6ONO+hEuF7BaMO+L5IcLwjciMBuo4cnbWD F65QWc2CFgV4qlvecovMzQjPnULL17K99338XLV0vr6coI6F+1yL0unkV7GtQSCmm/7pWp 0Mqo/q5p64OXT+gLbaT70Z43BThA2oAxqayPw6oYi5/KgFf3gHs1sSBIXlRddxJN8tLptg eD0lrkfRs/3IIVz9pp/V1icJs0pKPO8/zLf1gerItGyz/3OiNnBaMfA5kVlxRA== 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 4Wd2QD2VxNzXHM; Mon, 5 Aug 2024 16:46:28 +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 475GkSZd050461; Mon, 5 Aug 2024 16:46:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 475GkSFO050458; Mon, 5 Aug 2024 16:46:28 GMT (envelope-from git) Date: Mon, 5 Aug 2024 16:46:28 GMT Message-Id: <202408051646.475GkSFO050458@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: 06134ea2f38c - main - malloc(9): Check for M_NEVERFREED 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: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06134ea2f38ca214b53a1613e110e8332b2804e4 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=06134ea2f38ca214b53a1613e110e8332b2804e4 commit 06134ea2f38ca214b53a1613e110e8332b2804e4 Author: Bojan Novković AuthorDate: 2024-07-31 17:43:31 +0000 Commit: Bojan Novković CommitDate: 2024-08-05 16:44:10 +0000 malloc(9): Check for M_NEVERFREED The recently introduced M_NEVERFREED flag is not meant to be used for regular malloc requests. Enforce this by checking for M_NEVERFREED in malloc_dbg. Reviewed by: alc, kib, markj Differential Revision: https://reviews.freebsd.org/D46199 --- sys/kern/kern_malloc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 3c4cb63003c4..9d7e0464e0f7 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -542,6 +542,8 @@ malloc_dbg(caddr_t *vap, size_t *sizep, struct malloc_type *mtp, once++; } } + KASSERT((flags & M_NEVERFREED) == 0, + ("malloc: M_NEVERFREED is for internal use only")); #endif #ifdef MALLOC_MAKE_FAILURES if ((flags & M_NOWAIT) && (malloc_failure_rate != 0)) { From nobody Mon Aug 5 16:52:07 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 4Wd2Xl57FLz5SLNV; Mon, 05 Aug 2024 16:52:07 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wd2Xl4btPz4gYx; Mon, 5 Aug 2024 16:52:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722876727; 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=MKIf/vuxON+eIYpqSJ7lO/xCTb+u5TCTaJc/4Z+ejQU=; b=W1lS76o90DA0z0CDjZnDwoLRC2i77z+bwCJwWGlZnC2ZIIovCVoIcX3E3rJ1/YknNPBldk ypW9WPmtwUKZiom7H0sxwxjiXMT8zs86kfdubg39nIYRaOCfQlcRMNyWFiKfWKj77m7CG1 8TuvrzcNoIZ7ra163BOrySMGz6l0LIf09VgWGEat2u+FX9rpUHj18hq5jfmNmkD9G0u1jc CiuYb0xKsGxNP99GT6j4fyTOeyUAWvjp+zJggIt46boSWaaXB+bZddB8wSY9Y3n0aSDrFT vsXDZuQVWLbjTI/ZJ1nugELfMvDPebGgD3/m23XXD3BCe2pKTKvU6aS4OZvVdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722876727; a=rsa-sha256; cv=none; b=WkvDjMsqgTSpkAYfNaaoV85Squ6L794inG0zu+MBNBpw6oUkNsszWjFCAGJxFUxviAI9f5 OhL5KodTM6vWABmEyyR0YG2zdNJU1OcgaCBnI4bYsOS5sHkDgf1Obc0hmubD+8khvLaA38 yHXKktqW+3iIOTWP+csJuYpAN1ECyA8JfjAi5nhK3aTS4eRKzMVHYSFPdjbiTawvqWGEir gpToonhg0ewOpNpEMi614i3Gbvvo+33elad2xJSprjRlP894WjOXXWvQ21Zhu/V4FkMfB2 A/hmBU32gjblifeXHG8vpTK3zELCnGPnX/qio2NNBuIkZXrQ0x0JnXCfiMpCkg== 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=1722876727; 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=MKIf/vuxON+eIYpqSJ7lO/xCTb+u5TCTaJc/4Z+ejQU=; b=Pw8kBzCqIt6f9vFmwKP0R5EZONaqT8xg0J3itZjNGytBXH/kiE/bg3tmJZGUnc9HuO+2Xt ARwAC1tIvm6UlZEqyblIGHLLKNH8xJFtkRYPGf6u8B0BplJWTB+w6pOL1eTlIguewcdnZA /ACEOzlA0oxIEjlj8QBOaG21k8aiiGnNVLu2cEzHNnhIpkcZV3aHlaRUI7ONXfqgLQe5I8 LDqOJBGpetFbmYmd4JfxaRiGkpONAQ8u6BG4RuNNdOrK3YNvLVol9Pk73Gu3qE+l02mffl tLTwGG3ZpN+P74EWXWhANPdBz87042n+kO2BBkvqEEr7Q3yl/C859ae6G9bdzw== 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 4Wd2Xl4CMTzXdM; Mon, 5 Aug 2024 16:52:07 +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 475Gq7Ts067141; Mon, 5 Aug 2024 16:52:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 475Gq7jA067138; Mon, 5 Aug 2024 16:52:07 GMT (envelope-from git) Date: Mon, 5 Aug 2024 16:52:07 GMT Message-Id: <202408051652.475Gq7jA067138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 1f628be888b7 - main - tcp_ratelimit: provide an api for drivers to release ratesets at detach 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: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f628be888b74f1219b3ea7ccea1e7a3d1db77a2 Auto-Submitted: auto-generated The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=1f628be888b74f1219b3ea7ccea1e7a3d1db77a2 commit 1f628be888b74f1219b3ea7ccea1e7a3d1db77a2 Author: Andrew Gallatin AuthorDate: 2024-08-05 15:45:42 +0000 Commit: Andrew Gallatin CommitDate: 2024-08-05 16:51:35 +0000 tcp_ratelimit: provide an api for drivers to release ratesets at detach When the kernel is compiled with options RATELIMIT, the mlx5en driver cannot detach. It gets stuck waiting for all kernel users of its rates to drop to zero before finally calling ether_ifdetach. The tcp ratelimit code has an eventhandler for ifnet departure which causes rates to be released. However, this is called as an ifnet departure eventhandler, which is invoked as part of ifdetach(), via either_ifdetach(). This means that the tcp ratelimit code holds down many hw rates when the mlx5en driver is waiting for the rate count to go to 0. Thus devctl detach will deadlock on mlx5 with this stack: mi_switch+0xcf sleepq_timedwait+0x2f _sleep+0x1a3 pause_sbt+0x77 mlx5e_destroy_ifp+0xaf mlx5_remove_device+0xa7 mlx5_unregister_device+0x78 mlx5_unload_one+0x10a remove_one+0x1e linux_pci_detach_device+0x36 linux_pci_detach+0x24 device_detach+0x180 devctl2_ioctl+0x3dc devfs_ioctl+0xbb vn_ioctl+0xca devfs_ioctl_f+0x1e kern_ioctl+0x1c3 sys_ioctl+0x10a To fix this, provide an explicit API for a driver to call the tcp ratelimit code telling it to detach itself from an ifnet. This allows the mlx5 driver to unload cleanly. I considered adding an ifnet pre-departure eventhandler. However, that would need to be invoked by the driver, so a simple function call seemed better. The mlx5en driver has been updated to call this function. Reviewed by: kib, rrs Differential Revision: https://reviews.freebsd.org/D46221 Sponsored by: Netflix --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 8 +++++++- sys/netinet/tcp_ratelimit.c | 6 ++++++ sys/netinet/tcp_ratelimit.h | 9 +++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index ccbdf11a1dd5..a80235f0f347 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -36,6 +36,7 @@ #include #include +#include #include #include @@ -4876,7 +4877,12 @@ mlx5e_destroy_ifp(struct mlx5_core_dev *mdev, void *vpriv) #ifdef RATELIMIT /* - * The kernel can have reference(s) via the m_snd_tag's into + * Tell the TCP ratelimit code to release the rate-sets attached + * to our ifnet. + */ + tcp_rl_release_ifnet(ifp); + /* + * The kernel can still have reference(s) via the m_snd_tag's into * the ratelimit channels, and these must go away before * detaching: */ diff --git a/sys/netinet/tcp_ratelimit.c b/sys/netinet/tcp_ratelimit.c index 1834c702c493..22bdf707fa89 100644 --- a/sys/netinet/tcp_ratelimit.c +++ b/sys/netinet/tcp_ratelimit.c @@ -1298,6 +1298,12 @@ tcp_rl_ifnet_departure(void *arg __unused, struct ifnet *ifp) NET_EPOCH_EXIT(et); } +void +tcp_rl_release_ifnet(struct ifnet *ifp) +{ + tcp_rl_ifnet_departure(NULL, ifp); +} + static void tcp_rl_shutdown(void *arg __unused, int howto __unused) { diff --git a/sys/netinet/tcp_ratelimit.h b/sys/netinet/tcp_ratelimit.h index cd540d1164e1..0ce42dea0d90 100644 --- a/sys/netinet/tcp_ratelimit.h +++ b/sys/netinet/tcp_ratelimit.h @@ -94,6 +94,8 @@ CK_LIST_HEAD(head_tcp_rate_set, tcp_rate_set); #ifndef ETHERNET_SEGMENT_SIZE #define ETHERNET_SEGMENT_SIZE 1514 #endif +struct tcpcb; + #ifdef RATELIMIT #define DETAILED_RATELIMIT_SYSCTL 1 /* * Undefine this if you don't want @@ -131,6 +133,9 @@ tcp_get_pacing_burst_size_w_divisor(struct tcpcb *tp, uint64_t bw, uint32_t segs void tcp_rl_log_enobuf(const struct tcp_hwrate_limit_table *rte); +void +tcp_rl_release_ifnet(struct ifnet *ifp); + #else static inline const struct tcp_hwrate_limit_table * tcp_set_pacing_rate(struct tcpcb *tp, struct ifnet *ifp, @@ -218,6 +223,10 @@ tcp_rl_log_enobuf(const struct tcp_hwrate_limit_table *rte) { } +static inline void +tcp_rl_release_ifnet(struct ifnet *ifp) +{ +} #endif /* From nobody Mon Aug 5 18:44:03 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 4Wd51w0T6yz5SVyM; Mon, 05 Aug 2024 18:44:04 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wd51v71qQz4tgd; Mon, 5 Aug 2024 18:44:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722883444; 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=jkKI2o8zgS74e4Taef8aSsNV+0cXO+8E1jrsyjZgN0E=; b=FUBUz0/iW/vRaDSZL9+uasXtVSgshj5rVTK05q8Uz+PKwkYMTt2RrhRwU3iYrrSWYOVXuB dvBblqaPEAJUVLiNjCzAVSC8e9xrBIcuTHA7gXx2b5qWKlEfw8SwZhMYywNrKDHwntQpKL Hsf2dOJ8XzKxRv6UuJqlLqj77qDggJVBu2bhmkAk8vSvYqNXmBQAzfMe+F6B/HmOVorRS8 eWRuITDGYKVS8ipH8p4NyI9m2oZCBOxPm5qJkNdLbVjxGSmpXUS3f+Tl0gTsM/THwQ1Wgm HUmA0kFLH0er6OvrJ83zYLXLDL9Mq7H5MIZnaxMxOST2Biif7cLMD0EaW4+u+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722883444; a=rsa-sha256; cv=none; b=nl5T50KN35BVw3V3Vj1rlUIsyZmbcEcxAnGCOQfa9f7eaOsTsG+hHLwtw57/X/IJzCZ1t1 65ZsT60tGVzCJNl4DjyYqeIpkC7HY8u4Yl28GNwhK1Tv+HQcXjUi5gTkXZ/iQPP1a2WqZX HwKnBBsvz2okB4MUe3BMF7foNy1clX6ghu6HqsOCrP5KNO0r9YpRjaMqfevkP5XY1AraRM NxQuRZjJbw5CvjK6wyBdk1n/cd3xgF5LvrkzhLQYmmMXtRnQecsx/HvlzzxEOIBk5yc16+ GLucLQX9Xm47WHxFzgAaKhAOsxcWWmIE3WSpnQp2KFv573pYYwqxrA/sbNKwBA== 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=1722883444; 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=jkKI2o8zgS74e4Taef8aSsNV+0cXO+8E1jrsyjZgN0E=; b=cxCM8tttFT8yd3iRE40Os36z0qTg0Og1rWZYSjzzft8OewIX127MEtxDG930399VXqBhe9 Gp3AsOTBnjarDhZVGz68Wm5SgzdIHe0dc7JF8EG+eaFU67hQCYB/7o7m5kSHtV05ng2Bk7 teakhgmhyEmcNpA0MiScLgfCAYOcl7jSzfQ1kJ7DMyYIXn1tI62KgFcGlN/vfW35NBVl9n CxXNhYu6hCkUNSg6O/HffvuH87Ox3cuCVrJDGvmD1gt7RTLnnWbxGAocuVzJGY9Zp/97n2 nodukSpzXck8ITwmpq1DCN9ZzBCQd2XwPIE9LCi5VZlK6HSh+9V9909SVpp5MQ== 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 4Wd51v6VdNzbHK; Mon, 5 Aug 2024 18:44:03 +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 475Ii34c053456; Mon, 5 Aug 2024 18:44:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 475Ii3SS053453; Mon, 5 Aug 2024 18:44:03 GMT (envelope-from git) Date: Mon, 5 Aug 2024 18:44:03 GMT Message-Id: <202408051844.475Ii3SS053453@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 6cb8b61efe88 - main - calendar: don't setlogin(2) in the -a user handlers 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: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6cb8b61efe8899ee9194563108d0ae90c1eb89e3 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6cb8b61efe8899ee9194563108d0ae90c1eb89e3 commit 6cb8b61efe8899ee9194563108d0ae90c1eb89e3 Author: Kyle Evans AuthorDate: 2024-08-05 18:43:56 +0000 Commit: Kyle Evans CommitDate: 2024-08-05 18:43:56 +0000 calendar: don't setlogin(2) in the -a user handlers As of e67975d331 ("Fix 'calendar -a' in several ways."), `calendar -a` will now fork off a new process for each user and do all of its own processing in the user's own context. As a side-effect, calendar(1) started calling setlogin(2) in each of the forked processes and inadvertently hijacked the login name for the session it was running under, which was typically not a fresh session but rather that of whatever cron/periodic run spawned it. Thus, daily and security e-mails started coming from completely arbitrary user. We could create a new session, but it appears that nothing calendar(1) does really needs the login name to be clobbered; opt to just avoid the setlogin(2) call entirely rather than incur the overhead of a new session for each process. PR: 280418 Reviewed by: des, olce Fixes: e67975d331 ("Fix 'calendar -a' in several ways.") Differential Revision: https://reviews.freebsd.org/D46095 --- usr.bin/calendar/calendar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/calendar/calendar.c b/usr.bin/calendar/calendar.c index 7610ad034759..ebc8d7f5c35e 100644 --- a/usr.bin/calendar/calendar.c +++ b/usr.bin/calendar/calendar.c @@ -211,7 +211,7 @@ main(int argc, char *argv[]) lc = login_getpwclass(pw); if (setusercontext(lc, pw, pw->pw_uid, - LOGIN_SETALL) != 0) + LOGIN_SETALL & ~LOGIN_SETLOGIN) != 0) errx(1, "setusercontext"); setenv("HOME", pw->pw_dir, 1); cal(); From nobody Mon Aug 5 19:13:23 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 4Wd5gm1fS5z5SXpT; Mon, 05 Aug 2024 19:13:24 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wd5gm0dmgz4yM8; Mon, 5 Aug 2024 19:13:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722885204; 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=harMMnHJCDqZ+YRrN+bGWfXq62ZnNrKV4+MjyxV5JO0=; b=NtHi1zc74Nmjp8sbB8O9RgAioVImtOqq0h7Uy6Jw25zToJqKRu2b8gMLkfkGwcmsAECT4l sBEj8vS/1wyuadaL4CMx9LBG/3TYjiJG+jmDGZreMNawMPm89DyGqmsb6Sdpw4BvxL9XNT Xui9KZj6hmWvEDRGjCslYaGyvuLw+Tlj8ec6HbIC4qEw5wwk6n5pnFjKnKNeBVxdA5JGdd RU27lKnaCohKYk3v0Ffm6ie1f6EXoozLTUE9gs8F08zG6O5wJ5VZwQMGALDbOZJl092mF+ oVRy8/qhYp3eI7IknwKQP/2GRb7BhMZjSRCr2TUQOhG/FO3rjDk5dFGUOXSC7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722885204; a=rsa-sha256; cv=none; b=jvlrWCCmMmoGRpBZscWuAvh77B5UIPz9aErszLOfsIu/Zy0TeY6NG/NoA5cr81WjcTEUuh OBdr5dmYOj+BBxNB9ZvZV3mKSn08tvHOV3yghqGNeBKL/NeHylOTSsy7JWn1EdsXydcOfJ HYQLwjD8Ol6whQlBkOhHbzWMu3zCCjlSfq/NkW7/d6pTMeAdmiZknljzdh591YjGqRN+Dv w8Hg6vtqY+x1yHDCPRXwCsmke1NkNDW1ct3hR9001+PWF7BOssl4ecIR8JrmdiFYTBUXgI COutMOfivGFumoN4Bt5/+7R60g2r9kdpK+rKdchOzuoWi4G5A/RgcWnOVjF/nA== 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=1722885204; 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=harMMnHJCDqZ+YRrN+bGWfXq62ZnNrKV4+MjyxV5JO0=; b=IvEZhaIUtkvn0rzFPOZaTIe3DaigX3oVgUzf2HBeaJO3NZoy+5pIFIQSLnDzCGbapopfYM huGauOxNvsGB8bokIO0Jt4yjXXVIfD3puUu53qKF/u22gtJSLU7Ptrhppij0celPcsK+my B08CKFevlQWfOxGpAnRS9jmvCKFT5HOXQacylk28ppfil+nIvNe+W7ykwSvZVJ3d2Bjjt1 CGK7APgERfNFvVW6WvNqOp5JSVQV5RlTQnNEP+nul4JP4EsjaL/KJtBCmEApL2/bArTw3c xPWEwke9TG2hT5WNfXLjCVwzVtNGP0o0dfnhYWors4QYGbHj1D64aefek4B22A== 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 4Wd5gm08VnzbLk; Mon, 5 Aug 2024 19:13:24 +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 475JDNmb004671; Mon, 5 Aug 2024 19:13:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 475JDNOU004668; Mon, 5 Aug 2024 19:13:23 GMT (envelope-from git) Date: Mon, 5 Aug 2024 19:13:23 GMT Message-Id: <202408051913.475JDNOU004668@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 792226e53023 - main - qlnxe: Allow MAC address override 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: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 792226e53023cb09566cb78b2135b052e9b62e0e Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=792226e53023cb09566cb78b2135b052e9b62e0e commit 792226e53023cb09566cb78b2135b052e9b62e0e Author: Keith Reynolds AuthorDate: 2024-08-05 19:10:18 +0000 Commit: Kevin Bowling CommitDate: 2024-08-05 19:10:18 +0000 qlnxe: Allow MAC address override The qlnxe driver always sets the NIC's rx mac address to the card's default MAC, ignoring any MAC address set via ifconfig. PR: 278085 MFC after: 1 week --- sys/dev/qlnx/qlnxe/qlnx_os.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 6665894d058d..49d3f20aa0c2 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -7055,8 +7055,17 @@ qlnx_set_rx_mode(qlnx_host_t *ha) { int rc = 0; uint8_t filter; + const struct ifnet *ifp = ha->ifp; + struct sockaddr_dl *sdl; - rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, ha->primary_mac); + if (ifp->if_type == IFT_ETHER && ifp->if_addr != NULL && + ifp->if_addr->ifa_addr != NULL) { + sdl = (struct sockaddr_dl *) ifp->if_addr->ifa_addr; + + rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, LLADDR(sdl)); + } else { + rc = qlnx_set_ucast_rx_mac(ha, ECORE_FILTER_REPLACE, ha->primary_mac); + } if (rc) return rc; From nobody Mon Aug 5 19:19:52 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 4Wd5qD5mH0z5SYLc; Mon, 05 Aug 2024 19:19:52 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wd5qD3YfPz52QD; Mon, 5 Aug 2024 19:19:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722885592; 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=3cGGpjhrCffLQ1TuUYYL2Oq+CUgPR5v90J7fLrCdJfI=; b=vQMFSQUGwxYAz0zUlE7qTe/EdkFJgWq8D/CqiA05TsNi3TgakHvGMPKjRKqmvwRBg43oih D+w2pOM7ur4V/PLIojCt0e2Afygv8dZTeNWZ18VuFQ4/aekjxUAbGtAmFzEQQ/K0jHapmc mMoj6JgALkkCVqeNEwFoudBGDrAx44UqcD97DUa1hGEVSAg84NvITL8DyJyfKpn1TCIX1/ CP/5re1gYHv/w+aigdIwMAPDASYmGFUpZZIPdf7jH6TbHvlu/j/3SEQNp5XOpOj+uoNW/Q VcSe0uL85CxmaHEkGxucuffnV82iRP9AfpPNYiFBEhsyZihXGey5C+6Qqzlujw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722885592; a=rsa-sha256; cv=none; b=OCLtAak0GrxWJ9voAD0SdAlDziRkjEO+k4wpLnpe27SkLfcJIIbvjfXv8VtSapjJ5WYgpx OMkVx6DwJM3+Pq4okp+GdwPhegDbW6pg3gNVep0L+e1oe+DqE5gqclSm4qlq0E2ZTwNYO5 ywwgtbzcBtsCllnaPuobqOy3mjsm4YogCXH+9/mD6fHoSYaRokiCos0y3cua+1ktZY5zfT hxdn66eEiq2gi6KTmNxX5fiGlNIeYJABweEDLGdehhMwD68pdZgZ9knvy9QK0xQUsxzhJH a7mMJY2UHaF7Ad9zv5rcBK8SnJnO2sZajlzdeHr6TgVI3SNBjGsFHLLkgvOXsQ== 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=1722885592; 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=3cGGpjhrCffLQ1TuUYYL2Oq+CUgPR5v90J7fLrCdJfI=; b=JjS8rg4Ou6jqOFho8vth54fCr6bPbbd91X0g57gxOISNesv/7Pyt6kbSKtACm/tVbvsEal XeWjp/wZSxBXRR7eesPayyG/ahb78V8M1rSfqwaZw9fJLpB3SCtPU97fdAEnqkeA54+IFI 4mEFTsZoXjwxqh8zyF9Dyh6Quh0BHy4FHO1ebaLsgHTV0atUZ8jyGFPQ6rCdEMQFwoz50F /UTRpnk3uoXP+Y8VpBq6EWTql4wOwaBVmYoV9umH3k2MV6M1IQcu6GgKhKI79Xd+STBEnf oocB9A7p+JgjAAiW4zJ6r7Bi4eaxETzMkaGqoXtp+Pc6/hT5255gRKFMfEm0dA== 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 4Wd5qD2m90zbn7; Mon, 5 Aug 2024 19:19:52 +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 475JJqxR005703; Mon, 5 Aug 2024 19:19:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 475JJqGe005700; Mon, 5 Aug 2024 19:19:52 GMT (envelope-from git) Date: Mon, 5 Aug 2024 19:19:52 GMT Message-Id: <202408051919.475JJqGe005700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 9bc300465e48 - main - Merge commit cb7a03b41fff from llvm git (by Nikolas Klauser): 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9bc300465e48e19d794d88d0c158a2adb92c7197 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9bc300465e48e19d794d88d0c158a2adb92c7197 commit 9bc300465e48e19d794d88d0c158a2adb92c7197 Author: John Baldwin AuthorDate: 2024-08-05 19:19:30 +0000 Commit: John Baldwin CommitDate: 2024-08-05 19:19:30 +0000 Merge commit cb7a03b41fff from llvm git (by Nikolas Klauser): [libc++] Fix failures with GCC 14 (#92663) Fixes #91831 Reviewed by: dim Differential Revision: https://reviews.freebsd.org/D46003 --- contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h | 2 +- contrib/llvm-project/libcxx/include/__type_traits/remove_pointer.h | 5 +++++ contrib/llvm-project/libcxx/include/bitset | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h b/contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h index 198f0f5e6809..46ad388ec2ea 100644 --- a/contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h +++ b/contrib/llvm-project/libcxx/include/__string/constexpr_c_functions.h @@ -108,7 +108,7 @@ __constexpr_memcmp_equal(const _Tp* __lhs, const _Up* __rhs, __element_count __n } return true; } else { - return __builtin_memcmp(__lhs, __rhs, __count * sizeof(_Tp)) == 0; + return ::__builtin_memcmp(__lhs, __rhs, __count * sizeof(_Tp)) == 0; } } diff --git a/contrib/llvm-project/libcxx/include/__type_traits/remove_pointer.h b/contrib/llvm-project/libcxx/include/__type_traits/remove_pointer.h index 54390a1939f7..1048f67055a2 100644 --- a/contrib/llvm-project/libcxx/include/__type_traits/remove_pointer.h +++ b/contrib/llvm-project/libcxx/include/__type_traits/remove_pointer.h @@ -23,8 +23,13 @@ struct remove_pointer { using type _LIBCPP_NODEBUG = __remove_pointer(_Tp); }; +# ifdef _LIBCPP_COMPILER_GCC +template +using __remove_pointer_t = typename remove_pointer<_Tp>::type; +# else template using __remove_pointer_t = __remove_pointer(_Tp); +# endif #else // clang-format off template struct _LIBCPP_TEMPLATE_VIS remove_pointer {typedef _LIBCPP_NODEBUG _Tp type;}; diff --git a/contrib/llvm-project/libcxx/include/bitset b/contrib/llvm-project/libcxx/include/bitset index 308c58995dc3..5ea48d491303 100644 --- a/contrib/llvm-project/libcxx/include/bitset +++ b/contrib/llvm-project/libcxx/include/bitset @@ -376,8 +376,11 @@ template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX23 unsigned long long __bitset<_N_words, _Size>::to_ullong(true_type, true_type) const { unsigned long long __r = __first_[0]; + _LIBCPP_DIAGNOSTIC_PUSH + _LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wshift-count-overflow") for (size_t __i = 1; __i < sizeof(unsigned long long) / sizeof(__storage_type); ++__i) __r |= static_cast(__first_[__i]) << (sizeof(__storage_type) * CHAR_BIT); + _LIBCPP_DIAGNOSTIC_POP return __r; } From nobody Mon Aug 5 19:49:27 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 4Wd6TM3d0Bz5SbPK; Mon, 05 Aug 2024 19:49:27 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wd6TM34MJz56Ln; Mon, 5 Aug 2024 19:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722887367; 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=KYu9WH2qfs6Ue8t9PxywSlZLb+d+oYZ70ktawPV58Lg=; b=FGvTxej5R+aNnxX3QGceaD/YmgOkFOLvJGgpyaHniUxLm9z5GDzprEFRlZ1d26TPz66d8f XCX1Sn/wsL6uFvWgEHFEPoHlAZ7N72sAWPGa26JSIMB2rgQUPmKa27bmlogEH9G8flFh1A p7JmyaCA0GnD2JOyoA/yRcldnc0q/qCcxB8W/SfMnyTmN4UBDE6eADDNbRfNivLru6m3pH 2CZMt7zZP2NshT4ggi3zLqrf80q52jQqF0up9ChmB4NEuw35tpu5ZQ4XDOMcyeykbgTGT7 yRcM4XhcNCrPpe9ZXHixzwqYlxJxMnB8AzipqDMWemXmJFMMonVvyQkqmGK+EQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722887367; a=rsa-sha256; cv=none; b=nsiUjHInevMefaOgp6F+8OB7WpBN7qhzMCKArtvsIJAMgOOY6EpmbTdZ4fscCdVV5dVxGu sg2kVYvV0wxvxpzXXAAw8PEK9i8IkcTKfiVg91HWcLuoKh6T1ql+0oRh057E+g7iWEYDnZ H13qeIiXZg2AUdSBceY1F/YIgjxH1DhL2WWp7tglnrTyv4ZZwiQeFNSTqPIdPYCvV4J9jz vUZ00MXbMY71JeSOnJLpPT24dog4ANDIYw9fUCfOL8hQxrFxD+EPRUwuBb59krvLk/kLqF j42dhEZ2VipDFg2eIreZvtfMMYba5NkI/PRUMWVafn8VoyupzIGXtkPOWYObWA== 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=1722887367; 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=KYu9WH2qfs6Ue8t9PxywSlZLb+d+oYZ70ktawPV58Lg=; b=FQSgYywv/pM5/QUXiWVT39lRcJN7S4O0R8HbVt89nSWHogCVZiOokxIWqliiUkScobwLEE 8s0FEQKcoveqUpuxUy86KxgElit1cx6NAvwTAk1kYLmC1yxC92VT4XBarjTl0dvtdD8DOd Ukq/KOl911622XADdcq8mXzWgvZdiYM7HvZET2avZo7i4mfVZirwTvSymqUZVpBBwD3och LoQu47vfVZFventZwAVgD48bGl3bResb4Nom0RvoxZjmxU4hUu68ReuoElMPqCuhP+UdaZ D9LJKR0bO5afGk1P0gMQ0GkajsKb8uXqokz9mLAKgOHzfYO0ibnNGUv/qUwDxA== 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 4Wd6TM2dj8zcNc; Mon, 5 Aug 2024 19:49:27 +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 475JnRsx055963; Mon, 5 Aug 2024 19:49:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 475JnRAM055960; Mon, 5 Aug 2024 19:49:27 GMT (envelope-from git) Date: Mon, 5 Aug 2024 19:49:27 GMT Message-Id: <202408051949.475JnRAM055960@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 3a4b04e82df6 - main - depend-cleanup.sh: Simplify handling for stale syscall.S 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a4b04e82df6bb9b28aa0c3c670c19063843d644 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3a4b04e82df6bb9b28aa0c3c670c19063843d644 commit 3a4b04e82df6bb9b28aa0c3c670c19063843d644 Author: John Baldwin AuthorDate: 2024-08-05 19:49:06 +0000 Commit: John Baldwin CommitDate: 2024-08-05 19:49:06 +0000 depend-cleanup.sh: Simplify handling for stale syscall.S Remove the outer grep and depend on the greps in clean_dep instead. Reviewed by: brooks, imp Obtained from: CheriBSD Sponsored by: AFRL, DARPA Differential Revision: https://reviews.freebsd.org/D46103 --- tools/build/depend-cleanup.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index b93d50a57ff4..b7231422c5ed 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -171,9 +171,7 @@ clean_dep lib/libc statfs c # 20240308 e6ffc7669a56 Remove pointless MD syscall(2) # 20240308 0ee0ae237324 Remove pointless MD syscall(2) # 20240308 7b3836c28188 Remove pointless MD syscall(2) -if [ ${MACHINE} != i386 -a -f "$OBJTOP"/lib/libsys/.depend.syscall.o ] && \ - grep -q -e 'libsys/[^ /]*/syscall.S' "$OBJTOP"/lib/libsys/.depend.syscall.*; then - echo "Removing stale /syscall.S depends" +if [ ${MACHINE} != i386 ]; then clean_dep lib/libsys syscall S clean_dep lib/libc syscall S fi From nobody Tue Aug 6 01:23:58 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 4WdFvL2R3Hz5SLZk; Tue, 06 Aug 2024 01:23:58 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdFvL1q1jz4Src; Tue, 6 Aug 2024 01:23:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722907438; 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=48XauAdPE5Vwod+6akqJYB0XqkPYRaYKvX188yO1UnE=; b=cP4gX7lSMctzOmw0b6MA19g75RRlGXOrIWvGJ/qLNNqijVs2CJSjryvQbQnPYENvnP1r2k g4E+hLmD/3P6w14um75dcs6W/8xyWiSoVSGCGZWuNaoKH9tQtvumkPdM1Uz+cDQKgvCUe9 0cl0outIAu6ONLlHBu0eIZ0+xLuuI9pdizTmC9MNy9Y3wOpJc0LH1QKgSjrwbwOkrATvCT XI+zaMtlN3sPasQvJV9j3fxuOKe4aUCwuOuOdtbB7FYz5z/Tk2wx7/nO23Qi1S3Soavub4 tlkln1BZdIHRu13U5O1BqtGaaWh7xcP9ewAqvzb/R9wbzP0LZajPewbZXkp0cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722907438; a=rsa-sha256; cv=none; b=M4JFBPDfMgq5dwDqw1vw+Cfb3Mkb2C+8O40ZOIYJeDGwZChsZkNEw/iORcFYMTmTW0Cnzh 3AgAuLhu6yH9mIM4hIgqP1Hag8rdWdghcUyKujoBBf8UU3SsEq+02tCxwtVFUhrRkuwoSm AzJoe4Juln3Lkm04h8rhQhg0UFKuyas76MFtOsDcXC1csY/WfUm7TBkzNB1A4a8QmHak0a Dt/beJBDAVJC4UfrVILCOfgXexL9GMor1f9rYCMl6rc+8QFEKtl5OZNQA3Rmd0Tgk8S3u8 jNY62bTbXkKuKnB3Pb1YWk78XucrGUvr6tmBmaLFO+0Y2LXtTVUuiQBY5K6UoQ== 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=1722907438; 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=48XauAdPE5Vwod+6akqJYB0XqkPYRaYKvX188yO1UnE=; b=iFrQaN6jPIBZVZaFOIvSU+QdjJ0jE9jbJl4kqTNbNRmfQROVvsMwWSiai7Aoz5lwv1q8qn YIps1OpDtkL5jVUi1uGKQvM286IVnX6q7KZNxMMljXBW/9nG1xr77sMjKEZ7dQhXZC/X7i 20OQtZ7Yir6Ed74piRsbNeMQhWDOBnQexgWU6bH7EwDh7E49AOFgG4vjsMsyVc86JJLdCG Mp9Su0EcLwY9gfttub+Z6wE7WO6a3j5BNAdiS5ijuOXx5mvaHD9JUBQYNUA/KSynD9u4CB dMcTdt9TNTK/PL5HAKsPfyWFvr02ckbtbmSmxKWXNcKT/dWW/D5Bv1lAsbH2BA== 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 4WdFvL0nK4zmT6; Tue, 6 Aug 2024 01:23:58 +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 4761Nw8e030694; Tue, 6 Aug 2024 01:23:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4761Nw0L030691; Tue, 6 Aug 2024 01:23:58 GMT (envelope-from git) Date: Tue, 6 Aug 2024 01:23:58 GMT Message-Id: <202408060123.4761Nw0L030691@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Sergey A. Osokin" Subject: git: d5eb39c8b732 - stable/14 - bsd-family-tree: add FreeBSD 14.1 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: osa X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d5eb39c8b732b2a9f2dbd84ecc9c2a1ab90bc992 Auto-Submitted: auto-generated The branch stable/14 has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=d5eb39c8b732b2a9f2dbd84ecc9c2a1ab90bc992 commit d5eb39c8b732b2a9f2dbd84ecc9c2a1ab90bc992 Author: Sergey A. Osokin AuthorDate: 2024-08-03 15:48:55 +0000 Commit: Sergey A. Osokin CommitDate: 2024-08-06 01:23:43 +0000 bsd-family-tree: add FreeBSD 14.1 MFC after: 3 days (cherry picked from commit 2b4aa2816cd2988d0e20cee9035d8ab9712d6708) --- share/misc/bsd-family-tree | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index ed18b96cb39a..a664be3161a5 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -453,13 +453,15 @@ FreeBSD 5.2 | | | | | | | | OpenBSD 7.4 | *--FreeBSD | | | | | | 14.0 | | | | | - | | | | | | - | FreeBSD | | | | - | 13.3 | | | | - | | *--NetBSD | | - | | | 10.0 | | - | | | | | - | | | OpenBSD 7.5 | + | | | | | | | + | | FreeBSD | | | | + | | 13.3 | | | | + | | | *--NetBSD | | + | | | | 10.0 | | + | | | | | | + | | | | OpenBSD 7.5 | + | FreeBSD | | | | + | 14.1 | | | | | | | | | FreeBSD 15 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -893,6 +895,7 @@ FreeBSD 14.0 2023-11-20 [FBD] FreeBSD 13.3 2024-03-05 [FBD] NetBSD 10.0 2024-03-28 [NBD] OpenBSD 7.5 2024-04-05 [OBD] +FreeBSD 14.1 2024-06-04 [FBD] Bibliography ------------------------ From nobody Tue Aug 6 01:48:45 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 4WdGRy0Bb5z5SP20; Tue, 06 Aug 2024 01:48:46 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdGRx6kS1z4Vd1; Tue, 6 Aug 2024 01:48:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722908925; 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=3l67NLiy0rf8BV054APViw4/kD7JsJw/SdNkSVc1ph0=; b=Ild2nqS+9K2d49CmzDHu7WzN3pnXPtKTbuHop8zNE0DeheCRfa1llMGUD4W5EnG7GkF9Uy xW3mhrMGGZoCju9ZppBg+GmjmzXuawtciPLYcJJksf618rAJU8/EM8ztAmu0wrUvuqHHYL xImfax86loXu1VInALJLbQJMdCKOcbM9/d5iEPCZlGkKEAT54HdOJgpAsPDwNaZC+OMdaJ g3JJXDpB3fsmjmBF9zWqjQQ16LvourDzYjL6W5jb6iuLssj6+MYXPnpDOLnh6IhdCeWwDg oiNS7wEAs9gCvEkcLzPrNGZ11WeQfPc0WebumaLI3q06I85wfnPgmGCszJAgbQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722908925; a=rsa-sha256; cv=none; b=KtZXV6nQerP1AAHMGE1ur96GBrNJgiNjsr9axtoAfgUcQ7cRau8v1dacMs3oyh3Zm7zrs3 xWFap8HGo7vElioctIbSSa9qRMNwf/SDy5wJ3Cdp4GMRzLWJkmN8mnLoEkNrXKGjoF/T4r iX5WNMhUioCJIgDGvurSnuQf5d8Hsf1fh32dS80uIKd/Ke2sddx8yYenlntcHpuWkti4a8 RglIHZxhkqGje606uqKbo9b0xWB5wqycmYasHawvARCY6KwkS8qYmMcZS4duMmDEF3G3UQ iLH4v2VEhQ6QaC0BW4Dc/x/R+3V8tOUnTblYf6VOK7I+XxWzTjiG4gAVndWXqg== 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=1722908925; 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=3l67NLiy0rf8BV054APViw4/kD7JsJw/SdNkSVc1ph0=; b=sqDiHE6wO01bDhOfnGguDkd0AQ0+XKGxqK8pB8LRG1I3XY3niagffnYWY0AsvNaUlshfZv gXnqAsjdGNPWrl57OqEXCzbfkp7mFgEUq9KRrKc8pn/YvBVnH92sEHMku9y8hdcMf9KM6w cDW29hpCDcaoCWUZvR/HXf4Vf7XeGmIQNX1Q/ebJmqaLLx9zydR9KDyaFIFM0l4PM99/Ac x8fzZ2UyXs5qYBhvFbjyBzdXA3b8ZEWu3dyVy6xmImwIxeTW62zMTIWvcYmFnYiby/BfG7 ftqHmWvSYHnwW3nJB90xDtNuEiQvFAWIgdoLh9oYC2V2liXm2Vh/lsqnuz0PgQ== 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 4WdGRx6LXTzmvw; Tue, 6 Aug 2024 01:48:45 +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 4761mjqk064440; Tue, 6 Aug 2024 01:48:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4761mjcJ064437; Tue, 6 Aug 2024 01:48:45 GMT (envelope-from git) Date: Tue, 6 Aug 2024 01:48:45 GMT Message-Id: <202408060148.4761mjcJ064437@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Sergey A. Osokin" Subject: git: 7424d5cbf6f1 - stable/13 - bsd-family-tree: QCU: ISBN and EAN numbers 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: osa X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7424d5cbf6f1032f91a3c107e7cd4f89b3095f69 Auto-Submitted: auto-generated The branch stable/13 has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=7424d5cbf6f1032f91a3c107e7cd4f89b3095f69 commit 7424d5cbf6f1032f91a3c107e7cd4f89b3095f69 Author: Graham Perrin AuthorDate: 2023-12-27 23:36:25 +0000 Commit: Sergey A. Osokin CommitDate: 2024-08-06 01:29:37 +0000 bsd-family-tree: QCU: ISBN and EAN numbers ISBN 0201547775 and International Article Number (EAN) 9780201547771 for 'A Quarter Century of UNIX' by Peter H. Salus. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/812 (cherry picked from commit 3dfb39ef1d66e8370c302b158173ed8065887c2a) --- share/misc/bsd-family-tree | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index d81c8829f4e8..46f271342346 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -479,7 +479,8 @@ was the announcement in Usenet or if it was available as tape. Distribution UNIX Version 2.9, July, 1983. [NBD] NetBSD Project, The. [OBD] OpenBSD Project, The. -[QCU] Salus, Peter H. A quarter century of UNIX. +[QCU] Salus, Peter H. A quarter century of UNIX. ISBN 0201547775, + EAN 9780201547771 [SMS] Steven M. Schultz. 2.11BSD, UNIX for the PDP-11. [TUHS] The Unix Historical Society. https://minnie.tuhs.org/Unix_History/. [USE] Usenet announcement. From nobody Tue Aug 6 01:48:46 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 4WdGRz14vkz5SNj7; Tue, 06 Aug 2024 01:48:47 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdGRz0P5Qz4Vt4; Tue, 6 Aug 2024 01:48:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722908927; 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=e+V1pKZgSczOMqUuiTJQH0FU95f4q1l5VqGsbULYIss=; b=QHsms0NEnfgGIKI0hiSAn9yOsxAYCo6nzmu2WKxL/L5OrUd8a0+2NeUVsdPfAET3aqoQfV Q5qMxfHCZQGeG1awWZU91BpM8j4jSOm2d49TmglIzLMhWqcUfvT6qLDPWyYiwY+Mk88MJY QD8UHyp1KN0ta0fUKz8iHKu05SGMNYlXljF54DYpr/6OEi0HvR5y91t6pGKbJkYzicOODC XLfvCu+IOqEaOL02b6IpFSk5DgFl9xn/5/AeL/SUprLshGq3CmaxtqFQMIftR6HWp6Xq78 MTFog8hVNdaU61/K6F7IWLRDAmgwx0TIAn1bhdXQP5jVxlNztRq7fysUY343Jw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722908927; a=rsa-sha256; cv=none; b=AnOMchcplgW7xkQ6ctyebes/vFwPUZOShaj5c3uQBe+hBtbr7MKMrxlAospeDeo9CbOVxs tKDC6ZuFN8m44PyAx+3KZLp7mewdLOt5qUvTfc093/Xvxsi9Gr/+uFHTkAM4W8V7TQqq+b aTymxdFieTMNJb9nBtlda/ynLIQFMAvt2X7fOdzNy0boql/aXbV/lIrgApkBFxlU1GPNBJ UZa9tkhNCddjCWAXJZWqgwbdRz6dcbAAzALhXifa5yNR/Yfy2TkwrNUtud1kdxvNd+WqH9 aBCOFlviXWpPCkLRwqxmSfCv8YXjykrZi1RJtmymhphjhqz3tVBPWpCfa0kxOg== 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=1722908927; 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=e+V1pKZgSczOMqUuiTJQH0FU95f4q1l5VqGsbULYIss=; b=Sl+LokGeRsypYp4NvPlLpY3nlGViTM/HtquXBccQtkNV9/NwBzKjhrWv7spm7FFal9WXpU 9pc+21rTvvNHbIjeoXTt62CI42u7p+2fg0pkq7PN4PO5dZPZaz/oX5JJUzfCYa9PVloMtJ NpzGq5QOMbHf7J3cRTPFBjk5JF9xDd+BDEwM2wlnNFlszqK7OFyHG17/A1k/m+LUWFCxAJ CxGBeOO46wltqKHi61EAWpWbC2dwYUvBzJ4vyQbhr+ijW4O8JYgHRR938d16Sv4daO2qPB bImLuGwZd3FklNOspMgumciaeupf4f4TKvC5TRO9rsrP8vikhii0ntmlQBUDtw== 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 4WdGRz00DtznLM; Tue, 6 Aug 2024 01:48:46 +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 4761mkDE064482; Tue, 6 Aug 2024 01:48:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4761mkws064479; Tue, 6 Aug 2024 01:48:46 GMT (envelope-from git) Date: Tue, 6 Aug 2024 01:48:46 GMT Message-Id: <202408060148.4761mkws064479@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Sergey A. Osokin" Subject: git: 2d31963f2a5a - stable/13 - bsd-family-tree: tidiness, width 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: osa X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2d31963f2a5a8ab111b1dfbc9c73c2e5967962e5 Auto-Submitted: auto-generated The branch stable/13 has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=2d31963f2a5a8ab111b1dfbc9c73c2e5967962e5 commit 2d31963f2a5a8ab111b1dfbc9c73c2e5967962e5 Author: Graham Perrin AuthorDate: 2023-12-27 23:36:26 +0000 Commit: Sergey A. Osokin CommitDate: 2024-08-06 01:45:56 +0000 bsd-family-tree: tidiness, width Tidy the raggedness in the section that begins [44B]. As the line that begins [KB] was previously tidied, now tidy the section to accommodate [BSDI] and [TUHS]. Rewrap the section to fit the same number of columns. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/812 (cherry picked from commit db348fdba461519d4ea7be45f96719b1bd76485d) --- share/misc/bsd-family-tree | 51 +++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index 46f271342346..82b245079486 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -459,33 +459,32 @@ FreeBSD 15 -current | NetBSD -current OpenBSD -current DragonFly -curren Time ---------------- -Time tolerance +/- 6 months, depending on which book/article you read; if it -was the announcement in Usenet or if it was available as tape. +Time tolerance +/- 6 months, depending on which book/article you read; if it was +the announcement in Usenet or if it was available as tape. -[44B] McKusick, Marshall Kirk, Keith Bostic, Michael J Karels, - and John Quarterman. The Design and Implementation of - the 4.4BSD Operating System. -[APL] Apple website [https://www.apple.com/macosx/] +[44B] McKusick, Marshall Kirk, Keith Bostic, Michael J Karels, and John + Quarterman. The Design and Implementation of the 4.4BSD Operating System. +[APL] Apple website [https://www.apple.com/macosx/] [BSDI] Berkeley Software Design, Inc. -[DFB] DragonFlyBSD Project, The. -[DOC] README, COPYRIGHT on tape. -[FBD] FreeBSD Project, The. -[KB] Keith Bostic. BSD2.10 available from Usenix. comp.unix.sources, - Volume 11, Info 4, April, 1987. -[KKK] Mike Karels, Kirk McKusick, and Keith Bostic. tahoe announcement. +[DFB] DragonFlyBSD Project, The. +[DOC] README, COPYRIGHT on tape. +[FBD] FreeBSD Project, The. +[KB] Keith Bostic. BSD2.10 available from Usenix. comp.unix.sources, Volume 11, + Info 4, April, 1987. +[KKK] Mike Karels, Kirk McKusick, and Keith Bostic. tahoe announcement. comp.bugs.4bsd.ucb-fixes, June 15, 1988. -[KSJ] Michael J. Karels, Carl F. Smith, and William F. Jolitz. - Changes in the Kernel in 2.9BSD. Second Berkeley Software - Distribution UNIX Version 2.9, July, 1983. -[NBD] NetBSD Project, The. -[OBD] OpenBSD Project, The. -[QCU] Salus, Peter H. A quarter century of UNIX. ISBN 0201547775, - EAN 9780201547771 -[SMS] Steven M. Schultz. 2.11BSD, UNIX for the PDP-11. -[TUHS] The Unix Historical Society. https://minnie.tuhs.org/Unix_History/. -[USE] Usenet announcement. -[WRS] Wind River Systems, Inc. -[dmr] Dennis Ritchie, via E-Mail +[KSJ] Michael J. Karels, Carl F. Smith, and William F. Jolitz. Changes in the + Kernel in 2.9BSD. Second Berkeley Software Distribution UNIX Version 2.9, + July, 1983. +[NBD] NetBSD Project, The. +[OBD] OpenBSD Project, The. +[QCU] Salus, Peter H. A quarter century of UNIX. ISBN 0201547775, EAN + 9780201547771 +[SMS] Steven M. Schultz. 2.11BSD, UNIX for the PDP-11. +[TUHS] The Unix Historical Society. https://minnie.tuhs.org/Unix_History/. +[USE] Usenet announcement. +[WRS] Wind River Systems, Inc. +[dmr] Dennis Ritchie, via E-Mail Multics 1965 UNIX Summer 1969 @@ -916,10 +915,10 @@ URL: https://web.archive.org/web/20081230094857/http://www.byte.com/art/9410/sec Andreas Klemm, Lars Köller. If you're going to San Francisco ... Die freien BSD-Varianten von Unix. c't April 1997, page 368ff. -BSD Release Announcements collection. +FreeBSD Release Information URL: https://www.FreeBSD.org/releases/ -BSD Hypertext Man Pages +Manual pages for FreeBSD and ports URL: https://www.FreeBSD.org/cgi/man.cgi UNIX history graphing project From nobody Tue Aug 6 01:48:48 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 4WdGS03KHYz5SP3y; Tue, 06 Aug 2024 01:48:48 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdGS01YNjz4VtB; Tue, 6 Aug 2024 01:48:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722908928; 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=bmFPnu5EcuBv6n6iHvOw7jA9sJaULMa3430B3Wj8zlU=; b=pZ3v+hfRca7WjpDuhT4dZdbDkEFIuSV6VQevTfjh1kctkNXEemW+f1oEMUT1RdBpdisyVv 7m8Eza9A2Y8OcAcDeDTQxJ28E1CwFWvO5FrtjBrQ2Kr8bgg2K5HBqw/EAsANR9Nn5UTb9a dmGGkLGu2YMqDXZEkNAwWFhzLh0Pabzx6SKVAsuuGcTNOcg71alI5MnMJUvhgUzLxJDRku hAUqXL7PC9EhMqOzYE8vauuSBKoarOxBPoGqCnP0CMkRAgLljeoQRRMj4UavBTDOkOQ3Mc G8I+8pPpaTTbgL+QInqBYaEDxasmKH2veAcexIbSCr1iV3NDBcTqDgHbKTBIhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722908928; a=rsa-sha256; cv=none; b=AX6xG8lV6yrw4haTNjSFY5Jc7kDvbljvY+EV6bM99GAKivPVecYpXVq89naWPM/4PzAdSl HFVvrwZkXQck6k3o4cq7rvGekwXlJgK9wwLU/R9fpOzINf2i1l1/UB1TPBaXz0pAEo/KpO P8+xWj712TgBQ8/kqzEA2CX5yvZxQn4AmYI1ztoIjcoCiwqXg6KkJhxYV/Y3U/xOL0Qsvs jS0U5d2ybE6LRdDHVWmIbOrIWVrosWkd34Jpk7aMp7LKynKpc2nYemSZW2ExLgV675fMS1 30Qewvx/jLzciaTNcCdXeKMgc0d3H2CBIm6LldO1PDr92j8s3m2U+dttUyKAmA== 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=1722908928; 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=bmFPnu5EcuBv6n6iHvOw7jA9sJaULMa3430B3Wj8zlU=; b=uklqTAOSCnp2ajaXwwW+Qq9fBsI6NXoIlohnEpTuO8L23QUQF1JumcVO2SOfZ06rFaVskY SkTNHfn/YKL8eM/UeMJPBNywkWO6/rXI2LdieVYrARI5bux3UB7qkhsHD5pNENx60mIZwK fynD99znQ78qhbTy68esxc+sAIThlI6L7VrW6fzjakd3UWtScjZ6W+PnRu4An59MPwuRZS sh/DwEoLmvKtdCsbtgPKTLduv6KRlWIraf8ZNBVB0JbrVXUu2SSkRjbhzAZAJn2V7wfeDc fZUIpaa0mQYpPNlVKpfjPAlx2m9zaRdgwtU7KaYcxYGWIxKek1SxxFzhlCG61A== 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 4WdGS00y3fzn6Y; Tue, 6 Aug 2024 01:48:48 +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 4761mmPS064533; Tue, 6 Aug 2024 01:48:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4761mmZQ064530; Tue, 6 Aug 2024 01:48:48 GMT (envelope-from git) Date: Tue, 6 Aug 2024 01:48:48 GMT Message-Id: <202408060148.4761mmZQ064530@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Sergey A. Osokin" Subject: git: ce50faabafef - stable/13 - bsd-family-tree: add FreeBSD 13.3 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: osa X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ce50faabafef5dc0b9483b3e986cdd962edd9fe0 Auto-Submitted: auto-generated The branch stable/13 has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=ce50faabafef5dc0b9483b3e986cdd962edd9fe0 commit ce50faabafef5dc0b9483b3e986cdd962edd9fe0 Author: Sergey A. Osokin AuthorDate: 2024-03-05 13:38:09 +0000 Commit: Sergey A. Osokin CommitDate: 2024-08-06 01:46:53 +0000 bsd-family-tree: add FreeBSD 13.3 MFC after: 3 days (cherry picked from commit 885590b4f1ad218995df0fc127601e0f59bcc57f) --- share/misc/bsd-family-tree | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index 82b245079486..f72b0befbb1a 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -446,11 +446,16 @@ FreeBSD 5.2 | | | | | | | | OpenBSD 7.3 | | FreeBSD | | | | | 13.2 | | | | - | macOS | | | - | 14 | | | - | | | OpenBSD 7.4 | - *--FreeBSD | | | | - | 14.0 | | | | + | | | | | | + | `------. | | | | + | | macOS | | | + | | 14 | | | + | | | | OpenBSD 7.4 | + *--FreeBSD | | | | | + | 14.0 | | | | | + | | | | | | + | FreeBSD | | | | + | 13.3 | | | | | | | | | FreeBSD 15 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -880,6 +885,7 @@ FreeBSD 13.2 2023-04-11 [FBD] macOS 14 2023-09-26 [APL] OpenBSD 7.4 2023-10-16 [OBD] FreeBSD 14.0 2023-11-20 [FBD] +FreeBSD 13.3 2024-03-05 [FBD] Bibliography ------------------------ From nobody Tue Aug 6 01:48:50 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 4WdGS25qs9z5SP6g; Tue, 06 Aug 2024 01:48:50 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdGS23LF2z4W2m; Tue, 6 Aug 2024 01:48:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722908930; 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=5aHAj2QhWctxIsNdqyWSJDmlYAr/zzjG8XZS6XVJW8g=; b=pEml/05QPkmDIyLoRSzC8sWTQGhzkjY0sEh8LqGZGOnq6D2Syt6UgpTaBJXTdo3Vji+hbr wF4ZlCReGuA7FKjcJTwQnyE9WEcrIzchmX3KH+wz4NSLSWMG6IyBO25DRT1BYluxOX+7Lx m0hw55paC8GZS2Xgb6q2X8AeG3hXwpZOCPKd311vFVZx+4JrcY7jFFm70aKprFDGT/UJOd 60eXTUIXHfZcep9qEIim1cLkfKq7IoCwwtDOhDeCb4luxeBtPxWjuh84cHoZziEyQBnPSx wy3v4D3HVxk3zsXQRQpZEuZqbl6oOSSDKZIWJz6YMOY5Hr/LEKTpP1GqyHjvOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722908930; a=rsa-sha256; cv=none; b=ZQPyO9BS14ynyn5Od722duas6VLABrlo8dOJONbmw0ZrIdcbhWB3YQycxVgLJpR1Mb4fcw JsoPqV7TQQpv0oUhiuQhV4U2DzXFAfoKuSzHyc3qFSo+Ini+lCXJrQPr0vc3rGbSMfHcld Ol4O7ZQBu1SQfSWODAOm8wPl2VZvD8VZ1bC0PDwCJYQ8Nxbm7CQd7C1iefZDy3QSGZyeK3 8l06rfeXsQUNpMKn7UQl7K0GOWF1+y88FtsDBUs/pWkBvXgdc6Lpi2VDQcDE9I81o6bjbP V+8pwhO2wpTU2gInhcg8vSWwGXqb+Dz6lKa573s68b2DSO4q2Shoq4VgQj/vIg== 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=1722908930; 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=5aHAj2QhWctxIsNdqyWSJDmlYAr/zzjG8XZS6XVJW8g=; b=IFIVmPZuKjPOy96VbHIPeK+EAoxbOm2ckfpgCGEO41RHrv/jtrJPR3BSif979ZfXnCoT+Z KeXDS8OE0k3svOj0b/bdkA3hYZLp77gaPAGVfSMOj4PaUjsDFq/MbazXMy9aHSH8D0aQ50 UsuZLQhyFWAiz4wiQCcZm/qtnn0N6I/DHDtbsMLyMWWhLKSmYL0EgNOV1lDGSZ/jD6V3F3 8fzkHMqQoj72gjNbvRrUvmOdnwef1Pd08QrB50dCRRikHyaRgvp2rXhcY31bIWPEFTtvJZ wwdBeQZBusglI9uy9pzBnLqAUjolpdNGaUKvjQQ/4dv4PqW+jWOOIjQAhWQt+A== 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 4WdGS22xsjzn6Z; Tue, 6 Aug 2024 01:48:50 +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 4761mopj064622; Tue, 6 Aug 2024 01:48:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4761moOG064619; Tue, 6 Aug 2024 01:48:50 GMT (envelope-from git) Date: Tue, 6 Aug 2024 01:48:50 GMT Message-Id: <202408060148.4761moOG064619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Sergey A. Osokin" Subject: git: dcfa8b67184f - stable/13 - bsd-family-tree: remove EoL whitespace 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: osa X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dcfa8b67184ff54759aa15822f5bf4e2a9d94d87 Auto-Submitted: auto-generated The branch stable/13 has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=dcfa8b67184ff54759aa15822f5bf4e2a9d94d87 commit dcfa8b67184ff54759aa15822f5bf4e2a9d94d87 Author: Maxim Konovalov AuthorDate: 2024-03-31 18:36:03 +0000 Commit: Sergey A. Osokin CommitDate: 2024-08-06 01:47:36 +0000 bsd-family-tree: remove EoL whitespace (cherry picked from commit ad5ec5136ba3aa7d2863db23dc97fd875213f7ad) --- share/misc/bsd-family-tree | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index 2cb894059acd..0f99d6d946cc 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -924,7 +924,7 @@ URL: https://web.archive.org/web/20081230094857/http://www.byte.com/art/9410/sec Andreas Klemm, Lars Köller. If you're going to San Francisco ... Die freien BSD-Varianten von Unix. c't April 1997, page 368ff. -FreeBSD Release Information +FreeBSD Release Information URL: https://www.FreeBSD.org/releases/ Manual pages for FreeBSD and ports From nobody Tue Aug 6 01:48:49 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 4WdGS14158z5SNj8; Tue, 06 Aug 2024 01:48:49 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdGS12Qn1z4Vm9; Tue, 6 Aug 2024 01:48:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722908929; 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=A0i1C7f274hKrFxK106AogkyjQkBaLRw0myXaJ9LTbc=; b=X9FriRrmdEsHsC9KqjRwOky+eAlUBQSvSF3CAjat0vrL31NecYIDeD75bDP9g89rpSV2lu UT7ZY4nGlUH6InUnX2eGKHuuAIacPTPEIyGSFvxr5V2ZFvjbGrT3Q/dXjuqPRMb0/eENS8 wE6Tet7Rk87RX7w2mZQj3UHRj1yg/Je5PCG8A+UnSTGv14uMm7+v+AnTACunYSG68uwF5v zbAjf/5T46yfZhcHSFs8GVbhQcTB1OxZ6fD8FWNp9vzEA9vA66EGm7/q/BTmpCG56UddTp gXvaxdqRuZeoSiG9PtSKZcZuMDdQvQ3An4/gRf7lwLWgC1q8h1mN5e5sP0NqNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722908929; a=rsa-sha256; cv=none; b=udVO1pMGm1uE4T4g+49Xg6pfq4gN+r3SfsiFQhCm1SYJUqxjlSWsCvABf/hrijjfss3bs8 mQm0gErH0AAch3X/HcaTjmqB8M4e9wr6p7oZj06dyYIZU/W5B/ewOzTof2OWS4IjlgKEFC CPlktRBoMLd40TFaNruSoQJw/EoZXD6Y6t/GyrOBt28uAimhcfbaoB8ZPHnwRlf/ME4ULR mNRlIjaxFDzpfwzNZKjYRQpgPWHIa5unPMkwEiC3SWmIJ0NABgh3uG+nyomFNAGfTu7sIV kNDfUnLTSZ2ByupeudCHKoFleRFNrkyxUej11A+Yt019LOGhlmRo+hb2hAYStw== 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=1722908929; 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=A0i1C7f274hKrFxK106AogkyjQkBaLRw0myXaJ9LTbc=; b=vwgnBhZ3puEzekg2oF8McEfCi2oXXKqJCzkRBimyJFxCG+GBDlMYybnsjGoepNgrnYxwwp IW+ZOpZSSj2yhxBOh5iCLxPjWkkgoWjNTLrOcuoxNzNE8OVXZb5N/q1llFRZQwdNVrn3Gg wXlIV9F9aegj6/9zMprN4Dwfhu1bf4z0szSgESB/GqYo947w20edZQ2Uwh2b8ciSfCOFQU 5lstPaAng2b8f+KYTw+8fJDTlaEBg5viNQukuT4DoHnNWxLPZbW/ZMOvNduSAXCVXamzZW 4SvU13dHVdJdV6VjLKSgpsB2nrjlbyshtx3FWQGc7V41EXp0wAAx3mCOJXpeHQ== 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 4WdGS1208rzmrk; Tue, 6 Aug 2024 01:48:49 +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 4761mnuX064580; Tue, 6 Aug 2024 01:48:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4761mnA6064577; Tue, 6 Aug 2024 01:48:49 GMT (envelope-from git) Date: Tue, 6 Aug 2024 01:48:49 GMT Message-Id: <202408060148.4761mnA6064577@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Sergey A. Osokin" Subject: git: a5661f5d9020 - stable/13 - bsd-family-tree: add NetBSD 10.0 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: osa X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a5661f5d9020e4acab23318671cb6f7341369bc1 Auto-Submitted: auto-generated The branch stable/13 has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=a5661f5d9020e4acab23318671cb6f7341369bc1 commit a5661f5d9020e4acab23318671cb6f7341369bc1 Author: Maxim Konovalov AuthorDate: 2024-03-31 18:35:02 +0000 Commit: Sergey A. Osokin CommitDate: 2024-08-06 01:47:14 +0000 bsd-family-tree: add NetBSD 10.0 (cherry picked from commit 07b17a1692a3c067e8f3e2dad31441ae441c5387) --- share/misc/bsd-family-tree | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index f72b0befbb1a..2cb894059acd 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -456,6 +456,8 @@ FreeBSD 5.2 | | | | | | | | | | | FreeBSD | | | | | 13.3 | | | | + | | *--NetBSD | | + | | | 10.0 | | | | | | | FreeBSD 15 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -886,6 +888,7 @@ macOS 14 2023-09-26 [APL] OpenBSD 7.4 2023-10-16 [OBD] FreeBSD 14.0 2023-11-20 [FBD] FreeBSD 13.3 2024-03-05 [FBD] +NetBSD 10.0 2024-03-28 [NBD] Bibliography ------------------------ From nobody Tue Aug 6 01:48:51 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 4WdGS41RT6z5SNrn; Tue, 06 Aug 2024 01:48:52 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdGS36RGfz4W0d; Tue, 6 Aug 2024 01:48:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722908931; 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=+RCFjzR4qtcIPf+mPU4HWHLUAadA8JmhJQjClm0DpGU=; b=OJTv7JApFC4dvc22Srop4qYMhz3C5mqyivofy4bhCr84EvxBaq8UDRCogrrjPos+lNHhED WGcsEXBf5iviTnte1oeZCGxWqKe37BJx+JVUkyeOqjlKUdTJQRepG3+rJtX84lSxcnJ9Dx Bw7yDNZzJ7iLRGURL45OVQllzMb2e6OspYwrzpKeSQ3uHOUZJAiy45RXcC57+IFokoIqG4 wrTvUSE9VdImOkzuNoIukO7Tz7w+FJ1Te9EDN6nYfMdTKkiBbTROn5lgjYjbAx0Ul+2wQo dDtXhIr2mLaeCv26YfN3Tj31NI8gvp6yXpbEKuFqLYNLTFZ2ReKDLiScvBcJLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722908931; a=rsa-sha256; cv=none; b=u7JaQ6ASrcZGg186MBVJEhG8ulvnAlfvj6deO0p3SzUBmCU2Ezto6B9NNAJz9Am4FJW7hu qi2ouVA8H9kflYzOx5MA945Vd6qQwULr64NkHRZmLAuBycuzi4sy4wWjptkqI8WTduR2qc LzzmkuMOIDoQzYIRzwHWsMa/CdEH6co0Q+gI5WHuu8qpf5NMfonLsFSeWrIuQ9oFaaNTpa VbbVGBQzPgUyrOz1UU24QLtQcOzprPZejxZqEXEEOXt53LbIdWLRJhm1vR5MddEJ20dLx5 qFp9l9DLCF7Btamx3mMZVyknzbjfnscODgvEEnTfIDY5r3SrjvCocobHTLJjjw== 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=1722908931; 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=+RCFjzR4qtcIPf+mPU4HWHLUAadA8JmhJQjClm0DpGU=; b=oL5lPMiDw+j+Cfa1Xwcqu1cCmmw07isaig8IsY2aste8N9gag45KnTJmaNEjI76Q20MsHC 9k3QVNDFZUzCSdJ0AY7IOIC2EW/CUHuZcq0Cdol/l8cCVcOjlR8Ab21hAU1VeU+i3rDWC7 GHrDjVe3bAF7ufxmp1WD4kluasCW3qbUy+KLYWCz5LlcTq4pzp1dLD9nrOHPCKEgbyfqnX d4GCWqIRJfSKOCftxYfFhKvYxxrbTJGlwcnxbXjavW4sfzShAIkCYHH8wze+E2sXaCQKFk mcUmYndQ7cxlhpiYCPei9okwoHgZb2+fQ29I5stXRZkxBLZDqZxG/4d1YcQu/A== 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 4WdGS33zJTznLN; Tue, 6 Aug 2024 01:48:51 +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 4761mpvw064672; Tue, 6 Aug 2024 01:48:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4761mpMA064667; Tue, 6 Aug 2024 01:48:51 GMT (envelope-from git) Date: Tue, 6 Aug 2024 01:48:51 GMT Message-Id: <202408060148.4761mpMA064667@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Sergey A. Osokin" Subject: git: ac00a7e1d42a - stable/13 - Add OpenBSD 7.5 to bsd-family-tree 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: osa X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ac00a7e1d42a8703bf724de726bd19891359552d Auto-Submitted: auto-generated The branch stable/13 has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=ac00a7e1d42a8703bf724de726bd19891359552d commit ac00a7e1d42a8703bf724de726bd19891359552d Author: Juraj Lutter AuthorDate: 2024-04-05 06:27:12 +0000 Commit: Sergey A. Osokin CommitDate: 2024-08-06 01:47:57 +0000 Add OpenBSD 7.5 to bsd-family-tree Summary: Add OpenBSD 7.5 to bsd-family-tree Subscribers: imp Differential Revision: https://reviews.freebsd.org/D44643 (cherry picked from commit bb4e55242ecb03b3f6876114b0708b0efa85044a) --- share/misc/bsd-family-tree | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index 0f99d6d946cc..bbeb054c1c59 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -459,6 +459,8 @@ FreeBSD 5.2 | | | | | | *--NetBSD | | | | | 10.0 | | | | | | | + | | | OpenBSD 7.5 | + | | | | | FreeBSD 15 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | v v v v v @@ -889,6 +891,7 @@ OpenBSD 7.4 2023-10-16 [OBD] FreeBSD 14.0 2023-11-20 [FBD] FreeBSD 13.3 2024-03-05 [FBD] NetBSD 10.0 2024-03-28 [NBD] +OpenBSD 7.5 2024-04-05 [OBD] Bibliography ------------------------ From nobody Tue Aug 6 01:48:52 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 4WdGS54L33z5SNj9; Tue, 06 Aug 2024 01:48:53 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdGS45zLGz4W0p; Tue, 6 Aug 2024 01:48:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722908932; 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=hkRQl94sSIe3ntfwWOwXjhBDdjNg+tliirWhlOeHNiQ=; b=LSTTcGTW/JuBje5YoXRAC20kvQlRHNQeleDPmbPBFmzAInfU69OnREtEPcMaSUTLf2lJsM 4YcXpBu7zqMzhi0w2wF/48v8n6qyMAEgX3WZNlJ0455VX9ULmQ3Przjy1eCPx4fTknKPj7 o4bw4i+UBPebKKbBVHGtuh5vxmosMfD19kbaB8P+hBX8kSMikoUxEdMPOUo1JRlij4IvNf ZuU0m5A7OlQ4aBtICaU0fv2QtpWKQLi4WGZrFAPock0P+3VYmCi7ywLTjq42ovcgB3u1qX B9u3QSMLAX9c2wGUmJvHbgqEicquIIs7JgRxPs+LHrxYE7PCzZHnOnixgZULsA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722908932; a=rsa-sha256; cv=none; b=M2ZTxXcpwptADoujhIzIvjbdFMWKXmxMNvw+m4+PVtjuEbqTyoEyTzxoar3MkoHVBKg7JL z/ju6UO+J3kbtvz26g7hfT4/UCWyiX3tCAw9913ktpJpxkbNDdpvlEhPHxw9nf95EVfqV/ 59qiZtiJrDB/CDgVARk7vSbu0QDN+NTOR25UMkh6NP9+N8Eus1SGtmgGdtigaffMp+zZxm vC7TXrPjKVtIbAPfrorq9XmdVSbjJUtweaJjoBaRBfTecvHNnNgT+u+5Rmna+l5qOliYjO gKRG7qxqwzRGUhq0KP6Bt0K4JX+029jUxNjmHLZLLDeIBP/BTX4ZtkaIbhRjJA== 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=1722908932; 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=hkRQl94sSIe3ntfwWOwXjhBDdjNg+tliirWhlOeHNiQ=; b=G6kLo5e/fxDeDBRpy9tb8D+IeZa3cxkSfGXQS5zSQ8qxm9ZlX7kReP6RGdQkVHQPeLzj93 M0nfKcU3PLUWLFhjwAZ+Hzm+p83W9fDuElsNUl9cigqLscG/h7ZJN3R5MqVSqGbsZXAhqU RrR2ZRJl4KfOmlIoWpiHl7LAwBcOD5Psxqq1cg/hR/YRmGiYWP6zp7y9fNTIkdNlWTm1J2 nsb79Fe1LN5twqit1MOygzN6QGDYZptXoK5EJqhGnvTU9Byr0l5UxTFonLAAsdvVCuArTH mU2LXlorA5DX9le/BwghJnlA/ZjbsX7k8WNe/7HeVhlLxioJDVY13DzYbH/8cw== 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 4WdGS44fNzzn6b; Tue, 6 Aug 2024 01:48:52 +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 4761mqEG064716; Tue, 6 Aug 2024 01:48:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4761mqSN064713; Tue, 6 Aug 2024 01:48:52 GMT (envelope-from git) Date: Tue, 6 Aug 2024 01:48:52 GMT Message-Id: <202408060148.4761mqSN064713@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Sergey A. Osokin" Subject: git: 38e43c905725 - stable/13 - bsd-family-tree: add FreeBSD 14.1 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: osa X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 38e43c90572511498fbad9e717870eec954cffed Auto-Submitted: auto-generated The branch stable/13 has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=38e43c90572511498fbad9e717870eec954cffed commit 38e43c90572511498fbad9e717870eec954cffed Author: Sergey A. Osokin AuthorDate: 2024-08-03 15:48:55 +0000 Commit: Sergey A. Osokin CommitDate: 2024-08-06 01:48:15 +0000 bsd-family-tree: add FreeBSD 14.1 MFC after: 3 days (cherry picked from commit 2b4aa2816cd2988d0e20cee9035d8ab9712d6708) --- share/misc/bsd-family-tree | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index bbeb054c1c59..a30ad2835676 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -453,13 +453,15 @@ FreeBSD 5.2 | | | | | | | | OpenBSD 7.4 | *--FreeBSD | | | | | | 14.0 | | | | | - | | | | | | - | FreeBSD | | | | - | 13.3 | | | | - | | *--NetBSD | | - | | | 10.0 | | - | | | | | - | | | OpenBSD 7.5 | + | | | | | | | + | | FreeBSD | | | | + | | 13.3 | | | | + | | | *--NetBSD | | + | | | | 10.0 | | + | | | | | | + | | | | OpenBSD 7.5 | + | FreeBSD | | | | + | 14.1 | | | | | | | | | FreeBSD 15 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -892,6 +894,7 @@ FreeBSD 14.0 2023-11-20 [FBD] FreeBSD 13.3 2024-03-05 [FBD] NetBSD 10.0 2024-03-28 [NBD] OpenBSD 7.5 2024-04-05 [OBD] +FreeBSD 14.1 2024-06-04 [FBD] Bibliography ------------------------ From nobody Tue Aug 6 02:46:47 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 4WdHkv4Mxlz5STRd; Tue, 06 Aug 2024 02:46:47 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdHkv3sDsz4brV; Tue, 6 Aug 2024 02:46:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722912407; 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=kIHA1s3r7tYfABU09V7E0m9fZJAwJBZoXmYwpsrVH1Q=; b=GmZY+TvgCoOxnlYoRKn+bbMj5kX5frsAu0O+/QYPZhXNAeWvVTn46Lsf9PLY+7KWFrzaxf xTl5nJ9tMwx3AKYlDsVLt/M4cVvMwyZhIE+PvFb3bt4vEK05s942NGmOir98sw8h9/TsaN AWgHZs2sCnf7j6/VQBswAv1xvLCZYqJvTrqAPNd+RVlpJiDv/ZFM9wOc5o8HzE9Um9xtxD xdUjMz2pU+LTOZILgFhtBJOo1Z0CPqtYN+2IC4WM1pNzFqFKspRJ3Qccu+fJixdSX8xTZV ssRcy/r3NnR6OuhuCFx8XcBNpWa1+Gv4DVDPudCqHZ4krlE//EY7wXKAudNDlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722912407; a=rsa-sha256; cv=none; b=CKhC3ZCPsNBxAJ1gfEIMMnPPbuv+zBUOflvBtHFAeN6Xp4yfD7xUMZV9iJR9gqAan8prLb z2rMaDDvge2ZX/qdLE1CRyD1Myuu/meyQAp0OhwVUV1A1rR74XotqwCxVCi0qxl9wB5+5/ ezfOZbjNe3f/lMz1TypFBYmpGmocj6M2VQXPJqytA0Z4bN1/QWA08tn9Rw8HKXBKfrS35K tGO7igitih/y9PWsl5Ln5xULpOHNCjBAtzyCuTkywqeCR1hHew4h/Ga3su2Ndh1+03FWAT DL8wWuW+2HBfRMv8T2zvAfZM14shCND/LUn+ICxdeTQj844fCZF9liMskSpCeg== 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=1722912407; 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=kIHA1s3r7tYfABU09V7E0m9fZJAwJBZoXmYwpsrVH1Q=; b=d/54j6ih1uk9S4kEXvbR7MFkGXVcgzaU8uWaH1u0kWPCAQBQszHafOney/hWHuTGLj3irv 1tsk8G9K25s8WyZAOzMuH8QdrIhUDzvcuvV21EFywQQnJuKbAWk6808ORZmgfeWFJHgxvF aXdWZ6qj6ZLjsHj0DqLnTCbIv6cktzJizfOCo0kRZRqZfJxBYKcc7OItWPFzY46QqvchTz xMf5X6pJFVMhXd4pSsMCBnzdRL0foSlMl8vqCm7Ulsza78aAKZ2n/qVdaUFM/TEh9b+1eu 0exyPoQQaI7GYV8ORGF46YSsx+HXioFPbwMHGjFr2NYGtIBmeAO/DsRqhzM45w== 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 4WdHkv3KfczpZf; Tue, 6 Aug 2024 02:46:47 +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 4762klwo066111; Tue, 6 Aug 2024 02:46:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4762kltZ066108; Tue, 6 Aug 2024 02:46:47 GMT (envelope-from git) Date: Tue, 6 Aug 2024 02:46:47 GMT Message-Id: <202408060246.4762kltZ066108@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: 5b1211bb358f - stable/14 - mlx5en: limit reporting eeprom read failure due to unplugged module to verboseboot 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: 5b1211bb358f649b36375361395359541b3ed5d7 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5b1211bb358f649b36375361395359541b3ed5d7 commit 5b1211bb358f649b36375361395359541b3ed5d7 Author: Konstantin Belousov AuthorDate: 2024-07-26 21:09:58 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-06 02:46:26 +0000 mlx5en: limit reporting eeprom read failure due to unplugged module to verboseboot (cherry picked from commit 2204a4829083bf2a40304ea873d287a5498973d7) --- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 97ec1b4420a8..55a4bc3cec79 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -3674,9 +3674,11 @@ out: /* Check if module is present before doing an access */ module_status = mlx5_query_module_status(priv->mdev, module_num); if (module_status != MLX5_MODULE_STATUS_PLUGGED_ENABLED) { - mlx5_en_err(ifp, - "Query module %d status: not plugged (%d), eeprom reading is not supported\n", - module_num, module_status); + if (bootverbose) + mlx5_en_err(ifp, + "Query module %d status: not plugged (%d), " + "eeprom reading is not supported\n", + module_num, module_status); error = EINVAL; goto err_i2c; } From nobody Tue Aug 6 03:08:01 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 4WdJCP4G8jz5SWG7; Tue, 06 Aug 2024 03:08:01 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdJCP3VYtz4f1J; Tue, 6 Aug 2024 03:08:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722913681; 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=/RXOKJHCxe6ORThHzYQboBwHqjmmWYMot6ZNAiSFnIE=; b=Ow+rDFz1XMDyZkeikn1PdLlTKlWFFwgO1w0D/dP9jZe17P5g6I1tAWxyoFNBowWuRGC6jU iU9HGWIiKsXoZgnGsB1feiIpRs1JuKGnxPf4GsRIUETejvIMPyqVw46oIekY5LmQvQZ7RR crkawBmQdIINcxkgwCZx4Li9kfcWhyEULjZKDEusVMKGyBzSusWqTzxZ6ovU/QMgeu0LA0 9LMxoCuBrJRcNuHl9uOFNhpKXy153ek6uNwz6ALMwghsIt1Xka/rz0ytaaCuiFP2OnL2yf MdVRKWwgTXJUl9kq0e38fe7ZeOolHOuvgPgAH9Y3oNEXra//vjWBODHb2PUpCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722913681; a=rsa-sha256; cv=none; b=EKA7swQHrNOo7o+PXP9aNUgYTznbYR97sgymHmdU2IXQgFmLFTqdC46vpoHS1mPjNedQZL lOBRYqIYvbhl/pruVGt094YmnVjqtrNxNBHrPwc/jkgFZxkb4Wi3VlgQ2c9hETg757yU8G CtPzD5vTuXMnnzx61weC3H/nMVHpR5s1wosPXBGFrhb3YV8j6Y7Uj/kEtdS0x9pheRKn0v 2C0jFvxWGckTL/iNhaLRkq/AUpdv0K1+qkwKANarL7/GAS4aarImYa9himgWzOFw+C/SOu QTAfqY6MgwIV+VE6ob8Nr0mY69fs7ygc+bjN/xZXARpdtNwdMQtUBg8RDqR6Ow== 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=1722913681; 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=/RXOKJHCxe6ORThHzYQboBwHqjmmWYMot6ZNAiSFnIE=; b=t3dYn8caHJgaNtsC7Gpmvlx7vdXhtecQNlONJlakp6SG7gqMiaEtS0ZWqa9R9JKX8PPqjL +rLb+xhpKoJNq68uh5o1VXkwIrkzGNgW7F1ScOWRqmHLd166N+eW6UoLb3bw4TmwnKz7H3 /Xn/HUz2ASc2iFwFOZyeCtfyT3TB/PlgbcV5mzmDKQURsqBF4DzUSAA3UohJ5rmsuKL2YC Vr/2IZykmLKh4DiWcTuIFqizwoqqfBvhiE6o1uqwKMdHJoq6y9Y97sgzp0AxmnGyiES0RQ Ocj7w2H9Kpm3ugMh9wlj8TQqxgO/VnGGXoZKJDW402uufB55xqL/3DeW0/WRbg== 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 4WdJCP35lFzq7b; Tue, 6 Aug 2024 03:08:01 +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 476381qs002453; Tue, 6 Aug 2024 03:08:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47638110002450; Tue, 6 Aug 2024 03:08:01 GMT (envelope-from git) Date: Tue, 6 Aug 2024 03:08:01 GMT Message-Id: <202408060308.47638110002450@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "David E. O'Brien" Subject: git: 1d9b60bf4d5a - main - SEE ALSO lagg(4) 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: obrien X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d9b60bf4d5aad14cac3e23614b0f74f657b547c Auto-Submitted: auto-generated The branch main has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=1d9b60bf4d5aad14cac3e23614b0f74f657b547c commit 1d9b60bf4d5aad14cac3e23614b0f74f657b547c Author: David E. O'Brien AuthorDate: 2024-08-05 05:39:16 +0000 Commit: David E. O'Brien CommitDate: 2024-08-06 03:07:55 +0000 SEE ALSO lagg(4) Add a reference in 'man 4 ng_one2many' to lagg(4) since its functionality is so similar. --- share/man/man4/ng_one2many.4 | 1 + 1 file changed, 1 insertion(+) diff --git a/share/man/man4/ng_one2many.4 b/share/man/man4/ng_one2many.4 index 8a73c51d2bcf..06bcbabedb63 100644 --- a/share/man/man4/ng_one2many.4 +++ b/share/man/man4/ng_one2many.4 @@ -250,6 +250,7 @@ With a similar setup on a peer machine (using the address Ethernet connection with four times normal bandwidth is achieved. .Sh SEE ALSO +.Xr lagg 4 , .Xr netgraph 4 , .Xr ng_bridge 4 , .Xr ng_ether 4 , From nobody Tue Aug 6 04:06:34 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 4WdKVy6Kz2z5Sbbl; Tue, 06 Aug 2024 04:06:34 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdKVy5g70z4kMs; Tue, 6 Aug 2024 04:06:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722917194; 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=x0WG6nP2buLvo1KCoQCgXEt6ldo3H2D9OgMNoNpYK3s=; b=K8zjmZg8PPZcI1ld/6Q1X9bzEnWOUjHXGbeDoK01UjKUNpSCpTUvy7l6tWOl8IoUzgdGrl OcVGzvz+kyGhCy3F0fHGCjoaoHkV7kkjyIXQyn/fLxGjSizLM1sOwNqjM7LC3ZwqPWBcVd SYYF3S9QU0rqgOnZwfXke/hc4p7uGMzZ7dgwFDvu6jP76eqVpw5cqrKaV8c5K+TYc0iWgm U3aD5+KWerLDgKdKKY0kOAApNymB73kLSMpLk4H1K3dgE+aNNFYLh8zZ3+D+JS+l2aEYDX Dznl7bVvDoDSDBaD1NIjYIfV++5mTJssbpvrvBM+V6XiDsA5CUIgsqkJhLPU2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722917194; a=rsa-sha256; cv=none; b=nygjSYN066a09Ee4E3T6DTTxIVJJydcR8kciDUA3wGKfh0ejD2WPHzFPkq1IbgsjtIJ66C spIaSBQn0xYG2nS7qLVrc/i4orKbhdbvRsW/2fO6suxZIjtrC8/ZQQB/Lf9a/EieetQKLD lk81jkvyu2dp9y52zuoP2Z5tWbHCCUADoommuqx0BBC3sfU6GtNMobVgQDl55xAS3flkDp 5/Uedvs/xPCGOjspqYCj5w820BBZA26o7Bbl9hGosyi59RPtwXbAp+JVtNrjbm/I7UIgz6 OqfNT+OFoTCriyS6de4+TW9ilmSTkdRKFeyOupi38qGqjQ0j/PRkyCA55tJQKw== 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=1722917194; 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=x0WG6nP2buLvo1KCoQCgXEt6ldo3H2D9OgMNoNpYK3s=; b=VqfQHIRHfnkwxL6YPkD9TekqrC+ccxi8cKxpu2t7nsd03pCVyFqKHkLVA4zcdyenTO5Y5Y 8xpgogRgRPYVE0TMEmBL85yU+aa66CF9cr0GZwqZJa1QwCrmN7QlxWtBk6ppCA9BazNFHW f3C4Gxt7zgPo/D1w8R+Nv8RIykD7O1hr6/GqFuh1W2QK6ggwPZquULHn0w8739wgWaQf2K XkKaZ4bZbX+9vzEqrIYQexcuypreiILL2FH3BmreaAk3cSOr2Kelpmr0CuOTOTIWbl4VCI 7jQRgOih0IrPzXztr5ic48AlgR4MFVZYPRL0ZuuMBZPd17JS7Haj+TXWqMZ08Q== 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 4WdKVy4rz8zrqP; Tue, 6 Aug 2024 04:06:34 +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 47646Yeh004526; Tue, 6 Aug 2024 04:06:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47646YVu004523; Tue, 6 Aug 2024 04:06:34 GMT (envelope-from git) Date: Tue, 6 Aug 2024 04:06:34 GMT Message-Id: <202408060406.47646YVu004523@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: c3d8a93126b9 - main - Re-implement rangelocks part 1 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/main X-Git-Reftype: branch X-Git-Commit: c3d8a93126b9dd05fcfed3685bc3817f3c1eccc9 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c3d8a93126b9dd05fcfed3685bc3817f3c1eccc9 commit c3d8a93126b9dd05fcfed3685bc3817f3c1eccc9 Author: Konstantin Belousov AuthorDate: 2023-08-07 04:45:01 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-06 04:05:58 +0000 Re-implement rangelocks part 1 Using the algorithms from https://doi.org/10.1145/3342195.3387533. For the first part, consider all range lock requests as exclusive. Reviewed by: markj, Olivier Certner Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D41787 --- sys/kern/kern_rangelock.c | 455 +++++++++++++++++++++++++--------------------- sys/kern/kern_thread.c | 1 - sys/kern/uipc_shm.c | 8 +- sys/kern/vfs_subr.c | 2 - sys/sys/rangelock.h | 45 ++--- sys/sys/vnode.h | 13 +- 6 files changed, 267 insertions(+), 257 deletions(-) diff --git a/sys/kern/kern_rangelock.c b/sys/kern/kern_rangelock.c index a9d8c342c267..186a42caebf0 100644 --- a/sys/kern/kern_rangelock.c +++ b/sys/kern/kern_rangelock.c @@ -27,304 +27,335 @@ */ #include +#include #include #include #include #include #include -#include +#include +#include #include +/* + * Implementation of range locks based on the paper + * https://doi.org/10.1145/3342195.3387533 + * arXiv:2006.12144v1 [cs.OS] 22 Jun 2020 + * Scalable Range Locks for Scalable Address Spaces and Beyond + * by Alex Kogan, Dave Dice, and Shady Issa + */ + +static struct rl_q_entry *rl_e_unmark(const struct rl_q_entry *e); + +/* + * rl_q_next links all granted ranges in the lock. We cannot free an + * rl_q_entry while in the smr section, and cannot reuse rl_q_next + * linkage since other threads might follow it even after CAS removed + * the range. Use rl_q_free for local list of ranges to remove after + * the smr section is dropped. + */ struct rl_q_entry { - TAILQ_ENTRY(rl_q_entry) rl_q_link; + struct rl_q_entry *rl_q_next; + struct rl_q_entry *rl_q_free; off_t rl_q_start, rl_q_end; int rl_q_flags; +#ifdef INVARIANTS + struct thread *rl_q_owner; +#endif }; static uma_zone_t rl_entry_zone; +static smr_t rl_smr; static void rangelock_sys_init(void) { - rl_entry_zone = uma_zcreate("rl_entry", sizeof(struct rl_q_entry), - NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); + NULL, NULL, NULL, NULL, UMA_ALIGNOF(struct rl_q_entry), + UMA_ZONE_SMR); + rl_smr = uma_zone_get_smr(rl_entry_zone); } -SYSINIT(vfs, SI_SUB_LOCK, SI_ORDER_ANY, rangelock_sys_init, NULL); +SYSINIT(rl, SI_SUB_LOCK, SI_ORDER_ANY, rangelock_sys_init, NULL); static struct rl_q_entry * -rlqentry_alloc(void) +rlqentry_alloc(vm_ooffset_t start, vm_ooffset_t end, int flags) { + struct rl_q_entry *e; + + e = uma_zalloc_smr(rl_entry_zone, M_WAITOK); + e->rl_q_next = NULL; + e->rl_q_free = NULL; + e->rl_q_start = start; + e->rl_q_end = end; + e->rl_q_flags = flags; +#ifdef INVARIANTS + e->rl_q_owner = curthread; +#endif + return (e); +} - return (uma_zalloc(rl_entry_zone, M_WAITOK)); +void +rangelock_init(struct rangelock *lock) +{ + lock->sleepers = false; + atomic_store_ptr(&lock->head, NULL); } void -rlqentry_free(struct rl_q_entry *rleq) +rangelock_destroy(struct rangelock *lock) { + struct rl_q_entry *e, *ep; - uma_zfree(rl_entry_zone, rleq); + MPASS(!lock->sleepers); + for (e = (struct rl_q_entry *)atomic_load_ptr(&lock->head); + e != NULL; e = rl_e_unmark(ep)) { + ep = atomic_load_ptr(&e->rl_q_next); + uma_zfree_smr(rl_entry_zone, e); + } } -void -rangelock_init(struct rangelock *lock) +static bool +rl_e_is_marked(const struct rl_q_entry *e) { + return (((uintptr_t)e & 1) != 0); +} - TAILQ_INIT(&lock->rl_waiters); - lock->rl_currdep = NULL; +static struct rl_q_entry * +rl_e_unmark(const struct rl_q_entry *e) +{ + MPASS(rl_e_is_marked(e)); + return ((struct rl_q_entry *)((uintptr_t)e & ~1)); } -void -rangelock_destroy(struct rangelock *lock) +static struct rl_q_entry * +rl_q_load(struct rl_q_entry **p) { + return ((struct rl_q_entry *)atomic_load_acq_ptr((uintptr_t *)p)); +} - KASSERT(TAILQ_EMPTY(&lock->rl_waiters), ("Dangling waiters")); +void +rangelock_unlock(struct rangelock *lock, void *cookie) +{ + struct rl_q_entry *e; + + e = cookie; + MPASS(lock != NULL && e != NULL); + MPASS(!rl_e_is_marked(rl_q_load(&e->rl_q_next))); + MPASS(e->rl_q_owner == curthread); + + sleepq_lock(&lock->sleepers); +#ifdef INVARIANTS + int r = atomic_testandset_long((uintptr_t *)&e->rl_q_next, 0); + MPASS(r == 0); +#else + atomic_set_ptr((uintptr_t *)&e->rl_q_next, 1); +#endif + lock->sleepers = false; + sleepq_broadcast(&lock->sleepers, SLEEPQ_SLEEP, 0, 0); + sleepq_release(&lock->sleepers); } /* - * Two entries are compatible if their ranges do not overlap, or both - * entries are for read. + * result: -1 if e1 before e2 + * 1 if e1 after e2 + * 0 if e1 and e2 overlap */ static int -ranges_overlap(const struct rl_q_entry *e1, - const struct rl_q_entry *e2) +rl_e_compare(const struct rl_q_entry *e1, const struct rl_q_entry *e2) { - - if (e1->rl_q_start < e2->rl_q_end && e1->rl_q_end > e2->rl_q_start) + if (e1 == NULL) return (1); + if (e1->rl_q_start >= e2->rl_q_end) + return (1); + if (e2->rl_q_start >= e1->rl_q_end) + return (-1); return (0); } -/* - * Recalculate the lock->rl_currdep after an unlock. - */ static void -rangelock_calc_block(struct rangelock *lock) +rl_insert_sleep(struct rangelock *lock) { - struct rl_q_entry *entry, *nextentry, *entry1; - - for (entry = lock->rl_currdep; entry != NULL; entry = nextentry) { - nextentry = TAILQ_NEXT(entry, rl_q_link); - if (entry->rl_q_flags & RL_LOCK_READ) { - /* Reads must not overlap with granted writes. */ - for (entry1 = TAILQ_FIRST(&lock->rl_waiters); - !(entry1->rl_q_flags & RL_LOCK_READ); - entry1 = TAILQ_NEXT(entry1, rl_q_link)) { - if (ranges_overlap(entry, entry1)) - goto out; - } - } else { - /* Write must not overlap with any granted locks. */ - for (entry1 = TAILQ_FIRST(&lock->rl_waiters); - entry1 != entry; - entry1 = TAILQ_NEXT(entry1, rl_q_link)) { - if (ranges_overlap(entry, entry1)) - goto out; - } - - /* Move grantable write locks to the front. */ - TAILQ_REMOVE(&lock->rl_waiters, entry, rl_q_link); - TAILQ_INSERT_HEAD(&lock->rl_waiters, entry, rl_q_link); - } - - /* Grant this lock. */ - entry->rl_q_flags |= RL_LOCK_GRANTED; - wakeup(entry); - } -out: - lock->rl_currdep = entry; + smr_exit(rl_smr); + DROP_GIANT(); + lock->sleepers = true; + sleepq_add(&lock->sleepers, NULL, "rangelk", 0, 0); + sleepq_wait(&lock->sleepers, PRI_USER); + PICKUP_GIANT(); + smr_enter(rl_smr); } -static void -rangelock_unlock_locked(struct rangelock *lock, struct rl_q_entry *entry, - struct mtx *ilk, bool do_calc_block) +static bool +rl_q_cas(struct rl_q_entry **prev, struct rl_q_entry *old, + struct rl_q_entry *new) { - - MPASS(lock != NULL && entry != NULL && ilk != NULL); - mtx_assert(ilk, MA_OWNED); - - if (!do_calc_block) { - /* - * This is the case where rangelock_enqueue() has been called - * with trylock == true and just inserted this entry in the - * queue. - * If rl_currdep is this entry, rl_currdep needs to - * be set to the next entry in the rl_waiters list. - * However, since this entry is the last entry in the - * list, the next entry is NULL. - */ - if (lock->rl_currdep == entry) { - KASSERT(TAILQ_NEXT(lock->rl_currdep, rl_q_link) == NULL, - ("rangelock_enqueue: next entry not NULL")); - lock->rl_currdep = NULL; - } - } else - KASSERT(entry != lock->rl_currdep, ("stuck currdep")); - - TAILQ_REMOVE(&lock->rl_waiters, entry, rl_q_link); - if (do_calc_block) - rangelock_calc_block(lock); - mtx_unlock(ilk); - if (curthread->td_rlqe == NULL) - curthread->td_rlqe = entry; - else - rlqentry_free(entry); + return (atomic_cmpset_rel_ptr((uintptr_t *)prev, (uintptr_t)old, + (uintptr_t)new) != 0); } -void -rangelock_unlock(struct rangelock *lock, void *cookie, struct mtx *ilk) +static bool +rl_insert(struct rangelock *lock, struct rl_q_entry *e, bool trylock, + struct rl_q_entry **free) { + struct rl_q_entry *cur, *next, **prev; + int r; + +again: + prev = &lock->head; + if (rl_q_load(prev) == NULL && rl_q_cas(prev, NULL, e)) + return (true); + + for (cur = rl_q_load(prev);;) { + if (rl_e_is_marked(cur)) + goto again; + + if (cur != NULL) { + next = rl_q_load(&cur->rl_q_next); + if (rl_e_is_marked(next)) { + next = rl_e_unmark(next); + if (rl_q_cas(prev, cur, next)) { +#ifdef INVARIANTS + cur->rl_q_owner = NULL; +#endif + cur->rl_q_free = *free; + *free = cur; + } + cur = next; + continue; + } + } - MPASS(lock != NULL && cookie != NULL && ilk != NULL); - - mtx_lock(ilk); - rangelock_unlock_locked(lock, cookie, ilk, true); -} - -/* - * Unlock the sub-range of granted lock. - */ -void * -rangelock_unlock_range(struct rangelock *lock, void *cookie, off_t start, - off_t end, struct mtx *ilk) -{ - struct rl_q_entry *entry; - - MPASS(lock != NULL && cookie != NULL && ilk != NULL); - entry = cookie; - KASSERT(entry->rl_q_flags & RL_LOCK_GRANTED, - ("Unlocking non-granted lock")); - KASSERT(entry->rl_q_start == start, ("wrong start")); - KASSERT(entry->rl_q_end >= end, ("wrong end")); - - mtx_lock(ilk); - if (entry->rl_q_end == end) { - rangelock_unlock_locked(lock, cookie, ilk, true); - return (NULL); + r = rl_e_compare(cur, e); + if (r == -1) { + prev = &cur->rl_q_next; + cur = rl_q_load(prev); + } else if (r == 0) { + sleepq_lock(&lock->sleepers); + if (__predict_false(rl_e_is_marked(rl_q_load( + &cur->rl_q_next)))) { + sleepq_release(&lock->sleepers); + continue; + } + if (trylock) { + sleepq_release(&lock->sleepers); + return (false); + } + rl_insert_sleep(lock); + /* e is still valid */ + goto again; + } else /* r == 1 */ { + e->rl_q_next = cur; + if (rl_q_cas(prev, cur, e)) { + atomic_thread_fence_acq(); + return (true); + } + /* Reset rl_q_next in case we hit fast path. */ + e->rl_q_next = NULL; + cur = rl_q_load(prev); + } } - entry->rl_q_end = end; - rangelock_calc_block(lock); - mtx_unlock(ilk); - return (cookie); } -/* - * Add the lock request to the queue of the pending requests for - * rangelock. Sleep until the request can be granted unless trylock == true. - */ -static void * -rangelock_enqueue(struct rangelock *lock, off_t start, off_t end, int mode, - struct mtx *ilk, bool trylock) +static struct rl_q_entry * +rangelock_lock_int(struct rangelock *lock, struct rl_q_entry *e, + bool trylock) { - struct rl_q_entry *entry; - struct thread *td; - - MPASS(lock != NULL && ilk != NULL); - - td = curthread; - if (td->td_rlqe != NULL) { - entry = td->td_rlqe; - td->td_rlqe = NULL; - } else - entry = rlqentry_alloc(); - MPASS(entry != NULL); - entry->rl_q_flags = mode; - entry->rl_q_start = start; - entry->rl_q_end = end; - - mtx_lock(ilk); - /* - * XXXKIB TODO. Check that a thread does not try to enqueue a - * lock that is incompatible with another request from the same - * thread. - */ - - TAILQ_INSERT_TAIL(&lock->rl_waiters, entry, rl_q_link); - /* - * If rl_currdep == NULL, there is no entry waiting for a conflicting - * range to be resolved, so set rl_currdep to this entry. If there is - * no conflicting entry for this entry, rl_currdep will be set back to - * NULL by rangelock_calc_block(). - */ - if (lock->rl_currdep == NULL) - lock->rl_currdep = entry; - rangelock_calc_block(lock); - while (!(entry->rl_q_flags & RL_LOCK_GRANTED)) { - if (trylock) { - /* - * For this case, the range is not actually locked - * yet, but removal from the list requires the same - * steps, except for not doing a rangelock_calc_block() - * call, since rangelock_calc_block() was called above. - */ - rangelock_unlock_locked(lock, entry, ilk, false); - return (NULL); - } - msleep(entry, ilk, 0, "range", 0); + struct rl_q_entry *free, *x, *xp; + bool res; + + free = NULL; + smr_enter(rl_smr); + res = rl_insert(lock, e, trylock, &free); + smr_exit(rl_smr); + MPASS(trylock || res); + if (!res) { + e->rl_q_free = free; + free = e; + e = NULL; + } + for (x = free; x != NULL; x = xp) { + MPASS(!rl_e_is_marked(x)); + xp = x->rl_q_free; + MPASS(!rl_e_is_marked(xp)); + uma_zfree_smr(rl_entry_zone, x); } - mtx_unlock(ilk); - return (entry); + return (e); } void * -rangelock_rlock(struct rangelock *lock, off_t start, off_t end, struct mtx *ilk) +rangelock_rlock(struct rangelock *lock, vm_ooffset_t start, vm_ooffset_t end) { + struct rl_q_entry *e; - return (rangelock_enqueue(lock, start, end, RL_LOCK_READ, ilk, false)); + e = rlqentry_alloc(start, end, RL_LOCK_READ); + return (rangelock_lock_int(lock, e, false)); } void * -rangelock_tryrlock(struct rangelock *lock, off_t start, off_t end, - struct mtx *ilk) +rangelock_tryrlock(struct rangelock *lock, vm_ooffset_t start, vm_ooffset_t end) { + struct rl_q_entry *e; - return (rangelock_enqueue(lock, start, end, RL_LOCK_READ, ilk, true)); + e = rlqentry_alloc(start, end, RL_LOCK_READ); + return (rangelock_lock_int(lock, e, true)); } void * -rangelock_wlock(struct rangelock *lock, off_t start, off_t end, struct mtx *ilk) +rangelock_wlock(struct rangelock *lock, vm_ooffset_t start, vm_ooffset_t end) { + struct rl_q_entry *e; - return (rangelock_enqueue(lock, start, end, RL_LOCK_WRITE, ilk, false)); + e = rlqentry_alloc(start, end, RL_LOCK_WRITE); + return (rangelock_lock_int(lock, e, true)); } void * -rangelock_trywlock(struct rangelock *lock, off_t start, off_t end, - struct mtx *ilk) +rangelock_trywlock(struct rangelock *lock, vm_ooffset_t start, vm_ooffset_t end) { + struct rl_q_entry *e; - return (rangelock_enqueue(lock, start, end, RL_LOCK_WRITE, ilk, true)); + e = rlqentry_alloc(start, end, RL_LOCK_WRITE); + return (rangelock_lock_int(lock, e, true)); } #ifdef INVARIANT_SUPPORT void _rangelock_cookie_assert(void *cookie, int what, const char *file, int line) { - struct rl_q_entry *entry; - int flags; - - MPASS(cookie != NULL); - entry = cookie; - flags = entry->rl_q_flags; - switch (what) { - case RCA_LOCKED: - if ((flags & RL_LOCK_GRANTED) == 0) - panic("rangelock not held @ %s:%d\n", file, line); - break; - case RCA_RLOCKED: - if ((flags & (RL_LOCK_GRANTED | RL_LOCK_READ)) != - (RL_LOCK_GRANTED | RL_LOCK_READ)) - panic("rangelock not rlocked @ %s:%d\n", file, line); - break; - case RCA_WLOCKED: - if ((flags & (RL_LOCK_GRANTED | RL_LOCK_WRITE)) != - (RL_LOCK_GRANTED | RL_LOCK_WRITE)) - panic("rangelock not wlocked @ %s:%d\n", file, line); - break; - default: - panic("Unknown rangelock assertion: %d @ %s:%d", what, file, - line); - } } #endif /* INVARIANT_SUPPORT */ + +#include "opt_ddb.h" +#ifdef DDB +#include + +DB_SHOW_COMMAND(rangelock, db_show_rangelock) +{ + struct rangelock *lock; + struct rl_q_entry *e, *x; + + if (!have_addr) { + db_printf("show rangelock addr\n"); + return; + } + + lock = (struct rangelock *)addr; + db_printf("rangelock %p sleepers %d\n", lock, lock->sleepers); + for (e = lock->head;;) { + x = rl_e_is_marked(e) ? rl_e_unmark(e) : e; + if (x == NULL) + break; + db_printf(" entry %p marked %d %d start %#jx end %#jx " + "flags %x next %p", + e, rl_e_is_marked(e), rl_e_is_marked(x->rl_q_next), + x->rl_q_start, x->rl_q_end, x->rl_q_flags, x->rl_q_next); +#ifdef INVARIANTS + db_printf(" owner %p (%d)", x->rl_q_owner, + x->rl_q_owner != NULL ? x->rl_q_owner->td_tid : -1); +#endif + db_printf("\n"); + e = x->rl_q_next; + } +} + +#endif /* DDB */ diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 00f99516773c..c951e7297c89 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -478,7 +478,6 @@ thread_fini(void *mem, int size) td = (struct thread *)mem; EVENTHANDLER_DIRECT_INVOKE(thread_fini, td); - rlqentry_free(td->td_rlqe); turnstile_free(td->td_turnstile); sleepq_free(td->td_sleepqueue); umtx_thread_fini(td); diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 7672ded459df..49b5b56dee17 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -184,13 +184,13 @@ SYSCTL_INT(_vm_largepages, OID_AUTO, reclaim_tries, "Number of contig reclaims before giving up for default alloc policy"); #define shm_rangelock_unlock(shmfd, cookie) \ - rangelock_unlock(&(shmfd)->shm_rl, (cookie), &(shmfd)->shm_mtx) + rangelock_unlock(&(shmfd)->shm_rl, (cookie)) #define shm_rangelock_rlock(shmfd, start, end) \ - rangelock_rlock(&(shmfd)->shm_rl, (start), (end), &(shmfd)->shm_mtx) + rangelock_rlock(&(shmfd)->shm_rl, (start), (end)) #define shm_rangelock_tryrlock(shmfd, start, end) \ - rangelock_tryrlock(&(shmfd)->shm_rl, (start), (end), &(shmfd)->shm_mtx) + rangelock_tryrlock(&(shmfd)->shm_rl, (start), (end)) #define shm_rangelock_wlock(shmfd, start, end) \ - rangelock_wlock(&(shmfd)->shm_rl, (start), (end), &(shmfd)->shm_mtx) + rangelock_wlock(&(shmfd)->shm_rl, (start), (end)) static int uiomove_object_page(vm_object_t obj, size_t len, struct uio *uio) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 8012fab29081..f192c6798858 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2180,8 +2180,6 @@ freevnode(struct vnode *vp) VNASSERT(bo->bo_dirty.bv_cnt == 0, vp, ("dirtybufcnt not 0")); VNASSERT(pctrie_is_empty(&bo->bo_dirty.bv_root), vp, ("dirty blk trie not empty")); - VNASSERT(TAILQ_EMPTY(&vp->v_rl.rl_waiters), vp, - ("Dangling rangelock waiters")); VNASSERT((vp->v_iflag & (VI_DOINGINACT | VI_OWEINACT)) == 0, vp, ("Leaked inactivation")); VI_UNLOCK(vp); diff --git a/sys/sys/rangelock.h b/sys/sys/rangelock.h index 62ccf77c03bc..310371bef879 100644 --- a/sys/sys/rangelock.h +++ b/sys/sys/rangelock.h @@ -29,12 +29,14 @@ #ifndef _SYS_RANGELOCK_H #define _SYS_RANGELOCK_H -#include +#include +#ifndef _KERNEL +#include +#endif #define RL_LOCK_READ 0x0001 #define RL_LOCK_WRITE 0x0002 #define RL_LOCK_TYPE_MASK 0x0003 -#define RL_LOCK_GRANTED 0x0004 struct rl_q_entry; @@ -44,42 +46,25 @@ struct rl_q_entry; * all existing lock owners are compatible with the request. Two lock * owners are compatible if their ranges do not overlap, or both * owners are for read. - * - * Access to the structure itself is synchronized with the externally - * supplied mutex. - * - * rl_waiters is the queue containing in order (a) granted write lock - * requests, (b) granted read lock requests, and (c) in order of arrival, - * lock requests which cannot be granted yet. - * - * rl_currdep is the first lock request that cannot be granted now due - * to the preceding requests conflicting with it (i.e., it points to - * position (c) in the list above). */ struct rangelock { - TAILQ_HEAD(, rl_q_entry) rl_waiters; - struct rl_q_entry *rl_currdep; + struct rl_q_entry *head; + bool sleepers; }; #ifdef _KERNEL -struct mtx; - void rangelock_init(struct rangelock *lock); void rangelock_destroy(struct rangelock *lock); -void rangelock_unlock(struct rangelock *lock, void *cookie, - struct mtx *ilk); -void *rangelock_unlock_range(struct rangelock *lock, void *cookie, - off_t start, off_t end, struct mtx *ilk); -void *rangelock_rlock(struct rangelock *lock, off_t start, off_t end, - struct mtx *ilk); -void *rangelock_tryrlock(struct rangelock *lock, off_t start, off_t end, - struct mtx *ilk); -void *rangelock_wlock(struct rangelock *lock, off_t start, off_t end, - struct mtx *ilk); -void *rangelock_trywlock(struct rangelock *lock, off_t start, off_t end, - struct mtx *ilk); -void rlqentry_free(struct rl_q_entry *rlqe); +void rangelock_unlock(struct rangelock *lock, void *cookie); +void *rangelock_rlock(struct rangelock *lock, vm_ooffset_t start, + vm_ooffset_t end); +void *rangelock_tryrlock(struct rangelock *lock, vm_ooffset_t start, + vm_ooffset_t end); +void *rangelock_wlock(struct rangelock *lock, vm_ooffset_t start, + vm_ooffset_t end); +void *rangelock_trywlock(struct rangelock *lock, vm_ooffset_t start, + vm_ooffset_t end); #if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) void _rangelock_cookie_assert(void *cookie, int what, const char *file, int line); diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index dc926d7a9c9e..0d0f228f7051 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -833,18 +833,15 @@ void vn_seqc_write_end(struct vnode *vp); #define vn_seqc_consistent(vp, seq) seqc_consistent(&(vp)->v_seqc, seq) #define vn_rangelock_unlock(vp, cookie) \ - rangelock_unlock(&(vp)->v_rl, (cookie), VI_MTX(vp)) -#define vn_rangelock_unlock_range(vp, cookie, start, end) \ - rangelock_unlock_range(&(vp)->v_rl, (cookie), (start), (end), \ - VI_MTX(vp)) + rangelock_unlock(&(vp)->v_rl, (cookie)) #define vn_rangelock_rlock(vp, start, end) \ - rangelock_rlock(&(vp)->v_rl, (start), (end), VI_MTX(vp)) + rangelock_rlock(&(vp)->v_rl, (start), (end)) #define vn_rangelock_tryrlock(vp, start, end) \ - rangelock_tryrlock(&(vp)->v_rl, (start), (end), VI_MTX(vp)) + rangelock_tryrlock(&(vp)->v_rl, (start), (end)) #define vn_rangelock_wlock(vp, start, end) \ - rangelock_wlock(&(vp)->v_rl, (start), (end), VI_MTX(vp)) + rangelock_wlock(&(vp)->v_rl, (start), (end)) #define vn_rangelock_trywlock(vp, start, end) \ - rangelock_trywlock(&(vp)->v_rl, (start), (end), VI_MTX(vp)) + rangelock_trywlock(&(vp)->v_rl, (start), (end)) #define vn_irflag_read(vp) atomic_load_short(&(vp)->v_irflag) void vn_irflag_set_locked(struct vnode *vp, short toset); From nobody Tue Aug 6 04:06:35 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 4WdKVz6jD1z5SbT6; Tue, 06 Aug 2024 04:06:35 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdKVz65h9z4kBd; Tue, 6 Aug 2024 04:06:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722917195; 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=L0SCShTUwHO19Ua0eISUuzX3DEzBRCNLUeB3whw++us=; b=BFHBf1svUDEa4PAWGAJDx00uccrNkpOEn+qJlP7JLeaa/94VUgq307EiLPXuyW+GmAqFJj D/LhR7SUhTjYo8+ENkyDHGYt9dgBjyjcrbFuh55Ag/0tOVFKPOaTI/eUzGjQM6EM0do6vx MsihqBidOh1SUb05VW4injVJwG5w2hBcAQZkD/SB9TuAHiNsspEYYd7+UWWmHyWxDXJn5R k1UTOTsxAJ+vlf/XGh51+V0OKjAMk5FTE+JZ28A41QQ641KVlN3RD/WOjXep/+d+GnvOiD /l0lvxYPzZXOXceAUstGfh2EQfbkY2Qq1sUFn2UWy8+A6L8wuTYL4T67hOovgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722917195; a=rsa-sha256; cv=none; b=QBaTJr87qZ6sD/zPiEXCrv55mK2QQaa+TaABkw28yqQBMmmCHkxIDgUCFHwyQR5tAlalTs uXd3orwDppY74PTVugRurCZaOaqES38nUQAvB31HemNL5zrXm3DTA2pQ7hI5gzUDzycU5o /1fwqtC63ju80oHU7waB2zb5W0i4CnG0VaireK8jE9GmPXZaY38rvThNxCdwkcq8KIevC4 Jk0tvRkzRbA+czLLt8s82N6/Ec3TPtgtzwpZdk4eIm9kto7o99XZm+tRlxVmA4kWTfrUja yh1Owx6aWtVCjtzCfSCNU6OOTtlU+ZFekq5OBSjenPLyegUBxGlN4ujArSf+FQ== 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=1722917195; 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=L0SCShTUwHO19Ua0eISUuzX3DEzBRCNLUeB3whw++us=; b=IIoQ01R1UD3qz/qoanmcnhfHgMOd6MNUkPoxYzZth2wNuSxzCKOaVRstEvUUx29zJl9e4d jQh9QDWhei6dcFPt59r59s3T5xdpJLsa+4ROd4wYa7MrOCFy4XdAA+JmAtqeeD4XlFWyv9 TIbO8dIizET7QaLFgYkrS1u0c68t/skKX4ftzovPhpKq574ql2VzLz6D9pQnmKZpBsTMck 9wVR7EUml+FeKXoO2yo7l6JdYR+WMgUIBjTKpsDfwAu0irQkCxRjkZLtmkBS9SoI/MdzRp EfaRFIJXhj5mnnBZJ9Xl/wt0+GGS//pAXjq0U8NYMBFeSz2s5tgF3yx14h3vMg== 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 4WdKVz5k87zrb2; Tue, 6 Aug 2024 04:06:35 +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 47646Zrh004568; Tue, 6 Aug 2024 04:06:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47646ZRw004565; Tue, 6 Aug 2024 04:06:35 GMT (envelope-from git) Date: Tue, 6 Aug 2024 04:06:35 GMT Message-Id: <202408060406.47646ZRw004565@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 6c32d89ecabe - main - kern_rangelock.c: add rl_e_is_rlock() 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/main X-Git-Reftype: branch X-Git-Commit: 6c32d89ecabeba8fe5ad79a33aa134412175856e Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6c32d89ecabeba8fe5ad79a33aa134412175856e commit 6c32d89ecabeba8fe5ad79a33aa134412175856e Author: Konstantin Belousov AuthorDate: 2023-08-18 17:59:05 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-06 04:05:58 +0000 kern_rangelock.c: add rl_e_is_rlock() Reviewed by: markj, Olivier Certner Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D41787 --- sys/kern/kern_rangelock.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/kern/kern_rangelock.c b/sys/kern/kern_rangelock.c index 186a42caebf0..2ed26db49f19 100644 --- a/sys/kern/kern_rangelock.c +++ b/sys/kern/kern_rangelock.c @@ -134,6 +134,12 @@ rl_q_load(struct rl_q_entry **p) return ((struct rl_q_entry *)atomic_load_acq_ptr((uintptr_t *)p)); } +static bool +rl_e_is_rlock(const struct rl_q_entry *e) +{ + return ((e->rl_q_flags & RL_LOCK_TYPE_MASK) == RL_LOCK_READ); +} + void rangelock_unlock(struct rangelock *lock, void *cookie) { From nobody Tue Aug 6 04:06:36 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 4WdKW11fMQz5SbW4; Tue, 06 Aug 2024 04:06:37 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdKW10n2Lz4kVn; Tue, 6 Aug 2024 04:06:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722917197; 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=Q+/uv1VbExL7qd7DIoKDJCsLogqdm70aWbF9tDhfqcY=; b=KvcDYoEWICzylHfaKxMUKPgs706d+eoR58JLtOWnN5zS/KPo5TQd51L8ZDJLA/zyuocOlu JgX/R6CJ3KmqZhRsfsg1HlNhtCk77bPqmH4iXR3fBeMK0W7e1JEfsXdP/ZG/fHxoNVkxhR NH9q93dGtjQ6l6r6xKlJo8iL8Nuu6RNBGRwJJikBSKmxOMAPXDsoLQVn2OwMabnxY5wfgG ujv4SUKv9de8aN9IoiCRHE2JjYn2P19XJsaY8iJ9RqWr7qXmxGoPkVPgW8U21vPAXfJN2J ajXvyTonndCqDNmuDViUTUX3g3zbPTnvTUqQ/MRIiVsDD4nXvfLGQqphx6Mq0w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722917197; a=rsa-sha256; cv=none; b=J36Hye4Mh18gfwpXqAQi+EV2p7dvlWB4suNbzQ97fg8PDfnW40WOXVHt+XcBZAFNYuLt0q C9h04T2B6B9MPiYpSctDuAKMFHDHeR2i/aOdzVG8gRJN4J0ar6y5E+MrnBi2+FC1tACCaZ LvtoM0kEVkZ/ZnyQRf2osqSZgJakI9q2qc8lSAZZl2DVI9Q7XrPHidKhQ34vIUJFji2DRP smqoQG++RaqN2HEOsDUMG7NtvCpohpnDMlYn0Cu9tpYuUn9dNPFWiQJeA7/YusizQdeT+g 9+qILQ0fUhXweCBvc7aVIslsEJBfC7t4UDb3SDUpONoOJAK74+ffkonnkPJWLQ== 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=1722917197; 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=Q+/uv1VbExL7qd7DIoKDJCsLogqdm70aWbF9tDhfqcY=; b=UtvlaKfvCpepoc7SjAJGqc6oiGJkQTUM6nLf/itqquaGpj7NEb5YNDahCCvGM0FWzxM6AH hhWQENj5OclbNx40ZGPcPjgcILnpNyb/qN77eW2tlWsUXzs8njm9T5yNuKhr3o0nAbmuGh x63IGJ0h4NTflkKIuiUsX/Twjuxda0RXDZSiA9ZM7YrCoBiO4XdeR4CZBcb89U+0+GFPck 4Fpqo1rxQelAuXMJZSj2v4P5zllT4A9lrn5CMR+xvPE8Vcm8tR51+VXkazboxAcvii83ZH dU87pe/9OkIOcl+VWQF1KKH7dr6yk1O2InWknvsF+rvk14I51GmAdRWqCSGSeg== 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 4WdKW06k3Zzs99; Tue, 6 Aug 2024 04:06:36 +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 47646a1K004610; Tue, 6 Aug 2024 04:06:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47646aWe004607; Tue, 6 Aug 2024 04:06:36 GMT (envelope-from git) Date: Tue, 6 Aug 2024 04:06:36 GMT Message-Id: <202408060406.47646aWe004607@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5badbeeaf061 - main - Re-implement rangelocks part 2 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/main X-Git-Reftype: branch X-Git-Commit: 5badbeeaf0614568d37b2466d0f52676ff08a049 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5badbeeaf0614568d37b2466d0f52676ff08a049 commit 5badbeeaf0614568d37b2466d0f52676ff08a049 Author: Konstantin Belousov AuthorDate: 2023-08-18 17:32:01 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-06 04:05:58 +0000 Re-implement rangelocks part 2 Allow read locks to overlap. Reviewed by: markj, Olivier Certner Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D41787 --- sys/kern/kern_rangelock.c | 232 +++++++++++++++++++++++++++++++++------------- 1 file changed, 169 insertions(+), 63 deletions(-) diff --git a/sys/kern/kern_rangelock.c b/sys/kern/kern_rangelock.c index 2ed26db49f19..9c6b7fb871f9 100644 --- a/sys/kern/kern_rangelock.c +++ b/sys/kern/kern_rangelock.c @@ -121,11 +121,28 @@ rl_e_is_marked(const struct rl_q_entry *e) return (((uintptr_t)e & 1) != 0); } +static struct rl_q_entry * +rl_e_unmark_unchecked(const struct rl_q_entry *e) +{ + return ((struct rl_q_entry *)((uintptr_t)e & ~1)); +} + static struct rl_q_entry * rl_e_unmark(const struct rl_q_entry *e) { MPASS(rl_e_is_marked(e)); - return ((struct rl_q_entry *)((uintptr_t)e & ~1)); + return (rl_e_unmark_unchecked(e)); +} + +static void +rl_e_mark(struct rl_q_entry *e) +{ +#if defined(INVARIANTS) && defined(__LP64__) + int r = atomic_testandset_long((uintptr_t *)&e->rl_q_next, 0); + MPASS(r == 0); +#else + atomic_set_ptr((uintptr_t *)&e->rl_q_next, 1); +#endif } static struct rl_q_entry * @@ -140,42 +157,49 @@ rl_e_is_rlock(const struct rl_q_entry *e) return ((e->rl_q_flags & RL_LOCK_TYPE_MASK) == RL_LOCK_READ); } -void -rangelock_unlock(struct rangelock *lock, void *cookie) +static void +rangelock_unlock_int(struct rangelock *lock, struct rl_q_entry *e) { - struct rl_q_entry *e; - - e = cookie; MPASS(lock != NULL && e != NULL); MPASS(!rl_e_is_marked(rl_q_load(&e->rl_q_next))); MPASS(e->rl_q_owner == curthread); - sleepq_lock(&lock->sleepers); -#ifdef INVARIANTS - int r = atomic_testandset_long((uintptr_t *)&e->rl_q_next, 0); - MPASS(r == 0); -#else - atomic_set_ptr((uintptr_t *)&e->rl_q_next, 1); -#endif + rl_e_mark(e); lock->sleepers = false; sleepq_broadcast(&lock->sleepers, SLEEPQ_SLEEP, 0, 0); +} + +void +rangelock_unlock(struct rangelock *lock, void *cookie) +{ + sleepq_lock(&lock->sleepers); + rangelock_unlock_int(lock, cookie); sleepq_release(&lock->sleepers); } /* - * result: -1 if e1 before e2 - * 1 if e1 after e2 - * 0 if e1 and e2 overlap + * result: -1 if e1 before e2, or both locks are readers and e1 + * starts before or at e2 + * 1 if e1 after e2, or both locks are readers and e1 + * starts after e2 + * 0 if e1 and e2 overlap and at least one lock is writer */ static int rl_e_compare(const struct rl_q_entry *e1, const struct rl_q_entry *e2) { + bool rds; + if (e1 == NULL) return (1); - if (e1->rl_q_start >= e2->rl_q_end) - return (1); if (e2->rl_q_start >= e1->rl_q_end) return (-1); + rds = rl_e_is_rlock(e1) && rl_e_is_rlock(e2); + if (e2->rl_q_start >= e1->rl_q_start && rds) + return (-1); + if (e1->rl_q_start >= e2->rl_q_end) + return (1); + if (e1->rl_q_start >= e2->rl_q_start && rds) + return (1); return (0); } @@ -199,7 +223,95 @@ rl_q_cas(struct rl_q_entry **prev, struct rl_q_entry *old, (uintptr_t)new) != 0); } -static bool +enum RL_INSERT_RES { + RL_TRYLOCK_FAILED, + RL_LOCK_SUCCESS, + RL_LOCK_RETRY, +}; + +static enum RL_INSERT_RES +rl_r_validate(struct rangelock *lock, struct rl_q_entry *e, bool trylock, + struct rl_q_entry **free) +{ + struct rl_q_entry *cur, *next, **prev; + + prev = &e->rl_q_next; + cur = rl_q_load(prev); + MPASS(!rl_e_is_marked(cur)); /* nobody can unlock e yet */ + for (;;) { + if (cur == NULL || cur->rl_q_start > e->rl_q_end) + return (RL_LOCK_SUCCESS); + next = rl_q_load(&cur->rl_q_next); + if (rl_e_is_marked(next)) { + next = rl_e_unmark(next); + if (rl_q_cas(prev, cur, next)) { + cur->rl_q_free = *free; + *free = cur; + } + cur = next; + continue; + } + if (rl_e_is_rlock(cur)) { + prev = &cur->rl_q_next; + cur = rl_e_unmark_unchecked(rl_q_load(prev)); + continue; + } + if (!rl_e_is_marked(rl_q_load(&cur->rl_q_next))) { + sleepq_lock(&lock->sleepers); + if (rl_e_is_marked(rl_q_load(&cur->rl_q_next))) { + sleepq_release(&lock->sleepers); + continue; + } + rangelock_unlock_int(lock, e); + if (trylock) { + sleepq_release(&lock->sleepers); + return (RL_TRYLOCK_FAILED); + } + rl_insert_sleep(lock); + return (RL_LOCK_RETRY); + } + } +} + +static enum RL_INSERT_RES +rl_w_validate(struct rangelock *lock, struct rl_q_entry *e, + bool trylock, struct rl_q_entry **free) +{ + struct rl_q_entry *cur, *next, **prev; + + prev = &lock->head; + cur = rl_q_load(prev); + MPASS(!rl_e_is_marked(cur)); /* head is not marked */ + for (;;) { + if (cur == e) + return (RL_LOCK_SUCCESS); + next = rl_q_load(&cur->rl_q_next); + if (rl_e_is_marked(next)) { + next = rl_e_unmark(next); + if (rl_q_cas(prev, cur, next)) { + cur->rl_q_next = *free; + *free = cur; + } + cur = next; + continue; + } + if (cur->rl_q_end <= e->rl_q_start) { + prev = &cur->rl_q_next; + cur = rl_e_unmark_unchecked(rl_q_load(prev)); + continue; + } + sleepq_lock(&lock->sleepers); + rangelock_unlock_int(lock, e); + if (trylock) { + sleepq_release(&lock->sleepers); + return (RL_TRYLOCK_FAILED); + } + rl_insert_sleep(lock); + return (RL_LOCK_RETRY); + } +} + +static enum RL_INSERT_RES rl_insert(struct rangelock *lock, struct rl_q_entry *e, bool trylock, struct rl_q_entry **free) { @@ -208,14 +320,15 @@ rl_insert(struct rangelock *lock, struct rl_q_entry *e, bool trylock, again: prev = &lock->head; - if (rl_q_load(prev) == NULL && rl_q_cas(prev, NULL, e)) - return (true); - - for (cur = rl_q_load(prev);;) { - if (rl_e_is_marked(cur)) - goto again; + cur = rl_q_load(prev); + if (cur == NULL && rl_q_cas(prev, NULL, e)) + return (RL_LOCK_SUCCESS); + for (;;) { if (cur != NULL) { + if (rl_e_is_marked(cur)) + goto again; + next = rl_q_load(&cur->rl_q_next); if (rl_e_is_marked(next)) { next = rl_e_unmark(next); @@ -244,7 +357,7 @@ again: } if (trylock) { sleepq_release(&lock->sleepers); - return (false); + return (RL_TRYLOCK_FAILED); } rl_insert_sleep(lock); /* e is still valid */ @@ -253,7 +366,9 @@ again: e->rl_q_next = cur; if (rl_q_cas(prev, cur, e)) { atomic_thread_fence_acq(); - return (true); + return (rl_e_is_rlock(e) ? + rl_r_validate(lock, e, trylock, free) : + rl_w_validate(lock, e, trylock, free)); } /* Reset rl_q_next in case we hit fast path. */ e->rl_q_next = NULL; @@ -263,27 +378,30 @@ again: } static struct rl_q_entry * -rangelock_lock_int(struct rangelock *lock, struct rl_q_entry *e, - bool trylock) +rangelock_lock_int(struct rangelock *lock, bool trylock, vm_ooffset_t start, + vm_ooffset_t end, int locktype) { - struct rl_q_entry *free, *x, *xp; - bool res; - - free = NULL; - smr_enter(rl_smr); - res = rl_insert(lock, e, trylock, &free); - smr_exit(rl_smr); - MPASS(trylock || res); - if (!res) { - e->rl_q_free = free; - free = e; - e = NULL; - } - for (x = free; x != NULL; x = xp) { - MPASS(!rl_e_is_marked(x)); - xp = x->rl_q_free; - MPASS(!rl_e_is_marked(xp)); - uma_zfree_smr(rl_entry_zone, x); + struct rl_q_entry *e, *free, *x, *xp; + enum RL_INSERT_RES res; + + for (res = RL_LOCK_RETRY; res == RL_LOCK_RETRY;) { + free = NULL; + e = rlqentry_alloc(start, end, locktype); + smr_enter(rl_smr); + res = rl_insert(lock, e, trylock, &free); + smr_exit(rl_smr); + if (res == RL_TRYLOCK_FAILED) { + MPASS(trylock); + e->rl_q_free = free; + free = e; + e = NULL; + } + for (x = free; x != NULL; x = xp) { + MPASS(!rl_e_is_marked(x)); + xp = x->rl_q_free; + MPASS(!rl_e_is_marked(xp)); + uma_zfree_smr(rl_entry_zone, x); + } } return (e); } @@ -291,37 +409,25 @@ rangelock_lock_int(struct rangelock *lock, struct rl_q_entry *e, void * rangelock_rlock(struct rangelock *lock, vm_ooffset_t start, vm_ooffset_t end) { - struct rl_q_entry *e; - - e = rlqentry_alloc(start, end, RL_LOCK_READ); - return (rangelock_lock_int(lock, e, false)); + return (rangelock_lock_int(lock, false, start, end, RL_LOCK_READ)); } void * rangelock_tryrlock(struct rangelock *lock, vm_ooffset_t start, vm_ooffset_t end) { - struct rl_q_entry *e; - - e = rlqentry_alloc(start, end, RL_LOCK_READ); - return (rangelock_lock_int(lock, e, true)); + return (rangelock_lock_int(lock, true, start, end, RL_LOCK_READ)); } void * rangelock_wlock(struct rangelock *lock, vm_ooffset_t start, vm_ooffset_t end) { - struct rl_q_entry *e; - - e = rlqentry_alloc(start, end, RL_LOCK_WRITE); - return (rangelock_lock_int(lock, e, true)); + return (rangelock_lock_int(lock, true, start, end, RL_LOCK_WRITE)); } void * rangelock_trywlock(struct rangelock *lock, vm_ooffset_t start, vm_ooffset_t end) { - struct rl_q_entry *e; - - e = rlqentry_alloc(start, end, RL_LOCK_WRITE); - return (rangelock_lock_int(lock, e, true)); + return (rangelock_lock_int(lock, true, start, end, RL_LOCK_WRITE)); } #ifdef INVARIANT_SUPPORT From nobody Tue Aug 6 04:06:37 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 4WdKW23ltRz5Sbbr; Tue, 06 Aug 2024 04:06: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdKW20y4Bz4kW3; Tue, 6 Aug 2024 04:06:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722917198; 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=XRLGexf4rNdB+XjYu++3tYIvFwELAaLEog24bsn9g5E=; b=ikutxVe8zDzdbPKzrFTIrrJUVb7zoCF6mQGdhdD4aUuyu985ykU1ULUJJg9LgJaePmyiBQ W41BA5g5G444UZWrnwtXRY+7Uan0p3IiUMhle0qG/rZXiqRPasbnVpEiio3cOfbm49l/d8 THJ9td8a+f2arKs666JPweETSS4ocWKHhy3ndMfWo+P1mGi8k0EEB8N9ffvKEwo7l2pCf5 1SuDFjZl5ZgaOq72pTt8vo8cSXX6TJLO/1L89JDRAYQosEGa3EfqMJ/JE1zfSJg4vAM8K8 sdxotpj2uErC7Oiz/zntFmBVY4E/nCQgKWENh620VekNPnSLy1tdiSqPJoCLTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722917198; a=rsa-sha256; cv=none; b=GB3AD58rNQFq+hNdVg4EeLO6Ysb6B4qQ/5YW2iO0CScmawgtv7vsJh22d26TKkp8fHDxCa f/aQvmDS/8r7KMJDRrvoENs1yp0oUAfTp9yR/C6Eye0cKviOgnwLxxbquXX5LfSa0d9o00 STCMhVLA8mPMMEK8eAc9rFU57Tz814BX6HUGUbg1yBQr/DrDbBUyJZJmjIPkmFfHWIiiG9 6zB/TjzbSsfeCe9435M3VSrKVtjdtOZfbyTr25zBQqsZka6fcvfKSscdpFcklawJVt366T LV7bonoTmdVXI6120nlfbxOpGm8/6EPV/YsytyMF6pwcB6CYSr7/NJIirBaIAQ== 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=1722917198; 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=XRLGexf4rNdB+XjYu++3tYIvFwELAaLEog24bsn9g5E=; b=xw4PAZmA2A7h+OJ08XFyUWds0TxBq2Aq9J/VuEJDkOW3bFtDhiUjZ03FC/Ef8a1F9tRPuF zEPkESe8qRZOK2dGFi+YscZZnKsws5q51LEoOOfvO4Za3JByMjZjy2RKaJl3n/5dYVjOPf rP0/TC0neZCJbQQhqydSrt4df/nM3n167i8DSvNioiy8E6mGUwepr+42jtsW2qvgdw5PAj kpR73k33Mj3W0aYMDrCHH5HXiC5BeL56FqLaeBjP4DXRa0IeXYsmZZsCwCnyeP2OMthj5F +HDS2CAvBA/uTXqSsb4IDAQ8DI9vZaAos6HNeDTqJhIzvO+MQ7SIYtV8JgSbYw== 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 4WdKW20MZrzs7S; Tue, 6 Aug 2024 04:06:38 +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 47646bbG004643; Tue, 6 Aug 2024 04:06:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47646btU004640; Tue, 6 Aug 2024 04:06:37 GMT (envelope-from git) Date: Tue, 6 Aug 2024 04:06:37 GMT Message-Id: <202408060406.47646btU004640@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: c31580080e05 - main - Microoptimize rangelock_unlock_int() 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/main X-Git-Reftype: branch X-Git-Commit: c31580080e055573a32d886b1ea83bebd9ef4e77 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c31580080e055573a32d886b1ea83bebd9ef4e77 commit c31580080e055573a32d886b1ea83bebd9ef4e77 Author: Konstantin Belousov AuthorDate: 2023-10-04 18:55:49 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-06 04:05:58 +0000 Microoptimize rangelock_unlock_int() Only broadcast if there are sleepers. Suggested by: markj Reviewed by: markj, Olivier Certner Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D41787 --- sys/kern/kern_rangelock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_rangelock.c b/sys/kern/kern_rangelock.c index 9c6b7fb871f9..355b2125dd9b 100644 --- a/sys/kern/kern_rangelock.c +++ b/sys/kern/kern_rangelock.c @@ -160,13 +160,17 @@ rl_e_is_rlock(const struct rl_q_entry *e) static void rangelock_unlock_int(struct rangelock *lock, struct rl_q_entry *e) { + bool sleepers; + MPASS(lock != NULL && e != NULL); MPASS(!rl_e_is_marked(rl_q_load(&e->rl_q_next))); MPASS(e->rl_q_owner == curthread); rl_e_mark(e); + sleepers = lock->sleepers; lock->sleepers = false; - sleepq_broadcast(&lock->sleepers, SLEEPQ_SLEEP, 0, 0); + if (sleepers) + sleepq_broadcast(&lock->sleepers, SLEEPQ_SLEEP, 0, 0); } void From nobody Tue Aug 6 04:06:39 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 4WdKW34hbTz5SbW7; Tue, 06 Aug 2024 04:06:39 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdKW31RF7z4kbZ; Tue, 6 Aug 2024 04:06:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722917199; 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=/Ar2TTZxdhSbbhnHjnbaqWozukRpB1JC2Ln/LQ6+qiQ=; b=JFu6KID0vP0cPxY4nRM9bx/q/P1h+lZee99wxarD+uj9/u1Xlfv0up53RtPLtixwK1Ciqd 2WTtvOzjsq5EApxZiqs3TK3x/bfk8rF7bUs/6kxnOnyxIDp9xnw04zjlJ+c2gnBQNJ+Q+W ousN3GeQIQRYSAuXMDCRk4tfg6X9lbobRYA8y8TlN4sjobUdWYPdQZ1WpsuWrwzMO2k/eI raN5nQYtZe2X6aL89li4AU29dvLB4dF4q8096JmnQRXYVf0NWBA7zpoz/2iXAdhEr6zQim jjJAxncmyGEWP9igXyIQ6bG5uQTaRYUM75JDCj0zyO2Hy+c6vfQS2BZRx0qObg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722917199; a=rsa-sha256; cv=none; b=qZDgConPJs4Tp9I1xO+/V+JAL5/SlPTksy+ryQV5YFS0W1xY2wotbLG2C6ZxdPRKLRWx+f ETBx3fDimGqYpUicvR2ALNJ5425s0XOJOyDCF7cuyhWewskVg2xgI+ttvY4Aic0310tCTo IFxRxXk2+sedVnvgJM2idJQ3Rff6WYXRXz4fXePNlCcQ/C/bSbHk7q4dPnPD3nG4SLg+VQ O1Bum5f413fLtiQ85jwchLR0BnqK6qz/hk8FGjKmGCbKzWKoiho2wnWfeLiC+AeRuLEQVq Nh2juabvag67ghu3cZPlSo48wHGJQEkpdL0FwOg/xKz51yh+eiWksbVEZELmZw== 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=1722917199; 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=/Ar2TTZxdhSbbhnHjnbaqWozukRpB1JC2Ln/LQ6+qiQ=; b=Hky0euggJmKzQwSugDCaDuEyRhPqkj9JMOHaMQYj1Dhd6x/GqrGuPFU+IugSkprbIzRrzb d/S+Njxg7zf4Ao2QqmDTc0amypUWV3FzNYyT02JwpUfPG56CIbemlOHNNcSBov91flmSrE kCYEmxuXSay+A6XWHOHkX1OsanwcFr6B61COHA3KxxmALRoBJM4NUxUsDJvTn4hSjsgVQf l+42DpRZmuEms6KXrjtIgBVGIj8izzjo365noYsZYCjSTBeIqkop4nlaaiqdixE4+gs4yT GmOGN7JXuuZYCD6r9Qky5trKGD0asiQ4oZQQpYCnIc3+w9aO18m/4Lhb+H7zGQ== 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 4WdKW313r8zs7T; Tue, 6 Aug 2024 04:06:39 +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 47646djS004712; Tue, 6 Aug 2024 04:06:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47646dvJ004709; Tue, 6 Aug 2024 04:06:39 GMT (envelope-from git) Date: Tue, 6 Aug 2024 04:06:39 GMT Message-Id: <202408060406.47646dvJ004709@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: ff1ae3b3639d - main - rangelocks: restore caching of the single rl entry in the struct thread 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/main X-Git-Reftype: branch X-Git-Commit: ff1ae3b3639d39a6485cfc655bf565cd04b9caa6 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ff1ae3b3639d39a6485cfc655bf565cd04b9caa6 commit ff1ae3b3639d39a6485cfc655bf565cd04b9caa6 Author: Konstantin Belousov AuthorDate: 2023-08-23 23:29:50 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-06 04:05:58 +0000 rangelocks: restore caching of the single rl entry in the struct thread Reviewed by: markj, Olivier Certner Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D41787 --- sys/kern/kern_rangelock.c | 33 +++++++++++++++++++++++++++------ sys/kern/kern_thread.c | 1 + sys/sys/rangelock.h | 1 + 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_rangelock.c b/sys/kern/kern_rangelock.c index 355b2125dd9b..2f16569b19aa 100644 --- a/sys/kern/kern_rangelock.c +++ b/sys/kern/kern_rangelock.c @@ -82,8 +82,15 @@ static struct rl_q_entry * rlqentry_alloc(vm_ooffset_t start, vm_ooffset_t end, int flags) { struct rl_q_entry *e; - - e = uma_zalloc_smr(rl_entry_zone, M_WAITOK); + struct thread *td; + + td = curthread; + if (td->td_rlqe != NULL) { + e = td->td_rlqe; + td->td_rlqe = NULL; + } else { + e = uma_zalloc_smr(rl_entry_zone, M_WAITOK); + } e->rl_q_next = NULL; e->rl_q_free = NULL; e->rl_q_start = start; @@ -95,6 +102,12 @@ rlqentry_alloc(vm_ooffset_t start, vm_ooffset_t end, int flags) return (e); } +void +rangelock_entry_free(struct rl_q_entry *e) +{ + uma_zfree_smr(rl_entry_zone, e); +} + void rangelock_init(struct rangelock *lock) { @@ -106,6 +119,7 @@ void rangelock_destroy(struct rangelock *lock) { struct rl_q_entry *e, *ep; + struct thread *td; MPASS(!lock->sleepers); for (e = (struct rl_q_entry *)atomic_load_ptr(&lock->head); @@ -386,8 +400,10 @@ rangelock_lock_int(struct rangelock *lock, bool trylock, vm_ooffset_t start, vm_ooffset_t end, int locktype) { struct rl_q_entry *e, *free, *x, *xp; + struct thread *td; enum RL_INSERT_RES res; + td = curthread; for (res = RL_LOCK_RETRY; res == RL_LOCK_RETRY;) { free = NULL; e = rlqentry_alloc(start, end, locktype); @@ -401,10 +417,15 @@ rangelock_lock_int(struct rangelock *lock, bool trylock, vm_ooffset_t start, e = NULL; } for (x = free; x != NULL; x = xp) { - MPASS(!rl_e_is_marked(x)); - xp = x->rl_q_free; - MPASS(!rl_e_is_marked(xp)); - uma_zfree_smr(rl_entry_zone, x); + MPASS(!rl_e_is_marked(x)); + xp = x->rl_q_free; + MPASS(!rl_e_is_marked(xp)); + if (td->td_rlqe == NULL) { + smr_synchronize(rl_smr); + td->td_rlqe = x; + } else { + uma_zfree_smr(rl_entry_zone, x); + } } } return (e); diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index c951e7297c89..9c3694feb945 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -480,6 +480,7 @@ thread_fini(void *mem, int size) EVENTHANDLER_DIRECT_INVOKE(thread_fini, td); turnstile_free(td->td_turnstile); sleepq_free(td->td_sleepqueue); + rangelock_entry_free(td->td_rlqe); umtx_thread_fini(td); MPASS(td->td_sel == NULL); } diff --git a/sys/sys/rangelock.h b/sys/sys/rangelock.h index 310371bef879..60f394b67677 100644 --- a/sys/sys/rangelock.h +++ b/sys/sys/rangelock.h @@ -65,6 +65,7 @@ void *rangelock_wlock(struct rangelock *lock, vm_ooffset_t start, vm_ooffset_t end); void *rangelock_trywlock(struct rangelock *lock, vm_ooffset_t start, vm_ooffset_t end); +void rangelock_entry_free(struct rl_q_entry *e); #if defined(INVARIANTS) || defined(INVARIANT_SUPPORT) void _rangelock_cookie_assert(void *cookie, int what, const char *file, int line); From nobody Tue Aug 6 04:06:40 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 4WdKW43TCHz5SbQW; Tue, 06 Aug 2024 04:06:40 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdKW42GgHz4khM; Tue, 6 Aug 2024 04:06:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722917200; 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=sz1cN0BeT7v/QLJtmLGlna4FEPe+VNCUXXi4zQCXzjE=; b=I9D7aQL4Wirqo1mQbD+mHaVkXnH5kKuQYY+HArhJ9WI1IYS26dhMV381fJyNZvPorKvjwp dWG2MCC4l7bJnsZLkDVB28CmBekh+WDrbBC0s07ecjnxu+PuQBxFyjJvpCQbEDFO5+N7+r Gm+kjUBbitn1WrvFr1VLSk9Ffp/AFREnvR/hVKYB2fvFh7IzLwm8y974pzjFePHwf7z3Xy 7iURIbIlWiFUTPZsE9ZVe4PsQFCEz2x5+WNyOCtxg9PDRBGxdWjuYiI7Vm30VxoyAjx+VG rKQaCndlQLoCoR1D2M23tWtmp66HlJc96LtKubg4TKHuzrjS1IGHVGRw8+ut6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722917200; a=rsa-sha256; cv=none; b=PM+v1lQpZXJ/TpLBJ4G00dGTPzv/xKGSDVaxL+J1sLzFUAWWrhaOh5T8xxFfHVK2AUjoog If+nlUtTkUr7FsKGxe4VwWaedBgDB52O3CRLBGZ5XRvgrj7m3z53Dsi7f/15k55I0KKOH4 INFjSrzaEp8lWPI4nJPUtJB2JFxiNqMao9G1nTJHoUz3IY5UvJDPZfypQFh6IPlwfjHSK4 /wtU4bU1mnNwZRA3/4yvrWHXi54Jx6RJgKuQ/lWidcAv0XW5kbzpMKH4Lk5UDjiu15xHZK HCWTu8KKeYOkeZo0c2D3Upndws8Y3JJK9hLqvScyoXYmAEDe6yGu0Ehc/j3FNA== 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=1722917200; 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=sz1cN0BeT7v/QLJtmLGlna4FEPe+VNCUXXi4zQCXzjE=; b=tobrDwncMas62o2kRGDJqLz9lz4jlfXogOhsP/s2gVa3PjbFhlpH5sBN5pz8DOMkSpVXSr 0ieMwTiuTlXWEhwQL613u3aSPwGCIfQhJ8ZiOZUrEqSgYqUXTf7E+rDp36ksSjUYmmnZts V4/jbltxUD/77gzmiJnZR3erY1mh+tQQI/OteBKVAwklppH3UtGUbvl1JMzCDbfHFvYU8L KgvJF7NF7gHaNe8wjqrsC6xdLVveJ1RYnV4uIXZzhTjjCVGhpm+3IfTPaUdiXIInYX+f1i rJTT/RPADryWjQnzzOKt20qbvgJ1Yv3URleLZQA1uW7Se4STM39kra2w7Q4zsw== 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 4WdKW41sYBzs7V; Tue, 6 Aug 2024 04:06:40 +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 47646exI004764; Tue, 6 Aug 2024 04:06:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47646e5q004761; Tue, 6 Aug 2024 04:06:40 GMT (envelope-from git) Date: Tue, 6 Aug 2024 04:06:40 GMT Message-Id: <202408060406.47646e5q004761@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 9ef425e560a9 - main - rangelocks: add fast cheating 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: 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/main X-Git-Reftype: branch X-Git-Commit: 9ef425e560a97cabd1862e803eeb48468f89de18 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9ef425e560a97cabd1862e803eeb48468f89de18 commit 9ef425e560a97cabd1862e803eeb48468f89de18 Author: Konstantin Belousov AuthorDate: 2023-08-24 23:16:02 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-06 04:05:58 +0000 rangelocks: add fast cheating mode Reviewed by: markj, Olivier Certner Tested by: pho Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D41787 --- sys/kern/kern_rangelock.c | 239 ++++++++++++++++++++++++++++++++++++++++++++-- sys/sys/rangelock.h | 2 +- 2 files changed, 234 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_rangelock.c b/sys/kern/kern_rangelock.c index 2f16569b19aa..5ec443d3199c 100644 --- a/sys/kern/kern_rangelock.c +++ b/sys/kern/kern_rangelock.c @@ -35,9 +35,223 @@ #include #include #include +#include #include +/* + * Immediately after initialization (subject to 'rangelock_cheat' + * below), and until a request comes that conflicts with granted ones + * based on type, rangelocks serve requests in the "cheating" mode. + * In this mode, a rangelock behaves like a sxlock, as if each request + * covered the whole range of the protected object. On receiving a + * conflicting request (any request while a write request is + * effective, or any write request while some read ones are + * effective), all requests granted in "cheating" mode are drained, + * and the rangelock then switches to effectively keeping track of the + * precise range of each new request. + * + * Normal sx implementation is not used to not bloat structures (most + * important, vnodes) which embeds rangelocks. + * + * The cheating greatly helps very common pattern where file is first + * written single-threaded, and then read by many processes. + * + * Lock is in cheat mode when RL_CHEAT_CHEATING bit is set in the + * lock->head. Special cookies are returned in this mode, and + * trylocks are same as normal locks but do not drain. + */ + +static int rangelock_cheat = 1; +SYSCTL_INT(_debug, OID_AUTO, rangelock_cheat, CTLFLAG_RWTUN, + &rangelock_cheat, 0, + ""); + +#define RL_CHEAT_MASK 0x7 +#define RL_CHEAT_CHEATING 0x1 +/* #define RL_CHEAT_RLOCKED 0x0 */ +#define RL_CHEAT_WLOCKED 0x2 +#define RL_CHEAT_DRAINING 0x4 + +#define RL_CHEAT_READER 0x8 + +#define RL_RET_CHEAT_RLOCKED 0x1100 +#define RL_RET_CHEAT_WLOCKED 0x2200 + +static bool +rangelock_cheat_lock(struct rangelock *lock, int locktype, bool trylock, + void **cookie) +{ + uintptr_t v, x; + + v = (uintptr_t)atomic_load_ptr(&lock->head); + if ((v & RL_CHEAT_CHEATING) == 0) + return (false); + if ((v & RL_CHEAT_DRAINING) != 0) { +drain: + if (trylock) { + *cookie = NULL; + return (true); + } + sleepq_lock(&lock->head); +drain1: + DROP_GIANT(); + for (;;) { + v = (uintptr_t)atomic_load_ptr(&lock->head); + if ((v & RL_CHEAT_DRAINING) == 0) + break; + sleepq_add(&lock->head, NULL, "ranged1", 0, 0); + sleepq_wait(&lock->head, PRI_USER); + sleepq_lock(&lock->head); + } + sleepq_release(&lock->head); + PICKUP_GIANT(); + return (false); + } + + switch (locktype) { + case RL_LOCK_READ: + for (;;) { + if ((v & RL_CHEAT_WLOCKED) != 0) { + if (trylock) { + *cookie = NULL; + return (true); + } + x = v | RL_CHEAT_DRAINING; + sleepq_lock(&lock->head); + if (atomic_fcmpset_rel_ptr(&lock->head, &v, + x) != 0) + goto drain1; + sleepq_release(&lock->head); + /* Possibly forgive passed conflict */ + continue; + } + x = (v & ~RL_CHEAT_MASK) + RL_CHEAT_READER; + x |= RL_CHEAT_CHEATING; + if (atomic_fcmpset_acq_ptr(&lock->head, &v, x) != 0) + break; + if ((v & RL_CHEAT_CHEATING) == 0) + return (false); + if ((v & RL_CHEAT_DRAINING) != 0) + goto drain; + } + *(uintptr_t *)cookie = RL_RET_CHEAT_RLOCKED; + break; + case RL_LOCK_WRITE: + for (;;) { + if ((v & ~RL_CHEAT_MASK) >= RL_CHEAT_READER || + (v & RL_CHEAT_WLOCKED) != 0) { + if (trylock) { + *cookie = NULL; + return (true); + } + x = v | RL_CHEAT_DRAINING; + sleepq_lock(&lock->head); + if (atomic_fcmpset_rel_ptr(&lock->head, &v, + x) != 0) + goto drain1; + sleepq_release(&lock->head); + /* Possibly forgive passed conflict */ + continue; + } + x = RL_CHEAT_WLOCKED | RL_CHEAT_CHEATING; + if (atomic_fcmpset_acq_ptr(&lock->head, &v, x) != 0) + break; + if ((v & RL_CHEAT_CHEATING) == 0) + return (false); + if ((v & RL_CHEAT_DRAINING) != 0) + goto drain; + } + *(uintptr_t *)cookie = RL_RET_CHEAT_WLOCKED; + break; + default: + __assert_unreachable(); + break; + } + return (true); +} + +static bool +rangelock_cheat_unlock(struct rangelock *lock, void *cookie) +{ + uintptr_t v, x; + + v = (uintptr_t)atomic_load_ptr(&lock->head); + if ((v & RL_CHEAT_CHEATING) == 0) + return (false); + + MPASS((uintptr_t)cookie == RL_RET_CHEAT_WLOCKED || + (uintptr_t)cookie == RL_RET_CHEAT_RLOCKED); + + switch ((uintptr_t)cookie) { + case RL_RET_CHEAT_RLOCKED: + for (;;) { + MPASS((v & ~RL_CHEAT_MASK) >= RL_CHEAT_READER); + MPASS((v & RL_CHEAT_WLOCKED) == 0); + x = (v & ~RL_CHEAT_MASK) - RL_CHEAT_READER; + if ((v & RL_CHEAT_DRAINING) != 0) { + if (x != 0) { + x |= RL_CHEAT_DRAINING | + RL_CHEAT_CHEATING; + if (atomic_fcmpset_rel_ptr(&lock->head, + &v, x) != 0) + break; + } else { + sleepq_lock(&lock->head); + if (atomic_fcmpset_rel_ptr(&lock->head, + &v, x) != 0) { + sleepq_broadcast( + &lock->head, + SLEEPQ_SLEEP, 0, 0); + sleepq_release(&lock->head); + break; + } + sleepq_release(&lock->head); + } + } else { + x |= RL_CHEAT_CHEATING; + if (atomic_fcmpset_rel_ptr(&lock->head, &v, + x) != 0) + break; + } + } + break; + case RL_RET_CHEAT_WLOCKED: + for (;;) { + MPASS((v & RL_CHEAT_WLOCKED) != 0); + if ((v & RL_CHEAT_DRAINING) != 0) { + sleepq_lock(&lock->head); + atomic_store_ptr(&lock->head, 0); + sleepq_broadcast(&lock->head, + SLEEPQ_SLEEP, 0, 0); + sleepq_release(&lock->head); + break; + } else { + if (atomic_fcmpset_ptr(&lock->head, &v, + RL_CHEAT_CHEATING) != 0) + break; + } + } + break; + default: + __assert_unreachable(); + break; + } + return (true); +} + +static bool +rangelock_cheat_destroy(struct rangelock *lock) +{ + uintptr_t v; + + v = (uintptr_t)atomic_load_ptr(&lock->head); + if ((v & RL_CHEAT_CHEATING) == 0) + return (false); + MPASS(v == RL_CHEAT_CHEATING); + return (true); +} + /* * Implementation of range locks based on the paper * https://doi.org/10.1145/3342195.3387533 @@ -112,16 +326,17 @@ void rangelock_init(struct rangelock *lock) { lock->sleepers = false; - atomic_store_ptr(&lock->head, NULL); + atomic_store_ptr(&lock->head, rangelock_cheat ? RL_CHEAT_CHEATING : 0); } void rangelock_destroy(struct rangelock *lock) { struct rl_q_entry *e, *ep; - struct thread *td; MPASS(!lock->sleepers); + if (rangelock_cheat_destroy(lock)) + return; for (e = (struct rl_q_entry *)atomic_load_ptr(&lock->head); e != NULL; e = rl_e_unmark(ep)) { ep = atomic_load_ptr(&e->rl_q_next); @@ -190,6 +405,9 @@ rangelock_unlock_int(struct rangelock *lock, struct rl_q_entry *e) void rangelock_unlock(struct rangelock *lock, void *cookie) { + if (rangelock_cheat_unlock(lock, cookie)) + return; + sleepq_lock(&lock->sleepers); rangelock_unlock_int(lock, cookie); sleepq_release(&lock->sleepers); @@ -297,7 +515,7 @@ rl_w_validate(struct rangelock *lock, struct rl_q_entry *e, { struct rl_q_entry *cur, *next, **prev; - prev = &lock->head; + prev = (struct rl_q_entry **)&lock->head; cur = rl_q_load(prev); MPASS(!rl_e_is_marked(cur)); /* head is not marked */ for (;;) { @@ -337,7 +555,7 @@ rl_insert(struct rangelock *lock, struct rl_q_entry *e, bool trylock, int r; again: - prev = &lock->head; + prev = (struct rl_q_entry **)&lock->head; cur = rl_q_load(prev); if (cur == NULL && rl_q_cas(prev, NULL, e)) return (RL_LOCK_SUCCESS); @@ -401,8 +619,11 @@ rangelock_lock_int(struct rangelock *lock, bool trylock, vm_ooffset_t start, { struct rl_q_entry *e, *free, *x, *xp; struct thread *td; + void *cookie; enum RL_INSERT_RES res; + if (rangelock_cheat_lock(lock, locktype, trylock, &cookie)) + return (cookie); td = curthread; for (res = RL_LOCK_RETRY; res == RL_LOCK_RETRY;) { free = NULL; @@ -446,7 +667,7 @@ rangelock_tryrlock(struct rangelock *lock, vm_ooffset_t start, vm_ooffset_t end) void * rangelock_wlock(struct rangelock *lock, vm_ooffset_t start, vm_ooffset_t end) { - return (rangelock_lock_int(lock, true, start, end, RL_LOCK_WRITE)); + return (rangelock_lock_int(lock, false, start, end, RL_LOCK_WRITE)); } void * @@ -470,6 +691,7 @@ DB_SHOW_COMMAND(rangelock, db_show_rangelock) { struct rangelock *lock; struct rl_q_entry *e, *x; + uintptr_t v; if (!have_addr) { db_printf("show rangelock addr\n"); @@ -478,7 +700,12 @@ DB_SHOW_COMMAND(rangelock, db_show_rangelock) lock = (struct rangelock *)addr; db_printf("rangelock %p sleepers %d\n", lock, lock->sleepers); - for (e = lock->head;;) { + v = lock->head; + if ((v & RL_CHEAT_CHEATING) != 0) { + db_printf(" cheating head %#jx\n", (uintmax_t)v); + return; + } + for (e = (struct rl_q_entry *)(lock->head);;) { x = rl_e_is_marked(e) ? rl_e_unmark(e) : e; if (x == NULL) break; diff --git a/sys/sys/rangelock.h b/sys/sys/rangelock.h index 60f394b67677..127f101ddc2e 100644 --- a/sys/sys/rangelock.h +++ b/sys/sys/rangelock.h @@ -48,7 +48,7 @@ struct rl_q_entry; * owners are for read. */ struct rangelock { - struct rl_q_entry *head; + uintptr_t head; bool sleepers; }; From nobody Tue Aug 6 04:06:41 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 4WdKW55R3xz5SbTN; Tue, 06 Aug 2024 04:06:41 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdKW53TfBz4kc0; Tue, 6 Aug 2024 04:06:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722917201; 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=y1/VChQpksxCMqbm8BEkL9stqnTcEquTmvHF0Us+PHs=; b=ReV2NkZtRuSz2jtlwO6ok9JY/qtxuhtxNUicy6RHsCzPUghJdg8vNKydnO77dEtWwBXxzk +zvyglb+aM4P+cfcuHrYbO1rWB5IlnoJqnpxt0pHX0ShL83tbJeVuPJsYC78iYQdNGkkYK DEU0tmLQQ5xxP6OWzmn46mx5XqqTO88WyUuURyWAptaWo80qwqAfNyYM6w/WwoEViuQ23f qLULJFwIOsQ4X31ymzytP144qYZL0+nN0Cd+jtTfJhD8q7PaobpBUg7rUbKGLdrgYqjOui Ezp5bsiFjoWOd8Ka42Y1ycZLg6xrRSeJwgSD1MWyXZRWwHN5F0SOtWdhRU7a8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722917201; a=rsa-sha256; cv=none; b=G9lOYLO3Ewo2p3nF9EborKzsj3d4espqkYLMKFozDoRt8KG3hewN7jPVvTb0v3Uo5kOPQN 5VZ8+xF/ZrlctLQzCKGCgLMBN1Alcs+BSpO1valHZ29dw7xZ6CC2lHo+lRu/BLvkuj/UQm gzk/J8GKjMwNtMQqJ5NELcolPeavB4TH9HGTf6Gwwv2xsFe3sGJWGHOuveWlLaWXsQ09Ko jnk76cFoahAWilFTzc5O++vsvJFrK1DpbAtNLHQErNhvQqSBdgD62qUSyGnFiV8RCC6K9s +xzdWtm6irLyabTh+JuSdbV2jmh6X5pqXnHf1OAWS6UghmxV7QJSm27JP4gpQQ== 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=1722917201; 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=y1/VChQpksxCMqbm8BEkL9stqnTcEquTmvHF0Us+PHs=; b=OsNMIE3eW+9asjZU3jgUw5GwE6xKBVDnKfmnUBWhN6TngnYdTCi4anYwgXRFe6s4NzOuFX ewTDQTxwPapgp8PgYB1cMXGiVoM0QBob/WZffPSmLLmtCW9NxkVWRbiGURBF3NFRiQhPUS 7P22JsHlcbBPvh7BevZN0dcB9SCDpo+lZqx+AgaruAuX9oY3L34isBzvVkllOHHmb9Y8eZ rRONf9/8mAd9eDF3TgVzrgWpgHqk1XHp98Un2kFpHNGL25wpfETM0IFNya+XW7GqxWYvx4 2/yTTCuKSOOhT+rUlMk+BOw1Z9B1P8A+fnjNdB3K2j4OAVXdNyes6RkqxxNgCA== 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 4WdKW5361TzrqQ; Tue, 6 Aug 2024 04:06:41 +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 47646fpX004812; Tue, 6 Aug 2024 04:06:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 47646fP3004809; Tue, 6 Aug 2024 04:06:41 GMT (envelope-from git) Date: Tue, 6 Aug 2024 04:06:41 GMT Message-Id: <202408060406.47646fP3004809@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: d8a16b6a4c44 - main - kern_rangelock.c: add Foundation copyright, remove sys/cdefs.h include 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/main X-Git-Reftype: branch X-Git-Commit: d8a16b6a4c4479a50a0620136b73ed287ff29c1d Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d8a16b6a4c4479a50a0620136b73ed287ff29c1d commit d8a16b6a4c4479a50a0620136b73ed287ff29c1d Author: Konstantin Belousov AuthorDate: 2023-08-30 03:43:16 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-06 04:05:58 +0000 kern_rangelock.c: add Foundation copyright, remove sys/cdefs.h include Also drop 'All rights reserved' line from my copyright. Reviewed by: markj, Olivier Certner Discussed with: emaste (whole series) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D41787 --- sys/kern/kern_rangelock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_rangelock.c b/sys/kern/kern_rangelock.c index 5ec443d3199c..89b52d2550f0 100644 --- a/sys/kern/kern_rangelock.c +++ b/sys/kern/kern_rangelock.c @@ -2,7 +2,11 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009 Konstantin Belousov - * All rights reserved. + * Copyright (c) 2023 The FreeBSD Foundation + * + * Portions of this software were developed by + * Konstantin Belousov under sponsorship from + * the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From nobody Tue Aug 6 10:56:07 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 4WdVbX4YVJz5TBtQ for ; Tue, 06 Aug 2024 10:56:08 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdVbX0FGBz4S3q; Tue, 6 Aug 2024 10:56:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722941768; 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=7CZKyhL5LyTYvj6vU3iJDmLogRxTqEC3BJ12knhptuk=; b=aOVo/J4D2dKBeRse7AW8VdAoh7qA1wnbJueykH5r0zGIe9hqeOamOI+r/2CWj+0dPbsAiw b2mtDQbR9+i2TnErqdzgrJCdMdy0IDOnghy7gdx5uz7xp2kpOBp0Ku5bsBpYgmWeofUp5j ihDR3go7bYVE4T4ZBro/Yzu0gOwTHWobrT9Nmezo433p9sjc7aYRU/4RidB21Told+CApZ ZBEGFtcXBfPzZBQ8xY0eK6E4w5ZzqYB/+vL0VPD/W+chwyTArJtXuj+fbTN3VKRRn8LHLi rsqYbvIoBwbf313p/vCPYC4K2jSYPMlGUULPiJUtMEaJWM3S4ZJ44aRGnzqofA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722941768; a=rsa-sha256; cv=none; b=LFoecj/WbdtW9j51MuIEvJphsOHDfuptj+IW263sFBi7dw/5Pz9/pBZ8TqDnEmuB1fVufD gD3YX4KWBiQZKeIh9gI6G+gvKJgVNSqnSvDDMg9fuitVtZvNIGrRMjCxz6uvibO9rTPKpT gM7Dr9fnDFr5ts80fD6v6t5+DGoJXC5u9Vu9DQZjHYejrODE7NAxjc/+U4pwjomgNgOzJu BacgCLcgRp9ehzOGqKFI1lxdkNVqIQKg2mMWMiXqNRE6mzBRBrQidi6XgFws9cl1uGfVZW 0K7N/ZlYxnOIguiYuvimmfmYirK+uxLN2qHl2XY9plOmXUnFCQUYSulet9TO3Q== 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=1722941768; 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=7CZKyhL5LyTYvj6vU3iJDmLogRxTqEC3BJ12knhptuk=; b=o4+fICs66F+heHskRQb5v9lYkR5MUrVYuFtNcjhnxBk4JUOP1jDj75RxKjaOYmgw6ennZu jp8KP3DhrXhg6NOx842J3QnkB2MYFJLpnDiPVHYMTdOpc8ugcKfXnLHxl587zXsMuOq4kN 7J7xWtDm+yzaiqcYJVPuLO5HtoMrn5a5MerozHkdWUfSDIap2wxcxuw09MsGy5ixOVZkX0 v8QrA5NYpokLDF/BNhqChRrjwNV7Z4PzUjKsHpHlIjQuPg8liP8lVBhRpos5ue42kuelhv 4DPbXB3G1MgVdsw1reCWQXrhUkP7KkawdOqKp+j/ct5ReXF9FJloDye7BhVS8Q== 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 4WdVbW6sSPz14P6; Tue, 6 Aug 2024 10:56:07 +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 476Au79j097622; Tue, 6 Aug 2024 10:56:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476Au72M097621; Tue, 6 Aug 2024 10:56:07 GMT (envelope-from git) Date: Tue, 6 Aug 2024 10:56:07 GMT Message-Id: <202408061056.476Au72M097621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Dimitry Andric Subject: git: 9658d7039c13 - Create tag vendor/llvm-project/llvmorg-19.1.0-rc2-0-gd033ae172d1c 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: dim X-Git-Repository: src X-Git-Refname: refs/tags/vendor/llvm-project/llvmorg-19.1.0-rc2-0-gd033ae172d1c X-Git-Reftype: annotated tag X-Git-Commit: 9658d7039c138d70a81fe8f4b19a1670b505b110 Auto-Submitted: auto-generated The annotated tag vendor/llvm-project/llvmorg-19.1.0-rc2-0-gd033ae172d1c has been created by dim: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/llvm-project/llvmorg-19.1.0-rc2-0-gd033ae172d1c tag vendor/llvm-project/llvmorg-19.1.0-rc2-0-gd033ae172d1c Tagger: Dimitry Andric TaggerDate: 2024-08-06 10:55:19 +0000 Tag llvm-project branch release/19.x llvmorg-19.1.0-rc2-0-gd033ae172d1c. commit 9b9503334fa856ed4ed6823d35b6f52546296f77 Author: Dimitry Andric AuthorDate: 2024-08-06 10:54:55 +0000 Commit: Dimitry Andric CommitDate: 2024-08-06 10:54:55 +0000 Vendor import of llvm-project branch release/19.x llvmorg-19.1.0-rc2-0-gd033ae172d1c. From nobody Tue Aug 6 16:40:59 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 4WdfFR1vplz5SFys; Tue, 06 Aug 2024 16:40:59 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdfFR1TnDz42N5; Tue, 6 Aug 2024 16:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722962459; 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=KvZ1AjuqiGxKmYlx0vMHlqlUalSuEJWdBj1Xdhq8+wU=; b=dBEn/TMnYnACmZCFedoIhjKZzJhIsJP4lW/3iTO3tYX2PUnb6V4l9KtZPMLPGqVw+/gVZ+ 0DW46tttUWVs2TJnHkubPZi3uyWewdO4ykoXfIUfSl0+faKkHyP5jukypCIE7XfsaECLP1 KJDVKgb1N1EV4ljpX0sC1SxyZqbxuP/hRBlz5/A0n5UjvyftY/73zyUyAtVWxRd7l+j1xI yCPjOSzzM6RKci7TsgcYq3JNZR4hP3o3De0T1MQjKiuUaG1XXKykDlw8/HjcZZnNa9LAOK YPrxlK4MF2EPMNF8Neh+PN+mu7XBf462sP1coKVAgjCXQb7K37TE2umamquasA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722962459; a=rsa-sha256; cv=none; b=UbuddeN68wDUm8/1tH5z+hmgNCgVGHN+Q8XIxOfXHsPenEUDPUN1H4sSsYz9RVv4MOC/Xi vlfGNEk9QlGet+w3HQM4DxPX1OI08jI+SdKeVAGnpgN49JybupgACBRpNKSwvFDmlrEr3m 4GiImNYQYireN9WdrUDK9ZW4XA2ED1UT2B96qwmRDEQAyoVC7FkyuZUSCSAjV9W4X3TbZf gCwlQDyDFXZ+hyyMyD/NKH0XenfHRgo2qEoRojlGGea7mqj0zxHVxWN4oUcgxi3WR6TITI 2qS4vbapTbU6jHtDTzY3r95024FqfB92gO/RKfS3lPmOjrnVREyvb5NzehBG2Q== 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=1722962459; 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=KvZ1AjuqiGxKmYlx0vMHlqlUalSuEJWdBj1Xdhq8+wU=; b=ymkSRwptqKm8PsIslaCrPIXoGtpq/FDbpvP+0BFX2USL40SPl1xP2t5j/t7p7Xc1RCpyO9 pBfebuVfEgOZJTEYoAlWlJAD04YLy/SUbOjJaZADhYbgL8OagWAh5Z0bEZb6tDwd1hQld+ VNRsTZLox1Hb+lBzTweLKa3QLQOuyYkBeRhqeLg4pQrN/tlgvW5gC0z+GzE/elaGrA5Au6 98Xlx5r24MdK2GLj+pJ7A+O8BUeo1hehPh8wuF+j9wKFjcpeg02ICSqB14uVx9r6NQb1K/ JZCTOI6kdebVcUShIKXhs5uYidovNwgjOJuLElSBrkmlpiDDRkRImkzGizPXUQ== 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 4WdfFR15lVzFHq; Tue, 6 Aug 2024 16:40:59 +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 476GexXX083975; Tue, 6 Aug 2024 16:40:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476Gex60083972; Tue, 6 Aug 2024 16:40:59 GMT (envelope-from git) Date: Tue, 6 Aug 2024 16:40:59 GMT Message-Id: <202408061640.476Gex60083972@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: 067adbb4beac - stable/14 - malloc: Handle large malloc sizes in malloc_size() 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 067adbb4beace0c5554926012ae1b782748bc660 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=067adbb4beace0c5554926012ae1b782748bc660 commit 067adbb4beace0c5554926012ae1b782748bc660 Author: Mark Johnston AuthorDate: 2024-07-24 20:16:20 +0000 Commit: Mark Johnston CommitDate: 2024-08-06 16:40:51 +0000 malloc: Handle large malloc sizes in malloc_size() Reviewed by: kib, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45661 (cherry picked from commit 1c30cf95098e999ee24b2396763b4f65d021cdf0) --- sys/kern/kern_malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 6e0d12983a2b..08530b2a8930 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -1068,7 +1068,7 @@ malloc_size(size_t size) int indx; if (size > kmem_zmax) - return (0); + return (round_page(size)); if (size & KMEM_ZMASK) size = (size & ~KMEM_ZMASK) + KMEM_ZBASE; indx = kmemsize[size >> KMEM_ZSHIFT]; From nobody Tue Aug 6 16:41:00 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 4WdfFS5nB3z5SFsH; Tue, 06 Aug 2024 16:41:00 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdfFS49Dbz42l3; Tue, 6 Aug 2024 16:41:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722962460; 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=Nz7hM2uIbImfOsmpJ25J6wNTSK1BXjwpu9ZSb66mtFA=; b=KrZkiYhOMkgiYMDznJSw5iWi+vS7jiIKFKgXExDiuxdc0HKSCwED3VGFmlTw1PBWVv2Njd 5azM8GpqMObPTrmg1rFVNaMt7kZkAaFFFFVULodQsAghkkCf/n4q2LZ8GJl6nUriV4golt fxxP6Pw/KXWzW76BZCZmdJ/b2rf7RXIDvMDMkt/Cdw1625GkK5n4RKO4qOpdz+UsklFta4 6F/VQwIrXknMddRBzu0cksek8eKUdr0xuOsveQFgNHd59aGYTUoBgxOvh24aWnC5YUFzc5 cFR9rJSBMsYxekdaVzc81NTQe0MY1hSYahz3AfJLcgWBLHfg8ACTS/LEfEKbYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722962460; a=rsa-sha256; cv=none; b=aDXZBCanrru2r976YYPKPyWUoGA3CNhndTer9xvp+dc08QfQx6Azo0rgT/RXTQAztPK5uu cuqENe4Sa0keWKlkFCYwKN++wsGhp1U/eCKaneqWWuenTcCPbwjwHzYSTL7MsrDZN7mq+B jGeriag/mfAI/0igdA7+cUfp4LJI80M7iwKNEMJYzd3+CAx+IwLBB+k5WbaNDtUAn/tj1Z 6m5/n0WR6ZJYEtrHW+Rpnrr3vmBhL2LlCdiM/muUJRzNpxdkfO9UibceLIO0Ay+6pKmeEf aEYdzJXxSsXHrmyn0xC2rC8Nf2sfxFyCSbOPJu2S2sP/t98xfMBk9ITmEUaLlg== 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=1722962460; 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=Nz7hM2uIbImfOsmpJ25J6wNTSK1BXjwpu9ZSb66mtFA=; b=iE1vL7qRUdZhD7tvuugxsDKncqdF+Qez1BwbOKt/UAg5ITt/Tu5StpQ8uky58rKsxW7f8w cGOw1PwkgbS3gXZHNkOVVm2ISeKz9D3//vqfEcfna28NNwJOHmo8ErW3j+KPG0IkOWPdox aLgYQSd1bQ2uVYsrqDtEbzrqJgb7P81a5JwI0vknGAqdazO9QB6myHN8TCF1DNNVitiWE1 nwn5bbOPqBaQDyRoHZsL/LGCuUb/Q8UkDPBGloouCM/1OSweslTd6ru6+oFiFwjA6PuNHq KNNVRvnWbQ1Tjt9dp3whPctTy8PnO/LyP7yK9k/UkQJIi0s7zcemcEcxHfZJOw== 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 4WdfFS24KdzFQH; Tue, 6 Aug 2024 16:41:00 +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 476Gf0cG084033; Tue, 6 Aug 2024 16:41:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476Gf0BM084030; Tue, 6 Aug 2024 16:41:00 GMT (envelope-from git) Date: Tue, 6 Aug 2024 16:41:00 GMT Message-Id: <202408061641.476Gf0BM084030@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: 014b6c341d9c - stable/14 - ktrace tests: Add a missing mode in open(O_CREAT) 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 014b6c341d9cfec30ec28cea9f304abbc156e625 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=014b6c341d9cfec30ec28cea9f304abbc156e625 commit 014b6c341d9cfec30ec28cea9f304abbc156e625 Author: Mark Johnston AuthorDate: 2024-07-28 15:31:40 +0000 Commit: Mark Johnston CommitDate: 2024-08-06 16:40:51 +0000 ktrace tests: Add a missing mode in open(O_CREAT) MFC after: 1 week (cherry picked from commit 9cc67e43610e34a692398a65adcc5e8846e84250) --- tests/sys/kern/ktrace_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/kern/ktrace_test.c b/tests/sys/kern/ktrace_test.c index 21868441c687..9d4c2dbdcd74 100644 --- a/tests/sys/kern/ktrace_test.c +++ b/tests/sys/kern/ktrace_test.c @@ -116,7 +116,7 @@ cap_trace_child(int cpid, struct ktr_cap_fail *v, int numv) int error, fd, i; ATF_REQUIRE((fd = open("ktrace.out", - O_RDONLY | O_CREAT | O_TRUNC)) != -1); + O_RDONLY | O_CREAT | O_TRUNC, 0600)) != -1); ATF_REQUIRE(ktrace("ktrace.out", KTROP_SET, KTRFAC_CAPFAIL, cpid) != -1); /* Notify child that we've starting tracing. */ From nobody Tue Aug 6 18:19:28 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 4WdhR50qP0z5SPtY; Tue, 06 Aug 2024 18:19:29 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdhR45N6hz49l6; Tue, 6 Aug 2024 18:19:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722968368; 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=S4FsEfgIkQ99Wx9LKeTbZs3Qu5qLbqYXY6CH7BiVqwI=; b=hybQYRxBAAY6ii+pnNY2iLdtVvW8pNq7ijct5fK2suJuKhfYG1Ugmh+b/DRS1zMrhh/hsL qtJo2sb7s6NVhbsYLclj279DT/6AuoK3gzOSJbUSB67tny/x1tclDSHMHNc0CGW/FEWMQW kLLFeGmEvbL5fU1lF5QYR9kVKxWK1WAIDva3wjuL5D6rKZ4TzK29MmPMpNMS4dsdON/J3J dHPBalrSJ+8iQRA985xbnrpRiHCaf7zN8RNUwnU0pL+LiUXzYaEB31J+ZT7krGYOeuv6VB zVdbUHnDxB7lmco9LlDwkZ1+A4+ngJDZnLo63K7o75xR3za7B4NnNCmqV4fF5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722968368; a=rsa-sha256; cv=none; b=uzvIp3nxQcbp/cUGEtziuPh6uo1urMyBXvIBbJHq+KbwRhyrwVCGkHUOkY26dG7GY/+02J Hl84rNqy4Z6G+MzaCpESPHMo0DnLMDjKxDAjOp2CzKbffqRyN5eRNJ8sD8YBGOMgVpm4dJ 9jrV0SUF7w5jjuFD6WYEzzlt5WJzcJY7Onp1Q306SZauzkQcjZq1ruh7Wi0d7NetN0v5ut CNUYfgo1VtLBt8O3C47858m9Iz0zOpCRfg4aqAHAlv0pCdTNqvkXuzC4Sx3CldFDZXSi0U CWAcVF+YxFUwI664ClNZvLBdZY1rPgbo3FRkICIX5keYUHE5cCCQBfY4WA8dgg== 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=1722968368; 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=S4FsEfgIkQ99Wx9LKeTbZs3Qu5qLbqYXY6CH7BiVqwI=; b=i6yZ8tnu/5Y5npWFtLtKqFXwcL77FnFT5mslqaViDy9x+/cEbXCEb8xfwdAkMVmUouEEYf TJpdSWrPsSVqXmaEGq6/N8EIzkXCrChNZcWrpwJMxTcddt56aN6XFUzHdiCBHIYxwjvqty 9NHMR6FnLae6i2RSikQWTJvCKHi8/4jKnL+3WlhZPya8aWhQgAIZ0pPOwIbbknsoQQViNy BTLDQCITDH79GXiin29tA/5YhLP9KF6a2gyPrdCU5qUKYUoG/FIEQXzGr5kSaJfTKC2rxo lmqcFJB51eVAk9Ww5pAsT1FHbYxg3PJcwEv45bNtQZgEivZ5Pyk9YU1MqLPFEA== 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 4WdhR4505pzHW0; Tue, 6 Aug 2024 18:19:28 +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 476IJSUb044448; Tue, 6 Aug 2024 18:19:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476IJStK044445; Tue, 6 Aug 2024 18:19:28 GMT (envelope-from git) Date: Tue, 6 Aug 2024 18:19:28 GMT Message-Id: <202408061819.476IJStK044445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: b5c95c93fdd4 - main - sys/mman.h: consistently use `#define` 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b5c95c93fdd47c0764219b8bf293ce54369caf27 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=b5c95c93fdd47c0764219b8bf293ce54369caf27 commit b5c95c93fdd47c0764219b8bf293ce54369caf27 Author: Brooks Davis AuthorDate: 2024-08-06 18:19:09 +0000 Commit: Brooks Davis CommitDate: 2024-08-06 18:19:09 +0000 sys/mman.h: consistently use `#define` There were 12 cases of `#define` and 91 of `#define` and in some cases like msync() flags (MS_*) there wasn't consistency. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D46233 --- sys/sys/mman.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/sys/mman.h b/sys/sys/mman.h index 8feba252e2fe..6ee2d5562db1 100644 --- a/sys/sys/mman.h +++ b/sys/sys/mman.h @@ -30,7 +30,7 @@ */ #ifndef _SYS_MMAN_H_ -#define _SYS_MMAN_H_ +#define _SYS_MMAN_H_ #include #include @@ -39,10 +39,10 @@ /* * Inheritance for minherit() */ -#define INHERIT_SHARE 0 -#define INHERIT_COPY 1 -#define INHERIT_NONE 2 -#define INHERIT_ZERO 3 +#define INHERIT_SHARE 0 +#define INHERIT_COPY 1 +#define INHERIT_NONE 2 +#define INHERIT_ZERO 3 #endif /* @@ -118,9 +118,9 @@ * Flags provided to shm_rename */ /* Don't overwrite dest, if it exists */ -#define SHM_RENAME_NOREPLACE (1 << 0) +#define SHM_RENAME_NOREPLACE (1 << 0) /* Atomically swap src and dest */ -#define SHM_RENAME_EXCHANGE (1 << 1) +#define SHM_RENAME_EXCHANGE (1 << 1) #endif /* __BSD_VISIBLE */ @@ -128,21 +128,21 @@ /* * Process memory locking */ -#define MCL_CURRENT 0x0001 /* Lock only current memory */ -#define MCL_FUTURE 0x0002 /* Lock all future memory as well */ +#define MCL_CURRENT 0x0001 /* Lock only current memory */ +#define MCL_FUTURE 0x0002 /* Lock all future memory as well */ #endif /* * Error return from mmap() */ -#define MAP_FAILED ((void *)-1) +#define MAP_FAILED ((void *)-1) /* * msync() flags */ #define MS_SYNC 0x0000 /* msync synchronously */ -#define MS_ASYNC 0x0001 /* return immediately */ -#define MS_INVALIDATE 0x0002 /* invalidate all cached data */ +#define MS_ASYNC 0x0001 /* return immediately */ +#define MS_INVALIDATE 0x0002 /* invalidate all cached data */ /* * Advice to madvise From nobody Tue Aug 6 18:21:58 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 4WdhTz6pgXz5SPyj; Tue, 06 Aug 2024 18:21:59 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdhTy2CyVz4D6Y; Tue, 6 Aug 2024 18:21:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722968518; 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=BdVqmjYT/e4An1GCLZLSyFjmAh23AR0AqgXI/EAJGns=; b=c8Su7a5ruHWmLl5jzEZYWVPzE9ZPHXpd4iF1pG9QJuqMMwecVAKPil+b6HGxytfKGydu86 xx2CuZGk/fGpK6XDMQMFdqIOaKmIMcm+V24bFYo0y/4iNedDdyy6mOUnemYZ/8bMo202FI CKrejfUYOhkW0kouXFUGchxV6tC+i3xNoi+pV53WQe/yGWtSJO2lPgN4Qz4D14r8GxYsgI 3tCCtR1D6vvu6XcpMK/lK7GIQe8WxxbMw2OUIrp7qn2KCMBmQIit1q7XYgBW7znA5pQAuh lS+rlddyvIpzWJP09AIh/0zesanzSQMWbOVHbQcr3L+CaA/c/QQdb8fYsud7LQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722968518; a=rsa-sha256; cv=none; b=lL/dA6YJ1bMqjaTYhOhwmGCdZoYu4Qvp7s1jxZ5FYJ0/AXhNYeHJ6AEvhx49j/yFAQNH1E I6lzd9DBqbBu9xK6h6x1AP5DOyJNV2qE+SAceA90wqZkFdPv/6f7t9c9F7K4sCmcjsk8/B IdVoUDbzp6qhUyty32bdIjRmGSww488/drzXOi4ryxTSsa124y3qp73mak7POiuR+bfy1J qQgGaFm6tJts+61lQVhCoBCymzMKQz2Kkfai32hRlS2F2LGJCqQKBadC9++fApTP2rwRtm KlR/a7RYM0AO/gcGV0/WJ0xr8N06t+wNRsj1Zh19jX772mMhfnxnDycbrpuuNQ== 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=1722968518; 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=BdVqmjYT/e4An1GCLZLSyFjmAh23AR0AqgXI/EAJGns=; b=lxo6r55ggwq7z8zSYoJy9QEIPOIbb8y/9GqE8PTctbSM7DsTvbtuk62rDpQLIMd9vGenfr 8waPHHTYApfjnyfKTBpBWe2AZCKe8PJGfWvQgJfqY3wq8z4Jy4OrOCVXdMYT8DMufG/dYm k5ligVx4zI/1WCE9YIFYYDk4rCVPkmpfw45wo7mZe1G7QC5Zpi711B/7IQ/TiXnSUm4qKH YyD/u/dutCVN8yHhNMvAppXnuibEUQY928rfWxpT4Dv5Hx+/T+sPdoz/Bnsh72t5cueB+g RDnwYDB28ew8Dm4qywwqnFa68A+0bq8zEplzZFGLDoVs8xbizF3S7YrAb0WSqg== 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 4WdhTy10x7zHWW; Tue, 6 Aug 2024 18:21:58 +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 476ILwfC059157; Tue, 6 Aug 2024 18:21:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476ILwgR059154; Tue, 6 Aug 2024 18:21:58 GMT (envelope-from git) Date: Tue, 6 Aug 2024 18:21:58 GMT Message-Id: <202408061821.476ILwgR059154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: e4d064e4a8e3 - main - sys/sys/mman.h: ignore b5c95c93fdd4 in blame 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: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4d064e4a8e3818c5b1d059b40bd02bc7cede05c Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=e4d064e4a8e3818c5b1d059b40bd02bc7cede05c commit e4d064e4a8e3818c5b1d059b40bd02bc7cede05c Author: Brooks Davis AuthorDate: 2024-08-06 18:21:33 +0000 Commit: Brooks Davis CommitDate: 2024-08-06 18:21:33 +0000 sys/sys/mman.h: ignore b5c95c93fdd4 in blame --- .git-blame-ignore-revs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 13f8bde24bce..4764192494f0 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -8,6 +8,8 @@ # # This file is sorted in git log order (newest commits first). +# whitespace fixes in sys/mman.h +b5c95c93fdd47c0764219b8bf293ce54369caf27 # sort OptionalObsoleteFiles.inc blocks c90d0600ee000e7874a55e3015953bd670574093 2b3bf27da41f1481b2025445c6adf27f0d50de99 From nobody Tue Aug 6 19:18: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 4Wdjkp4sgCz5STq9; Tue, 06 Aug 2024 19:18:10 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wdjkp4FjVz4K8J; Tue, 6 Aug 2024 19:18:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722971890; 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=gaODOj1WPCzjlI1maVYB5ehnYJYcBNHSJYkZRlW+15k=; b=jsRGXKFVyC62Icx9ou05sQ52pLH7gNbCLeZwnI2whpxKvr2a3HjAlmfqa8tNQW6rcwNU++ RqrsP+iCoia7h4IoRHFY8xR1C/9DqP+FtBZ4AEByLUjJ7Z0VChKav38VnHJufV3GaWfkIk oH3diLnfS96AEoOlIF/AEM14jVDRf0X+w1XmcgcWUS6UeAgx7dY09w925uGBj8sSOmqJE2 EEJJT7qdj3GMXo7oEErYrUflMSpx9gLy9U368ZArMj5TBBFbFTqafh9kBzczuJN/51tBOE kxyUeksFTFsOayx1SoGA/9SlsvIND6JdDXg1DJPTs4+F8FC+lXmEE1tszl9tFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722971890; a=rsa-sha256; cv=none; b=lMXaJBU70qDbohhiWVNlvRlleN5Pz77A4EDHl3xdgrrpnw3XjBaQbnJWHBpITj446zc/88 E1S1yxNcFE1X1/jZ6TFTSxiY7ypuVz2CEyJOsE1QchviaUSpmQrfYNFivJTuGZf/njUU3V pRssjMfArUJYxeMQB8ONaZ3yVlK59EMsWj/aV8zZAvaD/5jHKS6DpXdZZUJ8IFatLmq9S2 v5UDD/AMTqRZuc9TtUTIw/iouZWpvM+FKy6DFql/sh82sN0Tst6teVOLO9/BvQx9qETaGc tRkq19yhSnfIhPGgmeDvMqpoKhq6pB40Ocy6dKfL6MRIdVoipV/zVmDN8bkr0g== 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=1722971890; 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=gaODOj1WPCzjlI1maVYB5ehnYJYcBNHSJYkZRlW+15k=; b=J058x7/ikIP+oNW2wO8I21vHbPd9+X5S9nKZbdv+qBltS2UjMtWjliGYix4lXjk2xEo4+M Sx1zI2U+hyShyUGZUKOm2L9lNBXOpIVZHCFp8RUT+JDAm/Ou71ZknZZp1Bf/O5B/uHunxK dL/02SuPlxPGFjueV7SypsMEZSf0IlnxdcfFkzFgvoBORfueI+xkunenLUJyHoD5aRIEmq X1KfBUKnUh0X+1DfC1ivsqAe70NDlxXNVznDth/OtVbDupLtEgj5NH24mBTtuol4zd6dRr xj657LYTjIWqh5esUJXf3RQFlmQjz+8zASWSuQ56UB1B6MygdaFNumGTo0Nmrg== 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 4Wdjkp3tBGzKLh; Tue, 6 Aug 2024 19:18: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 476JIAhv046773; Tue, 6 Aug 2024 19:18:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476JIAn2046770; Tue, 6 Aug 2024 19:18:10 GMT (envelope-from git) Date: Tue, 6 Aug 2024 19:18:10 GMT Message-Id: <202408061918.476JIAn2046770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 2739a6845031 - main - sshd: remove blacklist call from grace_alarm_timer 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2739a6845031e69be7c03461a9335d8bbb9f59bd Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2739a6845031e69be7c03461a9335d8bbb9f59bd commit 2739a6845031e69be7c03461a9335d8bbb9f59bd Author: Ed Maste AuthorDate: 2024-08-01 00:04:46 +0000 Commit: Ed Maste CommitDate: 2024-08-06 19:14:00 +0000 sshd: remove blacklist call from grace_alarm_timer Under certain circumstances it may call log(3), which is not async- signal-safe. For now just remove the blacklist integration from this path, which means that blacklistd will not detect and firewall hosts that establish a connection but do nothing further. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46203 --- crypto/openssh/sshd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/crypto/openssh/sshd.c b/crypto/openssh/sshd.c index 0c83e0ea468e..889f2056bc75 100644 --- a/crypto/openssh/sshd.c +++ b/crypto/openssh/sshd.c @@ -377,8 +377,6 @@ grace_alarm_handler(int sig) kill(0, SIGTERM); } - BLACKLIST_NOTIFY(the_active_state, BLACKLIST_AUTH_FAIL, "ssh"); - /* Log error and exit. */ sigdie("Timeout before authentication for %s port %d", ssh_remote_ipaddr(the_active_state), From nobody Tue Aug 6 19:36:44 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 4Wdk8D29sCz5SWxJ; Tue, 06 Aug 2024 19:36: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wdk8D1Kt0z4LjS; Tue, 6 Aug 2024 19:36:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722973004; 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=CrUgcXXkE7c9RDpBFTpG+dWQS/8MknWIXRZakJTq9NE=; b=q02PZGXcslNPi3Jt10KcTKJeZy0wlHf+YJRwa+NA+b+H93w/p2n7waJKVOh72ayzrofvzG p+MoCiuGZiEOdDHNWIhxhj5j4mYhhdMfW3c/ftd8Plskc4RGzfoFHU3kn+jxHIy0K6TrtK rMSQ6WFsWHLpZfxlVMbW3HZPj5fHHcGc7gyGe+6Ju3KfRppp8tOpc5leC2FZBiTpntm13R Iak/lWwMstD/cVB7NkYO9b+PV4EeqWkCNQktyD8AiIpDOacE+BXix0i+E9p1u8FJ19+/U3 7KC3nZpYr3dJgNzmZpuZU3b07ZRd5tDnm32BQuzUQ40MwArk43abIDIbyrWoZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722973004; a=rsa-sha256; cv=none; b=i7V6+m9VlyQDZLlH1kl4jAwyfKQhYhNDWv80z8vsYL6hfQ3pwB3+Tmb4AgB+Zj6cde9n6j eVXlfZSfBBP4avj9VdMJUiFs8f4I/Ty6C2AsfFMmg3Sj+3E9wr0M9WA0u3uvta9xAVP8l9 4nSrTILRbDSBVt23INVrs2FVQdb2P8mUN48VUCKlP1GCXj2IjZkSylJuSdDExa/yvWPRwk 8VQlFIMWMgRsAXEHVu7Jc5GiojGv+u1AXXMycfycNvBuINObuV+zzpgkH7kVnY/xtxa6B8 S0/bNFGYMYrkE3rD6msOzI4EnEXdTtuC7mhWCP7B4Rs+c0ObaFUbzM9N7+dgTA== 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=1722973004; 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=CrUgcXXkE7c9RDpBFTpG+dWQS/8MknWIXRZakJTq9NE=; b=EwpPd1tOn+ucB59x60JLvw5lQHZD3NWWaNnJJSVH5unWJ0sy8oC/MkdtwWBQYJZ8MGUMBi WrIFINDF7edgELcifzub2pPHvznnDEwraRvN1sCwDdHUqb7bSIT1V+ySp8L2+2izHestCU LGZRyF4kfcGxXGpTF5d2M68slYu2zVcmEEGCPWJOb86RgsyEDeCDSG7dHn3pu/IhmipV8c pZC9TCQghFIcoy+jAmccMpEKap3ZdqDu0XDY/Zr5kG26ecAtR0M/uEbWSKKrwgM410dcLD 0TW/WfJhNLNA/SB4nCVQMPHM9cNxmZg8juHx7tvnMQuQROaG57ZXKQYPLjF39g== 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 4Wdk8D0t4KzKrQ; Tue, 6 Aug 2024 19:36:44 +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 476JaiIp079405; Tue, 6 Aug 2024 19:36:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476JaiwS079402; Tue, 6 Aug 2024 19:36:44 GMT (envelope-from git) Date: Tue, 6 Aug 2024 19:36:44 GMT Message-Id: <202408061936.476JaiwS079402@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 3d3bae9b9538 - main - sshd: bump VersionAddendum for 2739a6845031 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3d3bae9b95388169d396adc8007585699c5a23e0 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3d3bae9b95388169d396adc8007585699c5a23e0 commit 3d3bae9b95388169d396adc8007585699c5a23e0 Author: Ed Maste AuthorDate: 2024-08-06 19:22:53 +0000 Commit: Ed Maste CommitDate: 2024-08-06 19:23:33 +0000 sshd: bump VersionAddendum for 2739a6845031 Reported by: markj Fixes: 2739a6845031 ("sshd: remove blacklist call from grace_alarm_...") Sponsored by: The FreeBSD Foundation --- crypto/openssh/sshd_config | 2 +- crypto/openssh/sshd_config.5 | 2 +- crypto/openssh/version.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crypto/openssh/sshd_config b/crypto/openssh/sshd_config index a06f8fcc13d1..7f559775e3b3 100644 --- a/crypto/openssh/sshd_config +++ b/crypto/openssh/sshd_config @@ -105,7 +105,7 @@ AuthorizedKeysFile .ssh/authorized_keys #PermitTunnel no #ChrootDirectory none #UseBlacklist no -#VersionAddendum FreeBSD-20240318 +#VersionAddendum FreeBSD-20240806 # no default banner path #Banner none diff --git a/crypto/openssh/sshd_config.5 b/crypto/openssh/sshd_config.5 index 0715b1f9d581..4de510ac8795 100644 --- a/crypto/openssh/sshd_config.5 +++ b/crypto/openssh/sshd_config.5 @@ -1944,7 +1944,7 @@ The default is Optionally specifies additional text to append to the SSH protocol banner sent by the server upon connection. The default is -.Qq FreeBSD-20240318 . +.Qq FreeBSD-20240806 . The value .Cm none may be used to disable this. diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h index 836b5650b247..82be0be8498f 100644 --- a/crypto/openssh/version.h +++ b/crypto/openssh/version.h @@ -5,4 +5,4 @@ #define SSH_PORTABLE "p1" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20240701" +#define SSH_VERSION_FREEBSD "FreeBSD-20240806" From nobody Tue Aug 6 19:43:54 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 4WdkJV3CfVz5SXTy; Tue, 06 Aug 2024 19:43:54 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdkJV2Nfkz4M5L; Tue, 6 Aug 2024 19:43:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722973434; 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=6EK/gXhUpjZpkpHfubqX804N/y4N7d9k+JkyoJ6WINI=; b=cBIu35WL+9UDa4C4s2aVuQjAURt7avFdKNQ+lVE8OZEXx88Diy85RsCaBUU5Q61Lrh262H dCbRZ4Ls9GoSEqU/aMotIFuQ0tnyXJdxv3L2V325ikULDIqJK8YS07I/DpkAMGGBrus+a+ Scv6+K0cYlSXLkY6zstpcorKF74WPk0knKqcroZlnXxbZcYAAW5r3jTb74nva4vT7NQ1KL jBTTVVdLsghgUpmfsTfeZx/+VcBAmqOVz/YYmttiVGAaoksXOrCbsdAGvLhrBaXLYbfBUe l4zk9QtgTl2in4bjf4ReNCjgW1aSPSHLv17Pb3uym5yDjsySoClvOV8Rw+emsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722973434; a=rsa-sha256; cv=none; b=Xj94FwieUHcW//j0PYLsxhneHpJn5Cj0pVbQTZqC5ZBnyWvzlD+Q5gqbPxUkadtGH25GG6 N604Y/3ta6YkXc9H8rGgwcmn8O0DgpclbsZqso7v+k0gmLKE2zqb44GCgi/I10T8uDEa0o +RPeOM2dTh9b4I+YgaL7SmIwoyUN4XAc13Isr7t6GRCqQyCUM05nNaoYUeLeBa1aHvKFcC seV+don8R/wxo9ZHBJLZGtSQmtn6QTLWAAL0htz474WooJ2fvNV8xuxFXYHzAW/hycHZOX 4mXuQ0JYIkIHCVzCpUNkvgyi6f9J/SPKkuguNlfqi7FQFSbx0vGx5h9x51S0iQ== 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=1722973434; 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=6EK/gXhUpjZpkpHfubqX804N/y4N7d9k+JkyoJ6WINI=; b=rY8x9CnbIs0wrIbxPciCoZMHIt/DVEogHQYsBcDtVgvWQqvV2Po8P/LDP226OZw1pDmTzo AKJkZwHqEl3bqRNfgfLT1YpNJVQ5LRF9OvWjjfDon+AQdXSMikGLc1JS0mPpcuYCVj6g/w DlUiX6y1qkyQXPGBw7YVAGPfwOX6wH0i8sYXaI2C5d8zYD5Xc18smjrG5ayz2N/zsfCbMS qmN9CsjHFcqz4jF3Aypj32U1yYFVwDYr6S9vfK1Ob2v5sHVKBMEfLeS0PnDWd3+sGESina W5YP1qFY82tlkfJpRKRON94cOKIo/73gFuyBDH4VQv7it8sRpdVSf+6PdkKZOQ== 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 4WdkJV1dnyzKvS; Tue, 6 Aug 2024 19:43:54 +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 476JhsEG095770; Tue, 6 Aug 2024 19:43:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476JhsNs095767; Tue, 6 Aug 2024 19:43:54 GMT (envelope-from git) Date: Tue, 6 Aug 2024 19:43:54 GMT Message-Id: <202408061943.476JhsNs095767@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 73466449a9bf - stable/14 - sshd: remove blacklist call from grace_alarm_timer 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 73466449a9bf1888147c53d622236cebc0aa591b Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=73466449a9bf1888147c53d622236cebc0aa591b commit 73466449a9bf1888147c53d622236cebc0aa591b Author: Ed Maste AuthorDate: 2024-08-01 00:04:46 +0000 Commit: Ed Maste CommitDate: 2024-08-06 19:39:40 +0000 sshd: remove blacklist call from grace_alarm_timer Under certain circumstances it may call log(3), which is not async- signal-safe. For now just remove the blacklist integration from this path, which means that blacklistd will not detect and firewall hosts that establish a connection but do nothing further. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46203 (cherry picked from commit 2739a6845031e69be7c03461a9335d8bbb9f59bd) (cherry picked from commit 3d3bae9b95388169d396adc8007585699c5a23e0) Approved by: so --- crypto/openssh/sshd.c | 2 -- crypto/openssh/sshd_config | 2 +- crypto/openssh/sshd_config.5 | 2 +- crypto/openssh/version.h | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/crypto/openssh/sshd.c b/crypto/openssh/sshd.c index 0c83e0ea468e..889f2056bc75 100644 --- a/crypto/openssh/sshd.c +++ b/crypto/openssh/sshd.c @@ -377,8 +377,6 @@ grace_alarm_handler(int sig) kill(0, SIGTERM); } - BLACKLIST_NOTIFY(the_active_state, BLACKLIST_AUTH_FAIL, "ssh"); - /* Log error and exit. */ sigdie("Timeout before authentication for %s port %d", ssh_remote_ipaddr(the_active_state), diff --git a/crypto/openssh/sshd_config b/crypto/openssh/sshd_config index a06f8fcc13d1..7f559775e3b3 100644 --- a/crypto/openssh/sshd_config +++ b/crypto/openssh/sshd_config @@ -105,7 +105,7 @@ AuthorizedKeysFile .ssh/authorized_keys #PermitTunnel no #ChrootDirectory none #UseBlacklist no -#VersionAddendum FreeBSD-20240318 +#VersionAddendum FreeBSD-20240806 # no default banner path #Banner none diff --git a/crypto/openssh/sshd_config.5 b/crypto/openssh/sshd_config.5 index 0715b1f9d581..4de510ac8795 100644 --- a/crypto/openssh/sshd_config.5 +++ b/crypto/openssh/sshd_config.5 @@ -1944,7 +1944,7 @@ The default is Optionally specifies additional text to append to the SSH protocol banner sent by the server upon connection. The default is -.Qq FreeBSD-20240318 . +.Qq FreeBSD-20240806 . The value .Cm none may be used to disable this. diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h index 836b5650b247..82be0be8498f 100644 --- a/crypto/openssh/version.h +++ b/crypto/openssh/version.h @@ -5,4 +5,4 @@ #define SSH_PORTABLE "p1" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20240701" +#define SSH_VERSION_FREEBSD "FreeBSD-20240806" From nobody Tue Aug 6 19:46:19 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 4WdkMJ29bVz5SXbX; Tue, 06 Aug 2024 19:46:20 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdkMJ1fzbz4MV0; Tue, 6 Aug 2024 19:46:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722973580; 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=1k2QIiakN19gveCBQxpiG0TGijUsgrXvlRqLq9z6m6g=; b=bd/EsCoU3P0N8tx55eCnJH3CjFIHD8D74YGfL+uEK4iRI3S9ToDO7ck4FgA2Ez4T6eG5T0 U0ZkN6qXmDT7fAIhnP5EHyRs38d7jXyX0ItKSSTcKkbGLqukGx9axqz8sGmq+f1g5oYcCF P1XYFmOtZZZSrWZ7XzmBC9e1GNC7azfXs758V7U0d9Sq8AnsTGz4XQxAmGgm4ZrPhNL8tC +PS6VHJ1dPn//Mk+xk6Ttkf6SO1eDXTY/46U/4/FUKs40RwITpGCEDRtYzzDWI5GmWxo+g MlJefgdFmf3Jetd+ob/2vC5earJ5F0Vh6OCOmGs5bZhVV2vQfJRyPtwCb5vMew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722973580; a=rsa-sha256; cv=none; b=NVdZx7goKctn5KEB9CqddSzmNh1m1xN2jCheLAwVfuHNoNq3BnyHgUFhWE5fRY0+hYRkKr NPu7EhKkR1oowYESClH99yVU7zxNmX+ZfsiexIriuXa3pR7qGQbTKqus6b5LIOMNFei/WS zgioIMJjhyAjaOIT76uPLfiWVX3XVbtlIygilmH1OqTAa+Fm9EnTaQgCMdHNUHecTkUggr uNFPRet37/Gt4jVvD/YzzfekVyew6bhwqEzpfIOb39D7ThsD+u18xlCSig+TmDDW+InFe4 UUckeZnydFHf3irIvy+27TwfFirvDvY6tpSI7FXtiNK5LMEEpCS3iF49oo+crg== 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=1722973580; 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=1k2QIiakN19gveCBQxpiG0TGijUsgrXvlRqLq9z6m6g=; b=Sm/VhZ5Z4vhSqNo3Rn0vcAZ/VZ2OKy22VLs9UXYPa2KBqvPtm8JrvZAqbRK20VpWrgcqqR AvgaiFsX69JNZUIV/AUDSwcz8mTUcByeCDm5WE+Ye5H/KExN5JDerLkdJk2fyAjyN3L3+B vFp5wMzNdlO5GwGKunUvIosOup9TvghSxGZwqLAm7TBhLD2ZgfZAK2MoIeEDwWSlcfy5ED hoNPGGhMpDsKV2WCrhb2wvIlXHak4mYryvUYcgjvJNWUV4njomEDJz6/kNzg4RYjGjewpR lZUq7H4qyZIHL/nBcvDbJzusxirw859g0KreQS3EBmqWGVxMhO17ZfPsD45+Ag== 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 4WdkMJ0zxTzKrq; Tue, 6 Aug 2024 19:46:20 +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 476JkJTr096224; Tue, 6 Aug 2024 19:46:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476JkJCb096221; Tue, 6 Aug 2024 19:46:19 GMT (envelope-from git) Date: Tue, 6 Aug 2024 19:46:19 GMT Message-Id: <202408061946.476JkJCb096221@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: d5f16ef6463d - stable/13 - sshd: remove blacklist call from grace_alarm_timer 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d5f16ef6463d73270e4380f3498410c8ad91f495 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d5f16ef6463d73270e4380f3498410c8ad91f495 commit d5f16ef6463d73270e4380f3498410c8ad91f495 Author: Ed Maste AuthorDate: 2024-08-01 00:04:46 +0000 Commit: Ed Maste CommitDate: 2024-08-06 19:46:01 +0000 sshd: remove blacklist call from grace_alarm_timer Under certain circumstances it may call log(3), which is not async- signal-safe. For now just remove the blacklist integration from this path, which means that blacklistd will not detect and firewall hosts that establish a connection but do nothing further. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46203 (cherry picked from commit 2739a6845031e69be7c03461a9335d8bbb9f59bd) (cherry picked from commit 3d3bae9b95388169d396adc8007585699c5a23e0) (cherry picked from commit 73466449a9bf1888147c53d622236cebc0aa591b) Approved by: so --- crypto/openssh/ssh_config | 2 +- crypto/openssh/ssh_config.5 | 2 +- crypto/openssh/sshd.c | 2 -- crypto/openssh/sshd_config | 2 +- crypto/openssh/sshd_config.5 | 2 +- crypto/openssh/version.h | 2 +- 6 files changed, 5 insertions(+), 7 deletions(-) diff --git a/crypto/openssh/ssh_config b/crypto/openssh/ssh_config index 36c6c7785fd2..a047ce2deb93 100644 --- a/crypto/openssh/ssh_config +++ b/crypto/openssh/ssh_config @@ -44,4 +44,4 @@ # ProxyCommand ssh -q -W %h:%p gateway.example.com # RekeyLimit 1G 1h # UserKnownHostsFile ~/.ssh/known_hosts.d/%k -# VersionAddendum FreeBSD-20240318 +# VersionAddendum FreeBSD-20240806 diff --git a/crypto/openssh/ssh_config.5 b/crypto/openssh/ssh_config.5 index 020d254f7f0d..de1903ba43a2 100644 --- a/crypto/openssh/ssh_config.5 +++ b/crypto/openssh/ssh_config.5 @@ -2137,7 +2137,7 @@ in Specifies a string to append to the regular version string to identify OS- or site-specific modifications. The default is -.Dq FreeBSD-20240318 . +.Dq FreeBSD-20240806 . The value .Cm none may be used to disable this. diff --git a/crypto/openssh/sshd.c b/crypto/openssh/sshd.c index 0c83e0ea468e..889f2056bc75 100644 --- a/crypto/openssh/sshd.c +++ b/crypto/openssh/sshd.c @@ -377,8 +377,6 @@ grace_alarm_handler(int sig) kill(0, SIGTERM); } - BLACKLIST_NOTIFY(the_active_state, BLACKLIST_AUTH_FAIL, "ssh"); - /* Log error and exit. */ sigdie("Timeout before authentication for %s port %d", ssh_remote_ipaddr(the_active_state), diff --git a/crypto/openssh/sshd_config b/crypto/openssh/sshd_config index 54a1d9d486d0..866e905d9515 100644 --- a/crypto/openssh/sshd_config +++ b/crypto/openssh/sshd_config @@ -105,7 +105,7 @@ AuthorizedKeysFile .ssh/authorized_keys #PermitTunnel no #ChrootDirectory none #UseBlacklist no -#VersionAddendum FreeBSD-20240318 +#VersionAddendum FreeBSD-20240806 # no default banner path #Banner none diff --git a/crypto/openssh/sshd_config.5 b/crypto/openssh/sshd_config.5 index 1c3de78d1cf0..a354c1ef2b0a 100644 --- a/crypto/openssh/sshd_config.5 +++ b/crypto/openssh/sshd_config.5 @@ -1947,7 +1947,7 @@ The default is Optionally specifies additional text to append to the SSH protocol banner sent by the server upon connection. The default is -.Qq FreeBSD-20240318 . +.Qq FreeBSD-20240806 . The value .Cm none may be used to disable this. diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h index 836b5650b247..82be0be8498f 100644 --- a/crypto/openssh/version.h +++ b/crypto/openssh/version.h @@ -5,4 +5,4 @@ #define SSH_PORTABLE "p1" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20240701" +#define SSH_VERSION_FREEBSD "FreeBSD-20240806" From nobody Tue Aug 6 20:43:35 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 4WdldM33s5z5Sd5V; Tue, 06 Aug 2024 20:43:35 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdldM2XLCz4ThZ; Tue, 6 Aug 2024 20:43:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722977015; 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=RTk5BX/wY+TZsuPy5reFE4ZE1eiLBX4CnxhatW6oOpI=; b=g1go5RwzGf7ScM7u26Wdaqtdd6x0Lwfir9Tazd5igFuyUL1QVzSikDN3xI07NSo0Dsmg8x 9y+6FM0W6KrZrx9LTXAsPdrfI9//MnMCRATOqZrwedUTu/LaXlibpSj5fOUucLozwlzOfe 69Hf1CJ654Mn1HtGV1LsE8qvOjXJ345WkiO4iN9v9vZ9mCVGTVjcSybWWuV3sh3qms3mbj NAgNteGU1fbvdbcXwMzF1yNZpIbqjN1TqLiMhpzDvCTi7NxA6pXgWYDy+vihWM8shRmS7h jd6VX6tS5iDbtye5rZY9bpuyjEmKXiW8HeRIF4pMhu3Ck2F0lNe7QRcMDKOxWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722977015; a=rsa-sha256; cv=none; b=kWO3MeFuy6MjZ0t+q88hdOqnIoLkVZ7QH3tvA97am35Uqi08wFPperQ+T8FW4/k0ym9b9+ VUMMFwzDQBPOtUv3t90pwb3OVTPAT3YVf+Q+EoFUD47mnAIy6p28djnGq9e2fOpcbjTDJl +vJkL6e54zDQyLrGYdS8CEcWHMfGHroPsnSbCtzFlQv9UkaVgdOAi6DIbQYVWMQq78F2Cw DBEAgxDAiYmYsTuMFVVTf1Q2teFjBboOeo3sC0M7u2EVr31080Zi/ia1S/k1djouqgoG48 KQegcRsmnsqQKDCQRXAiQpHX0BTXhtsWQSYFd7a1wQIWtwFp9cbs/GH26EbTBQ== 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=1722977015; 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=RTk5BX/wY+TZsuPy5reFE4ZE1eiLBX4CnxhatW6oOpI=; b=k5eUthutBHOqf1odC9j09Kd8KFoBG5jtuZBwz+t2InvNpF6+EGb+8K5ZnwHft78a074rMa /XrJUnl8WtSJVZmgp0Ws32LIC4yXbnnv7vPhlfruoKN9KtvKAnYzob82rDYCQZ+kgRl4DA NRcelt0OVa2crHZTa+0Sc0ugr+whuNNHuqHmvHhDtq12niBdF/yo/NlxFtuVW+9YXvlbmF 3YCfrFKBNVUFuzmmCPnlvft9K4wvFVNNHXARXevRAM/apM/SQqWdDDfSnsEIFRoU9H3Ha1 ps2Ujv0T2CvddWYlMn+bhpqllYWv2yZROQ37i3FWXqnPO5uwK5mNApJdMhlftQ== 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 4WdldM27Y1zMPN; Tue, 6 Aug 2024 20:43:35 +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 476KhZEo097610; Tue, 6 Aug 2024 20:43:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476KhZG3097607; Tue, 6 Aug 2024 20:43:35 GMT (envelope-from git) Date: Tue, 6 Aug 2024 20:43:35 GMT Message-Id: <202408062043.476KhZG3097607@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 6cd4450c6c9a - stable/14 - msun: update Clang bug reference in fma test 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6cd4450c6c9a83a0fd9430df7ec02c4c3203ad25 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6cd4450c6c9a83a0fd9430df7ec02c4c3203ad25 commit 6cd4450c6c9a83a0fd9430df7ec02c4c3203ad25 Author: Ed Maste AuthorDate: 2024-06-12 00:23:44 +0000 Commit: Ed Maste CommitDate: 2024-08-06 19:39:52 +0000 msun: update Clang bug reference in fma test LLVM bugzilla bug 8100 became issue #8472 with the migration to GitHub. https://github.com/llvm/llvm-project/issues/8472 (cherry picked from commit 92927b8bcf51dcbcf99d633c1b3cab3cab2373ac) --- lib/msun/src/s_fma.c | 4 ++-- lib/msun/src/s_fmal.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/msun/src/s_fma.c b/lib/msun/src/s_fma.c index b8a342646d85..16902d321290 100644 --- a/lib/msun/src/s_fma.c +++ b/lib/msun/src/s_fma.c @@ -244,7 +244,7 @@ fma(double x, double y, double z) zs = copysign(DBL_MIN, zs); fesetround(FE_TONEAREST); - /* work around clang bug 8100 */ + /* work around clang issue #8472 */ volatile double vxs = xs; /* @@ -276,7 +276,7 @@ fma(double x, double y, double z) * rounding modes. */ fesetround(oround); - /* work around clang bug 8100 */ + /* work around clang issue #8472 */ volatile double vrlo = r.lo; adj = vrlo + xy.lo; return (ldexp(r.hi + adj, spread)); diff --git a/lib/msun/src/s_fmal.c b/lib/msun/src/s_fmal.c index 3d333632127c..9d08bc72e12e 100644 --- a/lib/msun/src/s_fmal.c +++ b/lib/msun/src/s_fmal.c @@ -225,7 +225,7 @@ fmal(long double x, long double y, long double z) zs = copysignl(LDBL_MIN, zs); fesetround(FE_TONEAREST); - /* work around clang bug 8100 */ + /* work around clang issue #8472 */ volatile long double vxs = xs; /* @@ -257,7 +257,7 @@ fmal(long double x, long double y, long double z) * rounding modes. */ fesetround(oround); - /* work around clang bug 8100 */ + /* work around clang issue #8472 */ volatile long double vrlo = r.lo; adj = vrlo + xy.lo; return (ldexpl(r.hi + adj, spread)); From nobody Tue Aug 6 20:44:09 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 4Wdlf12YCXz5SdBN; Tue, 06 Aug 2024 20:44:09 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wdlf121Y1z4VCj; Tue, 6 Aug 2024 20:44:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722977049; 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=+YD1y9wyhLvXWjO4HCXy2mRoolUfC28XzNzEyMuBtt0=; b=rgFShhBcscUBgHB0M2BIUbSOvDWDgThKNXf83c6Z6lUrsi8sj1/NQgVWcu1YvNT1BALmdg 2FtjuQq/Oz823VubNOWsoN76wLfMxfxHT/O8d98NzXmU8i/T9MM8MqDnLaobIAp4FOXqey UgkGH3b75mH+HoFjNFZwLWLa8ecr8OLSJF1Ja5z2ceCTwgt/1hm1BeI88UVqGYBW3m1gQE 7XlfXVKon2U3J99IC52IamwHdKpnxMkLI2iZP+4sSYzXy2cQb/L+Wf5pupTFbQ/aAagZ6g w0I//y49eTQ9sZgcORXjRdZxDH8gPEn7xDrTm0XoLaMS+N4sZq+TSw3CNhr4HQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722977049; a=rsa-sha256; cv=none; b=Al0Po1WE8dRBR9ygDjQmm/hRnPSVe7Qr67V0leFq1JygpE8suERXP9bWiRBmdKUwRfGTHW b2hm/Ur6pdsiKjvt33rL1Tl43XFMy7XFLPDHUcMbcM3923q5G6AT7xFKBmakR6oBBij7TM 1wfWz591/N52phZ2K0KXFUk++vco4iiMd1xPijZxp1H4Z7qJq7W2DhMh2RPkN9uomagE2I vwarD7+b3OTItCit8CugWtd0f32qOU1x0c6AKdkW9/wztIGokht1EZsGWruTQKF+SbkJnw fxO/dcHm+A1jBIRnCPAiPjpgwq2v64I/jSkEu7DF+9bcW8AvQ05s9Y4uw0EOcQ== 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=1722977049; 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=+YD1y9wyhLvXWjO4HCXy2mRoolUfC28XzNzEyMuBtt0=; b=GEKyq7949F0NBSV8Efu5LExJJlvMB5war0gCAICgj5jM6YlYz2VwVVfcTe7W+WXHuexp5A FojTUqs6M+QKCgWcEQSXfuT/+ejIvZ7jVSYYbuM+thLVd9j2PlMLJKso1Glsw9p0hCH0ny j3GEsbcEa7pyrNqhLSEzXc7NIdyZmlqA49bTGQPxXHFiHgVILoiaqkjJkNlqGI5aj9TITj us05v6yECRbzQc+skfhQ/+czKNBVQqEdNpHQzdf00LCaPNTWZoj7zHrnFY2EOX8eJ+4j2x EWEJYQiyxD/XYoNgDJaIL4srpV3/zGNOMehksYu+sVsSyPfBGez5kunEF1ZBDw== 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 4Wdlf11cPJzMTb; Tue, 6 Aug 2024 20:44:09 +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 476Ki9xk097857; Tue, 6 Aug 2024 20:44:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476Ki9L1097854; Tue, 6 Aug 2024 20:44:09 GMT (envelope-from git) Date: Tue, 6 Aug 2024 20:44:09 GMT Message-Id: <202408062044.476Ki9L1097854@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: d1d8c9114751 - stable/14 - libm: add parens to clarify expressions in fma, fmal 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d1d8c9114751ee481aa6ff980caa2640f8d6848d Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d1d8c9114751ee481aa6ff980caa2640f8d6848d commit d1d8c9114751ee481aa6ff980caa2640f8d6848d Author: Ed Maste AuthorDate: 2024-06-18 01:30:44 +0000 Commit: Ed Maste CommitDate: 2024-08-06 19:39:52 +0000 libm: add parens to clarify expressions in fma, fmal Obtained from: NetBSD (cherry picked from commit 001606523a48ca2aa440c985db47327a00671358) --- lib/msun/src/s_fma.c | 6 +++--- lib/msun/src/s_fmal.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/msun/src/s_fma.c b/lib/msun/src/s_fma.c index 16902d321290..6c889a6a46ca 100644 --- a/lib/msun/src/s_fma.c +++ b/lib/msun/src/s_fma.c @@ -222,17 +222,17 @@ fma(double x, double y, double z) case FE_TONEAREST: return (z); case FE_TOWARDZERO: - if (x > 0.0 ^ y < 0.0 ^ z < 0.0) + if ((x > 0.0) ^ (y < 0.0) ^ (z < 0.0)) return (z); else return (nextafter(z, 0)); case FE_DOWNWARD: - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (z); else return (nextafter(z, -INFINITY)); default: /* FE_UPWARD */ - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (nextafter(z, INFINITY)); else return (z); diff --git a/lib/msun/src/s_fmal.c b/lib/msun/src/s_fmal.c index 9d08bc72e12e..80c835d09c2b 100644 --- a/lib/msun/src/s_fmal.c +++ b/lib/msun/src/s_fmal.c @@ -203,17 +203,17 @@ fmal(long double x, long double y, long double z) case FE_TONEAREST: return (z); case FE_TOWARDZERO: - if (x > 0.0 ^ y < 0.0 ^ z < 0.0) + if ((x > 0.0) ^ (y < 0.0) ^ (z < 0.0)) return (z); else return (nextafterl(z, 0)); case FE_DOWNWARD: - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (z); else return (nextafterl(z, -INFINITY)); default: /* FE_UPWARD */ - if (x > 0.0 ^ y < 0.0) + if ((x > 0.0) ^ (y < 0.0)) return (nextafterl(z, INFINITY)); else return (z); From nobody Tue Aug 6 21:10:12 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 4WdmD51gsjz5Sfvj; Tue, 06 Aug 2024 21:10:13 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdmD518hRz4X6H; Tue, 6 Aug 2024 21:10:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722978613; 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=pHAjSCohOTCDt7rJRT/zLmKNsHdwfq4eZ4o9oDEXn7M=; b=EXUeyZSGX72aS+oLMWJob3JHBQshbXocOnpWSFXXXXeluhlKqvnzu/wiVVyjqg8z0kKlek mvMFnLsY5AEhzl8o1pbY7IlyBbxLUKHV/j/O3YkokyOgGMlizm3WkA6L1NZJWDGAzv2eWl AezV7K4q5QnbV8JPthQHUiPrMqLxYl1VcN+Yl9YwG49FnlcBQF7q/q65GqLpqNRRcETfO1 wQtoKAf5eFPyaB8sivHuAoxZoZm9rHiKclEA4LQZAfb8SsgEFUeJeMmgxmk3udBkjNS23X 60YyQi6ZQq8kqsitdfPMB6v6AwmkPplME+14/kCbnZpsiXX5wOzUeCUPi3xScw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722978613; a=rsa-sha256; cv=none; b=uP4qfvmq0rqDbG749FOVdP2mbeLsRmkI1s4TRLL+Kokdhlu6uEOQRBjAVNJtEHwXWk7+eP NImqAOtag7cQWSwfezZomo/pZtebfULtA245AtQaauieW+8rVlyGQhcQR1IL8s31v8oAPE n6XekrHggOgC+6RWriaD4mj5vWTBZKs+CHQpjdWGRwNzNSSfyZp//VB4mULzRg4s8PX/pJ 5XGq8rWMwFpEOStO6e6f1SV8baTgDXNqvFDEnbqoi05lh0rnzSgJ04ju64WBBTXRTntsLq TTtTm6pQK2mZte/Sfv3s4Y25e8erPW+CpeSrpYOpN/X0Ks+ADV97FYSdjkb1iQ== 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=1722978613; 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=pHAjSCohOTCDt7rJRT/zLmKNsHdwfq4eZ4o9oDEXn7M=; b=XIFw/jUeOI04s/EhyrIfuZI0tkZpDt4IXoUoDmskCAkSjamA8LSI/lidg4oLspDiktrBUo VF5/Uyvyo4rEDfT3xxaF71XbiDQ7IBw38HIJ3Wf/0OivsyCQDrUCB1/U+Igi5651D+45Xz v8IeH3BD0G4O/o6kPMs0ujRvbYwHTaiTWIo3TZYEq1lB3s7StHTvNZROekzbhogB25Eh7y HlrhXG17VDyqAoNm2pjhm9YL+FyL8Yd3IEhB7fSY4Gaf2n64Ox6xqHvgiWfRyBOjjpHpGM jluNcwOEAQaMO/n+/VsyVojkjQaHQ4p4Ywt+di10lKL7Ys+XyZmAV9CBrkcrFQ== 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 4WdmD50lyPzMYm; Tue, 6 Aug 2024 21:10:13 +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 476LADwq040102; Tue, 6 Aug 2024 21:10:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476LACcE040093; Tue, 6 Aug 2024 21:10:12 GMT (envelope-from git) Date: Tue, 6 Aug 2024 21:10:12 GMT Message-Id: <202408062110.476LACcE040093@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: ed4fbdda588d - stable/14 - tools/build/make.py: Minor typo fix 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ed4fbdda588d711d9dc5cb318f01dffa7b0c58b2 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ed4fbdda588d711d9dc5cb318f01dffa7b0c58b2 commit ed4fbdda588d711d9dc5cb318f01dffa7b0c58b2 Author: Jose Luis Duran AuthorDate: 2024-07-25 04:32:33 +0000 Commit: Ed Maste CommitDate: 2024-08-06 19:39:52 +0000 tools/build/make.py: Minor typo fix If the object directory prefix does not exist, make.py previously exited with a message indicating that the chosen prefix does not exit. Reviewed by: emaste Pull request: https://github.com/freebsd/freebsd-src/pull/1348 (cherry picked from commit d55de30efd09ee011bf4604be1c15ce4155775c1) --- tools/build/make.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build/make.py b/tools/build/make.py index 5c483e8b45be..5ac99ddb2ee5 100755 --- a/tools/build/make.py +++ b/tools/build/make.py @@ -242,7 +242,7 @@ if __name__ == "__main__": sys.exit("MAKEOBJDIRPREFIX is not set, cannot continue!") if not Path(MAKEOBJDIRPREFIX).is_dir(): sys.exit( - "Chosen MAKEOBJDIRPREFIX=" + MAKEOBJDIRPREFIX + " doesn't exit!") + "Chosen MAKEOBJDIRPREFIX=" + MAKEOBJDIRPREFIX + " doesn't exist!") objdir_prefix = Path(MAKEOBJDIRPREFIX).absolute() source_root = Path(__file__).absolute().parent.parent.parent From nobody Tue Aug 6 21:22:04 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 4WdmTm3X0qz5Sgcc; Tue, 06 Aug 2024 21:22:04 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdmTm339hz4Y5b; Tue, 6 Aug 2024 21:22:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722979324; 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=vpCLzBFgeQc9vOUB+cm5C4dcDYh40rUEqzXhzdkKPBI=; b=ZKptIIpWoGD9tziJVisnWN/y0Hl+LTatRVtib/Iypr/7FCkJa9kAdqIsordmodg9I1cn3p qJGsCO9KcmKiCfiTndRjVF9ccryZYZOnSywXAyKu82jh59lNcOE1PwjIuIT8Fe++1cfGww Pn5cFMI8FJFCqeD2iy4Q0oQEgmseNU4EaPMWjbE6mM6xb9UirxXYYDGrhE/Use/oOjTJVj L5Mf451TxbLR1s0JRYrRMbZiYtl8nhF6rDtGUBc/jzkQs72JZUmoJ/XYp41+lFAE6Ki+s/ aAAV5KuwKfoCMSzTZ0YNbuX2w3URHvSH3XhjbtMuA+q5LcitT1f5rV6Mmd9bqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722979324; a=rsa-sha256; cv=none; b=TfBGc6gxVV0060H5r/MU3Mcbv5uxgbMW5dQ0sxQTi+FzZ9wp3T3DSviFXoPV9UxqCrbqw+ IBHugi29exmXk5jQPEteDI97J40un3VQY/uKFbIENbtvMEdIwPdYgS3WPc07wB2hZaTPTU eSvyXkz6m/hULVn5KA9GIa5YQR7mAJuBNVZQxi/P0Xm2Dg/TL7vPrI2yXxXwgdJCyMZhrk D0dCSeLBRxbG2+RCzqYVHZo+lTWHNvPbM7Lwk63yZ4HbcMJTjR4iyd+wtnaBXhL6x1hVXn oLy5RVsHZOdZ7+Jzwnmre2rfgGt7MzLJhjBuzCBfItclO4AtNgxzPGj/W973nw== 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=1722979324; 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=vpCLzBFgeQc9vOUB+cm5C4dcDYh40rUEqzXhzdkKPBI=; b=bhxRdvYRrIdqA4pTb5WfoxN8vS51bj0JHtRFdgzMga8Ck4aRKYg0jy1iE+2gvxR9TBbzkD SjJIWb/Pvtfqy6FQIWADwpEWKL1+dCmDifYwwZZY0StQqCQuisLEPJkRY8ETHlQbdFob// iLfaILL+XfALfMHaTPfFvOCn6g2RdoS0Yd+NUh7qSvspf4OKGR7373SnEXCEl/+PQyyqh/ QVn/DlJvZ90YR7czjESpMmVVVnZsaFksleXh7MkIoU56OBDFne9oElo8YP28ws9upu7lEl kw0Bu1d7Qas45QTgEXJVnZ+qCeE3BwcVBPi9ZE7M6VN8duyrYcFI2GeyIeJuog== 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 4WdmTm1nDMzNGm; Tue, 6 Aug 2024 21:22:04 +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 476LM4FL064030; Tue, 6 Aug 2024 21:22:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476LM4M1064027; Tue, 6 Aug 2024 21:22:04 GMT (envelope-from git) Date: Tue, 6 Aug 2024 21:22:04 GMT Message-Id: <202408062122.476LM4M1064027@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 5daa7f5bef21 - stable/14 - depend-cleanup: remove entries from 2020 and 2021 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5daa7f5bef2162889b0eb43bcd4adf0cfa74a2f0 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5daa7f5bef2162889b0eb43bcd4adf0cfa74a2f0 commit 5daa7f5bef2162889b0eb43bcd4adf0cfa74a2f0 Author: Ed Maste AuthorDate: 2024-07-29 17:06:48 +0000 Commit: Ed Maste CommitDate: 2024-08-06 19:39:52 +0000 depend-cleanup: remove entries from 2020 and 2021 > These tests increase the build time (albeit by a small amount), so > they should be removed once enough time has passed and it is extremely > unlikely anyone would try a NO_CLEAN build against an object tree from > before the related change. The comment suggests a year is a reasonable period but we'll be somewhat more conservative for now, in part so that we retain different examples of special cases. Reviewed by: brooks, imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46178 (cherry picked from commit 4a06d149371c16287e1dd5a8fa51e92346a0c3f4) --- tools/build/depend-cleanup.sh | 51 ------------------------------------------- 1 file changed, 51 deletions(-) diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index bed654cfb4bb..2627b19d4607 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -103,57 +103,6 @@ clean_dep() } # Date Rev Description -# 20200310 r358851 rename of openmp's ittnotify_static.c to .cpp -clean_dep lib/libomp ittnotify_static c -# 20200414 r359930 closefrom -clean_dep lib/libc closefrom S - -# 20200826 r364746 OpenZFS merge, apply a big hammer (remove whole tree) -if [ -e "$OBJTOP"/cddl/lib/libzfs/.depend.libzfs_changelist.o ] && \ - egrep -qw "cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c" \ - "$OBJTOP"/cddl/lib/libzfs/.depend.libzfs_changelist.o; then - echo "Removing old ZFS tree" - for libcompat in "" $ALL_libcompats; do - dirprfx=${libcompat:+obj-lib${libcompat}/} - run rm -rf "$OBJTOP"/${dirprfx}cddl - done -fi - -# 20200916 WARNS bumped, need bootstrapped crunchgen stubs -if [ -e "$OBJTOP"/rescue/rescue/rescue.c ] && \ - ! grep -q 'crunched_stub_t' "$OBJTOP"/rescue/rescue/rescue.c; then - echo "Removing old rescue(8) tree" - run rm -rf "$OBJTOP"/rescue/rescue -fi - -# 20210105 fda7daf06301 pfctl gained its own version of pf_ruleset.c -if [ -e "$OBJTOP"/sbin/pfctl/.depend.pf_ruleset.o ] && \ - egrep -qw "sys/netpfil/pf/pf_ruleset.c" \ - "$OBJTOP"/sbin/pfctl/.depend.pf_ruleset.o; then - echo "Removing old pf_ruleset dependecy file" - run rm -rf "$OBJTOP"/sbin/pfctl/.depend.pf_ruleset.o -fi - -# 20210108 821aa63a0940 non-widechar version of ncurses removed -if [ -e "$OBJTOP"/lib/ncurses/ncursesw ]; then - echo "Removing stale ncurses objects" - for libcompat in "" $ALL_libcompats; do - dirprfx=${libcompat:+obj-lib${libcompat}/} - run rm -rf "$OBJTOP"/${dirprfx}lib/ncurses - done -fi - -# 20210608 f20893853e8e move from atomic.S to atomic.c -clean_dep cddl/lib/libspl atomic S -# 20211207 cbdec8db18b5 switch to libthr-friendly pdfork -clean_dep lib/libc pdfork S - -# 20211230 5e6a2d6eb220 libc++.so.1 path changed in ldscript -if [ -e "$OBJTOP"/lib/libc++/libc++.ld ] && \ - fgrep -q "/usr/lib/libc++.so" "$OBJTOP"/lib/libc++/libc++.ld; then - echo "Removing old libc++ linker script" - run rm -f "$OBJTOP"/lib/libc++/libc++.ld -fi # 20220326 fbc002cb72d2 move from bcmp.c to bcmp.S if [ "$MACHINE_ARCH" = "amd64" ]; then From nobody Tue Aug 6 21:22:51 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 4WdmVg3ckjz5Sgw6; Tue, 06 Aug 2024 21:22:51 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdmVg3JxHz4YTJ; Tue, 6 Aug 2024 21:22:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722979371; 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=ozf+hvAiGkp8ZzSDF4z01nQ1HlKPw5TQf4ll0gzVD7o=; b=AFQi2YF4s155GmHd/4/qhB6r3g8832MdZSmmNrC4fUz1y0XBATReSb7VM9DcFBISABpTxU Nc4k+tDGYFj7KCTg5PFZHPlW3xKIj0KoY4y4KDuhlHugV3gAsLYyU9lFxdEqWIIHBfAAqu 1c9ZUiexNmMzRH5KrT8spjE5yac13x6Rt7cUw95ufWqKnPrCaIaNdn3nwlFJHJxZvhot4x tlPiXCEvWJGRS/0zmZoV+Fu2ZF2Cgm9EDscO0e1LHP8Zvc69eu8ovX8WFI0YFgC24NjrMJ ztA2HsiUKgAB7t20VsIt8QklzdrMG+JwbwHq+sRC/gAmzD37DXns4GInVhlN3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722979371; a=rsa-sha256; cv=none; b=xCv3qR4PVJ+EWhicjW7NFgpWXFVs0AKQh7rSXPw/mVw15AybUka77BFxO29zOub76xveiW qeV2x0PWeO3LQ6id3WC0BCDbkOnTnKCltk0UJu9K7unRto3iXfGdKw6FdJZVREYoTjhlJp HMRO1pmcDUiHLZNpwphPaCVEW0QYPQCZa77C/FQQtPPPxUgRWYKaahjBt/kPgJB8bNF+/F ENwF6syONGMs0CjdUWp3AqEVnIUZgD1I3YNOq8TWCWnzgkPy6SDyucAsj1z2JNjn47aRFn WHyUHkP9HZrSzdQPy1aqvXxzCP+elpM8ycbtncpQy2zei1CmA19ekPQ2qOKGOA== 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=1722979371; 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=ozf+hvAiGkp8ZzSDF4z01nQ1HlKPw5TQf4ll0gzVD7o=; b=kxhKCn0E+q9pd3mYNJvFoEeyF4frEP5fFVb1KvPMEOcBfKLiwF0iw9oT2C0rdg5VMz0aXs I54cMg8cMYK36nZoGWI2riGIEMZir0wlBV4oTur3gm778vbn+CVdaXpBQS4do5sORi4tZ3 tgm0Mn62y6IBLeayAxTXrvEdVLVPMv6GIqnbD0vW+RwQxcgzh1FtfGY96wz/YR3U4h19yB Dp8HfnS/UnrV5HIJADqnd5+zVpaIKyU0Ldrd8XijJryNmaR+3yvsKRkmUahYYu0O0jgXkY gVjzbr5NOhCvavupdr1fsXEHSQjIddxjaNRkLNBJmf6fEmdEIZtGauL/aGPTcw== 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 4WdmVg2vf9zNGr; Tue, 6 Aug 2024 21:22:51 +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 476LMpb6066855; Tue, 6 Aug 2024 21:22:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476LMpBs066852; Tue, 6 Aug 2024 21:22:51 GMT (envelope-from git) Date: Tue, 6 Aug 2024 21:22:51 GMT Message-Id: <202408062122.476LMpBs066852@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: f06d322e9d92 - stable/14 - Remove "All Rights Reserved" from FreeBSD Foundation copyrights 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f06d322e9d925ab56a4aa8210a67637d4d341ab6 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f06d322e9d925ab56a4aa8210a67637d4d341ab6 commit f06d322e9d925ab56a4aa8210a67637d4d341ab6 Author: Ed Maste AuthorDate: 2024-07-30 16:02:17 +0000 Commit: Ed Maste CommitDate: 2024-08-06 19:39:53 +0000 Remove "All Rights Reserved" from FreeBSD Foundation copyrights These ones were unambiguous cases where the Foundation was the only listed copyright holder. Sponsored by: The FreeBSD Foundation (cherry picked from commit 5c2bc3db201a4fe8d7911cf816bea104d5dc2138) --- include/xlocale.h | 1 - lib/libcasper/services/cap_dns/cap_dns.c | 1 - lib/libcasper/services/cap_dns/cap_dns.h | 1 - lib/libcasper/services/cap_dns/tests/dns_test.c | 1 - lib/libcasper/services/cap_grp/cap_grp.c | 1 - lib/libcasper/services/cap_grp/cap_grp.h | 1 - lib/libcasper/services/cap_grp/tests/grp_test.c | 1 - lib/libcasper/services/cap_pwd/cap_pwd.c | 1 - lib/libcasper/services/cap_pwd/cap_pwd.h | 1 - lib/libcasper/services/cap_pwd/tests/pwd_test.c | 1 - lib/libcasper/services/cap_sysctl/cap_sysctl.c | 1 - lib/libcasper/services/cap_sysctl/cap_sysctl.h | 1 - lib/libcasper/services/cap_sysctl/tests/sysctl_test.c | 1 - lib/libnv/common_impl.h | 1 - lib/libnv/tests/nvlist_add_test.c | 1 - lib/libnv/tests/nvlist_exists_test.c | 1 - lib/libnv/tests/nvlist_free_test.c | 1 - lib/libnv/tests/nvlist_get_test.c | 1 - lib/libnv/tests/nvlist_move_test.c | 1 - lib/libnv/tests/nvlist_send_recv_test.c | 1 - lib/libproc/proc_bkpt.c | 1 - lib/libproc/proc_regs.c | 1 - lib/libproc/proc_rtld.c | 1 - lib/librtld_db/librtld_db.3 | 1 - lib/librtld_db/rtld_db.c | 1 - lib/librtld_db/rtld_db.h | 1 - lib/libthr/plockstat.d | 1 - lib/libthr/thread/thr_malloc.c | 1 - lib/libthread_db/arch/aarch64/libpthread_md.c | 1 - libexec/ftpd/blacklist.c | 1 - libexec/ftpd/blacklist_client.h | 1 - libexec/rc/rc.d/blacklistd | 1 - libexec/rtld-elf/aarch64/reloc.c | 1 - libexec/rtld-elf/aarch64/rtld_start.S | 1 - libexec/rtld-elf/rtld_malloc.h | 1 - sbin/hastctl/hastctl.8 | 1 - sbin/hastctl/hastctl.c | 1 - sbin/hastd/activemap.c | 1 - sbin/hastd/activemap.h | 1 - sbin/hastd/control.c | 1 - sbin/hastd/control.h | 1 - sbin/hastd/ebuf.c | 1 - sbin/hastd/ebuf.h | 1 - sbin/hastd/hast_proto.h | 1 - sbin/hastd/hastd.8 | 1 - sbin/hastd/hastd.h | 1 - sbin/hastd/metadata.c | 1 - sbin/hastd/metadata.h | 1 - sbin/hastd/nv.c | 1 - sbin/hastd/nv.h | 1 - sbin/hastd/proto.c | 1 - sbin/hastd/proto.h | 1 - sbin/hastd/proto_impl.h | 1 - sbin/hastd/proto_socketpair.c | 1 - sbin/hastd/proto_uds.c | 1 - sbin/hastd/rangelock.c | 1 - sbin/hastd/rangelock.h | 1 - sbin/hastd/synch.h | 1 - share/examples/hast/ucarp.sh | 1 - share/examples/hast/ucarp_down.sh | 1 - share/examples/hast/ucarp_up.sh | 1 - share/examples/kld/khelp/h_example.c | 1 - tests/sys/fs/fusefs/unlink.cc | 1 - tests/sys/kern/kern_copyin.c | 1 - tools/regression/capsicum/syscalls/cap_fcntls_limit.c | 1 - tools/regression/capsicum/syscalls/cap_getmode.c | 1 - tools/regression/capsicum/syscalls/cap_ioctls_limit.c | 1 - tools/regression/capsicum/syscalls/misc.c | 1 - tools/regression/capsicum/syscalls/misc.h | 1 - tools/test/popss/popss.c | 1 - tools/test/vm86/vm86_test.c | 1 - tools/test/vm86/vm86_test_asm.s | 1 - tools/tools/vt/mkkfont/mkkfont.c | 1 - usr.bin/proccontrol/proccontrol.1 | 1 - usr.bin/proccontrol/proccontrol.c | 1 - 75 files changed, 75 deletions(-) diff --git a/include/xlocale.h b/include/xlocale.h index f39000d6b373..cc2fc0839593 100644 --- a/include/xlocale.h +++ b/include/xlocale.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2011, 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by David Chisnall under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_dns/cap_dns.c b/lib/libcasper/services/cap_dns/cap_dns.c index 8548715a6978..84b49e1d2081 100644 --- a/lib/libcasper/services/cap_dns/cap_dns.c +++ b/lib/libcasper/services/cap_dns/cap_dns.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2012-2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_dns/cap_dns.h b/lib/libcasper/services/cap_dns/cap_dns.h index 4bf8e3648a2d..556cac1158d2 100644 --- a/lib/libcasper/services/cap_dns/cap_dns.h +++ b/lib/libcasper/services/cap_dns/cap_dns.h @@ -1,6 +1,5 @@ /*- * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_dns/tests/dns_test.c b/lib/libcasper/services/cap_dns/tests/dns_test.c index 3786414053ad..fda2dcf44062 100644 --- a/lib/libcasper/services/cap_dns/tests/dns_test.c +++ b/lib/libcasper/services/cap_dns/tests/dns_test.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_grp/cap_grp.c b/lib/libcasper/services/cap_grp/cap_grp.c index 6a5ad84fcd22..025ce00adf56 100644 --- a/lib/libcasper/services/cap_grp/cap_grp.c +++ b/lib/libcasper/services/cap_grp/cap_grp.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_grp/cap_grp.h b/lib/libcasper/services/cap_grp/cap_grp.h index a478a91cf760..9be2e7a78dd5 100644 --- a/lib/libcasper/services/cap_grp/cap_grp.h +++ b/lib/libcasper/services/cap_grp/cap_grp.h @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_grp/tests/grp_test.c b/lib/libcasper/services/cap_grp/tests/grp_test.c index c120c61e0cf1..18c11746d3a4 100644 --- a/lib/libcasper/services/cap_grp/tests/grp_test.c +++ b/lib/libcasper/services/cap_grp/tests/grp_test.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_pwd/cap_pwd.c b/lib/libcasper/services/cap_pwd/cap_pwd.c index 263bc4cfd582..6550c35d1592 100644 --- a/lib/libcasper/services/cap_pwd/cap_pwd.c +++ b/lib/libcasper/services/cap_pwd/cap_pwd.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_pwd/cap_pwd.h b/lib/libcasper/services/cap_pwd/cap_pwd.h index 35e0e177bc62..496beea26392 100644 --- a/lib/libcasper/services/cap_pwd/cap_pwd.h +++ b/lib/libcasper/services/cap_pwd/cap_pwd.h @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_pwd/tests/pwd_test.c b/lib/libcasper/services/cap_pwd/tests/pwd_test.c index e56c037536e2..20c76102847a 100644 --- a/lib/libcasper/services/cap_pwd/tests/pwd_test.c +++ b/lib/libcasper/services/cap_pwd/tests/pwd_test.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_sysctl/cap_sysctl.c b/lib/libcasper/services/cap_sysctl/cap_sysctl.c index 7d7f280fd00b..25793bd3c41d 100644 --- a/lib/libcasper/services/cap_sysctl/cap_sysctl.c +++ b/lib/libcasper/services/cap_sysctl/cap_sysctl.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013, 2018 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_sysctl/cap_sysctl.h b/lib/libcasper/services/cap_sysctl/cap_sysctl.h index fd7d051f21c8..51243128a683 100644 --- a/lib/libcasper/services/cap_sysctl/cap_sysctl.h +++ b/lib/libcasper/services/cap_sysctl/cap_sysctl.h @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libcasper/services/cap_sysctl/tests/sysctl_test.c b/lib/libcasper/services/cap_sysctl/tests/sysctl_test.c index 2e5ec83e1c82..41c49bdbeba2 100644 --- a/lib/libcasper/services/cap_sysctl/tests/sysctl_test.c +++ b/lib/libcasper/services/cap_sysctl/tests/sysctl_test.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013, 2018 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libnv/common_impl.h b/lib/libnv/common_impl.h index 03de9749aaf6..27af1710540a 100644 --- a/lib/libnv/common_impl.h +++ b/lib/libnv/common_impl.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libnv/tests/nvlist_add_test.c b/lib/libnv/tests/nvlist_add_test.c index 4478efadf4e0..28f2b6f45446 100644 --- a/lib/libnv/tests/nvlist_add_test.c +++ b/lib/libnv/tests/nvlist_add_test.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libnv/tests/nvlist_exists_test.c b/lib/libnv/tests/nvlist_exists_test.c index 7450256ab760..808692feb85b 100644 --- a/lib/libnv/tests/nvlist_exists_test.c +++ b/lib/libnv/tests/nvlist_exists_test.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libnv/tests/nvlist_free_test.c b/lib/libnv/tests/nvlist_free_test.c index c715aef6657b..bb5eeaf7d04c 100644 --- a/lib/libnv/tests/nvlist_free_test.c +++ b/lib/libnv/tests/nvlist_free_test.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libnv/tests/nvlist_get_test.c b/lib/libnv/tests/nvlist_get_test.c index d6e4a9b4d65a..f06be569c90d 100644 --- a/lib/libnv/tests/nvlist_get_test.c +++ b/lib/libnv/tests/nvlist_get_test.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libnv/tests/nvlist_move_test.c b/lib/libnv/tests/nvlist_move_test.c index 3c99f4582c5e..2ef7ca4de384 100644 --- a/lib/libnv/tests/nvlist_move_test.c +++ b/lib/libnv/tests/nvlist_move_test.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libnv/tests/nvlist_send_recv_test.c b/lib/libnv/tests/nvlist_send_recv_test.c index 25edaa5c3c10..5d4f392ed49c 100644 --- a/lib/libnv/tests/nvlist_send_recv_test.c +++ b/lib/libnv/tests/nvlist_send_recv_test.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2013 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/lib/libproc/proc_bkpt.c b/lib/libproc/proc_bkpt.c index 25ff3a86291d..d7b1a58019a5 100644 --- a/lib/libproc/proc_bkpt.c +++ b/lib/libproc/proc_bkpt.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Rui Paulo under sponsorship from the * FreeBSD Foundation. diff --git a/lib/libproc/proc_regs.c b/lib/libproc/proc_regs.c index 492fbf712ef5..bd991630ad07 100644 --- a/lib/libproc/proc_regs.c +++ b/lib/libproc/proc_regs.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Rui Paulo under sponsorship from the * FreeBSD Foundation. diff --git a/lib/libproc/proc_rtld.c b/lib/libproc/proc_rtld.c index db17c2b02b95..1d6fc732933a 100644 --- a/lib/libproc/proc_rtld.c +++ b/lib/libproc/proc_rtld.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Rui Paulo under sponsorship from the * FreeBSD Foundation. diff --git a/lib/librtld_db/librtld_db.3 b/lib/librtld_db/librtld_db.3 index 041cc2cfa67b..07e1b67c096b 100644 --- a/lib/librtld_db/librtld_db.3 +++ b/lib/librtld_db/librtld_db.3 @@ -1,6 +1,5 @@ .\"- .\" Copyright (c) 2010 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by Rui Paulo under sponsorship from .\" the FreeBSD Foundation. diff --git a/lib/librtld_db/rtld_db.c b/lib/librtld_db/rtld_db.c index 2546f572780d..5d88089289bf 100644 --- a/lib/librtld_db/rtld_db.c +++ b/lib/librtld_db/rtld_db.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Rui Paulo under sponsorship from the * FreeBSD Foundation. diff --git a/lib/librtld_db/rtld_db.h b/lib/librtld_db/rtld_db.h index 24dc18a9a0ba..41aa7409fbf3 100644 --- a/lib/librtld_db/rtld_db.h +++ b/lib/librtld_db/rtld_db.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Rui Paulo under sponsorship from the * FreeBSD Foundation. diff --git a/lib/libthr/plockstat.d b/lib/libthr/plockstat.d index de620d893651..39d8946f33d3 100644 --- a/lib/libthr/plockstat.d +++ b/lib/libthr/plockstat.d @@ -1,6 +1,5 @@ /* * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Rui Paulo under sponsorship from the * FreeBSD Foundation. diff --git a/lib/libthr/thread/thr_malloc.c b/lib/libthr/thread/thr_malloc.c index d60fbc1b1fe8..dbc9e39e3c28 100644 --- a/lib/libthr/thread/thr_malloc.c +++ b/lib/libthr/thread/thr_malloc.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2019 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. diff --git a/lib/libthread_db/arch/aarch64/libpthread_md.c b/lib/libthread_db/arch/aarch64/libpthread_md.c index 17f8345e596b..93c7330baa1a 100644 --- a/lib/libthread_db/arch/aarch64/libpthread_md.c +++ b/lib/libthread_db/arch/aarch64/libpthread_md.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014-2015 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Andrew Turner under * sponsorship from the FreeBSD Foundation. diff --git a/libexec/ftpd/blacklist.c b/libexec/ftpd/blacklist.c index e8954f11bbe7..0a45f9369074 100644 --- a/libexec/ftpd/blacklist.c +++ b/libexec/ftpd/blacklist.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Kurt Lidl under sponsorship from the * FreeBSD Foundation. diff --git a/libexec/ftpd/blacklist_client.h b/libexec/ftpd/blacklist_client.h index 94ecc66c17ce..0b6805dc218e 100644 --- a/libexec/ftpd/blacklist_client.h +++ b/libexec/ftpd/blacklist_client.h @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Kurt Lidl under sponsorship from the * FreeBSD Foundation. diff --git a/libexec/rc/rc.d/blacklistd b/libexec/rc/rc.d/blacklistd index b58c7c8a76b6..44a97ad4b3b0 100755 --- a/libexec/rc/rc.d/blacklistd +++ b/libexec/rc/rc.d/blacklistd @@ -1,7 +1,6 @@ #!/bin/sh # # Copyright (c) 2016 The FreeBSD Foundation -# All rights reserved. # # This software was developed by Kurt Lidl under sponsorship from the # FreeBSD Foundation. diff --git a/libexec/rtld-elf/aarch64/reloc.c b/libexec/rtld-elf/aarch64/reloc.c index 907377f2619a..828686af8b98 100644 --- a/libexec/rtld-elf/aarch64/reloc.c +++ b/libexec/rtld-elf/aarch64/reloc.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014-2015 The FreeBSD Foundation - * All rights reserved. * * Portions of this software were developed by Andrew Turner * under sponsorship from the FreeBSD Foundation. diff --git a/libexec/rtld-elf/aarch64/rtld_start.S b/libexec/rtld-elf/aarch64/rtld_start.S index 8de3e021d567..53a7463e2634 100644 --- a/libexec/rtld-elf/aarch64/rtld_start.S +++ b/libexec/rtld-elf/aarch64/rtld_start.S @@ -1,6 +1,5 @@ /*- * Copyright (c) 2014 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Andrew Turner under * sponsorship from the FreeBSD Foundation. diff --git a/libexec/rtld-elf/rtld_malloc.h b/libexec/rtld-elf/rtld_malloc.h index 247726b9f470..408cdc84d45e 100644 --- a/libexec/rtld-elf/rtld_malloc.h +++ b/libexec/rtld-elf/rtld_malloc.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2019 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. diff --git a/sbin/hastctl/hastctl.8 b/sbin/hastctl/hastctl.8 index a0a1e1f22634..f696858a8071 100644 --- a/sbin/hastctl/hastctl.8 +++ b/sbin/hastctl/hastctl.8 @@ -1,5 +1,4 @@ .\" Copyright (c) 2010 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by Pawel Jakub Dawidek under sponsorship from .\" the FreeBSD Foundation. diff --git a/sbin/hastctl/hastctl.c b/sbin/hastctl/hastctl.c index ab2d618c698c..3375723b40fd 100644 --- a/sbin/hastctl/hastctl.c +++ b/sbin/hastctl/hastctl.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/activemap.c b/sbin/hastd/activemap.c index f5e3c60fd0a0..58fad137e5ae 100644 --- a/sbin/hastd/activemap.c +++ b/sbin/hastd/activemap.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/activemap.h b/sbin/hastd/activemap.h index a1dbf70e51af..ff598f841909 100644 --- a/sbin/hastd/activemap.h +++ b/sbin/hastd/activemap.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/control.c b/sbin/hastd/control.c index f6f937d3b180..48171fde9053 100644 --- a/sbin/hastd/control.c +++ b/sbin/hastd/control.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/control.h b/sbin/hastd/control.h index 4e16334dc824..ad7fb7978597 100644 --- a/sbin/hastd/control.h +++ b/sbin/hastd/control.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/ebuf.c b/sbin/hastd/ebuf.c index 522e4e821b11..8f58493270af 100644 --- a/sbin/hastd/ebuf.c +++ b/sbin/hastd/ebuf.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/ebuf.h b/sbin/hastd/ebuf.h index a79821735539..a4a2b30f4cb4 100644 --- a/sbin/hastd/ebuf.h +++ b/sbin/hastd/ebuf.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/hast_proto.h b/sbin/hastd/hast_proto.h index ab0a46494b45..0158aa4ccee6 100644 --- a/sbin/hastd/hast_proto.h +++ b/sbin/hastd/hast_proto.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/hastd.8 b/sbin/hastd/hastd.8 index fefd03f7dbe0..05a2d9b5e4e9 100644 --- a/sbin/hastd/hastd.8 +++ b/sbin/hastd/hastd.8 @@ -1,5 +1,4 @@ .\" Copyright (c) 2010 The FreeBSD Foundation -.\" All rights reserved. .\" .\" This software was developed by Pawel Jakub Dawidek under sponsorship from .\" the FreeBSD Foundation. diff --git a/sbin/hastd/hastd.h b/sbin/hastd/hastd.h index 15ad243adf7c..a54ef316f37a 100644 --- a/sbin/hastd/hastd.h +++ b/sbin/hastd/hastd.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/metadata.c b/sbin/hastd/metadata.c index 2f9cbc5e0971..5318d9f6aee5 100644 --- a/sbin/hastd/metadata.c +++ b/sbin/hastd/metadata.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/metadata.h b/sbin/hastd/metadata.h index b5215c1a85c9..6d8c593f0a46 100644 --- a/sbin/hastd/metadata.h +++ b/sbin/hastd/metadata.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/nv.c b/sbin/hastd/nv.c index 5f50ae349023..fd6b56c1148d 100644 --- a/sbin/hastd/nv.c +++ b/sbin/hastd/nv.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/nv.h b/sbin/hastd/nv.h index d1214f2b29ec..657a66fe38eb 100644 --- a/sbin/hastd/nv.h +++ b/sbin/hastd/nv.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/proto.c b/sbin/hastd/proto.c index 56ff4933c9b8..35f73bb8d0bf 100644 --- a/sbin/hastd/proto.c +++ b/sbin/hastd/proto.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/proto.h b/sbin/hastd/proto.h index a7cecbe67479..729daa518d9d 100644 --- a/sbin/hastd/proto.h +++ b/sbin/hastd/proto.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/proto_impl.h b/sbin/hastd/proto_impl.h index 4f84f90c6f23..0a0074545f38 100644 --- a/sbin/hastd/proto_impl.h +++ b/sbin/hastd/proto_impl.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/proto_socketpair.c b/sbin/hastd/proto_socketpair.c index ab30a6a27263..9608eb13afff 100644 --- a/sbin/hastd/proto_socketpair.c +++ b/sbin/hastd/proto_socketpair.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/proto_uds.c b/sbin/hastd/proto_uds.c index 5bf4c64fe5f6..acb61a360180 100644 --- a/sbin/hastd/proto_uds.c +++ b/sbin/hastd/proto_uds.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/rangelock.c b/sbin/hastd/rangelock.c index 33aee39651a4..26025d1169ac 100644 --- a/sbin/hastd/rangelock.c +++ b/sbin/hastd/rangelock.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/rangelock.h b/sbin/hastd/rangelock.h index d01dbd755b40..4847887b6b7a 100644 --- a/sbin/hastd/rangelock.h +++ b/sbin/hastd/rangelock.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/sbin/hastd/synch.h b/sbin/hastd/synch.h index 9e03fcb8ca74..32463f836bd0 100644 --- a/sbin/hastd/synch.h +++ b/sbin/hastd/synch.h @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2009-2010 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/share/examples/hast/ucarp.sh b/share/examples/hast/ucarp.sh index 73253a295f53..67c7aecea44f 100755 --- a/share/examples/hast/ucarp.sh +++ b/share/examples/hast/ucarp.sh @@ -3,7 +3,6 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2010 The FreeBSD Foundation -# All rights reserved. # # This software was developed by Pawel Jakub Dawidek under sponsorship from # the FreeBSD Foundation. diff --git a/share/examples/hast/ucarp_down.sh b/share/examples/hast/ucarp_down.sh index 133d35c59d5b..df78de156b1e 100755 --- a/share/examples/hast/ucarp_down.sh +++ b/share/examples/hast/ucarp_down.sh @@ -3,7 +3,6 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2010 The FreeBSD Foundation -# All rights reserved. # # This software was developed by Pawel Jakub Dawidek under sponsorship from # the FreeBSD Foundation. diff --git a/share/examples/hast/ucarp_up.sh b/share/examples/hast/ucarp_up.sh index 9f22b4205909..62dee23c12c7 100755 --- a/share/examples/hast/ucarp_up.sh +++ b/share/examples/hast/ucarp_up.sh @@ -3,7 +3,6 @@ # SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2010 The FreeBSD Foundation -# All rights reserved. # # This software was developed by Pawel Jakub Dawidek under sponsorship from # the FreeBSD Foundation. diff --git a/share/examples/kld/khelp/h_example.c b/share/examples/kld/khelp/h_example.c index 5bca2b36af50..431ed5a090b4 100644 --- a/share/examples/kld/khelp/h_example.c +++ b/share/examples/kld/khelp/h_example.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2010-2011 The FreeBSD Foundation - * All rights reserved. * * This software was developed at the Centre for Advanced Internet * Architectures, Swinburne University of Technology, Melbourne, Australia by diff --git a/tests/sys/fs/fusefs/unlink.cc b/tests/sys/fs/fusefs/unlink.cc index db54e286d85d..1d8a371649ee 100644 --- a/tests/sys/fs/fusefs/unlink.cc +++ b/tests/sys/fs/fusefs/unlink.cc @@ -1,6 +1,5 @@ /*- * Copyright (c) 2019 The FreeBSD Foundation - * All rights reserved. * * This software was developed by BFF Storage Systems, LLC under sponsorship * from the FreeBSD Foundation. diff --git a/tests/sys/kern/kern_copyin.c b/tests/sys/kern/kern_copyin.c index 25c9eda96541..a7da6c03f226 100644 --- a/tests/sys/kern/kern_copyin.c +++ b/tests/sys/kern/kern_copyin.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2015, 2020 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. diff --git a/tools/regression/capsicum/syscalls/cap_fcntls_limit.c b/tools/regression/capsicum/syscalls/cap_fcntls_limit.c index 55627579963b..48b7968b959e 100644 --- a/tools/regression/capsicum/syscalls/cap_fcntls_limit.c +++ b/tools/regression/capsicum/syscalls/cap_fcntls_limit.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/tools/regression/capsicum/syscalls/cap_getmode.c b/tools/regression/capsicum/syscalls/cap_getmode.c index a2584895b179..3818e7b32caf 100644 --- a/tools/regression/capsicum/syscalls/cap_getmode.c +++ b/tools/regression/capsicum/syscalls/cap_getmode.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/tools/regression/capsicum/syscalls/cap_ioctls_limit.c b/tools/regression/capsicum/syscalls/cap_ioctls_limit.c index b0d392c8f0c0..01bc60a71514 100644 --- a/tools/regression/capsicum/syscalls/cap_ioctls_limit.c +++ b/tools/regression/capsicum/syscalls/cap_ioctls_limit.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/tools/regression/capsicum/syscalls/misc.c b/tools/regression/capsicum/syscalls/misc.c index 914c606ac904..c88f2f625c97 100644 --- a/tools/regression/capsicum/syscalls/misc.c +++ b/tools/regression/capsicum/syscalls/misc.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/tools/regression/capsicum/syscalls/misc.h b/tools/regression/capsicum/syscalls/misc.h index 842500aff14d..22a0ab8094db 100644 --- a/tools/regression/capsicum/syscalls/misc.h +++ b/tools/regression/capsicum/syscalls/misc.h @@ -1,6 +1,5 @@ /*- * Copyright (c) 2012 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Pawel Jakub Dawidek under sponsorship from * the FreeBSD Foundation. diff --git a/tools/test/popss/popss.c b/tools/test/popss/popss.c index 004ccb29c546..bb66f050beb1 100644 --- a/tools/test/popss/popss.c +++ b/tools/test/popss/popss.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2018 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. diff --git a/tools/test/vm86/vm86_test.c b/tools/test/vm86/vm86_test.c index 1057fc5c83d6..cbdb2c68a6df 100644 --- a/tools/test/vm86/vm86_test.c +++ b/tools/test/vm86/vm86_test.c @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2018 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. diff --git a/tools/test/vm86/vm86_test_asm.s b/tools/test/vm86/vm86_test_asm.s index 22e5cf70b7f7..0d76d2e77b1e 100644 --- a/tools/test/vm86/vm86_test_asm.s +++ b/tools/test/vm86/vm86_test_asm.s @@ -2,7 +2,6 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2018 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. diff --git a/tools/tools/vt/mkkfont/mkkfont.c b/tools/tools/vt/mkkfont/mkkfont.c index 3f92f926c029..ec4675cfcf1b 100644 --- a/tools/tools/vt/mkkfont/mkkfont.c +++ b/tools/tools/vt/mkkfont/mkkfont.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2009 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Ed Schouten under sponsorship from the * FreeBSD Foundation. diff --git a/usr.bin/proccontrol/proccontrol.1 b/usr.bin/proccontrol/proccontrol.1 index 5cb5d584f480..7ab917e4a61f 100644 --- a/usr.bin/proccontrol/proccontrol.1 +++ b/usr.bin/proccontrol/proccontrol.1 @@ -1,5 +1,4 @@ .\" Copyright (c) 2019 The FreeBSD Foundation, Inc. -.\" All rights reserved. .\" .\" This documentation was written by .\" Konstantin Belousov under sponsorship diff --git a/usr.bin/proccontrol/proccontrol.c b/usr.bin/proccontrol/proccontrol.c index 5b48ef2916f8..4b7543d63793 100644 --- a/usr.bin/proccontrol/proccontrol.c +++ b/usr.bin/proccontrol/proccontrol.c @@ -1,6 +1,5 @@ /*- * Copyright (c) 2016 The FreeBSD Foundation - * All rights reserved. * * This software was developed by Konstantin Belousov * under sponsorship from the FreeBSD Foundation. From nobody Tue Aug 6 21:25:52 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 4WdmZ90BNLz5ShHK; Tue, 06 Aug 2024 21:25:53 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdmZ86cGMz4Z5X; Tue, 6 Aug 2024 21:25:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722979552; 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=P0/1fciIm4qWJIcJE36xW1dpYkkmmmzbqIGZF7+9MqY=; b=RK0DqCktDXJoNV58cTXKF1zm9itXtJR7ME5c3ueMmcSUOan7aUyHe0knTQ0w75Sh8cWuQ5 jKBG2ucL7UJbbe6AeR0rkQyj7fYvMx5+ScjBw+Yt2u1kjtBLVfkZG4cg6QhxEABQ6qAoF/ WfTGE6MXzY5KbUf5LvRfxXhmLVx0KTbIrYtgUOTcub+e4E8vkbHNf8Uxp3o7t7XG0ZgLqQ /r+DwJW1V5+Nd+5zVaL+9IlVGkVd9fgs5UOdlEwzNE3MRf4rdnxW4KTd54y3/LPM9c0KMC keT8j65fz2Vs4CEcjodxAOcEMWqAq+FMDKEYeb4xhIGO51c2/8DfsVajcICmag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722979552; a=rsa-sha256; cv=none; b=rPT0sOWIFNO1hozuKKb9Jm5M1NTzexI0JjRU5KvMV3vIkDla2if43B18OVVI627zSAZ7tN G6HZU4osn0uN4QX7wqVx+KvNVMwYedNCWPCMdotg5Hqy++fBa4/ySxRMHpb9sGKH79eFv5 3AS5qSZcR3EFTDS3eXhSkEk3L1d/5Pb2ltWgWRvFXyN1E6686XFEz0LkTJ3jUgA5t3VbL7 aNyCs6dvDTMolKxLZ7Ptv7ds908WZ4xkdwBniX/hBCdHfb2HZrgy9GrrqzR/yiXRx3k6Iu 6dTSpPl8uK1S/L62P7BexeGLGtOQll+7FCP6jNasO4S05Dn+XHGEHtkj+0or8g== 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=1722979552; 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=P0/1fciIm4qWJIcJE36xW1dpYkkmmmzbqIGZF7+9MqY=; b=h7r3aJxipqYeshoRVXruGkBZ3nYXQENhAqFrUqXoUGlB+eh+nrmpvxzl4JqpO6KAg8P922 PKHJMrgBs86GoiKxqdlLPKff2j5y8G+NgcmhbHgSIXcC5+v+JUJozQ9s+KY5ChMlWXR52q N7awG9wGk/aDMr1BScypBGgIhNlt2HU6Nu4doGE3oCOMogxgL7B9S5qJC79d3pTBlsgFSm qW4G/u9LsR5iUTTHNdSIxZEy9Zr7LX88skUUIt9aCK72ItZ2fGt6dLGTE4cbkKwfN4ZNMw iNt0mvL7RUagaRQXmtOyh47+bJXBFc5swd94vlNUHCvU9mkBuSbez0gkFjLs+g== 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 4WdmZ869G1zNGt; Tue, 6 Aug 2024 21:25:52 +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 476LPq1J067375; Tue, 6 Aug 2024 21:25:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476LPqi6067372; Tue, 6 Aug 2024 21:25:52 GMT (envelope-from git) Date: Tue, 6 Aug 2024 21:25:52 GMT Message-Id: <202408062125.476LPqi6067372@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: dc39004bc670 - stable/14 - libm: fma: correct zero sign with small inputs 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: dc39004bc670fe33ae6759816380c93a37268dd6 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=dc39004bc670fe33ae6759816380c93a37268dd6 commit dc39004bc670fe33ae6759816380c93a37268dd6 Author: Steve Kargl AuthorDate: 2024-06-16 23:41:38 +0000 Commit: Ed Maste CommitDate: 2024-08-06 21:25:10 +0000 libm: fma: correct zero sign with small inputs This is a fixed version of 888796ade284. PR: 277783 Reported by: Victor Stinner Reviewed by: emaste MFC after: 1 week (cherry picked from commit 888796ade2842486d3167067e8034254c38aadd3) (cherry picked from commit e77ad954bb825983b4346b9cc646c9c910b1be24) (cherry picked from commit 34f746cc7f8a8dd261027a8b392b76e70adc8438) --- lib/msun/src/s_fma.c | 4 ++-- lib/msun/src/s_fmal.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/msun/src/s_fma.c b/lib/msun/src/s_fma.c index 6c889a6a46ca..23a84491dd2a 100644 --- a/lib/msun/src/s_fma.c +++ b/lib/msun/src/s_fma.c @@ -260,14 +260,14 @@ fma(double x, double y, double z) spread = ex + ey; - if (r.hi == 0.0) { + if (r.hi == 0.0 && xy.lo == 0) { /* * When the addends cancel to 0, ensure that the result has * the correct sign. */ fesetround(oround); volatile double vzs = zs; /* XXX gcc CSE bug workaround */ - return (xy.hi + vzs + ldexp(xy.lo, spread)); + return (xy.hi + vzs); } if (oround != FE_TONEAREST) { diff --git a/lib/msun/src/s_fmal.c b/lib/msun/src/s_fmal.c index 80c835d09c2b..2fca20610157 100644 --- a/lib/msun/src/s_fmal.c +++ b/lib/msun/src/s_fmal.c @@ -241,14 +241,14 @@ fmal(long double x, long double y, long double z) spread = ex + ey; - if (r.hi == 0.0) { + if (r.hi == 0.0 && xy.lo == 0) { /* * When the addends cancel to 0, ensure that the result has * the correct sign. */ fesetround(oround); volatile long double vzs = zs; /* XXX gcc CSE bug workaround */ - return (xy.hi + vzs + ldexpl(xy.lo, spread)); + return (xy.hi + vzs); } if (oround != FE_TONEAREST) { From nobody Tue Aug 6 21:26:01 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 4WdmZL0Zvcz5ShNy; Tue, 06 Aug 2024 21:26:02 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdmZK6Nh9z4ZHK; Tue, 6 Aug 2024 21:26:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722979561; 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=9Btqzmr7pRrLuhGIEEQet91wzILj0q0FTIlIIUwzRqo=; b=Erc6nx9+Qrz9IguRknKHppoCTZ4zwo0Grv8O5ngdB3/FXyp8WXmfUB+gvPKVpXg+w1MrcC 1WVLLQ2SDmjc3I2I/7wbenvB67Uzd8mkzBGxW4yg2B58p7iAlsVAEqQukNXmR2DftXMuM9 YgG8ijmg+imSFeMgaszu5j1xu+YLfBOUxpJkHAP8agWBUPLdSeIeGxWAR43KPqKkl7jgdP c7p43vGMq5sPr54jYktCYHjib+zmXM8ySrRL6Q6IJw0ICvBBlYVvL9M1DQBRkhnd2Z/Nh2 zwD39Lg0nU4L2lxIXENan8iDbyYYfaAGnvD5wMVxgDRY+NA00REcgMa1WeLvzw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722979561; a=rsa-sha256; cv=none; b=EqqH+1o5NaNeOhgcTTyIs71CJvou3iLhdJQ4OT/RCZx48R5h1vmiY2v1PpQbglbA4DIZA/ zi/8mjcqctsyFux5G+UlEIC3r1uhPLsOWJE9EeNJTzsnmTG+Q3LHRbyyfNKbUd4suVs3qd fbJxDJOe7h+tAbrpFgHT3vw6fhAQwAvaZ8BWZdbAshhBIsKSzTvntxa8p148wbsqmytuE8 prU/9eDh6zp6x6X5OnEcGs8K3UhC1oh5Pol/NSW7nKhQWIuiDeTOpUYNcBLgTZ8QezBeTv 1gIpQmPFFBfJQDxWAd9nbp5YlD7gsYBYEYkRefWRc305ZM94qLzW+DCXU0kCZg== 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=1722979561; 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=9Btqzmr7pRrLuhGIEEQet91wzILj0q0FTIlIIUwzRqo=; b=yp48Dc3wc9F7WG8+mkoWRQ8oG+7c4NDrJ4nRiCGEK8zhcg4NMK33qpI6s73eeIVXkWiRfK A7IcS9OajeDbIOF8m18tXwZSvEqaYujIAr8rHJmRUuYnBKwdZ9+/AlCypbw4xL8pQXrOzm ofdBu8t7IU53n27XuXWH4uhqF0SCbN2lu2lkIg8CyivtEQUvrmPGz27MHwANd58smakyVA 4yZyH7K4ZQJ6T8Spv+9IHtS23W7Si/vByjEWuJu4BnvUcL+Q/56bDp3LyXLc5N6jrjpbcl 4Rm/f/wlo/sccAUkbuzaI7fVZlesriMPfxWCFQG1WAoXg0NM9L3O8oQHhokvJw== 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 4WdmZK60t6zNF4; Tue, 6 Aug 2024 21:26:01 +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 476LQ1s1067545; Tue, 6 Aug 2024 21:26:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476LQ1SI067542; Tue, 6 Aug 2024 21:26:01 GMT (envelope-from git) Date: Tue, 6 Aug 2024 21:26:01 GMT Message-Id: <202408062126.476LQ1SI067542@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 5bd6e6c1ddff - stable/14 - libusb: claim to be version 1.0.16 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5bd6e6c1ddff7f10e8b86703536d81af8ce0532b Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=5bd6e6c1ddff7f10e8b86703536d81af8ce0532b commit 5bd6e6c1ddff7f10e8b86703536d81af8ce0532b Author: Ed Maste AuthorDate: 2024-06-06 13:33:44 +0000 Commit: Ed Maste CommitDate: 2024-08-06 21:25:21 +0000 libusb: claim to be version 1.0.16 We are not 100% compatible with 1.0.16, but implement some functionality from that version that is required by certain ports. PR: 277799 PR: 279555 (exp-run) Event: Kitchener-Waterloo Hackathon 202406 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45514 (cherry picked from commit 5654b42142e1f689b26d405c90379b85f22349a0) --- lib/libusb/libusb-1.0.pc.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libusb/libusb-1.0.pc.in b/lib/libusb/libusb-1.0.pc.in index 7dbf746e773e..3a2f27cc52b8 100644 --- a/lib/libusb/libusb-1.0.pc.in +++ b/lib/libusb/libusb-1.0.pc.in @@ -6,6 +6,6 @@ includedir=@includedir@ Name: libusb-1.0 Description: Library that abstracts ways to access USB devices (v1.0) -Version: 1.0.13 +Version: 1.0.16 Libs: -L${libdir} -lusb Cflags: -I${includedir} From nobody Tue Aug 6 21:27: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 4Wdmbf2gZtz5ShSY; Tue, 06 Aug 2024 21:27:10 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wdmbf27Mzz4Zw5; Tue, 6 Aug 2024 21:27:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722979630; 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=WYsTUcWMtkLaTQp/VDEkLy45U7t5XmhtBBrhSbisgws=; b=DnRT2Cl4ly/5FbT13qeX3/RZNr1dDVyrtOy0MHCzU5jUdrVYwp6HoZVsKo0dDrgeFfoyOn dwpSuCB3Kk8O+Iaqn9JmtuKVgdzpLnbiwvpsZP6UFrugDEbB1SQENVj+YVZzLlhRcNxWpA dvVUgofU7a/5hpbMUerDtPEAszyjOZds+/7XtjNO0muowjxwvoz2W/sKvCCjsgVr8w5Elg UR9zzsf6pCURe73SQ5fhOydZemNe6AHAZ+Fe4v50slsoILkIOfze9EyUTlxnujLHrV5E9c onAQf8ag9GumXLMMCww14BAnEZ8QVj7233rVztu3xR9Tz0EkatXu+UErPDrsUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722979630; a=rsa-sha256; cv=none; b=NVB/eX4rlB+iHk5CH6vtJj+174OnK7rVdJEgxCkry5bcRiOnRn0yxxKjhGlSvjOnKX9YKz jcw+9L4Va0xDmaFwuqbgiQkT8xULxcBWmALkXRF2a+S62SQoHah+LXqsGOkfbS+z8KyKAM nWxCdQ8S6Brrhu4+j3uyT0S2ILHA8pNxJwCUbeJeFIfA3y6CNZCMe1gg/8HOYFaRAVqCFu krC6H1N2vA4nuOFguqUAMJFGhaOmmP+00880XtwnzDVrkGVHSnN+7Ep/7dT+xEvryNwMWD G19EvIMZgW3aulIbI7uDNrN4GGGeXAnm+RrjgkRf9oC57vuEmZ6+k35b36lPjQ== 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=1722979630; 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=WYsTUcWMtkLaTQp/VDEkLy45U7t5XmhtBBrhSbisgws=; b=x3WtPyxlc0Uza20Cq9qhjyLU0C2i9BmWH7SeEjhNyOM44rzL7izCnc7Cl1EXcis/8nE8SD DaOGgXlACEL/vszCKEYlpAZs5riGgHEDt4Tt3aU9isW6l/2LDl9wA3qniCJyE9sYTxj1ms OZvtZF3kqev61YH3d0N2pPSXKY0LmLXVnFxggApaqZGtOMgClGn8RhzN5CM1KCtV+JQqNI +zed9pz7CKeBaSpXZDRRQfsRP6fXK6am7IHTFoWDFD+K2CfKxTgVvDcm41qkzVE1yBJoiZ yrmms5uWdlMdSvl/BCN6zW1JVVxSSgM+KVnvyVpK/INlBX5OZy3cqTKcocxTdg== 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 4Wdmbf1MFPzNF8; Tue, 6 Aug 2024 21:27: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 476LRAjC067868; Tue, 6 Aug 2024 21:27:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476LRAsH067865; Tue, 6 Aug 2024 21:27:10 GMT (envelope-from git) Date: Tue, 6 Aug 2024 21:27:10 GMT Message-Id: <202408062127.476LRAsH067865@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 093d9b46f472 - main - ddb: update printing of t_flags and tflags2 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 093d9b46f4720392e53c171eaabfd7a6a8101170 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=093d9b46f4720392e53c171eaabfd7a6a8101170 commit 093d9b46f4720392e53c171eaabfd7a6a8101170 Author: Michael Tuexen AuthorDate: 2024-08-05 09:17:30 +0000 Commit: Michael Tuexen CommitDate: 2024-08-05 09:17:30 +0000 ddb: update printing of t_flags and tflags2 Update the ddb printing of t_flags and t_flags2 to the current state of definitions in tcp_var.h. Reviewed by: cc MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D46222 --- sys/netinet/tcp_usrreq.c | 92 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 84 insertions(+), 8 deletions(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 2ff7737a573b..8326c67cf085 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -2876,6 +2876,14 @@ db_print_tflags(u_int t_flags) db_printf("%sTF_PREVVALID", comma ? ", " : ""); comma = 1; } + if (t_flags & TF_WAKESOR) { + db_printf("%sTF_WAKESOR", comma ? ", " : ""); + comma = 1; + } + if (t_flags & TF_GPUTINPROG) { + db_printf("%sTF_GPUTINPROG", comma ? ", " : ""); + comma = 1; + } if (t_flags & TF_MORETOCOME) { db_printf("%sTF_MORETOCOME", comma ? ", " : ""); comma = 1; @@ -2896,18 +2904,10 @@ db_print_tflags(u_int t_flags) db_printf("%sTF_FASTRECOVERY", comma ? ", " : ""); comma = 1; } - if (t_flags & TF_CONGRECOVERY) { - db_printf("%sTF_CONGRECOVERY", comma ? ", " : ""); - comma = 1; - } if (t_flags & TF_WASFRECOVERY) { db_printf("%sTF_WASFRECOVERY", comma ? ", " : ""); comma = 1; } - if (t_flags & TF_WASCRECOVERY) { - db_printf("%sTF_WASCRECOVERY", comma ? ", " : ""); - comma = 1; - } if (t_flags & TF_SIGNATURE) { db_printf("%sTF_SIGNATURE", comma ? ", " : ""); comma = 1; @@ -2920,6 +2920,30 @@ db_print_tflags(u_int t_flags) db_printf("%sTF_TSO", comma ? ", " : ""); comma = 1; } + if (t_flags & TF_TOE) { + db_printf("%sTF_TOE", comma ? ", " : ""); + comma = 1; + } + if (t_flags & TF_CLOSED) { + db_printf("%sTF_CLOSED", comma ? ", " : ""); + comma = 1; + } + if (t_flags & TF_SENTSYN) { + db_printf("%sTF_SENTSYN", comma ? ", " : ""); + comma = 1; + } + if (t_flags & TF_LRD) { + db_printf("%sTF_LRD", comma ? ", " : ""); + comma = 1; + } + if (t_flags & TF_CONGRECOVERY) { + db_printf("%sTF_CONGRECOVERY", comma ? ", " : ""); + comma = 1; + } + if (t_flags & TF_WASCRECOVERY) { + db_printf("%sTF_WASCRECOVERY", comma ? ", " : ""); + comma = 1; + } if (t_flags & TF_FASTOPEN) { db_printf("%sTF_FASTOPEN", comma ? ", " : ""); comma = 1; @@ -2968,10 +2992,62 @@ db_print_tflags2(u_int t_flags2) db_printf("%sTF2_ACE_PERMIT", comma ? ", " : ""); comma = 1; } + if (t_flags2 & TF2_HPTS_CPU_SET) { + db_printf("%sTF2_HPTS_CPU_SET", comma ? ", " : ""); + comma = 1; + } if (t_flags2 & TF2_FBYTES_COMPLETE) { db_printf("%sTF2_FBYTES_COMPLETE", comma ? ", " : ""); comma = 1; } + if (t_flags2 & TF2_ECN_USE_ECT1) { + db_printf("%sTF2_ECN_USE_ECT1", comma ? ", " : ""); + comma = 1; + } + if (t_flags2 & TF2_TCP_ACCOUNTING) { + db_printf("%sTF2_TCP_ACCOUNTING", comma ? ", " : ""); + comma = 1; + } + if (t_flags2 & TF2_HPTS_CALLS) { + db_printf("%sTF2_HPTS_CALLS", comma ? ", " : ""); + comma = 1; + } + if (t_flags2 & TF2_MBUF_L_ACKS) { + db_printf("%sTF2_MBUF_L_ACKS", comma ? ", " : ""); + comma = 1; + } + if (t_flags2 & TF2_MBUF_ACKCMP) { + db_printf("%sTF2_MBUF_ACKCMP", comma ? ", " : ""); + comma = 1; + } + if (t_flags2 & TF2_SUPPORTS_MBUFQ) { + db_printf("%sTF2_SUPPORTS_MBUFQ", comma ? ", " : ""); + comma = 1; + } + if (t_flags2 & TF2_MBUF_QUEUE_READY) { + db_printf("%sTF2_MBUF_QUEUE_READY", comma ? ", " : ""); + comma = 1; + } + if (t_flags2 & TF2_DONT_SACK_QUEUE) { + db_printf("%sTF2_DONT_SACK_QUEUE", comma ? ", " : ""); + comma = 1; + } + if (t_flags2 & TF2_CANNOT_DO_ECN) { + db_printf("%sTF2_CANNOT_DO_ECN", comma ? ", " : ""); + comma = 1; + } + if (t_flags2 & TF2_PROC_SACK_PROHIBIT) { + db_printf("%sTF2_PROC_SACK_PROHIBIT", comma ? ", " : ""); + comma = 1; + } + if (t_flags2 & TF2_IPSEC_TSO) { + db_printf("%sTF2_IPSEC_TSO", comma ? ", " : ""); + comma = 1; + } + if (t_flags2 & TF2_NO_ISS_CHECK) { + db_printf("%sTF2_NO_ISS_CHECK", comma ? ", " : ""); + comma = 1; + } } static void From nobody Tue Aug 6 21:32:36 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 4Wdmjx0m0rz5ShP6; Tue, 06 Aug 2024 21:32:37 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wdmjx0BmJz4bYk; Tue, 6 Aug 2024 21:32:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722979957; 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=mxLh7ARsE2DPtttEYMaQosPtzg0eKRZQlmIHNF5n96o=; b=BqKMDadXq8JERrLE1qScN1sPAcvtc3ajB/V98vDHqDAyPceZk3BaWSWhbaiwabmbueJ9+m MdxQhB/NrcN0EDI63XC48EK9MQ0ybSD2rGh/8dWtw5GdgUlSdx9foTXA0113T7eK4/naP2 sPwuIjlHAmWnYhFNOkWMauqFlkUCoUpKD/WFPmFHhMaF8nhlS+KyqNTxkWCN3ovIDEAvZ7 aj7CONCsOTOohtdKJrNZA3Un22vbb/64bzsHAs3rIIY0e2SurBOFZ9075eKa227w5ef7yy 5n6qGf69fz6b//3lgOM207sve7u64EiwxCApUbCqDS5CbtLM8we9JzA+Z5EzSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722979957; a=rsa-sha256; cv=none; b=T9AhtRbtjCh+g4NNoo6HcKLTbx52k3bwB0JeBHznxjZvsl7nCH2z3DJKn70SFIWLW4kQZX 1eVgBgcOdoDwMQpVv2KkRx5NO2QZFVkWhVvThWDIdl94SIMmY12Mm96m7vWzyKPPH2jWA1 q7OyQNiIc8YfAhzZwcvtq6ULw7T5qHMPMvPkw57UJeHuc14/DxDDhN/0cPVAu14y1ImlFZ XjRhExz+k8+nPWYWCMlS68rSYQQrdTHb4QfyXipltAKBZAFrIonIckUAep3j2Ho0lh9qdI RqnImMc8LXBejfpmhTWaGkjVUdnv5wdCCWk+MlrdxRxa4HmBaz6/CJdFPoGXTg== 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=1722979957; 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=mxLh7ARsE2DPtttEYMaQosPtzg0eKRZQlmIHNF5n96o=; b=YtBYn3nmevF+tuWuCuqbsM2Ik6bLlVOpUPzhTCgMLnnpP9S3wtEbJSN2KLAQLdL/2GSQxX axf86Ge0o+OrylkaY2apVUYZS4YgLZew5VE/G7do7YEka/OKm/CEFw+XTgUhD7QfddUTNm ELYE9E7oLUpHHmwV7fz5L2M7ApBkS2P87jtcgOnlzDMGUmyP1s9gYggtph7wb/UNOKUEHz nGZZ6nPvhRdtXrlLY2GoMn6hVDXw9B3VGn2iD8NA7Urk/yR9evCHPdmv0o+i18eYMuXiaO KuSBmAUpY6saN9omIh+OeiP7EIrbRUKzGRwKlh3Zp8EqSGBBb2grbhzsBcchDg== 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 4Wdmjw6vpkzNlx; Tue, 6 Aug 2024 21:32:36 +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 476LWacn084059; Tue, 6 Aug 2024 21:32:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476LWanJ084056; Tue, 6 Aug 2024 21:32:36 GMT (envelope-from git) Date: Tue, 6 Aug 2024 21:32:36 GMT Message-Id: <202408062132.476LWanJ084056@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: feaaac5e153b - stable/14 - sctp: improve input validation for data chunks 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: feaaac5e153babd35b5b29b7e255d52e9b8f1093 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=feaaac5e153babd35b5b29b7e255d52e9b8f1093 commit feaaac5e153babd35b5b29b7e255d52e9b8f1093 Author: Michael Tuexen AuthorDate: 2024-08-03 11:27:18 +0000 Commit: Michael Tuexen CommitDate: 2024-08-06 21:32:06 +0000 sctp: improve input validation for data chunks fsn_included should only be considered, if first_frag_seen is true. Also, fix the resetting of the control structure, if stream queues are flushed. This fixes a bug where a legitimate message sequence was incorrectly classified as illegitimate. Thanks to Victor Boivie for reporting the issue on the userland stack. (cherry picked from commit 101a0f09e8baf8293e1eeb591de18caf15e49e00) --- sys/netinet/sctp_indata.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index 4c40e0de4326..693de313b970 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -746,21 +746,6 @@ sctp_build_readq_entry_from_ctl(struct sctp_queued_to_read *nc, struct sctp_queu nc->do_not_ref_stcb = control->do_not_ref_stcb; } -static void -sctp_reset_a_control(struct sctp_queued_to_read *control, - struct sctp_inpcb *inp, uint32_t tsn) -{ - control->fsn_included = tsn; - if (control->on_read_q) { - /* - * We have to purge it from there, hopefully this will work - * :-) - */ - TAILQ_REMOVE(&inp->read_queue, control, next); - control->on_read_q = 0; - } -} - static int sctp_handle_old_unordered_data(struct sctp_tcb *stcb, struct sctp_association *asoc, @@ -1922,7 +1907,8 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc, SCTP_SNPRINTF(msg, sizeof(msg), "Duplicate MID=%8.8x detected.", mid); goto err_out; } else { - if ((tsn == control->fsn_included + 1) && + if ((control->first_frag_seen) && + (tsn == control->fsn_included + 1) && (control->end_added == 0)) { SCTP_SNPRINTF(msg, sizeof(msg), "Illegal message sequence, missing end for MID: %8.8x", @@ -5430,12 +5416,25 @@ sctp_flush_reassm_for_str_seq(struct sctp_tcb *stcb, sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); } if (!TAILQ_EMPTY(&control->reasm)) { - /* This has to be old data, unordered */ + KASSERT(!asoc->idata_supported, + ("Reassembly queue not empty for I-DATA")); + KASSERT(!ordered, + ("Reassembly queue not empty for ordered data")); if (control->data) { sctp_m_freem(control->data); control->data = NULL; } - sctp_reset_a_control(control, stcb->sctp_ep, cumtsn); + control->fsn_included = 0xffffffff; + control->first_frag_seen = 0; + control->last_frag_seen = 0; + if (control->on_read_q) { + /* + * We have to purge it from there, hopefully this + * will work :-) + */ + TAILQ_REMOVE(&stcb->sctp_ep->read_queue, control, next); + control->on_read_q = 0; + } chk = TAILQ_FIRST(&control->reasm); if (chk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) { TAILQ_REMOVE(&control->reasm, chk, sctp_next); From nobody Tue Aug 6 21:38:40 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 4Wdmrx17QRz5Sj4v; Tue, 06 Aug 2024 21:38:41 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wdmrx0ZrGz4bxs; Tue, 6 Aug 2024 21:38:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722980321; 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=MRK7KelSXEQmxP7QtbmlorcBx6l7SJU4+D07qjQ8MYY=; b=XSAP0AovHEOR9ejdIiw8DvNiVmihouIOfVY+69IcRjXkmVl/tBhZ+Zo0+o4wTxaMmGTxo6 WkHok4WjSHccQknDUI/oGQ6gB321ks5RHmSnJldstPVPZpdWWtLJhE2AFTZitky7SMrqFh AdX06QK7mD+7LF/jaJE2oCzhi8dUcPRVyeCUO7d72BJyoKd74eEklT+UIKAB8AxVTdmrvU M2DBtNMWJBfbUPbRtEwCfkYjHfH62mdp9zlZKQcZmVrs8RJyFH/vkuVVNv2fVK+VWAA3Nl lfVVMU6qKPIqJpcrHmJCZ2eUz+3l8nmQAOTNS/gdO+ZOlJLGr+lyTD1j9Knw8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722980321; a=rsa-sha256; cv=none; b=FM1i6wM+FUyuAKmXAdAf2QzArUL7PpGFlfhT5Mibo8FxQLDy7gOy3LJFPqPTt0ZcO9dHDs 2FRrG6RrrvEQMP1VwQzFpJZNUedSopJtNO1rsWp4wKZFXlYPNL0zmDf179jdCNeLUiy2Ju cei7mL19nmGx7dGZ9kFfSDN+2BYv86hT7IkYsRhAXqs6bqk2nOuEzCei1qqjAUOpK+zUvI 99uFsdQM9bQuIu7K2riq67aOrXxpZSY+X7U4cmdMnWhnxoY2dA2SS1+NgkM4inVG43h9zM QHvEmMiJvpo5LjfKGgAhKv+rha8P8c6M+ZZJH44LNnJ/cwi1DgwbHB26n432xQ== 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=1722980321; 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=MRK7KelSXEQmxP7QtbmlorcBx6l7SJU4+D07qjQ8MYY=; b=QnMdQEEnuo/65TPU+168N/Rw3fbo7TRYjDnoXg/eA8fOjd6SmZjvhNfpb9hkA0pElZUsHC glqrSkbLDcq8B9EW1n2QQLawnutkZ8mWRIb277zTaoXjf+CUYWmINXFTYG9ac++5OP//wE xFE3pyXArZQx9p2YFAel9yL5E4bCkAgf5N6HJxgUVD3MBse5OS/c3AnEm3yKyg4prwASuM cdTyhyC864hH1yWMGrxuG91Y66SCskgStE8pL5VBnGrlrx5wy/sJKbTe/R9GvR57/ZDCzV nrrjopmuVBN8xQ5dl++78VbgPZ4IevnvYmrp7BiKYP3uE+LuBinbvJVGx93rGQ== 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 4Wdmrx09yBzNG1; Tue, 6 Aug 2024 21:38:41 +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 476Lcetp085000; Tue, 6 Aug 2024 21:38:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476LceaS084997; Tue, 6 Aug 2024 21:38:40 GMT (envelope-from git) Date: Tue, 6 Aug 2024 21:38:40 GMT Message-Id: <202408062138.476LceaS084997@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 18f4b705734e - stable/13 - sctp: improve input validation for data chunks 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 18f4b705734e1c76bac441ffe86cb8fbb131a153 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=18f4b705734e1c76bac441ffe86cb8fbb131a153 commit 18f4b705734e1c76bac441ffe86cb8fbb131a153 Author: Michael Tuexen AuthorDate: 2024-08-03 11:27:18 +0000 Commit: Michael Tuexen CommitDate: 2024-08-06 21:38:16 +0000 sctp: improve input validation for data chunks fsn_included should only be considered, if first_frag_seen is true. Also, fix the resetting of the control structure, if stream queues are flushed. This fixes a bug where a legitimate message sequence was incorrectly classified as illegitimate. Thanks to Victor Boivie for reporting the issue on the userland stack. (cherry picked from commit 101a0f09e8baf8293e1eeb591de18caf15e49e00) --- sys/netinet/sctp_indata.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index 4c40e0de4326..693de313b970 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -746,21 +746,6 @@ sctp_build_readq_entry_from_ctl(struct sctp_queued_to_read *nc, struct sctp_queu nc->do_not_ref_stcb = control->do_not_ref_stcb; } -static void -sctp_reset_a_control(struct sctp_queued_to_read *control, - struct sctp_inpcb *inp, uint32_t tsn) -{ - control->fsn_included = tsn; - if (control->on_read_q) { - /* - * We have to purge it from there, hopefully this will work - * :-) - */ - TAILQ_REMOVE(&inp->read_queue, control, next); - control->on_read_q = 0; - } -} - static int sctp_handle_old_unordered_data(struct sctp_tcb *stcb, struct sctp_association *asoc, @@ -1922,7 +1907,8 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc, SCTP_SNPRINTF(msg, sizeof(msg), "Duplicate MID=%8.8x detected.", mid); goto err_out; } else { - if ((tsn == control->fsn_included + 1) && + if ((control->first_frag_seen) && + (tsn == control->fsn_included + 1) && (control->end_added == 0)) { SCTP_SNPRINTF(msg, sizeof(msg), "Illegal message sequence, missing end for MID: %8.8x", @@ -5430,12 +5416,25 @@ sctp_flush_reassm_for_str_seq(struct sctp_tcb *stcb, sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); } if (!TAILQ_EMPTY(&control->reasm)) { - /* This has to be old data, unordered */ + KASSERT(!asoc->idata_supported, + ("Reassembly queue not empty for I-DATA")); + KASSERT(!ordered, + ("Reassembly queue not empty for ordered data")); if (control->data) { sctp_m_freem(control->data); control->data = NULL; } - sctp_reset_a_control(control, stcb->sctp_ep, cumtsn); + control->fsn_included = 0xffffffff; + control->first_frag_seen = 0; + control->last_frag_seen = 0; + if (control->on_read_q) { + /* + * We have to purge it from there, hopefully this + * will work :-) + */ + TAILQ_REMOVE(&stcb->sctp_ep->read_queue, control, next); + control->on_read_q = 0; + } chk = TAILQ_FIRST(&control->reasm); if (chk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) { TAILQ_REMOVE(&control->reasm, chk, sctp_next); From nobody Tue Aug 6 21:52:54 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 4Wdn9L3WFJz5SkRg; Tue, 06 Aug 2024 21:52:54 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wdn9L32fwz4cwX; Tue, 6 Aug 2024 21:52:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722981174; 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=h0X/1gDxCgCYrGc+njIqvKMv41GtQPwKDh8Qn15P2a4=; b=jN24xz+8ldqepsmHAP8Nz0dg5c3Q562xFACiWqWWIe0K2QNNmATIwnm8d2rh/mD6rxY8wb Cu+OSoNyDBgbJTN1ikOv4jfm/MkHdhCRk8FUgkTSTw78tdWgYWpukzVk41zAHJPKYByO33 VhWsxHA9IoE0gH2L4NP6og936n8raO3IO6mniS4jQ1H0y7NRPDaRwI+pMNl492tGCnX/li C9qAJpnVSRfPPuMv0CGMNPLWwHLWeTaCyuvqVXhZ9mBGBJ3SgEMpaPFtu71fQe6z0UQyfp QwDfZO2vdBGpB9p4kF9MvrJNNsXGOYfSjgiDypPR96gjrPTlQO3Ac+01x0EbeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722981174; a=rsa-sha256; cv=none; b=yGc/8zSCJWLFqxrpyyVia9CNJnfda/aUGnt0PkisDBnxcpEgYHOwWsuBQmRQgK7oUur2s1 u6mFAtsE+DWyzadEOqtNUbxJ7roc64addP5qbRZO4IWKtqiCz19Pji5lmxAHOz7KEKAumL vws3LDMl8Hc2tVKwV/QoeaB1hjQlzdsvZvI6YX93Kp3YXEqUBxl2hW/cIknmUPIMWXpm8Z HIWRehdfOvq/tdjVLCje/uoucD109FO2nSe+hfVBfgX55PJGv3w8vfkmZ5ra/1znt9Flx+ 7BxPkRXtNk2rd7YCpOT47vPdALsyw6iPkpjc1YsGOh+jh+VrTCXaxWzCC2x6Yw== 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=1722981174; 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=h0X/1gDxCgCYrGc+njIqvKMv41GtQPwKDh8Qn15P2a4=; b=VCeIdcPGXet2u9IdcxaiPP5jh/Zp62cVCEPlBY0nS5brg0Fpl49X2Q4TP84x6fLKBPvZYZ UevrBZzIZyAku3u6x+LsBkQp5APFzrxWFkEE6qoJ2Mn5HwL9OwV6odp6TngHIBpXl+FRc7 S9Ns6QwblLNmvWIOjk7XJ0YcMtRKapf2JUFOUsTfE3rN+SGpW01CHJOZ2YlIgweatzOFg/ 7SYPv3QAC8eQejpJpkTYZyGhxBhT5Zsy/Wrtqv9u2GLhWYpVSh8jBOYBRQP/TsHM/6wVEi bXMitX1XZKndhMcZpDhKyYazi3Mg64N82p2UiCOWAM+cn4IFqv79k0sEV0KmqA== 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 4Wdn9L2f7CzP0Z; Tue, 6 Aug 2024 21:52:54 +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 476LqskV017926; Tue, 6 Aug 2024 21:52:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476LqsMN017923; Tue, 6 Aug 2024 21:52:54 GMT (envelope-from git) Date: Tue, 6 Aug 2024 21:52:54 GMT Message-Id: <202408062152.476LqsMN017923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 02ef8e4061ab - stable/13 - libusb: claim to be version 1.0.16 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 02ef8e4061abc0a0fc148a8e41efde46fde0d5b0 Auto-Submitted: auto-generated The branch stable/13 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=02ef8e4061abc0a0fc148a8e41efde46fde0d5b0 commit 02ef8e4061abc0a0fc148a8e41efde46fde0d5b0 Author: Ed Maste AuthorDate: 2024-06-06 13:33:44 +0000 Commit: Ed Maste CommitDate: 2024-08-06 21:52:37 +0000 libusb: claim to be version 1.0.16 We are not 100% compatible with 1.0.16, but implement some functionality from that version that is required by certain ports. PR: 277799 PR: 279555 (exp-run) Event: Kitchener-Waterloo Hackathon 202406 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D45514 (cherry picked from commit 5654b42142e1f689b26d405c90379b85f22349a0) (cherry picked from commit 5bd6e6c1ddff7f10e8b86703536d81af8ce0532b) --- lib/libusb/libusb-1.0.pc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libusb/libusb-1.0.pc b/lib/libusb/libusb-1.0.pc index d748439c2257..0815a8eb6e9c 100644 --- a/lib/libusb/libusb-1.0.pc +++ b/lib/libusb/libusb-1.0.pc @@ -5,6 +5,6 @@ includedir=${prefix}/include Name: libusb-1.0 Description: Library that abstracts ways to access USB devices (v1.0) -Version: 1.0.13 +Version: 1.0.16 Libs: -L${libdir} -lusb Cflags: -I${includedir} From nobody Tue Aug 6 22:38:08 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 4Wdp9Y1LhDz5SnQs; Tue, 06 Aug 2024 22:38:09 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wdp9Y0r6Xz4hZB; Tue, 6 Aug 2024 22:38:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722983889; 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=NbDRm1pexAhLn4dJnkQNdFVEs8/OaDJHldba/CoU3tM=; b=RywBIbyvLnNye97SEkrGh2LqIyS94l5+Xzmc/K93R9C8Mk3bJ4IaKk4woaS5NVpPwaf1px b+4ligYeVQNb3V5B/zIGsuQpNqVdukkdc7phTpLLKoVhyed8Vn7Tp7IGoqPHR1mVA5q5zp ylarlACZTHksvc/irauTDiNDqx5wStotoDOvqikpPiEO1kHiunzs8OS/7F84/4nKrZtgHZ RyYQOpsn91leb6az+MN25D0hO703lxg0c0w24D0OrkG283VmfeceFKrBoxngFczx948eYE W0thGOCYes0ZGLCZ0SXOG8UaJCuGpOrbz+ZCVl82stZAw6Gz/OmZSXOiJN4P5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722983889; a=rsa-sha256; cv=none; b=NwqXl1L0FoQBWGG636BwmYw9mcASlsnSglymTEYgTs0Rgwv+YVOCirEDSJiosavtrE1Hd1 TMmDKpQIUWkj6HYKEfwGAVtx5XWjG61GiaFZp59T3028f7RtMywKAG1DdGBOjw39Cq4ybf VoCvBcgE/hG/56cEEYUmV6chkNDLUQI3MhojEZI/OqvGr23lFC9YgK1srj14bC9wBUPY32 50uaWZyfoPUaiSddQa5P7kYLrWctvcG76Mhc0gKQYvqkQpABH72GufHM3CbiNWBxWEQnao s0shUG68rDFKPAnrqvMfn5i88yU0bkZXxG11GR9su8GZ4jKhNs2s+zyrIbBAkA== 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=1722983889; 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=NbDRm1pexAhLn4dJnkQNdFVEs8/OaDJHldba/CoU3tM=; b=mWLdpqw77OFZmaNv79L1N/5S/hGfLDuIIXsgjIXKJJxOFNHL5/vTUpEcu2pgk4A9lxoxEJ rNckSPNCZU0VWo8TPIWf18vB28ACi8yX6xjasFONzoeI0J3HMuNUtTuOrQ64/ykNWYthnC mYaFD5iOIs7kqLIo4xQu8rLNdy78gfDKwiX7I/krY0OKd/Ecix5OMOFHpjGHN7dW7oicto uxc28AT1D+4syuO44jiZHuQjzbSMNoeQPf9Eb58seGOxaQH9OE/xYDZ9vP83EnBpaIVGW8 GBF5CW6U4Ru0jQRLG0zBJo420px9RuSM1qqbeREp41cuR+gPNGjfSdo1IwpS1Q== 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 4Wdp9Y0PdVzQ7G; Tue, 6 Aug 2024 22:38:09 +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 476Mc8I3086563; Tue, 6 Aug 2024 22:38:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476Mc8RJ086560; Tue, 6 Aug 2024 22:38:08 GMT (envelope-from git) Date: Tue, 6 Aug 2024 22:38:08 GMT Message-Id: <202408062238.476Mc8RJ086560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 9badd542e755 - releng/13.4 - sctp: improve input validation for data chunks 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.4 X-Git-Reftype: branch X-Git-Commit: 9badd542e7552f9dfd4b868733a1e67c8f6df2df Auto-Submitted: auto-generated The branch releng/13.4 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=9badd542e7552f9dfd4b868733a1e67c8f6df2df commit 9badd542e7552f9dfd4b868733a1e67c8f6df2df Author: Michael Tuexen AuthorDate: 2024-08-03 11:27:18 +0000 Commit: Michael Tuexen CommitDate: 2024-08-06 22:36:18 +0000 sctp: improve input validation for data chunks fsn_included should only be considered, if first_frag_seen is true. Also, fix the resetting of the control structure, if stream queues are flushed. This fixes a bug where a legitimate message sequence was incorrectly classified as illegitimate. Thanks to Victor Boivie for reporting the issue on the userland stack. (cherry picked from commit 101a0f09e8baf8293e1eeb591de18caf15e49e00) (cherry picked from commit 18f4b705734e1c76bac441ffe86cb8fbb131a153) Approved by: re (cperciva) --- sys/netinet/sctp_indata.c | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/sys/netinet/sctp_indata.c b/sys/netinet/sctp_indata.c index 4c40e0de4326..693de313b970 100644 --- a/sys/netinet/sctp_indata.c +++ b/sys/netinet/sctp_indata.c @@ -746,21 +746,6 @@ sctp_build_readq_entry_from_ctl(struct sctp_queued_to_read *nc, struct sctp_queu nc->do_not_ref_stcb = control->do_not_ref_stcb; } -static void -sctp_reset_a_control(struct sctp_queued_to_read *control, - struct sctp_inpcb *inp, uint32_t tsn) -{ - control->fsn_included = tsn; - if (control->on_read_q) { - /* - * We have to purge it from there, hopefully this will work - * :-) - */ - TAILQ_REMOVE(&inp->read_queue, control, next); - control->on_read_q = 0; - } -} - static int sctp_handle_old_unordered_data(struct sctp_tcb *stcb, struct sctp_association *asoc, @@ -1922,7 +1907,8 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc, SCTP_SNPRINTF(msg, sizeof(msg), "Duplicate MID=%8.8x detected.", mid); goto err_out; } else { - if ((tsn == control->fsn_included + 1) && + if ((control->first_frag_seen) && + (tsn == control->fsn_included + 1) && (control->end_added == 0)) { SCTP_SNPRINTF(msg, sizeof(msg), "Illegal message sequence, missing end for MID: %8.8x", @@ -5430,12 +5416,25 @@ sctp_flush_reassm_for_str_seq(struct sctp_tcb *stcb, sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); } if (!TAILQ_EMPTY(&control->reasm)) { - /* This has to be old data, unordered */ + KASSERT(!asoc->idata_supported, + ("Reassembly queue not empty for I-DATA")); + KASSERT(!ordered, + ("Reassembly queue not empty for ordered data")); if (control->data) { sctp_m_freem(control->data); control->data = NULL; } - sctp_reset_a_control(control, stcb->sctp_ep, cumtsn); + control->fsn_included = 0xffffffff; + control->first_frag_seen = 0; + control->last_frag_seen = 0; + if (control->on_read_q) { + /* + * We have to purge it from there, hopefully this + * will work :-) + */ + TAILQ_REMOVE(&stcb->sctp_ep->read_queue, control, next); + control->on_read_q = 0; + } chk = TAILQ_FIRST(&control->reasm); if (chk->rec.data.rcv_flags & SCTP_DATA_FIRST_FRAG) { TAILQ_REMOVE(&control->reasm, chk, sctp_next); From nobody Tue Aug 6 23:30:27 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 4WdqKw14D5z5S8P2; Tue, 06 Aug 2024 23:30:28 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdqKw0W3tz4mV0; Tue, 6 Aug 2024 23:30:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722987028; 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=wOQ59n7MkKwQFHSJm1unAn0QvhQkvzx+3eKELbBmtHU=; b=IexS3mzFcEJ4MKu7e56/QYDBtEhMfOW7zF1JyC1O88MRJc7n5qBSpdTLLP1Qyq6DFIiwB8 fwMQSh0SDzqEb38wClISLEB874VqrFvUj6NROE+q1+qopV8CxoWVneNaDhwLDY5Sz7iz7r V6wb4rpMqfmtDvUQbeuvcHFvKUxJ4vfdgC2ccOdoVCkJ/d6M9ssUymaQ1sm/JX3ZG6b9Y2 jZDKQVlG25uW1AmyWyunbwtu017ND+gvU2jhOimLTF5qfC6x4PocecxtVY5sf4AAn2eZ0U tZtyWD9OcgUV0zoKBwv142GRjMHmndoo/+QkjMUWRWJKXmFwT2CRaB4fIjHxBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722987028; a=rsa-sha256; cv=none; b=ENsOqjD+yITlF0KX1af22pmlyjOgZ6C/fv1Ld/CugWdAwxET1FIelqkpModGyc6ckWr7/h HEH9BtN0/RIz0Y+qcAiVLbpBNy6K3qd6FyTzet9c6K17ifWD5oo3dxkQYn05wW+iqGnfR0 uk2k+CxpAmVXwaFXsqM75EVD4syNJhqZrhbAn+oyjWyXKlIhifbJejW0SvuFvb7q8uqBgP B2h9lkPsxf/onJCS9/kLBsWNZVtQjbzl6oAvVLSmFIsIiL/kh6/sIHH+u2firLm+PSNA6n QjX73l0uONu0PgK9jAV6omOAPoIrozGmbtaqGE07Bv4FEaLzXXmhFIg2sqNvPQ== 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=1722987028; 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=wOQ59n7MkKwQFHSJm1unAn0QvhQkvzx+3eKELbBmtHU=; b=iscg8IHxmYwiwzY3MGK3zLzc2KcrxvnsTX6oShtcQmTIX1jfLDiEpYerLddjiB90W9VC8u OILn/S3Y5zDnK0FwQ8JFT+HPHCp7WZR32TdiL7ZfkhAWlTlIoHyoumNZP6p18T0LRotxuX qeqb00ylVqTWoc6mEgc0rL6eVTV55bdp1GWSd1VcsoYrOLEz36eVYP6FfuyAuEhsDausaB Py1whN/TSiwu1SvuJtf/6cnTAE8wOBzafh+i3aZ/K+7nt5WbJzfZ2vjd7solRA7Fe2T0Xv 90de0RNUUri/+9yzOQ7R1S9qiGnIHdGnTkeOxhn9GqgEYQBeNEjemeS4sz+gfQ== 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 4WdqKw00SbzRTW; Tue, 6 Aug 2024 23:30:27 +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 476NURBN080791; Tue, 6 Aug 2024 23:30:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476NURrx080788; Tue, 6 Aug 2024 23:30:27 GMT (envelope-from git) Date: Tue, 6 Aug 2024 23:30:27 GMT Message-Id: <202408062330.476NURrx080788@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7ee781e2bfc2 - main - loader: Document that WITH_BEARSSL may need other tweaks 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ee781e2bfc2558060dec95564414a0bff4415c1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7ee781e2bfc2558060dec95564414a0bff4415c1 commit 7ee781e2bfc2558060dec95564414a0bff4415c1 Author: Warner Losh AuthorDate: 2024-08-05 21:16:37 +0000 Commit: Warner Losh CommitDate: 2024-08-06 23:22:36 +0000 loader: Document that WITH_BEARSSL may need other tweaks /boot/loader is right up aginst the 500k limit we have to make sure everything works in a wide variety of environments. However, adding WITH_BEARSSL can push it over the edge since we are so close to the limit with it enabled. One may also need to increase LOADERSIZE when enabling it. It's often safe to go much higher, especially when you don't plan on using pxeldr. Document this trade off here. MFC After: 3 days Sponsored by: Netflix Reviewed by: sjg, markj Differential Revision: https://reviews.freebsd.org/D46211 --- tools/build/options/WITH_BEARSSL | 19 +++++++++++++++++++ tools/build/options/WITH_LOADER_VERIEXEC | 2 ++ 2 files changed, 21 insertions(+) diff --git a/tools/build/options/WITH_BEARSSL b/tools/build/options/WITH_BEARSSL index 6a4447d723ed..9dcebbf1ae30 100644 --- a/tools/build/options/WITH_BEARSSL +++ b/tools/build/options/WITH_BEARSSL @@ -8,3 +8,22 @@ This library is currently only used to perform signature verification and related operations for Verified Exec and .Xr loader 8 . +.Pp +Due to size constraints, one may need to set +.Va LOADERSIZE +larger than the +default 500000, although often loader is under the 500k limit even with +this option. +Setting +.Va LOADERSIZE +larger than 500000 may cause +.Xr pxeboot 8 +to be too large to work. +Careful testing of the loader in the target environment when built with a larger +limit to establish safe limits is critical because different BIOS environments +reserve differing amounts of the low 640k space, making a precise limit for +everybody impossible. +.Pp +See also +.Va WITH_LOADER_PXEBOOT +for other considerations. diff --git a/tools/build/options/WITH_LOADER_VERIEXEC b/tools/build/options/WITH_LOADER_VERIEXEC index a50ff9a317e6..d784df968949 100644 --- a/tools/build/options/WITH_LOADER_VERIEXEC +++ b/tools/build/options/WITH_LOADER_VERIEXEC @@ -4,3 +4,5 @@ with support for verification similar to Verified Exec. .Pp Depends on .Va WITH_BEARSSL . +May require a larger +.Va LOADERSIZE . From nobody Tue Aug 6 23:30:28 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 4WdqKx1cFFz5S8Yx; Tue, 06 Aug 2024 23:30:29 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdqKx1190z4mQ1; Tue, 6 Aug 2024 23:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722987029; 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=NL/u5B/lqaQQgEPDkQEkqaoN7benN/pglHxjMtH4AM8=; b=OvCz0Ws7cwOqvtVagWWoKUGLm7kVBz0GQPC/gfSv5ZDOXGT2J32vcuafTVfEzxtaC6polK QIDBWDDHwlnCTu7Q5WXW7fcrmRNPrj2LwEE/OF+weWmG2XZ4LSsfMNeKJ7bjIDrB3jyLzk hju/FvEd9xiZiDkSwl2u+pl7rEanqZ9hmVrmWvm7r56zK051qiqoFkbCfoidQH6366fbuJ TN9+x7dOS/I0wZzIvczBYQ8N/9fK3ZGO2ezUN6gpbs2el9uLjxZFQZ9ivcBx0/3v5dT1/N bZTn+uJE/Qmk/Oe8ozLT0bxkzWmsbN624MT6PRFKSksHWp+QX0gy4UvhOVumAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722987029; a=rsa-sha256; cv=none; b=nbr6T31tGUDdZixXIetM3dYkSFMra3mvqXg6XQIivoS/60EF1L12sIDDxIKioMAwKA8P+x NsgHqPC/fUaKLUOMTa73Q/ThdY4hhJ0YdXChwuYoFf5S0EsUxTb0P97ZLPEV0I1NS6/EUB zRSWwmsPHWuXIZcj4gNfqO2nX6nysS3J6KzMMwp9YFun7mw4V6jjyC6UsNpLHU7jhYf0zX DwvLes7STbC8RZ8LKwy7fRrRT8eEU1poay5vEP7PacoisMWKTcken3b9pcO+NMrijXDJ16 xK7HjfhrGExChumiDzEe3u0P35Sgn+3R2g067F2T+hQHyp/umokl1ocn7XKuAw== 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=1722987029; 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=NL/u5B/lqaQQgEPDkQEkqaoN7benN/pglHxjMtH4AM8=; b=tNGdmIw7Pbn1BAxpXq2yIVZcYba2oXUh5+qTZt9/RzolzkLkgtncnP68hFdwgiVUlRg+ha VDK4kRHYX9XyYWD4WxZa+kvxbJ45fhh6fzA2XYVtP4YZSkryGv4uhE+nNyRBUmrf1Eh2au AYKAdLaNxPSM+ZicRcYBprh4XgdYZ7ARW/WelQHL1cZnRQVpC+5wTFoGpe2VoCH4GR2OHs MQbtnLnseeftsAKhuB6MjwK5dN168UOnrGGLXXCzBbi09Hm9qojETedA7GhLwbKl3qgaCK 8ss1Okkmcv4AXp1UFLXMIJ42C1K9Byhgbo8JIqmWbSORh6SUFRVd/fxXiQKv6Q== 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 4WdqKx0dYlzRht; Tue, 6 Aug 2024 23:30:29 +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 476NUS24080834; Tue, 6 Aug 2024 23:30:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476NUSJl080831; Tue, 6 Aug 2024 23:30:28 GMT (envelope-from git) Date: Tue, 6 Aug 2024 23:30:28 GMT Message-Id: <202408062330.476NUSJl080831@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 20d35d581785 - main - loader: Add WITH/WITHOUT_LOADER_PXEBOOT build option 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 20d35d5817851df3a6d20e75df2e14a192b94940 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=20d35d5817851df3a6d20e75df2e14a192b94940 commit 20d35d5817851df3a6d20e75df2e14a192b94940 Author: Warner Losh AuthorDate: 2024-08-05 21:19:21 +0000 Commit: Warner Losh CommitDate: 2024-08-06 23:22:36 +0000 loader: Add WITH/WITHOUT_LOADER_PXEBOOT build option Make it possible to disable pxeboot. This loader will fail to build when it's too large. When /boot/loader needs to be larger like that, this options will disable a component whose build will fail. It is an explicit option rather than implicit when things are too large to force the user to make the explicit tradeoffs rather than wonder why they have a stale pxeboot or other odd failure mode. MFC After: 3 days Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D46212 --- share/mk/src.opts.mk | 1 + stand/i386/Makefile | 2 +- tools/build/options/WITHOUT_LOADER_PXEBOOT | 10 ++++++++++ tools/build/options/WITH_LOADER_PXEBOOT | 25 +++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index d7e246d10396..c10598246639 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -130,6 +130,7 @@ __DEFAULT_YES_OPTIONS = \ LOADER_KBOOT \ LOADER_LUA \ LOADER_OFW \ + LOADER_PXEBOOT \ LOADER_UBOOT \ LOCALES \ LOCATE \ diff --git a/stand/i386/Makefile b/stand/i386/Makefile index a08e956ef4f9..f9aedcc3a008 100644 --- a/stand/i386/Makefile +++ b/stand/i386/Makefile @@ -16,7 +16,7 @@ SUBDIR.${MK_LOADER_LUA}+= loader_lua SUBDIR.yes+= loader_simp # special boot programs, 'self-extracting boot2+loader' -SUBDIR.yes+= pxeldr +SUBDIR.${MK_LOADER_PXEBOOT}+= pxeldr SUBDIR.${MK_LOADER_ZFS}+= zfsboot gptzfsboot diff --git a/tools/build/options/WITHOUT_LOADER_PXEBOOT b/tools/build/options/WITHOUT_LOADER_PXEBOOT new file mode 100644 index 000000000000..e6b09381884e --- /dev/null +++ b/tools/build/options/WITHOUT_LOADER_PXEBOOT @@ -0,0 +1,10 @@ +Do not build pxeboot on i386/amd64. +When the pxeboot is too large, or unneeded, it may be disabled with this option. +See +.Va WITH_LOADER_PXEBOOT +for how to adjust the defaults when you need both a larger +.Pa /boot/loader +and +.Pa /boot/pxeboot +.Pp +This option only has an effect on x86. diff --git a/tools/build/options/WITH_LOADER_PXEBOOT b/tools/build/options/WITH_LOADER_PXEBOOT new file mode 100644 index 000000000000..01d4a0b86a66 --- /dev/null +++ b/tools/build/options/WITH_LOADER_PXEBOOT @@ -0,0 +1,25 @@ +Build pxeboot on i386/amd64. +The PXE Boot loader package needs more space than we may have in the boot loader. +If you need to increase +.Va LOADERSIZE +beyond 500000, then building +.Xr pxeboot 8 +will fail. +To allow a larger +.Va LOADERSIZE +for some environments, it may be necessary to disable pxeboot builds or adjust +its defaults. +You can set the default loader for pxeboot to use independently of the system +default by setting +.Va PXEBOOT_DEFAULT_INTERP +to one of +.Dq lua , +.Dq 4th , +or +.Dq simp . +The limit on the size of the loader used for +.Xr pxeboot 8 +can be set independently with +.Va PXEBOOTSIZE . +.Pp +This option only has an effect on x86. From nobody Tue Aug 6 23:30:30 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 4WdqKy3Rswz5S8Sm; Tue, 06 Aug 2024 23:30:30 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdqKy21h3z4m9X; Tue, 6 Aug 2024 23:30:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722987030; 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=Spwqf3ZxdWBZJAMmBo6pIU0nqsQd7DOvY8xA/YK7W5M=; b=ES/dC/WMR5iB61oGVTyAK5d9OdExA60D0l8X1+3dxZyg1k6rEKXqE2sQLbG/N6hXusunN+ Bh5oI2Gtf6x9yJclOY1quWIRQnbX9pYxIEumEKBUSRF/f4Y3RiakM3TR1k6ONx2x6A5yb9 7TPG6dBFFb8CxUj8CLnakOjIK4UkNYOOlu6Dm+qzkPXNmi/9B5yY4WZeMgDf58/LjbvU7j C+2/nyMPZ6277ndi1/PP0IaQKT+N9UlFLlFnDI4OGz10khiv5AqzPlCkcTlehdafYy3Qat TBuroP4cBEa3LLdcLjaPUx0xSupDVNdwb9pvdg+4cId3qqdlY250FphtvuG+aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722987030; a=rsa-sha256; cv=none; b=Tk5HRFhTaY93EshtFGZd/TnULMwiAv3xIcS7vwrO1EKYwf1tNkB0NvCwTN7Xs0nXhW4q1o AklGJVmgXjeXyRAq0eBwpI01xyQyw7/QA2ffCKH7q05vkgCQkdHMLyd0t8mVEimIh7MRL7 p82dN2lHFxq+n8Tb5NQiIFJCwTTzG0OCjeV0sSeNNcMrAqhzw+rzI67SJBJ3dJmppQ2Z5C ImnLEqWiLl4ohqEzZxv6b/0AThaN0JUnwf64afSxr+hu9GET8t6jjE/SuEgJatfzrjS8et OU5/uqZ8ARpskvVRVXYqPydMXeA4ND+uBhxLPAOQGzlzthR7RLi4P0cqTPqiGg== 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=1722987030; 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=Spwqf3ZxdWBZJAMmBo6pIU0nqsQd7DOvY8xA/YK7W5M=; b=rYS/5Z+Go61g2Etm1fBnHMSQa3bwSc5//d+0puzshcLf9S4Pz0VW2Xs3HeQPv/fdk85yJ2 dx/r11UqSujGlvMUQdYvKap4yK0/DBOBLObBfM9b3uc73039AxkmjYhtwRhTvYNosjLm// lhZgOpV4EbuLwnmZvGfbWA4Oe7swYCDMKo5s9hLivOGW1PbJ8NjKmw02bvegWZvHvUoWmq aIG+1FbGUpaLdIHl7D79xJSzKb/d9epe5sBWzdUIqrhCCzllUkIDtDyjwSFq1TnVFFS2cQ olSepJkb2teHDTW0AxMAZAzVkgxB/vSf4nKnrfDOrAgXhXDT8BbwJAgR/mi28w== 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 4WdqKy1HbQzRQw; Tue, 6 Aug 2024 23:30:30 +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 476NUU7F080885; Tue, 6 Aug 2024 23:30:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476NUUmQ080882; Tue, 6 Aug 2024 23:30:30 GMT (envelope-from git) Date: Tue, 6 Aug 2024 23:30:30 GMT Message-Id: <202408062330.476NUUmQ080882@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f4762e9135d1 - main - pxeboot: Allow a different default loader for pxeboot 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f4762e9135d181f5d4f2a9d688ff803ee53ad808 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f4762e9135d181f5d4f2a9d688ff803ee53ad808 commit f4762e9135d181f5d4f2a9d688ff803ee53ad808 Author: Warner Losh AuthorDate: 2024-08-05 21:19:29 +0000 Commit: Warner Losh CommitDate: 2024-08-06 23:22:36 +0000 pxeboot: Allow a different default loader for pxeboot Sometimes you need / want a different boot loader than loader_lua for pkeldr. Provide an option to get either the 4th one or the simp one. MFC After: 3 days Sponsored by: Netflix Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46213 --- stand/i386/Makefile | 7 ++++++- stand/i386/pxeldr/Makefile | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/stand/i386/Makefile b/stand/i386/Makefile index f9aedcc3a008..768496598575 100644 --- a/stand/i386/Makefile +++ b/stand/i386/Makefile @@ -20,6 +20,11 @@ SUBDIR.${MK_LOADER_PXEBOOT}+= pxeldr SUBDIR.${MK_LOADER_ZFS}+= zfsboot gptzfsboot -SUBDIR_DEPEND_pxeldr+= loader_${LOADER_DEFAULT_INTERP} +.if defined(PXEBOOT_DEFAULT_INTERP) +L=${PXEBOOT_DEFAULT_INTERP} +.else +L=${LOADER_DEFAULT_INTERP} +.endif +SUBDIR_DEPEND_pxeldr+= loader_${L} .include diff --git a/stand/i386/pxeldr/Makefile b/stand/i386/pxeldr/Makefile index a303aff413a8..bec2a27af47a 100644 --- a/stand/i386/pxeldr/Makefile +++ b/stand/i386/pxeldr/Makefile @@ -22,7 +22,11 @@ CFLAGS+=-DALWAYS_SERIAL CFLAGS+=-I${BOOTSRC}/i386/common +.if defined(PXEBOOT_DEFAULT_INTERP) +L=${PXEBOOT_DEFAULT_INTERP} +.else L=${LOADER_DEFAULT_INTERP} +.endif LOADERBIN= ${BOOTOBJ}/i386/loader_${L}/loader_${L}.bin CLEANFILES+= ${BOOT}.tmp From nobody Tue Aug 6 23:30:31 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 4WdqKz4GpLz5S8Yy; Tue, 06 Aug 2024 23:30:31 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdqKz2GQhz4mVH; Tue, 6 Aug 2024 23:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722987031; 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=P3U//pV7t5XnGOaO2gUaQjA48lLQwaedNPJRi0vfRc0=; b=Y8oJaQpUxv4tqOopY6qzHXWb3wqfqnSZcxB0LhU+oE56hPQbPQSGmZAdhEi1EVZA+5ZkmY fkDBhBpPfGIV9EsfYi9JfMpzNgeutl+Rfy2y2QRtTBu0MVxXknH9cgj+LraN1iSNJQSJiA 51ARJfDIngiQntYXO4x1kZPngH5G3eKDupiGf/TatlWLIKirgB4zSVpyV6uGyumTMCizV/ fcGS9NP15XBvjzE6HbLY9i85Pw28k6vTsIfdcPUCLVyw6ShuwPuoGOekYOc34M0YNSc67B HZ2x0VvL0rs9AY1ALV9d5oJBX8UcCxef93ZoVy4N9/+uMOtgfRbWCO2Wp2LTyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722987031; a=rsa-sha256; cv=none; b=EtN4uuR3GzeyIPmz8WfDr30myIaGcum5P3mWrUyYwKjMyLJtoMGwKX9kPobSe0rneKK2tO SzJIGqUVc0kQO0X/hDURUXRWE5ocGm40DGNNx9vBd/jqh+I4vqTcGx8J0cU+v05yRslSgV xshWMddKbwxxxmN4C7RNn1vxpoVYx2CaPArl2YrPkoOZROlLCBXLZ+sQ+/kosJL07p9doU qHS0YsKeOfviHtJtXe9d4niVrj0mARVxzVRe5JTcXFFc0JB/zmC5CiXz5RhViVDpvaefpe CWpY8BXWZiNyG80CoV7o7J/f4KuUdgMxeaiZCPuQEqDcytmQPfuv9xiRV/qorw== 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=1722987031; 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=P3U//pV7t5XnGOaO2gUaQjA48lLQwaedNPJRi0vfRc0=; b=uAkV9vQ/KdZFWWHopL0kEAp4QN6MXDTG/VSZe44+w9q7BmZVFLSzPJ5Kr9awxOu6Kd9LRY 7oXSO9fZeDZdTMwaFEypSS9ec/5qOskfB/yVr5xfMAdFOkbcK5HgIDO2RuoHfG/L/borBE FxcYVHvUlRm6knt67LLwq03fjNp4gGWZJmWyHT5qp00ozcknakgfdEsnJdfR5EDiaA6jG6 IS+uavk7D1Piq/L+Crui+F+4wAxx18UDLvzsKDfzdpf80Vjc8uZy5/GUhQGNE7lsb494C9 k0dxsKTp95sf0cwN2ATQ6hMo9ZkrpupPJFxOSvlb3k1yzi3yrPdSY4shEzE5iA== 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 4WdqKz1tT4zRhv; Tue, 6 Aug 2024 23:30:31 +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 476NUVIo081026; Tue, 6 Aug 2024 23:30:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476NUVR6081013; Tue, 6 Aug 2024 23:30:31 GMT (envelope-from git) Date: Tue, 6 Aug 2024 23:30:31 GMT Message-Id: <202408062330.476NUVR6081013@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: e1a6d93155ce - main - pxeboot: Enforce a 500k limit here 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e1a6d93155cea7fbb038dee671ecf005c4846fd3 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e1a6d93155cea7fbb038dee671ecf005c4846fd3 commit e1a6d93155cea7fbb038dee671ecf005c4846fd3 Author: Warner Losh AuthorDate: 2024-08-05 21:19:36 +0000 Commit: Warner Losh CommitDate: 2024-08-06 23:22:36 +0000 pxeboot: Enforce a 500k limit here Have a separate PXEBOOTSIZE variable that acts much like LOADERSIZE variable to limit the size of the loader used for pxeldr. This allows people to override it independently of LOADERSIZE, which they may need to set larger for other reasons. Combined with PXEBOOT_DEFAULT_INTERP, you can build a larger lua loader, while still being able to build pxeldr with the 4th one, for example. MFC After: 3 days Sponsored by: Netflix Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D46214 --- stand/i386/pxeldr/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stand/i386/pxeldr/Makefile b/stand/i386/pxeldr/Makefile index bec2a27af47a..715a13f19e6f 100644 --- a/stand/i386/pxeldr/Makefile +++ b/stand/i386/pxeldr/Makefile @@ -28,6 +28,12 @@ L=${PXEBOOT_DEFAULT_INTERP} L=${LOADER_DEFAULT_INTERP} .endif LOADERBIN= ${BOOTOBJ}/i386/loader_${L}/loader_${L}.bin +# pxeboot runs in an environment where there's 500k or less of space available +# due to space for packet buffers, network drivers, etc. While some environments +# may have a bit more, the limit of 500,000 (488k) provides enough margin to +# work in a huge array of environments. Larger values may work for specific +# environments. +PXEBOOTSIZE?=500000 CLEANFILES+= ${BOOT}.tmp @@ -43,6 +49,8 @@ CLEANFILES+= ${LOADER} # Note: pxeldr.S assumes a.out and will require changes for ELF if the output # format is changed to ELF. ${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN} + @set -- `ls -l ${LOADERBIN}` ; x=$$((${PXEBOOTSIZE}-$$5)); \ + echo "$$x bytes available"; test $$x -ge 0 btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ -b ${BTXKERN} ${LOADERBIN} From nobody Tue Aug 6 23:30:32 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 4WdqL05Ffjz5S8WN; Tue, 06 Aug 2024 23:30:32 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdqL030mBz4mjd; Tue, 6 Aug 2024 23:30:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722987032; 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=hXB6UZrl1ndSYWFvV/9oAWKDYVaLPf54V+qHK/AfB1k=; b=lkAOMr0SrS01X3hEflKODhPII24iyr80WDmCCf5DFZOjrcyy5C9nwTo+hZatZSF/Vpbapx 6xzIgP6V08NgBKR1VVFIyEW/UTh5N+3qvXhoHt+2b0yRRrVhNPUqN3w6g0lZDUZQhvE6fE xzifm1egsXks+VpdrPPi0SFtf5AgbXZvdnH36Pe11DoYGru499444WyNZ3qTeKZCyqcZsY RYKEDC23CeZ9RjFCgYuySbcCEaAZFblmnxxTtK+yS8QvNFEyw2x30C9dg64asltLE6XjmR Dzyotzyz95rBOeYPmcC2bEzAQ69p4ySiFY9WV731UeHx7/fAVTSwF56RiMMnlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722987032; a=rsa-sha256; cv=none; b=VQlP5ysOxTwvTcvGUNkk237P9T/tzpagKPAu9o71SWPxf27EfErUL9xIOirRX6gE7Wk7Lx vVf+zmVBjs03788xgjIuO+P9Vu60EK4voYxomkXPZH0C/GFWYdoyBmH7s2Brnv70d3dInS tM8prv5YXm4HaRhN2f0sX6xxcUZXxuZ4jsCKZrPuUg4r/WMzuveLVzO1O10DhaMk04YqnF bH2GWvYtlyTwVcnzbJ2slwsfU2A8JEDEse8EuOl6VXpT5Iiz8ddlnGzNa/QY+U5zAspDS9 T3BUTiCGguXMQkys5Css6ycwGFufzgC8g0WMmLOraXbtNqR/4VgcPpTrUZ64Jw== 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=1722987032; 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=hXB6UZrl1ndSYWFvV/9oAWKDYVaLPf54V+qHK/AfB1k=; b=KQuSv9UXMTvoA2ZDYR9It1vJC8E6QckhETPiF+vUuy0Om9PaPhOBJfxKM3SPpu6Yooorvm HN2iiVlz4FEVSpp5ACfAIH+9bR1YYFgDFxUSSPEpSsThl0cA64VP0eqCOm0Ad6hD2FwtjJ DR9jX4mluqVQYVfdN4bEbRLtaw+4Jnme4a3OyauTDewV3jQfB+mhD0m1muh7WxtU3ISFvq lK96gaZnwxN17MJdFrrZjlZ5qLHGQzM6fTNYxLKaQPWe/Xx1rdAb+EfIq8/4q/j3jwr2KK NN8n3kz5xCfx8TLJrMHupDdTP0GNH2hYQpyu3KlIJ+xLlulEFuiauggO4rbwuw== 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 4WdqL02VhlzQnn; Tue, 6 Aug 2024 23:30:32 +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 476NUWQj081902; Tue, 6 Aug 2024 23:30:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476NUWsZ081899; Tue, 6 Aug 2024 23:30:32 GMT (envelope-from git) Date: Tue, 6 Aug 2024 23:30:32 GMT Message-Id: <202408062330.476NUWsZ081899@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ddcd3b606c9d - main - tsc: Fix comment. 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddcd3b606c9dfbc361c4067b6ff2c9af961a81a6 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ddcd3b606c9dfbc361c4067b6ff2c9af961a81a6 commit ddcd3b606c9dfbc361c4067b6ff2c9af961a81a6 Author: Warner Losh AuthorDate: 2024-08-06 23:21:33 +0000 Commit: Warner Losh CommitDate: 2024-08-06 23:22:36 +0000 tsc: Fix comment. We do the calibration in tsc_calibrate(), not tsc_calib(). Sponsored by: Netflix --- sys/x86/x86/tsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c index 4edaa37d9b54..a1a5d8140b14 100644 --- a/sys/x86/x86/tsc.c +++ b/sys/x86/x86/tsc.c @@ -420,7 +420,7 @@ probe_tsc_freq_late(void) } else { /* * Calibrate against a timecounter or the 8254 PIT. This - * estimate will be refined later in tsc_calib(). + * estimate will be refined later in tsc_calibrate(). */ tsc_freq_tc(&tsc_freq); if (bootverbose) From nobody Tue Aug 6 23:35:34 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 4WdqS35jQXz5S8sl for ; Tue, 06 Aug 2024 23:35:47 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WdqS33wwKz4pQ8 for ; Tue, 6 Aug 2024 23:35:47 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-3683f56b9bdso757807f8f.1 for ; Tue, 06 Aug 2024 16:35:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722987346; x=1723592146; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6qWahXMh70rKGWkCfEJis9fvLl8RLixQcSh4kcqOVfU=; b=RVSU0g7Px7rVsvBtyzKG3y9IadvvHaApgjeEAJQxLm+amPmE/C62BslAuK9RezZGMy DTiGGSX3Pe9poqcUJOkzACKmB5/xOtS0ICDfr7hvtxEfNJdB/Nlw27oH6V+tOfZuC6Nl x3f72RVQr11qm+xQXZmC5Qh6Qe5ljtzXchv2CAKbpMJrCIxhkb2yLoZ0b2F9VexKOXZ/ e5RJwrky7WNB8gdYL4wRKib5ZaSrXYMI3NH88YmOD1qLS1C4W4jIdJLeEY/WSYInXfwQ jEo5O6CoI5rhNAdqEnDzgp5VGkVKASqtrs6XjumT8nWiCGiTqKO/MHpctOWxe7o48vfr EEtA== X-Forwarded-Encrypted: i=1; AJvYcCW61Jrkx0WzN4bexR6VLWhFD+bIxIf/hSBgacxIJLRTku/eujCaPAjTdXtH8+5H8dxEnFBcqMvvvTUyOW2Zah2BIHX15Nd9qqkJc753Vgaq X-Gm-Message-State: AOJu0Yw4GnH95xpdcq24hDQAixrqcSzdKa4HMHX5JfzlFjcsl8fiUaOh xYgR1iWwTXh9+Um4eYQWkapbWwAwqOc5spVQ0QFKESBmr8ed1w0kR4hFU7KJAX4= X-Google-Smtp-Source: AGHT+IHrJ5PTfs/J5gtizmK6cma9cNdHz8w3cOi3Z8a2W9OMTtOt5rDuVY41m3vCJuvm3yzhYVJibQ== X-Received: by 2002:adf:e98a:0:b0:368:3751:de3 with SMTP id ffacd0b85a97d-36bbc10d051mr10405598f8f.31.1722987345287; Tue, 06 Aug 2024 16:35:45 -0700 (PDT) Received: from smtpclient.apple ([131.111.5.201]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36bbd169697sm14181576f8f.107.2024.08.06.16.35.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Aug 2024 16:35:44 -0700 (PDT) Content-Type: text/plain; charset=utf-8 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 (Mac OS X Mail 16.0 \(3776.700.51\)) Subject: Re: git: 7ee781e2bfc2 - main - loader: Document that WITH_BEARSSL may need other tweaks From: Jessica Clarke In-Reply-To: <202408062330.476NURrx080788@gitrepo.freebsd.org> Date: Wed, 7 Aug 2024 00:35:34 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <71670C64-CE80-47B1-809D-AFACA9C3E8FF@freebsd.org> References: <202408062330.476NURrx080788@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3776.700.51) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4WdqS33wwKz4pQ8 On 7 Aug 2024, at 00:30, Warner Losh wrote: >=20 > The branch main has been updated by imp: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D7ee781e2bfc2558060dec95564414a0b= ff4415c1 >=20 > commit 7ee781e2bfc2558060dec95564414a0bff4415c1 > Author: Warner Losh > AuthorDate: 2024-08-05 21:16:37 +0000 > Commit: Warner Losh > CommitDate: 2024-08-06 23:22:36 +0000 >=20 > loader: Document that WITH_BEARSSL may need other tweaks >=20 > /boot/loader is right up aginst the 500k limit we have to make sure > everything works in a wide variety of environments. However, adding > WITH_BEARSSL can push it over the edge since we are so close to the > limit with it enabled. One may also need to increase LOADERSIZE = when > enabling it. It's often safe to go much higher, especially when you > don't plan on using pxeldr. Document this trade off here. Can you please mention i386/amd64/x86/whatever and BIOS up front in the descriptions here? As it stands it reads like a lot of historic FreeBSD documentation that assumes you=E2=80=99re dealing with x86 + BIOS. Jess > MFC After: 3 days > Sponsored by: Netflix > Reviewed by: sjg, markj > Differential Revision: https://reviews.freebsd.org/D46211 > --- > tools/build/options/WITH_BEARSSL | 19 +++++++++++++++++++ > tools/build/options/WITH_LOADER_VERIEXEC | 2 ++ > 2 files changed, 21 insertions(+) >=20 > diff --git a/tools/build/options/WITH_BEARSSL = b/tools/build/options/WITH_BEARSSL > index 6a4447d723ed..9dcebbf1ae30 100644 > --- a/tools/build/options/WITH_BEARSSL > +++ b/tools/build/options/WITH_BEARSSL > @@ -8,3 +8,22 @@ This library is currently only used to perform > signature verification and related operations > for Verified Exec and > .Xr loader 8 . > +.Pp > +Due to size constraints, one may need to set > +.Va LOADERSIZE > +larger than the > +default 500000, although often loader is under the 500k limit even = with > +this option. > +Setting > +.Va LOADERSIZE > +larger than 500000 may cause > +.Xr pxeboot 8 > +to be too large to work. > +Careful testing of the loader in the target environment when built = with a larger > +limit to establish safe limits is critical because different BIOS = environments > +reserve differing amounts of the low 640k space, making a precise = limit for > +everybody impossible. > +.Pp > +See also > +.Va WITH_LOADER_PXEBOOT > +for other considerations. > diff --git a/tools/build/options/WITH_LOADER_VERIEXEC = b/tools/build/options/WITH_LOADER_VERIEXEC > index a50ff9a317e6..d784df968949 100644 > --- a/tools/build/options/WITH_LOADER_VERIEXEC > +++ b/tools/build/options/WITH_LOADER_VERIEXEC > @@ -4,3 +4,5 @@ with support for verification similar to Verified = Exec. > .Pp > Depends on > .Va WITH_BEARSSL . > +May require a larger > +.Va LOADERSIZE . From nobody Tue Aug 6 23:42:45 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 4Wdqc611Dgz5S9Z7; Tue, 06 Aug 2024 23:42:46 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wdqc603jDz4q17; Tue, 6 Aug 2024 23:42:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722987766; 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=Zum/stwZsx3Rs9RlH0gptauDnwQ2HATaULh/38Pss9s=; b=LDbhbupi4lWSoCd2Jc6M2EG3wUZz3eX23a5+AF6I+TPyDjD2wqK22uJJOLQnA1LUji8I2H VDO0KWLP4petX8R35zDhcauJzjn3hbRu5znB8a63w/PNZu7as0Cd0Ddk7vZOrw+Zg+Dcr+ 9CTx8AUZQAZ2VEdmUoyYHKCfTqwY/0uZqVcoFV81nzEnM7KDLzXqTYBw8G94ZWGJHuG71N wbCxOilvuiTb60ZCm+elK8psUDLqlMae7Z25XeDdF96eNzN5nJsC7oWbLB9/xoMnRYY11P i3eTwF8KzIE8kWrQeA5AXKlbiJd2W0+8T/z2m1WWkKexTNLX5zFah1vNGShv5A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722987766; a=rsa-sha256; cv=none; b=yTZcg62UVxLKHWMoyGVWcMC+GLnJ/mNPWMyzW41LIZmcr0BKNLKNxr9lKIyO9kRSiwOcP/ Z9JzLpxiik2aHV9jIaeQJyLfMev3OQ/aBW9Lc9jmBuEjxVMpCpzA88PULLS6fpmsJ0Ui6i jCWSxeBGfb6UVkWHn1s8wpPuHITIYYTfxec3cBM9a240SkkPp4aUerVX7UJvmC6jYSIOn1 38JufmZoRk3cTNknwlzNRUReKTkLeDdl1JrVt68bDlzF8lnAA6M1dtDYkltZVPlFpnk1QG kfCfa6G1HrBGzr/VgdMtKjMS1AzzQ0Ni9AraYeXXy+R65CcYDDbhiUBPCdFgeg== 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=1722987766; 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=Zum/stwZsx3Rs9RlH0gptauDnwQ2HATaULh/38Pss9s=; b=m7GbRwttebDbYFs4qvubMqklBt/CPWtiKyjsE4j1WUCpiIaSiXmZHkzP3OvXjOizItCkzu nK1I9eLwkd9NBIYv/vNigFZsQErRDTiJRYHw1B6jsl+RLVFP6QBTVkn7twoifHTDvpKvVc e5XSa6xYJJ1zsD9ONnogM+IXVV6xs1NrdifIf64GrybZQH84Pb693mlcK/hti30WTfv9xx PtKSCcgD5pCVP9TG61sHh9ZM+jn+Pq0HMTJtD8dlLoYQZO1Qj7UsuHZyQ1LCJNpuPM/Zgq loxnD6QR9vK2NkeWKJ7CNm6G3Wbyd9PamyunFSrle8lM0yV93mHfppuRkt3A8A== 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 4Wdqc56mQmzSFK; Tue, 6 Aug 2024 23:42:45 +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 476NgjYN004550; Tue, 6 Aug 2024 23:42:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476NgjD3004547; Tue, 6 Aug 2024 23:42:45 GMT (envelope-from git) Date: Tue, 6 Aug 2024 23:42:45 GMT Message-Id: <202408062342.476NgjD3004547@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: bf4f27e85aa6 - main - options: Make it clearer some x86 / BIOS only things 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf4f27e85aa62e459fb4cde9ebd51e32bdac7910 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bf4f27e85aa62e459fb4cde9ebd51e32bdac7910 commit bf4f27e85aa62e459fb4cde9ebd51e32bdac7910 Author: Warner Losh AuthorDate: 2024-08-06 23:39:10 +0000 Commit: Warner Losh CommitDate: 2024-08-06 23:39:10 +0000 options: Make it clearer some x86 / BIOS only things Suggested by: jrtc27 Sponsored by: Netflix --- tools/build/options/WITH_BEARSSL | 2 +- tools/build/options/WITH_LOADER_PXEBOOT | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/build/options/WITH_BEARSSL b/tools/build/options/WITH_BEARSSL index 9dcebbf1ae30..ff443a20586a 100644 --- a/tools/build/options/WITH_BEARSSL +++ b/tools/build/options/WITH_BEARSSL @@ -9,7 +9,7 @@ signature verification and related operations for Verified Exec and .Xr loader 8 . .Pp -Due to size constraints, one may need to set +Due to size constraints in the BIOS environment on x86, one may need to set .Va LOADERSIZE larger than the default 500000, although often loader is under the 500k limit even with diff --git a/tools/build/options/WITH_LOADER_PXEBOOT b/tools/build/options/WITH_LOADER_PXEBOOT index 01d4a0b86a66..37cf1fa254ec 100644 --- a/tools/build/options/WITH_LOADER_PXEBOOT +++ b/tools/build/options/WITH_LOADER_PXEBOOT @@ -1,4 +1,4 @@ -Build pxeboot on i386/amd64. +Build pxeboot on i386/amd64 for BIOS booting. The PXE Boot loader package needs more space than we may have in the boot loader. If you need to increase .Va LOADERSIZE From nobody Tue Aug 6 23:42:46 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 4Wdqc7357Pz5S9HR; Tue, 06 Aug 2024 23:42:47 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wdqc70gf2z4qBg; Tue, 6 Aug 2024 23:42:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722987767; 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=QU6+ygjs4w5PCWcDn52DUPL2AhiOl1VU0WMionAlPkU=; b=d7RJY1MRK2wIH9zFz15QJcZNUBvPD/MRTuyCbzAFoRHqWAYOoX1wQ7cgDBZeZ8HtUHhm8N pGTY9nhrjjtP/PuPZfrOElnRYaJaQf9QlJO7uo1VDqcZ2JzQiETWA6jG9PEOT11lQ0OOun C7GvlhLrHLDxRHwKKqMGwa/p6Sm/rSoRKo4flm13ZuErdFz4LIw+6+LBgrlJDpqAaqQ+SS 4H5ljWesQMwP5gy914fJxkpNyvu/pLvDveq0pfN0Kb2ct2FoX62qae9f1TYbhPSfyk4LbI ovs7Xb8NpGfTTkZkPnSKiY9Kgs0AHd8hxX7e2oSIwXXEVoUEl9OT5HxaTEbRyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722987767; a=rsa-sha256; cv=none; b=FSF0ElHRM8EROa8q/E6rx8vJ7+YZaf0+K5cvc7VxhItf7IQ18jRZI9fk7OxoMmRbqPq78t MoWvxyrwG3aOcwtakxM3IFij9mgIvHpZQP+IZ4XFC9/pAoxwHF57oRiQf8atRv5pUrW/ix TrM20+Jcx7GhjwxNLftrSNfJhsEqT+ufwH+dSu2wGyKlYuwzrD1I9v+yfLPxc5V3AqEXDR 5q90js3HJ55VOgyycub9kT2fw1s9FZWu05fe/hdE9WJaCCvdbrjDPVh+ZM7yNQ5bO15s4T rPmOZQWawNMNdWM20XrPv+XtieNNjXRHHOYQSCcOdS0F5BqIojxtc+s5uqrXeg== 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=1722987767; 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=QU6+ygjs4w5PCWcDn52DUPL2AhiOl1VU0WMionAlPkU=; b=GLxHBnRURnJ9dNB/uWqljlic7v4hRXvwpHK1jJJo5VY1s3HBasJC4VNkcTATXeVsPhEW2z p8wpyoq1+8JB7Ro5UlfLNb0gBLCVLIjVdvGW80wZ+o3VGCMw/9Y0Lr5gL6KCJcIcy4SIHd USMXKu2RTIKtbju8Lq49wc53IJ7yX75l4ffGbmE+lnOpSvkPb2sd0jKwR64OncUgie14RB xO9UfEO30VZ3y7baO8cNz+tT2H/Az31oVZ98NaunqxADC26sipCJqTId13/O2EgJbMxFIq Ped5miurnpsfvZ/Cb3v1hMwVq61I6zX9OWCnbj80dMdmJaoMhZYs/XRI9Lf5pg== 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 4Wdqc70H0ZzRkP; Tue, 6 Aug 2024 23:42:47 +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 476Ngkrv004590; Tue, 6 Aug 2024 23:42:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476Ngk02004587; Tue, 6 Aug 2024 23:42:46 GMT (envelope-from git) Date: Tue, 6 Aug 2024 23:42:46 GMT Message-Id: <202408062342.476Ngk02004587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9ed58aa60fd9 - main - src.conf.5: Regen after ddcd3b606c9d 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: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9ed58aa60fd9cfcc7b6d9f4efa3a0631da393fc9 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9ed58aa60fd9cfcc7b6d9f4efa3a0631da393fc9 commit 9ed58aa60fd9cfcc7b6d9f4efa3a0631da393fc9 Author: Warner Losh AuthorDate: 2024-08-06 23:42:52 +0000 Commit: Warner Losh CommitDate: 2024-08-06 23:42:52 +0000 src.conf.5: Regen after ddcd3b606c9d Sponsored by: Netflix --- share/man/man5/src.conf.5 | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index a12a2a8cb9f4..200ce8211e17 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd July 29, 2024 +.Dd August 6, 2024 .Dt SRC.CONF 5 .Os .Sh NAME @@ -158,6 +158,25 @@ This library is currently only used to perform signature verification and related operations for Verified Exec and .Xr loader 8 . +.Pp +Due to size constraints in the BIOS environment on x86, one may need to set +.Va LOADERSIZE +larger than the +default 500000, although often loader is under the 500k limit even with +this option. +Setting +.Va LOADERSIZE +larger than 500000 may cause +.Xr pxeboot 8 +to be too large to work. +Careful testing of the loader in the target environment when built with a larger +limit to establish safe limits is critical because different BIOS environments +reserve differing amounts of the low 640k space, making a precise limit for +everybody impossible. +.Pp +See also +.Va WITH_LOADER_PXEBOOT +for other considerations. When set, these options are also in effect: .Pp .Bl -inset -compact @@ -1041,6 +1060,17 @@ Build openfirmware bootloader components. .Pp This is a default setting on powerpc/powerpc, powerpc/powerpc64 and powerpc/powerpc64le. +.It Va WITHOUT_LOADER_PXEBOOT +Do not build pxeboot on i386/amd64. +When the pxeboot is too large, or unneeded, it may be disabled with this option. +See +.Va WITH_LOADER_PXEBOOT +for how to adjust the defaults when you need both a larger +.Pa /boot/loader +and +.Pa /boot/pxeboot +.Pp +This option only has an effect on x86. .It Va WITHOUT_LOADER_UBOOT Disable building of ubldr. .Pp @@ -1062,6 +1092,8 @@ with support for verification similar to Verified Exec. .Pp Depends on .Va WITH_BEARSSL . +May require a larger +.Va LOADERSIZE . When set, these options are also in effect: .Pp .Bl -inset -compact From nobody Wed Aug 7 08:44:11 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 4Wf3cq6f4mz5SxXC; Wed, 07 Aug 2024 08:44: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wf3cq5wB1z4KkS; Wed, 7 Aug 2024 08:44:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723020251; 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=KcqdEPuqsiYZwxDQqxSOwn20QD0BITIBKXuQ6QhKN5g=; b=yFWNjkMNA+vpqVyOLLY0/sJwF24GdacqRUyA2uyS5Gfg/szlR6JuW1Qq9W0nDqGpNpTtxM iX+C958lk/7qqrdJ80HBDHhrcv3U+0wjLXFbFOS3rzAePX4OxD7BQirurlqyI3FY0Ye+RZ 4liCfBKZ1RB1dI+mNf6aWp8wvV60v/beGwigImJsEXU/kWzrU5k2H0L2f+dBGkPhVRybDG 8uXJlTffVhhew17w36fQFbaQf+wRM3vJ2mAMIOMvss9tfFy7J52eZq2mfjZKnr4fk1t8TX akBlaUKaPE0nJIJzy8Uj5wG24eOpRWyaNXXmU0MXIblBthkbOKnIptxt3F6AWA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723020251; a=rsa-sha256; cv=none; b=iLgwVGHdTtDQOr7Q/zAvel3jE3RH0d3Ib5hropuUx0kJYZfBvEaoPsDJrb/cvwc+f/gdWK RsSjz3qJL4ZxShTxBSAmHAHhBcFHSSPgz/9etPMRADP34gBntT0kA/dKDlJL6+KdvXV+2X zSJtC6zMsJPe3ZpI0bXZShQm3xpxXUjzLjG8nQN2YoJ+TqALKqp4Pou+wZkGVCo18UlEaw dhVKyDsuxyyag2+i6/78/hAoclkizT5NrVS1w7mjiQypvQec9M1dW6WW4VuPXmyMeNt112 IcNrqHTSXt/ndAxws365zyGzDXpPA8D5UXcmpCAor5Y1XApocf7TFYAGn8vvtA== 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=1723020251; 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=KcqdEPuqsiYZwxDQqxSOwn20QD0BITIBKXuQ6QhKN5g=; b=TBmm2GI7D2TLFo0dyJCjPLkI1p8GL1qcxaRq+hqASzClUYimwRESJU+UKCA8of4M1+OHMH 3Lg5EKA2U0QbF2jKHoZNv9SFEnHyEaQX03tu5JpwKHFM9w+YKYEk++HI+EfPV3blPecFRl 7Ym1tUnbkMd7Y35E6qT0NSCdvIGhNDzNgujSjMEhgfG9EtygzTrtKg9iXTrq30I+Zu+MWh l3X8f69MXtMyn3tTPn4dNS3/fRL3fJNQ0F/q8WwxkOgpk3L2zxls0fSY0EcFzoqdIZ/hwb fHcqIlyv+y8VxriNpt7t1tUt/jBc8yWD1G4IcpUFg6CO3QpOXJMqWXlEuzRIpw== 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 4Wf3cq5WStzkcP; Wed, 7 Aug 2024 08:44:11 +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 4778iBs4026058; Wed, 7 Aug 2024 08:44:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4778iB9w026055; Wed, 7 Aug 2024 08:44:11 GMT (envelope-from git) Date: Wed, 7 Aug 2024 08:44:11 GMT Message-Id: <202408070844.4778iB9w026055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Moore Subject: git: e413e15c1ad5 - main - swap_pager_freespace: fix freed count 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: dougm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e413e15c1ad5ba6dde8d2747c3c505cc39746c80 Auto-Submitted: auto-generated The branch main has been updated by dougm: URL: https://cgit.FreeBSD.org/src/commit/?id=e413e15c1ad5ba6dde8d2747c3c505cc39746c80 commit e413e15c1ad5ba6dde8d2747c3c505cc39746c80 Author: Doug Moore AuthorDate: 2024-08-07 08:37:18 +0000 Commit: Doug Moore CommitDate: 2024-08-07 08:37:18 +0000 swap_pager_freespace: fix freed count Function swp_pager_meta_transfer uses 'pindex' as the start address of the swblk in calculating which page to lookup in order to count freed pages. However, the lookup for a swblk at 'pindex' or greater may produce one greater than 'pindex', given by sb->p, and that's the value that should be used to compute a page adddress. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D46234 --- sys/vm/swap_pager.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 9df1521858c1..59d947c71279 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2201,10 +2201,9 @@ swp_pager_meta_transfer(vm_object_t srcobject, vm_object_t dstobject, VM_OBJECT_WLOCK(srcobject); } if (moved != NULL) { - if (m != NULL && m->pindex != pindex + i - 1) - m = NULL; - m = m != NULL ? vm_page_next(m) : - vm_page_lookup(srcobject, pindex + i); + m = (m != NULL && m->pindex == sb->p + i - 1) ? + vm_page_next(m) : + vm_page_lookup(srcobject, sb->p + i); if (m == NULL || vm_page_none_valid(m)) mc++; } From nobody Wed Aug 7 09:56:17 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 4Wf5D173YTz5T3jy; Wed, 07 Aug 2024 09:56:17 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wf5D16Npdz4Q9G; Wed, 7 Aug 2024 09:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723024577; 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=XMtkufqljiyBqJPOWj8jnFp1IkRY2hGxhEvyFCB/d8w=; b=bNcnN1wkb0V33B+Vif84bJFOl4IyPLXAFw6x9KgNs11Zu7Eo0SfvRf6E0gs7fGHvrushFD LPUO9qBGzkUThsq5s/hJnFpYGO+7oIT01dGtEogpBhZ/t1EdQ2klAn2KnIBeQDGkB+ebUR XNKq6/ockvzVX96hdCpDn9GLva7Xxbz23avp0QRQtg0Y9U/KDWTGu4L7vuKDrrV6qq/VPL ZSUdmF9KJbgzroJ9g0BvZ0PAM9/Dzzd/k9t5A2q4HUKehNibv2d36aoY+7eznXRU5Gcffe SmjBmD7LXuDBLUwQ/2YRu1SJcaI6jC0sEopwP/oB62HAo1eN8EldviO/eFYueQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723024577; a=rsa-sha256; cv=none; b=wpD+fLF7uRtYfR3+UGTY2Q6sxHstQYJ3PRqU13d6+uuCtYznQig9MOufTgOtvvAxYmYiyd hoitBIx2EAZNv/y8ERZhvsMM4iz74KVV9GlOUVlsayBnEfaBBJ64g2aW0TcXx2JyRxPY21 +9VD7v76Z5t/yPtHHrZZXXgLuhZ+cexree3ZKCKJf8Aoo5pCVyur/adC0AeupreejcA58j IYg+bOZfr3hdyOI0KGjSlen2D6SKO4slPbCJzEpcb5yjbJFgQ9woxSRAE+YivLS/UVoh5T ruoDp/GrZJ3S/+t3SvUD9pVtVvd6aR+yXmDzSb9dDQk0Kse2VcUIqDFlaUHTdg== 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=1723024577; 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=XMtkufqljiyBqJPOWj8jnFp1IkRY2hGxhEvyFCB/d8w=; b=bOKcezjAyCixDGOekEQbRPGRO2z5FWeXHmNwiHqZwosCosgNhqGzkLBhJOfpNkfmuGiZTQ sUfsRvVjZQa/FXDb7H6FH5cffD8wsxBC2FrjtfCFycRp+AYZaK/yeZxptKN77rejiiPAE7 HHyL0CbAfLpQ5QEz4uyVUPrLzxhK9vJHW7+ZdcgagQpViKerEJBMXHX6tfN7l5vj6c/vAi 3SVtyGAXDUNv3QnUDXAT78tYpSaNgTDy+ljUCHnHrmePYhzG4dwvBVGlwBwCCyJEdRT+hx qgwyL6znKVv7ePw7vcd0PRtRlqnjgQECZo+d8W4oai/4c5lIrj3R/DyeeDC5IQ== 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 4Wf5D15yl8zlmn; Wed, 7 Aug 2024 09:56:17 +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 4779uH2k044310; Wed, 7 Aug 2024 09:56:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4779uHUZ044307; Wed, 7 Aug 2024 09:56:17 GMT (envelope-from git) Date: Wed, 7 Aug 2024 09:56:17 GMT Message-Id: <202408070956.4779uHUZ044307@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 10ac6c48a3e4 - main - msun/ld80/e_powl.c: add const qualifiers to the static immutable values 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/main X-Git-Reftype: branch X-Git-Commit: 10ac6c48a3e4ec6bb6f09d9c93e6ce5eb3381251 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=10ac6c48a3e4ec6bb6f09d9c93e6ce5eb3381251 commit 10ac6c48a3e4ec6bb6f09d9c93e6ce5eb3381251 Author: Konstantin Belousov AuthorDate: 2024-08-06 14:49:09 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-07 08:46:48 +0000 msun/ld80/e_powl.c: add const qualifiers to the static immutable values Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46237 --- lib/msun/ld80/e_powl.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/msun/ld80/e_powl.c b/lib/msun/ld80/e_powl.c index b028d3cb7ff2..34978b964559 100644 --- a/lib/msun/ld80/e_powl.c +++ b/lib/msun/ld80/e_powl.c @@ -23,10 +23,10 @@ * P[0] x^n + P[1] x^(n-1) + ... + P[n] */ static inline long double -__polevll(long double x, long double *PP, int n) +__polevll(long double x, const long double *PP, int n) { long double y; - long double *P; + const long double *P; P = PP; y = *P++; @@ -42,10 +42,10 @@ __polevll(long double x, long double *PP, int n) * x^n + P[0] x^(n-1) + P[1] x^(n-2) + ... + P[n] */ static inline long double -__p1evll(long double x, long double *PP, int n) +__p1evll(long double x, const long double *PP, int n) { long double y; - long double *P; + const long double *P; P = PP; n -= 1; @@ -126,13 +126,13 @@ __p1evll(long double x, long double *PP, int n) /* log(1+x) = x - .5x^2 + x^3 * P(z)/Q(z) * on the domain 2^(-1/32) - 1 <= x <= 2^(1/32) - 1 */ -static long double P[] = { +static const long double P[] = { 8.3319510773868690346226E-4L, 4.9000050881978028599627E-1L, 1.7500123722550302671919E0L, 1.4000100839971580279335E0L, }; -static long double Q[] = { +static const long double Q[] = { /* 1.0000000000000000000000E0L,*/ 5.2500282295834889175431E0L, 8.4000598057587009834666E0L, @@ -141,7 +141,7 @@ static long double Q[] = { /* A[i] = 2^(-i/32), rounded to IEEE long double precision. * If i is even, A[i] + B[i/2] gives additional accuracy. */ -static long double A[33] = { +static const long double A[33] = { 1.0000000000000000000000E0L, 9.7857206208770013448287E-1L, 9.5760328069857364691013E-1L, @@ -176,7 +176,7 @@ static long double A[33] = { 5.1094857432705833910408E-1L, 5.0000000000000000000000E-1L, }; -static long double B[17] = { +static const long double B[17] = { 0.0000000000000000000000E0L, 2.6176170809902549338711E-20L, -1.0126791927256478897086E-20L, @@ -199,7 +199,7 @@ static long double B[17] = { /* 2^x = 1 + x P(x), * on the interval -1/32 <= x <= 0 */ -static long double R[] = { +static const long double R[] = { 1.5089970579127659901157E-5L, 1.5402715328927013076125E-4L, 1.3333556028915671091390E-3L, From nobody Wed Aug 7 09:56:18 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 4Wf5D30gWtz5T31g; Wed, 07 Aug 2024 09:56:19 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wf5D270t6z4Q9H; Wed, 7 Aug 2024 09:56:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723024579; 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=/wMlIZo21uqpTUneoel3Q1E5NtdJKqZZqeHruKJ0BFI=; b=xL+0DFTcrs25ZTUpWH5WrshgBSISU2bn4UudyXF5OsrujtducMZeIwo9UicsaDqwRfdt6j WDk6mEcrfWeh0Aop8KiSFyYw7Mu/pUyxfW/wnFz61L8U2ie7rdZFdZHFw6RV0cav6Qli+p ML2QxBcON7dEm2MghZrNy/wa7iN1+9mWWKPVXhtIB7qqCBS/IGmMgtmuKCn+YDA8JFwNNi D3XQD/n9br893XOZE7WqW5Qgy4v+peQlQPDRlbWVjJ7dWiSr+uayMBubzMsIp12w6Q9Ih1 /WvjqIXK/2soK1/8QblkYtO3tgpC7dMheb68NjZVBwkqbetK9krfqHlSxROrdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723024579; a=rsa-sha256; cv=none; b=FDzxU44d67oyxfUqLJGjzvvmu/BY2quCTcNittl+YLXchdExeUqWQCTZHwGtdTOAW1HU7q b9FT5y/KrO2V8JI4XHSPXwu09ql/JRcDcWwp0EMJN+dB+op27IJbL0m2et2Sptj77HM19K MEwtg2iPrnEaFVG+EOZLTol9xTaZxPUbGRGEdD0zBeHblmw8JdB6XuDbSuJaDPM+XqX6oW /VekAlRLJF0Nyyzw9EaGvVjSver5vLDyI2JN1wlQ3lXiDgV27CiG77rycphvt7QK5wn6BN gsJubY7caNbG2JlKmqsk7PsmODDyCWvWWYdsLaM7l+RYapi4OI+z64yyTYoO2Q== 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=1723024579; 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=/wMlIZo21uqpTUneoel3Q1E5NtdJKqZZqeHruKJ0BFI=; b=GZwKg7qfkRmCxnRODHzMx/vyTXfsxxUqEQdRfY+vgw9wJXeuBXWRSWVNVRjVBuR2YjPiKi hTGBUEnZZeheNtNuwVl1xfYcvSQ1b1WDtt+uSOF//ZBqMH6GtU8utERkP0hdcbFO21+mBr 1rrrKXRYbuNnX5MMXhIygwVVpTLwEknnxD2g94dasT8wpCvobwV/Su9t18ne6ELhpTFN09 Fn3xWpwQ6U2Mwk2whVvas5n3KcnKSV+JpRUE/jZoB/HBrNpfajUrqJEdRTeXm3nKU/Hu5a TPd4TFAxsH0F0HwOfJ6P3+Wd4a92Ffztm1mXo/TRpRUy2J1q9j+VhAVLEh4IOw== 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 4Wf5D26bpnzlh6; Wed, 7 Aug 2024 09:56:18 +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 4779uIv6044364; Wed, 7 Aug 2024 09:56:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4779uIqf044361; Wed, 7 Aug 2024 09:56:18 GMT (envelope-from git) Date: Wed, 7 Aug 2024 09:56:18 GMT Message-Id: <202408070956.4779uIqf044361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 0c00dbfeb0c8 - main - msun/ld80/e_powl.c: make powl() thread-safe by making static variables thread-local 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/main X-Git-Reftype: branch X-Git-Commit: 0c00dbfeb0c814c3a87a4d490db3692c1f9441e9 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0c00dbfeb0c814c3a87a4d490db3692c1f9441e9 commit 0c00dbfeb0c814c3a87a4d490db3692c1f9441e9 Author: Konstantin Belousov AuthorDate: 2024-08-06 14:50:57 +0000 Commit: Konstantin Belousov CommitDate: 2024-08-07 08:46:48 +0000 msun/ld80/e_powl.c: make powl() thread-safe by making static variables thread-local Reported and tested by: Paul Zimmermann Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D46237 --- lib/msun/ld80/e_powl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/msun/ld80/e_powl.c b/lib/msun/ld80/e_powl.c index 34978b964559..d04d77a5ee98 100644 --- a/lib/msun/ld80/e_powl.c +++ b/lib/msun/ld80/e_powl.c @@ -230,13 +230,13 @@ static const long double R[] = { static const long double MAXLOGL = 1.1356523406294143949492E4L; static const long double MINLOGL = -1.13994985314888605586758E4L; static const long double LOGE2L = 6.9314718055994530941723E-1L; -static volatile long double z; -static long double w, W, Wa, Wb, ya, yb, u; +static _Thread_local volatile long double z; +static _Thread_local long double w, W, Wa, Wb, ya, yb, u; static const long double huge = 0x1p10000L; #if 0 /* XXX Prevent gcc from erroneously constant folding this. */ static const long double twom10000 = 0x1p-10000L; #else -static volatile long double twom10000 = 0x1p-10000L; +static _Thread_local volatile long double twom10000 = 0x1p-10000L; #endif static long double reducl( long double ); From nobody Wed Aug 7 13:41:25 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 4WfBCn2m3rz5S96d; Wed, 07 Aug 2024 13:41:25 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBCn2Bckz4h0P; Wed, 7 Aug 2024 13:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038085; 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=OLcZdkdLHM4ZITxwhiE/9OEW+oFcaguqg1T5MB2Tv/w=; b=v3wCYktqU32EpvlEdcLbzfQcNrBkd0aKygRttf6qc55yOq0LtiQITSlftuSvzU8qFJuB+7 yunyB3FDRmJXrKZUubCZcruEzCrt0m46vh3K80/IHnBExOqNIpSF065q02y4mj3iBln+I+ B5i3023I4K5vRZ9v1ZlQKcJK8/z9d5GY3kifU8JSFve50HvVs5ZI710Z49rRgk+Qok6cdM BPaYZQ/FIc0TBnfDcaSegYLABmALxpVwatM/P0+5cgHzlI3c1aztSPUZOgJ6XuEp9IWNcc YBNkCDnfA9ldfgWKBneOEdPxB0qkj2QPqDHN+S7tNDsflU8O7jMn1NS8/unnKg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038085; a=rsa-sha256; cv=none; b=x1ja7Nr/qb/8/vkwWvq3v4TufuP/UTdaAc6kIOHPGSW3Lz8KZsj2nPVT/4WziMvEA3D7kS ujp2lTe9Xdq8EbdK8DTO++6yZlKXihGzKa0ubMT75hkLzT+wSppawM3NOzlokBWhhE9y5U qeAHYkk8NxnIF6Z7NAxevTaqQOLPw2VgHvlov9g+q91wVxnQW2WqX+GcFw6SfPLfxLfElm xDx7b6by9uoHQF6WYOHYfaBKqPnCQcVaO0BxA763bUIBAG8l6deYOawM1/X7hxlP9rl/g+ zBIWfmi7ObEsfT+ITeEH9qiHzUCJlry3W6nY+9gmGLIsYOLOLkiYyC46rtNjEA== 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=1723038085; 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=OLcZdkdLHM4ZITxwhiE/9OEW+oFcaguqg1T5MB2Tv/w=; b=hzBu9lrsta6FcmOKlmGosFNVdvArLcULrIuov0PARnU27Pm7xaIrm37q2QZ5U/wFN1t/Ec GfGiacsgTP9+Px2wM2JDit8eZZS5SuDKDImRqzQ9YbVtqpoKb+5j1XxzWwMd1LOks+03fS pBiy1cMQ36DYAGd5mOE4+QwgYPBPSvtHptpVvulhieqmcX1+pNO88IHmryIbV+9gAMEUxs lJFmL7dKmARh0dwgoqk8A+Y8wYt79YQgdWLIzb+JRmhrmltYAFVsvRBDO0MFnzcoCujQoB egE76QjJGG4eYxlTlyay13PFjERbv0cUFlMIFXl53AP8r9lfKN/LAER046mCmw== 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 4WfBCn1ppSzsr7; Wed, 7 Aug 2024 13:41:25 +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 477DfPpR030527; Wed, 7 Aug 2024 13:41:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DfPU0030524; Wed, 7 Aug 2024 13:41:25 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:41:25 GMT Message-Id: <202408071341.477DfPU0030524@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: 166b7573b522 - main - ktrace: Fix an inverted privilege check 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 166b7573b5220aadf8b02a85933c9651b909b309 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=166b7573b5220aadf8b02a85933c9651b909b309 commit 166b7573b5220aadf8b02a85933c9651b909b309 Author: Mark Johnston AuthorDate: 2024-08-07 13:38:54 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:41:17 +0000 ktrace: Fix an inverted privilege check Approved by: so Security: FreeBSD-24:06.ktrace Security: CVE-2024-6760 Fixes: 1762f674ccb5 ("ktrace: pack all ktrace parameters into allocated structure ktr_io_params") --- sys/kern/kern_ktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 142aa790a908..868885898d0c 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -591,7 +591,7 @@ ktrprocexec(struct proc *p) PROC_LOCK_ASSERT(p, MA_OWNED); kiop = p->p_ktrioparms; - if (kiop == NULL || priv_check_cred(kiop->cr, PRIV_DEBUG_DIFFCRED)) + if (kiop == NULL || priv_check_cred(kiop->cr, PRIV_DEBUG_DIFFCRED) == 0) return (NULL); mtx_lock(&ktrace_mtx); From nobody Wed Aug 7 13:41:53 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 4WfBDL1nNqz5S96p; Wed, 07 Aug 2024 13:41:54 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBDK6795z4hFm; Wed, 7 Aug 2024 13:41:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038113; 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=k4WjGmOUNi9V5d3kXa5B5ZHvHlrNFDwTRtfIM+LqV7Q=; b=WUrMEhwgcPnovwMJZaDUOQeqq/5ractKjuhIBFQcajGP6tvaamip5CTlY8r9y8afJR9+cj E1aBZuuENYlv9zuqD3UV2FlvVpS56roWUCTv+gk4RPtQ1jLoMoovcQ5ib1+rZNRESSdZoP +0pZYeZBDNrsst5MgrqE1zcF0tfSjaQ3TgdxwnaSjFX2acObssQDeWTZoxVXHiGRNbpORc nSFqwlN7YyKBMUOxh6ZzMlRh8WuwwVEuafo6ahMlp932VfIIJy2uWSVRZk+btI2ma5vvnr 27fE285D8i4VVd9UMF3OQK/HrAqsth0RF86AjhE/EbFX3w5ZPIqq3IJpw4ThsQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038113; a=rsa-sha256; cv=none; b=yuBvuo/7U4Gu5VvqaiOqtlZ2fLozlgRxflQdt+ZRtdmj4vI9OSU8btvd8LtxSqqTDK3bUR rBBFKGIcFSc2dOaOdoOdJkIVr7N8XTnUi1iuA/kmdDV7EO7clK8/lL94xSLZCr/fZFMTIV rAZ2uglvrjc1oyRKNlsubattAY6Pb7LqT0m1WP03SdsfADCe4pOkxfFvYF73ppZWVzzrps lQ/ELhNazq5aKTeUIpBmcT7pbFQozWOujmwbW6EZhZ6C5K25/TOL8puqyXXfpsPfS5HGWv EwRFKNmhvzU7lV3vV0/XX4OX7GTGtlW7wI4j2ClzkOLk0qQtSOD42TNYksZYSQ== 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=1723038113; 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=k4WjGmOUNi9V5d3kXa5B5ZHvHlrNFDwTRtfIM+LqV7Q=; b=KFfOwTjUZR87L3zAxwKPPQ5m/jLfK5COVuktSPVK7gl8F5AQMt9evyYcxHyyRX2XnxLg5h UpwHbdoyWufgG9yn90IGJON9W1zf9TaC6JRz5OGIB6QndhYG9CvCG1QSVdfXv3OhS9+xkm eFu+CjkRTcWOp4SmVyxqqwMs2O0ATzMblHRIYMT7kPvfpNOTec8A5AfZX0h1UCJA4QtUnf vFMqk1rfn7rzEXHidVt5RF62hr6OpVfY9IhJzdQNmZU++OcCBBC5BYFiJnQMrxNqp+rRKx m8gm1xrsG8OSpzt9S4GYA6JnKExPEF/8o45AVI7FKBpNyAdl1A5YJhtpF/PGcw== 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 4WfBDK5kkrzsdR; Wed, 7 Aug 2024 13:41:53 +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 477Dfr6Z030727; Wed, 7 Aug 2024 13:41:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477Dfrgi030724; Wed, 7 Aug 2024 13:41:53 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:41:53 GMT Message-Id: <202408071341.477Dfrgi030724@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: 8b400c8488f0 - stable/14 - ktrace: Fix an inverted privilege check 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8b400c8488f0b9e67ae269f6d8e5022a3bc7d854 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8b400c8488f0b9e67ae269f6d8e5022a3bc7d854 commit 8b400c8488f0b9e67ae269f6d8e5022a3bc7d854 Author: Mark Johnston AuthorDate: 2024-08-07 13:38:54 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:41:42 +0000 ktrace: Fix an inverted privilege check Approved by: so Security: FreeBSD-24:06.ktrace Security: CVE-2024-6760 Fixes: 1762f674ccb5 ("ktrace: pack all ktrace parameters into allocated structure ktr_io_params") (cherry picked from commit 166b7573b5220aadf8b02a85933c9651b909b309) --- sys/kern/kern_ktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 555762185411..1c6a2ae01f3d 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -593,7 +593,7 @@ ktrprocexec(struct proc *p) PROC_LOCK_ASSERT(p, MA_OWNED); kiop = p->p_ktrioparms; - if (kiop == NULL || priv_check_cred(kiop->cr, PRIV_DEBUG_DIFFCRED)) + if (kiop == NULL || priv_check_cred(kiop->cr, PRIV_DEBUG_DIFFCRED) == 0) return (NULL); mtx_lock(&ktrace_mtx); From nobody Wed Aug 7 13:42: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 4WfBDf1xVTz5S9KX; Wed, 07 Aug 2024 13:42:10 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBDf1TwKz4hQ7; Wed, 7 Aug 2024 13:42:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038130; 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=Tata4MkNvVXgPfLPelJSchqBwD3pVkeRszcXdu1bBVI=; b=ABW6TKC5Ej+qQCdLdNcvBEzHNTwtvzEB/g/HSAr/rvToc899e0j13ZyapcbCZxHzoW1Xg1 v8zUWbdQpNtu7KQRr9E49k0WIZRuHBBCZ4zSETXf0WQtzKpzOn4VrQxJ5xfStzkQNGXIaM XgH58wMEURihu+ZOjaBEBjbw5+4z6+0fZy0jjJwSYIzRSOyaF1Kknt2Vq5EMZ+U/AR64VR eFxXMWjc6/dc3z4hwlqs4uVWV0cvY/RM5SWypz3gjyns/dfw6VLvbLvfh1BDtwZ/WWC7c/ kR4yfNpN0K4yk/vRaoSrd8liSoYvmd2XD543fAe8azU1B1LfeuXYZ5Sv3SkysQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038130; a=rsa-sha256; cv=none; b=oKV61M7yzCnMbFiT7VTuhwZnjIxNAQQLovX2Gr3TrXr2pv7nmlm3kuZDp2PGJlOdHvhlBI tEzHQnZ02uAaIpiFMn0JTuvk0sc3nMTajR60IXVUq2zsa0ofbg13gXihuNVlFh6wm+zgqF j0+zeuD+fF/0kMbLDMLAGtlQ/JtyjgVkRlhRyNRc7D8K+woMvJH0dz4nyrpDhcKTT2tLnA LJLh1ip8p0LSzLV/R1LxYjWGfRjmXFNPWas4OGEL10ca9AqSpsM1sQfpm6KNzCls1lYsM1 ie6LL8vfgzfd5Ze0PCkRwgVl5YPPhbxgCgVriaaMWy0xpGqkmNVjjqTFbprMDQ== 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=1723038130; 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=Tata4MkNvVXgPfLPelJSchqBwD3pVkeRszcXdu1bBVI=; b=c+ym7wU1HbEa+rOWNmNx2WaRZxn9Rhw2hvPEIf013JSQAwGUk/KXX/9WYb81WSEJ9tCt91 VkJkiyWxpFD3Bt7obLmhbImkhEIQXI2rMqKBKxy7JKmTieXp0O8VtJLO4LqZw3bstK+q8h /as2JFgUy53bYXtJWU9pYj46XlH4kYGF088TRdCv8Kkw9XkJVbZSJ6Q+X0Qr5UsLxL0Gss YLRk0P8D08DpFpMWzuNoyL/mmrRgD8G8bvp/OwSIieh9qxvjA6XODcKQyU5750zO25DJZP 0ywwdWd0X7COExhdwVi/NiwW7IBe4Y/afZf/16+lTF5Evkm2sGImLN+h7ufjxg== 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 4WfBDf14jRzsmG; Wed, 7 Aug 2024 13:42: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 477DgAgY032866; Wed, 7 Aug 2024 13:42:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DgAJT032863; Wed, 7 Aug 2024 13:42:10 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:42:10 GMT Message-Id: <202408071342.477DgAJT032863@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: f702110bc4bc - stable/13 - ktrace: Fix an inverted privilege check 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f702110bc4bcc593b38674ec6e4fadf6c4626432 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f702110bc4bcc593b38674ec6e4fadf6c4626432 commit f702110bc4bcc593b38674ec6e4fadf6c4626432 Author: Mark Johnston AuthorDate: 2024-08-07 13:38:54 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:42:02 +0000 ktrace: Fix an inverted privilege check Approved by: so Security: FreeBSD-24:06.ktrace Security: CVE-2024-6760 Fixes: 1762f674ccb5 ("ktrace: pack all ktrace parameters into allocated structure ktr_io_params") (cherry picked from commit 166b7573b5220aadf8b02a85933c9651b909b309) --- sys/kern/kern_ktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 2729d0880b31..cc51dbae46f7 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -585,7 +585,7 @@ ktrprocexec(struct proc *p) PROC_LOCK_ASSERT(p, MA_OWNED); kiop = p->p_ktrioparms; - if (kiop == NULL || priv_check_cred(kiop->cr, PRIV_DEBUG_DIFFCRED)) + if (kiop == NULL || priv_check_cred(kiop->cr, PRIV_DEBUG_DIFFCRED) == 0) return (NULL); mtx_lock(&ktrace_mtx); From nobody Wed Aug 7 13:44:21 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 4WfBH94J1Cz5S8r2; Wed, 07 Aug 2024 13:44: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBH93hBCz4hWr; Wed, 7 Aug 2024 13:44:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038261; 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=rcFa05g/quTSmsQac8GoTI+wAFqajW5Wo9WxRGL/oxQ=; b=Ru7+7/lymlsABSabyeaBTjdTuEx5sVy4TyCpQo9Kxe799QJDvo37gLpPM0QGqDYM9pTXLL RRVTwlPAojzS/T7OGe/uRip5TPcpp8j02MaX8BHOCNO6dMsHROCwe5dc6JTxm0gmJ1of3G qNAy4Ww9QWEDgkSMfXFlKlToMymaK7FsbI8eMZYJ4gHNK/A29y0KE6tLpk/FVMibAzbxfN z3gIUgR4bn6pUQCcu+QuNNzwM5kL8SjcgeDsdVX4rnI9GdwdA1rOsqkNQlzt+mOMkidIZ2 XFZWpCHX0ci+2Cl4LBO7hUOCAIhQlH+YGQNWqWKozXwr8BacYOHfkbNaiVKyBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038261; a=rsa-sha256; cv=none; b=wJd4mQPRY0n45MhiOcNmXyquj6xGo+ytiNgckjzflBJRs496et2z+kRby0ydzhwqKq0hgx efxbUFCgM1SUcjGUziixNc7cOH/M+jVw4Md1JNjX2UVS2THRmbjPgHNvX0JgJ/94odhcf5 hz0+2nshK4DH/lXKUizbY/F02hm98DlVE3W1xwBdclaQrdhrXJE4k6jYVEN3YW5jombiEv o5RMmNSSAdiCMCd0rco5lOjmI7bXfw5mzpTIgcDOHOd+77p1VD5yku4joo9NuunhlkAiX+ eyQEGDWQQEajIe5GgJLxmT1vakch/3ch/2bddwVwbNX/1rwnBdYcTPJmwXWU/A== 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=1723038261; 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=rcFa05g/quTSmsQac8GoTI+wAFqajW5Wo9WxRGL/oxQ=; b=cDbkTPQv49bNZ3/BxfBzODWVRPzEIyUpDQZJFbXgbFH6pbXfPxDxaXpfOipmp6YVtQYhyV kFh3MqjmsoyoOYBYd6+EoEpNAwLGy9dZPH+FipGxmvMVvxdRh3AnQa/+MrnJfzlgufYaBB hYJGsiX7Ko4NcfzgMI6GEk14rcEquyy8L7SVRccmUDctXxpxCR9v9f6SZcgnUv6d2euNO+ tRO8ICQMYinM83fsVTnAch5n2E4HD7VRghpmim3AW6j5I04EAYba9kcDZxwoqf3Mk6GatN SNSASLmZ2THxag2tfArd86BtFj1WCZd8fnHpDtoyYh71Y6rDl9KOJIBgbevqgg== 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 4WfBH939L8zsjP; Wed, 7 Aug 2024 13:44:21 +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 477DiLtl033353; Wed, 7 Aug 2024 13:44:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DiLSL033350; Wed, 7 Aug 2024 13:44:21 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:21 GMT Message-Id: <202408071344.477DiLSL033350@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: 8533e927afc1 - releng/14.1 - nfscl: Scan readdir reply filenames for invalid characters 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 8533e927afc1847fb8ff6b650a69999ec6612df3 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8533e927afc1847fb8ff6b650a69999ec6612df3 commit 8533e927afc1847fb8ff6b650a69999ec6612df3 Author: Rick Macklem AuthorDate: 2024-07-21 22:56:16 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:30:29 +0000 nfscl: Scan readdir reply filenames for invalid characters The NFS RFCs are pretty loose with respect to what characters can be in a filename returned by a Readdir. However, FreeBSD, as a POSIX system will not handle imbedded '/' or nul characters in file names. Also, for NFSv4, the file names "." and ".." are handcrafted on the client and should not be returned by a NFSv4 server. This patch scans for the above in filenames returned by Readdir and ignores any entry returned by Readdir which has them in it. Because an imbedded nul would be a string terminator, it was not possible to code this check efficiently using string(3) functions. Approved by: so Security: FreeBSD-SA-24:07.nfsclient Security: CVE-2024-6759 Reported by: Apple Security Engineering and Architecture (SEAR) (cherry picked from commit 026cdaa3b3a92574d9ac3155216e5cc0b0bd4c51) (cherry picked from commit 9328ded386d570c8455b9021e047520ef72e0e79) --- sys/fs/nfsclient/nfs_clrpcops.c | 137 ++++++++++++++++++++++++++++++++-------- 1 file changed, 110 insertions(+), 27 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 8c5532268287..c5c0ee9fa74f 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -142,6 +142,7 @@ static int nfsrpc_createv4(vnode_t , char *, int, struct vattr *, nfsquad_t, int, struct nfsclowner *, struct nfscldeleg **, struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, struct nfsfh **, int *, int *, int *); +static bool nfscl_invalidfname(bool, char *, int); static int nfsrpc_locku(struct nfsrv_descript *, struct nfsmount *, struct nfscllockowner *, u_int64_t, u_int64_t, u_int32_t, struct ucred *, NFSPROC_T *, int); @@ -3279,6 +3280,31 @@ nfsrpc_rmdir(vnode_t dvp, char *name, int namelen, struct ucred *cred, return (error); } +/* + * Check to make sure the file name in a Readdir reply is valid. + */ +static bool +nfscl_invalidfname(bool is_v4, char *name, int len) +{ + int i; + char *cp; + + if (is_v4 && ((len == 1 && name[0] == '.') || + (len == 2 && name[0] == '.' && name[1] == '.'))) { + printf("Readdir NFSv4 reply has dot or dotdot in it\n"); + return (true); + } + cp = name; + for (i = 0; i < len; i++, cp++) { + if (*cp == '/' || *cp == '\0') { + printf("Readdir reply file name had imbedded / or nul" + " byte\n"); + return (true); + } + } + return (false); +} + /* * Readdir rpc. * Always returns with either uio_resid unchanged, if you are at the @@ -3331,6 +3357,8 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, KASSERT(uiop->uio_iovcnt == 1 && (uiop->uio_resid & (DIRBLKSIZ - 1)) == 0, ("nfs readdirrpc bad uio")); + KASSERT(uiop->uio_segflg == UIO_SYSSPACE, + ("nfsrpc_readdir: uio userspace")); ncookie.lval[0] = ncookie.lval[1] = 0; /* * There is no point in reading a lot more than uio_resid, however @@ -3588,6 +3616,17 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, uiop->uio_resid) bigenough = 0; if (bigenough) { + struct iovec saviov; + off_t savoff; + ssize_t savresid; + int savblksiz; + + saviov.iov_base = uiop->uio_iov->iov_base; + saviov.iov_len = uiop->uio_iov->iov_len; + savoff = uiop->uio_offset; + savresid = uiop->uio_resid; + savblksiz = blksiz; + dp = (struct dirent *)uiop->uio_iov->iov_base; dp->d_pad0 = dp->d_pad1 = 0; dp->d_off = 0; @@ -3603,20 +3642,35 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, uiop->uio_iov->iov_base = (char *)uiop->uio_iov->iov_base + DIRHDSIZ; uiop->uio_iov->iov_len -= DIRHDSIZ; + cp = uiop->uio_iov->iov_base; error = nfsm_mbufuio(nd, uiop, len); if (error) goto nfsmout; - cp = uiop->uio_iov->iov_base; - tlen -= len; - NFSBZERO(cp, tlen); - cp += tlen; /* points to cookie storage */ - tl2 = (u_int32_t *)cp; - uiop->uio_iov->iov_base = - (char *)uiop->uio_iov->iov_base + tlen + - NFSX_HYPER; - uiop->uio_iov->iov_len -= tlen + NFSX_HYPER; - uiop->uio_resid -= tlen + NFSX_HYPER; - uiop->uio_offset += (tlen + NFSX_HYPER); + /* Check for an invalid file name. */ + if (nfscl_invalidfname( + (nd->nd_flag & ND_NFSV4) != 0, cp, len)) { + /* Skip over this entry. */ + uiop->uio_iov->iov_base = + saviov.iov_base; + uiop->uio_iov->iov_len = + saviov.iov_len; + uiop->uio_offset = savoff; + uiop->uio_resid = savresid; + blksiz = savblksiz; + } else { + cp = uiop->uio_iov->iov_base; + tlen -= len; + NFSBZERO(cp, tlen); + cp += tlen; /* points to cookie store */ + tl2 = (u_int32_t *)cp; + uiop->uio_iov->iov_base = + (char *)uiop->uio_iov->iov_base + + tlen + NFSX_HYPER; + uiop->uio_iov->iov_len -= tlen + + NFSX_HYPER; + uiop->uio_resid -= tlen + NFSX_HYPER; + uiop->uio_offset += (tlen + NFSX_HYPER); + } } else { error = nfsm_advance(nd, NFSM_RNDUP(len), -1); if (error) @@ -3782,6 +3836,8 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, KASSERT(uiop->uio_iovcnt == 1 && (uiop->uio_resid & (DIRBLKSIZ - 1)) == 0, ("nfs readdirplusrpc bad uio")); + KASSERT(uiop->uio_segflg == UIO_SYSSPACE, + ("nfsrpc_readdirplus: uio userspace")); ncookie.lval[0] = ncookie.lval[1] = 0; timespecclear(&dctime); *attrflagp = 0; @@ -4017,6 +4073,17 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, uiop->uio_resid) bigenough = 0; if (bigenough) { + struct iovec saviov; + off_t savoff; + ssize_t savresid; + int savblksiz; + + saviov.iov_base = uiop->uio_iov->iov_base; + saviov.iov_len = uiop->uio_iov->iov_len; + savoff = uiop->uio_offset; + savresid = uiop->uio_resid; + savblksiz = blksiz; + dp = (struct dirent *)uiop->uio_iov->iov_base; dp->d_pad0 = dp->d_pad1 = 0; dp->d_off = 0; @@ -4035,25 +4102,41 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, cnp->cn_nameptr = uiop->uio_iov->iov_base; cnp->cn_namelen = len; NFSCNHASHZERO(cnp); + cp = uiop->uio_iov->iov_base; error = nfsm_mbufuio(nd, uiop, len); if (error) goto nfsmout; - cp = uiop->uio_iov->iov_base; - tlen -= len; - NFSBZERO(cp, tlen); - cp += tlen; /* points to cookie storage */ - tl2 = (u_int32_t *)cp; - if (len == 2 && cnp->cn_nameptr[0] == '.' && - cnp->cn_nameptr[1] == '.') - isdotdot = 1; - else - isdotdot = 0; - uiop->uio_iov->iov_base = - (char *)uiop->uio_iov->iov_base + tlen + - NFSX_HYPER; - uiop->uio_iov->iov_len -= tlen + NFSX_HYPER; - uiop->uio_resid -= tlen + NFSX_HYPER; - uiop->uio_offset += (tlen + NFSX_HYPER); + /* Check for an invalid file name. */ + if (nfscl_invalidfname( + (nd->nd_flag & ND_NFSV4) != 0, cp, len)) { + /* Skip over this entry. */ + uiop->uio_iov->iov_base = + saviov.iov_base; + uiop->uio_iov->iov_len = + saviov.iov_len; + uiop->uio_offset = savoff; + uiop->uio_resid = savresid; + blksiz = savblksiz; + } else { + cp = uiop->uio_iov->iov_base; + tlen -= len; + NFSBZERO(cp, tlen); + cp += tlen; /* points to cookie store */ + tl2 = (u_int32_t *)cp; + if (len == 2 && + cnp->cn_nameptr[0] == '.' && + cnp->cn_nameptr[1] == '.') + isdotdot = 1; + else + isdotdot = 0; + uiop->uio_iov->iov_base = + (char *)uiop->uio_iov->iov_base + + tlen + NFSX_HYPER; + uiop->uio_iov->iov_len -= tlen + + NFSX_HYPER; + uiop->uio_resid -= tlen + NFSX_HYPER; + uiop->uio_offset += (tlen + NFSX_HYPER); + } } else { error = nfsm_advance(nd, NFSM_RNDUP(len), -1); if (error) From nobody Wed Aug 7 13:44:22 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 4WfBHB408mz5S8tf; Wed, 07 Aug 2024 13:44:22 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHB3hYxz4hWs; Wed, 7 Aug 2024 13:44:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038262; 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=6Z9MTMZri7Q+DnNx3pYDjWvPXMwX8CF1ox+hwomupZE=; b=tQ6To2afXueebXjecvGJtisV5RPUcwEF6xuZwThd5bhZIeoS0E/nphvFpgsDcg0QNerFbd cOYg5pAnuj33Nc7jqP0AvWr+rDlITg5VL3Et14/lYJ9jwQo9gtv7kdcDdC/Dn7Ltt8vUKO pfFEjNSKdmdqMZG9oFfLtbIfjaAzo+yQQQG0+EE5XGZ6SU76pmUSQLQUYzEIDWX7CbvIPC NvEKDB4zad+eMo/tjCGYRVierT/NUid6ItyX5wVg1WXGqIRBYSOquHiMOXNXOlKVTe0tCj XyBly16SHxFYY9XLVToZxyLfWhxOmerpa8VGtmQ6lSgkEsBVBbJL6Q/IKrOoBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038262; a=rsa-sha256; cv=none; b=lEOnSbwgIIItA9MI8ruyge66CJ65DtJOu4LAbfqSgbzu7wcxhk0mrOXmgCHq/nm7G9MTRE 1cZS9k5gqZb64YtsYsH+q7nMNXNtFN5a1SPCVYbBb0x0GUEUF9QI4T8zG3ASeA8X3Su5Ec NEEJCAewgOFGLPR0UbNnSIOyGyQ7LLyHSan9OpQi5F8I880BQe0m6tjqx8PShFDT0aYvDW BPUB+wx98hFLpt0uUOkwnl2Rf2X5IxrjOIZmiKjkBerV7OxF3ztgoEez0vHeSeO40Hgi7X IYD2d+4+K846gGWv+30zaC1ziP8/vWElP+nBW+4wXn0VNq3Uh0sQ8Y9dTrjVRw== 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=1723038262; 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=6Z9MTMZri7Q+DnNx3pYDjWvPXMwX8CF1ox+hwomupZE=; b=HKJTwFILVm2TrF0ZbPLU9PG4Zh08Fi7E6TOPkBlK35dF0Z4YSzgKhMuIockR6u+JHWQ/xj j4s1aQtBXPbTcsR1FSvKqvZKcUOs7WokcggBN+d1b23ZAZXI1yZqWyqza4dyo1N4PBXWoR 3RwMyTF5W5i/NLvJ7p3OhonGIEumqRoOPqAG4RLuH2NVkwgcE8PRn+wVMcUdwcIbn2yGWz yexCSbyl/fgS5DL3IZH6bTqzYbyQa24Di3iAKrTrw71vuEFaxgX3ZQ8zDQayhbrUSxdwWt LGG0SkDJVfEWF35VLYCChr7AzzD5BZBMEY/UZ83NWPVr9D9f1+pXkM1b91omKg== 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 4WfBHB3HnjzsmL; Wed, 7 Aug 2024 13:44:22 +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 477DiMtw033413; Wed, 7 Aug 2024 13:44:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DiMad033410; Wed, 7 Aug 2024 13:44:22 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:22 GMT Message-Id: <202408071344.477DiMad033410@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: 370e196bae46 - releng/14.1 - pf: stricter state checking for ICMP and ICMPv6 packets 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 370e196bae469f776bb95b9733fe6a6481e189f6 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=370e196bae469f776bb95b9733fe6a6481e189f6 commit 370e196bae469f776bb95b9733fe6a6481e189f6 Author: Kristof Provost AuthorDate: 2024-07-09 13:59:33 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:31:39 +0000 pf: stricter state checking for ICMP and ICMPv6 packets Include the ICMP type in one port of the state key, using the type to determine which side should be the id, and which should be the type. Also: - Handle ICMP6 messages which are typically sent to multicast addresses but recieve unicast replies, by doing fallthrough lookups against the correct multicast address. - Clear up some mistaken assumptions in the PF code: - Not all ICMP packets have an icmp_id, so simulate one based on other data if we can, otherwise set it to 0. - Don't modify the icmp id field in NAT unless it's echo - Use the full range of possible id's when NATing icmp6 echoy ok henning marco testing matthieu todd Approved by: so Security: FreeBSD-SA-24:05.pf Security: CVE-2024-6640 MFC after: 1 day Obtained From: OpenBSD, mcbride 70bf7555ef4c Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 534ee17e61ee094ec175703bc50e88ff6587703e) (cherry picked from commit 2f6b4611b5b847aee1ff8d5017a0f8a657f4101d) --- sys/netpfil/pf/pf.c | 381 ++++++++++++++++++++++++++++++++++++++----------- sys/netpfil/pf/pf_lb.c | 19 ++- 2 files changed, 317 insertions(+), 83 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 5fc234c5aca9..3212a1443f63 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -291,6 +291,8 @@ static void pf_change_ap(struct mbuf *, struct pf_addr *, u_int16_t *, u_int16_t, u_int8_t, sa_family_t); static int pf_modulate_sack(struct mbuf *, int, struct pf_pdesc *, struct tcphdr *, struct pf_state_peer *); +int pf_icmp_mapping(struct pf_pdesc *, u_int8_t, int *, + int *, u_int16_t *, u_int16_t *); static void pf_change_icmp(struct pf_addr *, u_int16_t *, struct pf_addr *, struct pf_addr *, u_int16_t, u_int16_t *, u_int16_t *, u_int16_t *, @@ -337,6 +339,10 @@ static int pf_test_state_tcp(struct pf_kstate **, static int pf_test_state_udp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *); +int pf_icmp_state_lookup(struct pf_state_key_cmp *, + struct pf_pdesc *, struct pf_kstate **, struct mbuf *, + int, struct pfi_kkif *, u_int16_t, u_int16_t, + int, int *, int); static int pf_test_state_icmp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); @@ -389,6 +395,8 @@ extern struct proc *pf_purge_proc; VNET_DEFINE(struct pf_limit, pf_limits[PF_LIMIT_MAX]); +enum { PF_ICMP_MULTI_NONE, PF_ICMP_MULTI_SOLICITED, PF_ICMP_MULTI_LINK }; + #define PACKET_UNDO_NAT(_m, _pd, _off, _s) \ do { \ struct pf_state_key *nk; \ @@ -1734,6 +1742,142 @@ pf_isforlocal(struct mbuf *m, int af) return (false); } +int +pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, + int *icmp_dir, int *multi, u_int16_t *icmpid, u_int16_t *icmptype) +{ + /* + * ICMP types marked with PF_OUT are typically responses to + * PF_IN, and will match states in the opposite direction. + * PF_IN ICMP types need to match a state with that type. + */ + *icmp_dir = PF_OUT; + *multi = PF_ICMP_MULTI_LINK; + /* Queries (and responses) */ + switch (type) { + case ICMP_ECHO: + *icmp_dir = PF_IN; + case ICMP_ECHOREPLY: + *icmptype = ICMP_ECHO; + *icmpid = pd->hdr.icmp.icmp_id; + break; + + case ICMP_TSTAMP: + *icmp_dir = PF_IN; + case ICMP_TSTAMPREPLY: + *icmptype = ICMP_TSTAMP; + *icmpid = 0; /* Time is not a secret. */ + break; + + case ICMP_IREQ: + *icmp_dir = PF_IN; + case ICMP_IREQREPLY: + *icmptype = ICMP_IREQ; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_MASKREQ: + *icmp_dir = PF_IN; + case ICMP_MASKREPLY: + *icmptype = ICMP_MASKREQ; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_IPV6_WHEREAREYOU: + *icmp_dir = PF_IN; + case ICMP_IPV6_IAMHERE: + *icmptype = ICMP_IPV6_WHEREAREYOU; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_MOBILE_REGREQUEST: + *icmp_dir = PF_IN; + case ICMP_MOBILE_REGREPLY: + *icmptype = ICMP_MOBILE_REGREQUEST; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_ROUTERSOLICIT: + *icmp_dir = PF_IN; + case ICMP_ROUTERADVERT: + *icmptype = ICMP_ROUTERSOLICIT; + *icmpid = 0; /* Nothing sane to match on! */ + break; + +#ifdef INET6 + case ICMP6_ECHO_REQUEST: + *icmp_dir = PF_IN; + case ICMP6_ECHO_REPLY: + *icmptype = ICMP6_ECHO_REQUEST; + *icmpid = pd->hdr.icmp6.icmp6_id; + break; + + case MLD_LISTENER_QUERY: + *icmp_dir = PF_IN; + case MLD_LISTENER_REPORT: { + *icmptype = MLD_LISTENER_QUERY; + *icmpid = 0; + break; + } + + /* ICMP6_FQDN and ICMP6_NI query/reply are the same type as ICMP6_WRU */ + case ICMP6_WRUREQUEST: + *icmp_dir = PF_IN; + case ICMP6_WRUREPLY: + *icmptype = ICMP6_WRUREQUEST; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case MLD_MTRACE: + *icmp_dir = PF_IN; + case MLD_MTRACE_RESP: + *icmptype = MLD_MTRACE; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ND_NEIGHBOR_SOLICIT: + *icmp_dir = PF_IN; + case ND_NEIGHBOR_ADVERT: { + *icmptype = ND_NEIGHBOR_SOLICIT; + *multi = PF_ICMP_MULTI_SOLICITED; + *icmpid = 0; + break; + } + +#endif /* INET6 */ + /* These ICMP types map to other connections */ + case ICMP_UNREACH: + case ICMP_SOURCEQUENCH: + case ICMP_REDIRECT: + case ICMP_TIMXCEED: + case ICMP_PARAMPROB: +#ifdef INET6 + /* + * ICMP6_TIME_EXCEEDED is the same type as ICMP_UNREACH + * ND_REDIRECT can't be in this list because the triggering packet + * header is optional. + */ + case ICMP6_PACKET_TOO_BIG: +#endif /* INET6 */ + /* These will not be used, but set them anyways */ + *icmp_dir = PF_IN; + *icmptype = htons(type); + *icmpid = 0; + return (1); /* These types are matched to other state */ + /* + * All remaining ICMP types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *icmptype = type; + *icmpid = 0; + break; + } + HTONS(*icmptype); + return (0); +} + void pf_intr(void *v) { @@ -4397,8 +4541,8 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, int tag = -1; int asd = 0; int match = 0; - int state_icmp = 0; - u_int16_t sport = 0, dport = 0; + int state_icmp = 0, icmp_dir, multi; + u_int16_t sport = 0, dport = 0, virtual_type, virtual_id; u_int16_t bproto_sum = 0, bip_sum = 0; u_int8_t icmptype = 0, icmpcode = 0; struct pf_kanchor_stackframe anchor_stack[PF_ANCHOR_STACKSIZE]; @@ -4432,33 +4576,37 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, case IPPROTO_ICMP: if (pd->af != AF_INET) break; - sport = dport = pd->hdr.icmp.icmp_id; hdrlen = sizeof(pd->hdr.icmp); icmptype = pd->hdr.icmp.icmp_type; icmpcode = pd->hdr.icmp.icmp_code; - - if (icmptype == ICMP_UNREACH || - icmptype == ICMP_SOURCEQUENCH || - icmptype == ICMP_REDIRECT || - icmptype == ICMP_TIMXCEED || - icmptype == ICMP_PARAMPROB) - state_icmp++; + state_icmp = pf_icmp_mapping(pd, icmptype, + &icmp_dir, &multi, &virtual_id, &virtual_type); + if (icmp_dir == PF_IN) { + sport = virtual_id; + dport = virtual_type; + } else { + sport = virtual_type; + dport = virtual_id; + } break; #endif /* INET */ #ifdef INET6 case IPPROTO_ICMPV6: if (af != AF_INET6) break; - sport = dport = pd->hdr.icmp6.icmp6_id; hdrlen = sizeof(pd->hdr.icmp6); icmptype = pd->hdr.icmp6.icmp6_type; icmpcode = pd->hdr.icmp6.icmp6_code; + state_icmp = pf_icmp_mapping(pd, icmptype, + &icmp_dir, &multi, &virtual_id, &virtual_type); + if (icmp_dir == PF_IN) { + sport = virtual_id; + dport = virtual_type; + } else { + sport = virtual_type; + dport = virtual_id; + } - if (icmptype == ICMP6_DST_UNREACH || - icmptype == ICMP6_PACKET_TOO_BIG || - icmptype == ICMP6_TIME_EXCEEDED || - icmptype == ICMP6_PARAM_PROB) - state_icmp++; break; #endif /* INET6 */ default: @@ -4552,7 +4700,6 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, } #ifdef INET case IPPROTO_ICMP: - nk->port[0] = nk->port[1]; if (PF_ANEQ(saddr, &nk->addr[pd->sidx], AF_INET)) pf_change_a(&saddr->v4.s_addr, pd->ip_sum, nk->addr[pd->sidx].v4.s_addr, 0); @@ -4561,11 +4708,12 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, pf_change_a(&daddr->v4.s_addr, pd->ip_sum, nk->addr[pd->didx].v4.s_addr, 0); - if (nk->port[1] != pd->hdr.icmp.icmp_id) { + if (virtual_type == ICMP_ECHO && + nk->port[pd->sidx] != pd->hdr.icmp.icmp_id) { pd->hdr.icmp.icmp_cksum = pf_cksum_fixup( pd->hdr.icmp.icmp_cksum, sport, - nk->port[1], 0); - pd->hdr.icmp.icmp_id = nk->port[1]; + nk->port[pd->sidx], 0); + pd->hdr.icmp.icmp_id = nk->port[pd->sidx]; pd->sport = &pd->hdr.icmp.icmp_id; } m_copyback(m, off, ICMP_MINLEN, (caddr_t)&pd->hdr.icmp); @@ -4573,7 +4721,6 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, #endif /* INET */ #ifdef INET6 case IPPROTO_ICMPV6: - nk->port[0] = nk->port[1]; if (PF_ANEQ(saddr, &nk->addr[pd->sidx], AF_INET6)) pf_change_a6(saddr, &pd->hdr.icmp6.icmp6_cksum, &nk->addr[pd->sidx], 0); @@ -6402,15 +6549,73 @@ pf_multihome_scan_asconf(struct mbuf *m, int start, int len, return (pf_multihome_scan(m, start, len, pd, kif, SCTP_ADD_IP_ADDRESS)); } +int +pf_icmp_state_lookup(struct pf_state_key_cmp *key, struct pf_pdesc *pd, + struct pf_kstate **state, struct mbuf *m, int direction, struct pfi_kkif *kif, + u_int16_t icmpid, u_int16_t type, int icmp_dir, int *iidx, int multi) +{ + key->af = pd->af; + key->proto = pd->proto; + if (icmp_dir == PF_IN) { + *iidx = pd->sidx; + key->port[pd->sidx] = icmpid; + key->port[pd->didx] = type; + } else { + *iidx = pd->didx; + key->port[pd->sidx] = type; + key->port[pd->didx] = icmpid; + } + if (pd->af == AF_INET6 && multi != PF_ICMP_MULTI_NONE) { + switch (multi) { + case PF_ICMP_MULTI_SOLICITED: + key->addr[pd->sidx].addr32[0] = IPV6_ADDR_INT32_MLL; + key->addr[pd->sidx].addr32[1] = 0; + key->addr[pd->sidx].addr32[2] = IPV6_ADDR_INT32_ONE; + key->addr[pd->sidx].addr32[3] = pd->src->addr32[3]; + key->addr[pd->sidx].addr8[12] = 0xff; + break; + case PF_ICMP_MULTI_LINK: + key->addr[pd->sidx].addr32[0] = IPV6_ADDR_INT32_MLL; + key->addr[pd->sidx].addr32[1] = 0; + key->addr[pd->sidx].addr32[2] = 0; + key->addr[pd->sidx].addr32[3] = IPV6_ADDR_INT32_ONE; + break; + } + } else + PF_ACPY(&key->addr[pd->sidx], pd->src, key->af); + PF_ACPY(&key->addr[pd->didx], pd->dst, key->af); + + STATE_LOOKUP(kif, key, *state, pd); + + /* Is this ICMP message flowing in right direction? */ + if ((*state)->rule.ptr->type && + (((*state)->direction == direction) ? + PF_IN : PF_OUT) != icmp_dir) { + if (V_pf_status.debug >= PF_DEBUG_MISC) { + printf("pf: icmp type %d in wrong direction (%d): ", + icmp_dir, pd->dir); + pf_print_state(*state); + printf("\n"); + } + return (PF_DROP); + } + return (-1); +} + static int pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, struct mbuf *m, int off, void *h, struct pf_pdesc *pd, u_short *reason) { struct pf_addr *saddr = pd->src, *daddr = pd->dst; - u_int16_t icmpid = 0, *icmpsum; + u_int16_t *icmpsum, virtual_id, virtual_type; u_int8_t icmptype, icmpcode; - int state_icmp = 0; + int icmp_dir, iidx, ret, multi; struct pf_state_key_cmp key; +#ifdef INET + u_int16_t icmpid; +#endif + + MPASS(*state == NULL); bzero(&key, sizeof(key)); switch (pd->proto) { @@ -6420,49 +6625,43 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, icmpcode = pd->hdr.icmp.icmp_code; icmpid = pd->hdr.icmp.icmp_id; icmpsum = &pd->hdr.icmp.icmp_cksum; - - if (icmptype == ICMP_UNREACH || - icmptype == ICMP_SOURCEQUENCH || - icmptype == ICMP_REDIRECT || - icmptype == ICMP_TIMXCEED || - icmptype == ICMP_PARAMPROB) - state_icmp++; break; #endif /* INET */ #ifdef INET6 case IPPROTO_ICMPV6: icmptype = pd->hdr.icmp6.icmp6_type; icmpcode = pd->hdr.icmp6.icmp6_code; +#ifdef INET icmpid = pd->hdr.icmp6.icmp6_id; +#endif icmpsum = &pd->hdr.icmp6.icmp6_cksum; - - if (icmptype == ICMP6_DST_UNREACH || - icmptype == ICMP6_PACKET_TOO_BIG || - icmptype == ICMP6_TIME_EXCEEDED || - icmptype == ICMP6_PARAM_PROB) - state_icmp++; break; #endif /* INET6 */ } - if (!state_icmp) { + if (pf_icmp_mapping(pd, icmptype, &icmp_dir, &multi, + &virtual_id, &virtual_type) == 0) { /* * ICMP query/reply message not related to a TCP/UDP packet. * Search for an ICMP state. */ - key.af = pd->af; - key.proto = pd->proto; - key.port[0] = key.port[1] = icmpid; - if (pd->dir == PF_IN) { /* wire side, straight */ - PF_ACPY(&key.addr[0], pd->src, key.af); - PF_ACPY(&key.addr[1], pd->dst, key.af); - } else { /* stack side, reverse */ - PF_ACPY(&key.addr[1], pd->src, key.af); - PF_ACPY(&key.addr[0], pd->dst, key.af); + ret = pf_icmp_state_lookup(&key, pd, state, m, pd->dir, + kif, virtual_id, virtual_type, icmp_dir, &iidx, + PF_ICMP_MULTI_NONE); + if (ret >= 0) { + if (ret == PF_DROP && pd->af == AF_INET6 && + icmp_dir == PF_OUT) { + if (*state != NULL) + PF_STATE_UNLOCK((*state)); + ret = pf_icmp_state_lookup(&key, pd, state, m, + pd->dir, kif, virtual_id, virtual_type, + icmp_dir, &iidx, multi); + if (ret >= 0) + return (ret); + } else + return (ret); } - STATE_LOOKUP(kif, &key, *state, pd); - (*state)->expire = time_uptime; (*state)->timeout = PFTM_ICMP_ERROR_REPLY; @@ -6485,14 +6684,14 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, pd->ip_sum, nk->addr[pd->didx].v4.s_addr, 0); - if (nk->port[0] != + if (nk->port[iidx] != pd->hdr.icmp.icmp_id) { pd->hdr.icmp.icmp_cksum = pf_cksum_fixup( pd->hdr.icmp.icmp_cksum, icmpid, - nk->port[pd->sidx], 0); + nk->port[iidx], 0); pd->hdr.icmp.icmp_id = - nk->port[pd->sidx]; + nk->port[iidx]; } m_copyback(m, off, ICMP_MINLEN, @@ -6857,13 +7056,15 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, return (PF_DROP); } - key.af = pd2.af; - key.proto = IPPROTO_ICMP; - PF_ACPY(&key.addr[pd2.sidx], pd2.src, key.af); - PF_ACPY(&key.addr[pd2.didx], pd2.dst, key.af); - key.port[0] = key.port[1] = iih.icmp_id; + icmpid = iih.icmp_id; + pf_icmp_mapping(&pd2, iih.icmp_type, + &icmp_dir, &multi, &virtual_id, &virtual_type); - STATE_LOOKUP(kif, &key, *state, pd); + ret = pf_icmp_state_lookup(&key, &pd2, state, m, + pd->dir, kif, virtual_id, virtual_type, + icmp_dir, &iidx, PF_ICMP_MULTI_NONE); + if (ret >= 0) + return (ret); /* translate source/destination address, if necessary */ if ((*state)->key[PF_SK_WIRE] != @@ -6873,21 +7074,23 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - nk->port[pd2.sidx] != iih.icmp_id) - pf_change_icmp(pd2.src, &iih.icmp_id, + (virtual_type == ICMP_ECHO && + nk->port[iidx] != iih.icmp_id)) + pf_change_icmp(pd2.src, + (virtual_type == ICMP_ECHO) ? + &iih.icmp_id : NULL, daddr, &nk->addr[pd2.sidx], - nk->port[pd2.sidx], NULL, + (virtual_type == ICMP_ECHO) ? + nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET); if (PF_ANEQ(pd2.dst, - &nk->addr[pd2.didx], pd2.af) || - nk->port[pd2.didx] != iih.icmp_id) - pf_change_icmp(pd2.dst, &iih.icmp_id, - saddr, &nk->addr[pd2.didx], - nk->port[pd2.didx], NULL, - pd2.ip_sum, icmpsum, - pd->ip_sum, 0, AF_INET); + &nk->addr[pd2.didx], pd2.af)) + pf_change_icmp(pd2.dst, NULL, NULL, + &nk->addr[pd2.didx], 0, NULL, + pd2.ip_sum, icmpsum, pd->ip_sum, 0, + AF_INET); m_copyback(m, off, ICMP_MINLEN, (caddr_t)&pd->hdr.icmp); m_copyback(m, ipoff2, sizeof(h2), (caddr_t)&h2); @@ -6909,13 +7112,25 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, return (PF_DROP); } - key.af = pd2.af; - key.proto = IPPROTO_ICMPV6; - PF_ACPY(&key.addr[pd2.sidx], pd2.src, key.af); - PF_ACPY(&key.addr[pd2.didx], pd2.dst, key.af); - key.port[0] = key.port[1] = iih.icmp6_id; - - STATE_LOOKUP(kif, &key, *state, pd); + pf_icmp_mapping(&pd2, iih.icmp6_type, + &icmp_dir, &multi, &virtual_id, &virtual_type); + ret = pf_icmp_state_lookup(&key, &pd2, state, m, + pd->dir, kif, virtual_id, virtual_type, + icmp_dir, &iidx, PF_ICMP_MULTI_NONE); + if (ret >= 0) { + if (ret == PF_DROP && pd->af == AF_INET6 && + icmp_dir == PF_OUT) { + if (*state != NULL) + PF_STATE_UNLOCK((*state)); + ret = pf_icmp_state_lookup(&key, pd, + state, m, pd->dir, kif, + virtual_id, virtual_type, + icmp_dir, &iidx, multi); + if (ret >= 0) + return (ret); + } else + return (ret); + } /* translate source/destination address, if necessary */ if ((*state)->key[PF_SK_WIRE] != @@ -6925,19 +7140,21 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - nk->port[pd2.sidx] != iih.icmp6_id) - pf_change_icmp(pd2.src, &iih.icmp6_id, + ((virtual_type == ICMP6_ECHO_REQUEST) && + nk->port[pd2.sidx] != iih.icmp6_id)) + pf_change_icmp(pd2.src, + (virtual_type == ICMP6_ECHO_REQUEST) + ? &iih.icmp6_id : NULL, daddr, &nk->addr[pd2.sidx], - nk->port[pd2.sidx], NULL, + (virtual_type == ICMP6_ECHO_REQUEST) + ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET6); if (PF_ANEQ(pd2.dst, - &nk->addr[pd2.didx], pd2.af) || - nk->port[pd2.didx] != iih.icmp6_id) - pf_change_icmp(pd2.dst, &iih.icmp6_id, - saddr, &nk->addr[pd2.didx], - nk->port[pd2.didx], NULL, + &nk->addr[pd2.didx], pd2.af)) + pf_change_icmp(pd2.dst, NULL, NULL, + &nk->addr[pd2.didx], 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET6); diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index eb3d087e3df6..4fcad7e578a8 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -225,6 +225,23 @@ pf_get_sport(sa_family_t af, u_int8_t proto, struct pf_krule *r, if (pf_map_addr(af, r, saddr, naddr, NULL, &init_addr, sn)) return (1); + if (proto == IPPROTO_ICMP) { + if (*nport == htons(ICMP_ECHO)) { + low = 1; + high = 65535; + } else + return (0); /* Don't try to modify non-echo ICMP */ + } +#ifdef INET6 + if (proto == IPPROTO_ICMPV6) { + if (*nport == htons(ICMP6_ECHO_REQUEST)) { + low = 1; + high = 65535; + } else + return (0); /* Don't try to modify non-echo ICMP */ + } +#endif /* INET6 */ + bzero(&key, sizeof(key)); key.af = af; key.proto = proto; @@ -633,7 +650,7 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, switch (r->action) { case PF_NAT: if (pd->proto == IPPROTO_ICMP) { - low = 1; + low = 1; high = 65535; } else { low = r->rpool.proxy_port[0]; From nobody Wed Aug 7 13:44:23 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 4WfBHC6sWbz5S9Lp; Wed, 07 Aug 2024 13:44:23 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHC4zBFz4hjG; Wed, 7 Aug 2024 13:44:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038263; 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=4Hj/Mz6Gf4oOw9OPqEtJhV/sjTGThYOjpADtP976GI0=; b=vyvVwdl2t5fS2j+bdtMorKaGDpZgVgsCM3on1c37LJyYWCXg8Nz0EilIhNHrspiR0jUm/x xmIjt03+49d5nnXiph4YfhqUS2uvy+EzOWZFx3ak9EkngIZj7HWcBT7DQXiQo9cHOhrI2W q/jpev1XAJBFGBbjB2nZj3OmG0dFrdGemDwKs6hyj0podwKRNaYWcvv3r33N3eeqEoomt/ RoZIqJ3Zh14Uw6LE7NK3FBkJUyvsAbnlgkY0OsuwQP2d5/ngZ0yN8NWhn5sHvbekQZrSjo BhyeWzOeZJ1yR35llGwn2l9hcPCOYOpzDLF5BpeaHhD0WXXT1YxoALfPdD2S6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038263; a=rsa-sha256; cv=none; b=vuXDuHDSzUUN+95KIT5psIfiD8PwvoP9+xKZJIvHM+Cu/zTI84WpIRSRTWc0rAwGyYBK3B Q+QiFmADB5jqs3/UhW/5LRDmEjGY0JMz6talHFUxawNLSUUOpC7j/8wsw+3+4Qq2sdica+ JfgOAkgSCpXtmOJyYuncdGBOfMDdJzFPLM09Yj6+ZvhmndyBPPWL1a56Kxjiwo1K7sAdcy 9x1oNJnn7BWM9PK7cFeCUdhAzKEMR4fPkDHtFHWcvSCFuqhfsP1HAEbdI48Pax0+gaGbVF sM8f2ItxtmmM5Ae+tO20fZTtNdfYAVEXA09dSMn6DPgCcX+6kj5+1jZ0KDFAyA== 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=1723038263; 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=4Hj/Mz6Gf4oOw9OPqEtJhV/sjTGThYOjpADtP976GI0=; b=SsiDNwvoXHKL0YT3GnSbf7URtdvDbt9lBmxhDi32gv14zrqsMFKk0iGMezF3omgirkN9KX jFGaQsThs2FDP0hmtZE+4gcIchd3IKkOBix2WrE0tl3w1eWrDNshUMp9iTV3cy38PyXxfb Sj3htKA0i/SGwgPyLPKyjwE4VfLql4W0uzLMxR3aWwk3LeICq0wbrQFZWpj8zPjAqdYMzd vEnMTz6g4cMOb7QS60YUt132CcgPgtWMSGpttCtPUu8NvXWe/I8YfNoMFGvpZlIMExuN6X tEF/KJMZbcSQIWu3iVyX4Z0mudasahcltlq8ugsUp9kTxSpdKKJPgghj+p80HA== 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 4WfBHC4NClzsmM; Wed, 7 Aug 2024 13:44:23 +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 477DiNq7033477; Wed, 7 Aug 2024 13:44:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DiNMS033474; Wed, 7 Aug 2024 13:44:23 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:23 GMT Message-Id: <202408071344.477DiNMS033474@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: c95f99c0abb3 - releng/14.1 - pf: some ICMP types that also have icmp_id, pointed out by markus@ 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: c95f99c0abb31b4d68f9672aa85a8e248a159f6f Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c95f99c0abb31b4d68f9672aa85a8e248a159f6f commit c95f99c0abb31b4d68f9672aa85a8e248a159f6f Author: Kristof Provost AuthorDate: 2024-07-10 11:32:03 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:32:00 +0000 pf: some ICMP types that also have icmp_id, pointed out by markus@ ok henning markus Approved by: so Security: FreeBSD-SA-24:05.pf Security: CVE-2024-6640 MFC after: 1 day Obtained From: OpenBSD, mcbride 8c0632cd274b Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit e296b0de9e467b8c5eb853f6cf4c6ea28d4119a2) (cherry picked from commit c5081b8d3918564c1aba5a5e3f0a5219568e3435) --- sys/netpfil/pf/pf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 3212a1443f63..b4c310796cf4 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1766,21 +1766,21 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, *icmp_dir = PF_IN; case ICMP_TSTAMPREPLY: *icmptype = ICMP_TSTAMP; - *icmpid = 0; /* Time is not a secret. */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_IREQ: *icmp_dir = PF_IN; case ICMP_IREQREPLY: *icmptype = ICMP_IREQ; - *icmpid = 0; /* Nothing sane to match on! */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_MASKREQ: *icmp_dir = PF_IN; case ICMP_MASKREPLY: *icmptype = ICMP_MASKREQ; - *icmpid = 0; /* Nothing sane to match on! */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_IPV6_WHEREAREYOU: From nobody Wed Aug 7 13:44:24 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 4WfBHF0l5pz5S94g; Wed, 07 Aug 2024 13:44:25 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHD5yfJz4hlh; Wed, 7 Aug 2024 13:44:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038264; 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=kIdNlB+FDyp881eO+osRCZusZm8p41naOOVeu5Frd/M=; b=n5A0EHDM0uB2+kceiXJ5ieWyVPD7LA+39vtyKGEBqm+7DFVfp+vCLVevMZuTPwaf3tnGRp QtJjgYLybkGST1amAdLwNhscC12HS6kveTXi9Ssyt7KLgyUKSaPIC7YlqmmFTaDefcWpnL mNZxpnXYSpiWxJpdYCNOZD2dCoVLEhIXRqhOijGR5cnFQYUCYVxfHS6pqvvpx59cqYAtGr vMe2ZPMbVrQZNvePb5AzogrHjnPfTROkfbwpKty3RdOcl/OrRrgmS4PNgj4MOf5LURfET0 E3uTyCFAHXu2L9f5n87niXORSaxQ48LKZoxGVOcXXhqZfUexYuW06Pq96I6zXQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038264; a=rsa-sha256; cv=none; b=GddZEckuSdmEFjJysgIl8jvNOTqvmcfqFVwlYuLZZIHnuTcDaon9PLTLU3TMcaPK61gQ6x bVtipFX6I0q2wKM4qRj9okT5Za1EbjLF/X5MXeKz+y5E3vZqilnlV7rjv/XLBFZurRkKlU hJma9bjFvKZhXN40vsnjXzKybHj8wka1wImY6fU7FTU5XJNmrmHWVZ0ePkJAcylVyFsONG uu2lLs5lMZabAIRnHqOHMZyR459nv1FaihC+65eBMNnPwv+WEwQyXJHmV2u2fX0hfy++M5 Cxbbd+sV7NAUD3Q6X0DivTC6g1x00CWb7a2iM6VvsqyQDfpM3WoGcJLgn8EU4w== 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=1723038264; 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=kIdNlB+FDyp881eO+osRCZusZm8p41naOOVeu5Frd/M=; b=EryOw9CoQTltqH1i4Tg5Cu9Uunr5yFr0SxCQQqUs784Yqcg+xwWq7eU6GHjQGylfzBhTru lihSUX8cOeaYjFXlqIAaD7W5rS1LU8Jmvsk5NmAz+5b1vrhZHpGqQ9tEg8U2l/4oVlZ2FL Y+BwlzujTOxDAQs6CtQ+GCuAiWcrC/qRs/Br3l6iHzLk5q96JbY3Djw3sren5lCSJfHa9p zJns5jGloqTQ9lQPzluBFdJjL2W4DHnraQZ19wRLWqmqmDTDYZBD+lLdtTM3H9sDErpeLX JEfCzNRs2T0OotWC5MCy4oWSZ+tKD92m8WbGL2YSq74vYYNLuYUCYG3DpyLDDQ== 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 4WfBHD5LTfzsV7; Wed, 7 Aug 2024 13:44:24 +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 477DiOEj033527; Wed, 7 Aug 2024 13:44:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DiOC4033524; Wed, 7 Aug 2024 13:44:24 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:24 GMT Message-Id: <202408071344.477DiOC4033524@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: 6979b4db10b8 - releng/14.1 - pf: split ICMP/ICMPv6 number space in pf_icmp_mapping() 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 6979b4db10b8c438e0afdf8b05069e6d3057102a Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6979b4db10b8c438e0afdf8b05069e6d3057102a commit 6979b4db10b8c438e0afdf8b05069e6d3057102a Author: Kristof Provost AuthorDate: 2024-07-10 12:10:50 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:32:12 +0000 pf: split ICMP/ICMPv6 number space in pf_icmp_mapping() In pf_icmp_mapping() the ICMP and ICMPv6 types shared the same number space. In fact they are independent and must be handled separately. Fix traceroute via pf by splitting pf_icmp_mapping() into IPv4 and IPv6 sections. ok henning@ mcbride@; tested mcbride@; sure deraadt@ Approved by: so Security: FreeBSD-SA-24:05.pf Security: CVE-2024-6640 MFC after: 1 day Obtained From: OpenBSD, bluhm ef4bccd7509e Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 46755f52247bd34a7f013d6844ed0c673ac0defc) (cherry picked from commit 7f77305a5ba421f901cf3ac59a6449a70645fda4) --- sys/netpfil/pf/pf.c | 247 ++++++++++++++++++++++++++++------------------------ 1 file changed, 135 insertions(+), 112 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index b4c310796cf4..275c29d20fd5 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1744,7 +1744,7 @@ pf_isforlocal(struct mbuf *m, int af) int pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, - int *icmp_dir, int *multi, u_int16_t *icmpid, u_int16_t *icmptype) + int *icmp_dir, int *multi, u_int16_t *virtual_id, u_int16_t *virtual_type) { /* * ICMP types marked with PF_OUT are typically responses to @@ -1754,128 +1754,151 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, *icmp_dir = PF_OUT; *multi = PF_ICMP_MULTI_LINK; /* Queries (and responses) */ - switch (type) { - case ICMP_ECHO: - *icmp_dir = PF_IN; - case ICMP_ECHOREPLY: - *icmptype = ICMP_ECHO; - *icmpid = pd->hdr.icmp.icmp_id; - break; + switch (pd->af) { +#ifdef INET + case AF_INET: + switch (type) { + case ICMP_ECHO: + *icmp_dir = PF_IN; + case ICMP_ECHOREPLY: + *virtual_type = ICMP_ECHO; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_TSTAMP: - *icmp_dir = PF_IN; - case ICMP_TSTAMPREPLY: - *icmptype = ICMP_TSTAMP; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_TSTAMP: + *icmp_dir = PF_IN; + case ICMP_TSTAMPREPLY: + *virtual_type = ICMP_TSTAMP; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_IREQ: - *icmp_dir = PF_IN; - case ICMP_IREQREPLY: - *icmptype = ICMP_IREQ; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_IREQ: + *icmp_dir = PF_IN; + case ICMP_IREQREPLY: + *virtual_type = ICMP_IREQ; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_MASKREQ: - *icmp_dir = PF_IN; - case ICMP_MASKREPLY: - *icmptype = ICMP_MASKREQ; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_MASKREQ: + *icmp_dir = PF_IN; + case ICMP_MASKREPLY: + *virtual_type = ICMP_MASKREQ; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_IPV6_WHEREAREYOU: - *icmp_dir = PF_IN; - case ICMP_IPV6_IAMHERE: - *icmptype = ICMP_IPV6_WHEREAREYOU; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_IPV6_WHEREAREYOU: + *icmp_dir = PF_IN; + case ICMP_IPV6_IAMHERE: + *virtual_type = ICMP_IPV6_WHEREAREYOU; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case ICMP_MOBILE_REGREQUEST: - *icmp_dir = PF_IN; - case ICMP_MOBILE_REGREPLY: - *icmptype = ICMP_MOBILE_REGREQUEST; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_MOBILE_REGREQUEST: + *icmp_dir = PF_IN; + case ICMP_MOBILE_REGREPLY: + *virtual_type = ICMP_MOBILE_REGREQUEST; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case ICMP_ROUTERSOLICIT: - *icmp_dir = PF_IN; - case ICMP_ROUTERADVERT: - *icmptype = ICMP_ROUTERSOLICIT; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_ROUTERSOLICIT: + *icmp_dir = PF_IN; + case ICMP_ROUTERADVERT: + *virtual_type = ICMP_ROUTERSOLICIT; + *virtual_id = 0; /* Nothing sane to match on! */ + break; -#ifdef INET6 - case ICMP6_ECHO_REQUEST: - *icmp_dir = PF_IN; - case ICMP6_ECHO_REPLY: - *icmptype = ICMP6_ECHO_REQUEST; - *icmpid = pd->hdr.icmp6.icmp6_id; - break; + /* These ICMP types map to other connections */ + case ICMP_UNREACH: + case ICMP_SOURCEQUENCH: + case ICMP_REDIRECT: + case ICMP_TIMXCEED: + case ICMP_PARAMPROB: + /* These will not be used, but set them anyway */ + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + HTONS(*virtual_type); + return (1); /* These types match to another state */ - case MLD_LISTENER_QUERY: - *icmp_dir = PF_IN; - case MLD_LISTENER_REPORT: { - *icmptype = MLD_LISTENER_QUERY; - *icmpid = 0; + /* + * All remaining ICMP types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + break; + } break; - } +#endif /* INET */ +#ifdef INET6 + case AF_INET6: + switch (type) { + case ICMP6_ECHO_REQUEST: + *icmp_dir = PF_IN; + case ICMP6_ECHO_REPLY: + *virtual_type = ICMP6_ECHO_REQUEST; + *virtual_id = pd->hdr.icmp6.icmp6_id; + break; - /* ICMP6_FQDN and ICMP6_NI query/reply are the same type as ICMP6_WRU */ - case ICMP6_WRUREQUEST: - *icmp_dir = PF_IN; - case ICMP6_WRUREPLY: - *icmptype = ICMP6_WRUREQUEST; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case MLD_LISTENER_QUERY: + *icmp_dir = PF_IN; + case MLD_LISTENER_REPORT: { + *virtual_type = MLD_LISTENER_QUERY; + *virtual_id = 0; + break; + } + case MLD_MTRACE: + *icmp_dir = PF_IN; + case MLD_MTRACE_RESP: + *virtual_type = MLD_MTRACE; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case MLD_MTRACE: - *icmp_dir = PF_IN; - case MLD_MTRACE_RESP: - *icmptype = MLD_MTRACE; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ND_NEIGHBOR_SOLICIT: + *icmp_dir = PF_IN; + case ND_NEIGHBOR_ADVERT: { + *virtual_type = ND_NEIGHBOR_SOLICIT; + *virtual_id = 0; + break; + } - case ND_NEIGHBOR_SOLICIT: - *icmp_dir = PF_IN; - case ND_NEIGHBOR_ADVERT: { - *icmptype = ND_NEIGHBOR_SOLICIT; - *multi = PF_ICMP_MULTI_SOLICITED; - *icmpid = 0; + /* + * These ICMP types map to other connections. + * ND_REDIRECT can't be in this list because the triggering + * packet header is optional. + */ + case ICMP6_DST_UNREACH: + case ICMP6_PACKET_TOO_BIG: + case ICMP6_TIME_EXCEEDED: + case ICMP6_PARAM_PROB: + /* These will not be used, but set them anyway */ + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + HTONS(*virtual_type); + return (1); /* These types match to another state */ + /* + * All remaining ICMP6 types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + break; + } break; - } - #endif /* INET6 */ - /* These ICMP types map to other connections */ - case ICMP_UNREACH: - case ICMP_SOURCEQUENCH: - case ICMP_REDIRECT: - case ICMP_TIMXCEED: - case ICMP_PARAMPROB: -#ifdef INET6 - /* - * ICMP6_TIME_EXCEEDED is the same type as ICMP_UNREACH - * ND_REDIRECT can't be in this list because the triggering packet - * header is optional. - */ - case ICMP6_PACKET_TOO_BIG: -#endif /* INET6 */ - /* These will not be used, but set them anyways */ - *icmp_dir = PF_IN; - *icmptype = htons(type); - *icmpid = 0; - return (1); /* These types are matched to other state */ - /* - * All remaining ICMP types get their own states, - * and will only match in one direction. - */ default: *icmp_dir = PF_IN; - *icmptype = type; - *icmpid = 0; + *virtual_type = type; + *virtual_id = 0; break; } - HTONS(*icmptype); - return (0); + HTONS(*virtual_type); + return (0); /* These types match to their own state */ } void @@ -4708,7 +4731,7 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, pf_change_a(&daddr->v4.s_addr, pd->ip_sum, nk->addr[pd->didx].v4.s_addr, 0); - if (virtual_type == ICMP_ECHO && + if (virtual_type == htons(ICMP_ECHO) && nk->port[pd->sidx] != pd->hdr.icmp.icmp_id) { pd->hdr.icmp.icmp_cksum = pf_cksum_fixup( pd->hdr.icmp.icmp_cksum, sport, @@ -7074,13 +7097,13 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - (virtual_type == ICMP_ECHO && + (virtual_type == htons(ICMP_ECHO) && nk->port[iidx] != iih.icmp_id)) pf_change_icmp(pd2.src, - (virtual_type == ICMP_ECHO) ? + (virtual_type == htons(ICMP_ECHO)) ? &iih.icmp_id : NULL, daddr, &nk->addr[pd2.sidx], - (virtual_type == ICMP_ECHO) ? + (virtual_type == htons(ICMP_ECHO)) ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET); @@ -7140,13 +7163,13 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - ((virtual_type == ICMP6_ECHO_REQUEST) && + ((virtual_type == htons(ICMP6_ECHO_REQUEST)) && nk->port[pd2.sidx] != iih.icmp6_id)) pf_change_icmp(pd2.src, - (virtual_type == ICMP6_ECHO_REQUEST) + (virtual_type == htons(ICMP6_ECHO_REQUEST)) ? &iih.icmp6_id : NULL, daddr, &nk->addr[pd2.sidx], - (virtual_type == ICMP6_ECHO_REQUEST) + (virtual_type == htons(ICMP6_ECHO_REQUEST)) ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET6); From nobody Wed Aug 7 13:44:25 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 4WfBHG0h9Pz5S99L; Wed, 07 Aug 2024 13:44:26 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHF6bmjz4hpN; Wed, 7 Aug 2024 13:44:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038265; 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=hUsbUhBHNMVDoFafG2JK366kk0uN+9VCNkihdJGuZU4=; b=bnsXlTUOSjonsjYiP4X4ef+5PjAO/atKgHB2PwnRGNNHvfmZj9W7dOe+d7/ESQJhdO+boI u/T2hBjYcJiKmTDfDkSjOpS67oASL8MlExo/lbceyi4uGhpM/LkJP3d2n0mKF/xZWQmUyi /ECO8WIVz4o1ZknIosbq/Uybx3RNEVZWgt2XViGmos0F52v2LV49aN92pPAV5jz0AwzHBq F0bhEAMoqHDb5PWRumULDB9tfUFG3Gfqk9NCnr28VVEAHMN9LAjqODAz/NWYt6XUOR3RDg DFDdGecJslzJ6vw1vLFqKAKvufm/YJR4nH+fY+oB3fkoIe+h0yXhaym4I/AR2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038265; a=rsa-sha256; cv=none; b=jvJngcToqIARIY9YLE32ma0x6BHzu7sncW1En5WPOf2OoQXLBt+R/cenj3Ou3oVLcFN0/S ZB1c+OfLZfQxYa5ofi6GOFy1N1o7FBat2nY2ROGvzKvVtmP3ms+do+QSdQe4mc7fce67q2 I/hnmN8FHsrR6gUzFJ7si5Q0K1nFfiChDymqWfXyehDxRKz0UjiecyX1sYZhzguzkxBpy1 5i4lhFvsP/8es2Y7bXvmwg9NLHA6bCUvxLFRSZelWkckT0QmYyu95htKeKXzqv4f6aLT2o 75OPVHNF9nj0XQ6GFLHha1b3lIG9yCh8W97I/BwQFWgHn9+JVl7RfbcQPRLhcA== 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=1723038265; 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=hUsbUhBHNMVDoFafG2JK366kk0uN+9VCNkihdJGuZU4=; b=pRUqNTw0xFIh2nKsrXvt80M5IonKb6Pbi9wiN4UUolXmr0ewgD6NOv8EvowP6t5bXxBtZo XXWxRw3oa8WlAuTtmI4M+Aoczkw2YqYSqTCr7vCTGHOjIbxIpNN5PrmehbZPEl1qxg+Xzi QdeBOmOAIyrmvScexZWVsDOJtkuybSVEjlAigtCx0HwxnML/9lrTsSO+0uzwVI5nMXEA4i FteTdqnnamvTFa2C5bRhx7kJ0l/4/NSCUxcv6otmVmDWBgMUfMXWsqyvWv1WETHEk6FGRU jdC0Hvx2GOoNDw1nB1i/ddwWUwqHqUhA8WawlsdGdFefyuaQCw0ag/wXxutd2Q== 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 4WfBHF6676zsV8; Wed, 7 Aug 2024 13:44:25 +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 477DiPvt033581; Wed, 7 Aug 2024 13:44:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DiPiY033578; Wed, 7 Aug 2024 13:44:25 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:25 GMT Message-Id: <202408071344.477DiPiY033578@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: a66d33fcf334 - releng/14.1 - pf: allow MLD LR to be sent without state 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: a66d33fcf334ec0b8f5a13575f9788b269f4a3fa Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a66d33fcf334ec0b8f5a13575f9788b269f4a3fa commit a66d33fcf334ec0b8f5a13575f9788b269f4a3fa Author: Kristof Provost AuthorDate: 2024-07-10 12:36:18 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:32:20 +0000 pf: allow MLD LR to be sent without state Change PF behavior to allow MLD Listener Report packets to be sent without needing a previously created state by MLD Listener Query. It wasn't working because: (1) you might not have a previous MLD Listener Query and (2) the addresses of the Query and Report don't match. ok mikeb@, sashan@ Approved by: so Security: FreeBSD-SA-24:05.pf Security: CVE-2024-6640 MFC after: 1 day Obtained From: OpenBSD, rzalamena , 5c526dbdb0f2 Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 1afe4da75d1d2acd33b25eea942af28aa41c82c2) (cherry picked from commit 3382c691dc6a0d4e1f39ff67b5507f6542972498) --- sys/netpfil/pf/pf.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 275c29d20fd5..1cc85edfe3dc 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1843,8 +1843,15 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, break; case MLD_LISTENER_QUERY: - *icmp_dir = PF_IN; case MLD_LISTENER_REPORT: { + /* + * Listener Report can be sent by clients + * without an associated Listener Query. + * In addition to that, when Report is sent as a + * reply to a Query its source and destination + * address are different. + */ + *icmp_dir = PF_IN; *virtual_type = MLD_LISTENER_QUERY; *virtual_id = 0; break; From nobody Wed Aug 7 13:44:26 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 4WfBHH27p3z5S97V; Wed, 07 Aug 2024 13:44:27 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHH0hlLz4hm4; Wed, 7 Aug 2024 13:44:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038267; 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=OOKkTYTddnrAE/+9BpzUQI2C2LheFb36kZCwEvrw8Ho=; b=FcAbwgZg0WbUVvyg0B6lN0FcFU86eTbO5ci2Z+NsIT+Fkt3x3xiKOToj74Ybq0WquaeDuA 6cb03TsnWruKfUmnUOWMj/z4D38pmNtWL7xTbY/NY2f29P8erAE89bUi2Qg0/MQTvP/V/T D5TGJ+uAZBKxssGzpRV6TBGW2GiLXar5HFUn2El1yID0JiqYZTFlgYsTge5MjibNCOyHjY 4erOYGs783pdgRI3p1kSMQjn6q4NsgFXsQsGUK1M1xiPycdXhR5s+1sEBUM5SovU97+u2S awz8EH0cFh7Hndlh99naGPWM3xH0IyEKDUlkHumYVGSLqGFr2x5SSX7ZDHwFsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038267; a=rsa-sha256; cv=none; b=ALg3A9nL297kXYVewqyb7onwCuZoII1cpMFxujZnlCqqN0wNY201wToOXuMGEMu8pAzgDS gujW1K8ooxtCSBqawUm2uR0AbVmilEFIlbqkgZwdjUx2yxR1zqAa1HNm7KDRf0UPhK171P LnOIqnXEOOWNVNpnuqAHT6ns0YTPD3F+CQKBnrX7z5Sb3ELMAbBOdRm1EjI7O/eIVH9Yry 9gBXJ0gVP3qzOGhwT0wTtjZq9LqC1fw+aYamUA1JM98t7s7tHWBtkRNou9WumRbAUwSDJi PH19RsISXXViVJPW2XDCAl2c8cA0NB4TIOL6F1m8WTG5hfLJR+4yZOGwwEBoqA== 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=1723038267; 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=OOKkTYTddnrAE/+9BpzUQI2C2LheFb36kZCwEvrw8Ho=; b=OJ1t2O85snELnDcb/BlMDeoPZnUORK978FfNTrNXXpLuabh4n3Rek1mLOOnEfAWoXSv8/v bfk/fUcSX+A5PqdalwnTMYBhkRZQVkdXgVxktJUQuUunLlnh+2uVxAQsjYUwGID2Z8o/hv 57qjXMuqyEKEBn1UvalzilA5oPmvkeXHMXbgLYCRHGjr7grY/GNyZoP6aXJjMCzJjf6Fp5 RMwghkxdZb1IrKDLpLjVt3FPncVW/nC4V84OeZtIwS81AoKg0eBABzX3kKhr4g4gfE1y8T WGzEOho+JI7qG24OK1QP8dQzfBtnmHib1BAy42Zbure5OZOg7z1F+TsclevpdA== 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 4WfBHH0K17zsgf; Wed, 7 Aug 2024 13:44:27 +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 477DiQqN033626; Wed, 7 Aug 2024 13:44:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DiQIA033623; Wed, 7 Aug 2024 13:44:26 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:26 GMT Message-Id: <202408071344.477DiQIA033623@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: 450425089212 - releng/14.1 - sshd: remove blacklist call from grace_alarm_timer 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 4504250892124d6282ca931dd5f612afb8b799f6 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4504250892124d6282ca931dd5f612afb8b799f6 commit 4504250892124d6282ca931dd5f612afb8b799f6 Author: Ed Maste AuthorDate: 2024-08-01 00:04:46 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:32:25 +0000 sshd: remove blacklist call from grace_alarm_timer Under certain circumstances it may call log(3), which is not async- signal-safe. For now just remove the blacklist integration from this path, which means that blacklistd will not detect and firewall hosts that establish a connection but do nothing further. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46203 (cherry picked from commit 2739a6845031e69be7c03461a9335d8bbb9f59bd) (cherry picked from commit 3d3bae9b95388169d396adc8007585699c5a23e0) Approved by: so Security: FreeBSD-SA-24:08.openssh Security: CVE-2024-7589 (cherry picked from commit 73466449a9bf1888147c53d622236cebc0aa591b) --- crypto/openssh/sshd.c | 2 -- crypto/openssh/sshd_config | 2 +- crypto/openssh/sshd_config.5 | 2 +- crypto/openssh/version.h | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/crypto/openssh/sshd.c b/crypto/openssh/sshd.c index 0c83e0ea468e..889f2056bc75 100644 --- a/crypto/openssh/sshd.c +++ b/crypto/openssh/sshd.c @@ -377,8 +377,6 @@ grace_alarm_handler(int sig) kill(0, SIGTERM); } - BLACKLIST_NOTIFY(the_active_state, BLACKLIST_AUTH_FAIL, "ssh"); - /* Log error and exit. */ sigdie("Timeout before authentication for %s port %d", ssh_remote_ipaddr(the_active_state), diff --git a/crypto/openssh/sshd_config b/crypto/openssh/sshd_config index a06f8fcc13d1..7f559775e3b3 100644 --- a/crypto/openssh/sshd_config +++ b/crypto/openssh/sshd_config @@ -105,7 +105,7 @@ AuthorizedKeysFile .ssh/authorized_keys #PermitTunnel no #ChrootDirectory none #UseBlacklist no -#VersionAddendum FreeBSD-20240318 +#VersionAddendum FreeBSD-20240806 # no default banner path #Banner none diff --git a/crypto/openssh/sshd_config.5 b/crypto/openssh/sshd_config.5 index 0715b1f9d581..4de510ac8795 100644 --- a/crypto/openssh/sshd_config.5 +++ b/crypto/openssh/sshd_config.5 @@ -1944,7 +1944,7 @@ The default is Optionally specifies additional text to append to the SSH protocol banner sent by the server upon connection. The default is -.Qq FreeBSD-20240318 . +.Qq FreeBSD-20240806 . The value .Cm none may be used to disable this. diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h index 836b5650b247..82be0be8498f 100644 --- a/crypto/openssh/version.h +++ b/crypto/openssh/version.h @@ -5,4 +5,4 @@ #define SSH_PORTABLE "p1" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20240701" +#define SSH_VERSION_FREEBSD "FreeBSD-20240806" From nobody Wed Aug 7 13:44:28 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 4WfBHJ3HM3z5S9L4; Wed, 07 Aug 2024 13:44:28 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHJ1bH6z4hyv; Wed, 7 Aug 2024 13:44:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038268; 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=rb+M5nWNd3cr3MVEa2z6uLURyPWk4yMVVaXqdwnQ2Yg=; b=KkzmTNnSGhcRhJ0irC7ef6FMTZKipfeictUMTMfXkrvhA68HHHjAxd/bFRMO4QQkOcNvWJ +WYrkOHZI4kI14nZokHG5ovqXN/exp3FOH8kPxytTktPgXU2qgdRs4O/HnxH8DXw+7GCDB TmXX9aHJYvaBVAqnX93RGBlR9xgltK0m5JyS0MuiARV9uchcdLfm7RBcYM2Ht/qiOhO9i4 Aksfizo3SvrZA89X0RU9rmYEnPx9l1plqZnIYfqhdMP6HoVGDem+clZmijXC7vkwbZjN/S BHszF+RijcOZ0nY3wt8rd02SB04jQPndOzCCOYIvQzZn9OG82I6tU6CKjRkZyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038268; a=rsa-sha256; cv=none; b=oTyFBumbldCvyo29p0cdqKulzWLyu+DYW3XFmcJ0be6qSj+symSnlVskdUnY+8HDvasDpN PRzu1zu8o8GBvahjUwnf83ccv0kLpyM1zg9T/QexbppIti9i0hRNsZ3B4x2sw3J/gueUMT ijvQdEJE2ck24df+5OPGlEz32MUvFZmG6hWgGuebBt2RSpfOOJpeSa0CG89Uet+RRNM1Sp fXxgqhcIou/oaXb6q3SxsJtkxHmCQJqkuG4/vbSGbfGe/ylDQqHGC7MoxTP3ifp7NJ4ySA wBTMW5vA58is6e4MUYZSW3PL7ooXfdFj4pn+ppe5NSJf+UVdc5I0wZ47ywnz5A== 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=1723038268; 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=rb+M5nWNd3cr3MVEa2z6uLURyPWk4yMVVaXqdwnQ2Yg=; b=AZujMzNLBBedsABVH0H1ub7E8BevUbt/LTpTRzY5K9Xso8chB9WHh5VZ+Bs3MqlycoamIE zgGbgz33UwScCNnPxI+H/kOMENtzubDUUS+tCtva6N9iUrUK4Y/HBmVaTI3/zqqpLXNyhl b89of6ey8i/SIszk3GztSEsMsmagQy/qyJX+Xgy85WmWr9FDUpAeW0ijB0011U2yJpyxlZ hkNoA3tOZqQNLc/jx3h8kr1qc8i2K5/4EUx+NtrjAPedHN4t9UpaYRTySQ8DwPrNd+26mW fkXbltD9CzssdiTj13B0IkcaT5EGXdnJUts2CnEKIkd+bqecDJJ9qWY+hYzn0Q== 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 4WfBHJ0hzkzsmN; Wed, 7 Aug 2024 13:44:28 +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 477DiSDF033672; Wed, 7 Aug 2024 13:44:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DiSlx033669; Wed, 7 Aug 2024 13:44:28 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:28 GMT Message-Id: <202408071344.477DiSlx033669@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: b9115dba07e8 - releng/14.1 - ifconfig: Fix default netmask calculation 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: b9115dba07e8e7035cb54a7eb319e7166c59c7a4 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b9115dba07e8e7035cb54a7eb319e7166c59c7a4 commit b9115dba07e8e7035cb54a7eb319e7166c59c7a4 Author: Michael Gmelin AuthorDate: 2024-06-12 16:11:52 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:32:56 +0000 ifconfig: Fix default netmask calculation Approved by: so Security: FreeBSD-EN-24:14.ifconfig Reported by: phk Reviewed by: emaste, kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45570 (cherry picked from commit 8a9f0fa42b1c6cffd45459bb552e138083b00369) (cherry picked from commit 048ad7a9ef9fe15368ff287db5c705c8163f4e1c) --- sbin/ifconfig/af_inet.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ifconfig/af_inet.c b/sbin/ifconfig/af_inet.c index 5e3084165b33..e21956cfc4fd 100644 --- a/sbin/ifconfig/af_inet.c +++ b/sbin/ifconfig/af_inet.c @@ -440,7 +440,7 @@ in_exec_nl(if_ctx *ctx, unsigned long action, void *data) static void in_setdefaultmask_nl(void) { - struct in_px *px = sintab_nl[ADDR]; + struct in_px *px = sintab_nl[ADDR]; in_addr_t i = ntohl(px->addr.s_addr); @@ -451,11 +451,11 @@ in_setdefaultmask_nl(void) * we should return an error rather than warning. */ if (IN_CLASSA(i)) - px->plen = IN_CLASSA_NSHIFT; + px->plen = 32 - IN_CLASSA_NSHIFT; else if (IN_CLASSB(i)) - px->plen = IN_CLASSB_NSHIFT; + px->plen = 32 - IN_CLASSB_NSHIFT; else - px->plen = IN_CLASSC_NSHIFT; + px->plen = 32 - IN_CLASSC_NSHIFT; px->maskset = true; } #endif From nobody Wed Aug 7 13:44:29 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 4WfBHK4NFvz5S8rD; Wed, 07 Aug 2024 13:44:29 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHK2NkYz4j7P; Wed, 7 Aug 2024 13:44:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038269; 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=Xzh6jFuZZRZSLSQ9oX32EHeZNPMm+nWDIkaQfQl7L5s=; b=CLxTu7H0f5RrjwL1n59gbiQw6pkQUOTOApG9KJX/mN+MN3ajS6RKfmwy4cHGn8WDaaUff5 fHYFobCvQs9Rd0dznDhtW1oCGhAMBJQMHs5NBmRtQ2FwPU/Vuf8Eld85dybZ4PXByP7yrV h++1db07U0SesXUokR8JBACC8n/rWXCTIDGgmQSqNAAJgcjPl3y1ltqVCh6Rdk0/io063A RKHmv9I4tZgCulDNFdh8SImVpxSxTGK6mjH//Er5ITpbyT/lz8ygu8qOWPXAsDG+wognOm 798BAL77rtq9IMMATiKd4dwCPEXqZwdgUDnpJmz1TRK1WRp5Yg300f5LqRTZLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038269; a=rsa-sha256; cv=none; b=rgb0rl0n84ReR5Yhz9t0fWr5jJAgsL3oyciPbPs5Z7mw3y3zVNagU+3vs7PGvdP5chTrSo 4b324v43/kIGKM8CD0MlbCOhRK5cSGB2P/D43DNiNyilsnymraF7I2vFQ8m3rix+x8nCO4 vgaehzW16szqCX4DTPblxNIxwA0C43zJDfoBiUw6g9anky1rKXzEZPvMHMI/XDkpAFNt7U pRbjszlOvSNRyhq3l+VL1lA7iJiImarqiRguhZm8KrneHYC8zuttUWvEIXK9gfmVT90clZ +6XRnrcP7xv+PjIur/w6ERLaqr/QPBZTp5KslytiYMa3H4r9qhof3Y0C1rTvLA== 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=1723038269; 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=Xzh6jFuZZRZSLSQ9oX32EHeZNPMm+nWDIkaQfQl7L5s=; b=UB2aPmuTLf2O5bArgoKZBU8kfYg+XaPpazDEPE46E33ygKlI25N2OuhHfU8js+7dPM/RV2 VZ9CPW+vMF5tC3JmgSFfgL8CKg6tdBCTmP+kYqRdK+wLyCC/ypZ1EUSfTtrKhfVVtNesdE yQAbQ1ubwH13Cg8JdP2Vb9CS/r0yIoQkhFDKKi+pOeaaGixeXD8ruC4Kk5YUtPdbN3hSrX fwoFGIKnlaALHSnGWJdizA3XXoQm8Ft4yDJ7js6AgSRmUO31Occim08Hjn7DJvau7Erzmp oRgFGclGJcVWjXbAxPy9eaIrCyfp14IlvzhEgU6fm18Gtv3NvWBjCf25gql1gA== 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 4WfBHK1xbVzsjQ; Wed, 7 Aug 2024 13:44:29 +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 477DiTMf033720; Wed, 7 Aug 2024 13:44:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DiT9U033717; Wed, 7 Aug 2024 13:44:29 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:29 GMT Message-Id: <202408071344.477DiT9U033717@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: 22d04990cee5 - releng/14.1 - ktrace: Fix an inverted privilege check 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 22d04990cee5af5455490391ec386e8af3d368e5 Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=22d04990cee5af5455490391ec386e8af3d368e5 commit 22d04990cee5af5455490391ec386e8af3d368e5 Author: Mark Johnston AuthorDate: 2024-08-07 13:38:54 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:43:27 +0000 ktrace: Fix an inverted privilege check Approved by: so Security: FreeBSD-SA-24:06.ktrace Security: CVE-2024-6760 Fixes: 1762f674ccb5 ("ktrace: pack all ktrace parameters into allocated structure ktr_io_params") (cherry picked from commit 166b7573b5220aadf8b02a85933c9651b909b309) (cherry picked from commit 8b400c8488f0b9e67ae269f6d8e5022a3bc7d854) --- sys/kern/kern_ktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 4c1936edc301..c7ba8896506d 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -593,7 +593,7 @@ ktrprocexec(struct proc *p) PROC_LOCK_ASSERT(p, MA_OWNED); kiop = p->p_ktrioparms; - if (kiop == NULL || priv_check_cred(kiop->cr, PRIV_DEBUG_DIFFCRED)) + if (kiop == NULL || priv_check_cred(kiop->cr, PRIV_DEBUG_DIFFCRED) == 0) return (NULL); mtx_lock(&ktrace_mtx); From nobody Wed Aug 7 13:44:30 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 4WfBHM0rhfz5S8tm; Wed, 07 Aug 2024 13:44:31 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHL39B7z4j5F; Wed, 7 Aug 2024 13:44:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038270; 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=lxNpP3mlOYhsGNp+2mfsFg43RK43doC+buvYO8zUYSI=; b=bXk4+mxcJQnC8cL6zGjbmVOe71nQBbv2ICHGP1hJUQjBGHM+nsjutxptj/WgRS4BPdq+Tg 7m59o1GJsB9vew5mbrGow4clYvMoNNH+taNufVpsHGqZffLRkNMb9NkLj/wPxQI1IjZRgY pZV1ymAuJCMh85Gkn6V1qR2HZqPzIy1kW8t8kNNpoR8wJjHGTLlxV2cssmM1CsE0WLcR0k 5eJwS9bu9Ne4rRoErTA070BofoNXMFeTlYEz9+w/3Q0ktZjMDlQfc/3VCXsSfUsv1qBsx1 IGI/PGCFrsCZR7PYmMMOThWcsKC1OM4X+AaWAfCLfOmO+/UHNOyEdN7Y5Ov1PA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038270; a=rsa-sha256; cv=none; b=dNVfcHU+Hzhma15+b7nskgpPYZb5Ra2uMJxFS6G9pw1bySa212WkI3fo7rJoBIBxRcj8Pz XDUb/uaR4VhsHbX/JBcUmflWqfCA+/tll+undF6fg8A4e6yD7rnDUZq5YxrhkEUPJGn3va 5tKlh+jD6cbj28ISLKiFvxh2rJQg78E+sTgZJJjJONP/ujnwyBRM7owIwG/oA4HtATjjGQ bE/q6Lbc55MwbQdVGsUnqyKvGtCAe1PyvMOyCVvzczc7cYAjMMGF166jgKhYuboszzcy6i S1kGhmuTBZDrGKcGwLAvf4L0RMIyDopx6szY17isjuORsZvnU3hJXO7XwXGBAw== 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=1723038270; 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=lxNpP3mlOYhsGNp+2mfsFg43RK43doC+buvYO8zUYSI=; b=nadChJ7aKaA8fGbXZK2rHcdqrexitfstIeJVhWpdc6L46tYxy9WaM/sJIT9Uw0yWJT2DCk /jGS6DjPcfaZDWYjzv9Jh3o/5NKPTgRjH9cUGVU2gKrvMkVwwL1fuTDViPfrK/z38GAWND 5lXfWuEXXdN06GiWeTWAN1EAClkO3S+KZjf4xsagORKIOTH0QkYBHNG2WOi2gjqXSWatcR dBgskcqOk1ozQP2cqpbaNaO+e7oaKYogVHqu6CBi7H3+pZ5gfPnZA8dYitYbNCCGpDmfjV h/aNzAosNQi748+KXYW1GAF26lrEr0MalVW3Y8cs+aMf6gRHJSdCUi+sZ6jKKw== 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 4WfBHL2n2szsjR; Wed, 7 Aug 2024 13:44:30 +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 477DiUnu033771; Wed, 7 Aug 2024 13:44:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DiUBG033768; Wed, 7 Aug 2024 13:44:30 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:30 GMT Message-Id: <202408071344.477DiUBG033768@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: 1a207e5cdf99 - releng/14.1 - Add UPDATING entries and bump the branch version 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.1 X-Git-Reftype: branch X-Git-Commit: 1a207e5cdf997bd5a04e020d26039844a0c1294f Auto-Submitted: auto-generated The branch releng/14.1 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1a207e5cdf997bd5a04e020d26039844a0c1294f commit 1a207e5cdf997bd5a04e020d26039844a0c1294f Author: Mark Johnston AuthorDate: 2024-08-06 22:39:32 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:43:30 +0000 Add UPDATING entries and bump the branch version Approved by: so --- UPDATING | 17 +++++++++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 34b099e2fe73..abdee5182989 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,23 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20240807: + 14.1-RELEASE-p3 EN-24:14.ifconfig + SA-24:05.pf + SA-24:06.ktrace + SA-24:07.nfsclient + SA-24:08.openssh + + Incorrect ifconfig netmask assignment [EN-24:14.ifconfig] + + pf incorrectly matches different ICMPv6 states in the state table [SA-24:05.pf] + + ktrace(2) fails to detach when executing a setuid binary [SA-24:06.ktrace] + + NFS client accepts file names containing path separators [SA-24:07.nfsclient] + + OpenSSH pre-authentication async signal safety issue [SA-24:08.openssh] + 20240701: 14.1-RELEASE-p2 SA-24:04.openssh diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index ba482a7931d2..ce03fb4fb9fa 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.1" -BRANCH="RELEASE-p2" +BRANCH="RELEASE-p3" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Wed Aug 7 13:44:39 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 4WfBHX19TLz5S99d; Wed, 07 Aug 2024 13:44:40 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHW6HlTz4jQY; Wed, 7 Aug 2024 13:44:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038279; 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=bvsv/o9mhKwWa9RMV8W7LHE+DILHbD58Sk+w373GdkM=; b=X0M0mqPYhT7DjC/y5iuM6TnqYNNVrNCInNLRyFkSzA5YkZDSDqZRglgR0BP+9DwOjUducm wUR8zP44e69eVw45Nw+9DaRflMMZipPxwGaWBAQptU3ZZD0L8Wa9hVWYcYJurLvzhfSlqV lwBlKnTIeBFXKQfoPP9PE9m0WIy/vhOk/k+Vin8OTlXh3nb5oBd0z3Qp0KU/Pbv6J77pw6 KbKBnmtDEGajyFj7oJM2Kx6rzcdESBLgATZK0k8Pu2IY8K/GqZ4k7U5UOsdbTShewkU5DK PD+W1ilK7PtAiKOg8rq+hmRn11UDTgUCL/75DBGzkSFNYutI9D/mFSctN5grOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038279; a=rsa-sha256; cv=none; b=BmHtyOYffrF9YaT2+wDJdp2o6ZZoeEiNZwSIhN3m0asBjR/VcxKUl31z158aX5bkE3jtis 0zuvsXPPF+0v1zEx4P1FfMSTmSSC6iDqm4eGPFCcq2XWYrspmJzfA8RWvenXF++p8qOB/d bPTVUFfvMnU2TdNv9D+2Sd9lkvplcvNtp9ghKYFwcdca7T5yArQYlV1bzmq+IgeC5Taip0 s9wR81ObnwqMp1bRzcsZvhauwHVwL3cMuW67FsTnP+Kg2TBaVVUpmJYwjdaFpRSqesj/z8 7KT6jSOA90ObeSwSf4QEDoqvXc2ryBrf7UZVo6XSPRDXyAD4rr+JOsZQkShvKg== 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=1723038279; 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=bvsv/o9mhKwWa9RMV8W7LHE+DILHbD58Sk+w373GdkM=; b=bK/0LdO8pNh30RrYLgZeYMAEyWjTH6sO/r85c8cdyIDW9s2p4ZMygF5XwPDYhKCKeEZNdw +z+wveG4SvEk1oMonmB9bKCnHClKHhOQqh9vRIH6uU9unXhvjT3b7W65mNcFKySc4bDN9/ 8pFUPXltKvFEDAl9K8ENnYKh+PhCsYYk9t7K0c/RzDuM+GBNbi1Eyuoi8ExtwI3q3HHkKs IptKSONw/YmhvcV2aC5Cyrcu0k4OWMvi9X6JNpk0BbrvpPqbDLybTnyfismLgtcHkwXHl/ BXzjM6muag223u3ysYaYpWiEYXyAvsk0nIizbc2Dh6xy26zsKAaTPR9s69tN8w== 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 4WfBHW5vR6zsrY; Wed, 7 Aug 2024 13:44:39 +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 477DidpQ034007; Wed, 7 Aug 2024 13:44:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477Did6b034004; Wed, 7 Aug 2024 13:44:39 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:39 GMT Message-Id: <202408071344.477Did6b034004@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: 4e7bf17e9db8 - releng/14.0 - nfscl: Scan readdir reply filenames for invalid characters 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 4e7bf17e9db892ab47ede6c12aa0d2902c5ff795 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4e7bf17e9db892ab47ede6c12aa0d2902c5ff795 commit 4e7bf17e9db892ab47ede6c12aa0d2902c5ff795 Author: Rick Macklem AuthorDate: 2024-07-21 22:56:16 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:25:36 +0000 nfscl: Scan readdir reply filenames for invalid characters The NFS RFCs are pretty loose with respect to what characters can be in a filename returned by a Readdir. However, FreeBSD, as a POSIX system will not handle imbedded '/' or nul characters in file names. Also, for NFSv4, the file names "." and ".." are handcrafted on the client and should not be returned by a NFSv4 server. This patch scans for the above in filenames returned by Readdir and ignores any entry returned by Readdir which has them in it. Because an imbedded nul would be a string terminator, it was not possible to code this check efficiently using string(3) functions. Approved by: so Security: FreeBSD-SA-24:07.nfsclient Security: CVE-2024-6759 Reported by: Apple Security Engineering and Architecture (SEAR) (cherry picked from commit 026cdaa3b3a92574d9ac3155216e5cc0b0bd4c51) (cherry picked from commit 9328ded386d570c8455b9021e047520ef72e0e79) --- sys/fs/nfsclient/nfs_clrpcops.c | 137 ++++++++++++++++++++++++++++++++-------- 1 file changed, 110 insertions(+), 27 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 7f886ad286e7..c63bff726c87 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -142,6 +142,7 @@ static int nfsrpc_createv4(vnode_t , char *, int, struct vattr *, nfsquad_t, int, struct nfsclowner *, struct nfscldeleg **, struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, struct nfsfh **, int *, int *, int *); +static bool nfscl_invalidfname(bool, char *, int); static int nfsrpc_locku(struct nfsrv_descript *, struct nfsmount *, struct nfscllockowner *, u_int64_t, u_int64_t, u_int32_t, struct ucred *, NFSPROC_T *, int); @@ -3224,6 +3225,31 @@ nfsrpc_rmdir(vnode_t dvp, char *name, int namelen, struct ucred *cred, return (error); } +/* + * Check to make sure the file name in a Readdir reply is valid. + */ +static bool +nfscl_invalidfname(bool is_v4, char *name, int len) +{ + int i; + char *cp; + + if (is_v4 && ((len == 1 && name[0] == '.') || + (len == 2 && name[0] == '.' && name[1] == '.'))) { + printf("Readdir NFSv4 reply has dot or dotdot in it\n"); + return (true); + } + cp = name; + for (i = 0; i < len; i++, cp++) { + if (*cp == '/' || *cp == '\0') { + printf("Readdir reply file name had imbedded / or nul" + " byte\n"); + return (true); + } + } + return (false); +} + /* * Readdir rpc. * Always returns with either uio_resid unchanged, if you are at the @@ -3276,6 +3302,8 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, KASSERT(uiop->uio_iovcnt == 1 && (uiop->uio_resid & (DIRBLKSIZ - 1)) == 0, ("nfs readdirrpc bad uio")); + KASSERT(uiop->uio_segflg == UIO_SYSSPACE, + ("nfsrpc_readdir: uio userspace")); ncookie.lval[0] = ncookie.lval[1] = 0; /* * There is no point in reading a lot more than uio_resid, however @@ -3533,6 +3561,17 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, uiop->uio_resid) bigenough = 0; if (bigenough) { + struct iovec saviov; + off_t savoff; + ssize_t savresid; + int savblksiz; + + saviov.iov_base = uiop->uio_iov->iov_base; + saviov.iov_len = uiop->uio_iov->iov_len; + savoff = uiop->uio_offset; + savresid = uiop->uio_resid; + savblksiz = blksiz; + dp = (struct dirent *)uiop->uio_iov->iov_base; dp->d_pad0 = dp->d_pad1 = 0; dp->d_off = 0; @@ -3548,20 +3587,35 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, uiop->uio_iov->iov_base = (char *)uiop->uio_iov->iov_base + DIRHDSIZ; uiop->uio_iov->iov_len -= DIRHDSIZ; + cp = uiop->uio_iov->iov_base; error = nfsm_mbufuio(nd, uiop, len); if (error) goto nfsmout; - cp = uiop->uio_iov->iov_base; - tlen -= len; - NFSBZERO(cp, tlen); - cp += tlen; /* points to cookie storage */ - tl2 = (u_int32_t *)cp; - uiop->uio_iov->iov_base = - (char *)uiop->uio_iov->iov_base + tlen + - NFSX_HYPER; - uiop->uio_iov->iov_len -= tlen + NFSX_HYPER; - uiop->uio_resid -= tlen + NFSX_HYPER; - uiop->uio_offset += (tlen + NFSX_HYPER); + /* Check for an invalid file name. */ + if (nfscl_invalidfname( + (nd->nd_flag & ND_NFSV4) != 0, cp, len)) { + /* Skip over this entry. */ + uiop->uio_iov->iov_base = + saviov.iov_base; + uiop->uio_iov->iov_len = + saviov.iov_len; + uiop->uio_offset = savoff; + uiop->uio_resid = savresid; + blksiz = savblksiz; + } else { + cp = uiop->uio_iov->iov_base; + tlen -= len; + NFSBZERO(cp, tlen); + cp += tlen; /* points to cookie store */ + tl2 = (u_int32_t *)cp; + uiop->uio_iov->iov_base = + (char *)uiop->uio_iov->iov_base + + tlen + NFSX_HYPER; + uiop->uio_iov->iov_len -= tlen + + NFSX_HYPER; + uiop->uio_resid -= tlen + NFSX_HYPER; + uiop->uio_offset += (tlen + NFSX_HYPER); + } } else { error = nfsm_advance(nd, NFSM_RNDUP(len), -1); if (error) @@ -3727,6 +3781,8 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, KASSERT(uiop->uio_iovcnt == 1 && (uiop->uio_resid & (DIRBLKSIZ - 1)) == 0, ("nfs readdirplusrpc bad uio")); + KASSERT(uiop->uio_segflg == UIO_SYSSPACE, + ("nfsrpc_readdirplus: uio userspace")); ncookie.lval[0] = ncookie.lval[1] = 0; timespecclear(&dctime); *attrflagp = 0; @@ -3962,6 +4018,17 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, uiop->uio_resid) bigenough = 0; if (bigenough) { + struct iovec saviov; + off_t savoff; + ssize_t savresid; + int savblksiz; + + saviov.iov_base = uiop->uio_iov->iov_base; + saviov.iov_len = uiop->uio_iov->iov_len; + savoff = uiop->uio_offset; + savresid = uiop->uio_resid; + savblksiz = blksiz; + dp = (struct dirent *)uiop->uio_iov->iov_base; dp->d_pad0 = dp->d_pad1 = 0; dp->d_off = 0; @@ -3980,25 +4047,41 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, cnp->cn_nameptr = uiop->uio_iov->iov_base; cnp->cn_namelen = len; NFSCNHASHZERO(cnp); + cp = uiop->uio_iov->iov_base; error = nfsm_mbufuio(nd, uiop, len); if (error) goto nfsmout; - cp = uiop->uio_iov->iov_base; - tlen -= len; - NFSBZERO(cp, tlen); - cp += tlen; /* points to cookie storage */ - tl2 = (u_int32_t *)cp; - if (len == 2 && cnp->cn_nameptr[0] == '.' && - cnp->cn_nameptr[1] == '.') - isdotdot = 1; - else - isdotdot = 0; - uiop->uio_iov->iov_base = - (char *)uiop->uio_iov->iov_base + tlen + - NFSX_HYPER; - uiop->uio_iov->iov_len -= tlen + NFSX_HYPER; - uiop->uio_resid -= tlen + NFSX_HYPER; - uiop->uio_offset += (tlen + NFSX_HYPER); + /* Check for an invalid file name. */ + if (nfscl_invalidfname( + (nd->nd_flag & ND_NFSV4) != 0, cp, len)) { + /* Skip over this entry. */ + uiop->uio_iov->iov_base = + saviov.iov_base; + uiop->uio_iov->iov_len = + saviov.iov_len; + uiop->uio_offset = savoff; + uiop->uio_resid = savresid; + blksiz = savblksiz; + } else { + cp = uiop->uio_iov->iov_base; + tlen -= len; + NFSBZERO(cp, tlen); + cp += tlen; /* points to cookie store */ + tl2 = (u_int32_t *)cp; + if (len == 2 && + cnp->cn_nameptr[0] == '.' && + cnp->cn_nameptr[1] == '.') + isdotdot = 1; + else + isdotdot = 0; + uiop->uio_iov->iov_base = + (char *)uiop->uio_iov->iov_base + + tlen + NFSX_HYPER; + uiop->uio_iov->iov_len -= tlen + + NFSX_HYPER; + uiop->uio_resid -= tlen + NFSX_HYPER; + uiop->uio_offset += (tlen + NFSX_HYPER); + } } else { error = nfsm_advance(nd, NFSM_RNDUP(len), -1); if (error) From nobody Wed Aug 7 13:44:40 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 4WfBHY15NBz5S9L7; Wed, 07 Aug 2024 13:44:41 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHX6yw1z4jNB; Wed, 7 Aug 2024 13:44:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038281; 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=QNkqo+rlQiIscrkEtDheFl7zQvuyD+2BrXWoNiqIelo=; b=oCA2OKjSR5ahnK5fknNyzSCgwSc2yooGTSbCOCmbVELbV9lTYB6efsq2/UyApS8Mtee5mY lLUOoG+6ld9tyPIicoeRXgoHC+6Kv/jK0o3dvB7+fyJjU8gaVtKdxbspkH9460TraRx2Q2 ILpsVEWbkVciBcBwsap7v0BpIeKrX7uby5S5P0g6JNthEIZOBZcPNkwIvZ3dSlEzm8vUMb U7qiKM2fIn3mTBDW9MQw4RiaaiJZW683lkxHw04LQiPf7tKWyty2AVTu3zMmUwOokVv8hM 0s6KgRNsTu02GRjoR7HsCGAK5Xo8uJijTFi9Wp59QAcwrndgYQvmCT9gbJyK7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038281; a=rsa-sha256; cv=none; b=oXdA8SrlMeo7/ok2xaCVdxwyeu8c5UhbRdQQKrgh6TaDq450dhNikq3vOdUe32VfWAaqey ydyPCgJaSPetRpiAfXfvSBgjBZs6i4DvApRdSXZ6NCajsUeSf22Ol5iJhQPWgTEDhgX9gV zU68j6yzwuNHxOTDlpmsEl4cBXKveWpfdRloJlTOqgt/VUfPHm3jQlwtuZ5vzvGOC2Kl+o CTS/OZY/WhwJMSDozBw1QiDDaD8ZLsoOmwGT32YOHu9LgvIGk9158L+apuGsHF1tWg89RM NA9X7YI32TxDUOD+BrpgaC7kwXe4SjEQtcOz4f6xvNCs9rzpZAVGyewwcsOAVA== 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=1723038281; 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=QNkqo+rlQiIscrkEtDheFl7zQvuyD+2BrXWoNiqIelo=; b=WIaSKxWtB2fHWd1Uc2FXBHZD3NPdkB2hsn90nS/0oISTEpiRTwsEK8kz2sLcWOdJ3l21SE naXj+J9XSvgbONpZOtnshsYoVYvkLrawNlF1NLROMQSbemawPFPq0ErZyAiMbVQFWyffcv wqvXhT3dG6Zr4Qd0tBSakOcHrG4ZTk5qWUkYiqOauCoUyB8Aff7VEpVb8uZUjztfOwElt3 te2+b/ptBLCPfC7aFID6ISeJdw2ifmh5IrE9hZaWg6LkUcHLWw0Tw2eDeNzJJvC5cVj1ov MZPk6bgwICwoK4k1MQzS1pE869Z7oUEH4RCRElZ2m7phlE+LANi4qIL1ZIi5eQ== 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 4WfBHX6ZzmzsrZ; Wed, 7 Aug 2024 13:44:40 +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 477DieKO034063; Wed, 7 Aug 2024 13:44:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DiesM034060; Wed, 7 Aug 2024 13:44:40 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:40 GMT Message-Id: <202408071344.477DiesM034060@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: c4ade13d5498 - releng/14.0 - sshd: remove blacklist call from grace_alarm_timer 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: c4ade13d5498870de2cae09f5468aca0d73c126f Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c4ade13d5498870de2cae09f5468aca0d73c126f commit c4ade13d5498870de2cae09f5468aca0d73c126f Author: Ed Maste AuthorDate: 2024-08-01 00:04:46 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:25:50 +0000 sshd: remove blacklist call from grace_alarm_timer Under certain circumstances it may call log(3), which is not async- signal-safe. For now just remove the blacklist integration from this path, which means that blacklistd will not detect and firewall hosts that establish a connection but do nothing further. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46203 (cherry picked from commit 2739a6845031e69be7c03461a9335d8bbb9f59bd) (cherry picked from commit 3d3bae9b95388169d396adc8007585699c5a23e0) Approved by: so Security: FreeBSD-SA-24:08.openssh Security: CVE-2024-7589 (cherry picked from commit 73466449a9bf1888147c53d622236cebc0aa591b) --- crypto/openssh/sshd.c | 2 -- crypto/openssh/version.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/crypto/openssh/sshd.c b/crypto/openssh/sshd.c index cfdd61ec5747..79ec505fcfe7 100644 --- a/crypto/openssh/sshd.c +++ b/crypto/openssh/sshd.c @@ -377,8 +377,6 @@ grace_alarm_handler(int sig) kill(0, SIGTERM); } - BLACKLIST_NOTIFY(the_active_state, BLACKLIST_AUTH_FAIL, "ssh"); - /* Log error and exit. */ sigdie("Timeout before authentication for %s port %d", ssh_remote_ipaddr(the_active_state), diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h index 56d02fbe9c86..3dcb560362d3 100644 --- a/crypto/openssh/version.h +++ b/crypto/openssh/version.h @@ -5,4 +5,4 @@ #define SSH_PORTABLE "p1" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20240701" +#define SSH_VERSION_FREEBSD "FreeBSD-20240806" From nobody Wed Aug 7 13:44:41 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 4WfBHZ2kNwz5S9MB; Wed, 07 Aug 2024 13:44:42 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHZ0sqZz4jLP; Wed, 7 Aug 2024 13:44:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038282; 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=rn8slkN2SKVqeC3HSg+M5ZIl3DcsPWCixE/dgA7DQ/I=; b=C/dc3GZChkgulWvQRjVFPIVhz3drmohHmnlXbg2Zxa8uWSWZzYSgzWjxcRek0uj1R2XeK8 veESA9E25ynam0gPgrHYa9MyctuR6PQJMhf/xMftSxatitMKyC630grLcOF/hy/jWBhW8r DkniDmleRk5KMP7yoSEgHC76Vk4JYa8ZENQBDjg7lU9OOkckm86gINu30J2Wi4ZoQqCjkI YpQvPx+/sLY2k0nwGk6N9cOb/Z+D9rYpIKit9RaJ9Axu2Se0ipeYjBi7/ErtgcGkOItWAN WbMvDnvaH/0iQ1AlpTfSfQOV1WDSefORHYRsVcj9l1EiZeCq//wQf8rN5GLrUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038282; a=rsa-sha256; cv=none; b=Q8KEkwLV7DERUoaF8RPDGq/8It9EX5edZFLHkX29xhn+uj6QURGKwWQbr6QZEsQUfD3xcU GGJXnZdwt52IC1xvWwjisBqXMcjtjGrxOeHoBqgIePL4FD2ej0NYBbp8vFLfF9LSBdIVVI eYEo1tKesYcH6lZdR2t/Fb+0oYaLtpJ0JZ6Ghyvgqh1rYtLE6xiZDK3dzpJjv1iVZb750q hao8BNnKmQ4VGRzArWSOKVQHfUPr3rJ+vMwLQRDzaODy0INVe5LW/7dlhBtQJGDQOnJ/KH 8ap1FhqZZJryMoa5TA/oCGtJTpvaewXTP2htvr7sXP2v5kBWLzZ/gLDossSSCg== 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=1723038282; 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=rn8slkN2SKVqeC3HSg+M5ZIl3DcsPWCixE/dgA7DQ/I=; b=CZYTDyyiNeWnxnljW7Y/JjERd0wgvlSTzf0eq5gs5LIiBaA3kUdA9/nqFgZOzY2ebtb3mE LUuTbe74kGpU98/FpqGUkU2u09f1qfm3V4OJCXzB3Iyd9jmUZu3INmCXIWs8f0yKVG+3Vr wBIxRtQ+P1NJKC+SvuKNPm6PE1D6CiokHdT9ZiK/s/KVMUDUQPr1DSoSGIR+HGZcjDBPk3 pIyh3NWPXy1WtyotdmPDQiQtByA9AXOO6ajd9TMQGFOzh03/5M1J9xBmXWPr3Uad6MIVQH G3VaQUMOWaKexfF7hX1itrL+K9qQlTq7+Wkg0qASHVAYVD1eCPwTOrEaAeLECw== 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 4WfBHZ0Rf3zsV9; Wed, 7 Aug 2024 13:44:42 +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 477Difpv034107; Wed, 7 Aug 2024 13:44:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DifVo034104; Wed, 7 Aug 2024 13:44:41 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:41 GMT Message-Id: <202408071344.477DifVo034104@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: 01792dd7f27b - releng/14.0 - ifconfig: Fix default netmask calculation 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 01792dd7f27b3415e721f43f2d6e98df2346fd1f Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=01792dd7f27b3415e721f43f2d6e98df2346fd1f commit 01792dd7f27b3415e721f43f2d6e98df2346fd1f Author: Michael Gmelin AuthorDate: 2024-06-12 16:11:52 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:31:10 +0000 ifconfig: Fix default netmask calculation Approved by: so Security: FreeBSD-EN-24:14.ifconfig Reported by: phk Reviewed by: emaste, kp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45570 (cherry picked from commit 8a9f0fa42b1c6cffd45459bb552e138083b00369) (cherry picked from commit 048ad7a9ef9fe15368ff287db5c705c8163f4e1c) --- sbin/ifconfig/af_inet.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/ifconfig/af_inet.c b/sbin/ifconfig/af_inet.c index 83b605e8c4cb..8032c7035c95 100644 --- a/sbin/ifconfig/af_inet.c +++ b/sbin/ifconfig/af_inet.c @@ -445,7 +445,7 @@ in_exec_nl(if_ctx *ctx, unsigned long action, void *data) static void in_setdefaultmask_nl(void) { - struct in_px *px = sintab_nl[ADDR]; + struct in_px *px = sintab_nl[ADDR]; in_addr_t i = ntohl(px->addr.s_addr); @@ -456,11 +456,11 @@ in_setdefaultmask_nl(void) * we should return an error rather than warning. */ if (IN_CLASSA(i)) - px->plen = IN_CLASSA_NSHIFT; + px->plen = 32 - IN_CLASSA_NSHIFT; else if (IN_CLASSB(i)) - px->plen = IN_CLASSB_NSHIFT; + px->plen = 32 - IN_CLASSB_NSHIFT; else - px->plen = IN_CLASSC_NSHIFT; + px->plen = 32 - IN_CLASSC_NSHIFT; px->maskset = true; } #endif From nobody Wed Aug 7 13:44: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 4WfBHb3BcQz5S8tw; Wed, 07 Aug 2024 13:44: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHb1f6dz4jNk; Wed, 7 Aug 2024 13:44:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038283; 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=0VpDsVw9sNq/cvQpokIcKpHvYDS6SDwYCRArYfboxfk=; b=pytDIp9Y9tm8Cx/Yb3O2TAe8p0loXLvHAktkByHyQ4XpSq6RAhP4M7/cdkvTI6a58Slxux m3hsPnKgmqUXN+i1IYoRRiRMkDJl/wuN7hDGGnI7LdH5b3+n+tLeB5Gp/4gIDSx6lvhLyn eo49bBKj2t50p1o9T1KA1B/PO79IEKituPQrRzkZgDevbw/PUPIGh+3dpmOCJssiK6LWJ/ nTCJzyhpqixCN0ICIOku1jfQXrjyYvcIznp7iY8X8wrxizyJBZQTK0lZ3UcOZw4Jsj1jE1 h323yRJAdHt5I1jbB1NA68lJgnprQV6x4iSDatYdP+OhDgQD6hklzncLxgf2Cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038283; a=rsa-sha256; cv=none; b=Ddt6t3eUkeGCPXcumMyT7x6P187+YCAmqBwMCOudPCB4mJFjQD019MLZsLSJQNU1IDzE4m icpW11I6HqGRMy3ZC6iKOzOfYTIn9/nwGBTHHMb7xLAtlaXtI61gHSreesj2E/Zs9juPZX Mks0QepOXapJpqVcG3Y3AMI4whlFrDB6P3ZSfWJ33FZK3rrH9HjRhx4vd4R6zVDiZBcyyw i+Fuwvp8LXJpJPsTk+gGOyzYzO3zoPnjmJaNL3oOUFduSHhDq4eWwIpXp1pVZvMClnfNBK F7r8JHEaOwN9LG06BPCsUXMapN/AVHBL1QBiLASIt9gR7p5afCYP+jO13qVq5Q== 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=1723038283; 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=0VpDsVw9sNq/cvQpokIcKpHvYDS6SDwYCRArYfboxfk=; b=wxZhTRa39DCOLJ3qyUYQHNzLcU7uYyj3qWz2XH8Rrd5brA41hFSQcpjha9cR8/fmPYLoBi GXr+U5qXMjjWF1fsW9XjJyyx1/wdfv3ai8wz799q6GNhNCnoZghPcTU+qA6HN+BIPB2LM4 FUWKbjZY9kJYRY+F4pfI8/BecZUikOsn3HwKmEKpFnFgwNyET28hyMgClCEWCCUyi+80dV H9XWzniio29j1tnEYqCf4Bns5jEM6D0xbfBpMHop/427DRTnZTeZAtLhEqoSA16Lci6iov PvC/xNcpkuyDEuNilzGqLsYXQgs0sYBt2Xl7VOirOnzQuzybEC7+s7b21FT/9A== 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 4WfBHb1G9rzspK; Wed, 7 Aug 2024 13:44:43 +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 477DihEA034161; Wed, 7 Aug 2024 13:44:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477Dih1k034158; Wed, 7 Aug 2024 13:44:43 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:43 GMT Message-Id: <202408071344.477Dih1k034158@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: aac676988d91 - releng/14.0 - pf: stricter state checking for ICMP and ICMPv6 packets 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: aac676988d91aeb89b91fd00d4a5f4e23445fce6 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=aac676988d91aeb89b91fd00d4a5f4e23445fce6 commit aac676988d91aeb89b91fd00d4a5f4e23445fce6 Author: Kristof Provost AuthorDate: 2024-07-09 13:59:33 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:31:25 +0000 pf: stricter state checking for ICMP and ICMPv6 packets Include the ICMP type in one port of the state key, using the type to determine which side should be the id, and which should be the type. Also: - Handle ICMP6 messages which are typically sent to multicast addresses but recieve unicast replies, by doing fallthrough lookups against the correct multicast address. - Clear up some mistaken assumptions in the PF code: - Not all ICMP packets have an icmp_id, so simulate one based on other data if we can, otherwise set it to 0. - Don't modify the icmp id field in NAT unless it's echo - Use the full range of possible id's when NATing icmp6 echoy ok henning marco testing matthieu todd Approved by: so Security: FreeBSD-SA-24:05.pf Security: CVE-2024-6640 MFC after: 1 day Obtained From: OpenBSD, mcbride 70bf7555ef4c Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 534ee17e61ee094ec175703bc50e88ff6587703e) (cherry picked from commit 2f6b4611b5b847aee1ff8d5017a0f8a657f4101d) --- sys/netpfil/pf/pf.c | 381 ++++++++++++++++++++++++++++++++++++++----------- sys/netpfil/pf/pf_lb.c | 19 ++- 2 files changed, 317 insertions(+), 83 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index eab79387e867..0491cd7369f5 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -260,6 +260,8 @@ static void pf_change_ap(struct mbuf *, struct pf_addr *, u_int16_t *, u_int16_t, u_int8_t, sa_family_t); static int pf_modulate_sack(struct mbuf *, int, struct pf_pdesc *, struct tcphdr *, struct pf_state_peer *); +int pf_icmp_mapping(struct pf_pdesc *, u_int8_t, int *, + int *, u_int16_t *, u_int16_t *); static void pf_change_icmp(struct pf_addr *, u_int16_t *, struct pf_addr *, struct pf_addr *, u_int16_t, u_int16_t *, u_int16_t *, u_int16_t *, @@ -304,6 +306,10 @@ static int pf_test_state_tcp(struct pf_kstate **, static int pf_test_state_udp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *); +int pf_icmp_state_lookup(struct pf_state_key_cmp *, + struct pf_pdesc *, struct pf_kstate **, struct mbuf *, + int, struct pfi_kkif *, u_int16_t, u_int16_t, + int, int *, int); static int pf_test_state_icmp(struct pf_kstate **, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); @@ -353,6 +359,8 @@ extern struct proc *pf_purge_proc; VNET_DEFINE(struct pf_limit, pf_limits[PF_LIMIT_MAX]); +enum { PF_ICMP_MULTI_NONE, PF_ICMP_MULTI_SOLICITED, PF_ICMP_MULTI_LINK }; + #define PACKET_UNDO_NAT(_m, _pd, _off, _s) \ do { \ struct pf_state_key *nk; \ @@ -1695,6 +1703,142 @@ pf_isforlocal(struct mbuf *m, int af) return (false); } +int +pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, + int *icmp_dir, int *multi, u_int16_t *icmpid, u_int16_t *icmptype) +{ + /* + * ICMP types marked with PF_OUT are typically responses to + * PF_IN, and will match states in the opposite direction. + * PF_IN ICMP types need to match a state with that type. + */ + *icmp_dir = PF_OUT; + *multi = PF_ICMP_MULTI_LINK; + /* Queries (and responses) */ + switch (type) { + case ICMP_ECHO: + *icmp_dir = PF_IN; + case ICMP_ECHOREPLY: + *icmptype = ICMP_ECHO; + *icmpid = pd->hdr.icmp.icmp_id; + break; + + case ICMP_TSTAMP: + *icmp_dir = PF_IN; + case ICMP_TSTAMPREPLY: + *icmptype = ICMP_TSTAMP; + *icmpid = 0; /* Time is not a secret. */ + break; + + case ICMP_IREQ: + *icmp_dir = PF_IN; + case ICMP_IREQREPLY: + *icmptype = ICMP_IREQ; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_MASKREQ: + *icmp_dir = PF_IN; + case ICMP_MASKREPLY: + *icmptype = ICMP_MASKREQ; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_IPV6_WHEREAREYOU: + *icmp_dir = PF_IN; + case ICMP_IPV6_IAMHERE: + *icmptype = ICMP_IPV6_WHEREAREYOU; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_MOBILE_REGREQUEST: + *icmp_dir = PF_IN; + case ICMP_MOBILE_REGREPLY: + *icmptype = ICMP_MOBILE_REGREQUEST; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_ROUTERSOLICIT: + *icmp_dir = PF_IN; + case ICMP_ROUTERADVERT: + *icmptype = ICMP_ROUTERSOLICIT; + *icmpid = 0; /* Nothing sane to match on! */ + break; + +#ifdef INET6 + case ICMP6_ECHO_REQUEST: + *icmp_dir = PF_IN; + case ICMP6_ECHO_REPLY: + *icmptype = ICMP6_ECHO_REQUEST; + *icmpid = pd->hdr.icmp6.icmp6_id; + break; + + case MLD_LISTENER_QUERY: + *icmp_dir = PF_IN; + case MLD_LISTENER_REPORT: { + *icmptype = MLD_LISTENER_QUERY; + *icmpid = 0; + break; + } + + /* ICMP6_FQDN and ICMP6_NI query/reply are the same type as ICMP6_WRU */ + case ICMP6_WRUREQUEST: + *icmp_dir = PF_IN; + case ICMP6_WRUREPLY: + *icmptype = ICMP6_WRUREQUEST; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case MLD_MTRACE: + *icmp_dir = PF_IN; + case MLD_MTRACE_RESP: + *icmptype = MLD_MTRACE; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ND_NEIGHBOR_SOLICIT: + *icmp_dir = PF_IN; + case ND_NEIGHBOR_ADVERT: { + *icmptype = ND_NEIGHBOR_SOLICIT; + *multi = PF_ICMP_MULTI_SOLICITED; + *icmpid = 0; + break; + } + +#endif /* INET6 */ + /* These ICMP types map to other connections */ + case ICMP_UNREACH: + case ICMP_SOURCEQUENCH: + case ICMP_REDIRECT: + case ICMP_TIMXCEED: + case ICMP_PARAMPROB: +#ifdef INET6 + /* + * ICMP6_TIME_EXCEEDED is the same type as ICMP_UNREACH + * ND_REDIRECT can't be in this list because the triggering packet + * header is optional. + */ + case ICMP6_PACKET_TOO_BIG: +#endif /* INET6 */ + /* These will not be used, but set them anyways */ + *icmp_dir = PF_IN; + *icmptype = htons(type); + *icmpid = 0; + return (1); /* These types are matched to other state */ + /* + * All remaining ICMP types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *icmptype = type; + *icmpid = 0; + break; + } + HTONS(*icmptype); + return (0); +} + void pf_intr(void *v) { @@ -4353,8 +4497,8 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, int tag = -1; int asd = 0; int match = 0; - int state_icmp = 0; - u_int16_t sport = 0, dport = 0; + int state_icmp = 0, icmp_dir, multi; + u_int16_t sport = 0, dport = 0, virtual_type, virtual_id; u_int16_t bproto_sum = 0, bip_sum = 0; u_int8_t icmptype = 0, icmpcode = 0; struct pf_kanchor_stackframe anchor_stack[PF_ANCHOR_STACKSIZE]; @@ -4388,33 +4532,37 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, case IPPROTO_ICMP: if (pd->af != AF_INET) break; - sport = dport = pd->hdr.icmp.icmp_id; hdrlen = sizeof(pd->hdr.icmp); icmptype = pd->hdr.icmp.icmp_type; icmpcode = pd->hdr.icmp.icmp_code; - - if (icmptype == ICMP_UNREACH || - icmptype == ICMP_SOURCEQUENCH || - icmptype == ICMP_REDIRECT || - icmptype == ICMP_TIMXCEED || - icmptype == ICMP_PARAMPROB) - state_icmp++; + state_icmp = pf_icmp_mapping(pd, icmptype, + &icmp_dir, &multi, &virtual_id, &virtual_type); + if (icmp_dir == PF_IN) { + sport = virtual_id; + dport = virtual_type; + } else { + sport = virtual_type; + dport = virtual_id; + } break; #endif /* INET */ #ifdef INET6 case IPPROTO_ICMPV6: if (af != AF_INET6) break; - sport = dport = pd->hdr.icmp6.icmp6_id; hdrlen = sizeof(pd->hdr.icmp6); icmptype = pd->hdr.icmp6.icmp6_type; icmpcode = pd->hdr.icmp6.icmp6_code; + state_icmp = pf_icmp_mapping(pd, icmptype, + &icmp_dir, &multi, &virtual_id, &virtual_type); + if (icmp_dir == PF_IN) { + sport = virtual_id; + dport = virtual_type; + } else { + sport = virtual_type; + dport = virtual_id; + } - if (icmptype == ICMP6_DST_UNREACH || - icmptype == ICMP6_PACKET_TOO_BIG || - icmptype == ICMP6_TIME_EXCEEDED || - icmptype == ICMP6_PARAM_PROB) - state_icmp++; break; #endif /* INET6 */ default: @@ -4508,7 +4656,6 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, } #ifdef INET case IPPROTO_ICMP: - nk->port[0] = nk->port[1]; if (PF_ANEQ(saddr, &nk->addr[pd->sidx], AF_INET)) pf_change_a(&saddr->v4.s_addr, pd->ip_sum, nk->addr[pd->sidx].v4.s_addr, 0); @@ -4517,11 +4664,12 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, pf_change_a(&daddr->v4.s_addr, pd->ip_sum, nk->addr[pd->didx].v4.s_addr, 0); - if (nk->port[1] != pd->hdr.icmp.icmp_id) { + if (virtual_type == ICMP_ECHO && + nk->port[pd->sidx] != pd->hdr.icmp.icmp_id) { pd->hdr.icmp.icmp_cksum = pf_cksum_fixup( pd->hdr.icmp.icmp_cksum, sport, - nk->port[1], 0); - pd->hdr.icmp.icmp_id = nk->port[1]; + nk->port[pd->sidx], 0); + pd->hdr.icmp.icmp_id = nk->port[pd->sidx]; pd->sport = &pd->hdr.icmp.icmp_id; } m_copyback(m, off, ICMP_MINLEN, (caddr_t)&pd->hdr.icmp); @@ -4529,7 +4677,6 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, #endif /* INET */ #ifdef INET6 case IPPROTO_ICMPV6: - nk->port[0] = nk->port[1]; if (PF_ANEQ(saddr, &nk->addr[pd->sidx], AF_INET6)) pf_change_a6(saddr, &pd->hdr.icmp6.icmp6_cksum, &nk->addr[pd->sidx], 0); @@ -5911,15 +6058,73 @@ pf_test_state_sctp(struct pf_kstate **state, struct pfi_kkif *kif, return (PF_PASS); } +int +pf_icmp_state_lookup(struct pf_state_key_cmp *key, struct pf_pdesc *pd, + struct pf_kstate **state, struct mbuf *m, int direction, struct pfi_kkif *kif, + u_int16_t icmpid, u_int16_t type, int icmp_dir, int *iidx, int multi) +{ + key->af = pd->af; + key->proto = pd->proto; + if (icmp_dir == PF_IN) { + *iidx = pd->sidx; + key->port[pd->sidx] = icmpid; + key->port[pd->didx] = type; + } else { + *iidx = pd->didx; + key->port[pd->sidx] = type; + key->port[pd->didx] = icmpid; + } + if (pd->af == AF_INET6 && multi != PF_ICMP_MULTI_NONE) { + switch (multi) { + case PF_ICMP_MULTI_SOLICITED: + key->addr[pd->sidx].addr32[0] = IPV6_ADDR_INT32_MLL; + key->addr[pd->sidx].addr32[1] = 0; + key->addr[pd->sidx].addr32[2] = IPV6_ADDR_INT32_ONE; + key->addr[pd->sidx].addr32[3] = pd->src->addr32[3]; + key->addr[pd->sidx].addr8[12] = 0xff; + break; + case PF_ICMP_MULTI_LINK: + key->addr[pd->sidx].addr32[0] = IPV6_ADDR_INT32_MLL; + key->addr[pd->sidx].addr32[1] = 0; + key->addr[pd->sidx].addr32[2] = 0; + key->addr[pd->sidx].addr32[3] = IPV6_ADDR_INT32_ONE; + break; + } + } else + PF_ACPY(&key->addr[pd->sidx], pd->src, key->af); + PF_ACPY(&key->addr[pd->didx], pd->dst, key->af); + + STATE_LOOKUP(kif, key, *state, pd); + + /* Is this ICMP message flowing in right direction? */ + if ((*state)->rule.ptr->type && + (((*state)->direction == direction) ? + PF_IN : PF_OUT) != icmp_dir) { + if (V_pf_status.debug >= PF_DEBUG_MISC) { + printf("pf: icmp type %d in wrong direction (%d): ", + icmp_dir, pd->dir); + pf_print_state(*state); + printf("\n"); + } + return (PF_DROP); + } + return (-1); +} + static int pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, struct mbuf *m, int off, void *h, struct pf_pdesc *pd, u_short *reason) { struct pf_addr *saddr = pd->src, *daddr = pd->dst; - u_int16_t icmpid = 0, *icmpsum; + u_int16_t *icmpsum, virtual_id, virtual_type; u_int8_t icmptype, icmpcode; - int state_icmp = 0; + int icmp_dir, iidx, ret, multi; struct pf_state_key_cmp key; +#ifdef INET + u_int16_t icmpid; +#endif + + MPASS(*state == NULL); bzero(&key, sizeof(key)); switch (pd->proto) { @@ -5929,49 +6134,43 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, icmpcode = pd->hdr.icmp.icmp_code; icmpid = pd->hdr.icmp.icmp_id; icmpsum = &pd->hdr.icmp.icmp_cksum; - - if (icmptype == ICMP_UNREACH || - icmptype == ICMP_SOURCEQUENCH || - icmptype == ICMP_REDIRECT || - icmptype == ICMP_TIMXCEED || - icmptype == ICMP_PARAMPROB) - state_icmp++; break; #endif /* INET */ #ifdef INET6 case IPPROTO_ICMPV6: icmptype = pd->hdr.icmp6.icmp6_type; icmpcode = pd->hdr.icmp6.icmp6_code; +#ifdef INET icmpid = pd->hdr.icmp6.icmp6_id; +#endif icmpsum = &pd->hdr.icmp6.icmp6_cksum; - - if (icmptype == ICMP6_DST_UNREACH || - icmptype == ICMP6_PACKET_TOO_BIG || - icmptype == ICMP6_TIME_EXCEEDED || - icmptype == ICMP6_PARAM_PROB) - state_icmp++; break; #endif /* INET6 */ } - if (!state_icmp) { + if (pf_icmp_mapping(pd, icmptype, &icmp_dir, &multi, + &virtual_id, &virtual_type) == 0) { /* * ICMP query/reply message not related to a TCP/UDP packet. * Search for an ICMP state. */ - key.af = pd->af; - key.proto = pd->proto; - key.port[0] = key.port[1] = icmpid; - if (pd->dir == PF_IN) { /* wire side, straight */ - PF_ACPY(&key.addr[0], pd->src, key.af); - PF_ACPY(&key.addr[1], pd->dst, key.af); - } else { /* stack side, reverse */ - PF_ACPY(&key.addr[1], pd->src, key.af); - PF_ACPY(&key.addr[0], pd->dst, key.af); + ret = pf_icmp_state_lookup(&key, pd, state, m, pd->dir, + kif, virtual_id, virtual_type, icmp_dir, &iidx, + PF_ICMP_MULTI_NONE); + if (ret >= 0) { + if (ret == PF_DROP && pd->af == AF_INET6 && + icmp_dir == PF_OUT) { + if (*state != NULL) + PF_STATE_UNLOCK((*state)); + ret = pf_icmp_state_lookup(&key, pd, state, m, + pd->dir, kif, virtual_id, virtual_type, + icmp_dir, &iidx, multi); + if (ret >= 0) + return (ret); + } else + return (ret); } - STATE_LOOKUP(kif, &key, *state, pd); - (*state)->expire = time_uptime; (*state)->timeout = PFTM_ICMP_ERROR_REPLY; @@ -5994,14 +6193,14 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, pd->ip_sum, nk->addr[pd->didx].v4.s_addr, 0); - if (nk->port[0] != + if (nk->port[iidx] != pd->hdr.icmp.icmp_id) { pd->hdr.icmp.icmp_cksum = pf_cksum_fixup( pd->hdr.icmp.icmp_cksum, icmpid, - nk->port[pd->sidx], 0); + nk->port[iidx], 0); pd->hdr.icmp.icmp_id = - nk->port[pd->sidx]; + nk->port[iidx]; } m_copyback(m, off, ICMP_MINLEN, @@ -6366,13 +6565,15 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, return (PF_DROP); } - key.af = pd2.af; - key.proto = IPPROTO_ICMP; - PF_ACPY(&key.addr[pd2.sidx], pd2.src, key.af); - PF_ACPY(&key.addr[pd2.didx], pd2.dst, key.af); - key.port[0] = key.port[1] = iih.icmp_id; + icmpid = iih.icmp_id; + pf_icmp_mapping(&pd2, iih.icmp_type, + &icmp_dir, &multi, &virtual_id, &virtual_type); - STATE_LOOKUP(kif, &key, *state, pd); + ret = pf_icmp_state_lookup(&key, &pd2, state, m, + pd->dir, kif, virtual_id, virtual_type, + icmp_dir, &iidx, PF_ICMP_MULTI_NONE); + if (ret >= 0) + return (ret); /* translate source/destination address, if necessary */ if ((*state)->key[PF_SK_WIRE] != @@ -6382,21 +6583,23 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - nk->port[pd2.sidx] != iih.icmp_id) - pf_change_icmp(pd2.src, &iih.icmp_id, + (virtual_type == ICMP_ECHO && + nk->port[iidx] != iih.icmp_id)) + pf_change_icmp(pd2.src, + (virtual_type == ICMP_ECHO) ? + &iih.icmp_id : NULL, daddr, &nk->addr[pd2.sidx], - nk->port[pd2.sidx], NULL, + (virtual_type == ICMP_ECHO) ? + nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET); if (PF_ANEQ(pd2.dst, - &nk->addr[pd2.didx], pd2.af) || - nk->port[pd2.didx] != iih.icmp_id) - pf_change_icmp(pd2.dst, &iih.icmp_id, - saddr, &nk->addr[pd2.didx], - nk->port[pd2.didx], NULL, - pd2.ip_sum, icmpsum, - pd->ip_sum, 0, AF_INET); + &nk->addr[pd2.didx], pd2.af)) + pf_change_icmp(pd2.dst, NULL, NULL, + &nk->addr[pd2.didx], 0, NULL, + pd2.ip_sum, icmpsum, pd->ip_sum, 0, + AF_INET); m_copyback(m, off, ICMP_MINLEN, (caddr_t)&pd->hdr.icmp); m_copyback(m, ipoff2, sizeof(h2), (caddr_t)&h2); @@ -6418,13 +6621,25 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, return (PF_DROP); } - key.af = pd2.af; - key.proto = IPPROTO_ICMPV6; - PF_ACPY(&key.addr[pd2.sidx], pd2.src, key.af); - PF_ACPY(&key.addr[pd2.didx], pd2.dst, key.af); - key.port[0] = key.port[1] = iih.icmp6_id; - - STATE_LOOKUP(kif, &key, *state, pd); + pf_icmp_mapping(&pd2, iih.icmp6_type, + &icmp_dir, &multi, &virtual_id, &virtual_type); + ret = pf_icmp_state_lookup(&key, &pd2, state, m, + pd->dir, kif, virtual_id, virtual_type, + icmp_dir, &iidx, PF_ICMP_MULTI_NONE); + if (ret >= 0) { + if (ret == PF_DROP && pd->af == AF_INET6 && + icmp_dir == PF_OUT) { + if (*state != NULL) + PF_STATE_UNLOCK((*state)); + ret = pf_icmp_state_lookup(&key, pd, + state, m, pd->dir, kif, + virtual_id, virtual_type, + icmp_dir, &iidx, multi); + if (ret >= 0) + return (ret); + } else + return (ret); + } /* translate source/destination address, if necessary */ if ((*state)->key[PF_SK_WIRE] != @@ -6434,19 +6649,21 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - nk->port[pd2.sidx] != iih.icmp6_id) - pf_change_icmp(pd2.src, &iih.icmp6_id, + ((virtual_type == ICMP6_ECHO_REQUEST) && + nk->port[pd2.sidx] != iih.icmp6_id)) + pf_change_icmp(pd2.src, + (virtual_type == ICMP6_ECHO_REQUEST) + ? &iih.icmp6_id : NULL, daddr, &nk->addr[pd2.sidx], - nk->port[pd2.sidx], NULL, + (virtual_type == ICMP6_ECHO_REQUEST) + ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET6); if (PF_ANEQ(pd2.dst, - &nk->addr[pd2.didx], pd2.af) || - nk->port[pd2.didx] != iih.icmp6_id) - pf_change_icmp(pd2.dst, &iih.icmp6_id, - saddr, &nk->addr[pd2.didx], - nk->port[pd2.didx], NULL, + &nk->addr[pd2.didx], pd2.af)) + pf_change_icmp(pd2.dst, NULL, NULL, + &nk->addr[pd2.didx], 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET6); diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index eb3d087e3df6..4fcad7e578a8 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -225,6 +225,23 @@ pf_get_sport(sa_family_t af, u_int8_t proto, struct pf_krule *r, if (pf_map_addr(af, r, saddr, naddr, NULL, &init_addr, sn)) return (1); + if (proto == IPPROTO_ICMP) { + if (*nport == htons(ICMP_ECHO)) { + low = 1; + high = 65535; + } else + return (0); /* Don't try to modify non-echo ICMP */ + } +#ifdef INET6 + if (proto == IPPROTO_ICMPV6) { + if (*nport == htons(ICMP6_ECHO_REQUEST)) { + low = 1; + high = 65535; + } else + return (0); /* Don't try to modify non-echo ICMP */ + } +#endif /* INET6 */ + bzero(&key, sizeof(key)); key.af = af; key.proto = proto; @@ -633,7 +650,7 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, switch (r->action) { case PF_NAT: if (pd->proto == IPPROTO_ICMP) { - low = 1; + low = 1; high = 65535; } else { low = r->rpool.proxy_port[0]; From nobody Wed Aug 7 13:44:45 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 4WfBHd5GzPz5S9MG; Wed, 07 Aug 2024 13:44:45 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHd3Frpz4jRw; Wed, 7 Aug 2024 13:44:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038285; 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=FlxyrXYDtYH1MLdw6wSH10ycWcPQUYkUfjBG8HQd3l4=; b=N0+KcR34UtKSJdf3dsw7LZLsyi4sFcHrbAbalTYhCZ/Mr3Q2Sa6D2lbojjWwqL20cB7RLi I/cpfEPGUexgn5WPEb1/crImIFBo+VuZJD0XghnbsOczuSUyJBDplaybdIpq7Zm6b7A/6T LcPhX0eQjKZDfUz1E0y+I4JvtZARdxLjQEuCv+8NGFaG45wi7TRnvFv5Mhpi1chEkhOtGj ppOtYKZx6fV8Ve3Cj837KisWq862TGXmUGZuVp7CtUP9Kq5+/0eNVQZkJt1hp85KXti6Lb zb9O9pnVmE4BbfP+HZv+goWL69sZKtPFGO+hZcUx99JswAkqjiwnqaukAIlj7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038285; a=rsa-sha256; cv=none; b=RSV61dkXlMRv7R2JKm5Y0XZI7B0oklUJ8citHphqMiEi57NVTHiEbdYQcZfZnsPl2F7H5t 6VKPIoOR08ca3kAtnOwl91BLnD0gymgDGVtYguJLceEqtNh6R3RJrVE4LN8zCx2qb+udzf 9pL6ei5SeTpIMiSsPYM2q9Ilq7yjkSV2RCHM4rFcQz2RkdUDxLqtu2YOSOyC9ymLlIkptL LQAn5gohVH90gdVNJclu8EB+0Ux3WS+TRSto/yem/bI0NktsU0TSGwABTECOr/z24j+ONO 77sTqJ/+MoBEXB6z0CVzOYLS1od25gczKgOjSC6ZC3RYwWrzRxK1dGpfzTPIyA== 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=1723038285; 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=FlxyrXYDtYH1MLdw6wSH10ycWcPQUYkUfjBG8HQd3l4=; b=cipqLAK2zjYFSN5pvpbwE/dEe2pavgaXazLxdnh7Ok+uIKF+7RtnWd8XH9oe9JM96PpZrV 8mskeHPijngeARzL0jqjgQGG06cN7TxlQDHEPcOiNLIZ26wbgXnsH1+O0OD1CfuuVhvqR5 YhadWTroSrgOOdwlWBiOJtQ4INz0xEhYyaA5SeACiAy+ecrCLdxIP1doZgBqbtKBGfkSbh 2taVjke8wpXzZCfunKpsiLtRjmarQY6bYblajt/OOnPHvDAXLyYl6yxFG5HsofCX0dMQAg 4COLuLo8MKaMTut+if4HWohVxEP5/4/ZTNujohkWbmFJqan4679T15yztb+qAg== 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 4WfBHd2t82zsmP; Wed, 7 Aug 2024 13:44:45 +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 477DijSS034276; Wed, 7 Aug 2024 13:44:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DijpO034272; Wed, 7 Aug 2024 13:44:45 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:45 GMT Message-Id: <202408071344.477DijpO034272@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: 110142ab3846 - releng/14.0 - pf: split ICMP/ICMPv6 number space in pf_icmp_mapping() 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 110142ab3846fdf2fad18acc06e3d041bf3df0f3 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=110142ab3846fdf2fad18acc06e3d041bf3df0f3 commit 110142ab3846fdf2fad18acc06e3d041bf3df0f3 Author: Kristof Provost AuthorDate: 2024-07-10 12:10:50 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:31:30 +0000 pf: split ICMP/ICMPv6 number space in pf_icmp_mapping() In pf_icmp_mapping() the ICMP and ICMPv6 types shared the same number space. In fact they are independent and must be handled separately. Fix traceroute via pf by splitting pf_icmp_mapping() into IPv4 and IPv6 sections. ok henning@ mcbride@; tested mcbride@; sure deraadt@ Approved by: so Security: FreeBSD-SA-24:05.pf Security: CVE-2024-6640 MFC after: 1 day Obtained From: OpenBSD, bluhm ef4bccd7509e Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 46755f52247bd34a7f013d6844ed0c673ac0defc) (cherry picked from commit 7f77305a5ba421f901cf3ac59a6449a70645fda4) --- sys/netpfil/pf/pf.c | 247 ++++++++++++++++++++++++++++------------------------ 1 file changed, 135 insertions(+), 112 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 71611acde2c7..72814861f35f 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1705,7 +1705,7 @@ pf_isforlocal(struct mbuf *m, int af) int pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, - int *icmp_dir, int *multi, u_int16_t *icmpid, u_int16_t *icmptype) + int *icmp_dir, int *multi, u_int16_t *virtual_id, u_int16_t *virtual_type) { /* * ICMP types marked with PF_OUT are typically responses to @@ -1715,128 +1715,151 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, *icmp_dir = PF_OUT; *multi = PF_ICMP_MULTI_LINK; /* Queries (and responses) */ - switch (type) { - case ICMP_ECHO: - *icmp_dir = PF_IN; - case ICMP_ECHOREPLY: - *icmptype = ICMP_ECHO; - *icmpid = pd->hdr.icmp.icmp_id; - break; + switch (pd->af) { +#ifdef INET + case AF_INET: + switch (type) { + case ICMP_ECHO: + *icmp_dir = PF_IN; + case ICMP_ECHOREPLY: + *virtual_type = ICMP_ECHO; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_TSTAMP: - *icmp_dir = PF_IN; - case ICMP_TSTAMPREPLY: - *icmptype = ICMP_TSTAMP; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_TSTAMP: + *icmp_dir = PF_IN; + case ICMP_TSTAMPREPLY: + *virtual_type = ICMP_TSTAMP; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_IREQ: - *icmp_dir = PF_IN; - case ICMP_IREQREPLY: - *icmptype = ICMP_IREQ; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_IREQ: + *icmp_dir = PF_IN; + case ICMP_IREQREPLY: + *virtual_type = ICMP_IREQ; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_MASKREQ: - *icmp_dir = PF_IN; - case ICMP_MASKREPLY: - *icmptype = ICMP_MASKREQ; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_MASKREQ: + *icmp_dir = PF_IN; + case ICMP_MASKREPLY: + *virtual_type = ICMP_MASKREQ; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_IPV6_WHEREAREYOU: - *icmp_dir = PF_IN; - case ICMP_IPV6_IAMHERE: - *icmptype = ICMP_IPV6_WHEREAREYOU; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_IPV6_WHEREAREYOU: + *icmp_dir = PF_IN; + case ICMP_IPV6_IAMHERE: + *virtual_type = ICMP_IPV6_WHEREAREYOU; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case ICMP_MOBILE_REGREQUEST: - *icmp_dir = PF_IN; - case ICMP_MOBILE_REGREPLY: - *icmptype = ICMP_MOBILE_REGREQUEST; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_MOBILE_REGREQUEST: + *icmp_dir = PF_IN; + case ICMP_MOBILE_REGREPLY: + *virtual_type = ICMP_MOBILE_REGREQUEST; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case ICMP_ROUTERSOLICIT: - *icmp_dir = PF_IN; - case ICMP_ROUTERADVERT: - *icmptype = ICMP_ROUTERSOLICIT; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_ROUTERSOLICIT: + *icmp_dir = PF_IN; + case ICMP_ROUTERADVERT: + *virtual_type = ICMP_ROUTERSOLICIT; + *virtual_id = 0; /* Nothing sane to match on! */ + break; -#ifdef INET6 - case ICMP6_ECHO_REQUEST: - *icmp_dir = PF_IN; - case ICMP6_ECHO_REPLY: - *icmptype = ICMP6_ECHO_REQUEST; - *icmpid = pd->hdr.icmp6.icmp6_id; - break; + /* These ICMP types map to other connections */ + case ICMP_UNREACH: + case ICMP_SOURCEQUENCH: + case ICMP_REDIRECT: + case ICMP_TIMXCEED: + case ICMP_PARAMPROB: + /* These will not be used, but set them anyway */ + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + HTONS(*virtual_type); + return (1); /* These types match to another state */ - case MLD_LISTENER_QUERY: - *icmp_dir = PF_IN; - case MLD_LISTENER_REPORT: { - *icmptype = MLD_LISTENER_QUERY; - *icmpid = 0; + /* + * All remaining ICMP types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + break; + } break; - } +#endif /* INET */ +#ifdef INET6 + case AF_INET6: + switch (type) { + case ICMP6_ECHO_REQUEST: + *icmp_dir = PF_IN; + case ICMP6_ECHO_REPLY: + *virtual_type = ICMP6_ECHO_REQUEST; + *virtual_id = pd->hdr.icmp6.icmp6_id; + break; - /* ICMP6_FQDN and ICMP6_NI query/reply are the same type as ICMP6_WRU */ - case ICMP6_WRUREQUEST: - *icmp_dir = PF_IN; - case ICMP6_WRUREPLY: - *icmptype = ICMP6_WRUREQUEST; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case MLD_LISTENER_QUERY: + *icmp_dir = PF_IN; + case MLD_LISTENER_REPORT: { + *virtual_type = MLD_LISTENER_QUERY; + *virtual_id = 0; + break; + } + case MLD_MTRACE: + *icmp_dir = PF_IN; + case MLD_MTRACE_RESP: + *virtual_type = MLD_MTRACE; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case MLD_MTRACE: - *icmp_dir = PF_IN; - case MLD_MTRACE_RESP: - *icmptype = MLD_MTRACE; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ND_NEIGHBOR_SOLICIT: + *icmp_dir = PF_IN; + case ND_NEIGHBOR_ADVERT: { + *virtual_type = ND_NEIGHBOR_SOLICIT; + *virtual_id = 0; + break; + } - case ND_NEIGHBOR_SOLICIT: - *icmp_dir = PF_IN; - case ND_NEIGHBOR_ADVERT: { - *icmptype = ND_NEIGHBOR_SOLICIT; - *multi = PF_ICMP_MULTI_SOLICITED; - *icmpid = 0; + /* + * These ICMP types map to other connections. + * ND_REDIRECT can't be in this list because the triggering + * packet header is optional. + */ + case ICMP6_DST_UNREACH: + case ICMP6_PACKET_TOO_BIG: + case ICMP6_TIME_EXCEEDED: + case ICMP6_PARAM_PROB: + /* These will not be used, but set them anyway */ + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + HTONS(*virtual_type); + return (1); /* These types match to another state */ + /* + * All remaining ICMP6 types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + break; + } break; - } - #endif /* INET6 */ - /* These ICMP types map to other connections */ - case ICMP_UNREACH: - case ICMP_SOURCEQUENCH: - case ICMP_REDIRECT: - case ICMP_TIMXCEED: - case ICMP_PARAMPROB: -#ifdef INET6 - /* - * ICMP6_TIME_EXCEEDED is the same type as ICMP_UNREACH - * ND_REDIRECT can't be in this list because the triggering packet - * header is optional. - */ - case ICMP6_PACKET_TOO_BIG: -#endif /* INET6 */ - /* These will not be used, but set them anyways */ - *icmp_dir = PF_IN; - *icmptype = htons(type); - *icmpid = 0; - return (1); /* These types are matched to other state */ - /* - * All remaining ICMP types get their own states, - * and will only match in one direction. - */ default: *icmp_dir = PF_IN; - *icmptype = type; - *icmpid = 0; + *virtual_type = type; + *virtual_id = 0; break; } - HTONS(*icmptype); - return (0); + HTONS(*virtual_type); + return (0); /* These types match to their own state */ } void @@ -4664,7 +4687,7 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, struct pfi_kkif *kif, pf_change_a(&daddr->v4.s_addr, pd->ip_sum, nk->addr[pd->didx].v4.s_addr, 0); - if (virtual_type == ICMP_ECHO && + if (virtual_type == htons(ICMP_ECHO) && nk->port[pd->sidx] != pd->hdr.icmp.icmp_id) { pd->hdr.icmp.icmp_cksum = pf_cksum_fixup( pd->hdr.icmp.icmp_cksum, sport, @@ -6583,13 +6606,13 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - (virtual_type == ICMP_ECHO && + (virtual_type == htons(ICMP_ECHO) && nk->port[iidx] != iih.icmp_id)) pf_change_icmp(pd2.src, - (virtual_type == ICMP_ECHO) ? + (virtual_type == htons(ICMP_ECHO)) ? &iih.icmp_id : NULL, daddr, &nk->addr[pd2.sidx], - (virtual_type == ICMP_ECHO) ? + (virtual_type == htons(ICMP_ECHO)) ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET); @@ -6649,13 +6672,13 @@ pf_test_state_icmp(struct pf_kstate **state, struct pfi_kkif *kif, if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - ((virtual_type == ICMP6_ECHO_REQUEST) && + ((virtual_type == htons(ICMP6_ECHO_REQUEST)) && nk->port[pd2.sidx] != iih.icmp6_id)) pf_change_icmp(pd2.src, - (virtual_type == ICMP6_ECHO_REQUEST) + (virtual_type == htons(ICMP6_ECHO_REQUEST)) ? &iih.icmp6_id : NULL, daddr, &nk->addr[pd2.sidx], - (virtual_type == ICMP6_ECHO_REQUEST) + (virtual_type == htons(ICMP6_ECHO_REQUEST)) ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET6); From nobody Wed Aug 7 13:44:44 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 4WfBHc4bWPz5S97m; Wed, 07 Aug 2024 13:44: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHc2YCGz4jX9; Wed, 7 Aug 2024 13:44:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038284; 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=4lL2bGG+L2yqxUWFBvlg5JsF4q29JFzA20CW8M1a0LM=; b=gnm11WgzUndFJJ07CDFshI9fzGr5wgVqaHtVnJZjoYZWdMJZFQPjjKHpldqGF4/OZ2h/sI Y589kChuts+mFRMnZXKIPEua0WvKnZXhUpAJ/zmxEly50z3Bznz+5xgzBB6my3bNsKWIzE I72bVgR1PALVZFbjY+hgNodEOjUcIHZCzl06fW+dAg7oEPom2zxQukrbxA0AHwchxJMKJa 0GYl4oUoNzeSrJ34TjwIcaK1Il/GfKgnB0HZax+TVLvTW0po7IXr5WmjYH2SflEVcRIR4V UnMDTFTJVmMaW9/WGHwuh3944wZ2IiwNAgYVghEeT7YGjIAdI+Ie7jose2tYJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038284; a=rsa-sha256; cv=none; b=x5x4RoNle1oq178hH3xL2YPBMA/8c9rhBv7ixOKs8Wor6l78LpDFm4iqGWRxZJMppvjOW/ vOCvWvLpjatQAeqXT6aZnPLc6+ibjTK/8qqVwGz+VP5V16F4qe0FFwIvYEGXdfH03+DbA6 awt6CbIfLiU2oIUU3+OYftTTf7/gxZGA6XBZiOa7lkqueK53iMAPrGqKIKqX0Z3ybm3fAk +iRmyKtpTZOHkbfLJTRM0iF837Si2r2/uTbD/celWmtrA7Q4n7PPv5ugVZTgyzszx5jlb2 y6//87nvrFGyZYb2JINyxoMPKJ8oDNQ31evIoZfZLg+vL8gqYBxYd4L8WVCYJQ== 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=1723038284; 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=4lL2bGG+L2yqxUWFBvlg5JsF4q29JFzA20CW8M1a0LM=; b=YNc6aiaBVgV4paJFRUNIwi/9TF9kvNNtNOn7Hfv+tdMPL8nHyQ9ijhRpEh8eo35QLH86VC IoyBztG++4lvbApglEgtQGL0bM2OTCXxvnBouzZcjlsGKnNv4MBkSDrfoJvL7TsL5j0QGW 8JH0jOPTlQSP1fLVXM5G525pAQhG1Pp9HMoSZ5+T96e6dtSrb2XcchF7YG/p8Jn/DmoNvl +iqje+Cp+KVEDZsOmOhaok4mNE6eDRFYTrWfPjCtfvyMlQeakG8DFd8dpxG4ZwZVHA0DNm jREWlu+NFgziFsAtPMY6v8pljlpAN8hq2lB0DOJiwpsrPj/VohZOa+EY5Wn74A== 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 4WfBHc24KSzspL; Wed, 7 Aug 2024 13:44:44 +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 477DiiQc034224; Wed, 7 Aug 2024 13:44:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DiiZL034221; Wed, 7 Aug 2024 13:44:44 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:44 GMT Message-Id: <202408071344.477DiiZL034221@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: 3151802d0316 - releng/14.0 - pf: some ICMP types that also have icmp_id, pointed out by markus@ 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 3151802d03162e8d287eaaaa41e1d187f5acbc67 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3151802d03162e8d287eaaaa41e1d187f5acbc67 commit 3151802d03162e8d287eaaaa41e1d187f5acbc67 Author: Kristof Provost AuthorDate: 2024-07-10 11:32:03 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:31:30 +0000 pf: some ICMP types that also have icmp_id, pointed out by markus@ ok henning markus Approved by: so Security: FreeBSD-SA-24:05.pf Security: CVE-2024-6640 MFC after: 1 day Obtained From: OpenBSD, mcbride 8c0632cd274b Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit e296b0de9e467b8c5eb853f6cf4c6ea28d4119a2) (cherry picked from commit c5081b8d3918564c1aba5a5e3f0a5219568e3435) --- sys/netpfil/pf/pf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 0491cd7369f5..71611acde2c7 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1727,21 +1727,21 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, *icmp_dir = PF_IN; case ICMP_TSTAMPREPLY: *icmptype = ICMP_TSTAMP; - *icmpid = 0; /* Time is not a secret. */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_IREQ: *icmp_dir = PF_IN; case ICMP_IREQREPLY: *icmptype = ICMP_IREQ; - *icmpid = 0; /* Nothing sane to match on! */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_MASKREQ: *icmp_dir = PF_IN; case ICMP_MASKREPLY: *icmptype = ICMP_MASKREQ; - *icmpid = 0; /* Nothing sane to match on! */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_IPV6_WHEREAREYOU: From nobody Wed Aug 7 13:44:47 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 4WfBHg6Bf8z5S93N; Wed, 07 Aug 2024 13:44:47 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHg4kh2z4jcS; Wed, 7 Aug 2024 13:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038287; 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=oFmBx1+itiSfFrHkZ2tkzuIgIOOpj3D1rSKY07HiF9I=; b=kfAjlML7EoTZd6nTvL50UJJ1g5h9AxdUOlPqqvC8D1DUWH4eGUWOzCk7PwQzzUkjTJumUs /Z6tL6xGXLkdx8ipGS1Idfqk8dvXbM1ruIEaqdLr13PQFF7j/ib/il27llbmhQ6+GnUaQG 1sVl58EDsqmACzCUaKHhJfvBkVITqjD0kGfBZ0w1oB9PAtW/pDsyKdGNi0wWdt8gq1uPsF HpO9BMbh2bbozck8m7TBwtXyL38dPJZY0JnQLWjhTKuQta58iqcc8RT06AbBC4sR9hPgYN 0RSWtWFIwD4C6NuUPoPqve0EPNpGuGrlau/iY8bJwfcSaiDLHtG5m+Y/HA6Zyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038287; a=rsa-sha256; cv=none; b=n/HgVYamnPf3jdGYhcHQJucUZcehHuWszHPl6mph4/Oude6AL4wZzkc5+/ZYJTXfngroQE aAbvRjjC8PA8RPdiqEyq/sCWDCOlKoNBcjLLV6VI251H6V22gyu8jxvLfqyn5j1ZH3/Mbm wjQ2gxVrTEuTCy+ESgnZt2AwKAe2ogiXRH8EJpA36e+5izXpexSc4aziFgyjzUzpFh0+Dy C/IK6kK+h/RxMdwMbg5E7+T78ATQ41IeFOilgjdhB6r3DPj+REehksz1lwALghG1v26n84 Qq/WJ+1uPIc/iDXgt2MfOeinmB7WyFwVdVJtPINqIM8l+2l+Gi31XM35VeBedQ== 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=1723038287; 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=oFmBx1+itiSfFrHkZ2tkzuIgIOOpj3D1rSKY07HiF9I=; b=JdtXlgGhSfPQt3J2hMZHMjrhXw2buv58fVUei3FbDljNnVDity3N/Tn4Un1v/B6dzx+LUg ECzXom+h92xHyeDC3cBSJFijnvw0BRlQuqTpzacITqPknMm7ZOWglWPkBrPpMzW3Wsrpd5 uvTrJjbjKd2+pQcx1B4uiBSrrd5OqYu83H6oM83pXmFgBjM6DC4yf8qHvpsX3NO+DrRCUU ZOzTCRvjnQhgST7Ueeuupm5pv4XSQGRwUA5iawMK2u8nvfdZcWkK3jK9AHpYZ+fPczpOXV 3qpHWgJ8loUwhv2YxWFzKBBF4hpJ+eWierx4m9xYIY+gMJ+SDay2P9cAWSaeFQ== 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 4WfBHg4DXfzt3x; Wed, 7 Aug 2024 13:44:47 +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 477DilDx034379; Wed, 7 Aug 2024 13:44:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DiloC034376; Wed, 7 Aug 2024 13:44:47 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:47 GMT Message-Id: <202408071344.477DiloC034376@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: c39fb98e4740 - releng/14.0 - ktrace: Fix an inverted privilege check 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: c39fb98e47400b0808a49628d0c57489e8a5a8ee Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c39fb98e47400b0808a49628d0c57489e8a5a8ee commit c39fb98e47400b0808a49628d0c57489e8a5a8ee Author: Mark Johnston AuthorDate: 2024-08-07 13:38:54 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:43:35 +0000 ktrace: Fix an inverted privilege check Approved by: so Security: FreeBSD-SA-24:06.ktrace Security: CVE-2024-6760 Fixes: 1762f674ccb5 ("ktrace: pack all ktrace parameters into allocated structure ktr_io_params") (cherry picked from commit 166b7573b5220aadf8b02a85933c9651b909b309) (cherry picked from commit 8b400c8488f0b9e67ae269f6d8e5022a3bc7d854) --- sys/kern/kern_ktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 01158c2c238f..196450af2c84 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -593,7 +593,7 @@ ktrprocexec(struct proc *p) PROC_LOCK_ASSERT(p, MA_OWNED); kiop = p->p_ktrioparms; - if (kiop == NULL || priv_check_cred(kiop->cr, PRIV_DEBUG_DIFFCRED)) + if (kiop == NULL || priv_check_cred(kiop->cr, PRIV_DEBUG_DIFFCRED) == 0) return (NULL); mtx_lock(&ktrace_mtx); From nobody Wed Aug 7 13:44:46 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 4WfBHg1Xh0z5S9LC; Wed, 07 Aug 2024 13:44:47 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHf4GJHz4jS6; Wed, 7 Aug 2024 13:44:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038286; 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=N7RiAqDapYaI216MLrDJDcCVxFmne3BZf1/8Z7bt8s0=; b=bwwVK+1C6hKn9/jJ9sl388g8qh304ZAbuskCDcockbbRt2G3SX2mA9YLCDrZrvcU4dKyZ6 hzacI85fdt/6SHqssD6w9sFlelxhb3I0KVrT6EHmFTPNKovZc3hcUhRnsCOCdUdQTvY2Yf OfB7DmGFLpmYMchFD3lkYgPiBLiO5oLTwQZRRUDFJS8233L98d4U72aaL0zhpHadLB9Q53 dczRvadKYjiO5hgqcCempj7Rki26J/XsYgama3uT3ElVKUgtxL68CgMvpKn8+qcMTI6YlP jY4O+dYwJvk7gWvO0WyWSmEb2R66xiswpeF6DffcoXT5rvPoCh0naoKjWlFbMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038286; a=rsa-sha256; cv=none; b=pYB4HD/AkMzCrVHNRo8uION8l9KNxswteL2GhgVcxCfjTuhZuBWkzNWFXzGSbmk72fVrvD K9HFj4sV5m3XyiBAKM+X7Sd/sqvuNKJHmKWAANqdChsygukWHU0HyddKYMP+TlHm8lSn6b vvRNnsRgTNJLq5j98xHACPbi3EfXVu+FbLP8WHBFbz7LFOo0GNjEoh8YS4Z36bNoZk3uTT qQUr9G2/aFD7h2ljXjL55FUfwIMLb4HKLiS6x8Tik4TwDJ5CoU9FrEWp33/8NNqG8gIMQ8 2soDOU5WXMAHqWzB5kqeHBZixo7xGHupecIvGvniVRrr2esp/I3AKfxCbfJWlA== 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=1723038286; 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=N7RiAqDapYaI216MLrDJDcCVxFmne3BZf1/8Z7bt8s0=; b=MCnx4PqcfGNYpGCXQnyK191b1lpXUD3lkFdaJdxGCV8b7UyYmY4BnKNLC5frStmx6pSOhc Z90ITXCg1bs87/qZzoA+G3dymk888iUDMLtUTyJc3V7CfjoVFCDXDQ2uqhJXiyUv9fPjIS V6zZPCnM08DhaG9tODxOGV57a+mOghj8meqx3ejZB2J8c+UBca0qa6aaZ2jbmb41M8dhUA Rei3rscUD/9kmbD1Q9AU4Z6MY6ub05epEdve7kb188nPsUCIXp4PLkSXSWv5C1wN3msL4a Q+sUe1R3g1cIs+XPzY1okZcYjmAQ2DvckzvFDbgwzF/WEdRBZxJ9BJEsuPP7wA== 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 4WfBHf3tmBzsgg; Wed, 7 Aug 2024 13:44:46 +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 477Dikm8034334; Wed, 7 Aug 2024 13:44:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477Dikbx034331; Wed, 7 Aug 2024 13:44:46 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:46 GMT Message-Id: <202408071344.477Dikbx034331@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: ca9580967e74 - releng/14.0 - pf: allow MLD LR to be sent without state 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: ca9580967e7406bb23aa482f94a3c6a02ecbe6a1 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ca9580967e7406bb23aa482f94a3c6a02ecbe6a1 commit ca9580967e7406bb23aa482f94a3c6a02ecbe6a1 Author: Kristof Provost AuthorDate: 2024-07-10 12:36:18 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:31:30 +0000 pf: allow MLD LR to be sent without state Change PF behavior to allow MLD Listener Report packets to be sent without needing a previously created state by MLD Listener Query. It wasn't working because: (1) you might not have a previous MLD Listener Query and (2) the addresses of the Query and Report don't match. ok mikeb@, sashan@ Approved by: so Security: FreeBSD-SA-24:05.pf Security: CVE-2024-6640 MFC after: 1 day Obtained From: OpenBSD, rzalamena , 5c526dbdb0f2 Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 1afe4da75d1d2acd33b25eea942af28aa41c82c2) (cherry picked from commit 3382c691dc6a0d4e1f39ff67b5507f6542972498) --- sys/netpfil/pf/pf.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 72814861f35f..cf1c83aceff7 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1804,8 +1804,15 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, break; case MLD_LISTENER_QUERY: - *icmp_dir = PF_IN; case MLD_LISTENER_REPORT: { + /* + * Listener Report can be sent by clients + * without an associated Listener Query. + * In addition to that, when Report is sent as a + * reply to a Query its source and destination + * address are different. + */ + *icmp_dir = PF_IN; *virtual_type = MLD_LISTENER_QUERY; *virtual_id = 0; break; From nobody Wed Aug 7 13:44:48 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 4WfBHj22Gjz5S99l; Wed, 07 Aug 2024 13:44:49 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHh5w6vz4jcf; Wed, 7 Aug 2024 13:44:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038288; 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=YKAMAW70giEoU1tDR84ojPYmqnNMl9jFqKtfZiOYxXs=; b=wdBBmn0ffI3H28gppY4hxi8nmHPw6qmVKgYZXKPUaeQ4W4H7bvjxzjxYZ5KzjmhqEurdNd k475fuPOMpYC1pFB+dxjUfGFSvS8lXtcuYApUVNsHPMsUEPiCA2gHdcdI+jMrYn/miZmYt OLUJ4dzG63uBcw4Wz6WQYNk+Uw0M/JZGFqTdB9EcKziZX6IgMaG3BJs4itztyfZaJgqPA9 P4hIgJzu7cZIFmycI8dxXU7gDHSiJs1Gzvm9c7M7eyhr6OS4iWKUTyljmsW6tWWOf6Npcc E5CThTa3aCrTW8RxLqS/l3SUb1jLyan0a+OrYMWiqduYEj/D0y8TyA7d8D1NyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038288; a=rsa-sha256; cv=none; b=Gebt8IHM9lx5E4a2s4KLb/Q8f6Xk8WdRP3UPKDa8QZTxJrFdEnPvxyMnjaJnU+2v944bMv QghNQQ69b4ytaff4OZvVE+JTLgAnnNHsyewdT0eCz54j/LB6hlZKRqMoSFtzNIkWWwed1S z//274ah/vz+Mvk6UbqaNgFlLfkVZEoBbcxRo2j4WGW9Mxo3OT+f90Juj+fZNugWH8z8Js 1S/S9GbV9mMv4U9KItd1SB3UTW4agw43qYChBoK+l9nwJOq9RTFMjrDyWxXeLJ64bHmtBR uYReSvBxpt8Amd3z+sG2lJ4fz6vie+G0PmuRNLMcyMtZPTFXCzKzKJqv/ehOnw== 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=1723038288; 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=YKAMAW70giEoU1tDR84ojPYmqnNMl9jFqKtfZiOYxXs=; b=VT9odTZMAa2IY7Aq3DCQNth4eIa4bubxxqT0187+UiukH7Mbz2DwWg9+WJhP1YHMhI+XOn xU/Hls2WzlidNs/BI1heemotN9q9Gosr7zB/BPwcOefQj4B6iSNHBXU8NUAmgJUyaGTebY S51pDKwgqe9Gnbpn0Sl0r6w7ml9mZjVZfBho3jx35YvSj0CwcD9PPXSfOGw5UgPvaanuLG o7oK3mCbbou7ZogzkDFMGkpsSoZCnPOtVQCOgpQHKU9iJu8XqVtGau6Lqgmz66aUIbHUhp Hc6khNhxYYIjFIMNHI8GSXWyf1qvQMO2vy8gKoZgZKU7d8Ti2hb6xBbUpNs1gw== 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 4WfBHh5WsJzspM; Wed, 7 Aug 2024 13:44:48 +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 477DimKE034430; Wed, 7 Aug 2024 13:44:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477Dimrn034427; Wed, 7 Aug 2024 13:44:48 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:48 GMT Message-Id: <202408071344.477Dimrn034427@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: 9020582c32ed - releng/14.0 - Add UPDATING entries and bump the branch version 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 9020582c32ed0901385ef706fd96db0ad8f629b0 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9020582c32ed0901385ef706fd96db0ad8f629b0 commit 9020582c32ed0901385ef706fd96db0ad8f629b0 Author: Mark Johnston AuthorDate: 2024-08-06 23:08:58 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:43:38 +0000 Add UPDATING entries and bump the branch version Approved by: so --- UPDATING | 17 +++++++++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index c786fe74c829..dda09f1d5226 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,23 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20240807: + 14.0-RELEASE-p9 EN-24:14.ifconfig + SA-24:05.pf + SA-24:06.ktrace + SA-24:07.nfsclient + SA-24:08.openssh + + Incorrect ifconfig netmask assignment [EN-24:14.ifconfig] + + pf incorrectly matches different ICMPv6 states in the state table [SA-24:05.pf] + + ktrace(2) fails to detach when executing a setuid binary [SA-24:06.ktrace] + + NFS client accepts file names containing path separators [SA-24:07.nfsclient] + + OpenSSH pre-authentication async signal safety issue [SA-24:08.openssh] + 20240701: 14.0-RELEASE-p8 SA-24:04.openssh diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index d566b1b8f6c5..b13f7b741ea6 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.0" -BRANCH="RELEASE-p8" +BRANCH="RELEASE-p9" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Wed Aug 7 13:44:52 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 4WfBHn11qbz5S9LM; Wed, 07 Aug 2024 13:44:53 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHm5sjxz4jdF; Wed, 7 Aug 2024 13:44:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038292; 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=6ssOh0VlVGLt2Znpe/kY4Z+7jOBABBe/mZnESWordA0=; b=BWWj0oU3n/Xz+U+gYLopcywH9XWjzOWioFCfd1x2rHGRCjogH+bafOV9KYVBEFWygCTMR3 PyK1atf6e0IFF0amwNapZO8UFPoaz3pSO/fv5Ah4Br95NWXKfnbVxnsP9Nyh1ZO4rn35pl qskjz8ZJrpqHw8JruwO/mxX02sBPZ1Wb12f/j1pFM/6IZ/hzNxkpzcs//uIbwNniKAmxCg d5uCa5G9+6VTrhDQUgs+vGY0VQKbbuvHy6pOORoqUNAMpn9G/bhwwrgezRWzyq6Px+NZmx CT8N8evAA11na4fTzn917QATAoQEPGwCSQyqM0jjZoNcWjte+PJcNYsyKOB2zA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038292; a=rsa-sha256; cv=none; b=LWqyNBFSQ87kAc3x9KWxPJTlVdd1eZdmkOViF3VXxeTvXzhF5p/kuRS7qZHoJpAvz44gmO QT80GmPL9v67HawiFLGe+mtW40E/wHOJ+Z+fu3ex/UkK3gRPoa4dUlo+5xi1xCqmfJBV9a FNJPwYas4L0LGRE4Wz7UCnqSSKhxW5Az3nprkCLAXeZYSJUJDz4pLJFbtvSIZl6hMb+TMl z2IW7GuK09HV1YO8uHI+U0SGW+FoqaV9fDJ5Rw3Ikl4mAvlDp4qOzgnbmPCn7vKh0/qh6j Zt6q+YG0rqGdFCy3pZ4UYlOetvm9Ukelgl46GhjJq4d3R/9+QGA20Ks4PnolqQ== 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=1723038292; 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=6ssOh0VlVGLt2Znpe/kY4Z+7jOBABBe/mZnESWordA0=; b=ahz5q2w/0iF9z6VXe6G2zSlDk5/FDL9ZvSxGRYZ59lmH7l2AzwIxmzs1jpv+BuIAP4oCEp MhDqDvXpYE1pcGWDL6XtypVEbIXVdmhBHv5OCWtEKbVOeshduPeYUOtp8iu58OoSy0pgIj IYHrMDovHmraV/RKOACpGqlJodIGB1645KzF6zNASwUlJfCi6K7kFe5PSjQbTZMV2O5G2e Aa8eiv+zxa3sJ74g6Lg/G0D6x6djXh4JmJCQPr5UkUqPW/NAZKaPPLNxiSdeN+/AMOj/7f /16cR6Ly/9/GmHs13wf7Wn7YtbjgmENY07xDu2ooGJf79wOW96VzQjgnBMw1WA== 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 4WfBHm5TsYzt3y; Wed, 7 Aug 2024 13:44:52 +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 477Diq8X034647; Wed, 7 Aug 2024 13:44:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DiquT034644; Wed, 7 Aug 2024 13:44:52 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:52 GMT Message-Id: <202408071344.477DiquT034644@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: 3d5cb2b9a97c - releng/13.3 - nfscl: Scan readdir reply filenames for invalid characters 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.3 X-Git-Reftype: branch X-Git-Commit: 3d5cb2b9a97c54ae013568a358f24e8eca51c75f Auto-Submitted: auto-generated The branch releng/13.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3d5cb2b9a97c54ae013568a358f24e8eca51c75f commit 3d5cb2b9a97c54ae013568a358f24e8eca51c75f Author: Rick Macklem AuthorDate: 2024-07-21 22:56:16 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:37:00 +0000 nfscl: Scan readdir reply filenames for invalid characters The NFS RFCs are pretty loose with respect to what characters can be in a filename returned by a Readdir. However, FreeBSD, as a POSIX system will not handle imbedded '/' or nul characters in file names. Also, for NFSv4, the file names "." and ".." are handcrafted on the client and should not be returned by a NFSv4 server. This patch scans for the above in filenames returned by Readdir and ignores any entry returned by Readdir which has them in it. Because an imbedded nul would be a string terminator, it was not possible to code this check efficiently using string(3) functions. Approved by: so Security: FreeBSD-SA-24:07.nfsclient Security: CVE-2024-6759 Reported by: Apple Security Engineering and Architecture (SEAR) (cherry picked from commit 026cdaa3b3a92574d9ac3155216e5cc0b0bd4c51) (cherry picked from commit 0172b5145ad9435569978ed4d268b9f65ac59526) --- sys/fs/nfsclient/nfs_clrpcops.c | 137 ++++++++++++++++++++++++++++++++-------- 1 file changed, 110 insertions(+), 27 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 899d81efcf7c..c49f19fb0450 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -140,6 +140,7 @@ static int nfsrpc_createv4(vnode_t , char *, int, struct vattr *, nfsquad_t, int, struct nfsclowner *, struct nfscldeleg **, struct ucred *, NFSPROC_T *, struct nfsvattr *, struct nfsvattr *, struct nfsfh **, int *, int *, void *, int *); +static bool nfscl_invalidfname(bool, char *, int); static int nfsrpc_locku(struct nfsrv_descript *, struct nfsmount *, struct nfscllockowner *, u_int64_t, u_int64_t, u_int32_t, struct ucred *, NFSPROC_T *, int); @@ -2997,6 +2998,31 @@ nfsrpc_rmdir(vnode_t dvp, char *name, int namelen, struct ucred *cred, return (error); } +/* + * Check to make sure the file name in a Readdir reply is valid. + */ +static bool +nfscl_invalidfname(bool is_v4, char *name, int len) +{ + int i; + char *cp; + + if (is_v4 && ((len == 1 && name[0] == '.') || + (len == 2 && name[0] == '.' && name[1] == '.'))) { + printf("Readdir NFSv4 reply has dot or dotdot in it\n"); + return (true); + } + cp = name; + for (i = 0; i < len; i++, cp++) { + if (*cp == '/' || *cp == '\0') { + printf("Readdir reply file name had imbedded / or nul" + " byte\n"); + return (true); + } + } + return (false); +} + /* * Readdir rpc. * Always returns with either uio_resid unchanged, if you are at the @@ -3049,6 +3075,8 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, KASSERT(uiop->uio_iovcnt == 1 && (uiop->uio_resid & (DIRBLKSIZ - 1)) == 0, ("nfs readdirrpc bad uio")); + KASSERT(uiop->uio_segflg == UIO_SYSSPACE, + ("nfsrpc_readdir: uio userspace")); ncookie.lval[0] = ncookie.lval[1] = 0; /* * There is no point in reading a lot more than uio_resid, however @@ -3307,6 +3335,17 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, uiop->uio_resid) bigenough = 0; if (bigenough) { + struct iovec saviov; + off_t savoff; + ssize_t savresid; + int savblksiz; + + saviov.iov_base = uiop->uio_iov->iov_base; + saviov.iov_len = uiop->uio_iov->iov_len; + savoff = uiop->uio_offset; + savresid = uiop->uio_resid; + savblksiz = blksiz; + dp = (struct dirent *)uiop->uio_iov->iov_base; dp->d_pad0 = dp->d_pad1 = 0; dp->d_off = 0; @@ -3322,20 +3361,35 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, uiop->uio_iov->iov_base = (char *)uiop->uio_iov->iov_base + DIRHDSIZ; uiop->uio_iov->iov_len -= DIRHDSIZ; + cp = uiop->uio_iov->iov_base; error = nfsm_mbufuio(nd, uiop, len); if (error) goto nfsmout; - cp = uiop->uio_iov->iov_base; - tlen -= len; - NFSBZERO(cp, tlen); - cp += tlen; /* points to cookie storage */ - tl2 = (u_int32_t *)cp; - uiop->uio_iov->iov_base = - (char *)uiop->uio_iov->iov_base + tlen + - NFSX_HYPER; - uiop->uio_iov->iov_len -= tlen + NFSX_HYPER; - uiop->uio_resid -= tlen + NFSX_HYPER; - uiop->uio_offset += (tlen + NFSX_HYPER); + /* Check for an invalid file name. */ + if (nfscl_invalidfname( + (nd->nd_flag & ND_NFSV4) != 0, cp, len)) { + /* Skip over this entry. */ + uiop->uio_iov->iov_base = + saviov.iov_base; + uiop->uio_iov->iov_len = + saviov.iov_len; + uiop->uio_offset = savoff; + uiop->uio_resid = savresid; + blksiz = savblksiz; + } else { + cp = uiop->uio_iov->iov_base; + tlen -= len; + NFSBZERO(cp, tlen); + cp += tlen; /* points to cookie store */ + tl2 = (u_int32_t *)cp; + uiop->uio_iov->iov_base = + (char *)uiop->uio_iov->iov_base + + tlen + NFSX_HYPER; + uiop->uio_iov->iov_len -= tlen + + NFSX_HYPER; + uiop->uio_resid -= tlen + NFSX_HYPER; + uiop->uio_offset += (tlen + NFSX_HYPER); + } } else { error = nfsm_advance(nd, NFSM_RNDUP(len), -1); if (error) @@ -3503,6 +3557,8 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, KASSERT(uiop->uio_iovcnt == 1 && (uiop->uio_resid & (DIRBLKSIZ - 1)) == 0, ("nfs readdirplusrpc bad uio")); + KASSERT(uiop->uio_segflg == UIO_SYSSPACE, + ("nfsrpc_readdirplus: uio userspace")); ncookie.lval[0] = ncookie.lval[1] = 0; timespecclear(&dctime); *attrflagp = 0; @@ -3738,6 +3794,17 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, uiop->uio_resid) bigenough = 0; if (bigenough) { + struct iovec saviov; + off_t savoff; + ssize_t savresid; + int savblksiz; + + saviov.iov_base = uiop->uio_iov->iov_base; + saviov.iov_len = uiop->uio_iov->iov_len; + savoff = uiop->uio_offset; + savresid = uiop->uio_resid; + savblksiz = blksiz; + dp = (struct dirent *)uiop->uio_iov->iov_base; dp->d_pad0 = dp->d_pad1 = 0; dp->d_off = 0; @@ -3756,25 +3823,41 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, cnp->cn_nameptr = uiop->uio_iov->iov_base; cnp->cn_namelen = len; NFSCNHASHZERO(cnp); + cp = uiop->uio_iov->iov_base; error = nfsm_mbufuio(nd, uiop, len); if (error) goto nfsmout; - cp = uiop->uio_iov->iov_base; - tlen -= len; - NFSBZERO(cp, tlen); - cp += tlen; /* points to cookie storage */ - tl2 = (u_int32_t *)cp; - if (len == 2 && cnp->cn_nameptr[0] == '.' && - cnp->cn_nameptr[1] == '.') - isdotdot = 1; - else - isdotdot = 0; - uiop->uio_iov->iov_base = - (char *)uiop->uio_iov->iov_base + tlen + - NFSX_HYPER; - uiop->uio_iov->iov_len -= tlen + NFSX_HYPER; - uiop->uio_resid -= tlen + NFSX_HYPER; - uiop->uio_offset += (tlen + NFSX_HYPER); + /* Check for an invalid file name. */ + if (nfscl_invalidfname( + (nd->nd_flag & ND_NFSV4) != 0, cp, len)) { + /* Skip over this entry. */ + uiop->uio_iov->iov_base = + saviov.iov_base; + uiop->uio_iov->iov_len = + saviov.iov_len; + uiop->uio_offset = savoff; + uiop->uio_resid = savresid; + blksiz = savblksiz; + } else { + cp = uiop->uio_iov->iov_base; + tlen -= len; + NFSBZERO(cp, tlen); + cp += tlen; /* points to cookie store */ + tl2 = (u_int32_t *)cp; + if (len == 2 && + cnp->cn_nameptr[0] == '.' && + cnp->cn_nameptr[1] == '.') + isdotdot = 1; + else + isdotdot = 0; + uiop->uio_iov->iov_base = + (char *)uiop->uio_iov->iov_base + + tlen + NFSX_HYPER; + uiop->uio_iov->iov_len -= tlen + + NFSX_HYPER; + uiop->uio_resid -= tlen + NFSX_HYPER; + uiop->uio_offset += (tlen + NFSX_HYPER); + } } else { error = nfsm_advance(nd, NFSM_RNDUP(len), -1); if (error) From nobody Wed Aug 7 13:44:53 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 4WfBHp1wbWz5S99w; Wed, 07 Aug 2024 13:44:54 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHn6JwKz4jq4; Wed, 7 Aug 2024 13:44:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038293; 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=12jHmcDb9XXIdgXgVVh/JqG5CUU0rkOd+C7CeNb9qAQ=; b=fW3KWwETrErIlgyeqbkdh3nJ/USJks50j5L5hKIxQcE1WbLSj+vDSgHJYEeS8n7WAQQJ7h R+NAs5dtnSQt2H8HKEmd4HEudKUFAxxB7JCYmMZidOZ+jpLAqXd5FUu1QazKXRPQ5VpLuo huN9v3G0NF5cc+1lMozLt9hy5n5eQAJD6Q/tWXgZ9yirJIUTn7mN1UrZCOYbqc+s7K4fbK lHQOcYMG4RHfgMe6be2Y5M/3L5SRB80n+/DYJSOn1wPeahmzrM3HfxjgE3ppLXCpSrGOrD W8l4PNcqEQVUIqjfplrmqR8uJGUIcQ7u6+kAOgfnEmEgSd56SYkVHqpkqg1y7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038293; a=rsa-sha256; cv=none; b=ie/WCJNcbml1EHJWRGWOsyTsIDZIyMAIAsw9VTmP3OoSX3GcxHgZe6BwPZjCozi/+1WjNn ERrjF6wB9jGUe4nVRlshIee9zZY8BZtW8NEoP7loSvUcrs97RxHF1MqyuKCWy04gx1n87B mWdmYvsZf/LkfnXQkUEOY6gSL5or7iRNMcxj9/apjCjd7a+uXQLEUjsRFCZJYlO6+Wj3Ve vcAnnPKI1ak7uGMFqJKuvB7HduWhvDh7dkmtcZdYzD5xkNxdY860O8mLPmmPxy0S33GIt7 8ondJK6/VXSYXpNMWr+haBAcwObonpDrH2zg+ecP3J3zrM4GqEkSr3C1/JJejQ== 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=1723038293; 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=12jHmcDb9XXIdgXgVVh/JqG5CUU0rkOd+C7CeNb9qAQ=; b=ifh0wdrCQUi3BTOkB/GB4wRw8GjnaVfVZa9LhhGLg4m9TCgfXo3SvishBawr+o9ifYCP+I XX4TOUVNQA3hTJn0tYqo7FSRSmKRLHixA4V89bVMYFwtXx/4D84dlMXBI0am+W8P/+wGZl /tgillRWa6MjS55+DnI+qPFFank8ebXYovf9ZqJskfKDK/+HXa/dKBRd65VhmKd/QFvUxR UyRFgKt4435LC9Xr1z5ryDkGWrg4dTeWMBX1HVrWxIwYTq4SBrsTgtJP4jNE7SzHT8nN3W oyGFpVvvfaB6HHucwWyi/JdUuvYp29TKOs/3608Veu3LJz5igRyDBItyPIc47g== 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 4WfBHn5wW9zsVB; Wed, 7 Aug 2024 13:44:53 +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 477DirYT034701; Wed, 7 Aug 2024 13:44:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477Dir9T034698; Wed, 7 Aug 2024 13:44:53 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:53 GMT Message-Id: <202408071344.477Dir9T034698@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: e576536cbae1 - releng/13.3 - pf: stricter state checking for ICMP and ICMPv6 packets 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.3 X-Git-Reftype: branch X-Git-Commit: e576536cbae157692116df6639e7c7cc643accad Auto-Submitted: auto-generated The branch releng/13.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e576536cbae157692116df6639e7c7cc643accad commit e576536cbae157692116df6639e7c7cc643accad Author: Kristof Provost AuthorDate: 2024-07-09 13:59:33 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:37:13 +0000 pf: stricter state checking for ICMP and ICMPv6 packets Include the ICMP type in one port of the state key, using the type to determine which side should be the id, and which should be the type. Also: - Handle ICMP6 messages which are typically sent to multicast addresses but recieve unicast replies, by doing fallthrough lookups against the correct multicast address. - Clear up some mistaken assumptions in the PF code: - Not all ICMP packets have an icmp_id, so simulate one based on other data if we can, otherwise set it to 0. - Don't modify the icmp id field in NAT unless it's echo - Use the full range of possible id's when NATing icmp6 echoy ok henning marco testing matthieu todd Approved by: so Security: FreeBSD-SA-24:05.pf Security: CVE-2024-6640 MFC after: 1 day Obtained From: OpenBSD, mcbride 70bf7555ef4c Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 534ee17e61ee094ec175703bc50e88ff6587703e) --- sys/netpfil/pf/pf.c | 380 ++++++++++++++++++++++++++++++++++++++----------- sys/netpfil/pf/pf_lb.c | 19 ++- 2 files changed, 316 insertions(+), 83 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index e03fcbbe37a9..1bdc695f698c 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -276,6 +276,8 @@ static void pf_change_ap(struct mbuf *, struct pf_addr *, u_int16_t *, u_int16_t, u_int8_t, sa_family_t); static int pf_modulate_sack(struct mbuf *, int, struct pf_pdesc *, struct tcphdr *, struct pf_state_peer *); +int pf_icmp_mapping(struct pf_pdesc *, u_int8_t, int *, + int *, u_int16_t *, u_int16_t *); static void pf_change_icmp(struct pf_addr *, u_int16_t *, struct pf_addr *, struct pf_addr *, u_int16_t, u_int16_t *, u_int16_t *, u_int16_t *, @@ -316,6 +318,10 @@ static int pf_test_state_tcp(struct pf_kstate **, int, static int pf_test_state_udp(struct pf_kstate **, int, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *); +int pf_icmp_state_lookup(struct pf_state_key_cmp *, + struct pf_pdesc *, struct pf_kstate **, struct mbuf *, + int, struct pfi_kkif *, u_int16_t, u_int16_t, + int, int *, int); static int pf_test_state_icmp(struct pf_kstate **, int, struct pfi_kkif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); @@ -369,6 +375,7 @@ extern int pf_end_threads; extern struct proc *pf_purge_proc; VNET_DEFINE(struct pf_limit, pf_limits[PF_LIMIT_MAX]); +enum { PF_ICMP_MULTI_NONE, PF_ICMP_MULTI_SOLICITED, PF_ICMP_MULTI_LINK }; #define PACKET_UNDO_NAT(_m, _pd, _off, _s, _dir) \ do { \ @@ -1689,6 +1696,142 @@ pf_isforlocal(struct mbuf *m, int af) return (false); } +int +pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, + int *icmp_dir, int *multi, u_int16_t *icmpid, u_int16_t *icmptype) +{ + /* + * ICMP types marked with PF_OUT are typically responses to + * PF_IN, and will match states in the opposite direction. + * PF_IN ICMP types need to match a state with that type. + */ + *icmp_dir = PF_OUT; + *multi = PF_ICMP_MULTI_LINK; + /* Queries (and responses) */ + switch (type) { + case ICMP_ECHO: + *icmp_dir = PF_IN; + case ICMP_ECHOREPLY: + *icmptype = ICMP_ECHO; + *icmpid = pd->hdr.icmp.icmp_id; + break; + + case ICMP_TSTAMP: + *icmp_dir = PF_IN; + case ICMP_TSTAMPREPLY: + *icmptype = ICMP_TSTAMP; + *icmpid = 0; /* Time is not a secret. */ + break; + + case ICMP_IREQ: + *icmp_dir = PF_IN; + case ICMP_IREQREPLY: + *icmptype = ICMP_IREQ; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_MASKREQ: + *icmp_dir = PF_IN; + case ICMP_MASKREPLY: + *icmptype = ICMP_MASKREQ; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_IPV6_WHEREAREYOU: + *icmp_dir = PF_IN; + case ICMP_IPV6_IAMHERE: + *icmptype = ICMP_IPV6_WHEREAREYOU; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_MOBILE_REGREQUEST: + *icmp_dir = PF_IN; + case ICMP_MOBILE_REGREPLY: + *icmptype = ICMP_MOBILE_REGREQUEST; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ICMP_ROUTERSOLICIT: + *icmp_dir = PF_IN; + case ICMP_ROUTERADVERT: + *icmptype = ICMP_ROUTERSOLICIT; + *icmpid = 0; /* Nothing sane to match on! */ + break; + +#ifdef INET6 + case ICMP6_ECHO_REQUEST: + *icmp_dir = PF_IN; + case ICMP6_ECHO_REPLY: + *icmptype = ICMP6_ECHO_REQUEST; + *icmpid = pd->hdr.icmp6.icmp6_id; + break; + + case MLD_LISTENER_QUERY: + *icmp_dir = PF_IN; + case MLD_LISTENER_REPORT: { + *icmptype = MLD_LISTENER_QUERY; + *icmpid = 0; + break; + } + + /* ICMP6_FQDN and ICMP6_NI query/reply are the same type as ICMP6_WRU */ + case ICMP6_WRUREQUEST: + *icmp_dir = PF_IN; + case ICMP6_WRUREPLY: + *icmptype = ICMP6_WRUREQUEST; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case MLD_MTRACE: + *icmp_dir = PF_IN; + case MLD_MTRACE_RESP: + *icmptype = MLD_MTRACE; + *icmpid = 0; /* Nothing sane to match on! */ + break; + + case ND_NEIGHBOR_SOLICIT: + *icmp_dir = PF_IN; + case ND_NEIGHBOR_ADVERT: { + *icmptype = ND_NEIGHBOR_SOLICIT; + *multi = PF_ICMP_MULTI_SOLICITED; + *icmpid = 0; + break; + } + +#endif /* INET6 */ + /* These ICMP types map to other connections */ + case ICMP_UNREACH: + case ICMP_SOURCEQUENCH: + case ICMP_REDIRECT: + case ICMP_TIMXCEED: + case ICMP_PARAMPROB: +#ifdef INET6 + /* + * ICMP6_TIME_EXCEEDED is the same type as ICMP_UNREACH + * ND_REDIRECT can't be in this list because the triggering packet + * header is optional. + */ + case ICMP6_PACKET_TOO_BIG: +#endif /* INET6 */ + /* These will not be used, but set them anyways */ + *icmp_dir = PF_IN; + *icmptype = htons(type); + *icmpid = 0; + return (1); /* These types are matched to other state */ + /* + * All remaining ICMP types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *icmptype = type; + *icmpid = 0; + break; + } + HTONS(*icmptype); + return (0); +} + void pf_intr(void *v) { @@ -3851,8 +3994,8 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, int direction, int tag = -1, rtableid = -1; int asd = 0; int match = 0; - int state_icmp = 0; - u_int16_t sport = 0, dport = 0; + int state_icmp = 0, icmp_dir, multi; + u_int16_t sport = 0, dport = 0, virtual_type, virtual_id; u_int16_t bproto_sum = 0, bip_sum = 0; u_int8_t icmptype = 0, icmpcode = 0; struct pf_kanchor_stackframe anchor_stack[PF_ANCHOR_STACKSIZE]; @@ -3886,33 +4029,37 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, int direction, case IPPROTO_ICMP: if (pd->af != AF_INET) break; - sport = dport = pd->hdr.icmp.icmp_id; hdrlen = sizeof(pd->hdr.icmp); icmptype = pd->hdr.icmp.icmp_type; icmpcode = pd->hdr.icmp.icmp_code; - - if (icmptype == ICMP_UNREACH || - icmptype == ICMP_SOURCEQUENCH || - icmptype == ICMP_REDIRECT || - icmptype == ICMP_TIMXCEED || - icmptype == ICMP_PARAMPROB) - state_icmp++; + state_icmp = pf_icmp_mapping(pd, icmptype, + &icmp_dir, &multi, &virtual_id, &virtual_type); + if (icmp_dir == PF_IN) { + sport = virtual_id; + dport = virtual_type; + } else { + sport = virtual_type; + dport = virtual_id; + } break; #endif /* INET */ #ifdef INET6 case IPPROTO_ICMPV6: if (af != AF_INET6) break; - sport = dport = pd->hdr.icmp6.icmp6_id; hdrlen = sizeof(pd->hdr.icmp6); icmptype = pd->hdr.icmp6.icmp6_type; icmpcode = pd->hdr.icmp6.icmp6_code; + state_icmp = pf_icmp_mapping(pd, icmptype, + &icmp_dir, &multi, &virtual_id, &virtual_type); + if (icmp_dir == PF_IN) { + sport = virtual_id; + dport = virtual_type; + } else { + sport = virtual_type; + dport = virtual_id; + } - if (icmptype == ICMP6_DST_UNREACH || - icmptype == ICMP6_PACKET_TOO_BIG || - icmptype == ICMP6_TIME_EXCEEDED || - icmptype == ICMP6_PARAM_PROB) - state_icmp++; break; #endif /* INET6 */ default: @@ -4001,7 +4148,6 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, int direction, } #ifdef INET case IPPROTO_ICMP: - nk->port[0] = nk->port[1]; if (PF_ANEQ(saddr, &nk->addr[pd->sidx], AF_INET)) pf_change_a(&saddr->v4.s_addr, pd->ip_sum, nk->addr[pd->sidx].v4.s_addr, 0); @@ -4010,11 +4156,12 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, int direction, pf_change_a(&daddr->v4.s_addr, pd->ip_sum, nk->addr[pd->didx].v4.s_addr, 0); - if (nk->port[1] != pd->hdr.icmp.icmp_id) { + if (virtual_type == ICMP_ECHO && + nk->port[pd->sidx] != pd->hdr.icmp.icmp_id) { pd->hdr.icmp.icmp_cksum = pf_cksum_fixup( pd->hdr.icmp.icmp_cksum, sport, - nk->port[1], 0); - pd->hdr.icmp.icmp_id = nk->port[1]; + nk->port[pd->sidx], 0); + pd->hdr.icmp.icmp_id = nk->port[pd->sidx]; pd->sport = &pd->hdr.icmp.icmp_id; } m_copyback(m, off, ICMP_MINLEN, (caddr_t)&pd->hdr.icmp); @@ -4022,7 +4169,6 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, int direction, #endif /* INET */ #ifdef INET6 case IPPROTO_ICMPV6: - nk->port[0] = nk->port[1]; if (PF_ANEQ(saddr, &nk->addr[pd->sidx], AF_INET6)) pf_change_a6(saddr, &pd->hdr.icmp6.icmp6_cksum, &nk->addr[pd->sidx], 0); @@ -5812,15 +5958,73 @@ pf_multihome_scan_asconf(struct mbuf *m, int start, int len, return (pf_multihome_scan(m, start, len, pd, kif, SCTP_ADD_IP_ADDRESS)); } +int +pf_icmp_state_lookup(struct pf_state_key_cmp *key, struct pf_pdesc *pd, + struct pf_kstate **state, struct mbuf *m, int direction, struct pfi_kkif *kif, + u_int16_t icmpid, u_int16_t type, int icmp_dir, int *iidx, int multi) +{ + key->af = pd->af; + key->proto = pd->proto; + if (icmp_dir == PF_IN) { + *iidx = pd->sidx; + key->port[pd->sidx] = icmpid; + key->port[pd->didx] = type; + } else { + *iidx = pd->didx; + key->port[pd->sidx] = type; + key->port[pd->didx] = icmpid; + } + if (pd->af == AF_INET6 && multi != PF_ICMP_MULTI_NONE) { + switch (multi) { + case PF_ICMP_MULTI_SOLICITED: + key->addr[pd->sidx].addr32[0] = IPV6_ADDR_INT32_MLL; + key->addr[pd->sidx].addr32[1] = 0; + key->addr[pd->sidx].addr32[2] = IPV6_ADDR_INT32_ONE; + key->addr[pd->sidx].addr32[3] = pd->src->addr32[3]; + key->addr[pd->sidx].addr8[12] = 0xff; + break; + case PF_ICMP_MULTI_LINK: + key->addr[pd->sidx].addr32[0] = IPV6_ADDR_INT32_MLL; + key->addr[pd->sidx].addr32[1] = 0; + key->addr[pd->sidx].addr32[2] = 0; + key->addr[pd->sidx].addr32[3] = IPV6_ADDR_INT32_ONE; + break; + } + } else + PF_ACPY(&key->addr[pd->sidx], pd->src, key->af); + PF_ACPY(&key->addr[pd->didx], pd->dst, key->af); + + STATE_LOOKUP(kif, key, direction, *state, pd); + + /* Is this ICMP message flowing in right direction? */ + if ((*state)->rule.ptr->type && + (((*state)->direction == direction) ? + PF_IN : PF_OUT) != icmp_dir) { + if (V_pf_status.debug >= PF_DEBUG_MISC) { + printf("pf: icmp type %d in wrong direction (%d): ", + icmp_dir, pd->dir); + pf_print_state(*state); + printf("\n"); + } + return (PF_DROP); + } + return (-1); +} + static int pf_test_state_icmp(struct pf_kstate **state, int direction, struct pfi_kkif *kif, struct mbuf *m, int off, void *h, struct pf_pdesc *pd, u_short *reason) { struct pf_addr *saddr = pd->src, *daddr = pd->dst; - u_int16_t icmpid = 0, *icmpsum; + u_int16_t *icmpsum, virtual_id, virtual_type; u_int8_t icmptype, icmpcode; - int state_icmp = 0; + int icmp_dir, iidx, ret, multi; struct pf_state_key_cmp key; +#ifdef INET + u_int16_t icmpid; +#endif + + MPASS(*state == NULL); bzero(&key, sizeof(key)); switch (pd->proto) { @@ -5830,49 +6034,43 @@ pf_test_state_icmp(struct pf_kstate **state, int direction, struct pfi_kkif *kif icmpcode = pd->hdr.icmp.icmp_code; icmpid = pd->hdr.icmp.icmp_id; icmpsum = &pd->hdr.icmp.icmp_cksum; - - if (icmptype == ICMP_UNREACH || - icmptype == ICMP_SOURCEQUENCH || - icmptype == ICMP_REDIRECT || - icmptype == ICMP_TIMXCEED || - icmptype == ICMP_PARAMPROB) - state_icmp++; break; #endif /* INET */ #ifdef INET6 case IPPROTO_ICMPV6: icmptype = pd->hdr.icmp6.icmp6_type; icmpcode = pd->hdr.icmp6.icmp6_code; +#ifdef INET icmpid = pd->hdr.icmp6.icmp6_id; +#endif icmpsum = &pd->hdr.icmp6.icmp6_cksum; - - if (icmptype == ICMP6_DST_UNREACH || - icmptype == ICMP6_PACKET_TOO_BIG || - icmptype == ICMP6_TIME_EXCEEDED || - icmptype == ICMP6_PARAM_PROB) - state_icmp++; break; #endif /* INET6 */ } - if (!state_icmp) { + if (pf_icmp_mapping(pd, icmptype, &icmp_dir, &multi, + &virtual_id, &virtual_type) == 0) { /* * ICMP query/reply message not related to a TCP/UDP packet. * Search for an ICMP state. */ - key.af = pd->af; - key.proto = pd->proto; - key.port[0] = key.port[1] = icmpid; - if (direction == PF_IN) { /* wire side, straight */ - PF_ACPY(&key.addr[0], pd->src, key.af); - PF_ACPY(&key.addr[1], pd->dst, key.af); - } else { /* stack side, reverse */ - PF_ACPY(&key.addr[1], pd->src, key.af); - PF_ACPY(&key.addr[0], pd->dst, key.af); + ret = pf_icmp_state_lookup(&key, pd, state, m, pd->dir, + kif, virtual_id, virtual_type, icmp_dir, &iidx, + PF_ICMP_MULTI_NONE); + if (ret >= 0) { + if (ret == PF_DROP && pd->af == AF_INET6 && + icmp_dir == PF_OUT) { + if (*state != NULL) + PF_STATE_UNLOCK((*state)); + ret = pf_icmp_state_lookup(&key, pd, state, m, + pd->dir, kif, virtual_id, virtual_type, + icmp_dir, &iidx, multi); + if (ret >= 0) + return (ret); + } else + return (ret); } - STATE_LOOKUP(kif, &key, direction, *state, pd); - (*state)->expire = time_uptime; (*state)->timeout = PFTM_ICMP_ERROR_REPLY; @@ -5895,14 +6093,14 @@ pf_test_state_icmp(struct pf_kstate **state, int direction, struct pfi_kkif *kif pd->ip_sum, nk->addr[pd->didx].v4.s_addr, 0); - if (nk->port[0] != + if (nk->port[iidx] != pd->hdr.icmp.icmp_id) { pd->hdr.icmp.icmp_cksum = pf_cksum_fixup( pd->hdr.icmp.icmp_cksum, icmpid, - nk->port[pd->sidx], 0); + nk->port[iidx], 0); pd->hdr.icmp.icmp_id = - nk->port[pd->sidx]; + nk->port[iidx]; } m_copyback(m, off, ICMP_MINLEN, @@ -6267,13 +6465,15 @@ pf_test_state_icmp(struct pf_kstate **state, int direction, struct pfi_kkif *kif return (PF_DROP); } - key.af = pd2.af; - key.proto = IPPROTO_ICMP; - PF_ACPY(&key.addr[pd2.sidx], pd2.src, key.af); - PF_ACPY(&key.addr[pd2.didx], pd2.dst, key.af); - key.port[0] = key.port[1] = iih.icmp_id; + icmpid = iih.icmp_id; + pf_icmp_mapping(&pd2, iih.icmp_type, + &icmp_dir, &multi, &virtual_id, &virtual_type); - STATE_LOOKUP(kif, &key, direction, *state, pd); + ret = pf_icmp_state_lookup(&key, &pd2, state, m, + pd->dir, kif, virtual_id, virtual_type, + icmp_dir, &iidx, PF_ICMP_MULTI_NONE); + if (ret >= 0) + return (ret); /* translate source/destination address, if necessary */ if ((*state)->key[PF_SK_WIRE] != @@ -6283,21 +6483,23 @@ pf_test_state_icmp(struct pf_kstate **state, int direction, struct pfi_kkif *kif if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - nk->port[pd2.sidx] != iih.icmp_id) - pf_change_icmp(pd2.src, &iih.icmp_id, + (virtual_type == ICMP_ECHO && + nk->port[iidx] != iih.icmp_id)) + pf_change_icmp(pd2.src, + (virtual_type == ICMP_ECHO) ? + &iih.icmp_id : NULL, daddr, &nk->addr[pd2.sidx], - nk->port[pd2.sidx], NULL, + (virtual_type == ICMP_ECHO) ? + nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET); if (PF_ANEQ(pd2.dst, - &nk->addr[pd2.didx], pd2.af) || - nk->port[pd2.didx] != iih.icmp_id) - pf_change_icmp(pd2.dst, &iih.icmp_id, - saddr, &nk->addr[pd2.didx], - nk->port[pd2.didx], NULL, - pd2.ip_sum, icmpsum, - pd->ip_sum, 0, AF_INET); + &nk->addr[pd2.didx], pd2.af)) + pf_change_icmp(pd2.dst, NULL, NULL, + &nk->addr[pd2.didx], 0, NULL, + pd2.ip_sum, icmpsum, pd->ip_sum, 0, + AF_INET); m_copyback(m, off, ICMP_MINLEN, (caddr_t)&pd->hdr.icmp); m_copyback(m, ipoff2, sizeof(h2), (caddr_t)&h2); @@ -6319,13 +6521,25 @@ pf_test_state_icmp(struct pf_kstate **state, int direction, struct pfi_kkif *kif return (PF_DROP); } - key.af = pd2.af; - key.proto = IPPROTO_ICMPV6; - PF_ACPY(&key.addr[pd2.sidx], pd2.src, key.af); - PF_ACPY(&key.addr[pd2.didx], pd2.dst, key.af); - key.port[0] = key.port[1] = iih.icmp6_id; - - STATE_LOOKUP(kif, &key, direction, *state, pd); + pf_icmp_mapping(&pd2, iih.icmp6_type, + &icmp_dir, &multi, &virtual_id, &virtual_type); + ret = pf_icmp_state_lookup(&key, &pd2, state, m, + pd->dir, kif, virtual_id, virtual_type, + icmp_dir, &iidx, PF_ICMP_MULTI_NONE); + if (ret >= 0) { + if (ret == PF_DROP && pd->af == AF_INET6 && + icmp_dir == PF_OUT) { + if (*state != NULL) + PF_STATE_UNLOCK((*state)); + ret = pf_icmp_state_lookup(&key, pd, + state, m, pd->dir, kif, + virtual_id, virtual_type, + icmp_dir, &iidx, multi); + if (ret >= 0) + return (ret); + } else + return (ret); + } /* translate source/destination address, if necessary */ if ((*state)->key[PF_SK_WIRE] != @@ -6335,19 +6549,21 @@ pf_test_state_icmp(struct pf_kstate **state, int direction, struct pfi_kkif *kif if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - nk->port[pd2.sidx] != iih.icmp6_id) - pf_change_icmp(pd2.src, &iih.icmp6_id, + ((virtual_type == ICMP6_ECHO_REQUEST) && + nk->port[pd2.sidx] != iih.icmp6_id)) + pf_change_icmp(pd2.src, + (virtual_type == ICMP6_ECHO_REQUEST) + ? &iih.icmp6_id : NULL, daddr, &nk->addr[pd2.sidx], - nk->port[pd2.sidx], NULL, + (virtual_type == ICMP6_ECHO_REQUEST) + ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET6); if (PF_ANEQ(pd2.dst, - &nk->addr[pd2.didx], pd2.af) || - nk->port[pd2.didx] != iih.icmp6_id) - pf_change_icmp(pd2.dst, &iih.icmp6_id, - saddr, &nk->addr[pd2.didx], - nk->port[pd2.didx], NULL, + &nk->addr[pd2.didx], pd2.af)) + pf_change_icmp(pd2.dst, NULL, NULL, + &nk->addr[pd2.didx], 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET6); diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index 30013ab0d8d0..46d3ea8f508d 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -222,6 +222,23 @@ pf_get_sport(sa_family_t af, u_int8_t proto, struct pf_krule *r, if (pf_map_addr(af, r, saddr, naddr, &init_addr, sn)) return (1); + if (proto == IPPROTO_ICMP) { + if (*nport == htons(ICMP_ECHO)) { + low = 1; + high = 65535; + } else + return (0); /* Don't try to modify non-echo ICMP */ + } +#ifdef INET6 + if (proto == IPPROTO_ICMPV6) { + if (*nport == htons(ICMP6_ECHO_REQUEST)) { + low = 1; + high = 65535; + } else + return (0); /* Don't try to modify non-echo ICMP */ + } +#endif /* INET6 */ + bzero(&key, sizeof(key)); key.af = af; key.proto = proto; @@ -606,7 +623,7 @@ pf_get_translation(struct pf_pdesc *pd, struct mbuf *m, int off, int direction, switch (r->action) { case PF_NAT: if (pd->proto == IPPROTO_ICMP) { - low = 1; + low = 1; high = 65535; } else { low = r->rpool.proxy_port[0]; From nobody Wed Aug 7 13:44:54 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 4WfBHq2KM9z5S9PP; Wed, 07 Aug 2024 13:44:55 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHq0H9Fz4jqH; Wed, 7 Aug 2024 13:44:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038295; 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=H/R9FXYTz/ciFCFBpaouxYr0+voY3o/itVtR5PqxcM8=; b=mI9hbgBgVx7t5Qv44l4g0/a8jWx9xHuMAb3TaymX+r3WWEFHY9h/mSG2yXXZG4QL8kn/cl /DnRgwFftKce5ZTMXLdk79012Mjrt/VFPAXfv977fAyrVMm70SEN6Umb1UkNZWoLCHl0V6 iTiI2nwebFEYnlg2Vq0ld0ldhj/x9ZnE5v5iV1nqGqRRjnJIAzzM/E/kArERCUVuzlrnNU pyncufm5Dz7IMss9rrGPVgT1J7a+dyrHuS1PFioFWj09woTz0AcKrEyjzTSOa4GkQmB8bf km+LtVc8proZtbF5FE43VoYo5qHysIYV9gBYsiFA8gCCh06ocp+yDqaZ4lN2Yw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038295; a=rsa-sha256; cv=none; b=aNWYgiZ9mPhMLld5uuF+pl9WaLhFjXM1ULamQ2zVt4pVxKrpmxKzSzHknXEWhn6a9Rqean omO6OWqCmCzKzD5HnMlfFcv5lYRwM366KuKxe4oKmMPdkz4gMkN4PBfNk6QAvh1k5Afe7e NKR3VFA5/tzlQrT4AJuKyPSUEvO9zXW1klImKbCelOW0EhuVw+/mgu6AU5UeHKs4dniq8h J8BZzBr8O1bxamC37nTpVDRbzx12uPzTE+bakYF+4Rb9mv62HoF/vSQQta/ZnSwnAOy8/S XvgIb46vUJoh0cdsaBPDUHZe5lC/hMxR6WBN0aS34+uZVZURyE798VXNoypziw== 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=1723038295; 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=H/R9FXYTz/ciFCFBpaouxYr0+voY3o/itVtR5PqxcM8=; b=x39164fuaBw4MXpkUP6EX2bvxNt/ScRn3xol6mDgZ4JAvWzfeGf3w2QngM1NXPhm9mGVsc E5shbtuVscKlc4PM4kBimdQ5ScCCEW2qiwa6uIhbH9IZeY9ixf4KpfD2OoP6CB1jLzkXOD Vn4vph9VhV97jg8C6y7orZD73qw2lNJ7vuZSlTQsCQQOcT5NGMwbjxuW42GNiN5kpYxo0+ c31hpcUErkTdauzaKe++UQ0NungFEC4ofWanHHPtMBVH/GclVIzLkllhD1MDxf9BskAqyD KR7AAEP9X3kIoouxwQHd/K3595LcjQi2o/vznx5ZOQO3D6lOyRr7AbaHud5t+A== 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 4WfBHp70MBzsjS; Wed, 7 Aug 2024 13:44:54 +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 477Dis59034764; Wed, 7 Aug 2024 13:44:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477DiscO034761; Wed, 7 Aug 2024 13:44:54 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:54 GMT Message-Id: <202408071344.477DiscO034761@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: b778bbead38a - releng/13.3 - pf: some ICMP types that also have icmp_id, pointed out by markus@ 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.3 X-Git-Reftype: branch X-Git-Commit: b778bbead38ae9efa366a3542441c451e8fb1660 Auto-Submitted: auto-generated The branch releng/13.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b778bbead38ae9efa366a3542441c451e8fb1660 commit b778bbead38ae9efa366a3542441c451e8fb1660 Author: Kristof Provost AuthorDate: 2024-07-10 11:32:03 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:37:24 +0000 pf: some ICMP types that also have icmp_id, pointed out by markus@ ok henning markus Approved by: so Security: FreeBSD-SA-24:05.pf Security: CVE-2024-6640 MFC after: 1 day Obtained From: OpenBSD, mcbride 8c0632cd274b Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit e296b0de9e467b8c5eb853f6cf4c6ea28d4119a2) --- sys/netpfil/pf/pf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 1bdc695f698c..b0ef27b2e462 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1720,21 +1720,21 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, *icmp_dir = PF_IN; case ICMP_TSTAMPREPLY: *icmptype = ICMP_TSTAMP; - *icmpid = 0; /* Time is not a secret. */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_IREQ: *icmp_dir = PF_IN; case ICMP_IREQREPLY: *icmptype = ICMP_IREQ; - *icmpid = 0; /* Nothing sane to match on! */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_MASKREQ: *icmp_dir = PF_IN; case ICMP_MASKREPLY: *icmptype = ICMP_MASKREQ; - *icmpid = 0; /* Nothing sane to match on! */ + *icmpid = pd->hdr.icmp.icmp_id; break; case ICMP_IPV6_WHEREAREYOU: From nobody Wed Aug 7 13:44:55 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 4WfBHr35H6z5S99x; Wed, 07 Aug 2024 13:44:56 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHr0zrFz4jmf; Wed, 7 Aug 2024 13:44:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038296; 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=INPyKKyVFv3dz3DQu3+VKTxNdZuvaLJzKxehY1XZzs4=; b=Ugh3nZHFU0gk4B0xLX5XqX3+pR6GEvUQAqT0/OOmcZlUmMJ21+Gd5H+mYiLbbK344s2Ol8 EW1npeN+wkkFuqK6XzPFSnfO0Clyd0R9RQlXhfWLImjEJsHmNDvPKOVLqadqepq1O6nu+r yh4YC+ZXv9PEUwU28jK5Sn1DZe3XeO+oXXYZkjK5GZDTYGw84zTocf5zw1p0bwrgVQwA1L DB08Lao2N9H1KBjJYpk2cqXlk+Lax+4NpD8uOjOXIYgJi2qUamKURfC8SANzc2LOFN5Vol FdO8GPlENUOIHps6+M9VDzz6PThXTr8Zq6CQ6PyQc3AJfyYbia0IVaesbYNniw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038296; a=rsa-sha256; cv=none; b=eoFiiGdwpVkMp55Xcv2UrOqYT5f5GW9O0oUlyqZD0Bo06eWaejBLFf6T2A7WGpPwVGPcnw C8YiX02d/GpKR9mfUh+4wyDDpT4ss1ZiWINOp123q5jzy1HzjUVrdoO713CLAMthmTv4Hd DHU1nXCX64SnFmGAZCzBHO6GcJrTHmNHWt24Aiwp1h5/cwWW06eIrha9Tmoa1u6Kx6hbnr kH3jZ3a1fP6tlL6+7tfIFrX8deT4+avyOnoHoexsEnDsvFVNK+UtudboxmDVxpAIhUbAxK tHSkuaa7MBc6wyQfD15ugP8ge2ld7dCe46yS8l/MFByoYl3x15hySDFs2iKJjg== 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=1723038296; 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=INPyKKyVFv3dz3DQu3+VKTxNdZuvaLJzKxehY1XZzs4=; b=tt+sSVBPE8nbCt0MyD49JJZ4gh6cGitPJt8pKEEOLoR0HvQZr6tP99dt+d6XafhwoMXpKJ TnqSKxiunNBhvpvlFKH9/HneO4BGjNvZEUH1WRexfuWibAYWIZX0KlI12gASz0AYQfy4ox rxn6uryAtVVzwToWZkSOvr3DccjoN7fZEqqxT0Nn6/X4VZ0g0m/i2DmPdbb5GF7DuTR7gL izmBcKDZAYdrca5OG1HIPj6H9si944wkj4bt7cLrFaneSNH6XD0ai2xbWXcx1w28Ypoby+ AO0JP6m1d03+z6ks8ukUacLqmFcqIB4YlGI7f5MDtaXxL+mCrk7R5W2ve86JXQ== 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 4WfBHr0ZdTzspN; Wed, 7 Aug 2024 13:44:56 +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 477DitZ8034815; Wed, 7 Aug 2024 13:44:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477Dit82034812; Wed, 7 Aug 2024 13:44:55 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:55 GMT Message-Id: <202408071344.477Dit82034812@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: dcc05aee1495 - releng/13.3 - pf: split ICMP/ICMPv6 number space in pf_icmp_mapping() 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.3 X-Git-Reftype: branch X-Git-Commit: dcc05aee14951f35e5d66082d82a58298bc79d5b Auto-Submitted: auto-generated The branch releng/13.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=dcc05aee14951f35e5d66082d82a58298bc79d5b commit dcc05aee14951f35e5d66082d82a58298bc79d5b Author: Kristof Provost AuthorDate: 2024-07-10 12:10:50 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:37:28 +0000 pf: split ICMP/ICMPv6 number space in pf_icmp_mapping() In pf_icmp_mapping() the ICMP and ICMPv6 types shared the same number space. In fact they are independent and must be handled separately. Fix traceroute via pf by splitting pf_icmp_mapping() into IPv4 and IPv6 sections. ok henning@ mcbride@; tested mcbride@; sure deraadt@ Approved by: so Security: FreeBSD-SA-24:05.pf Security: CVE-2024-6640 MFC after: 1 day Obtained From: OpenBSD, bluhm ef4bccd7509e Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 46755f52247bd34a7f013d6844ed0c673ac0defc) --- sys/netpfil/pf/pf.c | 247 ++++++++++++++++++++++++++++------------------------ 1 file changed, 135 insertions(+), 112 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index b0ef27b2e462..388d632e8d50 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1698,7 +1698,7 @@ pf_isforlocal(struct mbuf *m, int af) int pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, - int *icmp_dir, int *multi, u_int16_t *icmpid, u_int16_t *icmptype) + int *icmp_dir, int *multi, u_int16_t *virtual_id, u_int16_t *virtual_type) { /* * ICMP types marked with PF_OUT are typically responses to @@ -1708,128 +1708,151 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, *icmp_dir = PF_OUT; *multi = PF_ICMP_MULTI_LINK; /* Queries (and responses) */ - switch (type) { - case ICMP_ECHO: - *icmp_dir = PF_IN; - case ICMP_ECHOREPLY: - *icmptype = ICMP_ECHO; - *icmpid = pd->hdr.icmp.icmp_id; - break; + switch (pd->af) { +#ifdef INET + case AF_INET: + switch (type) { + case ICMP_ECHO: + *icmp_dir = PF_IN; + case ICMP_ECHOREPLY: + *virtual_type = ICMP_ECHO; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_TSTAMP: - *icmp_dir = PF_IN; - case ICMP_TSTAMPREPLY: - *icmptype = ICMP_TSTAMP; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_TSTAMP: + *icmp_dir = PF_IN; + case ICMP_TSTAMPREPLY: + *virtual_type = ICMP_TSTAMP; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_IREQ: - *icmp_dir = PF_IN; - case ICMP_IREQREPLY: - *icmptype = ICMP_IREQ; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_IREQ: + *icmp_dir = PF_IN; + case ICMP_IREQREPLY: + *virtual_type = ICMP_IREQ; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_MASKREQ: - *icmp_dir = PF_IN; - case ICMP_MASKREPLY: - *icmptype = ICMP_MASKREQ; - *icmpid = pd->hdr.icmp.icmp_id; - break; + case ICMP_MASKREQ: + *icmp_dir = PF_IN; + case ICMP_MASKREPLY: + *virtual_type = ICMP_MASKREQ; + *virtual_id = pd->hdr.icmp.icmp_id; + break; - case ICMP_IPV6_WHEREAREYOU: - *icmp_dir = PF_IN; - case ICMP_IPV6_IAMHERE: - *icmptype = ICMP_IPV6_WHEREAREYOU; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_IPV6_WHEREAREYOU: + *icmp_dir = PF_IN; + case ICMP_IPV6_IAMHERE: + *virtual_type = ICMP_IPV6_WHEREAREYOU; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case ICMP_MOBILE_REGREQUEST: - *icmp_dir = PF_IN; - case ICMP_MOBILE_REGREPLY: - *icmptype = ICMP_MOBILE_REGREQUEST; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_MOBILE_REGREQUEST: + *icmp_dir = PF_IN; + case ICMP_MOBILE_REGREPLY: + *virtual_type = ICMP_MOBILE_REGREQUEST; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case ICMP_ROUTERSOLICIT: - *icmp_dir = PF_IN; - case ICMP_ROUTERADVERT: - *icmptype = ICMP_ROUTERSOLICIT; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ICMP_ROUTERSOLICIT: + *icmp_dir = PF_IN; + case ICMP_ROUTERADVERT: + *virtual_type = ICMP_ROUTERSOLICIT; + *virtual_id = 0; /* Nothing sane to match on! */ + break; -#ifdef INET6 - case ICMP6_ECHO_REQUEST: - *icmp_dir = PF_IN; - case ICMP6_ECHO_REPLY: - *icmptype = ICMP6_ECHO_REQUEST; - *icmpid = pd->hdr.icmp6.icmp6_id; - break; + /* These ICMP types map to other connections */ + case ICMP_UNREACH: + case ICMP_SOURCEQUENCH: + case ICMP_REDIRECT: + case ICMP_TIMXCEED: + case ICMP_PARAMPROB: + /* These will not be used, but set them anyway */ + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + HTONS(*virtual_type); + return (1); /* These types match to another state */ - case MLD_LISTENER_QUERY: - *icmp_dir = PF_IN; - case MLD_LISTENER_REPORT: { - *icmptype = MLD_LISTENER_QUERY; - *icmpid = 0; + /* + * All remaining ICMP types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + break; + } break; - } +#endif /* INET */ +#ifdef INET6 + case AF_INET6: + switch (type) { + case ICMP6_ECHO_REQUEST: + *icmp_dir = PF_IN; + case ICMP6_ECHO_REPLY: + *virtual_type = ICMP6_ECHO_REQUEST; + *virtual_id = pd->hdr.icmp6.icmp6_id; + break; - /* ICMP6_FQDN and ICMP6_NI query/reply are the same type as ICMP6_WRU */ - case ICMP6_WRUREQUEST: - *icmp_dir = PF_IN; - case ICMP6_WRUREPLY: - *icmptype = ICMP6_WRUREQUEST; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case MLD_LISTENER_QUERY: + *icmp_dir = PF_IN; + case MLD_LISTENER_REPORT: { + *virtual_type = MLD_LISTENER_QUERY; + *virtual_id = 0; + break; + } + case MLD_MTRACE: + *icmp_dir = PF_IN; + case MLD_MTRACE_RESP: + *virtual_type = MLD_MTRACE; + *virtual_id = 0; /* Nothing sane to match on! */ + break; - case MLD_MTRACE: - *icmp_dir = PF_IN; - case MLD_MTRACE_RESP: - *icmptype = MLD_MTRACE; - *icmpid = 0; /* Nothing sane to match on! */ - break; + case ND_NEIGHBOR_SOLICIT: + *icmp_dir = PF_IN; + case ND_NEIGHBOR_ADVERT: { + *virtual_type = ND_NEIGHBOR_SOLICIT; + *virtual_id = 0; + break; + } - case ND_NEIGHBOR_SOLICIT: - *icmp_dir = PF_IN; - case ND_NEIGHBOR_ADVERT: { - *icmptype = ND_NEIGHBOR_SOLICIT; - *multi = PF_ICMP_MULTI_SOLICITED; - *icmpid = 0; + /* + * These ICMP types map to other connections. + * ND_REDIRECT can't be in this list because the triggering + * packet header is optional. + */ + case ICMP6_DST_UNREACH: + case ICMP6_PACKET_TOO_BIG: + case ICMP6_TIME_EXCEEDED: + case ICMP6_PARAM_PROB: + /* These will not be used, but set them anyway */ + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + HTONS(*virtual_type); + return (1); /* These types match to another state */ + /* + * All remaining ICMP6 types get their own states, + * and will only match in one direction. + */ + default: + *icmp_dir = PF_IN; + *virtual_type = type; + *virtual_id = 0; + break; + } break; - } - #endif /* INET6 */ - /* These ICMP types map to other connections */ - case ICMP_UNREACH: - case ICMP_SOURCEQUENCH: - case ICMP_REDIRECT: - case ICMP_TIMXCEED: - case ICMP_PARAMPROB: -#ifdef INET6 - /* - * ICMP6_TIME_EXCEEDED is the same type as ICMP_UNREACH - * ND_REDIRECT can't be in this list because the triggering packet - * header is optional. - */ - case ICMP6_PACKET_TOO_BIG: -#endif /* INET6 */ - /* These will not be used, but set them anyways */ - *icmp_dir = PF_IN; - *icmptype = htons(type); - *icmpid = 0; - return (1); /* These types are matched to other state */ - /* - * All remaining ICMP types get their own states, - * and will only match in one direction. - */ default: *icmp_dir = PF_IN; - *icmptype = type; - *icmpid = 0; + *virtual_type = type; + *virtual_id = 0; break; } - HTONS(*icmptype); - return (0); + HTONS(*virtual_type); + return (0); /* These types match to their own state */ } void @@ -4156,7 +4179,7 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, int direction, pf_change_a(&daddr->v4.s_addr, pd->ip_sum, nk->addr[pd->didx].v4.s_addr, 0); - if (virtual_type == ICMP_ECHO && + if (virtual_type == htons(ICMP_ECHO) && nk->port[pd->sidx] != pd->hdr.icmp.icmp_id) { pd->hdr.icmp.icmp_cksum = pf_cksum_fixup( pd->hdr.icmp.icmp_cksum, sport, @@ -6483,13 +6506,13 @@ pf_test_state_icmp(struct pf_kstate **state, int direction, struct pfi_kkif *kif if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - (virtual_type == ICMP_ECHO && + (virtual_type == htons(ICMP_ECHO) && nk->port[iidx] != iih.icmp_id)) pf_change_icmp(pd2.src, - (virtual_type == ICMP_ECHO) ? + (virtual_type == htons(ICMP_ECHO)) ? &iih.icmp_id : NULL, daddr, &nk->addr[pd2.sidx], - (virtual_type == ICMP_ECHO) ? + (virtual_type == htons(ICMP_ECHO)) ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET); @@ -6549,13 +6572,13 @@ pf_test_state_icmp(struct pf_kstate **state, int direction, struct pfi_kkif *kif if (PF_ANEQ(pd2.src, &nk->addr[pd2.sidx], pd2.af) || - ((virtual_type == ICMP6_ECHO_REQUEST) && + ((virtual_type == htons(ICMP6_ECHO_REQUEST)) && nk->port[pd2.sidx] != iih.icmp6_id)) pf_change_icmp(pd2.src, - (virtual_type == ICMP6_ECHO_REQUEST) + (virtual_type == htons(ICMP6_ECHO_REQUEST)) ? &iih.icmp6_id : NULL, daddr, &nk->addr[pd2.sidx], - (virtual_type == ICMP6_ECHO_REQUEST) + (virtual_type == htons(ICMP6_ECHO_REQUEST)) ? nk->port[iidx] : 0, NULL, pd2.ip_sum, icmpsum, pd->ip_sum, 0, AF_INET6); From nobody Wed Aug 7 13:44:57 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 4WfBHs3Xlmz5S95V; Wed, 07 Aug 2024 13:44:57 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHs23KGz4jdw; Wed, 7 Aug 2024 13:44:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038297; 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=aMaySwb7vq2CuPoJwEa57L1urMSzK2x8zZFr1g5wCLI=; b=TSZWISSxkZyb0BjYk+O06aUwWXZ+A4+pCZEoUQpyOkLtwiFyyR3EHfE493pIYYlyt1YByD UcBWWVw4R6OmDQzs9ovjc6/fxc6WwGjGm+tZRux6+LjBSTIuJniXTZyPNguFpr0U1CqAVk AHSq1XzMA1F7LSOMasW1rTLQsjQTagteb9guTUW1ABpfiln7KbvBT2THyRjf2CZmqrV3Q9 eGIM/nXVi/VKcKP8tjaPTeFVJUn1tV4ba9N+fU2meaF+2QToe0ud29kohSofMKrngs0baL U8tIn0x+r3R8EYtEl+lWJh4g7h5tinz2BSO7Qm/u8Wi3GsLyKfRT+mFNY+qT9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038297; a=rsa-sha256; cv=none; b=FATnPAxikj5HkOnBzoJ92pDgpXpvU12JkR5HMHSSY8Ksk2NxE/IV87Wot4DS4AgfTc/shN p0WdB+YlEB/dB6G7HXIJFw8MUpL5z6vmQaP3zSHgFE5vmJNFPi/kmzCUPrnLEksyfuSqBf Z+K7+ycu+pBZ58f6rSgvZCrYFHRqU75U9GvBW0lCqj4tSTyiAEOSGEeBQ8w7j3fILn4JyO vD4qq4PnKihi8Aa3aX2LgzrxoBBYlqpc5RbvqeN3KLRbaaxcq5OXLBQCr7UQLP17QzZv48 AUkpaokS1CQ0KB9uuYEowz5kqk53pvAM/qAu+vxiitSPTzGRP5lmDrEgq8YUjg== 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=1723038297; 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=aMaySwb7vq2CuPoJwEa57L1urMSzK2x8zZFr1g5wCLI=; b=IRTr7s7HyZnRu++yrpQ5CO+/AYD2hytWHaAk0f0Nn/pyPdcF4+iBd1zghsL7vt+p3JzN2/ aSkynWTu7Yhkx6XIYHZL5SJzQaBCz0Baj6JutQg19aUozgS8OKGoKua20b7ciD3A1rVF78 8AyaZCEm2jueavJTgaYPbarXm2eHScdjLin/CTjF9xqzQ7zCHh66Ib/JjJYlVOMWZAtwCm uebZ9ATgOp13W3OyGlHWtJj3d6ozBN70LZ0Z4XcIELDOdX9Ylf+vEi+J4d4rVYY4iCG2HU bY6rXrSIgWGPdJyE9dEY2b3QeruI2ZsYJogWGvoYkpNoo1Sb3dY8Ll/SMenD5A== 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 4WfBHs1ghszsrb; Wed, 7 Aug 2024 13:44:57 +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 477DivCH034875; Wed, 7 Aug 2024 13:44:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477Dives034872; Wed, 7 Aug 2024 13:44:57 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:57 GMT Message-Id: <202408071344.477Dives034872@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: 5eb30c313cb0 - releng/13.3 - pf: allow MLD LR to be sent without state 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.3 X-Git-Reftype: branch X-Git-Commit: 5eb30c313cb051385d654f7bba36143ccb7dbf94 Auto-Submitted: auto-generated The branch releng/13.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5eb30c313cb051385d654f7bba36143ccb7dbf94 commit 5eb30c313cb051385d654f7bba36143ccb7dbf94 Author: Kristof Provost AuthorDate: 2024-07-10 12:36:18 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:37:32 +0000 pf: allow MLD LR to be sent without state Change PF behavior to allow MLD Listener Report packets to be sent without needing a previously created state by MLD Listener Query. It wasn't working because: (1) you might not have a previous MLD Listener Query and (2) the addresses of the Query and Report don't match. ok mikeb@, sashan@ Approved by: so Security: FreeBSD-SA-24:05.pf Security: CVE-2024-6640 MFC after: 1 day Obtained From: OpenBSD, rzalamena , 5c526dbdb0f2 Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 1afe4da75d1d2acd33b25eea942af28aa41c82c2) --- sys/netpfil/pf/pf.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 388d632e8d50..96d67d906a4e 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1797,8 +1797,15 @@ pf_icmp_mapping(struct pf_pdesc *pd, u_int8_t type, break; case MLD_LISTENER_QUERY: - *icmp_dir = PF_IN; case MLD_LISTENER_REPORT: { + /* + * Listener Report can be sent by clients + * without an associated Listener Query. + * In addition to that, when Report is sent as a + * reply to a Query its source and destination + * address are different. + */ + *icmp_dir = PF_IN; *virtual_type = MLD_LISTENER_QUERY; *virtual_id = 0; break; From nobody Wed Aug 7 13:44:59 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 4WfBHv5Dngz5S9MV; Wed, 07 Aug 2024 13:44:59 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHv3j6Lz4jtV; Wed, 7 Aug 2024 13:44:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038299; 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=eTlLAgViTIhXlqSuTBT8dANAVQ229Piddl/3g03oVec=; b=EoCBDPVTcaifNAqBhWjfBnODjM9E9bfWjrQGZm50HKWQpnc4EyYvBqtcqmZCdCnbc/bzHU QGh/zgdobUYb/gNmTgNLoBykqaZmCfugohnivusXcjWLllzmI50Q5s5OjzZ48sqDU2bUUh Yh5/rPgsGNBjWPK9N1wEk3DY8kXBwt9v3cue+Tc2Cct0n+RlfoHEIBGMBies1+GK9Ne0ov Wp3Vh17JQgtiahXSklEroeL/asGQ0MLxWZZ6fP2spzBMBcOM8ggpEbjnFWCRl2bf1JBerG 9/baqyz9po5Sds0T722kuMvegqZ9Zrauf4eQDrXnmbKSSFB5bzhJyD/wTB+weQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038299; a=rsa-sha256; cv=none; b=YMdHGCBp8QWT6zqidt+amEgOomaqgjogzk4qb78UyQyIG91ErIeTG3iWeJIVuXYEPX/sEz PKBdF7Jj8cC7u32+M33ny5NWBLHFPuKm9K1zx59XEee7g2HGefWQ6k9Mfm0/NcYqgE/nU/ 8e8HPoewL+CKbijIC7P3JKdlp/lKei5dSYZR9HQlBGfL4hwGeM3kcKGYXjz0ou3CbS7r8l CmTIPqgwAXvlL7a/XLpE7eFaF9XDYzaHkGy7RfNI0Wb6Tl/KJM4BTFsmmrgN0KHZGyxKjz XDt8RKkafYGRrS2IV/Ez05uhoRKkD6+bGuK/7coWxYTxeH834I36kHO1nAE4/Q== 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=1723038299; 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=eTlLAgViTIhXlqSuTBT8dANAVQ229Piddl/3g03oVec=; b=U0MfXqufRiqqhoNOi+udjQNiLElVoHlbB3SIhHYQ0p4/mcgEHa4pet0eP3QCCRC7QQnAgr FFHkeYIbf+0wydkC1bvDKmE2X9ui7FRTk2+6JVBduQHH/7nb+MAZE/QvCa17ei/YeVusdZ vqt28AFWAmXYEvRlQkkegP1zaOS2pouI8AYWZYfolYuD+kTelGqaqPV1viULfYfnIMJg/Q uGN8lUpfkmhfq/SMjzB4fkvYXPyZOw4qiLMJvZTrjUtRFI19pmuNgJVdDel8uEEeT/5B3I qFUN4hSWeV77ut1tGjYEdU/Q5rUPGlATSeUadrhkYmSQAlUjjAzlFHy37QDLYQ== 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 4WfBHv3JVLzsgh; Wed, 7 Aug 2024 13:44:59 +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 477Dixah034967; Wed, 7 Aug 2024 13:44:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477Dixbd034964; Wed, 7 Aug 2024 13:44:59 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:44:59 GMT Message-Id: <202408071344.477Dixbd034964@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: 769536bcb5c3 - releng/13.3 - ktrace: Fix an inverted privilege check 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.3 X-Git-Reftype: branch X-Git-Commit: 769536bcb5c334ca551b4dc88cf7486bd960e192 Auto-Submitted: auto-generated The branch releng/13.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=769536bcb5c334ca551b4dc88cf7486bd960e192 commit 769536bcb5c334ca551b4dc88cf7486bd960e192 Author: Mark Johnston AuthorDate: 2024-08-07 13:38:54 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:43:45 +0000 ktrace: Fix an inverted privilege check Approved by: so Security: FreeBSD-SA-24:06.ktrace Security: CVE-2024-6760 Fixes: 1762f674ccb5 ("ktrace: pack all ktrace parameters into allocated structure ktr_io_params") (cherry picked from commit 166b7573b5220aadf8b02a85933c9651b909b309) (cherry picked from commit f702110bc4bcc593b38674ec6e4fadf6c4626432) --- sys/kern/kern_ktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 2729d0880b31..cc51dbae46f7 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -585,7 +585,7 @@ ktrprocexec(struct proc *p) PROC_LOCK_ASSERT(p, MA_OWNED); kiop = p->p_ktrioparms; - if (kiop == NULL || priv_check_cred(kiop->cr, PRIV_DEBUG_DIFFCRED)) + if (kiop == NULL || priv_check_cred(kiop->cr, PRIV_DEBUG_DIFFCRED) == 0) return (NULL); mtx_lock(&ktrace_mtx); From nobody Wed Aug 7 13:45:00 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 4WfBHx1Jh1z5S9PS; Wed, 07 Aug 2024 13:45:01 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBHw52tFz4jx1; Wed, 7 Aug 2024 13:45:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723038300; 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=9B/S2y3w05Ma/ybRKcA+uRwdMK4l3XpCPMy4rWhdoQw=; b=oxgOzVRzIXxxMeQotU5LJWjffJJFz6PWFbMpPbrH4oI3PXcARyKuR7sb+/2sdCIM/eSszA p55jCMEyrModAU9otonNdzI03Huc4imSuwOkw4Dc1SmBKY3k9YG4BHrRhPJnzbY74O55xV fkg33iN/fusLVgSA11tfUR9ZWdbQOV1nmsm76KhKVs7DZ2kC+vxdLLw5XlzE378qASmRpz nHszllgNDk8GkQOM1xx2DUI4lDZIjfrCxXOSmiz4tLFaqVAnuxBn/JIIp3CaOghsOhXz8X /H0nPmoA2B2rFH/Z1adH5kBhJovy2As+pk93JJWwBTMPCVXrrUFydhHhx0cmew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723038300; a=rsa-sha256; cv=none; b=rMOOuVypLlDphjSGGV5t8Z/0zxFRzblN2yq+d3qyN2ysVTHRN1dErdGzFtNFiea0um5iQd tr7evJW41Bw2s4ztrbi0wYyos+JEtUNre6tyXpy4OhSmeOj3m90pNDtiMxItFg0sE7cwSO O5WOR+gYvJK6EgnqOuuS8Vp2YJcYM1YcFpxaWYYCjFO8OopsqmSXb5BUnVGU6O9uOQjJl+ DuftnZvDycLkcRbQOwisTfel6oC4UpSF1odC55Dzymg/RJQ0dOXnRp8oLOeVLBk+kiQ1L6 poqLoDxODgswtCEshW42vtc3FqzQaFAgllSY9peTKJIcDb1EZn+l1YJkp6lJ/Q== 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=1723038300; 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=9B/S2y3w05Ma/ybRKcA+uRwdMK4l3XpCPMy4rWhdoQw=; b=W+IhjsTUL0E9cJ6gGX5tVBDbGsvF3ZwJOoBN07UkXCUrQo2rho2JHSYO3ozpF76Aw5h/XU 7SxyB1NsOQvaN/LZ5H+KliAT+eTur0neSBC6kzUXgNGRFVlkoKETip6XOldtkRWjfge2kq XkKRO/SIenBNeIlGoRIUeAq6PFmLB1iQTJ/VsQt9osndKa2PkoEVZRwJ5McSDkyTR1fwfT 5H2SpXF+zKNsusgdb4iu6d/NQACRyD+vu3fEVP9sHXhKRvKYCx1Z6khKlDXkqAzyZnlOcs UlzK32QgIdvoY5MahZF0nBTK5jsf9wFjNsBqsC7LksYDGOdN0lAM25QNDfKbTg== 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 4WfBHw4dBTzt40; Wed, 7 Aug 2024 13:45:00 +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 477Dj0JD035037; Wed, 7 Aug 2024 13:45:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477Dj07V035034; Wed, 7 Aug 2024 13:45:00 GMT (envelope-from git) Date: Wed, 7 Aug 2024 13:45:00 GMT Message-Id: <202408071345.477Dj07V035034@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: f5a50714b4c9 - releng/13.3 - Add UPDATING entries and bump the branch version 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.3 X-Git-Reftype: branch X-Git-Commit: f5a50714b4c982c9e122abf5a9e12585addb9584 Auto-Submitted: auto-generated The branch releng/13.3 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f5a50714b4c982c9e122abf5a9e12585addb9584 commit f5a50714b4c982c9e122abf5a9e12585addb9584 Author: Mark Johnston AuthorDate: 2024-08-06 22:29:36 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 13:43:48 +0000 Add UPDATING entries and bump the branch version Approved by: so --- UPDATING | 14 ++++++++++++++ sys/conf/newvers.sh | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index cfeb99794e88..8ec49065a2e0 100644 --- a/UPDATING +++ b/UPDATING @@ -12,6 +12,20 @@ Items affecting the ports and packages system can be found in /usr/ports/UPDATING. Please read that file before updating system packages and/or ports. +20240806: + 13.3-RELEASE-p5 SA-24:05.pf + SA-24:06.ktrace + SA-24:07.nfsclient + SA-24:08.openssh + + pf incorrectly matches different ICMPv6 states in the state table [SA-24:05.pf] + + ktrace(2) fails to detach when executing a setuid binary [SA-24:06.ktrace] + + NFS client accepts file names containing path separators [SA-24:07.nfsclient] + + OpenSSH pre-authentication async signal safety issue [SA-24:08.openssh] + 20240701: 13.3-RELEASE-p4 SA-24:04.openssh diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index a98b62ded09e..a1f0f7b0d08e 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="13.3" -BRANCH="RELEASE-p4" +BRANCH="RELEASE-p5" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Wed Aug 7 14:07:18 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 4WfBnf48hyz5SC1F; Wed, 07 Aug 2024 14:07:18 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfBnf3dK5z4sBK; Wed, 7 Aug 2024 14:07:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723039638; 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=gH5/X5AAk3b8ov7o7ncrRRiumfykykIZdd8n3j0kkLU=; b=aZ2zY9qiV+YthK5moTYYx+bDzpQYTCJOm/igUWcjLarFN9tbrZ1CV423IQXTUV6tk39uI3 e0g9B/+Ii6We8uqDFq41riryPlmV0X1Hsdp4GHI5c3BwymkYyUlc6DQUThp6Fi6LFjT63k TBfrNCscqQZejrsScO2cx/Y0U3an0aYrh3pIGqgsrwMgwnx/jmq8jOOTHEzJx7yPfTddt2 a5OrfSiNxOcWJLBZR1EAXq+CSeiA420dVBhztMhA/y4v99foAMXyw56uN2+7w9zglvfE55 tn/AIiK1Uo4ZQTMglGPHK3mVvwNM6wa22rSyC8M2w4Y2gR/svdidOW4RDsLJdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723039638; a=rsa-sha256; cv=none; b=JoYI4Cl+FGQSbxzKbJj/fUyPSFzesxAH6pcSu/UNtoA/T7abOGznkoVN0U5aswnd/2Y9fW F9qCac5/4Vo8aIO47uvj+ZiZPB2NQPq5TuGGlVL4uORngAXiO9rGXj1xz6MLvrcSfPMoMx Mx70YYcyyuphwGH2oVE41yFxHsTs6TpnNmEjbVgsBK4aIEbXB43MYeN6k5sr730l53lQL5 vm9R5O0xcKcJwyXOPWP2sQvfPlPMU1hgy+3nkJk56kRpazLwxikFLvSUX0KN4c8CdNU6gt BxipaeJsWFnngTMimEdttPESFkzr1NSowTOb3V0j3UroeeUMe2PhYM1q6eE/Xw== 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=1723039638; 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=gH5/X5AAk3b8ov7o7ncrRRiumfykykIZdd8n3j0kkLU=; b=fMzQJ09AJKPQglCnvtH2vO1G3w1BzvXYnEmjRdu/ZDMkjk1Nl3Xf9To15Jpib0eEeqDrtV z7zppxMZqQpig5TwzLCGJlUx6TLII2i1shoSGCYrBb8XT4eLHCAUJqhSKtnJBlDj1sfGyF gncFwMjqhq1ARXo6Afjd7InqergYyUZ7xWF1ygOluiDO3gtQ7YqGEJp6Yz2FZ+nyTk6rBc LwuM6KnB7LEOFhbnKUzNq9f7+Iqb91PLeEYJmdio5jHmjNKRqqDy/L4zosBKrWmxgrz0K3 HnqMNEeEyZEpRUci2wlHewVE2O3cr6LLbIVQmgHyCEd4Xy8igOAnF87Fe1BkOQ== 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 4WfBnf3DK6ztLR; Wed, 7 Aug 2024 14:07:18 +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 477E7Inu070419; Wed, 7 Aug 2024 14:07:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477E7IiN070416; Wed, 7 Aug 2024 14:07:18 GMT (envelope-from git) Date: Wed, 7 Aug 2024 14:07:18 GMT Message-Id: <202408071407.477E7IiN070416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Morozovsky Subject: git: 2c2916a3ec38 - main - mailer.conf for sendmail: remove duplicate word. 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: marck X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2c2916a3ec3805ff7815633c0bf90c4339016821 Auto-Submitted: auto-generated The branch main has been updated by marck: URL: https://cgit.FreeBSD.org/src/commit/?id=2c2916a3ec3805ff7815633c0bf90c4339016821 commit 2c2916a3ec3805ff7815633c0bf90c4339016821 Author: Dmitry Morozovsky AuthorDate: 2024-08-07 14:03:12 +0000 Commit: Dmitry Morozovsky CommitDate: 2024-08-07 14:03:12 +0000 mailer.conf for sendmail: remove duplicate word. MFC after: 3 days --- etc/mail/mailer.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/mail/mailer.conf b/etc/mail/mailer.conf index 7947855fd2f7..f86403a9a68b 100644 --- a/etc/mail/mailer.conf +++ b/etc/mail/mailer.conf @@ -1,7 +1,7 @@ # # Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail # -# If dma(8) is installed, an example mailer.conf that uses dma(8) instead can +# If dma(8) is installed, an example mailer.conf that uses dma(8) instead # can be found in /usr/share/examples/dma. # sendmail /usr/libexec/sendmail/sendmail From nobody Wed Aug 7 14:18:58 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 4WfC370D3Xz5SD3r; Wed, 07 Aug 2024 14:18:59 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfC366nDBz4tJZ; Wed, 7 Aug 2024 14:18:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723040338; 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=jOPrFanYjzc21IpoOM5bNo4pFRln7XwP+erPiobmJXI=; b=mBRjkizjy/tBOdNCd0sXBPDVinYk1SaiEEeYuiEYjavlk6RKvWeriYM+AT5LN9d5L2KbGy s06tiPtc+eQCEp+zKYiNt7WGkTmbGM4WQaCPgVNjYEMlkc45KRCpKNBHmqH4kkQd6/SK4B /WEMXQRj1c7wlrzXz8lfnXBDx5sNcHCwhsu6i2rf+OguKHq/WKyILwxbI4ADLpsW10Gu0L vDQQlK99zMmbYjszzPRmYPikmXijrfUWGasBWMgNNt6pvNlLn06nCXyfYjshIV4WBBs7h0 vsp+itdBWJopBKgLftz1tW6S/SX67u/aOltPq6msWSIFxa8Oh0u3d2Vts/HNRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723040339; a=rsa-sha256; cv=none; b=TbDgeRICwDYKLPM0FXaQDUOCsXu8T6NBrSACZzbSe7gXdG5rceS5dqXZmGrAlQeR3r/rLY 6m398bsTLeEnM8OG1rU+E7T1EySi5JvdoWt5vbjpLISsmFOSxHFvfn8Y8QUpkiYHpNVddb kTk7+tDHUc49FmmyEZVu+hrJ01G2a/3LM1Vhwbe9Z+mR/0FfAbLyLNnuwy6aDpMzC8qT8t 8DlebMrU0F44mdK+Ce+27kgar+/53ny+jK4HqEH2yyXqqPdWGvqSuGj0jES3BG5TzC6m1m 8SEDrQ7g6Pg5DA2xjR5vvmijbQR6MfQiR/V3X+JujP3O5GBEmbKlpmQraSzmRw== 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=1723040338; 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=jOPrFanYjzc21IpoOM5bNo4pFRln7XwP+erPiobmJXI=; b=SY/72yiIlvsFkxTyTO3vYqSuEz1/4l3kRZrNLZ+RBpFOWLODmIrxqQc0GfiLE/pijUsOWV 5XuNaABu98Mp8XfMpzmE2Ubn/EJZCZ0M5rOoBBMDU3yN7D/jRZeSQSdY3Xg5l8YmjLuyTE WTY3zEopuZLrRJlGA32P3poEfICcvqSDYW7onSDiEKKopwEOHt+8E9Ug2kLSqnMghpDtxB Ohtr/t8Q3FRTYsIgxN40OqFI3FlX8DrY7xBJUYd2ZSK2pB/VmHZcNgj3Rq9LkuLcHK84/N SitBAsiX3X3ajo9tgUrNZkUOmP/rVtZmmZtdhYVE659+FRG7G3zUpta0TaKFyA== 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 4WfC366NFQztY2; Wed, 7 Aug 2024 14:18:58 +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 477EIwRt087287; Wed, 7 Aug 2024 14:18:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477EIwFr087284; Wed, 7 Aug 2024 14:18:58 GMT (envelope-from git) Date: Wed, 7 Aug 2024 14:18:58 GMT Message-Id: <202408071418.477EIwFr087284@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Clausecker Subject: git: 644d81447118 - stable/14 - lib/libc/amd64/string: fix overread condition in memccpy 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: fuz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 644d81447118692ced65bc63829998150a646bec Auto-Submitted: auto-generated The branch stable/14 has been updated by fuz: URL: https://cgit.FreeBSD.org/src/commit/?id=644d81447118692ced65bc63829998150a646bec commit 644d81447118692ced65bc63829998150a646bec Author: Robert Clausecker AuthorDate: 2024-07-20 19:53:04 +0000 Commit: Robert Clausecker CommitDate: 2024-08-07 14:18:40 +0000 lib/libc/amd64/string: fix overread condition in memccpy An overread condition in memccpy(dst, src, c, len) would occur if src does not cross a 16 byte boundary and there is no instance of c between *src and the next 16 byte boundary. This could cause a read fault if src is just before the end of a page and the next page is unmapped or unreadable. The bug is a consequence of basing memccpy() on the strlcpy() code: whereas strlcpy() assumes that src is a nul-terminated string and hence a terminator is always present, c may not be present at all in the source string. It was not caught earlier due to insufficient unit test design. As a part of the fix, the function is refactored such that the runt case (buffer length from last alignment boundary between 1 and 32 B) is handled separately. This reduces the number of conditional branches on all code paths and simplifies the handling of early matches in the non-runt case. Performance is improved slightly. os: FreeBSD arch: amd64 cpu: 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz │ memccpy.unfixed.out │ memccpy.fixed.out │ │ sec/op │ sec/op vs base │ Short 66.76µ ± 0% 62.45µ ± 1% -6.44% (p=0.000 n=20) Mid 7.938µ ± 0% 7.967µ ± 0% +0.36% (p=0.001 n=20) Long 3.577µ ± 0% 3.577µ ± 0% ~ (p=0.429 n=20) geomean 12.38µ 12.12µ -2.08% │ memccpy.unfixed.out │ memccpy.fixed.out │ │ B/s │ B/s vs base │ Short 1.744Gi ± 0% 1.864Gi ± 1% +6.89% (p=0.000 n=20) Mid 14.67Gi ± 0% 14.61Gi ± 0% -0.36% (p=0.001 n=20) Long 32.55Gi ± 0% 32.55Gi ± 0% ~ (p=0.429 n=20) geomean 9.407Gi 9.606Gi +2.12% Reported by: getz Reviewed by: getz Approved by: mjg (blanket, via IRC) See also: D46051 MFC: stable/14 Event: GSoC 2024 Differential Revision: https://reviews.freebsd.org/D46052 --- lib/libc/amd64/string/memccpy.S | 113 ++++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 56 deletions(-) diff --git a/lib/libc/amd64/string/memccpy.S b/lib/libc/amd64/string/memccpy.S index a2d9e33b3d36..69b650fffc33 100644 --- a/lib/libc/amd64/string/memccpy.S +++ b/lib/libc/amd64/string/memccpy.S @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 The FreeBSD Foundation + * Copyright (c) 2023, 2024 The FreeBSD Foundation * * This software was developed by Robert Clausecker * under sponsorship from the FreeBSD Foundation. @@ -83,34 +83,47 @@ ARCHENTRY(__memccpy, baseline) pshufd $0, %xmm4, %xmm4 # cccc -> cccccccccccccccc and $~0xf, %rsi movdqa %xmm4, %xmm1 - pcmpeqb (%rsi), %xmm1 # NUL found in head? - mov $-1, %r8d + pcmpeqb (%rsi), %xmm1 # c found in head? and $0xf, %ecx - shl %cl, %r8d # mask of bytes in the string - pmovmskb %xmm1, %eax + mov $-1, %eax + pmovmskb %xmm1, %r8d + lea -32(%rcx), %r11 + shl %cl, %eax # mask of bytes in the string + add %rdx, %r11 # distance from alignment boundary - 32 + jnc .Lrunt # jump if buffer length is 32 or less + and %r8d, %eax - jnz .Lhead_nul + jz 0f # match (or induced match) found? + + /* match in first chunk */ + tzcnt %eax, %edx # where is c? + sub %ecx, %edx # ... from the beginning of the string? + lea 1(%rdi, %rdx, 1), %rax # return value + jmp .L0116 - movdqa 16(%rsi), %xmm3 # load second string chunk +0: movdqa 16(%rsi), %xmm3 # load second string chunk movdqu (%r9), %xmm2 # load unaligned string head - mov $32, %r8d - sub %ecx, %r8d # head length + length of second chunk movdqa %xmm4, %xmm1 - pcmpeqb %xmm3, %xmm1 # NUL found in second chunk? - - sub %r8, %rdx # enough space left for the second chunk? - jb .Lhead_buf_end + pcmpeqb %xmm3, %xmm1 # c found in second chunk? /* process second chunk */ pmovmskb %xmm1, %eax test %eax, %eax - jnz .Lsecond_nul + jz 0f + + /* match in second chunk */ + tzcnt %eax, %edx # where is c? + sub $16, %ecx + sub %ecx, %edx # adjust for alignment offset + lea 1(%rdi, %rdx, 1), %rax # return value + jmp .L0132 - /* string didn't end in second chunk and neither did buffer -- not a runt! */ - movdqa 32(%rsi), %xmm0 # load next string chunk + /* c not found in second chunk: prepare for main loop */ +0: movdqa 32(%rsi), %xmm0 # load next string chunk movdqa %xmm4, %xmm1 movdqu %xmm2, (%rdi) # deposit head into buffer sub %rcx, %rdi # adjust RDI to correspond to RSI + mov %r11, %rdx movdqu %xmm3, 16(%rdi) # deposit second chunk sub %rsi, %rdi # express RDI as distance from RSI add $32, %rsi # advance RSI past first two chunks @@ -119,7 +132,7 @@ ARCHENTRY(__memccpy, baseline) /* main loop unrolled twice */ ALIGN_TEXT -0: pcmpeqb %xmm0, %xmm1 # NUL byte encountered? +0: pcmpeqb %xmm0, %xmm1 # c encountered? pmovmskb %xmm1, %eax test %eax, %eax jnz 3f @@ -131,7 +144,7 @@ ARCHENTRY(__memccpy, baseline) jb 2f add $32, %rsi # advance pointers to next chunk - pcmpeqb %xmm0, %xmm1 # NUL byte encountered? + pcmpeqb %xmm0, %xmm1 # c encountered? pmovmskb %xmm1, %eax test %eax, %eax jnz 4f @@ -146,11 +159,10 @@ ARCHENTRY(__memccpy, baseline) add $16, %edx /* 1--16 bytes left in the buffer but string has not ended yet */ -2: pcmpeqb %xmm1, %xmm0 # NUL byte encountered? +2: pcmpeqb %xmm1, %xmm0 # c encountered? pmovmskb %xmm0, %r8d mov %r8d, %ecx bts %edx, %r8d # treat end of buffer as end of string - or $0x10000, %eax # ensure TZCNT finds a set bit tzcnt %r8d, %r8d # find tail length add %rsi, %rdi # restore RDI movdqu 1(%rsi, %r8, 1), %xmm0 # load string tail @@ -162,42 +174,39 @@ ARCHENTRY(__memccpy, baseline) ret 4: sub $16, %rsi # undo second advancement - add $16, %rdx # restore number of remaining bytes - /* string has ended but buffer has not */ + /* terminator found and buffer has not ended yet */ 3: tzcnt %eax, %eax # find length of string tail - movdqu -15(%rsi, %rax, 1), %xmm0 # load string tail (incl. NUL) + movdqu -15(%rsi, %rax, 1), %xmm0 # load string tail (incl. c) add %rsi, %rdi # restore destination pointer - movdqu %xmm0, -15(%rdi, %rax, 1) # store string tail (incl. NUL) + movdqu %xmm0, -15(%rdi, %rax, 1) # store string tail (incl. c) lea 1(%rdi, %rax, 1), %rax # compute return value ret -.Lhead_buf_end: - pmovmskb %xmm1, %r8d - add $32, %edx # restore edx to (len-1) + ecx - shl $16, %r8d # place 2nd chunk NUL mask into bits 16--31 - mov %r8d, %r10d - bts %rdx, %r8 # treat end of buffer as if terminator present - xor %eax, %eax # return value if terminator not found - tzcnt %r8, %rdx # find string/buffer len from alignment boundary + /* buffer is 1--32 bytes in size */ + ALIGN_TEXT +.Lrunt: add $32, %r11d # undo earlier decrement + mov %r8d, %r10d # keep a copy of the original match mask + bts %r11d, %r8d # induce match at buffer end + and %ax, %r8w # is there a match in the first 16 bytes? + jnz 0f # if yes, skip looking at second chunk + + pcmpeqb 16(%rsi), %xmm4 # check for match in second chunk + pmovmskb %xmm4, %r8d + shl $16, %r8d # place second chunk matches in bits 16--31 + mov %r8d, %r10d # keep a copy of the original match mask + bts %r11d, %r8d # induce a match at buffer end + +0: xor %eax, %eax # return value if terminator not found + tzcnt %r8d, %edx # find string/buffer length from alignment boundary lea 1(%rdi, %rdx, 1), %r8 # return value if terminator found + rcx - sub %rcx, %r8 # subtract rcx - bt %rdx, %r10 # was the terminator present? + sub %rcx, %r8 + bt %edx, %r10d # was the terminator present? cmovc %r8, %rax # if yes, return pointer, else NULL - sub %ecx, %edx # find actual string/buffer len - jmp .L0132 + sub %ecx, %edx # find actual string/buffer length -.Lsecond_nul: - add %r8, %rdx # restore buffer length - tzcnt %eax, %r8d # where is the NUL byte? - lea -16(%rcx), %eax - sub %eax, %r8d # string length - lea 1(%rdi, %r8, 1), %rax # return value if NUL before end of buffer - xor %ecx, %ecx # return value if not - cmp %r8, %rdx # is the string shorter than the buffer? - cmova %r8, %rdx # copy only min(buflen, srclen) bytes - cmovb %rcx, %rax # return NUL if buffer ended before string -.L0132: cmp $16, %rdx # at least 17 bytes to copy (not incl NUL)? + ALIGN_TEXT +.L0132: cmp $16, %rdx # at least 17 bytes to copy? jb .L0116 /* copy 17--32 bytes */ @@ -207,16 +216,8 @@ ARCHENTRY(__memccpy, baseline) movdqu %xmm1, -15(%rdi, %rdx, 1) ret -.Lhead_nul: - tzcnt %eax, %r8d # where is the NUL byte? - sub %ecx, %r8d # ... from the beginning of the string? - lea 1(%rdi, %r8, 1), %rax # return value if NUL before end of buffer - xor %ecx, %ecx # return value if not - cmp %r8, %rdx # is the string shorter than the buffer? - cmova %r8, %rdx # copy only min(buflen, srclen) bytes - cmovb %rcx, %rax # return NUL if buffer ended before string - /* process strings of 1--16 bytes (rdx: min(buflen, srclen), rax: srclen) */ + ALIGN_TEXT .L0116: cmp $8, %rdx # at least 9 bytes to copy? jae .L0916 From nobody Wed Aug 7 14:37:13 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 4WfCS95yhwz5SFXd; Wed, 07 Aug 2024 14:37:13 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfCS95n6pz3ynC; Wed, 7 Aug 2024 14:37:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723041433; 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=KJZJ7Qk3RJChKI06i+rA8l6ey/lVyUd2GnVow2J0eFw=; b=rymLIIMCs7R/Y/2chwHWyCV84Wq39wu5PfeFOOB08H4G9Ddl+fHVk5k3Q8wIPN4RWkXq1R LRggmE/pSZD7mT/qp3tv7/pg9ohbtAAXk7Dtj9Zh9pWyy6qBI7yTj4SUBmSCfovFmHH4d+ BKCWugRDph8e3MlLusHNXlFRCRzZk0WLfSGAZ3n9x/zt5vjbQrP1vkzjAcVxUzkNbg8vhN wrRj+Y23oiN9IUtbzvMFc84hoyOqZ8jSUg1kQ5v1i1z01G/RgKIvkMfrULCl3el/WsPKK7 coweF36bspa/EZLyY71cnJJnjxvP4FH5wfOAIU/DMdZ9mCfHV0x++QBBIP0lBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723041433; a=rsa-sha256; cv=none; b=O8gRKNwRPnapNZP8tBx893i+daxHzdC8C/4lBoSaXZkCSCUCl1YRWJNW5xJ7xd5llxSEMW VD74QvEt60jDkUAMqEtE7py0xGb4g+XnIdP3jq0C8DEYkr8A+Z35wRrEb/Sw3Yqe8DP8O6 f4POKavroo2BAVx02/s/R1LK2roPptHP3Ir7ZP0/qPPVs/UPp6Kx6wE2R1zhHvFyM2KIrx ntJIv0GuYhH0WS2iMsCcEQxSJdES7iOwTyUvX7uFEcFVG7dvLZmtof63Hv+ZyYLugKkP7q J4xejU6N/S8Kj0y1zCTHJVem3RsBGpnXGTK1X3XwZB0hZV/UMn55muzVHhhojw== 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=1723041433; 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=KJZJ7Qk3RJChKI06i+rA8l6ey/lVyUd2GnVow2J0eFw=; b=Cfq8Zz5gM5AxmgHCVx3W2GIfEv6FRESZ/KEUhtVQPqPwtrDOi70tgtTorqgCI3Deiz6h40 8u9c5vjl9Fs+s+KXfqacv/WuVwNK7V9BZe1hUWk04Khm0k1CoJA2Zdxdh0OVswgUhFcXnU hrmdiClefoC4cRlDhSrl3dw/sgFGxcc4WJ7Dm+tgaoboBbHECzLV0WpnbZpOiL67zgoGou iOic62JnUJQuhSJ3uD2ZUA16z0CtD7Z0LgKOskUN+7Uuj+QFXtU+IEvO+CaQGnV4Busvsm 5fZ8uBLER5rl/oyYq3Phy1kLzb+h5M1zuSOfi51WMO69VEBSo8zDKgI1CkdR1A== 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 4WfCS95Nb5zv7k; Wed, 7 Aug 2024 14:37:13 +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 477EbDKI020535; Wed, 7 Aug 2024 14:37:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477EbDCr020532; Wed, 7 Aug 2024 14:37:13 GMT (envelope-from git) Date: Wed, 7 Aug 2024 14:37:13 GMT Message-Id: <202408071437.477EbDCr020532@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 969876fcee57 - main - ctld: parse config file independently of getting kernel info 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: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 969876fcee57ea1cb1c7b4d2ee757793cbfbe353 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=969876fcee57ea1cb1c7b4d2ee757793cbfbe353 commit 969876fcee57ea1cb1c7b4d2ee757793cbfbe353 Author: Alan Somers AuthorDate: 2024-06-10 23:48:49 +0000 Commit: Alan Somers CommitDate: 2024-08-07 14:36:52 +0000 ctld: parse config file independently of getting kernel info Separate the parsing of the config file from the reading of kernel port information. This has three benefits: * Separation of concerns makes future changes easier. * Allows the config file to be read earlier, which is necessary for fixing PR 271460. * Reduces total line count, by eliminating duplication between parse.y (for traditional config file) and uclparse.c (for UCL config file). MFC after: 2 weeks Sponsored by: Axcient Reviewed by: mav Pull Request: https://github.com/freebsd/freebsd-src/pull/1287 --- usr.sbin/ctld/ctld.c | 99 +++++++++++++++++++++++++++++++++++++----------- usr.sbin/ctld/ctld.h | 25 ++++++++---- usr.sbin/ctld/kernel.c | 6 +-- usr.sbin/ctld/parse.y | 37 +----------------- usr.sbin/ctld/uclparse.c | 37 ++---------------- 5 files changed, 100 insertions(+), 104 deletions(-) diff --git a/usr.sbin/ctld/ctld.c b/usr.sbin/ctld/ctld.c index bf2791040125..805648f0465f 100644 --- a/usr.sbin/ctld/ctld.c +++ b/usr.sbin/ctld/ctld.c @@ -98,7 +98,6 @@ conf_new(void) TAILQ_INIT(&conf->conf_auth_groups); TAILQ_INIT(&conf->conf_ports); TAILQ_INIT(&conf->conf_portal_groups); - TAILQ_INIT(&conf->conf_pports); TAILQ_INIT(&conf->conf_isns); conf->conf_isns_period = 900; @@ -117,7 +116,6 @@ conf_delete(struct conf *conf) struct target *targ, *tmp; struct auth_group *ag, *cagtmp; struct portal_group *pg, *cpgtmp; - struct pport *pp, *pptmp; struct isns *is, *istmp; assert(conf->conf_pidfh == NULL); @@ -130,8 +128,6 @@ conf_delete(struct conf *conf) auth_group_delete(ag); TAILQ_FOREACH_SAFE(pg, &conf->conf_portal_groups, pg_next, cpgtmp) portal_group_delete(pg); - TAILQ_FOREACH_SAFE(pp, &conf->conf_pports, pp_next, pptmp) - pport_delete(pp); TAILQ_FOREACH_SAFE(is, &conf->conf_isns, i_next, istmp) isns_delete(is); assert(TAILQ_EMPTY(&conf->conf_ports)); @@ -1177,27 +1173,27 @@ valid_iscsi_name(const char *name) } struct pport * -pport_new(struct conf *conf, const char *name, uint32_t ctl_port) +pport_new(struct kports *kports, const char *name, uint32_t ctl_port) { struct pport *pp; pp = calloc(1, sizeof(*pp)); if (pp == NULL) log_err(1, "calloc"); - pp->pp_conf = conf; + pp->pp_kports = kports; pp->pp_name = checked_strdup(name); pp->pp_ctl_port = ctl_port; TAILQ_INIT(&pp->pp_ports); - TAILQ_INSERT_TAIL(&conf->conf_pports, pp, pp_next); + TAILQ_INSERT_TAIL(&kports->pports, pp, pp_next); return (pp); } struct pport * -pport_find(const struct conf *conf, const char *name) +pport_find(const struct kports *kports, const char *name) { struct pport *pp; - TAILQ_FOREACH(pp, &conf->conf_pports, pp_next) { + TAILQ_FOREACH(pp, &kports->pports, pp_next) { if (strcasecmp(pp->pp_name, name) == 0) return (pp); } @@ -1205,11 +1201,11 @@ pport_find(const struct conf *conf, const char *name) } struct pport * -pport_copy(struct pport *pp, struct conf *conf) +pport_copy(struct pport *pp, struct kports *kports) { struct pport *ppnew; - ppnew = pport_new(conf, pp->pp_name, pp->pp_ctl_port); + ppnew = pport_new(kports, pp->pp_name, pp->pp_ctl_port); return (ppnew); } @@ -1220,7 +1216,7 @@ pport_delete(struct pport *pp) TAILQ_FOREACH_SAFE(port, &pp->pp_ports, p_ts, tport) port_delete(port); - TAILQ_REMOVE(&pp->pp_conf->conf_pports, pp, pp_next); + TAILQ_REMOVE(&pp->pp_kports->pports, pp, pp_next); free(pp->pp_name); free(pp); } @@ -1255,7 +1251,8 @@ port_new(struct conf *conf, struct target *target, struct portal_group *pg) } struct port * -port_new_ioctl(struct conf *conf, struct target *target, int pp, int vp) +port_new_ioctl(struct conf *conf, struct kports *kports, struct target *target, + int pp, int vp) { struct pport *pport; struct port *port; @@ -1269,7 +1266,7 @@ port_new_ioctl(struct conf *conf, struct target *target, int pp, int vp) return (NULL); } - pport = pport_find(conf, pname); + pport = pport_find(kports, pname); if (pport != NULL) { free(pname); return (port_new_pp(conf, target, pport)); @@ -1424,6 +1421,7 @@ target_delete(struct target *targ) port_delete(port); TAILQ_REMOVE(&targ->t_conf->conf_targets, targ, t_next); + free(targ->t_pport); free(targ->t_name); free(targ->t_redirection); free(targ); @@ -2686,21 +2684,17 @@ check_perms(const char *path) } static struct conf * -conf_new_from_file(const char *path, struct conf *oldconf, bool ucl) +conf_new_from_file(const char *path, bool ucl) { struct conf *conf; struct auth_group *ag; struct portal_group *pg; - struct pport *pp; int error; log_debugx("obtaining configuration from %s", path); conf = conf_new(); - TAILQ_FOREACH(pp, &oldconf->conf_pports, pp_next) - pport_copy(pp, conf); - ag = auth_group_new(conf, "default"); assert(ag != NULL); @@ -2755,9 +2749,60 @@ conf_new_from_file(const char *path, struct conf *oldconf, bool ucl) return (conf); } +/* + * If the config file specifies physical ports for any target, associate them + * with the config file. If necessary, create them. + */ +static int +new_pports_from_conf(struct conf *conf, struct kports *kports) +{ + struct target *targ; + struct pport *pp; + struct port *tp; + int ret, i_pp, i_vp; + + TAILQ_FOREACH(targ, &conf->conf_targets, t_next) { + if (!targ->t_pport) + continue; + + ret = sscanf(targ->t_pport, "ioctl/%d/%d", &i_pp, &i_vp); + if (ret > 0) { + tp = port_new_ioctl(conf, kports, targ, i_pp, i_vp); + if (tp == NULL) { + log_warnx("can't create new ioctl port " + "for target \"%s\"", targ->t_name); + return (1); + } + + continue; + } + + pp = pport_find(kports, targ->t_pport); + if (pp == NULL) { + log_warnx("unknown port \"%s\" for target \"%s\"", + targ->t_pport, targ->t_name); + return (1); + } + if (!TAILQ_EMPTY(&pp->pp_ports)) { + log_warnx("can't link port \"%s\" to target \"%s\", " + "port already linked to some target", + targ->t_pport, targ->t_name); + return (1); + } + tp = port_new_pp(conf, targ, pp); + if (tp == NULL) { + log_warnx("can't link port \"%s\" to target \"%s\"", + targ->t_pport, targ->t_name); + return (1); + } + } + return (0); +} + int main(int argc, char **argv) { + struct kports kports; struct conf *oldconf, *newconf, *tmpconf; struct isns *newns; const char *config_path = DEFAULT_CONFIG_PATH; @@ -2800,8 +2845,9 @@ main(int argc, char **argv) log_init(debug); kernel_init(); - oldconf = conf_new_from_kernel(); - newconf = conf_new_from_file(config_path, oldconf, use_ucl); + TAILQ_INIT(&kports.pports); + oldconf = conf_new_from_kernel(&kports); + newconf = conf_new_from_file(config_path, use_ucl); if (newconf == NULL) log_errx(1, "configuration error; exiting"); @@ -2814,6 +2860,9 @@ main(int argc, char **argv) newconf->conf_debug = debug; } + if (new_pports_from_conf(newconf, &kports)) + log_errx(1, "Error associating physical ports; exiting"); + error = conf_apply(oldconf, newconf); if (error != 0) log_errx(1, "failed to apply configuration; exiting"); @@ -2841,17 +2890,21 @@ main(int argc, char **argv) if (sighup_received) { sighup_received = false; log_debugx("received SIGHUP, reloading configuration"); - tmpconf = conf_new_from_file(config_path, newconf, - use_ucl); + tmpconf = conf_new_from_file(config_path, use_ucl); if (tmpconf == NULL) { log_warnx("configuration error, " "continuing with old configuration"); + } else if (new_pports_from_conf(tmpconf, &kports)) { + log_warnx("Error associating physical ports, " + "continuing with old configuration"); + conf_delete(tmpconf); } else { if (debug > 0) tmpconf->conf_debug = debug; oldconf = newconf; newconf = tmpconf; + error = conf_apply(oldconf, newconf); if (error != 0) log_warnx("failed to reload " diff --git a/usr.sbin/ctld/ctld.h b/usr.sbin/ctld/ctld.h index bcc3c1956dc4..e1bab1a8e3b8 100644 --- a/usr.sbin/ctld/ctld.h +++ b/usr.sbin/ctld/ctld.h @@ -131,10 +131,11 @@ struct portal_group { uint16_t pg_tag; }; +/* Ports created by the kernel. Perhaps the "p" means "physical" ? */ struct pport { TAILQ_ENTRY(pport) pp_next; TAILQ_HEAD(, port) pp_ports; - struct conf *pp_conf; + struct kports *pp_kports; char *pp_name; uint32_t pp_ctl_port; @@ -190,6 +191,8 @@ struct target { char *t_name; char *t_alias; char *t_redirection; + /* Name of this target's physical port, if any, i.e. "isp0" */ + char *t_pport; }; struct isns { @@ -206,7 +209,6 @@ struct conf { TAILQ_HEAD(, auth_group) conf_auth_groups; TAILQ_HEAD(, port) conf_ports; TAILQ_HEAD(, portal_group) conf_portal_groups; - TAILQ_HEAD(, pport) conf_pports; TAILQ_HEAD(, isns) conf_isns; int conf_isns_period; int conf_isns_timeout; @@ -224,6 +226,11 @@ struct conf { bool conf_kernel_port_on; }; +/* Physical ports exposed by the kernel */ +struct kports { + TAILQ_HEAD(, pport) pports; +}; + #define CONN_SESSION_TYPE_NONE 0 #define CONN_SESSION_TYPE_DISCOVERY 1 #define CONN_SESSION_TYPE_NORMAL 2 @@ -247,11 +254,11 @@ struct ctld_connection { struct chap *conn_chap; }; -int parse_conf(struct conf *conf, const char *path); +int parse_conf(struct conf *newconf, const char *path); int uclparse_conf(struct conf *conf, const char *path); struct conf *conf_new(void); -struct conf *conf_new_from_kernel(void); +struct conf *conf_new_from_kernel(struct kports *kports); void conf_delete(struct conf *conf); int conf_verify(struct conf *conf); @@ -305,15 +312,17 @@ void isns_register(struct isns *isns, struct isns *oldisns); void isns_check(struct isns *isns); void isns_deregister(struct isns *isns); -struct pport *pport_new(struct conf *conf, const char *name, +struct pport *pport_new(struct kports *kports, const char *name, uint32_t ctl_port); -struct pport *pport_find(const struct conf *conf, const char *name); -struct pport *pport_copy(struct pport *pport, struct conf *conf); +struct pport *pport_find(const struct kports *kports, + const char *name); +struct pport *pport_copy(struct pport *pp, struct kports *kports); void pport_delete(struct pport *pport); struct port *port_new(struct conf *conf, struct target *target, struct portal_group *pg); -struct port *port_new_ioctl(struct conf *conf, struct target *target, +struct port *port_new_ioctl(struct conf *conf, + struct kports *kports, struct target *target, int pp, int vp); struct port *port_new_pp(struct conf *conf, struct target *target, struct pport *pp); diff --git a/usr.sbin/ctld/kernel.c b/usr.sbin/ctld/kernel.c index ae455e7815f7..eed9f13d42fa 100644 --- a/usr.sbin/ctld/kernel.c +++ b/usr.sbin/ctld/kernel.c @@ -414,7 +414,7 @@ cctl_char_handler(void *user_data, const XML_Char *str, int len) } struct conf * -conf_new_from_kernel(void) +conf_new_from_kernel(struct kports *kports) { struct conf *conf = NULL; struct target *targ; @@ -559,13 +559,13 @@ retry_port: if (port->cfiscsi_target == NULL) { log_debugx("CTL port %u \"%s\" wasn't managed by ctld; ", port->port_id, name); - pp = pport_find(conf, name); + pp = pport_find(kports, name); if (pp == NULL) { #if 0 log_debugx("found new kernel port %u \"%s\"", port->port_id, name); #endif - pp = pport_new(conf, name, port->port_id); + pp = pport_new(kports, name, port->port_id); if (pp == NULL) { log_warnx("pport_new failed"); continue; diff --git a/usr.sbin/ctld/parse.y b/usr.sbin/ctld/parse.y index 8909df2a8345..d8274b623d3a 100644 --- a/usr.sbin/ctld/parse.y +++ b/usr.sbin/ctld/parse.y @@ -832,42 +832,7 @@ target_portal_group: PORTAL_GROUP STR STR target_port: PORT STR { - struct pport *pp; - struct port *tp; - int ret, i_pp, i_vp = 0; - - ret = sscanf($2, "ioctl/%d/%d", &i_pp, &i_vp); - if (ret > 0) { - tp = port_new_ioctl(conf, target, i_pp, i_vp); - if (tp == NULL) { - log_warnx("can't create new ioctl port for " - "target \"%s\"", target->t_name); - free($2); - return (1); - } - } else { - pp = pport_find(conf, $2); - if (pp == NULL) { - log_warnx("unknown port \"%s\" for target \"%s\"", - $2, target->t_name); - free($2); - return (1); - } - if (!TAILQ_EMPTY(&pp->pp_ports)) { - log_warnx("can't link port \"%s\" to target \"%s\", " - "port already linked to some target", - $2, target->t_name); - free($2); - return (1); - } - tp = port_new_pp(conf, target, pp); - if (tp == NULL) { - log_warnx("can't link port \"%s\" to target \"%s\"", - $2, target->t_name); - free($2); - return (1); - } - } + target->t_pport = strdup($2); free($2); } diff --git a/usr.sbin/ctld/uclparse.c b/usr.sbin/ctld/uclparse.c index 8bd1ca88d166..e9e42bdf953e 100644 --- a/usr.sbin/ctld/uclparse.c +++ b/usr.sbin/ctld/uclparse.c @@ -853,41 +853,10 @@ uclparse_target(const char *name, const ucl_object_t *top) } if (!strcmp(key, "port")) { - struct pport *pp; - struct port *tp; - const char *value = ucl_object_tostring(obj); - int ret, i_pp, i_vp = 0; - - ret = sscanf(value, "ioctl/%d/%d", &i_pp, &i_vp); - if (ret > 0) { - tp = port_new_ioctl(conf, target, i_pp, i_vp); - if (tp == NULL) { - log_warnx("can't create new ioctl port " - "for target \"%s\"", target->t_name); - return (1); - } + const char *value; - continue; - } - - pp = pport_find(conf, value); - if (pp == NULL) { - log_warnx("unknown port \"%s\" for target \"%s\"", - value, target->t_name); - return (1); - } - if (!TAILQ_EMPTY(&pp->pp_ports)) { - log_warnx("can't link port \"%s\" to target \"%s\", " - "port already linked to some target", - value, target->t_name); - return (1); - } - tp = port_new_pp(conf, target, pp); - if (tp == NULL) { - log_warnx("can't link port \"%s\" to target \"%s\"", - value, target->t_name); - return (1); - } + value = ucl_object_tostring(obj); + target->t_pport = strdup(value); } if (!strcmp(key, "redirect")) { From nobody Wed Aug 7 15:39:38 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 4WfDrB71BYz5STfl; Wed, 07 Aug 2024 15:39: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfDrB1gBMz4qQ9; Wed, 7 Aug 2024 15:39:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723045178; 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=hufMV83xBn++6ddYo+vRcVKc98QLGmSdhvLl1THLPI4=; b=PiR3twuh7pOkh+T7K1GxNI5IsrlBuEaQqjQPnNqKvrfjvL9euQbDBFrJRcpyY3XWlbEwg6 TnNTbc6qOIchP/V80hcxzag4Ejw1osW4Oib3lkf4Fe9b+ITVZT+15/X5uDV/uNqxeQLutU xt1FV69e8ys1IRxv8hwfjJOEG08FKPP72ZXrHcBo08CR7DI3uYRn6LRDWLi3YwNJ4jlcns r7pVmuVu1CoF9yoxwC/jhLA3zO5wXV/PIVuSZfNNgp1YiklZnjYMfoSwx149pTS7aCdVie DlfEvym/lH/511hiTX93R67FcA5NxjJY2MmPg+7LB9diEqc8/YX1QmDfUxQlYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723045178; a=rsa-sha256; cv=none; b=OypQ6Vwb6tbQXmDSLz1Zmi3Nt+0rTRQ8cCM/nNVD7AW5RczbaTcJjvgsJdPtA74kSS0/XO sAxYGrh/xtfrF7l/EP2XYX5gJyy4WPZYmMZh4uOOD1QkSn1J1UeTRBdjRC/8kag98OX4ds TM4mSSIbKfDTvBAY5DHcA2Da2XA/RYcbFkYaGrDhTJOUK8FifH/7ZnCoFqn5G2+ccKBMDv sATo58gAyje502+iI3+dvsAa4AI/f2xY9IVOgr+PawqjETSqwPg+99x0sD/HUcFrQcMmHY 5wawZ2k4T4IiXDzaZuZT9Xs6Tk/VMktpzl+3jcKzpAbGmMgSDbQR+Y7AxKj6Pw== 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=1723045178; 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=hufMV83xBn++6ddYo+vRcVKc98QLGmSdhvLl1THLPI4=; b=ou8Df/FngfOHi96PVfQaX86MIWMEha2qZP5xzJcJ4w23ucyDorNhZcaHPJp6mdP8xDYGYL RYsqOvRLV5tn+NY8X1nu40xF2vgSvFA+uwZ5HCYSch7z5eW5L9j51gPgYzqPR9SNHtWGG8 3ndIGKCm3rg4rr8xefziaIVV89XlfDsvV/qW4tE5IU1/MeJiUPj0VvAVCZLHdjV4fam8Tg jtsCSetJLs0TuN5kmiQ58GV1Omc6cDF4adCipjV+d/MxjhkwQ0Leq0ZfigyJrdjrxgqm6R GTm+MYlXIN/7ElYBIaZB+789Hb2M/QdGkItQg3xCZax6sgSwsznRP6DNLy3aOA== 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 4WfDrB1GYHzwlC; Wed, 7 Aug 2024 15:39:38 +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 477FdcK2023624; Wed, 7 Aug 2024 15:39:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477FdctO023621; Wed, 7 Aug 2024 15:39:38 GMT (envelope-from git) Date: Wed, 7 Aug 2024 15:39:38 GMT Message-Id: <202408071539.477FdctO023621@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: bd3aa40e0a55 - releng/13.4 - sshd: remove blacklist call from grace_alarm_timer 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: emaste X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.4 X-Git-Reftype: branch X-Git-Commit: bd3aa40e0a55f801abbb880c617f6c5695796d16 Auto-Submitted: auto-generated The branch releng/13.4 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=bd3aa40e0a55f801abbb880c617f6c5695796d16 commit bd3aa40e0a55f801abbb880c617f6c5695796d16 Author: Ed Maste AuthorDate: 2024-08-01 00:04:46 +0000 Commit: Ed Maste CommitDate: 2024-08-07 15:39:06 +0000 sshd: remove blacklist call from grace_alarm_timer Under certain circumstances it may call log(3), which is not async- signal-safe. For now just remove the blacklist integration from this path, which means that blacklistd will not detect and firewall hosts that establish a connection but do nothing further. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D46203 (cherry picked from commit 2739a6845031e69be7c03461a9335d8bbb9f59bd) (cherry picked from commit 3d3bae9b95388169d396adc8007585699c5a23e0) (cherry picked from commit 73466449a9bf1888147c53d622236cebc0aa591b) (cherry picked from commit d5f16ef6463d73270e4380f3498410c8ad91f495) Approved by: re (cperciva) --- crypto/openssh/ssh_config | 2 +- crypto/openssh/ssh_config.5 | 2 +- crypto/openssh/sshd.c | 2 -- crypto/openssh/sshd_config | 2 +- crypto/openssh/sshd_config.5 | 2 +- crypto/openssh/version.h | 2 +- 6 files changed, 5 insertions(+), 7 deletions(-) diff --git a/crypto/openssh/ssh_config b/crypto/openssh/ssh_config index 36c6c7785fd2..a047ce2deb93 100644 --- a/crypto/openssh/ssh_config +++ b/crypto/openssh/ssh_config @@ -44,4 +44,4 @@ # ProxyCommand ssh -q -W %h:%p gateway.example.com # RekeyLimit 1G 1h # UserKnownHostsFile ~/.ssh/known_hosts.d/%k -# VersionAddendum FreeBSD-20240318 +# VersionAddendum FreeBSD-20240806 diff --git a/crypto/openssh/ssh_config.5 b/crypto/openssh/ssh_config.5 index 020d254f7f0d..de1903ba43a2 100644 --- a/crypto/openssh/ssh_config.5 +++ b/crypto/openssh/ssh_config.5 @@ -2137,7 +2137,7 @@ in Specifies a string to append to the regular version string to identify OS- or site-specific modifications. The default is -.Dq FreeBSD-20240318 . +.Dq FreeBSD-20240806 . The value .Cm none may be used to disable this. diff --git a/crypto/openssh/sshd.c b/crypto/openssh/sshd.c index 0c83e0ea468e..889f2056bc75 100644 --- a/crypto/openssh/sshd.c +++ b/crypto/openssh/sshd.c @@ -377,8 +377,6 @@ grace_alarm_handler(int sig) kill(0, SIGTERM); } - BLACKLIST_NOTIFY(the_active_state, BLACKLIST_AUTH_FAIL, "ssh"); - /* Log error and exit. */ sigdie("Timeout before authentication for %s port %d", ssh_remote_ipaddr(the_active_state), diff --git a/crypto/openssh/sshd_config b/crypto/openssh/sshd_config index 54a1d9d486d0..866e905d9515 100644 --- a/crypto/openssh/sshd_config +++ b/crypto/openssh/sshd_config @@ -105,7 +105,7 @@ AuthorizedKeysFile .ssh/authorized_keys #PermitTunnel no #ChrootDirectory none #UseBlacklist no -#VersionAddendum FreeBSD-20240318 +#VersionAddendum FreeBSD-20240806 # no default banner path #Banner none diff --git a/crypto/openssh/sshd_config.5 b/crypto/openssh/sshd_config.5 index 1c3de78d1cf0..a354c1ef2b0a 100644 --- a/crypto/openssh/sshd_config.5 +++ b/crypto/openssh/sshd_config.5 @@ -1947,7 +1947,7 @@ The default is Optionally specifies additional text to append to the SSH protocol banner sent by the server upon connection. The default is -.Qq FreeBSD-20240318 . +.Qq FreeBSD-20240806 . The value .Cm none may be used to disable this. diff --git a/crypto/openssh/version.h b/crypto/openssh/version.h index 836b5650b247..82be0be8498f 100644 --- a/crypto/openssh/version.h +++ b/crypto/openssh/version.h @@ -5,4 +5,4 @@ #define SSH_PORTABLE "p1" #define SSH_RELEASE SSH_VERSION SSH_PORTABLE -#define SSH_VERSION_FREEBSD "FreeBSD-20240701" +#define SSH_VERSION_FREEBSD "FreeBSD-20240806" From nobody Wed Aug 7 15:43:51 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 4WfDx40Jp3z5SVHP; Wed, 07 Aug 2024 15:43:52 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfDx36g9sz4rBY; Wed, 7 Aug 2024 15:43:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723045431; 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=rfGoycXEElD9wT94lZtFgQlY5i+frQhwMx2TvJpq4hQ=; b=VsW4+YiQRdi4uudaOhJOxBQtk2PIPIpghLtf0e3k+oHdPfyt0CzvHA5MqHwyZ50lrVlOc7 RIfLjU7XDJLVuMskg++Yt4vVXmJ1zmYemcH1v0ySgm4SG13aq45Bo11iKeSFSGsMcjfnB3 7sGGEfL9PP1NHAJl2e5WgGgSVwCuDAC+Z2LN3OlOi7MHcymxs9iiAJxuOlyR9uBO7fVKsK ONPrhwObWgbdfFkC3JzToHijysshpFRkJ3cU6Zj/ub84qmlYq4jS4I1PrgtFoizORVDmvT yW4w3+I/B+KUFmdP8QtSVTzee0ki9PMjJay+UerL6QTfU4Ata/6AWiXQ2aCz6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723045431; a=rsa-sha256; cv=none; b=JULueL+AC0E0JdzN8qCGoPg1XSzOFRI5nhFiKZX5T4yAJhkxwjw4QAxFeXOc4YAtiuBCsQ 1DtAVz7jf+BQI5sASVgFOpCjGjRqoPLZMZK4zcT8MORBMo2PU+rywI2/MuKjUwYJZ2IWvd bT1Tx3oa1g0UcUel6kehxymLufTPjqCZI/ScT0eqBxpAZ0i2XxpWzIx+1hVx9Y5eUwJbBv eZrbSMpzbqM7FmK+tp6f3I9PFfFlT805pxM8O+SYAgQ6WrzEjfysxjNajdGoefOGq5aQwZ k7GY00iExr621Cex+Bxw2WXHDbVp7IDIkfd0VHM2NE5VDAKaEjGJMr1S2mm6bg== 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=1723045431; 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=rfGoycXEElD9wT94lZtFgQlY5i+frQhwMx2TvJpq4hQ=; b=gpQKxxAE3UUVbvDz/S0gXyN1rnY3CUOA23wOZRAzWISYrMtPHebOj9OofQahMyeHIP63WT wLZ2VCLaEGPWk6wb6JYzpyDSCHR41hi5gxFKg0eQyz1hSMTSRHUhfCJLx71DAiosN0uMZ/ iUuzK/ZYn6QmAggoEWeYHo63Lyc/TjSRuCf0NbLMeidNphiW2dz44n7ouIkaTYiLQCqjj+ cT/nE2xo3oSD/afQN4gABhVeZdZOcAV6y+9dseAoneb79AW40agRefEa5UqetOvKX2UH9k k3IPEiNr49LjN47yCPzg3QANoSF3kWc6pgvH0WFtIUPraYbwcP2cP1bdhgDL/Q== 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 4WfDx36GcRzwxQ; Wed, 7 Aug 2024 15:43:51 +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 477FhpL6039508; Wed, 7 Aug 2024 15:43:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477Fhpsw039505; Wed, 7 Aug 2024 15:43:51 GMT (envelope-from git) Date: Wed, 7 Aug 2024 15:43:51 GMT Message-Id: <202408071543.477Fhpsw039505@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: a87a5973132b - releng/13.4 - ktrace: Fix an inverted privilege check 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/releng/13.4 X-Git-Reftype: branch X-Git-Commit: a87a5973132ba396c870068083395761e794ce47 Auto-Submitted: auto-generated The branch releng/13.4 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a87a5973132ba396c870068083395761e794ce47 commit a87a5973132ba396c870068083395761e794ce47 Author: Mark Johnston AuthorDate: 2024-08-07 13:38:54 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 15:43:39 +0000 ktrace: Fix an inverted privilege check Approved by: so Approved by: re (cperciva) Security: FreeBSD-SA-24:06.ktrace Security: CVE-2024-6760 Fixes: 1762f674ccb5 ("ktrace: pack all ktrace parameters into allocated structure ktr_io_params") (cherry picked from commit 166b7573b5220aadf8b02a85933c9651b909b309) (cherry picked from commit f702110bc4bcc593b38674ec6e4fadf6c4626432) --- sys/kern/kern_ktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 2729d0880b31..cc51dbae46f7 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -585,7 +585,7 @@ ktrprocexec(struct proc *p) PROC_LOCK_ASSERT(p, MA_OWNED); kiop = p->p_ktrioparms; - if (kiop == NULL || priv_check_cred(kiop->cr, PRIV_DEBUG_DIFFCRED)) + if (kiop == NULL || priv_check_cred(kiop->cr, PRIV_DEBUG_DIFFCRED) == 0) return (NULL); mtx_lock(&ktrace_mtx); From nobody Wed Aug 7 15:53:54 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 4WfF8g1Xpmz5SXXg; Wed, 07 Aug 2024 15:53:55 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfF8g10wkz4tGs; Wed, 7 Aug 2024 15:53:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723046035; 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=z8mYE0jGbSNs9sVvvH+eDf3r3w1RcTX+++NYdWWiIyM=; b=GZPvW1ANVZMynHidTQYYP/xJrASIvq0iVsYc8OziM9ocyCuSlRs/ATFSuQ55xd8xhWEvCd Pd0SWXLlNHiFRg+7HvXShGm8bRnpY2zM051sVygorSi0JLlIgAu2gYc+bK4dMwRd+UHS5/ Y6R7BNnpm2Ij47mw/g2CAprRWWtz6xUdKXczJ7I1zhBHQTwef7u7H0TnaZBJZBRxARtJv1 IfkasIe2CjYlS7sZuZFA7fi5bjGmV5ph0MnxvsvOsmQtup4S7l5f4ApMoW0jU1rInV/CsK 7z4vmQ9IzyDFZQjK3CKXMSgdEgjgRUungF93eq/oDeSC6RKkPvPC2+phh6ewhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723046035; a=rsa-sha256; cv=none; b=Dj1XHxDMKyjrf/MBVVX0CXBiuEaK8F2ABkJSOW+14qqqjqN4RsiG/8AUz6LjFy1Rta3b7O aQsWuXkgVO9HNloU0DaNz/gu0gLhyXUV8SDyusPC8y8bfMQaNRvI1cx91leTJqu7/4EIyP pCCs5iagYgh+XSEm82QaFqJpr5qVFKTlh9EeEWok8iHrQznleL3sxByYZ2ednO9A86VIra Y8ygqL4xO9A23iehGiMMs8sjhT2Am+QTLixeDhOS9rJV5ZxOzqbc+dOIdhPvg67SjSkSox fjb/8W6np/50y1NaDUbP6K9gV8kccmO3hyuOSppV4TdCSS3hCvQXHeT1+2PvsA== 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=1723046035; 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=z8mYE0jGbSNs9sVvvH+eDf3r3w1RcTX+++NYdWWiIyM=; b=C9/+cpGRViyNVsWp8GThbizHL1hWO2HCh/IQZ9FkY6DwaIA3dq8vndgPlKdA1nVSCQJr6Z oCq2xSCIndQ6+E3ugFXU4cPPfWdfeYLTlSTYKmL2dM6YjAJyzf4dfKpcTIjp7A4EAFRMZQ Mk/FhUSrm4r4NyY+tTr5fttQ5X/GM0sSbNzHWLK78Ai9fsohtxDWdQPUICdoTosj8XBBUL UU1ngMSDGVNk7XdNLCzZF5VFtr8FF2ljhYQkSDETbY4d+Qf855U1DKzJxsED6tp7VOEA02 2G6Mnm517/lGIAgoS9R6ACzCgP6BCr/WnOp3uERKbFDS7rYEG8Au/dl1ti+gtw== 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 4WfF8g0c5nzwwW; Wed, 7 Aug 2024 15:53:55 +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 477FrsYr056901; Wed, 7 Aug 2024 15:53:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477FrsZJ056898; Wed, 7 Aug 2024 15:53:54 GMT (envelope-from git) Date: Wed, 7 Aug 2024 15:53:54 GMT Message-Id: <202408071553.477FrsZJ056898@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: 3852a5a22650 - main - ktrace tests: Add a test case for handling of exec+setuid binaries 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3852a5a226509551e72c13bce443707f80e863ce Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3852a5a226509551e72c13bce443707f80e863ce commit 3852a5a226509551e72c13bce443707f80e863ce Author: Mark Johnston AuthorDate: 2024-08-07 15:53:37 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 15:53:37 +0000 ktrace tests: Add a test case for handling of exec+setuid binaries MFC after: 1 week --- tests/sys/kern/ktrace_test.c | 133 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 116 insertions(+), 17 deletions(-) diff --git a/tests/sys/kern/ktrace_test.c b/tests/sys/kern/ktrace_test.c index 9d4c2dbdcd74..dfd60b73a5cd 100644 --- a/tests/sys/kern/ktrace_test.c +++ b/tests/sys/kern/ktrace_test.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -86,6 +87,16 @@ child_fail_require(const char *file, int line, const char *fmt, ...) _exit(32); } +static void * +xmalloc(size_t size) +{ + void *p; + + p = malloc(size); + ATF_REQUIRE(p != NULL); + return (p); +} + /* * Determine sysdecode ABI based on proc's ABI in sv_flags. */ @@ -105,36 +116,47 @@ syscallabi(u_int sv_flags) return (SYSDECODE_ABI_UNKNOWN); } -/* - * Start tracing capability violations and notify child that it can execute. - * Return @numv capability violations from child in @v. - */ -static void -cap_trace_child(int cpid, struct ktr_cap_fail *v, int numv) +static int +trace_child(int cpid, int facility, int status) { - struct ktr_header header; - int error, fd, i; + int error, fd; ATF_REQUIRE((fd = open("ktrace.out", O_RDONLY | O_CREAT | O_TRUNC, 0600)) != -1); - ATF_REQUIRE(ktrace("ktrace.out", KTROP_SET, - KTRFAC_CAPFAIL, cpid) != -1); + ATF_REQUIRE_MSG(ktrace("ktrace.out", KTROP_SET, facility, cpid) != -1, + "ktrace failed: %s", strerror(errno)); /* Notify child that we've starting tracing. */ ATF_REQUIRE(kill(cpid, SIGUSR1) != -1); /* Wait for child to raise violation and exit. */ ATF_REQUIRE(waitpid(cpid, &error, 0) != -1); ATF_REQUIRE(WIFEXITED(error)); - ATF_REQUIRE_EQ(WEXITSTATUS(error), 0); + ATF_REQUIRE_EQ(WEXITSTATUS(error), status); + return (fd); +} + +/* + * Start tracing capability violations and notify child that it can execute. + * Return @numv capability violations from child in @v. + */ +static void +cap_trace_child(pid_t cpid, struct ktr_cap_fail *v, int numv) +{ + struct ktr_header header; + ssize_t n; + int fd; + + fd = trace_child(cpid, KTRFAC_CAPFAIL, 0); + /* Read ktrace header and ensure violation occurred. */ - for (i = 0; i < numv; ++i) { - ATF_REQUIRE((error = read(fd, &header, sizeof(header))) != -1); - ATF_REQUIRE_EQ(error, sizeof(header)); + for (int i = 0; i < numv; ++i) { + ATF_REQUIRE((n = read(fd, &header, sizeof(header))) != -1); + ATF_REQUIRE_EQ(n, sizeof(header)); ATF_REQUIRE_EQ(header.ktr_len, sizeof(*v)); ATF_REQUIRE_EQ(header.ktr_pid, cpid); /* Read the capability violation. */ - ATF_REQUIRE((error = read(fd, v + i, + ATF_REQUIRE((n = read(fd, v + i, sizeof(*v))) != -1); - ATF_REQUIRE_EQ(error, sizeof(*v)); + ATF_REQUIRE_EQ(n, sizeof(*v)); } ATF_REQUIRE(close(fd) != -1); } @@ -301,7 +323,11 @@ ATF_TC_BODY(ktrace__cap_signal, tc) * Test if opening a socket with a restricted protocol is reported * as a protocol violation. */ -ATF_TC_WITHOUT_HEAD(ktrace__cap_proto); +ATF_TC(ktrace__cap_proto); +ATF_TC_HEAD(ktrace__cap_proto, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} ATF_TC_BODY(ktrace__cap_proto, tc) { struct ktr_cap_fail violation; @@ -507,6 +533,78 @@ ATF_TC_BODY(ktrace__cap_shm_open, tc) ATF_REQUIRE_STREQ(violation.cap_data.cap_path, "/ktrace_shm"); } +/* + * Make sure that ktrace is disabled upon exec of a setuid binary. + */ +ATF_TC(ktrace__setuid_exec); +ATF_TC_HEAD(ktrace__setuid_exec, tc) +{ + atf_tc_set_md_var(tc, "require.user", "unprivileged"); +} +ATF_TC_BODY(ktrace__setuid_exec, tc) +{ + struct ktr_header header; + struct ktr_syscall *syscall; + sigset_t set = { }; + off_t off, off1; + ssize_t n; + pid_t pid; + int error, fd; + + /* Block SIGUSR1 so child does not terminate. */ + ATF_REQUIRE(sigaddset(&set, SIGUSR1) != -1); + ATF_REQUIRE(sigprocmask(SIG_BLOCK, &set, NULL) != -1); + + ATF_REQUIRE((pid = fork()) != -1); + if (pid == 0) { + /* Wait until ktrace has started. */ + CHILD_REQUIRE(sigwait(&set, &error) != -1); + CHILD_REQUIRE_EQ(error, SIGUSR1); + + execve("/usr/bin/su", (char *[]){ "su", "whoami", NULL }, NULL); + _exit(0); + } + + fd = trace_child(pid, KTRFAC_SYSCALL, 1); + + n = read(fd, &header, sizeof(header)); + ATF_REQUIRE(n >= 0); + ATF_REQUIRE_EQ((size_t)n, sizeof(header)); + ATF_REQUIRE_EQ(header.ktr_pid, pid); + ATF_REQUIRE(header.ktr_len >= (int)sizeof(*syscall)); + + syscall = xmalloc(header.ktr_len); + n = read(fd, syscall, header.ktr_len); + ATF_REQUIRE(n >= 0); + ATF_REQUIRE_EQ(n, header.ktr_len); + if (syscall->ktr_code == SYS_sigwait) { + free(syscall); + + /* Skip the sigwait() syscall. */ + n = read(fd, &header, sizeof(header)); + ATF_REQUIRE(n >= 0); + ATF_REQUIRE_EQ((size_t)n, sizeof(header)); + ATF_REQUIRE_EQ(header.ktr_pid, pid); + ATF_REQUIRE(header.ktr_len >= (int)sizeof(*syscall)); + + syscall = xmalloc(header.ktr_len); + n = read(fd, syscall, header.ktr_len); + ATF_REQUIRE(n >= 0); + ATF_REQUIRE_EQ(n, header.ktr_len); + } + ATF_REQUIRE_EQ(syscall->ktr_code, SYS_execve); + free(syscall); + + /* su is setuid root, so this should have been the last entry. */ + off = lseek(fd, 0, SEEK_CUR); + ATF_REQUIRE(off != -1); + off1 = lseek(fd, 0, SEEK_END); + ATF_REQUIRE(off1 != -1); + ATF_REQUIRE_EQ(off, off1); + + ATF_REQUIRE(close(fd) == 0); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, ktrace__cap_not_capable); @@ -518,5 +616,6 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, ktrace__cap_namei); ATF_TP_ADD_TC(tp, ktrace__cap_cpuset); ATF_TP_ADD_TC(tp, ktrace__cap_shm_open); + ATF_TP_ADD_TC(tp, ktrace__setuid_exec); return (atf_no_error()); } From nobody Wed Aug 7 16:08:38 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 4WfFTf4tZFz5SbTP; Wed, 07 Aug 2024 16:08: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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfFTf4MHsz3wnX; Wed, 7 Aug 2024 16:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723046918; 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=sKj44WiKAgthLZIuhnTnlZwU68FJXn7wnfhnCyaoxQs=; b=xQtpgCHsrE2Rv0TqtZa3bxPzQva98wG70Z1WsZJgWxWTwT0nkn3OYsNgx8pDkHJ9o74G2d b0mqk9FpPdbChuFow6zTydn9l2TO+4l8rvJdHFfOIGi7Zy7wkA2ThtYBq0YLg66l3MkEtB Q4XOKpUapfSUryIlmxmuUKdj+N8tf+//DR+EsOO+rXsHFVDZB7rxbLt5+uxiRNdsEAiKEP AH+iPZcFR3f4WaDWObmraNAViYahdvmgeOBf9cs0dKtnPXKPX03z6062zMbRcYJCY9kj0h h3UFkXqZbIwX4cRUqOqQIGlqnvd6lyyyRmc0039+uhWluOOnSbZJ1FDIZCHNdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723046918; a=rsa-sha256; cv=none; b=bWMgciedR/MGO0u8YJMV1LcgURsP7g9yK0efaKu29BkP+DtmdH1UoG9oy0rCeO5ryB9DwD PvP59wdMbvaZBJSHKrpmQfxas/LroNjsauL9G4VaNw2WD8jHMUcWCPLu4cxd4c4gJFx4di 7twq5xkP66w3wWZSESXnBW8v7ouB7bY24B29Tmw/yzf4YEy7o0Ee0LhPwHtxPF9Wuki0Gl JejBrCJb0gnRebw8bFJLY7Uq99G//+ZHh9xuEzOg9vkQJwqL6SD9rsld6QBjwGNeZorUqo Wudwqcfhu2WWIVIQt5KcMH8aq849Mdsjty2d9XGSRcPtVObFnxt7lZxKihYzLg== 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=1723046918; 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=sKj44WiKAgthLZIuhnTnlZwU68FJXn7wnfhnCyaoxQs=; b=A6/ETt7zqY7+qcWC79vbvTgjSqe5ZQs0shNmU53aWrmLezWm3RMv1y4hHdiYdka0SX1wpX qgXWPSXUUKMprCORjLJCPhDOWVduC4mT9Q2hp5UJgV0KGtO2ITmrpQ/0dHI8qDEQnOaF1J y3pkEaqjxISwQoJbM4H5pf10gvMWSzSrC7oaXg4rtpPfm4mvMNqeNQ1NLGnqDh3IsoysNh KO7RsdzOLqg/ql6CRmSHv7kRoUOhSvgaXGlySOUB5UB3pIjWqS+AZJH6ZJ9iIMACyeSi5H ASWi9ECmivWSLubtgSLaFtrfkT2vzTIdiGT2N08rH+s4qfFSto4lgq0Y4vvdlw== 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 4WfFTf3yNVzxRh; Wed, 7 Aug 2024 16:08:38 +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 477G8chG075517; Wed, 7 Aug 2024 16:08:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477G8ch5075514; Wed, 7 Aug 2024 16:08:38 GMT (envelope-from git) Date: Wed, 7 Aug 2024 16:08:38 GMT Message-Id: <202408071608.477G8ch5075514@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: 5132e16e1fd9 - main - libc tests: Rename the quick_exit test file, fix style 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5132e16e1fd987d88798fc9dbb7a10ae3413e86f Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5132e16e1fd987d88798fc9dbb7a10ae3413e86f commit 5132e16e1fd987d88798fc9dbb7a10ae3413e86f Author: Mark Johnston AuthorDate: 2024-07-29 14:37:47 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 16:05:16 +0000 libc tests: Rename the quick_exit test file, fix style Call it libc_exit_test instead of exit_test because the NetBSD test suite already has a file with the latter name. This is in preparation for adding other exit()-related tests. MFC after: 2 weeks --- ObsoleteFiles.inc | 3 +++ lib/libc/tests/stdlib/Makefile | 2 +- .../stdlib/{quick_exit_test.c => libc_exit_test.c} | 18 +++++++++++------- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index f6984b49711c..afd22301a39c 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20240729: rename quick_exit_test to libc_exit_test +OLD_FILES+=usr/tests/lib/libc/stdlib/quick_exit_test + # 20240729: retire ifaddr_byindex OLD_FILES+=usr/share/man/man9/ifaddr_byindex.9.gz diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile index cf1a204cfb4a..29cf895006d1 100644 --- a/lib/libc/tests/stdlib/Makefile +++ b/lib/libc/tests/stdlib/Makefile @@ -3,6 +3,7 @@ ATF_TESTS_C+= clearenv_test ATF_TESTS_C+= dynthr_test ATF_TESTS_C+= heapsort_test +ATF_TESTS_C+= libc_exit_test ATF_TESTS_C+= mergesort_test ATF_TESTS_C+= qsort_test .if ${COMPILER_TYPE} == "clang" @@ -11,7 +12,6 @@ ATF_TESTS_C+= qsort_b_test ATF_TESTS_C+= qsort_r_compat_test ATF_TESTS_C+= qsort_r_test ATF_TESTS_C+= qsort_s_test -ATF_TESTS_C+= quick_exit_test ATF_TESTS_C+= set_constraint_handler_s_test ATF_TESTS_C+= strfmon_test ATF_TESTS_C+= tsearch_test diff --git a/lib/libc/tests/stdlib/quick_exit_test.c b/lib/libc/tests/stdlib/libc_exit_test.c similarity index 83% rename from lib/libc/tests/stdlib/quick_exit_test.c rename to lib/libc/tests/stdlib/libc_exit_test.c index 9feed8a6fa63..c47d03d1d598 100644 --- a/lib/libc/tests/stdlib/quick_exit_test.c +++ b/lib/libc/tests/stdlib/libc_exit_test.c @@ -12,32 +12,36 @@ #include -static void func_a(void) +static void +func_a(void) { if (write(STDOUT_FILENO, "a", 1) != 1) _Exit(1); } -static void func_b(void) +static void +func_b(void) { if (write(STDOUT_FILENO, "b", 1) != 1) _Exit(1); } -static void func_c(void) +static void +func_c(void) { if (write(STDOUT_FILENO, "c", 1) != 1) _Exit(1); } -static void child(void) +static void +child(void) { - // this will be received by the parent + /* this will be received by the parent */ printf("hello, "); fflush(stdout); - // this won't, because quick_exit() does not flush + /* this won't, because quick_exit() does not flush */ printf("world"); - // these will be called in reverse order, producing "abc" + /* these will be called in reverse order, producing "abc" */ if (at_quick_exit(func_c) != 0 || at_quick_exit(func_b) != 0 || at_quick_exit(func_a) != 0) From nobody Wed Aug 7 16:08:39 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 4WfFTg64pmz5SbRL; Wed, 07 Aug 2024 16:08:39 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfFTg5Rd1z3x3L; Wed, 7 Aug 2024 16:08:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723046919; 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=pS5xo6IRe9S3SECgr33JmyZGvlbP4sYQMFJmeKBe5sE=; b=s4o6CMh4fcJwlHQqmpX8blZ4oWaowA9fx4EpDvbVicPJsQuylunYz2UPG3OG3g9zKF/eIt cglR8tTUa73HPcZlvoShAu8SNrqEymu7zSP8A4w/96CjyxQBMG9Sj7n5mm2+kuDmu4wiNE NpCKpgiVQ0CFTKC/MBXI5KcVftSdnEoneq8/lqp0mmwUsVnIm7RSWQx5JZiKM8cjKdeDFB y3lZgY1HymttsAjNfEQgEx+m3qA2DDirWm3rPA0rNIRgJwomIOTEbnSmh1mPrv89lLw5dK 3eBYZNBIjPt/QFtwxotjAtU7UOwkG2pPFSxzLUb5RA79LCqMrR5f+y2FDh3Vbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723046919; a=rsa-sha256; cv=none; b=Dh1RL6O3KcZPtXfWPE8kYksuKTi4/4aIuCOoo4quyanZOknc63tGHSf+JHrNupM/NnY28C hZizrq09CiLqnpFAdX2xwq6H5qzL0mdnrgi68NdYrRE2bY1C24O4j4IgDNDucmDYZrf9Lh lMGzzKILShZ4jCf0U325Esw4B88AQG83pAHdia2WLEVm/uZtOObzIOp7dzO0cpyVXgGwcw X421FcM2QyEtfRynLehDpcT50IE4usuytiPiEMeP4u1E0pe1vffrWEIXXrZUWpjyQoVs53 syZpbw30kmYWg9yusvCe00tulurPT1l92pXpQvBXW4H/riuHCybcQOhRE+9Ufg== 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=1723046919; 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=pS5xo6IRe9S3SECgr33JmyZGvlbP4sYQMFJmeKBe5sE=; b=upHW6C9QZ7zOUGrVIoyw8P//p8ay65E/YtoU3k8UvHf+32X3FXGpiathQD9NYiXWvDgQ8T MT+dnaXuh3x83mbO1jLyOq4aszxLiNj8G7wORVwFb4cuz6R/dUrPnc9T38GI8kOzlDifz1 2noOvz5477FWde47ogmJj/V74AmO7LMoB7HGfoz6bdiWvfZh8lcdHhPdiWVsuL+jcqRsaS 5Ibnsn94ILYVhs7mvAG6JkhP4ValNWMTTu+y3Z1AY3peIjx+n8aDwB4w8H+YqY52pGQh+3 Kl0m7Lyk2IrTXKzLvvrYSJdsLam4o0RwwQZ758Wrab0rEzFhsoS2ywMskqPzZQ== 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 4WfFTg4m0tzwnH; Wed, 7 Aug 2024 16:08:39 +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 477G8dJX075571; Wed, 7 Aug 2024 16:08:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477G8dXJ075568; Wed, 7 Aug 2024 16:08:39 GMT (envelope-from git) Date: Wed, 7 Aug 2024 16:08:39 GMT Message-Id: <202408071608.477G8dXJ075568@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: c0946aee5b2a - main - libc tests: Add some test cases for recursive exiting 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0946aee5b2ab6c9bb2e8281a1f625914ed2fec8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c0946aee5b2ab6c9bb2e8281a1f625914ed2fec8 commit c0946aee5b2ab6c9bb2e8281a1f625914ed2fec8 Author: Mark Johnston AuthorDate: 2024-08-07 16:06:11 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 16:06:11 +0000 libc tests: Add some test cases for recursive exiting Derived from tests posted by kib in D46108. I made one of them use a pthread barrier instead of sleeping. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D46176 --- lib/libc/tests/stdlib/Makefile | 1 + lib/libc/tests/stdlib/libc_exit_test.c | 69 ++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile index 29cf895006d1..6f57b8014a1e 100644 --- a/lib/libc/tests/stdlib/Makefile +++ b/lib/libc/tests/stdlib/Makefile @@ -75,6 +75,7 @@ LDFLAGS.$t+= -L${LIBNETBSD_OBJDIR} LIBADD.${t}+= netbsd util .endfor +LIBADD.libc_exit_test+= pthread LIBADD.strtod_test+= m SUBDIR+= dynthr_mod diff --git a/lib/libc/tests/stdlib/libc_exit_test.c b/lib/libc/tests/stdlib/libc_exit_test.c index c47d03d1d598..12965261bdb3 100644 --- a/lib/libc/tests/stdlib/libc_exit_test.c +++ b/lib/libc/tests/stdlib/libc_exit_test.c @@ -6,6 +6,7 @@ #include +#include #include #include #include @@ -78,8 +79,76 @@ ATF_TC_BODY(quick_exit, tc) ATF_CHECK_STREQ("hello, abc", buf); } +static void +myatexit1(void) +{ + exit(12); +} + +ATF_TC_WITHOUT_HEAD(recursive_exit1); +ATF_TC_BODY(recursive_exit1, tc) +{ + pid_t pid; + int wstatus; + + pid = fork(); + if (pid == 0) { + atexit(myatexit1); + exit(1); + } + ATF_REQUIRE_MSG(pid > 0, + "expect fork() to succeed"); + ATF_CHECK_EQ_MSG(pid, waitpid(pid, &wstatus, 0), + "expect to collect child process"); + ATF_CHECK(WIFEXITED(wstatus)); + ATF_CHECK_EQ(WEXITSTATUS(wstatus), 12); +} + +static pthread_barrier_t barrier; + +static void +myatexit2(void) +{ + pthread_barrier_wait(&barrier); + exit(12); +} + +static void * +mythreadexit(void *arg) +{ + pthread_barrier_wait(&barrier); + exit(15); +} + +ATF_TC_WITHOUT_HEAD(recursive_exit2); +ATF_TC_BODY(recursive_exit2, tc) +{ + pid_t pid; + int wstatus; + + pid = fork(); + if (pid == 0) { + pthread_t thr; + + atexit(myatexit2); + + pthread_barrier_init(&barrier, NULL, 2); + pthread_create(&thr, NULL, mythreadexit, NULL); + + exit(1); + } + ATF_REQUIRE_MSG(pid > 0, + "expect fork() to succeed"); + ATF_CHECK_EQ_MSG(pid, waitpid(pid, &wstatus, 0), + "expect to collect child process"); + ATF_CHECK(WIFEXITED(wstatus)); + ATF_CHECK_EQ(WEXITSTATUS(wstatus), 12); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, quick_exit); + ATF_TP_ADD_TC(tp, recursive_exit1); + ATF_TP_ADD_TC(tp, recursive_exit2); return (atf_no_error()); } From nobody Wed Aug 7 17:45:17 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 4WfHdB0psgz5Sxl0; Wed, 07 Aug 2024 17:45:18 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfHdB00zqz4G7R; Wed, 7 Aug 2024 17:45:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723052718; 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=0jgZt7v4CF3mscd9WUiggIhQrBejNqm4r92YwepsqJQ=; b=bOKG08SZMPqOs4lmnbmhZTQH115SzK39tmn7JC12khfMzBX6Ge68xHvJxy5/LXwT3O1uKl d0LvTSjH8xllMuT4npgj3wDk+QqcPY6ZWOJ6ho3MDG1QXX6JEfGMs3YofZcwfSnS2dM91P whlJvXq1EoQsBnxxny/QkAEPNvRjRf2nc6ZSJ6T4HahhazofVbOmAug3B72+8afumUCs5J EnlqsRhiCOjmvQdeqzDP58Rm7GAeU4PxNeYMCdfx4sfRwdvefwIYMFUbDRDMiNhfO1dOSu 6hX8uLPrcozIBd4zoxl++YbNJsgGSvjTaiBXDc8oyj04POdCI2vcbJma+kMVCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723052718; a=rsa-sha256; cv=none; b=nrYPq9XteNdwZohUrSpjT4kMrbFt0wRxR9TLbGVmtsqBWtclzj0+UE/KI45JJqDVKT6/YS /33eLqgCP1ZCcIqA3RDYnaEwtf9lPdxCPSW9dZ3sextUuIyOTx7Ig0K/wrAe31TxFZJ3/4 M0Yj+xeFxiUnjDXD8VJlf0Z4hGV0GgG8DBg3rRrDyZ7QyyrejwrnXHwrl2tuqs+LVBqWeb 85FCz3BWK/+NkYykBTrdFEoXbN/LbsYilB1HTgJxgovrJT8cGtE5YDU3XHiMzQZy2utyOV 4/n+EPxmUyfHXxsZQkGj/H10BjnsK+0TmM45zI0nQjVW+s1FiquqNjF60bKYuQ== 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=1723052718; 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=0jgZt7v4CF3mscd9WUiggIhQrBejNqm4r92YwepsqJQ=; b=gMNfEW1fVRlgaoC6yD4kFh6dhH6OKymTpa1GekepO+UKBUMXDspM2ZidE42YEzVvm946EC ZxaKaCJfnl0zlORZ2TOxZYM4kPowVv+2uAofSXlNtE1BkAEg4vwO5kURpmYM1+1xXZploB yd3gu54RRZAtyzT8kx43eSZgup+8YfPrPdksAYGkoP0qwGM06s6rd0E91Dn8l9wetWh/R8 bfwqPJsc5MO0Z8JPpSdOlObVASQfX45uCZ4CwIeeo1ZHID7onqk6+KQnXJc/4SMS2KP4LZ O1E0ldO2x7g0xBmlvvvppxYWzpx/2CoYZpQcGeaxjE/al7U8FzLGbgdBupE0XQ== 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 4WfHd96kYyz10gh; Wed, 7 Aug 2024 17:45:17 +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 477HjHhC044248; Wed, 7 Aug 2024 17:45:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477HjHeP044245; Wed, 7 Aug 2024 17:45:17 GMT (envelope-from git) Date: Wed, 7 Aug 2024 17:45:17 GMT Message-Id: <202408071745.477HjHeP044245@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: b3bc746cf3d0 - main - tcp: minor cleanup 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3bc746cf3d02e76fc49e9c5677726293ede402f Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=b3bc746cf3d02e76fc49e9c5677726293ede402f commit b3bc746cf3d02e76fc49e9c5677726293ede402f Author: Michael Tuexen AuthorDate: 2024-08-07 17:43:07 +0000 Commit: Michael Tuexen CommitDate: 2024-08-07 17:43:07 +0000 tcp: minor cleanup The vnet component of struct tcp_syncache is only used if VIMAGE is defined. No functional change intended. Reviewed by: cc MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D46240 --- sys/netinet/tcp_syncache.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netinet/tcp_syncache.h b/sys/netinet/tcp_syncache.h index 9f3beebf16af..e6485f42c0e4 100644 --- a/sys/netinet/tcp_syncache.h +++ b/sys/netinet/tcp_syncache.h @@ -127,7 +127,9 @@ struct tcp_syncache { u_int cache_limit; u_int rexmt_limit; uint32_t hash_secret; +#ifdef VIMAGE struct vnet *vnet; +#endif struct syncookie_secret secret; struct mtx pause_mtx; struct callout pause_co; From nobody Wed Aug 7 18:28:26 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 4WfJZy1sbyz5SNr6; Wed, 07 Aug 2024 18:28:26 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfJZy1gVSz4M8C; Wed, 7 Aug 2024 18:28:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723055306; 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=7pNiMlKS63dLeAHZ88RWZZ3Pi2gDyaIrFaTWfQ4wpqc=; b=KvVxhiyXR200F33IB/ExwltA15tzmE7LdQ0UxrTl1KwtZqCtcaF1RC3RM8c1KI2LCvtJPx 6v0IhBNK1neZQhdYQv7WIqQayMyd17hk7O1dW/WF2fmkeXrn77xAaoJghFV8PlDVUhH2E9 E1qmylbGdp7iVDo70UbB3pxLin7YsFEMttM80sXHtmQo8bhucZ27B67vVq0tmb3uhkjaJJ Po7dXiXV3cTIE3OZ7fO+DLFMifNRECDlxMyavkCXzZjiHLyyko+D0pcmtvuwsUl/Ac5cjw lXgxqmb7ILiOTEpixqH3BxTO67IkdUgS2A8/oB9KrpinNd2s3BstARkLurzD5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723055306; a=rsa-sha256; cv=none; b=yMlqOyyJIVU4l8cwQvieXKbdsCPWoIHF4xLgzM+xFJkY/ot7NDS+rqd1nqIKDtLYmh8SlZ mJ0rsGiYI20c5HDE9qETdIPJ476ZKf87HJ0j09nXGf/N5ZGUg/hk5yJIMjK1M2kDhB9t7k OVYhIGnodwtPrfyrNDFSIBwxuFfERQsWIFiQzBS1aQ14GzQMzSvHi8dB4OxAwwl+a7QenW Vxk0sO+jRqV+h+MhRucNEy35cEDB9Ds7BkpOX49WvIpDNB2HT3cPdvulu5UAFrVCpqSBic hedU2N+Q3diuK8gmqEAhAmO/ZCgxCU0MJ1dnuW0KjNej9pfE8Ddssw+Mp2Uw2g== 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=1723055306; 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=7pNiMlKS63dLeAHZ88RWZZ3Pi2gDyaIrFaTWfQ4wpqc=; b=sMvOr7bS86ORSjXVQaQN9zSbY7PonXaOqOonAS75RMkFsQdDMrK4A+qND3zjYx3mFb+3Jv zaNb9Rki95L1YfANlT91cH4JwH86MAfE4WEek8/G4IlYHAVcGUR8n2oIhmZ03acwXLBliR DaIiJ5t8aH6psufFSsomKHhA6XZCfrJ/njGTULO0z4bqilMkHEZUGMldlbMIwlFc1q46yn CuuChcmKCTI6hT4fp6qfJ+4DULrhk3DCmT5rlsfFTCuNoVOZantqraI4ykw/AjLBl+nUBM HRMf+H4ck87YkEZto8XjruqAM+m/7bo5DR1ltKreq+Tmas/pIbJVRMi6aFwxFw== 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 4WfJZy1Gmxz11yB; Wed, 7 Aug 2024 18:28:26 +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 477ISQLv012535; Wed, 7 Aug 2024 18:28:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477ISQEw012532; Wed, 7 Aug 2024 18:28:26 GMT (envelope-from git) Date: Wed, 7 Aug 2024 18:28:26 GMT Message-Id: <202408071828.477ISQEw012532@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: c349e881cf52 - main - rack, bbr: cleanup ack throttling 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c349e881cf52e51ab063c098bd9b99db487b6377 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=c349e881cf52e51ab063c098bd9b99db487b6377 commit c349e881cf52e51ab063c098bd9b99db487b6377 Author: Michael Tuexen AuthorDate: 2024-08-07 18:25:53 +0000 Commit: Michael Tuexen CommitDate: 2024-08-07 18:25:53 +0000 rack, bbr: cleanup ack throttling Use the variable in the TCPCB, not the one in the stack specific data structure. This simplifies the code and brings the functionality to BBR without any change. Reviewed by: Peter Lei, cc MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D46068 --- sys/netinet/tcp_stacks/rack.c | 77 ++++++---------------------- sys/netinet/tcp_stacks/rack_bbr_common.c | 88 +++++++++----------------------- sys/netinet/tcp_stacks/rack_bbr_common.h | 19 +++---- sys/netinet/tcp_stacks/tcp_rack.h | 2 - 4 files changed, 47 insertions(+), 139 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index ec0c6f500946..9749574fe037 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -12504,17 +12504,13 @@ rack_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so, else TCPSTAT_INC(tcps_rcvacktooold); /* Send challenge ACK. */ - __ctf_do_dropafterack(m, tp, th, thflags, tlen, ret_val, - &rack->r_ctl.challenge_ack_ts, - &rack->r_ctl.challenge_ack_cnt); + ctf_do_dropafterack(m, tp, th, thflags, tlen, ret_val); rack->r_wanted_output = 1; return (1); } } if (SEQ_GT(th->th_ack, tp->snd_max)) { - __ctf_do_dropafterack(m, tp, th, thflags, tlen, ret_val, - &rack->r_ctl.challenge_ack_ts, - &rack->r_ctl.challenge_ack_cnt); + ctf_do_dropafterack(m, tp, th, thflags, tlen, ret_val); rack->r_wanted_output = 1; return (1); } @@ -13795,9 +13791,7 @@ rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, ctf_calc_rwin(so, tp); if ((thflags & TH_RST) || (tp->t_fin_is_rst && (thflags & TH_FIN))) - return (__ctf_process_rst(m, th, so, tp, - &rack->r_ctl.challenge_ack_ts, - &rack->r_ctl.challenge_ack_cnt)); + return (ctf_process_rst(m, th, so, tp)); if ((thflags & TH_ACK) && (SEQ_LEQ(th->th_ack, tp->snd_una) || SEQ_GT(th->th_ack, tp->snd_max))) { @@ -13852,9 +13846,7 @@ rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, ctf_do_dropwithreset(m, tp, th, BANDLIM_RST_OPENPORT, tlen); return (1); } - if (_ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val, - &rack->r_ctl.challenge_ack_ts, - &rack->r_ctl.challenge_ack_cnt)) { + if (ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val)) { return (ret_val); } /* @@ -14043,9 +14035,7 @@ rack_do_established(struct mbuf *m, struct tcphdr *th, struct socket *so, if ((thflags & TH_RST) || (tp->t_fin_is_rst && (thflags & TH_FIN))) - return (__ctf_process_rst(m, th, so, tp, - &rack->r_ctl.challenge_ack_ts, - &rack->r_ctl.challenge_ack_cnt)); + return (ctf_process_rst(m, th, so, tp)); /* * RFC5961 Section 4.2 Send challenge ACK for any SYN in @@ -14064,9 +14054,7 @@ rack_do_established(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_ts_check(m, th, tp, tlen, thflags, &ret_val)) return (ret_val); } - if (_ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val, - &rack->r_ctl.challenge_ack_ts, - &rack->r_ctl.challenge_ack_cnt)) { + if (ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val)) { return (ret_val); } /* @@ -14139,15 +14127,11 @@ rack_do_close_wait(struct mbuf *m, struct tcphdr *th, struct socket *so, { int32_t ret_val = 0; int32_t orig_tlen = tlen; - struct tcp_rack *rack; - rack = (struct tcp_rack *)tp->t_fb_ptr; ctf_calc_rwin(so, tp); if ((thflags & TH_RST) || (tp->t_fin_is_rst && (thflags & TH_FIN))) - return (__ctf_process_rst(m, th, so, tp, - &rack->r_ctl.challenge_ack_ts, - &rack->r_ctl.challenge_ack_cnt)); + return (ctf_process_rst(m, th, so, tp)); /* * RFC5961 Section 4.2 Send challenge ACK for any SYN in * synchronized state. @@ -14165,9 +14149,7 @@ rack_do_close_wait(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_ts_check(m, th, tp, tlen, thflags, &ret_val)) return (ret_val); } - if (_ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val, - &rack->r_ctl.challenge_ack_ts, - &rack->r_ctl.challenge_ack_cnt)) { + if (ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val)) { return (ret_val); } /* @@ -14269,16 +14251,12 @@ rack_do_fin_wait_1(struct mbuf *m, struct tcphdr *th, struct socket *so, int32_t ret_val = 0; int32_t orig_tlen = tlen; int32_t ourfinisacked = 0; - struct tcp_rack *rack; - rack = (struct tcp_rack *)tp->t_fb_ptr; ctf_calc_rwin(so, tp); if ((thflags & TH_RST) || (tp->t_fin_is_rst && (thflags & TH_FIN))) - return (__ctf_process_rst(m, th, so, tp, - &rack->r_ctl.challenge_ack_ts, - &rack->r_ctl.challenge_ack_cnt)); + return (ctf_process_rst(m, th, so, tp)); /* * RFC5961 Section 4.2 Send challenge ACK for any SYN in * synchronized state. @@ -14296,9 +14274,7 @@ rack_do_fin_wait_1(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_ts_check(m, th, tp, tlen, thflags, &ret_val)) return (ret_val); } - if (_ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val, - &rack->r_ctl.challenge_ack_ts, - &rack->r_ctl.challenge_ack_cnt)) { + if (ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val)) { return (ret_val); } /* @@ -14397,16 +14373,12 @@ rack_do_closing(struct mbuf *m, struct tcphdr *th, struct socket *so, int32_t ret_val = 0; int32_t orig_tlen = tlen; int32_t ourfinisacked = 0; - struct tcp_rack *rack; - rack = (struct tcp_rack *)tp->t_fb_ptr; ctf_calc_rwin(so, tp); if ((thflags & TH_RST) || (tp->t_fin_is_rst && (thflags & TH_FIN))) - return (__ctf_process_rst(m, th, so, tp, - &rack->r_ctl.challenge_ack_ts, - &rack->r_ctl.challenge_ack_cnt)); + return (ctf_process_rst(m, th, so, tp)); /* * RFC5961 Section 4.2 Send challenge ACK for any SYN in * synchronized state. @@ -14424,9 +14396,7 @@ rack_do_closing(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_ts_check(m, th, tp, tlen, thflags, &ret_val)) return (ret_val); } - if (_ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val, - &rack->r_ctl.challenge_ack_ts, - &rack->r_ctl.challenge_ack_cnt)) { + if (ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val)) { return (ret_val); } /* @@ -14504,16 +14474,12 @@ rack_do_lastack(struct mbuf *m, struct tcphdr *th, struct socket *so, int32_t ret_val = 0; int32_t orig_tlen; int32_t ourfinisacked = 0; - struct tcp_rack *rack; - rack = (struct tcp_rack *)tp->t_fb_ptr; ctf_calc_rwin(so, tp); if ((thflags & TH_RST) || (tp->t_fin_is_rst && (thflags & TH_FIN))) - return (__ctf_process_rst(m, th, so, tp, - &rack->r_ctl.challenge_ack_ts, - &rack->r_ctl.challenge_ack_cnt)); + return (ctf_process_rst(m, th, so, tp)); /* * RFC5961 Section 4.2 Send challenge ACK for any SYN in * synchronized state. @@ -14532,9 +14498,7 @@ rack_do_lastack(struct mbuf *m, struct tcphdr *th, struct socket *so, return (ret_val); } orig_tlen = tlen; - if (_ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val, - &rack->r_ctl.challenge_ack_ts, - &rack->r_ctl.challenge_ack_cnt)) { + if (ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val)) { return (ret_val); } /* @@ -14612,17 +14576,13 @@ rack_do_fin_wait_2(struct mbuf *m, struct tcphdr *th, struct socket *so, int32_t ret_val = 0; int32_t orig_tlen = tlen; int32_t ourfinisacked = 0; - struct tcp_rack *rack; - rack = (struct tcp_rack *)tp->t_fb_ptr; ctf_calc_rwin(so, tp); /* Reset receive buffer auto scaling when not in bulk receive mode. */ if ((thflags & TH_RST) || (tp->t_fin_is_rst && (thflags & TH_FIN))) - return (__ctf_process_rst(m, th, so, tp, - &rack->r_ctl.challenge_ack_ts, - &rack->r_ctl.challenge_ack_cnt)); + return (ctf_process_rst(m, th, so, tp)); /* * RFC5961 Section 4.2 Send challenge ACK for any SYN in * synchronized state. @@ -14640,9 +14600,7 @@ rack_do_fin_wait_2(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_ts_check(m, th, tp, tlen, thflags, &ret_val)) return (ret_val); } - if (_ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val, - &rack->r_ctl.challenge_ack_ts, - &rack->r_ctl.challenge_ack_cnt)) { + if (ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val)) { return (ret_val); } /* @@ -15547,7 +15505,6 @@ rack_init(struct tcpcb *tp, void **ptr) rack->r_ctl.rc_lower_rtt_us_cts = us_cts; rack->r_ctl.rc_time_of_last_probertt = us_cts; rack->r_ctl.rc_went_idle_time = us_cts; - rack->r_ctl.challenge_ack_ts = tcp_ts_getticks() - (V_tcp_ack_war_time_window + 1); rack->r_ctl.rc_time_probertt_starts = 0; rack->r_ctl.gp_rnd_thresh = rack_rnd_cnt_req & 0xff; @@ -16702,7 +16659,7 @@ rack_do_compressed_ack_processing(struct tcpcb *tp, struct socket *so, struct mb * ack is beyond the largest seq we sent. */ if ((tp->t_flags & TF_ACKNOW) == 0) { - ctf_ack_war_checks(tp, &rack->r_ctl.challenge_ack_ts, &rack->r_ctl.challenge_ack_cnt); + ctf_ack_war_checks(tp); if (tp->t_flags && TF_ACKNOW) rack->r_wanted_output = 1; } diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c index b218f449475f..150298f8413f 100644 --- a/sys/netinet/tcp_stacks/rack_bbr_common.c +++ b/sys/netinet/tcp_stacks/rack_bbr_common.c @@ -532,28 +532,19 @@ ctf_do_dropwithreset(struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, } void -ctf_ack_war_checks(struct tcpcb *tp, uint32_t *ts, uint32_t *cnt) +ctf_ack_war_checks(struct tcpcb *tp) { - if ((ts != NULL) && (cnt != NULL) && - (V_tcp_ack_war_time_window > 0) && - (V_tcp_ack_war_cnt > 0)) { - /* We are possibly doing ack war prevention */ - uint32_t cts; - - /* - * We use a msec tick here which gives us - * roughly 49 days. We don't need the - * precision of a microsecond timestamp which - * would only give us hours. - */ - cts = tcp_ts_getticks(); - if (TSTMP_LT((*ts), cts)) { - /* Timestamp is in the past */ - *cnt = 0; - *ts = (cts + V_tcp_ack_war_time_window); + sbintime_t now; + + if ((V_tcp_ack_war_time_window > 0) && (V_tcp_ack_war_cnt > 0)) { + now = getsbinuptime(); + if (tp->t_challenge_ack_end < now) { + tp->t_challenge_ack_cnt = 0; + tp->t_challenge_ack_end = now + + V_tcp_ack_war_time_window * SBT_1MS; } - if (*cnt < V_tcp_ack_war_cnt) { - *cnt = (*cnt + 1); + if (tp->t_challenge_ack_cnt < V_tcp_ack_war_cnt) { + tp->t_challenge_ack_cnt++; tp->t_flags |= TF_ACKNOW; } else tp->t_flags &= ~TF_ACKNOW; @@ -568,10 +559,9 @@ ctf_ack_war_checks(struct tcpcb *tp, uint32_t *ts, uint32_t *cnt) * TCB is still valid and locked. */ int -_ctf_drop_checks(struct tcpopt *to, struct mbuf *m, struct tcphdr *th, - struct tcpcb *tp, int32_t *tlenp, - int32_t *thf, int32_t *drop_hdrlen, int32_t *ret_val, - uint32_t *ts, uint32_t *cnt) +ctf_drop_checks(struct tcpopt *to, struct mbuf *m, struct tcphdr *th, + struct tcpcb *tp, int32_t *tlenp, + int32_t *thf, int32_t *drop_hdrlen, int32_t *ret_val) { int32_t todrop; int32_t thflags; @@ -605,7 +595,7 @@ _ctf_drop_checks(struct tcpopt *to, struct mbuf *m, struct tcphdr *th, * Send an ACK to resynchronize and drop any data. * But keep on processing for RST or ACK. */ - ctf_ack_war_checks(tp, ts, cnt); + ctf_ack_war_checks(tp); todrop = tlen; KMOD_TCPSTAT_INC(tcps_rcvduppack); KMOD_TCPSTAT_ADD(tcps_rcvdupbyte, todrop); @@ -621,7 +611,7 @@ _ctf_drop_checks(struct tcpopt *to, struct mbuf *m, struct tcphdr *th, * ACK now, as the next in-sequence segment * will clear the DSACK block again */ - ctf_ack_war_checks(tp, ts, cnt); + ctf_ack_war_checks(tp); if (tp->t_flags & TF_ACKNOW) tcp_update_sack_list(tp, th->th_seq, th->th_seq + todrop); @@ -653,10 +643,10 @@ _ctf_drop_checks(struct tcpopt *to, struct mbuf *m, struct tcphdr *th, * ack. */ if (tp->rcv_wnd == 0 && th->th_seq == tp->rcv_nxt) { - ctf_ack_war_checks(tp, ts, cnt); + ctf_ack_war_checks(tp); KMOD_TCPSTAT_INC(tcps_rcvwinprobe); } else { - __ctf_do_dropafterack(m, tp, th, thflags, tlen, ret_val, ts, cnt); + ctf_do_dropafterack(m, tp, th, thflags, tlen, ret_val); return (1); } } else @@ -677,7 +667,7 @@ _ctf_drop_checks(struct tcpopt *to, struct mbuf *m, struct tcphdr *th, * and valid. */ void -__ctf_do_dropafterack(struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, int32_t thflags, int32_t tlen, int32_t *ret_val, uint32_t *ts, uint32_t *cnt) +ctf_do_dropafterack(struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, int32_t thflags, int32_t tlen, int32_t *ret_val) { /* * Generate an ACK dropping incoming segment if it occupies sequence @@ -701,7 +691,7 @@ __ctf_do_dropafterack(struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, int32 return; } else *ret_val = 0; - ctf_ack_war_checks(tp, ts, cnt); + ctf_ack_war_checks(tp); if (m) m_freem(m); } @@ -720,8 +710,8 @@ ctf_do_drop(struct mbuf *m, struct tcpcb *tp) } int -__ctf_process_rst(struct mbuf *m, struct tcphdr *th, struct socket *so, - struct tcpcb *tp, uint32_t *ts, uint32_t *cnt) +ctf_process_rst(struct mbuf *m, struct tcphdr *th, struct socket *so, + struct tcpcb *tp) { /* * RFC5961 Section 3.2 @@ -768,40 +758,8 @@ __ctf_process_rst(struct mbuf *m, struct tcphdr *th, struct socket *so, dropped = 1; ctf_do_drop(m, tp); } else { - int send_challenge; - KMOD_TCPSTAT_INC(tcps_badrst); - if ((ts != NULL) && (cnt != NULL) && - (V_tcp_ack_war_time_window > 0) && - (V_tcp_ack_war_cnt > 0)) { - /* We are possibly preventing an ack-rst war prevention */ - uint32_t cts; - - /* - * We use a msec tick here which gives us - * roughly 49 days. We don't need the - * precision of a microsecond timestamp which - * would only give us hours. - */ - cts = tcp_ts_getticks(); - if (TSTMP_LT((*ts), cts)) { - /* Timestamp is in the past */ - *cnt = 0; - *ts = (cts + V_tcp_ack_war_time_window); - } - if (*cnt < V_tcp_ack_war_cnt) { - *cnt = (*cnt + 1); - send_challenge = 1; - } else - send_challenge = 0; - } else - send_challenge = 1; - if (send_challenge) { - /* Send challenge ACK. */ - tcp_respond(tp, mtod(m, void *), th, m, - tp->rcv_nxt, tp->snd_nxt, TH_ACK); - tp->last_ack_sent = tp->rcv_nxt; - } + tcp_send_challenge_ack(tp, th, m); } } else { m_freem(m); diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.h b/sys/netinet/tcp_stacks/rack_bbr_common.h index 9e5fbe675a3a..6a8a056d89b0 100644 --- a/sys/netinet/tcp_stacks/rack_bbr_common.h +++ b/sys/netinet/tcp_stacks/rack_bbr_common.h @@ -89,19 +89,15 @@ int ctf_do_queued_segments(struct tcpcb *tp, int have_pkt); uint32_t ctf_outstanding(struct tcpcb *tp); uint32_t ctf_flight_size(struct tcpcb *tp, uint32_t rc_sacked); int -_ctf_drop_checks(struct tcpopt *to, struct mbuf *m, struct tcphdr *th, +ctf_drop_checks(struct tcpopt *to, struct mbuf *m, struct tcphdr *th, struct tcpcb *tp, int32_t *tlenp, - int32_t *thf, int32_t *drop_hdrlen, int32_t *ret_val, - uint32_t *ts, uint32_t *cnt); -void ctf_ack_war_checks(struct tcpcb *tp, uint32_t *ts, uint32_t *cnt); -#define ctf_drop_checks(a, b, c, d, e, f, g, h) _ctf_drop_checks(a, b, c, d, e, f, g, h, NULL, NULL) + int32_t *thf, int32_t *drop_hdrlen, int32_t *ret_val); +void ctf_ack_war_checks(struct tcpcb *tp); void -__ctf_do_dropafterack(struct mbuf *m, struct tcpcb *tp, +ctf_do_dropafterack(struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, int32_t thflags, int32_t tlen, - int32_t *ret_val, uint32_t *ts, uint32_t *cnt); - -#define ctf_do_dropafterack(a, b, c, d, e, f) __ctf_do_dropafterack(a, b, c, d, e, f, NULL, NULL) + int32_t *ret_val); void ctf_do_dropwithreset(struct mbuf *m, struct tcpcb *tp, @@ -110,9 +106,8 @@ void ctf_do_drop(struct mbuf *m, struct tcpcb *tp); int -__ctf_process_rst(struct mbuf *m, struct tcphdr *th, - struct socket *so, struct tcpcb *tp, uint32_t *ts, uint32_t *cnt); -#define ctf_process_rst(m, t, s, p) __ctf_process_rst(m, t, s, p, NULL, NULL) +ctf_process_rst(struct mbuf *m, struct tcphdr *th, + struct socket *so, struct tcpcb *tp); void ctf_challenge_ack(struct mbuf *m, struct tcphdr *th, diff --git a/sys/netinet/tcp_stacks/tcp_rack.h b/sys/netinet/tcp_stacks/tcp_rack.h index ae766272bf30..a64791a9887b 100644 --- a/sys/netinet/tcp_stacks/tcp_rack.h +++ b/sys/netinet/tcp_stacks/tcp_rack.h @@ -553,8 +553,6 @@ struct rack_control { uint32_t rc_last_timeout_snduna; uint32_t last_tlp_acked_start; uint32_t last_tlp_acked_end; - uint32_t challenge_ack_ts; - uint32_t challenge_ack_cnt; uint32_t rc_min_to; /* Socket option value Lock(a) */ uint32_t rc_pkt_delay; /* Socket option value Lock(a) */ uint32_t persist_lost_ends; From nobody Wed Aug 7 19:27:32 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 4WfKv83vn2z5SbHy; Wed, 07 Aug 2024 19:27:32 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfKv83JH8z4VbX; Wed, 7 Aug 2024 19:27:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723058852; 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=EdfAYfwL42odZsX5pUYqIQuJNVxywnd92Td3m/DyZ8I=; b=e0nfqNnHTvqhpm9pD+8SSC9adgHCE8rb6T+0fyd/ZQ+9jqjSdahWn93hNM3VMi6HtidUvy BXttVlmuasSj2TIiYFgqckggfwFVxd+mBBrQ/REpVF6I4VM+fdOKpsO6VW9YX/lz4SbeLE Sdi1ODM24qJFbbEALUf6kq8ZbPYX2sa/r6rOYmIKIS0f5xyEYN6OOSAnqYJa/k8N/KUjE0 uUvZao5gyGOvKcVuxZJFx4y7UTFXWQ7o8mumIA/4w58yN4up1+xYiGb189Ms55ZB59X5RZ ZxQFDbwoR9dTkVkHzq4VBsvL9Xl7OluuWupsn9Dt/6daPqDbKpiMOHYrBeWesg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723058852; a=rsa-sha256; cv=none; b=khPCPwrWjJpcwOe/V7K3v4+0twpgDTGWDNWL0a4GQM0r6/rOcmOUeXU1XF0rnf3xK9jdAN 3Ndndf2ABA8hWhlQS15yNm5CiIkRNEmXqJHhtUEq43Gsft4NUB4oytmaUiPGDf5CAV0nxl 5a2NPeKrcGXpKzp6oWeUWKw73A6UVDyP0A1Li3YBK/BtJOFK/e2RVPw7mvcmb12Llmgwuw 1I/qG0wybHD8RGE/zO9zrtGbBcvbbiAXuU6dU05AISCXLW/Ww7+4mqodPwcQKmdTOPzW9Y eCOtu7jPZWTOftPqXN62XDOeRPYAOBk1gnJSkI/bC/1lXYqNNaJpH8mcUpXH9g== 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=1723058852; 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=EdfAYfwL42odZsX5pUYqIQuJNVxywnd92Td3m/DyZ8I=; b=TvdI8o592mP0j7XTXjQXK69qbeNUcnOhykYDEnYuSYiPTCGeadvr8hJF5SVfzppRyOr5pL 3xlgGbMoEnkYv0NFixO7//4hDUIrskjc0j9Y8SCEXr4kpkEGVNx/2Wiq9TNgcdpcMxW03+ EFB8N+pgNgWeOOU/HTK9Hrg00xum8YLVKq9WDroE0I2IEhXdmQxNPfDxJobDowX32Yyi9r obNsRFY7KNLJG/IoZbyXByZIhi+/diADaO4l9Ph2jJxW58oErU5bsFQcbgEIw5e5FAw9LC nAgOAHYBh5kIkV+x5CM7NL8odSf1DpNMRS+KFF0bvwcFNbCtVoZpEhCr0o86JQ== 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 4WfKv82bm2z12T6; Wed, 7 Aug 2024 19:27:32 +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 477JRWm5015302; Wed, 7 Aug 2024 19:27:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477JRWEg015299; Wed, 7 Aug 2024 19:27:32 GMT (envelope-from git) Date: Wed, 7 Aug 2024 19:27:32 GMT Message-Id: <202408071927.477JRWEg015299@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: a9e4753b4fe2 - main - bhyve: Optionally put vCPUs back in the debug state after resuming 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9e4753b4fe20d81263f61c4b7e4383739924898 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a9e4753b4fe20d81263f61c4b7e4383739924898 commit a9e4753b4fe20d81263f61c4b7e4383739924898 Author: Mark Johnston AuthorDate: 2024-08-07 19:27:23 +0000 Commit: Mark Johnston CommitDate: 2024-08-07 19:27:23 +0000 bhyve: Optionally put vCPUs back in the debug state after resuming When the gdb stub is configured to pause guest execution upon boot (i.e., the "w" flag is passed to -G), vCPUs end up suspended in two senses: first, suspended by the GDB stub (marked in the vcpus_suspended set), and suspended by the kernel (because fbsdrun_addcpu() suspends APs before spawning their vCPU threads). When the guest is resumed by the debugger, vCPUs are unsuspended in both senses, but this is not correct for APs. Hack around this problem by re-suspending vCPUs after the debugger resumes guest execution, if they were suspended beforehand. Reviewed by: corvink, jhb MFC after: 2 weeks Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D46196 --- usr.sbin/bhyve/gdb.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/usr.sbin/bhyve/gdb.c b/usr.sbin/bhyve/gdb.c index 7c04b0017c80..983e7deb61c9 100644 --- a/usr.sbin/bhyve/gdb.c +++ b/usr.sbin/bhyve/gdb.c @@ -938,8 +938,28 @@ gdb_cpu_add(struct vcpu *vcpu) * executing the first instruction. */ if (!CPU_EMPTY(&vcpus_suspended)) { + cpuset_t suspended; + int error; + + error = vm_debug_cpus(ctx, &suspended); + assert(error == 0); + CPU_SET(vcpuid, &vcpus_suspended); _gdb_cpu_suspend(vcpu, false); + + /* + * In general, APs are started in a suspended mode such that + * they exit with VM_EXITCODE_DEBUG until the BSP starts them. + * In particular, this refers to the kernel's view of the vCPU + * state rather than our own. If the debugger resumes guest + * execution, vCPUs will be unsuspended from the kernel's point + * of view, so we should restore the previous state before + * continuing. + */ + if (CPU_ISSET(vcpuid, &suspended)) { + error = vm_suspend_cpu(vcpu); + assert(error == 0); + } } pthread_mutex_unlock(&gdb_lock); } From nobody Wed Aug 7 20:41:08 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 4WfMX518Tmz5Sq5N; Wed, 07 Aug 2024 20:41:09 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WfMX50PZnz4dXM; Wed, 7 Aug 2024 20:41:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1723063269; 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=HLajyiJl7zDcYEaX74cdOnboMOViM6Q/dnFDbiXpPI8=; b=B54X8Vpy66uS3m5cU3vasls+17ssTtGxWFBLQi/z6Zg0erKaKC5LS94FGyNWdsmWnwM6Id 4j7imeRLhPLOxa6lKCAau5Hd4YBgKOYuHCQRcMlasw7viwK1O4c1nMcEdUVgl5yp8OpNwr dn+GBiEDOeJ5fbkjhgp13+NKWBYVBZd6KeqGPh+I7LwyzLsmT+3UJhswYGW9p5464w1BDl h5+PfbYF4tn6S9H0vKgfEKIQGx70MQt4Mx+65+rm9YhymlbzUgl6O5rnQR9LU0/b3NivtZ qcDhx7R4+mRUFXbO2buhVthdP5lJQFjsVTP81dLm2C0MLS9rvOsWlH71/jWYFA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1723063269; a=rsa-sha256; cv=none; b=aG+82EBn51C9FxCKb/3IBCMOhrQ0VLT77ewcuX3rFivWkWmup2a3ojv/fWXmpgCdOVHQ1H 7KBvYL0QUHeMzHgSo/Y0WJ4FDRm/eayzlcdGQy+Kw9pGTHkx+Nnk3Eth2z+za6JfNOyBm+ 9P65uZ2jFq6fBCzEeniAwT7rOYmnqMG8jvmjuIF2vd7L5wnN9IlCqtqwqgjOpRqGHP2mb3 c+Gg6uwNIXK9Z/bUzf7DPuoCWJE6SFAv1xQ2QHXrf/CEgv8vULUZtiJ/ZRCWnEON8V3jw7 lYd0GwalARoCkXe+PVXHXLCb4s3a6WryYNrdzAS3ytFlh3hPzpJr2AX8JMZacQ== 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=1723063269; 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=HLajyiJl7zDcYEaX74cdOnboMOViM6Q/dnFDbiXpPI8=; b=UKvrSlU7OnWD1rVfHyJo6RAAGo/O+JKPMlDD8vvQObxl830wLsBm8F+mlDMkrrwIGmhnuV 963HKB2sV6wQ+YkS+0KxZ5l/xvXd2tGxaNuD5MMcPJuIgM/VXOipP+DxJsArjJX9BcQ8yE FiS9HzmJaPwZqA7atjozW8HnH4feaoqDSsVaZCx1C67zAxVqHQctIRiVKo1ufTUD0Xf9nN 01hDNkFqVXrZU06oMrT66+wBv+TsrRRWDOZTsGqzmvrbsf4rSaT6M9OogfPhaYNN1zahQe BreFnsbw5fbcaefV1DdP/5EvaAVqeQvTC4n8TWq91uHixZtCCf/D+iis/bgbGA== 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 4WfMX500xpz14xZ; Wed, 7 Aug 2024 20:41:09 +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 477Kf8Fo041620; Wed, 7 Aug 2024 20:41:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 477Kf8mZ041617; Wed, 7 Aug 2024 20:41:08 GMT (envelope-from git) Date: Wed, 7 Aug 2024 20:41:08 GMT Message-Id: <202408072041.477Kf8mZ041617@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: c89d94ad5d95 - main - LinuxKPI: update linuxkpi_video to Linux 6.6 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: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c89d94ad5d95fd15e891b2723caae8a6104ee153 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=c89d94ad5d95fd15e891b2723caae8a6104ee153 commit c89d94ad5d95fd15e891b2723caae8a6104ee153 Author: Vladimir Kondratyev AuthorDate: 2024-08-07 20:38:38 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-08-07 20:38:38 +0000 LinuxKPI: update linuxkpi_video to Linux 6.6 disable hdmi_audio_infoframe_pack_for_dp function for now as it depends on not imported yet drm sources and is not used by drm-kmod. Reviewed by: manu Sponsored by: Serenity CyberSecurity, LLC Differential Revision: https://reviews.freebsd.org/D46224 --- .../linuxkpi/common/include/linux/aperture.h | 16 ++-- sys/compat/linuxkpi/common/include/linux/hdmi.h | 13 +++- sys/compat/linuxkpi/common/include/video/cmdline.h | 44 +++++++++++ sys/compat/linuxkpi/common/src/linux_aperture.c | 86 ++++++++++++++-------- sys/compat/linuxkpi/common/src/linux_cmdline.c | 63 ++++++++++++++++ sys/compat/linuxkpi/common/src/linux_hdmi.c | 86 +++++++++++++++++----- sys/modules/linuxkpi_video/Makefile | 1 + 7 files changed, 250 insertions(+), 59 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/aperture.h b/sys/compat/linuxkpi/common/include/linux/aperture.h index e0387ed0225d..7eced3cc3cb1 100644 --- a/sys/compat/linuxkpi/common/include/linux/aperture.h +++ b/sys/compat/linuxkpi/common/include/linux/aperture.h @@ -16,7 +16,9 @@ int devm_aperture_acquire_for_platform_device(struct platform_device *pdev, resource_size_t size); int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size, - bool primary, const char *name); + const char *name); + +int __aperture_remove_legacy_vga_devices(struct pci_dev *pdev); int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *name); #else @@ -28,7 +30,12 @@ static inline int devm_aperture_acquire_for_platform_device(struct platform_devi } static inline int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size, - bool primary, const char *name) + const char *name) +{ + return 0; +} + +static inline int __aperture_remove_legacy_vga_devices(struct pci_dev *pdev) { return 0; } @@ -41,7 +48,6 @@ static inline int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, /** * aperture_remove_all_conflicting_devices - remove all existing framebuffers - * @primary: also kick vga16fb if present; only relevant for VGA devices * @name: a descriptive name of the requesting driver * * This function removes all graphics device drivers. Use this function on systems @@ -50,9 +56,9 @@ static inline int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, * Returns: * 0 on success, or a negative errno code otherwise */ -static inline int aperture_remove_all_conflicting_devices(bool primary, const char *name) +static inline int aperture_remove_all_conflicting_devices(const char *name) { - return aperture_remove_conflicting_devices(0, (resource_size_t)-1, primary, name); + return aperture_remove_conflicting_devices(0, (resource_size_t)-1, name); } #endif diff --git a/sys/compat/linuxkpi/common/include/linux/hdmi.h b/sys/compat/linuxkpi/common/include/linux/hdmi.h index c8ec982ff498..e07578167d69 100644 --- a/sys/compat/linuxkpi/common/include/linux/hdmi.h +++ b/sys/compat/linuxkpi/common/include/linux/hdmi.h @@ -170,19 +170,19 @@ struct hdmi_avi_infoframe { enum hdmi_infoframe_type type; unsigned char version; unsigned char length; + bool itc; + unsigned char pixel_repeat; enum hdmi_colorspace colorspace; enum hdmi_scan_mode scan_mode; enum hdmi_colorimetry colorimetry; enum hdmi_picture_aspect picture_aspect; enum hdmi_active_aspect active_aspect; - bool itc; enum hdmi_extended_colorimetry extended_colorimetry; enum hdmi_quantization_range quantization_range; enum hdmi_nups nups; unsigned char video_code; enum hdmi_ycc_quantization_range ycc_quantization_range; enum hdmi_content_type content_type; - unsigned char pixel_repeat; unsigned short top_bar; unsigned short bottom_bar; unsigned short left_bar; @@ -336,7 +336,14 @@ ssize_t hdmi_audio_infoframe_pack(struct hdmi_audio_infoframe *frame, void *buffer, size_t size); ssize_t hdmi_audio_infoframe_pack_only(const struct hdmi_audio_infoframe *frame, void *buffer, size_t size); -int hdmi_audio_infoframe_check(struct hdmi_audio_infoframe *frame); +int hdmi_audio_infoframe_check(const struct hdmi_audio_infoframe *frame); + +#ifdef __linux__ +struct dp_sdp; +ssize_t +hdmi_audio_infoframe_pack_for_dp(const struct hdmi_audio_infoframe *frame, + struct dp_sdp *sdp, u8 dp_version); +#endif enum hdmi_3d_structure { HDMI_3D_STRUCTURE_INVALID = -1, diff --git a/sys/compat/linuxkpi/common/include/video/cmdline.h b/sys/compat/linuxkpi/common/include/video/cmdline.h new file mode 100644 index 000000000000..eaa9a998fda2 --- /dev/null +++ b/sys/compat/linuxkpi/common/include/video/cmdline.h @@ -0,0 +1,44 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Serenity Cyber Security, LLC. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#ifndef _VIDEO_CMDLINE_H_ +#define _VIDEO_CMDLINE_H_ + +#include + +#define CONFIG_VIDEO_CMDLINE + +#if defined(CONFIG_VIDEO_CMDLINE) +const char *video_get_options(const char *name); +#else +static inline const char * +video_get_options(const char *name) +{ + return (NULL); +} +#endif +#endif /* _VIDEO_CMDLINE_H_ */ diff --git a/sys/compat/linuxkpi/common/src/linux_aperture.c b/sys/compat/linuxkpi/common/src/linux_aperture.c index 15a56839fa9c..21c7041fc851 100644 --- a/sys/compat/linuxkpi/common/src/linux_aperture.c +++ b/sys/compat/linuxkpi/common/src/linux_aperture.c @@ -20,7 +20,7 @@ * driver can be active at any given time. Many systems load a generic * graphics drivers, such as EFI-GOP or VESA, early during the boot process. * During later boot stages, they replace the generic driver with a dedicated, - * hardware-specific driver. To take over the device the dedicated driver + * hardware-specific driver. To take over the device, the dedicated driver * first has to remove the generic driver. Aperture functions manage * ownership of framebuffer memory and hand-over between drivers. * @@ -43,7 +43,7 @@ * base = mem->start; * size = resource_size(mem); * - * ret = aperture_remove_conflicting_devices(base, size, false, "example"); + * ret = aperture_remove_conflicting_devices(base, size, "example"); * if (ret) * return ret; * @@ -76,7 +76,7 @@ * generic EFI or VESA drivers, have to register themselves as owners of their * framebuffer apertures. Ownership of the framebuffer memory is achieved * by calling devm_aperture_acquire_for_platform_device(). If successful, the - * driveris the owner of the framebuffer range. The function fails if the + * driver is the owner of the framebuffer range. The function fails if the * framebuffer is already owned by another driver. See below for an example. * * .. code-block:: c @@ -126,7 +126,7 @@ * et al for the registered framebuffer range, the aperture helpers call * platform_device_unregister() and the generic driver unloads itself. The * generic driver also has to provide a remove function to make this work. - * Once hot unplugged fro mhardware, it may not access the device's + * Once hot unplugged from hardware, it may not access the device's * registers, framebuffer memory, ROM, etc afterwards. */ @@ -203,7 +203,7 @@ static void aperture_detach_platform_device(struct device *dev) /* * Remove the device from the device hierarchy. This is the right thing - * to do for firmware-based DRM drivers, such as EFI, VESA or VGA. After + * to do for firmware-based fb drivers, such as EFI, VESA or VGA. After * the new driver takes over the hardware, the firmware device's state * will be lost. * @@ -274,7 +274,6 @@ static void aperture_detach_devices(resource_size_t base, resource_size_t size) * aperture_remove_conflicting_devices - remove devices in the given range * @base: the aperture's base address in physical memory * @size: aperture size in bytes - * @primary: also kick vga16fb if present; only relevant for VGA devices * @name: a descriptive name of the requesting driver * * This function removes devices that own apertures within @base and @size. @@ -283,7 +282,7 @@ static void aperture_detach_devices(resource_size_t base, resource_size_t size) * 0 on success, or a negative errno code otherwise */ int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size, - bool primary, const char *name) + const char *name) { /* * If a driver asked to unregister a platform device registered by @@ -300,18 +299,45 @@ int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t si aperture_detach_devices(base, size); - /* - * If this is the primary adapter, there could be a VGA device - * that consumes the VGA framebuffer I/O range. Remove this device - * as well. - */ - if (primary) - aperture_detach_devices(VGA_FB_PHYS_BASE, VGA_FB_PHYS_SIZE); - return 0; } EXPORT_SYMBOL(aperture_remove_conflicting_devices); +/** + * __aperture_remove_legacy_vga_devices - remove legacy VGA devices of a PCI devices + * @pdev: PCI device + * + * This function removes VGA devices provided by @pdev, such as a VGA + * framebuffer or a console. This is useful if you have a VGA-compatible + * PCI graphics device with framebuffers in non-BAR locations. Drivers + * should acquire ownership of those memory areas and afterwards call + * this helper to release remaining VGA devices. + * + * If your hardware has its framebuffers accessible via PCI BARS, use + * aperture_remove_conflicting_pci_devices() instead. The function will + * release any VGA devices automatically. + * + * WARNING: Apparently we must remove graphics drivers before calling + * this helper. Otherwise the vga fbdev driver falls over if + * we have vgacon configured. + * + * Returns: + * 0 on success, or a negative errno code otherwise + */ +int __aperture_remove_legacy_vga_devices(struct pci_dev *pdev) +{ + /* VGA framebuffer */ + aperture_detach_devices(VGA_FB_PHYS_BASE, VGA_FB_PHYS_SIZE); + + /* VGA textmode console */ +#ifdef __linux__ + return vga_remove_vgacon(pdev); +#elif defined(__FreeBSD__) + return 0; +#endif +} +EXPORT_SYMBOL(__aperture_remove_legacy_vga_devices); + /** * aperture_remove_conflicting_pci_devices - remove existing framebuffers for PCI devices * @pdev: PCI device @@ -328,14 +354,14 @@ int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *na { bool primary = false; resource_size_t base, size; - int bar, ret; + int bar, ret = 0; -#ifdef CONFIG_X86 #ifdef __linux__ - primary = pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; -#elif defined(__FreeBSD__) - primary = NULL; -#endif + if (pdev == vga_default_device()) + primary = true; + + if (primary) + sysfb_disable(); #endif for (bar = 0; bar < PCI_STD_NUM_BARS; ++bar) { @@ -344,22 +370,18 @@ int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *na base = pci_resource_start(pdev, bar); size = pci_resource_len(pdev, bar); - ret = aperture_remove_conflicting_devices(base, size, primary, name); - if (ret) - return ret; + aperture_detach_devices(base, size); } /* - * WARNING: Apparently we must kick fbdev drivers before vgacon, - * otherwise the vga fbdev driver falls over. + * If this is the primary adapter, there could be a VGA device + * that consumes the VGA framebuffer I/O range. Remove this + * device as well. */ -#ifdef __linux__ - ret = vga_remove_vgacon(pdev); - if (ret) - return ret; -#endif + if (primary) + ret = __aperture_remove_legacy_vga_devices(pdev); - return 0; + return ret; } EXPORT_SYMBOL(aperture_remove_conflicting_pci_devices); diff --git a/sys/compat/linuxkpi/common/src/linux_cmdline.c b/sys/compat/linuxkpi/common/src/linux_cmdline.c new file mode 100644 index 000000000000..0cfa1d56ee6a --- /dev/null +++ b/sys/compat/linuxkpi/common/src/linux_cmdline.c @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2022 Beckhoff Automation GmbH & Co. KG + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ + +#include +#include + +#include