From nobody Mon Aug 11 07:46:47 2025 X-Original-To: dev-commits-src-main@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 4c0mtH4f2Jz64SZk; Mon, 11 Aug 2025 07: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c0mtH3n92z3fpp; Mon, 11 Aug 2025 07: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=1754898407; 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=K2H9DWGXCJfThd/rLwdRQ3N/2WA9Gf8IEFWPMYqcC7A=; b=rs71FGN324ayx5ipkgjhhr41EdfR6Zvh7Yaqp7aJxggKjW3OpoZZIkA+EMZxnS7s40/fEN J0YKlIzBi3WR4irChRqHq2KS2eqXIN4+yf5cuBEtmNJzpiZAoYkQib+6cxRnLDM4Iz+FPz VpbHhaAJJRx4I5M0KOoMAX1Le5nBwQjDqS1ul+bzbis3fC/umknuIXH84HMOSu+vKReC3N 4wETX3t0vesc75DIl5WMBTFqEKtDtTWqbWDBUeVKbOemI+3nfxMVS7aTvVN/CC3w1vcNJs 3SPCebyD7TRyTzU7je9Vtibv9jVyVchtzfbfCKkrqwDZC+4UmKOaJEIJLB4r3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754898407; 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=K2H9DWGXCJfThd/rLwdRQ3N/2WA9Gf8IEFWPMYqcC7A=; b=n7HhSMG4785dpq0jNZI8uByKVyo41s52f1pDuwB7KIcR7SSMG8Fz1HyAnrATBR0Yssp4zn mVO0r2ypEwGbApo/If14+AGIsENpu6eTkqesFMxpDVKSvnWGY5NfzBTWIg2yaiAtU8hi11 XnqsWPiEvahsnN+l4LQ+mgvAZkr1xrEi0+HersReP+tIOoI7Evd2Pw7Gvo99Ijg8JhDYWd jNO8rbJputOuIi5uqgFgS6OirWBZ0tfI313y6u0YBrAWXuozCXNIJbsvKvkykKQe0prTEo i8w8/PTABh17IoMHlhHOtuLPFhoy2IWzKZk6wwURY8qHL4OcWukduBMgINowtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754898407; a=rsa-sha256; cv=none; b=yjgCsEt3ypT4G8ygDaWEsMYOVp5kV+A2P9Rr8V9fuTAPjJkkYI8ox5i1zJW3YJ3AffEyvJ nrDYumASO43fRyX6OHO5TN4hPpBEfZXiDSIiNbZm/oHW+sluUSByrDPur1kufwpwBnHnCQ /z7K8ybFQrVmkVVlIrIEDJEeoQAwdvw4V4NboPZzFJOjIfqMCqEZQkC1Ekycvk3wRnfuDY p84zejPSUJN6eYtkF2AoWYpwLJS1a4Fs6IjIgDNroTLsrxYb56GgwU0VxLtrNa8GZHbaC/ yHqYFYRy3R45N6KkX0R9xpED87e/GPT9IexDPHRqJlEs4ezBHP5EZ0c/Dvunkg== 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 4c0mtH3917zkdX; Mon, 11 Aug 2025 07: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 57B7klYa093761; Mon, 11 Aug 2025 07: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 57B7kl11093759; Mon, 11 Aug 2025 07:46:47 GMT (envelope-from git) Date: Mon, 11 Aug 2025 07:46:47 GMT Message-Id: <202508110746.57B7kl11093759@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 5853a9971a50 - main - vmm: library version bump List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5853a9971a50d6711b88fd7ce97f3eba1b69f6bf Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=5853a9971a50d6711b88fd7ce97f3eba1b69f6bf commit 5853a9971a50d6711b88fd7ce97f3eba1b69f6bf Author: Xin LI AuthorDate: 2025-08-11 07:44:05 +0000 Commit: Xin LI CommitDate: 2025-08-11 07:44:05 +0000 vmm: library version bump PR: misc/288780 Fixes: a4197ea477771d525c2970d0c42acab727e43f16 --- ObsoleteFiles.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index a6662d31829f..9d3904cd9ffc 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -84,6 +84,9 @@ OLD_FILES+=usr/share/man/man8/zfsboot.8.gz # 20250728: Machine versions of 'runq.h' do not exist anymore OLD_FILES+=usr/include/machine/runq.h +# 20250727: libvmmapi bumped to 7 +OLD_LIBS+=usr/lib/libvmmapi.so.6 + # 20250726: MIT KRB5 DSO bump OLD_LIBS+=usr/lib/libcom_err.so.121 OLD_LIBS+=usr/lib/libgssapi_krb5.so.121 From nobody Mon Aug 11 11:19:29 2025 X-Original-To: dev-commits-src-main@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 4c0sbj5gyJz63M1R; Mon, 11 Aug 2025 11: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c0sbj4Zbcz42pP; Mon, 11 Aug 2025 11:19:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754911169; 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=xBVB+ESMF6s7dfT0aJA1BH8ZjCsaliqaeXMgcQtWwsw=; b=ZYPZmBiyTWRo7w8q2nOTOOEcA9oRvATMCuHHwPcPUzy1lys0qtryiZEXhJQIExexdDuVT5 FmWANVR9s7zP/r8FW9jvwCgQqO/nzXvfgA4m87lAPvxjImk3FKfCvdNNtjdBks+JNdSlbx uQgfMtRD8EbnqZ1uYkV5875xA+RzLRVsk6Fpg3SiOMVKOjKDsAJd0goDD/xtUAsHUOrmj5 uW84vtW4z8cmqZ6c/IiThhv9niJP/nsF64GnR4DLnRU5wCX7QM4Cv2D5F+vp5niLWLLTi/ 7dTsKHynozEZC5KzOBLs0Fu/i0sYQcCjghhky8J2HZwKwNZd2znam/cicRVqHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754911169; 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=xBVB+ESMF6s7dfT0aJA1BH8ZjCsaliqaeXMgcQtWwsw=; b=URVj+lFZXzlbyEKfHqvPIDzp6YCkCPNNBt2R7xIvtymq/AaDVUNYnr2tTL9k8vERygMX2e Pi3IANF+TJtIyX1fhRoK/Vh9oS0oWtp1sl2MT2R7kbE2vjfMvXZHeSD5dy2uYEneXFcPXF /XCrT6gnhjF/wADJChs6AQYoP5PRinzuZ+ZJmrtD0S8/qGU+/t98QubspPOlUIPUonLayC XVDObOxbYZtLum4GGDB3ani15rv1y5M6z6j5nCRlhuzQJixV7/gpb92nzwZ5YBnhRvgu78 oraSQkpYQsqpX0c/yN5UuQ5Yu6YwbL2sUY+MoYx50A94uhqFx5GfieejQwkWCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754911169; a=rsa-sha256; cv=none; b=pQyo7Zhz9BP4Z87tiRTmHLQalDL+bFDIiteQuhX9UQztCNQ5OjYNCTwM2IrZb7VStk6Zah pCNI/H//cPMHWdQ/3fQiNF5oL/bXTpzD1pNujtwTdfFqdUrOu6DoLBd3VEQxlfp8CvFa8m pOeDN1u7Yqwfq2wf0fjRj+y9HHn60Y/zFxlXMzleqTVr7rueoWicKpZGMXZfku0SFqJ5cM 9VwQMR5XVBvy9hBo8j5J7iUvSORjeGVkD6t4ZNalaNH2FV8l9zI7540VGsv9VyPblghSpx UuyLr23hE/onf1eCMy1ktixuo8oFNKo90Y0vGppSPIHeishzXlPYKdnMhExkQQ== 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 4c0sbj3rkmzpwd; Mon, 11 Aug 2025 11:19: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 57BBJTL4089784; Mon, 11 Aug 2025 11:19:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57BBJTMN089781; Mon, 11 Aug 2025 11:19:29 GMT (envelope-from git) Date: Mon, 11 Aug 2025 11:19:29 GMT Message-Id: <202508111119.57BBJTMN089781@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: 0f434b2b5060 - main - rtld: require MAP_GUARD support List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 0f434b2b5060b9898229a1b33a10d06616119257 Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=0f434b2b5060b9898229a1b33a10d06616119257 commit 0f434b2b5060b9898229a1b33a10d06616119257 Author: Brooks Davis AuthorDate: 2025-08-11 11:16:40 +0000 Commit: Brooks Davis CommitDate: 2025-08-11 11:18:51 +0000 rtld: require MAP_GUARD support MAP_GUARD was added prior to 12.0. We don't support such old kernels in userspace so drop the support. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D50731 --- libexec/rtld-elf/map_object.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index c6a98b50a165..5e5774c0b017 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -25,7 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define _WANT_P_OSREL #include #include #include @@ -43,8 +42,6 @@ static Elf_Ehdr *get_elf_header(int, const char *, const struct stat *, Elf_Phdr **phdr); static int convert_flags(int); /* Elf flags -> mmap flags */ -int __getosreldate(void); - static bool phdr_in_zero_page(const Elf_Ehdr *hdr) { @@ -204,8 +201,7 @@ map_object(int fd, const char *path, const struct stat *sb, bool ismain) segs[nsegs]->p_memsz); mapsize = base_vlimit - base_vaddr; base_addr = (caddr_t)base_vaddr; - base_flags = __getosreldate() >= P_OSREL_MAP_GUARD ? - MAP_GUARD : MAP_PRIVATE | MAP_ANON | MAP_NOCORE; + base_flags = MAP_GUARD; if (npagesizes > 1 && rtld_round_page(segs[0]->p_filesz) >= pagesizes[1]) base_flags |= MAP_ALIGNED_SUPER; From nobody Mon Aug 11 12:09:20 2025 X-Original-To: dev-commits-src-main@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 4c0tjD2RbKz63SQK; Mon, 11 Aug 2025 12:09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c0tjD1gkwz3Gk0; Mon, 11 Aug 2025 12:09:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754914160; 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=9BPpgWDCAhR3do3gFTBhgNtUWm7MBBW16+Y93Aw8Bkk=; b=I0DFN2tr9JtaEyE/QZwAUElTJRQtQySh5hhtAij6ujcHlGFTVC2qsOxCq990Ul0LBWdUgg fxsJ9MsxkleDAhn9xR4yTbyeLBDFgPMo6Vi9aGOQ5+1AZlqhzSO2ax+LQ/1FzStxSqgKtu uu3eCZb50DRf6m9ZmXrW5K3HVgREez73us0GC7UoW5ok0bss9hw5gEzFfSrOuRD82syz9u WnX00W+dHfuyb5B1jUKNi7eOFPqPOTVPAudEmxRRkyM/+slImznro53/6yjI7+FAuMUgwA EwWrcn3eSG9Qmd3vWR1wEwOgkQcbfAZp/1USCZ7jSEpOLML0hBN5sYqJgMUsOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754914160; 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=9BPpgWDCAhR3do3gFTBhgNtUWm7MBBW16+Y93Aw8Bkk=; b=filVivypAPBuvVc1syRR0QvpmdW6EopnCtxHAnsRVngiuilM8Ye0JRSsaE/ZFaqB//DkfZ UVgBHTyuLW5wFxQs02q4nDDdCrtHtw5v3HW6yDFxjJFyU9/NJ9aJEebn7TA84pn7338jA+ JGwHcxZIEWZzvLkO1ETyODa8aLmQ+jfzTsUtUZSIkz8vzboSjwg15QcSLVCOIZa/dIciB2 Z73Z0685UY6ef4Z9vowk2N3Z+xL6JWl9+h2s/+0LFAQeJcmZIORQey8JaRncZN8sS+etkP KCzhgtJbmmix7tUqKtWHINnnjofZIHevdo0bhjZkpbVttOofMWJAvufOo55kgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754914160; a=rsa-sha256; cv=none; b=IaOzvoWqSRNZwO+PSup20HzzSTH7Rw0hr69Eo0z5FrUmfOcDKr59Lfm6PHTqt9g7SVxlPq c0zKX2HJ4H8dCVfsratHs6N99HpLWGVXYMrQ/bDwp08lvcQDpdcPa/h9aYpzPfuUDYDPcz JOOCZ4emDT4w2s7QauI+I28GvdWL8rIpa5RjP7GoDIDCkgy+qlfLWQduVuemn64+6leshz wcuWRXq9j2pIbNPgpjOJFz37SNc3vtF1a7GJq7rIOJhsbstLUmrNN60i5hvk+SE7Le7mdH ZCe5OKsNnKe7zLTZjx7nhzvNK77fwl202MqyJpvttCSn/kWM6cbC1/NePTXMYw== 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 4c0tjD1Gm4zrc5; Mon, 11 Aug 2025 12:09: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 57BC9KIG084045; Mon, 11 Aug 2025 12:09:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57BC9K0s084042; Mon, 11 Aug 2025 12:09:20 GMT (envelope-from git) Date: Mon, 11 Aug 2025 12:09:20 GMT Message-Id: <202508111209.57BC9K0s084042@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 0c13e9c3c464 - main - krb5: Install pkgconfig data List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0c13e9c3c4647d16d3490ff1a6d7c33b39c28260 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=0c13e9c3c4647d16d3490ff1a6d7c33b39c28260 commit 0c13e9c3c4647d16d3490ff1a6d7c33b39c28260 Author: Lexi Winter AuthorDate: 2025-08-11 12:00:48 +0000 Commit: Lexi Winter CommitDate: 2025-08-11 12:08:49 +0000 krb5: Install pkgconfig data Users of MIT Kerberos expect the MIT pkgconfig files to be installed, and won't work without them. For example, this breaks anything that links against libcurl (ftp/curl) when curl is built with base GSSAPI. Reviewed by: ngie, des, cy Differential Revision: https://reviews.freebsd.org/D51842 --- krb5/Makefile | 2 +- krb5/Makefile.inc | 2 ++ krb5/libdata/Makefile | 44 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+), 1 deletion(-) diff --git a/krb5/Makefile b/krb5/Makefile index c49601990c4a..e9bbcae106c1 100644 --- a/krb5/Makefile +++ b/krb5/Makefile @@ -1,7 +1,7 @@ SUBDIR= util .WAIT \ include .WAIT \ lib .WAIT\ - plugins libexec usr.bin usr.sbin + plugins libdata libexec usr.bin usr.sbin # SUBDIR_PARALLEL= .include diff --git a/krb5/Makefile.inc b/krb5/Makefile.inc index 8529ee90a2e0..5d302962208c 100644 --- a/krb5/Makefile.inc +++ b/krb5/Makefile.inc @@ -9,6 +9,8 @@ .include +KRB5_VERSION= 1.22-final + # MIT KRB5 uses KRB5_DIR. Heimdal uses KRB5DIR. KRB5_SRCTOP= ${SRCTOP}/krb5 KRB5_DIR= ${SRCTOP}/crypto/krb5/src diff --git a/krb5/libdata/Makefile b/krb5/libdata/Makefile new file mode 100644 index 000000000000..c9a2e8e9259f --- /dev/null +++ b/krb5/libdata/Makefile @@ -0,0 +1,44 @@ +# Copyright (c) 2025 Lexi Winter. +# +# SPDX-License-Identifier: BSD-2-Clause OR ISC + +.include "../Makefile.inc" + +.PATH: ${KRB5_DIR}/build-tools + +PACKAGE=kerberos-lib + +PCFILES=gssrpc.pc \ + kadm-client.pc \ + kadm-server.pc \ + kdb.pc \ + krb5.pc \ + krb5-gssapi.pc \ + mit-krb5.pc \ + mit-krb5-gssapi.pc + +CLEANFILES+= ${PCFILES} + +.SUFFIXES: .pc .pc.in + +.pc.in.pc: + sed -e 's,@prefix@,/usr,g ; \ + s,@exec_prefix@,$${prefix},g ; \ + s,@libdir@,${LIBDIR},g ; \ + s,@includedir@,${INCLUDEDIR},g ; \ + s,@KRB5_VERSION@,${KRB5_VERSION},g ; \ + s,@KDB5_DB_LIB@,,g ; \ + s,@DEFCCNAME@,FILE:/tmp/krb5cc_%{uid},g ; \ + s,@DEFKTNAME@,FILE:/etc/krb5.keytab,g ; \ + s,@DEFCKTNAME@,FILE:/var/krb5/user/%{euid}/client.keytab,g ; \ + s,@COM_ERR_LIB@,-lcom_err,g ;' \ + ${.IMPSRC} > ${.TARGET} + +all: ${PCFILES} + @if ! grep -q "^PACKAGE_VERSION='${KRB5_VERSION}'$$" ${KRB5_DIR}/configure; then \ + echo "KRB5_VERSION ${KRB5_VERSION} does not match the source:"; \ + grep "^PACKAGE_VERSION=" ${KRB5_DIR}/configure; \ + exit 1; \ + fi >&2 + +.include From nobody Mon Aug 11 13:55:10 2025 X-Original-To: dev-commits-src-main@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 4c0x3L5njWz649Gm; Mon, 11 Aug 2025 13:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c0x3L4fVRz3TcR; Mon, 11 Aug 2025 13:55:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754920510; 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=XADaJ+onEA3dFK5jYSHgVl/HjxlqtJH1fWRHaUKq07A=; b=jznGVvbMYX7RkwT1tCmT5eGC8SRqmp8s3t1prihmzsT1odJnz3tUxtHZxsvymBOG8KOTKF cM/VtnZN4LTbwbwSbexSUFsnHBkzEDZfWIvOhCxooBAh69/0PoUMnXS3q8jCucEYTCCkxJ ThSGmovbS5T3VvFFolbMjsMyRfLd5TUOjgQITLN1/zzTpHZWVhSfr0lkKGa6tE2DrIzESi XvnKzAJ/FBEkcVLtZLxtTRP2eY6SGs9r/i6F9jMc2fPXfhaQe97udwgi1KhSd0PPMM57w2 NW9m1upCYvbE6VOj6r+eTNtqsP2FrY4l7DthvGUP9JQF7TjzTfUQ4PO+xtt9HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754920510; 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=XADaJ+onEA3dFK5jYSHgVl/HjxlqtJH1fWRHaUKq07A=; b=K5YhegU4SkkotDxEp4h7hysPXCM2EUH/eTAz0pQX+o2UPxh7FaiCcKE3yNNZWNuyx6toM6 XDuX9kCwWDKOnyjNsaePDfd/ItWOb/lwdzyyA87bLeEFHnxYy1QcYpWTv3m1pVSZofBDV5 FYPVCY/pz/GhhKjV4cRyeA8sQb41ZN6iGwqJ/dds5l+2/BBBFQg9LOPRe+ohuGnXvy9Axj vmwmU8uvd74eZqIocrmijG5oeyB356rcwNppAf6P3Iqk/Om4YG1gjls7cRY8G+gjqRbyHw xzCKjasdK87lh5BkC4xo4MUt+2uUbOqVQWWzCKWt7TvByEqjI4HZn802bQzyxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754920510; a=rsa-sha256; cv=none; b=i5sBYJVtsHFsTsgz0/Gy2+mYrL4GHBzTo1nZr5iouEuCQPkbadjV1lBDPhBg9gE/KhZ/R+ 6dybYWzVGR8NApeTgZhRlN5LL0kufVH1FBLlFfVXxUfEnnuGcuQfnXl+nBpbhk+9U64fLg otSJchrfvwhS+SqJ9vZU13zWqfDbrPPxrAOHbWxf8YeZZKgQXSPhnExY+0kiyKNyohzcey SfMvXJ1FqHGHWaSIKokNRu3JGedcfWGCqxrZgH5V4YgD8VUM6asJi4mb/01PqOlMWTjTG+ O/7ijgHbntb9KHC9ZAu3urW5JHin+fe5Ky2rqMWovlBFTEEMFAOXC+2hghjYSQ== 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 4c0x3L4Bp2zvXl; Mon, 11 Aug 2025 13:55: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 57BDtAki089379; Mon, 11 Aug 2025 13:55:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57BDtAYi089376; Mon, 11 Aug 2025 13:55:10 GMT (envelope-from git) Date: Mon, 11 Aug 2025 13:55:10 GMT Message-Id: <202508111355.57BDtAYi089376@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 988426e815c1 - main - kern.post.mk: Support flavors in PORTS_MODULES List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 988426e815c12a899c8c6853090b8c8fca7ed5cd Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=988426e815c12a899c8c6853090b8c8fca7ed5cd commit 988426e815c12a899c8c6853090b8c8fca7ed5cd Author: Dag-Erling Smørgrav AuthorDate: 2025-08-11 13:54:51 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-11 13:54:51 +0000 kern.post.mk: Support flavors in PORTS_MODULES MFC after: 1 week PR: 288596 Reviewed by: pkubaj Differential Revision: https://reviews.freebsd.org/D51833 --- share/man/man7/build.7 | 10 +++++++--- sys/conf/kern.post.mk | 10 ++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 0aae2c42ac04..4022b915c972 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 8, 2025 +.Dd August 8, 2025 .Dt BUILD 7 .Os .Sh NAME @@ -667,8 +667,12 @@ This is currently incompatible with building .Pa src into .Cm packages . -.Bd -literal -offset indent -make PORTS_MODULES=emulators/virtualbox-ose-kmod kernel +Each port must be specified as +.Ar category Ns Li / Ns Ar port Ns Op Li @ Ns Ar flavor , +e.g. +.Bd -literal +PORTS_MODULES=graphics/gpu-firmware-intel-kmod@kabylake +PORTS_MODULES+=graphics/drm-66-kmod .Ed .It Va LOCAL_MODULES A list of external kernel modules that should be built and installed diff --git a/sys/conf/kern.post.mk b/sys/conf/kern.post.mk index 59e51c394a35..0e4ffd92724e 100644 --- a/sys/conf/kern.post.mk +++ b/sys/conf/kern.post.mk @@ -124,7 +124,10 @@ PORTSMODULESENV=\ all: .for __i in ${PORTS_MODULES} @${ECHO} "===> Ports module ${__i} (all)" - cd ${PORTSDIR:U/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B clean build + port=${__i}; flavor=$${port#*@}; port=$${port%@*}; flavor=$${flavor%$${port}}; \ + cd ${PORTSDIR:U/usr/ports}/$${port}; \ + ${PORTSMODULESENV} ${MAKE} -B $${flavor:+FLAVOR=}$${flavor} \ + clean build .endfor .for __target in install reinstall clean @@ -132,7 +135,10 @@ ${__target}: ports-${__target} ports-${__target}: .for __i in ${PORTS_MODULES} @${ECHO} "===> Ports module ${__i} (${__target})" - cd ${PORTSDIR:U/usr/ports}/${__i}; ${PORTSMODULESENV} ${MAKE} -B ${__target:C/(re)?install/deinstall reinstall/} + port=${__i}; flavor=$${port#*@}; port=$${port%@*}; flavor=$${flavor%$${port}}; \ + cd ${PORTSDIR:U/usr/ports}/$${port}; \ + ${PORTSMODULESENV} ${MAKE} -B $${flavor:+FLAVOR=}$${flavor} \ + ${__target:C/(re)?install/deinstall reinstall/} .endfor .endfor .endif From nobody Mon Aug 11 14:14:13 2025 X-Original-To: dev-commits-src-main@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 4c0xTK5gLgz64C4L; Mon, 11 Aug 2025 14:14: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c0xTK52T9z3Yjf; Mon, 11 Aug 2025 14:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754921653; 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=0MYiyNTT00R5IgBzG5fg5sl+h+kvNYhljuUh2WhLQPA=; b=Zt9YOUBVs3jx2wx733EMUa5pl+9dD0gMinrFcYQCCpUXqqXzweYX8Dr3KNs7EqkQi0urEd hx3F7lX1D4U+9AhyeXmoZ/bRaofW59pDICvA7yRERbJDvIjgizKrm5o4CT7Zm8pERopwne jP6P37CTnUKwLhBlZ1JPSPUoi2DiJyRnTiUwJteo6sxY8EJz9GYULydO/pC0s6dNeRaPCr HamiyMqn6ZLJozE7fXRceh9MTTZkYcBlWZq9vOiDQr7oPqmgOne3GLtG4Eu/jJ6M1uhyxi z9J229XZvcCok83GQ1aszJSRY4CpvjS9qIip1wnJQEbPOj3Ms95C/M95uV9OsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754921653; 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=0MYiyNTT00R5IgBzG5fg5sl+h+kvNYhljuUh2WhLQPA=; b=s/HBkPVabimdRJjfIhoa0PxY8Fo6PdCdpapw2hKqjduLW8k/nwmF8WVCIVXTWrZbKSP1d0 xJ8xN/FHhZoBywc1QSffxiC8vJvG4jOnxms1Iw7MxGFvUexoH7uA/S5R+XoN2H7RAZ96FO AyJC9lsvnOPmmjhlywkxZSozT84lH8+jEm5tvvqVA4N/v7QAhH7HnY2OoJr7kTFFrftwlv 65JbpOMXjJNVsaCA9rrVZvjbn4rlmYp417xLT3qEFdZ6KgsmxsiZ/yMBVtR5edSXjGrtzb mGq7XSeGoodaxJj7mRQjA6pwqXbDygvLJbltc49K/43Y/X3xg53jAi3E7iW14g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754921653; a=rsa-sha256; cv=none; b=wwcXLy2EJHrvGgJF92QnZ+05OO/ooFnxsy5Zz9GKgh5T10M4aEz76Rh+O0nEHmPVhmiAQG ioCOP6PNWAU1cfkLgsZiS4LKVCLVLtd1oiHal71QEfa24gkXZ6Yp19Jep2/PN9uU0eNYqU EysEPX+M3FRWiGDlOxftL1nHSENjAy3tXzVM2nqpHuTBDGL80oCviBNsuvkpOC/RnHAjf6 kNgiiVQn4Kw8W8kBGPljfkGCLGNAUqpEu7Frt+PSMK1IRrkMPPwCCgl+uN65AtGiGRq0L7 USrUIOEYM1YwZ2LN86K4mCRUQb2W3K0cDy3ne7y6NfapGyVCVBJKF8WgL4QX+w== 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 4c0xTK4dBkzw0p; Mon, 11 Aug 2025 14:14: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 57BEEDVA027941; Mon, 11 Aug 2025 14:14:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57BEEDXg027938; Mon, 11 Aug 2025 14:14:13 GMT (envelope-from git) Date: Mon, 11 Aug 2025 14:14:13 GMT Message-Id: <202508111414.57BEEDXg027938@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: a3eab0130488 - main - lsvfs(1): Make slight refactor List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3eab01304884e13342bdaca4cf5204fa97ba456 Auto-Submitted: auto-generated The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=a3eab01304884e13342bdaca4cf5204fa97ba456 commit a3eab01304884e13342bdaca4cf5204fa97ba456 Author: Faraz Vahedi AuthorDate: 2024-10-27 12:01:39 +0000 Commit: Mariusz Zaborski CommitDate: 2025-08-11 14:13:40 +0000 lsvfs(1): Make slight refactor Signed-off-by: Faraz Vahedi Reviewed by: markj, asomers (both earlier version) Pull Request: https://github.com/freebsd/freebsd-src/pull/1498 --- usr.bin/lsvfs/lsvfs.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/usr.bin/lsvfs/lsvfs.c b/usr.bin/lsvfs/lsvfs.c index 04ed38e8d978..5477d96434ac 100644 --- a/usr.bin/lsvfs/lsvfs.c +++ b/usr.bin/lsvfs/lsvfs.c @@ -39,8 +39,8 @@ int main(int argc, char **argv) { struct xvfsconf vfc, *xvfsp; - size_t buflen; - int cnt, i, rv = 0; + size_t cnt, buflen; + int rv = 0; argc--, argv++; @@ -59,15 +59,14 @@ main(int argc, char **argv) } } else { if (sysctlbyname("vfs.conflist", NULL, &buflen, NULL, 0) < 0) - err(1, "sysctl(vfs.conflist)"); - xvfsp = malloc(buflen); - if (xvfsp == NULL) - errx(1, "malloc failed"); + err(EXIT_FAILURE, "sysctl(vfs.conflist)"); + if ((xvfsp = malloc(buflen)) == NULL) + errx(EXIT_FAILURE, "malloc failed"); if (sysctlbyname("vfs.conflist", xvfsp, &buflen, NULL, 0) < 0) - err(1, "sysctl(vfs.conflist)"); + err(EXIT_FAILURE, "sysctl(vfs.conflist)"); cnt = buflen / sizeof(struct xvfsconf); - for (i = 0; i < cnt; i++) { + for (size_t i = 0; i < cnt; i++) { printf(FMT, xvfsp[i].vfc_name, xvfsp[i].vfc_typenum, xvfsp[i].vfc_refcount, fmt_flags(xvfsp[i].vfc_flags)); @@ -82,10 +81,9 @@ static const char * fmt_flags(int flags) { static char buf[sizeof(struct flaglist) * sizeof(fl)]; - int i; buf[0] = '\0'; - for (i = 0; i < (int)nitems(fl); i++) { + for (size_t i = 0; i < (int)nitems(fl); i++) { if ((flags & fl[i].flag) != 0) { strlcat(buf, fl[i].str, sizeof(buf)); strlcat(buf, ", ", sizeof(buf)); From nobody Mon Aug 11 15:00:29 2025 X-Original-To: dev-commits-src-main@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 4c0yVm29X7z64HwJ; Mon, 11 Aug 2025 15:00:32 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c0yVm0xM8z3hQc; Mon, 11 Aug 2025 15:00:32 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754924432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6aCEAf8p89JLXCIlRn58fRMDLvT9iC3Fe6Yyu/bDMrU=; b=kln8Cte76M6XqVOMozHLUt4mSsscK3xsp0Xy5Af6W9X0vWVjNyOd5KRMcn53474iFTigLm wJhCKOcxoKkJXwM4aVc9/897k+djm8LNeWxnTnmY4PD3f9r8U4MVY2X7aESj9Jatq4LIcK zuD/21L0WiBBvgMmepcbAwu41GpUP3s/mPPF1zV3fGv+UouallIUsDBzdMSM2KrHZ1VV6y JmP/rwm+4b98UyNzQdLgldCQFqSNc6tMWqXNXpSct5Pv+2ZHDvmx4VbhPGP/AgbPUK3u2f ZqP5U/xVRQMIjTTyiiY6yutvWOLRprfKwTZExSsSBjR7W1AAMQT7OKzyVLWQHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754924432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6aCEAf8p89JLXCIlRn58fRMDLvT9iC3Fe6Yyu/bDMrU=; b=c+xkpxZ9sqDmO4CqpCQyEoy/ZjO3GjGhW+FcFSkw3zU+41bc2s4ufwKwanKq/sG0vuoNiX 5DB685qsPJr9t8UgG1bGL5m75smHXGMOPqd4c+QLrhy7AaSRuJxI668k6EdAKvcuAg0mVT RunCUlDXnGfEP5Ogchn7BdWJo2+B0gDSAQEgC+QY7ipUARJMFiyXn7K5fIaEWMcQINvhDN XlfbYdLqlRzjQvCobE8rCOGBQ+JHT1j2QH0oSHy313O/xc5jnWe689v/zarJjp8c/bPLQI z8xajdBEtUka2dEQ5rb5UGJCQ7lxoAlgR4KQz1IdQ+VsYgs3XBNggJ2Q/goz7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754924432; a=rsa-sha256; cv=none; b=RcxLe8tlioYSdfg+nsRvbsLbu6aQMpu1S9Y5jrxklnRSUYPz3T/7ANYx1ymBCRIv5qeBnp XtTay7T9g7cnuCljO0w+1t7arDHTN8ySy7GOSKuPpdMDAngwuboDFRX9+Z+A0Sof7HMRyO 4an09QR//g8UBBygwbNcohBKa7ydU3ogoWdI/RKbnTRXn2aEkkglgx+1xWITpVXrqouVDR ga6jXrz9Avs1fMTN2pPii7WyIRKWPdApXo5iY3Gt1UraweIrXJZ0SpIZL5wx6NQ1qfbXHX U69utDw5Y4yJ49fgNMCmYHQVnR+c2zBISRBE5k1iV6qF717Y/i7YnRBS83O+PA== Received: from ltc.des.dev (88-177-82-251.subs.proxad.net [88.177.82.251]) (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) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4c0yVl6d9vz1BGb; Mon, 11 Aug 2025 15:00:31 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id BB58C17FBB; Mon, 11 Aug 2025 17:00:29 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Lexi Winter Cc: cy@FreeBSD.org, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 0c13e9c3c464 - main - krb5: Install pkgconfig data In-Reply-To: <202508111209.57BC9K0s084042@gitrepo.freebsd.org> (Lexi Winter's message of "Mon, 11 Aug 2025 12:09:20 GMT") References: <202508111209.57BC9K0s084042@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Mon, 11 Aug 2025 17:00:29 +0200 Message-ID: <86sehxx5rm.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cy, now that this workaround is in place, can you prepare and post for review a patch that fixes the 1.22 import? At a minimum, it should: - Generate and commit the .pc files so we don't have to generate them at build time - update generated files such as krb5/include/autoconf.h and krb5/util/build-tools/krb5-config.sh which still show 1.21 DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Mon Aug 11 16:48:25 2025 X-Original-To: dev-commits-src-main@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 4c10vF5mCxz64W5C; Mon, 11 Aug 2025 16:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c10vF31k0z3Bmp; Mon, 11 Aug 2025 16:48:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754930905; 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=HLIlfdYcfEcNYN+7K4+DPd8in1KCDTkVKy1BcrnPwOg=; b=vvo49JMhXfv0QQm9qv6DxDVKdgGixhImWYsIIOl4POXcMHEjn8h2djBpxHsggpdWa3brt8 uZUR7b3aQb/Bweem0ouf9KSOGEH7fwMrC5+lKY+R0s5G26EoYH29HGZs7DVP9JcxTyzaXE JIyd1OFZsnPyIzRC7iLv2LfzH1ThdN5TAPMA1vuSwx9tTM9VXshnf0R0exWhTzdmfoJyMc uS3Y9pJXX1Ob2Xz58fDT3KzuUcWmxu0YkYNvJGhYwgb/wgjaK8Vjd0cPXWtw2ddACMzDI6 IPmbu6ArIkMPxBBtUloX58k3WKOJA7RVZMgUBxTJld1icGdS+T/OUJPVGaccLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754930905; 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=HLIlfdYcfEcNYN+7K4+DPd8in1KCDTkVKy1BcrnPwOg=; b=tQ+4sAxrryvwpT3JjHAXR+oXGu8rNleh4Oz4b6SVvs1Ix8sf9sVPros6aOFWrWZ5V+sRUB ogqzuUL66tab5bnM7WtEdziucLCNp7E+KepLsdhGN3NDflm6a9Qt8hYpgLP3TX2QsmyItX czHfk8GXXDdbmOiQAvlHXnWINEDt7GFz9asj6bSOHcOlZCCOMgTsJGwrbz60V4MfSwesuQ e1cjYR0k9+/IY5UJnkVLi5eY+P8pwD1VvqlfUs8cUNP/Z4VNxHzfODbBWvgX2jCIF1fkXM l8b1Sk45mOO55wVZCdPZ6HlS2L+T8tMJzm1NXnGXkY/eSu6pjdB+rc9Pah+k/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754930905; a=rsa-sha256; cv=none; b=juQk8nywTGVVRyiZxv24CZTyCaOc6TRNsF3cJfk+Bh4A0V2/E0lJu0jgRYF/vuT8E7K2kj A+CCvO3bX4sYm/a07tT3skD9cDY91H94jri5e+dX/dspeXlV1TFHjOKTIanrpGFtcrJvpl mI13IsoYTY+Fz1w9oBw7n6IjTy6gYInoTjPAcujb2WUk9tpXDeVLpq2/ifCegw2zPSCurG adoIah4khh82mqu9vpIVByD6MAr/iaohB5Fx1g+qCnSH7BgpvyvRg922Kk5BW3VVSYznGL VMPJ9WX7gUDFKmXBMrXj08OYO5QQQ9dutKbFVRanif2Nm80naaSxJXM724dI6w== 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 4c10vF2Kj0z1098; Mon, 11 Aug 2025 16:48: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 57BGmPOh012087; Mon, 11 Aug 2025 16:48:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57BGmPkE012084; Mon, 11 Aug 2025 16:48:25 GMT (envelope-from git) Date: Mon, 11 Aug 2025 16:48:25 GMT Message-Id: <202508111648.57BGmPkE012084@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: 52a94237615c - main - icmp: remove unused BANDLIM_UNLIMITED List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 52a94237615c6d3b6c928e41d9c7168ff6979996 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=52a94237615c6d3b6c928e41d9c7168ff6979996 commit 52a94237615c6d3b6c928e41d9c7168ff6979996 Author: Michael Tuexen AuthorDate: 2025-08-11 16:46:08 +0000 Commit: Michael Tuexen CommitDate: 2025-08-11 16:46:08 +0000 icmp: remove unused BANDLIM_UNLIMITED Reviewed by: Nick Banks MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D51849 --- sys/netinet/icmp_var.h | 1 - sys/netinet/ip_icmp.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/netinet/icmp_var.h b/sys/netinet/icmp_var.h index d6b75e482e35..b39479565bd6 100644 --- a/sys/netinet/icmp_var.h +++ b/sys/netinet/icmp_var.h @@ -100,7 +100,6 @@ void kmod_icmpstat_inc(int statnum); SYSCTL_DECL(_net_inet_icmp); extern int badport_bandlim(int); -#define BANDLIM_UNLIMITED -1 #define BANDLIM_ICMP_UNREACH 0 #define BANDLIM_ICMP_ECHO 1 #define BANDLIM_ICMP_TSTAMP 2 diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 71b75d18efd0..543b846fbba5 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1181,7 +1181,7 @@ badport_bandlim(int which) { int64_t pps; - if (V_icmplim == 0 || which == BANDLIM_UNLIMITED) + if (V_icmplim == 0) return (0); KASSERT(which >= 0 && which < BANDLIM_MAX, From nobody Mon Aug 11 19:27:25 2025 X-Original-To: dev-commits-src-main@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 4c14Qj44xVz64nsr; Mon, 11 Aug 2025 19:27: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c14Qj3Ww4z3bB5; Mon, 11 Aug 2025 19:27:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754940445; 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=khOEg0soX/rcvafep/44OgGSWj84kOxozImyP4UXuqM=; b=q0z+VU6iBTHVxhd8UYdpbJ/5NAmUjsM3pteS8hwwqaHLV8IXaH1mFKr7+oXSNls2FzJpGV Yg7c4tUUiRTeAwby6yKsNWfq/qUMMY4//x8+1uzMUbl/jqoJi7zO0kPadYf4HkQmendETb OD9wh+MUnyNEV3zgbW5SjNouaAqtSoE3RQp1xYTPMTHf0iu8BgqemnCZxKewGyF3nSKGXI 59QVfpnnPb1Hv6beJiDER3giYzWMSreIV6ELx/q7ayqXyFswFYPVGKLKj9b1CsqFueO5RR BecHpfNVx66Ao7N+iyJFblBk3XvGspMrluR0ucLuBlOgPm885qTF3l1Ediseyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754940445; 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=khOEg0soX/rcvafep/44OgGSWj84kOxozImyP4UXuqM=; b=UraTorV4s5SU2PuUtkCMXI6hf7dS6KDk1wbVlWxpVFRYfyn89Z51JV/4WH+Ioddg9RCL0d PoqXvGb5iUDaBZzEFSx+jgzjlwLoPOCiE3GSYiXdfPht5xqHaOFprDA19KjlRoCWmSdl0O qb5+BaekY4YVvKTbCfTNL/y78cG4LsMA615FXi20aMMpYL+PLWX+D32R0xu7HStE9/rWK9 T6v7HWFl+yQuENR+r3rZ0XWizBbpD2i465YomM+ezmq61HMctzAuUgTIILtjpyRDfgD8oo yp6w+NmNWjAG/KrD7BqmB0hPxqOWTHv98FtUwyrJbU+uca9IMt8f1o3eOQFGXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754940445; a=rsa-sha256; cv=none; b=b5f9y4DcspkjoitqoHIdy+nz/Cr6/kdjcmL/I0KWITu6mm4XDMgVOsfTXXNu7v4wTK0LcV avhNM0dvjYpUn5bVStlzrrtB+sG9dj3enRZXIXoTW3txZcUpmm6hixP5/CBf7rLyT6NFvp gnJO7ChoojAcp1aEUC7HQaYCnUgtdSimkbWZ564OxiE5S7SdO44POBhA3fDqeJXzzB3REt agNpMyMBRNzYNQosWKtBfit8uBjXx+4AhEX0ZEVwL8C7oTtTW1r3kPFurdLlBnyRXqspdv 9Siw78DLd30FBigbJYwFYspz+HIin+yI+8ipZxZFjMSht2YkY2g4An4q36b3JA== 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 4c14Qj2JvDz15DS; Mon, 11 Aug 2025 19:27: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 57BJRPOj013801; Mon, 11 Aug 2025 19:27:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57BJRPCo013798; Mon, 11 Aug 2025 19:27:25 GMT (envelope-from git) Date: Mon, 11 Aug 2025 19:27:25 GMT Message-Id: <202508111927.57BJRPCo013798@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: f5219cabcf47 - main - pf: free anchor and ethernet anchor zones on vnet shutdown List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5219cabcf47a1100b6214485c6655d717e89431 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f5219cabcf47a1100b6214485c6655d717e89431 commit f5219cabcf47a1100b6214485c6655d717e89431 Author: Kristof Provost AuthorDate: 2025-08-08 15:15:19 +0000 Commit: Kristof Provost CommitDate: 2025-08-11 19:27:09 +0000 pf: free anchor and ethernet anchor zones on vnet shutdown Fixes: 029532e77b92 pf: also allocate ethernet anchors from a UMA zone Fixes: 31131a9d6a20 pf: allocate pf_kanchor from a pool Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 3fa7789efcfe..9d83e7b82e6f 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1347,6 +1347,8 @@ pf_cleanup(void) uma_zdestroy(V_pf_state_z); uma_zdestroy(V_pf_state_key_z); uma_zdestroy(V_pf_udp_mapping_z); + uma_zdestroy(V_pf_anchor_z); + uma_zdestroy(V_pf_eth_anchor_z); } static int From nobody Mon Aug 11 19:27:26 2025 X-Original-To: dev-commits-src-main@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 4c14Qk4ymGz64nxj; Mon, 11 Aug 2025 19:27: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c14Qk3Hq0z3bB6; Mon, 11 Aug 2025 19:27:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754940446; 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=Ic+9RLABW2Ni4Z5gjirvkdFeN4dtQCOD6IvmLfjBDXs=; b=gvaWFGG0pPOsVkYMfgl+wqIIM1UZVnovSf6nKI6bAzo1wYnIwgNHFGhzlhzwb6hKwd7Q6s HwwyFLX9C23eZpByP+BtC9eCKiIgrW6goKx+/4qhB/VvUbRjUIAi77rFmt5OrewmzfJhki XaV6EXLfXm9ZsU2Fr/wng34wHDPP2hsplS+G4mPztF+Bt+E2/Joiy5yyFjayIgePIURoFk Fq8fgO/Jtzx+HXUO71Tl9qipMnnm2bwuCsl1/RFOZLaAUWZAXRCAjYduwjk4KaQsa70TWk liW6syxfaqU/de9rk+NQi0dwpIhzcWt5zbnSXbc0HYIOtqKQngHJS0Yd0jajrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754940446; 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=Ic+9RLABW2Ni4Z5gjirvkdFeN4dtQCOD6IvmLfjBDXs=; b=RB0f+sYMAIuP9iFzJQ1ePKcB9HaxK6FrzynwrYTBukO/Oa0uZTvW1wHOapb6gpcN3waVeu NXEMXzLqACVz1CAnDUx4PMpPM0pIoH86JR+U9kakLPbQQS5NSSkVqGIwUknA83WpXwgixz 5JbrbYQvbLhGDr8bcGV49sv4/g65VWUp+l1/Dfu//7Vbl1SnZL+2rkcNQKBVkjSl4HMstG R6JDx3zUXD6b3XU5LVPkkGEFMVZFyx1UWCBMDmMgJ0QNNLMwpERQ70zZlharaM1sea81SA dzKKvzgBBSQZ1YsUuD0YHBtzy1fI8V6Z0mn13nNKo1OYfwyl/8gK3FpacEbZgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754940446; a=rsa-sha256; cv=none; b=CFzknQX9gEkSE1EmrUqaoAz+cYQh9O3rTW45v6IoQmPBUm/MOSmTum+v4UASPg6haJESZr /e9dTS73e7DQLdQ1cR1PWJGUAc23m7Wiv0v9TWH4aOZ0wEWB43+cPOntBao2UuvJwF7Kfj Ey0WmuKrJDEfg9AKhqObwdG6xq7ENX8ReO4NZGEa0u7YA267lnnpkN4parAsqKJjZOpPmQ J0JdIIKXvnsbB9C+F68uSMZlUz1i/Vl5U/AC1oQ6usQ61tB5ZsLTEGHgRGBTJfBvII+7MB hiuTRsePW6HYOunslcimAEZUdnQpPlrD3/7o5Dy9x26ATWI/GhSeC8sw4OH+rw== 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 4c14Qk2TPpz15Hg; Mon, 11 Aug 2025 19:27: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 57BJRQvI013835; Mon, 11 Aug 2025 19:27:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57BJRQ1X013832; Mon, 11 Aug 2025 19:27:26 GMT (envelope-from git) Date: Mon, 11 Aug 2025 19:27:26 GMT Message-Id: <202508111927.57BJRQ1X013832@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 96bd22f2bd80 - main - pf: fix anchor/ethernet anchor cleanup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 96bd22f2bd80f9c991a41fc45ef032f256cae170 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=96bd22f2bd80f9c991a41fc45ef032f256cae170 commit 96bd22f2bd80f9c991a41fc45ef032f256cae170 Author: Kristof Provost AuthorDate: 2025-08-11 12:14:18 +0000 Commit: Kristof Provost CommitDate: 2025-08-11 19:27:09 +0000 pf: fix anchor/ethernet anchor cleanup Don't mess with reference counts, but use RB_FOREACH_SAFE() so we can safely delete even wildcard anchors. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_ioctl.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index b6f5d74b5b42..e5da05a958f6 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -6444,19 +6444,14 @@ shutdown_pf(void) int error = 0; u_int32_t t[5]; char nn = '\0'; - struct pf_kanchor *anchor; - struct pf_keth_anchor *eth_anchor; + struct pf_kanchor *anchor, *tmp_anchor; + struct pf_keth_anchor *eth_anchor, *tmp_eth_anchor; int rs_num; do { /* Unlink rules of all user defined anchors */ - RB_FOREACH(anchor, pf_kanchor_global, &V_pf_anchors) { - /* Wildcard based anchors may not have a respective - * explicit anchor rule or they may be left empty - * without rules. It leads to anchor.refcnt=0, and the - * rest of the logic does not expect it. */ - if (anchor->refcnt == 0) - anchor->refcnt = 1; + RB_FOREACH_SAFE(anchor, pf_kanchor_global, &V_pf_anchors, + tmp_anchor) { for (rs_num = 0; rs_num < PF_RULESET_MAX; ++rs_num) { if ((error = pf_begin_rules(&t[rs_num], rs_num, anchor->path)) != 0) { @@ -6474,14 +6469,8 @@ shutdown_pf(void) } /* Unlink rules of all user defined ether anchors */ - RB_FOREACH(eth_anchor, pf_keth_anchor_global, - &V_pf_keth_anchors) { - /* Wildcard based anchors may not have a respective - * explicit anchor rule or they may be left empty - * without rules. It leads to anchor.refcnt=0, and the - * rest of the logic does not expect it. */ - if (eth_anchor->refcnt == 0) - eth_anchor->refcnt = 1; + RB_FOREACH_SAFE(eth_anchor, pf_keth_anchor_global, + &V_pf_keth_anchors, tmp_eth_anchor) { if ((error = pf_begin_eth(&t[0], eth_anchor->path)) != 0) { DPFPRINTF(PF_DEBUG_MISC, "%s: eth " From nobody Mon Aug 11 20:31:35 2025 X-Original-To: dev-commits-src-main@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 4c15rm03pqz64vHd; Mon, 11 Aug 2025 20:31:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c15rl6Txlz3lQp; Mon, 11 Aug 2025 20:31:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754944295; 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=p0FCibrDYHh3V8JG8aAzCZ9I7iaPWvoKdO2Gv1ySR78=; b=rDXqTqJQ1LgAs9rVTfvCpMw0whxDK+DyhckqfAkgSbA1evcwJEBnCH+hl0vFJMPN0kJjXX rjJq9Ig5ACFiO6+eMj06KFHM9WBQPAD8rQejs4M9njBwdbHAoYuSpl/2nuMv/xoQjJxrxv AGzbh07peNrWXfsjLQlvYZ3lqytvwKeXLqWXGUKUWu2ArBFFpGbi1H+NlTp3lioHf7Vvfi fcnKIZBSP5ly5Cp8M0fAhcIw/LQ+o/MibQFf7so1y8uAnvDsuBticMIrw4WwO3nUrWy6vR d/jBL5IfKnyb4/co8hkJVjTbGWXGjF43lzF0+GfimCtdyMtm7j+GyCRjneOcHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754944295; 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=p0FCibrDYHh3V8JG8aAzCZ9I7iaPWvoKdO2Gv1ySR78=; b=olKQRkIyziBn/smcINbyKA48e0G3Nhpr2myIs/iD+TqAtlEa5xWllb12edqGK0PHdmTG9z cfUrNoaqeP6IyZNQTdQM4Fgz7NNPjqgUn824D5Pjl0IbtO+RcDH5HNnFXV7w8mS8QS9qym MmXLcqVdh268ayh+poDYxaTXe80FxQcFjtqCqovc4TTbErsMZcfjJkk+GocFbRpW0in5xD BiZ7FD5dlgrr42p1qpmnkMbnoY3JPs5YHa/g67bvIor/RszcChka6F/cq2y5tCZYkoW7z9 SMK9iffylSO9nixb+AXHJD+8iIPIvBlQPHEOWopocSfwb7FuXKxOiZMA7i7qnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754944295; a=rsa-sha256; cv=none; b=OhabTnbVq5aGBbCNE8h2HaMxPInF1T/oL+R6DsyEn1Xjg321zjFZa2kR14IOF0UYhNauyr SnY/V7xznAYfUKQhCVIatXLzlSPf/obu7yeNpNYXDlQhoc0mf2j0+OLDGMyYaQpLbbAPiV Q4VpUdbKvEiFI/TPdkYK/1Zu0Uk+dXnOJQRGMaawLy3e6QIV9+7xF9sGdAdpdDQLkdz8nw pZ0p9f/F1F2uUUml0BIyQ5oXtNxuEwbnUq9w8dKoqAV8Xs5alK3W+dRqrHvOYadSoL+1Us KhrZ6rRPE6swSDSjUyXbbysTwE3uDr9HcPAvoACb5WEqmJLD+CA++QC94KKwhg== 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 4c15rl63Rmz16q3; Mon, 11 Aug 2025 20:31: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 57BKVZRG042013; Mon, 11 Aug 2025 20:31:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57BKVZRw041997; Mon, 11 Aug 2025 20:31:35 GMT (envelope-from git) Date: Mon, 11 Aug 2025 20:31:35 GMT Message-Id: <202508112031.57BKVZRw041997@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pietro Cerutti Subject: git: b89104dfd5cf - main - null: support EVFILT_READ/EVFILT_WRITE kevent filters List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gahr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b89104dfd5cf001b34963b9e02083027f9d215d5 Auto-Submitted: auto-generated The branch main has been updated by gahr: URL: https://cgit.FreeBSD.org/src/commit/?id=b89104dfd5cf001b34963b9e02083027f9d215d5 commit b89104dfd5cf001b34963b9e02083027f9d215d5 Author: Pietro Cerutti AuthorDate: 2025-08-07 20:24:06 +0000 Commit: Pietro Cerutti CommitDate: 2025-08-11 20:31:01 +0000 null: support EVFILT_READ/EVFILT_WRITE kevent filters This enhances the full, null, and zero devices to support read and write kevent filters. A read event is immediately triggered for full and null, and never for zero. A write event is immediately triggered for zero and null, and never for full. Reviewed by: cognet MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D51807 --- sys/dev/null/null.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/sys/dev/null/null.c b/sys/dev/null/null.c index 7ffc618e63ee..8525eb9543c3 100644 --- a/sys/dev/null/null.c +++ b/sys/dev/null/null.c @@ -4,6 +4,7 @@ * Copyright (c) 2000 Mark R. V. Murray & Jeroen C. van Gelderen * Copyright (c) 2001-2004 Mark R. V. Murray * Copyright (c) 2014 Eitan Adler + * Copyright (c) 2025 Pietro Cerutti * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,6 +40,7 @@ #include #include #include +#include #include #include @@ -53,12 +55,26 @@ static d_write_t null_write; static d_ioctl_t null_ioctl; static d_ioctl_t zero_ioctl; static d_read_t zero_read; +static d_kqfilter_t kqfilter; +static int one_ev(struct knote *kn, long hint); +static int zero_ev(struct knote *kn, long hint); + +static const struct filterops one_fop = { + .f_isfd = 1, + .f_event = one_ev +}; + +static const struct filterops zero_fop = { + .f_isfd = 1, + .f_event = zero_ev +}; static struct cdevsw full_cdevsw = { .d_version = D_VERSION, .d_read = zero_read, .d_write = full_write, .d_ioctl = zero_ioctl, + .d_kqfilter = kqfilter, .d_name = "full", }; @@ -67,6 +83,7 @@ static struct cdevsw null_cdevsw = { .d_read = (d_read_t *)nullop, .d_write = null_write, .d_ioctl = null_ioctl, + .d_kqfilter = kqfilter, .d_name = "null", }; @@ -75,6 +92,7 @@ static struct cdevsw zero_cdevsw = { .d_read = zero_read, .d_write = null_write, .d_ioctl = zero_ioctl, + .d_kqfilter = kqfilter, .d_name = "zero", .d_flags = D_MMAP_ANON, }; @@ -197,5 +215,35 @@ null_modevent(module_t mod __unused, int type, void *data __unused) return (0); } +static int +one_ev(struct knote *kn, long hint) +{ + + return (1); +} + +static int +zero_ev(struct knote *kn, long hint) +{ + + return (0); +} + +static int +kqfilter(struct cdev *dev, struct knote *kn) +{ + + switch (kn->kn_filter) { + case EVFILT_READ: + kn->kn_fop = dev->si_devsw == &null_cdevsw ? &zero_fop : &one_fop; + return (0); + case EVFILT_WRITE: + kn->kn_fop = dev->si_devsw == &full_cdevsw ? &zero_fop : &one_fop; + return (0); + default: + return (EOPNOTSUPP); + } +} + DEV_MODULE(null, null_modevent, NULL); MODULE_VERSION(null, 1); From nobody Mon Aug 11 21:27:40 2025 X-Original-To: dev-commits-src-main@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 4c175S3P7Dz63mGZ; Mon, 11 Aug 2025 21:27: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c175S2b6vz3rpC; Mon, 11 Aug 2025 21:27:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754947660; 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=aqDPoWqRHn0xvLFhAfXaZa28vDJggG2zgtt+8ooX6UI=; b=V47M1ldmuvEimwN6D9rCe0h9MhlRsdJdRbvNNUUArjLK7W69oyDBmzCckVnoEORd7HAq4M GimUbKPsVtWmzu5Jbk6sf2ClNqGNVdfpppkP88H6AbQTySN5r/4sxm/+NN55PdZkPr17MJ B85WzY12rNJ8K4ZpfZHlqWEbRTFBaqX7BaD2jq7iNmL7Hu9A+hXJNOTb44sFUsnINVpzfB 8Lu557N6IMO2SvAMTlC3NGBFUP+Fdz6Gc+OeIMMBG3hlz+zImPV30JtoTK4mlgVLHhJ5xn hgAh4F8Mm3UBf4y1Laz1dITJbju/PeQDCuJ7rFKyAJM391+G/HbRyuTEFIGuKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754947660; 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=aqDPoWqRHn0xvLFhAfXaZa28vDJggG2zgtt+8ooX6UI=; b=JbFQBnyxsvMsEE6pCeLHAqXOi2xTSkLVetGUQsQL8hDs9Xc8gUcZYMPUGawsNQyYOoZ6h1 HmHX4gb47Vo22juNp8TJdKlMVNow+LkMZDxr79UhHnPS7pKcWVxoWcAPz0Q7JTYc7SUyge s0Y9KA+WS3O62nQsuSySugFcdYV/eUjpGx98DkIMhFSdx8mAOtseVyMzr5QBN3t7sqHfvF qDGTbXJC9YQDhtwuYi9tLn8FY7lA8yudFjwWrMCFHLJP8KSJu+qQQ2acHVhJ38S7X8iA4g 0EXI2sgDIq520CNAnQySGApsXLMzlPWcjlaIl818M2UU1ZhrdktHvTEVMIdYGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754947660; a=rsa-sha256; cv=none; b=bCPikyMmX8tOATy9ezbLEF2b1CitnsKmbA9dORLsoEqNIV9RyrHMxRzby/xWEfHtAn+22s TLl5+uISNztQ75IuZVZFB0mfYdRA7yZVNEMy/9CEcIpCJppUJSvweWV4J4BTsC2W6vriNZ ZfVyAoMvGG+yV9WzlNINW3DK1hOpM0TgjUbE+mg24kNRB1MmszNlTBJgVcYbVznPlvUHjj fLkbZ/iKlnwfcyrxWtbgkc9ULtxZ8OAIZBcj03ChJe6nylXi1K8CIl5/QBcHIR7XLbrk+u SIE7pG5u8i0D8ekJe7EJ/ELxhwwNeLT3HqX7kOq3ZSwJcdgd1Z3zrstqRZh5iQ== 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 4c175S1m0Nz17NZ; Mon, 11 Aug 2025 21:27: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 57BLReK4040472; Mon, 11 Aug 2025 21:27:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57BLReGh040469; Mon, 11 Aug 2025 21:27:40 GMT (envelope-from git) Date: Mon, 11 Aug 2025 21:27:40 GMT Message-Id: <202508112127.57BLReGh040469@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 7a4a305f1300 - main - ObsoleteFiles: fixup gssapi/gssapi.h entry List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7a4a305f1300c27dd12585d5442e2ee52b97b940 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=7a4a305f1300c27dd12585d5442e2ee52b97b940 commit 7a4a305f1300c27dd12585d5442e2ee52b97b940 Author: Gleb Smirnoff AuthorDate: 2025-08-11 21:26:54 +0000 Commit: Gleb Smirnoff CommitDate: 2025-08-11 21:26:54 +0000 ObsoleteFiles: fixup gssapi/gssapi.h entry Fixes: e26259f48afe98022d885f02fbb8abcd7878e41a --- ObsoleteFiles.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 9d3904cd9ffc..0a4a567dff0b 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -60,7 +60,7 @@ OLD_FILES+=usr/sbin/nvmfd OLD_FILES+=usr/share/man/man8/nvmfd.8.gz # 20250807: Replace lib/libgssapi with krb5/lib/gssapi -OLD_FILES+=usr/include/gssapi_krb5/gssapi.h +OLD_FILES+=usr/include/gssapi_krb5/gssapi/gssapi.h OLD_DIRS+=usr/include/gssapi_krb5/gssapi OLD_DIRS+=usr/include/gssapi_krb5 OLD_FILES+=etc/gssapi/qop From nobody Mon Aug 11 22:13:25 2025 X-Original-To: dev-commits-src-main@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 4c186G0Q3Vz63s5D; Mon, 11 Aug 2025 22:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c186F6qBTz3wfC; Mon, 11 Aug 2025 22:13:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754950406; 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=KWV0sg8Zxa/iD0/k7iGIxnkycXiIrKahzLt164fNjsc=; b=h8cHJaBEbkkr8G5wmCkGtTHesD+fn67yWb9/4B3DWp0+H+gQQdv205CaVTJh8Pk4VFtLGT 1TTbvcNUNKVtVkACFq8/RKzuc/RlKUF3WjMj93MLDbDlkPzheon4do19/JSPo40thZegMv 1tmtQQaa9MqpKITyWduIawTG9EB3bmbYU6c/qVvuCu7PZM3ihEBlrskgwTNpSgJV3qW1B1 D2H9WsUk0YRwKTbxgyQd78wbiMSRf2U+z+MFSpYshj+kjb2Au5kAJwJTNQNGn+0YTqXD73 E/C7M/dFSdox3clK54gwip/OHqdW1wKwwZ8MYOICX2zgIyTy7QbXrPge65gRqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754950406; 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=KWV0sg8Zxa/iD0/k7iGIxnkycXiIrKahzLt164fNjsc=; b=SoudJfkekiM7HlkgShLTqXSV36VT3hW9B7ONPvlp0Rku3ZMmTMoTxEgZs6iGoDzr25ZN52 L1lO5w+aJixA7ZYg89zeSZAs60uCTpQpNH3hzeFnq5/d++CMCAeni3IXttE/7iDBK++uTx /kyA9e+Gg8nbBmBDS/ddah2EUnAnDJzyspngPTiO0nA2AT2rudU4YOLD2sIi3EbUEzsrHe QCK/yGvlA0YCe/jYgyC8+tu4TW2PRMcD2oAlxK2/a1eZVSI3CtHcXNyIv41t7zZd4nJnZY NRccwacHrirITtlCKN1vvVeFLMbXIakhLVY1HEoUXcSTzg2xfwizxMpXGYmn2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754950406; a=rsa-sha256; cv=none; b=ImzJfO72mWaVb9YPGJ6lNhk7RGLxDt9bbpchQ9KGvca0w6FA880lCQ+SQPf0PrONnDSFkw Pm3dH03L4NRh4a55Frr4sqx5//PIhhXQk4PIC1XgVDj6kqw4w5Q+pwXoUmn8y5BQm2pELK vF0CGzuxuNFtB5aDol8uroxN0ApCGEzzFr2IkSDIv+1b6iwQ5nJI4ESsxl2z10mECFG4B9 kd4vI/2wlL57XbnyQH1PLVhf3tztceQ0dMfVO3l/fCTFy79XrKWoLqRUDL0e8tJBHJYggG Q5qd14AS76kvyqpL1K+2Y/Y918nM9ooBqGx9Kv3RmKazwv5PxhGopwe4bQAY3w== 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 4c186F6PLNz19Yl; Mon, 11 Aug 2025 22:13: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 57BMDPVg033755; Mon, 11 Aug 2025 22:13:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57BMDP58033752; Mon, 11 Aug 2025 22:13:25 GMT (envelope-from git) Date: Mon, 11 Aug 2025 22:13:25 GMT Message-Id: <202508112213.57BMDP58033752@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 89c82750da1a - main - krb5 ksu: Enable prompt for password List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89c82750da1ad6a31eea8ccb0a5ca29351a3ee68 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=89c82750da1ad6a31eea8ccb0a5ca29351a3ee68 commit 89c82750da1ad6a31eea8ccb0a5ca29351a3ee68 Author: Cy Schubert AuthorDate: 2025-08-11 22:12:09 +0000 Commit: Cy Schubert CommitDate: 2025-08-11 22:12:09 +0000 krb5 ksu: Enable prompt for password Enable prompt for password when no TGT is available. Reported by: Dan Mahoney --- krb5/usr.bin/ksu/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/krb5/usr.bin/ksu/Makefile b/krb5/usr.bin/ksu/Makefile index 37a4c166aec6..7296ea61b73d 100644 --- a/krb5/usr.bin/ksu/Makefile +++ b/krb5/usr.bin/ksu/Makefile @@ -23,7 +23,8 @@ SRCS= authorization.c \ xmalloc.c CFLAGS+=-I${KRB5_DIR}/include \ - -I${KRB5_SRCTOP}/include + -I${KRB5_SRCTOP}/include \ + -DGET_TGT_VIA_PASSWD MAN= ksu.1 From nobody Mon Aug 11 22:42:02 2025 X-Original-To: dev-commits-src-main@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 4c18lG3gX3z63wDn; Mon, 11 Aug 2025 22:42: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c18lG21dbz40pL; Mon, 11 Aug 2025 22:42:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754952122; 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=sR1bUU6eUsKnNLSjLGSFtOy08Hoc9rtsUIDokQyrKOg=; b=BZx8xTlBao1SAyt3/ERLQoujORyPpLs5jEsOjmnPCenyR3bvN9TjihD9dv5Ghvgw0q2IJn JtjGEbfw1T+anDmQjYnTa4xo7o72GRIZVCmtG05PEkfItaoagmOdBrPy0CYFfxkNVnybZe loka9Q/w1Fo9/i34bpR0Vbze+BbY29iTyhzbJBwzrxugFG6uSt998s2lXGH/lCvDO13bpY bRa19g7DTTiaE2xuiAgJMmt04EBaSxp2qaGYlW4yLW2bwkl+BG6O3bXJlhi6CXPrF6V1uN 4f6+d6hTwBb/oFoiZVxu1XTbxEEAw9aW62OVrXLfIa/pYZY0boAKb5+teYXqDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754952122; 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=sR1bUU6eUsKnNLSjLGSFtOy08Hoc9rtsUIDokQyrKOg=; b=Wk8/5vTi//CFSpXjbAlnpIHU+xacz0DgxS7IAB/TtEg5JcGTKSiJb1oDwf2mcJ3kqg0muE HikPPSZDssDDJgOK/1UJ7BRs8GDWOY3GLqFaQgdZTW0fPA6pyosEt+yzW8a9FOc4VdHqcZ KzQbikRVUjmBzuA2W6r9CHgWGIkLP4o5sUuQVctV3aJL3BDZwKPgNsjP7yMH/8+APDTpq5 HmzwkMDC7JyJBUTVdWaUbrcmcmTrzPceUZjL0UcMCNPGxJIJzk8T4De3rrSx1rqqeBwSHh zs/+c4LabPRQrG+l/EXPEyRW4YLE5PVRA+6eidExxbiuDjR2HcbMOVo4P4dLoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754952122; a=rsa-sha256; cv=none; b=tU2XSnV6Z1ZQ45tvXvy5hV5zzRXF33wloRYlRUj2+jG6b7QyjpRa/KEexPS1TmDT/crDoe RmX61Gwap9Iez2S5yCVN24h0kWngM9gHDWRAaR2qLAG7Q+euXNjdx6a786TEty84hn6t6A Rf/be0AVBL8Df/7V2OHtnkIquNzF2XAfF/KXrdCK94ASOp7kn/hWn9R7Qy1xHl5kWeVC71 d9k19HjG3piha8G9Mu9ZbwOMmT71355oPVKI2gbeU+/MoYw1/8eh/v4DuJR/3e7eQlqkGm LhkjYpXKbBBLj33TyZ/l+t9x/+1K2q89FasL0l066X3sbIvjXi8sXBCdp+dlww== 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 4c18lG1cTGz19kS; Mon, 11 Aug 2025 22:42:02 +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 57BMg2w0087296; Mon, 11 Aug 2025 22:42:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57BMg20v087293; Mon, 11 Aug 2025 22:42:02 GMT (envelope-from git) Date: Mon, 11 Aug 2025 22:42:02 GMT Message-Id: <202508112242.57BMg20v087293@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 4a94dee2a497 - main - ObsoleteFiles: both gssapi/gssapi.h and gssapi.h existed List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4a94dee2a497203e622f458e2011908129b73907 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=4a94dee2a497203e622f458e2011908129b73907 commit 4a94dee2a497203e622f458e2011908129b73907 Author: Gleb Smirnoff AuthorDate: 2025-08-11 22:40:54 +0000 Commit: Gleb Smirnoff CommitDate: 2025-08-11 22:40:54 +0000 ObsoleteFiles: both gssapi/gssapi.h and gssapi.h existed And gssapi/mechglue.h as well. Submitted by: Herbert J. Skuhra Reviewed by: cy Fixes: 7a4a305f1300c27dd12585d5442e2ee52b97b940 --- ObsoleteFiles.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 0a4a567dff0b..84c3055f7077 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -60,7 +60,9 @@ OLD_FILES+=usr/sbin/nvmfd OLD_FILES+=usr/share/man/man8/nvmfd.8.gz # 20250807: Replace lib/libgssapi with krb5/lib/gssapi +OLD_FILES+=usr/include/gssapi_krb5/gssapi.h OLD_FILES+=usr/include/gssapi_krb5/gssapi/gssapi.h +OLD_FILES+=usr/include/gssapi_krb5/gssapi/mechglue.h OLD_DIRS+=usr/include/gssapi_krb5/gssapi OLD_DIRS+=usr/include/gssapi_krb5 OLD_FILES+=etc/gssapi/qop From nobody Tue Aug 12 09:59:57 2025 X-Original-To: dev-commits-src-main@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 4c1RnT2Zpbz64PVH; Tue, 12 Aug 2025 09:59: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1RnT1ysXz3v1V; Tue, 12 Aug 2025 09:59:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754992797; 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=x1qXTt/DMxwe9Uy6/tb3I+TJJ+wX7qcnua6WVnJ8DuI=; b=AnWXnxLCaAr3yHuCRso77d7gnmHAZat2MOMDT4H+A2RZHRDME+dj63hD4c3M1cwStCBy8A DT8Ci93T9/xI1S1JLLzbOTSd4UPHX5pJiFRtmxmH9/abfEitOquUomRcxoNhqawN1R0rOf 5Y/I7DazRNwaKKvCHWYxj3ntUwVWC1Bu9ZxG0jXpOA7Ie99jLZdoUs/M6YI/KnSRUsnnv7 ST8YfRjuz66bxn2MWJ7Ziv2fiSMtLowUBGCGYPtprtIG5qx8g9Y2RUYlP+8jbJyNYDhLGi cyzqIAJ9cXsaSY+WdXbMmq4IrtVCKZ3M08JAcU0uoFatzclgqPVT0z2V6nIsnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754992797; 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=x1qXTt/DMxwe9Uy6/tb3I+TJJ+wX7qcnua6WVnJ8DuI=; b=h8ELg0yx/ro8wOilDAsdHA/UW8RpuAWYWnUGhzdwkvFvlfOcKy7U2sngAJYLWFJYJiIOrA 9EoDmd5m71paA533aaIPOKPtVb4GKiG2LrIo1LPRuKk8CRQ1Cs+muuFcIcBHJPzHlmY30I GsBwpwDkgZpVbrhIY1lqnaKU5LyVDuboUqfXoy0YvB9jfhHTNEhYiMiNefE8h7TRRcdxye g0DafsnO/JeEqB/7VpAvKodkhmtXrQUmOwAWNlX0ic0Yztgm1vN2fa3G5uY1AruxNi1NYa LGLIpHizsrkzmii+DMcA+FsV7RgYhTwvfmMHc1+ZIS31Q++2MqpqeerEBnf6JQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754992797; a=rsa-sha256; cv=none; b=F51Os9L04DvzgV7vp+5CIBf7GEPueLfghff1cXB+6JTrIjHxdgxaH6ilvaZHmqMcraMpKA PQiAFcj9lgNXPfK6kUHSLIDxOhD/YX87Gk/l+abGQZl46F/ZxCnyU7efz+lWzoq6Fi/Jq9 5RYpwoKXjA6yhP/Te6S3ulMUucY2l6QUb70XosWpFBOH63MoZ0eBZaFR1ha9llu6q2L62x ohgoWIPjhEzg9rLQuet53bT9LviG9FtjWcC1+3pmjxj0KoS2JBGngF19iaWrxUTuZAKRIo T2o1wSb5Y8Chmx74ICTg/BAg7pNdJPDZaO95eGMajGPuTA09WqlmlXMiu35Orw== 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 4c1RnT1PTRzZPG; Tue, 12 Aug 2025 09:59: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 57C9xvuh050400; Tue, 12 Aug 2025 09:59:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57C9xv61050397; Tue, 12 Aug 2025 09:59:57 GMT (envelope-from git) Date: Tue, 12 Aug 2025 09:59:57 GMT Message-Id: <202508120959.57C9xv61050397@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: d180086e6eae - main - [libm] Fix undefined behavior of a left shifted of a signed integer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: d180086e6eae2e152e803ed6cf13775a7c006dc7 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d180086e6eae2e152e803ed6cf13775a7c006dc7 commit d180086e6eae2e152e803ed6cf13775a7c006dc7 Author: Steve Kargl AuthorDate: 2025-08-12 04:26:29 +0000 Commit: Konstantin Belousov CommitDate: 2025-08-12 05:31:03 +0000 [libm] Fix undefined behavior of a left shifted of a signed integer The patch fixes a few instances of left shifts on signed integer entities. A 'static inline' helper function 'subnormal_ilogb()' has been added to math_private.h. This function is then used e_fmod.c, s_ilogb(), and s_remquo.c. The change in s_remquo.c has only been compile tested. The change to e_fmod.c has been test on over 3 billion pairs of subnormal numbers where testing included x > y and x < y pairs. The test compared the output from fmod() with the output from mpfr_fmod() from MPFR. There were no difference. The change to s_ilogb() has had limited testing where its output was compared against frexp(). In this testing, no differences in output were detected. PR: 288778 MFC after: 1 week --- lib/msun/src/e_fmod.c | 30 ++++++++++++------------------ lib/msun/src/math_private.h | 21 +++++++++++++++++++++ lib/msun/src/s_ilogb.c | 13 +++++-------- lib/msun/src/s_remquo.c | 30 ++++++++++++------------------ 4 files changed, 50 insertions(+), 44 deletions(-) diff --git a/lib/msun/src/e_fmod.c b/lib/msun/src/e_fmod.c index 77afd116c658..ced9cce33aa0 100644 --- a/lib/msun/src/e_fmod.c +++ b/lib/msun/src/e_fmod.c @@ -26,14 +26,14 @@ static const double one = 1.0, Zero[] = {0.0, -0.0,}; double fmod(double x, double y) { - int32_t n,hx,hy,hz,ix,iy,sx,i; - u_int32_t lx,ly,lz; + int32_t hx, hy, hz, ix, iy, n, sx; + u_int32_t lx, ly, lz; EXTRACT_WORDS(hx,lx,x); EXTRACT_WORDS(hy,ly,y); sx = hx&0x80000000; /* sign of x */ - hx ^=sx; /* |x| */ - hy &= 0x7fffffff; /* |y| */ + hx ^= sx; /* |x| */ + hy &= 0x7fffffff; /* |y| */ /* purge off exception values */ if((hy|ly)==0||(hx>=0x7ff00000)|| /* y=0,or x not finite */ @@ -46,22 +46,16 @@ fmod(double x, double y) } /* determine ix = ilogb(x) */ - if(hx<0x00100000) { /* subnormal x */ - if(hx==0) { - for (ix = -1043, i=lx; i>0; i<<=1) ix -=1; - } else { - for (ix = -1022,i=(hx<<11); i>0; i<<=1) ix -=1; - } - } else ix = (hx>>20)-1023; + if(hx<0x00100000) + ix = subnormal_ilogb(hx, lx); + else + ix = (hx>>20)-1023; /* determine iy = ilogb(y) */ - if(hy<0x00100000) { /* subnormal y */ - if(hy==0) { - for (iy = -1043, i=ly; i>0; i<<=1) iy -=1; - } else { - for (iy = -1022,i=(hy<<11); i>0; i<<=1) iy -=1; - } - } else iy = (hy>>20)-1023; + if(hy<0x00100000) + iy = subnormal_ilogb(hy, ly); + else + iy = (hy>>20)-1023; /* set up {hx,lx}, {hy,ly} and align y to x */ if(ix >= -1022) diff --git a/lib/msun/src/math_private.h b/lib/msun/src/math_private.h index 1595f902846c..0711f2f33c41 100644 --- a/lib/msun/src/math_private.h +++ b/lib/msun/src/math_private.h @@ -739,6 +739,27 @@ irintl(long double x) (ar) = (x) - (ai); \ } while (0) +/* + * For a double entity split into high and low parts, compute ilogb. + */ +static inline int32_t +subnormal_ilogb(int32_t hi, int32_t lo) +{ + int32_t j; + uint32_t i; + + j = -1022; + if (hi == 0) { + j -= 21; + i = (uint32_t)lo; + } else + i = (uint32_t)hi << 11; + + for (; i < 0x7fffffff; i <<= 1) j -= 1; + + return (j); +} + #ifdef DEBUG #if defined(__amd64__) || defined(__i386__) #define breakpoint() asm("int $3") diff --git a/lib/msun/src/s_ilogb.c b/lib/msun/src/s_ilogb.c index 27e0bbb8735b..aa707d51d7b7 100644 --- a/lib/msun/src/s_ilogb.c +++ b/lib/msun/src/s_ilogb.c @@ -21,21 +21,18 @@ #include "math.h" #include "math_private.h" - int ilogb(double x) +int +ilogb(double x) { - int32_t hx,lx,ix; + int32_t hx, ix, lx; EXTRACT_WORDS(hx,lx,x); hx &= 0x7fffffff; if(hx<0x00100000) { if((hx|lx)==0) return FP_ILOGB0; - else /* subnormal x */ - if(hx==0) { - for (ix = -1043; lx>0; lx<<=1) ix -=1; - } else { - for (ix = -1022,hx<<=11; hx>0; hx<<=1) ix -=1; - } + else + ix = subnormal_ilogb(hx, lx); return ix; } else if (hx<0x7ff00000) return (hx>>20)-1023; diff --git a/lib/msun/src/s_remquo.c b/lib/msun/src/s_remquo.c index 206d2903cd86..b26b5619f3ad 100644 --- a/lib/msun/src/s_remquo.c +++ b/lib/msun/src/s_remquo.c @@ -4,7 +4,7 @@ * * Developed at SunSoft, a Sun Microsystems, Inc. business. * Permission to use, copy, modify, and distribute this - * software is freely granted, provided that this notice + * software is freely granted, provided that this notice * is preserved. * ==================================================== */ @@ -27,7 +27,7 @@ static const double Zero[] = {0.0, -0.0,}; double remquo(double x, double y, int *quo) { - int32_t n,hx,hy,hz,ix,iy,sx,i; + int32_t hx,hy,hz,ix,iy,n,sx; u_int32_t lx,ly,lz,q,sxy; EXTRACT_WORDS(hx,lx,x); @@ -53,25 +53,19 @@ remquo(double x, double y, int *quo) } /* determine ix = ilogb(x) */ - if(hx<0x00100000) { /* subnormal x */ - if(hx==0) { - for (ix = -1043, i=lx; i>0; i<<=1) ix -=1; - } else { - for (ix = -1022,i=(hx<<11); i>0; i<<=1) ix -=1; - } - } else ix = (hx>>20)-1023; + if(hx<0x00100000) + ix = subnormal_ilogb(hx, lx); + else + ix = (hx>>20)-1023; /* determine iy = ilogb(y) */ - if(hy<0x00100000) { /* subnormal y */ - if(hy==0) { - for (iy = -1043, i=ly; i>0; i<<=1) iy -=1; - } else { - for (iy = -1022,i=(hy<<11); i>0; i<<=1) iy -=1; - } - } else iy = (hy>>20)-1023; + if(hy<0x00100000) + iy = subnormal_ilogb(hy, ly); + else + iy = (hy>>20)-1023; /* set up {hx,lx}, {hy,ly} and align y to x */ - if(ix >= -1022) + if(ix >= -1022) hx = 0x00100000|(0x000fffff&hx); else { /* subnormal x, shift x to normal */ n = -1022-ix; @@ -83,7 +77,7 @@ remquo(double x, double y, int *quo) lx = 0; } } - if(iy >= -1022) + if(iy >= -1022) hy = 0x00100000|(0x000fffff&hy); else { /* subnormal y, shift y to normal */ n = -1022-iy; From nobody Tue Aug 12 10:41:37 2025 X-Original-To: dev-commits-src-main@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 4c1Sjf2Jn7z64TN0; Tue, 12 Aug 2025 10:41:42 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1Sjd4ZjVz3yf2; Tue, 12 Aug 2025 10:41:41 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754995301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=APvPS43yn+CgBv6nu0bSPSObT8o5p2nLlhEgwW9J+js=; b=GAz8sHl/nplrg/zuhJUMwPveMf45aKUtAtkqETBQ3Cb0ZMXHP0cWVZCt7BBPCr5xrk0kJs LU790jqXXZCMKWPUG8vjf+HPSzCHU9rtHZnfgAiX86CG5ACMNRjHREWSWs/O2crS09/LOl JbiXpRBZEIwXBIotHuFJwYvOIcZyZ+qoX/3svoHpJ5yrUaGV+by/cl2LdUQOFfsRGLCNGU HEE/jA0uYBKv8eHkqziOaclPtdC3+wnA0XoFD+yAcfS7IIrxOYwCpY26p735nwRPXhl9rz Ip3jz3jvy9od2rpsaitH0lZZrG84WkA5HYLbQRcx7qw4O/NHNzi4k5DpevvLmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1754995301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=APvPS43yn+CgBv6nu0bSPSObT8o5p2nLlhEgwW9J+js=; b=hyGIHpM9HO/Y49cf5OXOB8CyFhprqeQ+K8uSrCLtruLx1zKT3jIGrKcRzRiRPZjja0wNQE LMmq5nJ9jy+Rkes9SYHQDyw4p2uzTSCbvK67qpIKm4RrgyduJo2+CleGmvplN7VV/C2kHp hIL5k1dLl9K1SDVS6Rw+mjceHq4xy2XN42P7ZBZu4ZPLvq2e31C+kCGZPF4JL/Szkne9Lq EGxpFJ1W2yiT1qfzY4uyPYpFUN4OmL7HgzDfk6Yvom45hPBSJKeypBw5bWKg+29gdf8iUZ Mr2a7VkyULHvnSTBwEl1MTa1sQHx1RCLuf9cTMzSgH+e2VGxP8GmKsNxIFQbBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1754995301; a=rsa-sha256; cv=none; b=shLWZtpDGctCP+FXic5+EBFUpEqB7yGd4xzPIDkMKa/1qCwF0k5F+1DR6u3udKQeNyaqmd 98TRC0ZrRcQ/80YJmLTMyS1Z8wpe5a2PbP0gSzIqnWDEl+eJhqOFYaOxUXgi+YIxBlyLoP UHI4u4dVY/+qffP4hN1UFeyAsRiU+Xppt6H6MhVJQdrXEda+LwLhJETLohI0bBNWqNUvYi tCCJwDjdrbUyuoVH3UFprD6NNHg6yX2da7FCMpyJztUak9MZ6f1SAAPg3XENc5nMZaKWQr 7J5vCtBu8dcUOadjVcz1Ko+cqvVm1reL8RVPiRaQMzVgnyRFu03qSBLvz6VJWw== Received: from [100.109.252.209] (unknown [176.15.166.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4c1Sjc01cTzNbk; Tue, 12 Aug 2025 10:41:39 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Date: Tue, 12 Aug 2025 13:41:37 +0300 From: Dima Panov To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, Lexi Winter Message-ID: <851c968c-923a-4809-83d4-b0600e70867b@Canary> In-Reply-To: <202508101537.57AFbHrI067216@gitrepo.freebsd.org> References: <202508101537.57AFbHrI067216@gitrepo.freebsd.org> Subject: git: 7ac276298b72 - main - Remove Secure RPC DES authentication X-Canary-Draft: 3 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="689b1a61_60709938_50e" --689b1a61_60709938_50e Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello=21 This commit breaks x11-server/xwayland =46AILED: os/liblibxserver=5Fos.a.p/rpcauth.c.o cc -Ios/liblibxserver=5Fo= s.a.p -Ios -I../os -I. -I.. -IXext -I../Xext -IXi -I../Xi -Icomposite -I.= ./composite -Idamageext -I../damageext -Ifb -I../fb -Iglamor -I../glamor = -Imi -I../mi -Imiext/damage -I../miext/damage -Imiext/sync -I../miext/syn= c -Idbe -I../dbe -Idix -I../dix -Idri3 -I../dri3 -Iinclude -I../include -= Ipresent -I../present -Irandr -I../randr -Irender -I../render -Ixfixes -I= ../xfixes -I/usr/local/include -I/usr/local/include/pixman-1 -I/usr/local= /include/freetype2 -I/usr/local/include/libpng16 -fdiagnostics-color=3Dne= ver -D=5F=46ILE=5FO=46=46SET=5FBITS=3D64 -Wall -Winvalid-pch -std=3Dgnu99= -DHAVE=5FDIX=5FCON=46IG=5FH -fno-strict-aliasing -fvisibility=3Dhidden -= Wall -Wpointer-arith -Wmissing-declarations -Wformat=3D2 -Wstrict-prototy= pes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-style= -definition -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissin= g-format-attribute -Wredundant-decls -Werror=3Dimplicit -Werror=3Dnonnull= -Werror=3Dinit-self -Werror=3Dmain -Werror=3Dmissing-braces -Werror=3Dse= quence-point -Werror=3Dreturn-type -Werror=3Dtrigraphs -Werror=3Darray-bo= unds -Werror=3Dwrite-strings -Werror=3Daddress -Werror=3Dint-to-pointer-c= ast -Werror=3Dpointer-to-int-cast -O2 -pipe -fstack-protector-strong -fno= -strict-aliasing -fPIC -D=5FTHREAD=5FSA=46E -D=5FDE=46AULT=5FSOURCE -D=5F= BSD=5FSOURCE -DHAS=5F=46CHOWN -DHAS=5FSTICKY=5FDIR=5FBIT -DCLIENTIDS -MD = -MQ os/liblibxserver=5Fos.a.p/rpcauth.c.o -M=46 os/liblibxserver=5Fos.a.p= /rpcauth.c.o.d -o os/liblibxserver=5Fos.a.p/rpcauth.c.o -c ../os/rpcauth.= c ../os/rpcauth.c:110:52: error: incomplete definition of type 'struct au= thdes=5Fcred' 110 =7C return (((struct authdes=5Fcred *) r.rq=5Fclntcred)= ->adc=5Ffullname.name); =7C =7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E= =7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=5E= ../os/rpcauth.c:110:22: note: forward declaration of 'struct authdes=5Fc= red' 110 =7C return (((struct authdes=5Fcred *) r.rq=5Fclntcred)->adc=5Ff= ullname.name); =7C =5E 1 error generated. -- Dima. (desktop, kde, x11, office, ports-secteam)=40=46reeBSD team (fluffy=40=46reeBSD.org, https://t.me/=46luffyBSD) > On =D0=B2=D0=BE=D1=81=D0=BA=D1=80=D0=B5=D1=81=D0=B5=D0=BD=D1=8C=D0=B5, = =D0=B0=D0=B2=D0=B3. 10, 2025 at 6:37 PM, Lexi Winter wrote: > The branch main has been updated by ivy: > > URL: https://cgit.=46reeBSD.org/src/commit/=3Fid=3D7ac276298b72982189ac= 1a5b17461936dc00163e > > commit 7ac276298b72982189ac1a5b17461936dc00163e > Author: Lexi Winter > AuthorDate: 2025-08-10 12:57:36 +0000 > Commit: Lexi Winter > CommitDate: 2025-08-10 15:36:40 +0000 > > Remove Secure RPC DES authentication > > =46ollowing the earlier removal of keyserv, none of this functionality > works since it requires keyserv. > > Remove the relevant symbols from libc's Symbol.map. Leave compatibility= > symbols for existing applications, but since the functions don't work > without keyserv, stub them out to return an error. > > Remove some private symbols that were only used by keyserv; these don't= > get compatibility symbols. > > Remove the documentation for the old functions. > > Remove rpc.ypupdated since it requires DES authentication. > > Reviewed by: manu, des, emaste > Differential Revision: https://reviews.freebsd.org/D50442 > --- > Obsolete=46iles.inc =7C 4 + > include/rpc/auth=5Fdes.h =7C 79 +---- > lib/libc/rpc/Symbol.map =7C 19 -- > lib/libc/rpc/auth=5Fdes.c =7C 455 +---------------------------- > lib/libc/rpc/authdes=5Fprot.c =7C 44 +-- > lib/libc/rpc/key=5Fcall.c =7C 424 +++------------------------ > lib/libc/rpc/publickey.5 =7C 40 --- > lib/libc/rpc/rpc=5Fsecure.3 =7C 177 +----------- > lib/libc/rpc/rpc=5Fsoc.3 =7C 13 +- > lib/libc/rpc/rpc=5Fsoc.c =7C 31 +- > lib/libc/rpc/svc=5Fauth.c =7C 8 - > lib/libc/rpc/svc=5Fauth=5Fdes.c =7C 460 +----------------------------- > lib/librpcsvc/Makefile =7C 2 +- > lib/librpcsvc/yp=5Fupdate.c =7C 199 ------------- > libexec/rc/rc.conf =7C 1 - > libexec/rc/rc.d/Makefile =7C 1 - > libexec/rc/rc.d/ypupdated =7C 35 --- > share/man/man5/rc.conf.5 =7C 9 +- > sys/rpc/auth.h =7C 26 -- > tools/build/mk/OptionalObsolete=46iles.inc =7C 2 - > usr.sbin/Makefile =7C 1 - > usr.sbin/rpc.ypupdated/Makefile =7C 32 --- > usr.sbin/rpc.ypupdated/Makefile.depend =7C 18 -- > usr.sbin/rpc.ypupdated/update.c =7C 328 --------------------- > usr.sbin/rpc.ypupdated/yp=5Fdbdelete.c =7C 68 ----- > usr.sbin/rpc.ypupdated/yp=5Fdbupdate.c =7C 147 ---------- > usr.sbin/rpc.ypupdated/ypupdate =7C 32 --- > usr.sbin/rpc.ypupdated/ypupdated=5Fextern.h =7C 32 --- > usr.sbin/rpc.ypupdated/ypupdated=5Fmain.c =7C 287 ------------------- > usr.sbin/rpc.ypupdated/ypupdated=5Fserver.c =7C 227 --------------- > 30 files changed, 83 insertions(+), 3118 deletions(-) > > diff --git a/Obsolete=46iles.inc b/Obsolete=46iles.inc > index ec324e82f86d..a6662d31829f 100644 > --- a/Obsolete=46iles.inc > +++ b/Obsolete=46iles.inc > =40=40 -51,6 +51,10 =40=40 > =23 xargs -n1 =7C sort =7C uniq -d; > =23 done > > +=23 20250810: Removal of remaining Secure RPC (DES) bits > +OLD=5F=46ILES+=3Dusr/sbin/rpc.ypupdated > +OLD=5F=46ILES+=3Detc/rc.d/ypupdated > + > =23 20250808: nvmfd removed from base install > OLD=5F=46ILES+=3Dusr/sbin/nvmfd > OLD=5F=46ILES+=3Dusr/share/man/man8/nvmfd.8.gz > diff --git a/include/rpc/auth=5Fdes.h b/include/rpc/auth=5Fdes.h > index 0ff43c13139b..1b4943a74b8b 100644 > --- a/include/rpc/auth=5Fdes.h > +++ b/include/rpc/auth=5Fdes.h > =40=40 -33,91 +33,14 =40=40 > * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. > */ > > -/* > - * auth=5Fdes.h, Protocol for DES style authentication for RPC > - */ > +/* Note, RPC DES authentication was removed in =46reeBSD 15.0. */ > > =23ifndef =5FAUTH=5FDES=5F > =23define =5FAUTH=5FDES=5F > > -/* > - * There are two kinds of =22names=22: fullnames and nicknames > - */ > -enum authdes=5Fnamekind =7B > - ADN=5F=46ULLNAME, > - ADN=5FNICKNAME > -=7D; > - > -/* > - * A fullname contains the network name of the client, > - * a conversation key and the window > - */ > -struct authdes=5Ffullname =7B > - char *name; /* network name of client, up to MAXNETNAMELEN */ > - des=5Fblock key; /* conversation key */ > - u=5Flong window; /* associated window */ > -=7D; > - > - > -/* > - * A credential > - */ > -struct authdes=5Fcred =7B > - enum authdes=5Fnamekind adc=5Fnamekind; > - struct authdes=5Ffullname adc=5Ffullname; > - u=5Flong adc=5Fnickname; > -=7D; > - > - > - > -/* > - * A des authentication verifier > - */ > -struct authdes=5Fverf =7B > - union =7B > - struct timeval adv=5Fctime; /* clear time */ > - des=5Fblock adv=5Fxtime; /* crypt time */ > - =7D adv=5Ftime=5Fu; > - u=5Flong adv=5Fint=5Fu; > -=7D; > - > -/* > - * des authentication verifier: client variety > - * > - * adv=5Ftimestamp is the current time. > - * adv=5Fwinverf is the credential window + 1. > - * Both are encrypted using the conversation key. > - */ > -=23define adv=5Ftimestamp adv=5Ftime=5Fu.adv=5Fctime > -=23define adv=5Fxtimestamp adv=5Ftime=5Fu.adv=5Fxtime > -=23define adv=5Fwinverf adv=5Fint=5Fu > - > -/* > - * des authentication verifier: server variety > - * > - * adv=5Ftimeverf is the client's timestamp + client's window > - * adv=5Fnickname is the server's nickname for the client. > - * adv=5Ftimeverf is encrypted using the conversation key. > - */ > -=23define adv=5Ftimeverf adv=5Ftime=5Fu.adv=5Fctime > -=23define adv=5Fxtimeverf adv=5Ftime=5Fu.adv=5Fxtime > -=23define adv=5Fnickname adv=5Fint=5Fu > - > -/* > - * Map a des credential into a unix cred. > - * > - */ > -=5F=5FBEGIN=5FDECLS > -extern int authdes=5Fgetucred( struct authdes=5Fcred *, uid=5Ft *, gid= =5Ft *, int *, gid=5Ft * ); > -=5F=5FEND=5FDECLS > - > =5F=5FBEGIN=5FDECLS > -extern bool=5Ft xdr=5Fauthdes=5Fcred(XDR *, struct authdes=5Fcred *); > -extern bool=5Ft xdr=5Fauthdes=5Fverf(XDR *, struct authdes=5Fverf *); > extern int rtime(dev=5Ft, struct netbuf *, int, struct timeval *, > struct timeval *); > -extern void kgetnetname(char *); > -extern enum auth=5Fstat =5Fsvcauth=5Fdes(struct svc=5Freq *, struct rp= c=5Fmsg *); > =5F=5FEND=5FDECLS > > =23endif /* ndef =5FAUTH=5FDES=5F */ > diff --git a/lib/libc/rpc/Symbol.map b/lib/libc/rpc/Symbol.map > index 105d6fb6b54e..61e8e084b1e0 100644 > --- a/lib/libc/rpc/Symbol.map > +++ b/lib/libc/rpc/Symbol.map > =40=40 -8,13 +8,9 =40=40 =46BSD=5F1.0 =7B > xdr=5Fdesargs; > xdr=5Fdesresp; > > - authdes=5Fseccreate; > - authdes=5Fpk=5Fseccreate; > authnone=5Fcreate; > authunix=5Fcreate; > authunix=5Fcreate=5Fdefault; > - xdr=5Fauthdes=5Fcred; > - xdr=5Fauthdes=5Fverf; > xdr=5Fauthunix=5Fparms; > bindresvport; > bindresvport=5Fsa; > =40=40 -58,15 +54,6 =40=40 =46BSD=5F1.0 =7B > endrpcent; > getrpcent; > getrpcport; > - key=5Fsetsecret; > - key=5Fsecretkey=5Fis=5Fset; > - key=5Fencryptsession=5Fpk; > - key=5Fdecryptsession=5Fpk; > - key=5Fencryptsession; > - key=5Fdecryptsession; > - key=5Fgendes; > - key=5Fsetnet; > - key=5Fget=5Fconv; > xdr=5Fkeystatus; > xdr=5Fkeybuf; > xdr=5Fnetnamestr; > =40=40 -130,7 +117,6 =40=40 =46BSD=5F1.0 =7B > callrpc; > registerrpc; > clnt=5Fbroadcast; > - authdes=5Fcreate; > clntunix=5Fcreate; > svcunix=5Fcreate; > svcunixfd=5Fcreate; > =40=40 -180,8 +166,6 =40=40 =46BSD=5F1.0 =7B > =5Fauthenticate; > =5Fsvcauth=5Fnull; > svc=5Fauth=5Freg; > - =5Fsvcauth=5Fdes; > - authdes=5Fgetucred; > =5Fsvcauth=5Funix; > =5Fsvcauth=5Fshort; > svc=5Fdg=5Fcreate; > =40=40 -205,9 +189,6 =40=40 =46BSD=5F1.8 =7B > > =46BSDprivate=5F1.0 =7B > =5F=5Fdes=5Fcrypt=5FLOCAL; > - =5F=5Fkey=5Fencryptsession=5Fpk=5FLOCAL; > - =5F=5Fkey=5Fdecryptsession=5Fpk=5FLOCAL; > - =5F=5Fkey=5Fgendes=5FLOCAL; > =5F=5Fsvc=5Fclean=5Fidle; > =5F=5Frpc=5Fgss=5Funwrap; > =5F=5Frpc=5Fgss=5Funwrap=5Fstub; > diff --git a/lib/libc/rpc/auth=5Fdes.c b/lib/libc/rpc/auth=5Fdes.c > index c9b20de25cda..754d55cbed3e 100644 > --- a/lib/libc/rpc/auth=5Fdes.c > +++ b/lib/libc/rpc/auth=5Fdes.c > =40=40 -30,463 +30,34 =40=40 > /* > * Copyright (c) 1988 by Sun Microsystems, Inc. > */ > + > /* > - * auth=5Fdes.c, client-side implementation of DES authentication > + * Secure RPC DES authentication was removed in =46reeBSD 15.0. > + * These symbols are provided for backward compatibility, but provide = no > + * functionality and will always return an error. > */ > > =23include =22namespace.h=22 > =23include =22reentrant.h=22 > -=23include > -=23include > -=23include > -=23include > -=23include > -=23include > -=23include > =23include > =23include > =23include > -=23include > -=23include > -=23include > -=23undef NIS > =23include > =23include =22un-namespace.h=22 > -=23include =22mt=5Fmisc.h=22 > - > -=23define USEC=5FPER=5FSEC 1000000 > -=23define RTIME=5FTIMEOUT 5 /* seconds to wait for sync */ > - > -=23define AUTH=5FPRIVATE(auth) (struct ad=5Fprivate *) auth->ah=5Fpriv= ate > -=23define ALLOC(object=5Ftype) (object=5Ftype *) mem=5Falloc(sizeof(ob= ject=5Ftype)) > -=23define =46REE(ptr, size) mem=5Ffree((char *)(ptr), (int) size) > -=23define ATTEMPT(xdr=5Fop) if (=21(xdr=5Fop)) return (=46ALSE) > - > -extern bool=5Ft xdr=5Fauthdes=5Fcred( XDR *, struct authdes=5Fcred *);= > -extern bool=5Ft xdr=5Fauthdes=5Fverf( XDR *, struct authdes=5Fverf *);= > -extern int key=5Fencryptsession=5Fpk(char *, netobj *, des=5Fblock *);= > - > -extern bool=5Ft =5F=5Frpc=5Fget=5Ftime=5Foffset(struct timeval *, nis=5F= server *, char *, > - char **, char **); > > -/* > - * DES authenticator operations vector > - */ > -static void authdes=5Fnextverf(AUTH *); > -static bool=5Ft authdes=5Fmarshal(AUTH *, XDR *); > -static bool=5Ft authdes=5Fvalidate(AUTH *, struct opaque=5Fauth *); > -static bool=5Ft authdes=5Frefresh(AUTH *, void *); > -static void authdes=5Fdestroy(AUTH *); > - > -static struct auth=5Fops *authdes=5Fops(void); > - > -/* > - * This struct is pointed to by the ah=5Fprivate field of an =22AUTH *= =22 > - */ > -struct ad=5Fprivate =7B > - char *ad=5Ffullname; /* client's full name */ > - u=5Fint ad=5Ffullnamelen; /* length of name, rounded up */ > - char *ad=5Fservername; /* server's full name */ > - u=5Fint ad=5Fservernamelen; /* length of name, rounded up */ > - u=5Fint ad=5Fwindow; /* client specified window */ > - bool=5Ft ad=5Fdosync; /* synchronize=3F */ > - struct netbuf ad=5Fsyncaddr; /* remote host to synch with */ > - char *ad=5Ftimehost; /* remote host to synch with */ > - struct timeval ad=5Ftimediff; /* server's time - client's time */ > - u=5Fint ad=5Fnickname; /* server's nickname for client */ > - struct authdes=5Fcred ad=5Fcred; /* storage for credential */ > - struct authdes=5Fverf ad=5Fverf; /* storage for verifier */ > - struct timeval ad=5Ftimestamp; /* timestamp sent */ > - des=5Fblock ad=5Fxkey; /* encrypted conversation key */ > - u=5Fchar ad=5Fpkey=5B1024=5D; /* Server's actual public key */ > - char *ad=5Fnetid; /* Timehost netid */ > - char *ad=5Fuaddr; /* Timehost uaddr */ > - nis=5Fserver *ad=5Fnis=5Fsrvr; /* NIS+ server struct */ > -=7D; > - > -AUTH *authdes=5Fpk=5Fseccreate(const char *, netobj *, u=5Fint, const = char *, > - const des=5Fblock *, nis=5Fserver *); > - > -/* > - * documented version of authdes=5Fseccreate > - */ > -/* > - servername: network name of server > - win: time to live > - timehost: optional hostname to sync with > - ckey: optional conversation key to use > -*/ > - > -AUTH * > -authdes=5Fseccreate(const char *servername, const u=5Fint win, > +static AUTH * > +=5F=5Fauthdes=5Fseccreate(const char *servername, const u=5Fint win, > const char *timehost, const des=5Fblock *ckey) > =7B > - u=5Fchar pkey=5Fdata=5B1024=5D; > - netobj pkey; > - AUTH *dummy; > - > - if (=21 getpublickey(servername, (char *) pkey=5Fdata)) =7B > - syslog(LOG=5FERR, > - =22authdes=5Fseccreate: no public key found for %s=22, > - servername); > - return (NULL); > - =7D > - > - pkey.n=5Fbytes =3D (char *) pkey=5Fdata; > - pkey.n=5Flen =3D (u=5Fint)strlen((char *)pkey=5Fdata) + 1; > - dummy =3D authdes=5Fpk=5Fseccreate(servername, &pkey, win, timehost, > - ckey, NULL); > - return (dummy); > -=7D > - > -/* > - * Slightly modified version of authdessec=5Fcreate which takes the pu= blic key > - * of the server principal as an argument. This spares us a call to > - * getpublickey() which in the nameserver context can cause a deadlock= . > - */ > -AUTH * > -authdes=5Fpk=5Fseccreate(const char *servername, netobj *pkey, u=5Fint= window, > - const char *timehost, const des=5Fblock *ckey, nis=5Fserver *srvr) > -=7B > - AUTH *auth; > - struct ad=5Fprivate *ad; > - char namebuf=5BMAXNETNAMELEN+1=5D; > - > - /* > - * Allocate everything now > - */ > - auth =3D ALLOC(AUTH); > - if (auth =3D=3D NULL) =7B > - syslog(LOG=5FERR, =22authdes=5Fpk=5Fseccreate: out of memory=22); > - return (NULL); > - =7D > - ad =3D ALLOC(struct ad=5Fprivate); > - if (ad =3D=3D NULL) =7B > - syslog(LOG=5FERR, =22authdes=5Fpk=5Fseccreate: out of memory=22); > - goto failed; > - =7D > - ad->ad=5Ffullname =3D ad->ad=5Fservername =3D NULL; /* Sanity reasons= */ > - ad->ad=5Ftimehost =3D NULL; > - ad->ad=5Fnetid =3D NULL; > - ad->ad=5Fuaddr =3D NULL; > - ad->ad=5Fnis=5Fsrvr =3D NULL; > - ad->ad=5Ftimediff.tv=5Fsec =3D 0; > - ad->ad=5Ftimediff.tv=5Fusec =3D 0; > - memcpy(ad->ad=5Fpkey, pkey->n=5Fbytes, pkey->n=5Flen); > - if (=21getnetname(namebuf)) > - goto failed; > - ad->ad=5Ffullnamelen =3D RNDUP((u=5Fint) strlen(namebuf)); > - ad->ad=5Ffullname =3D (char *)mem=5Falloc(ad->ad=5Ffullnamelen + 1); > - ad->ad=5Fservernamelen =3D strlen(servername); > - ad->ad=5Fservername =3D (char *)mem=5Falloc(ad->ad=5Fservernamelen + = 1); > - > - if (ad->ad=5Ffullname =3D=3D NULL =7C=7C ad->ad=5Fservername =3D=3D N= ULL) =7B > - syslog(LOG=5FERR, =22authdes=5Fseccreate: out of memory=22); > - goto failed; > - =7D > - if (timehost =21=3D NULL) =7B > - ad->ad=5Ftimehost =3D (char *)mem=5Falloc(strlen(timehost) + 1); > - if (ad->ad=5Ftimehost =3D=3D NULL) =7B > - syslog(LOG=5FERR, =22authdes=5Fseccreate: out of memory=22); > - goto failed; > - =7D > - memcpy(ad->ad=5Ftimehost, timehost, strlen(timehost) + 1); > - ad->ad=5Fdosync =3D TRUE; > - =7D else if (srvr =21=3D NULL) =7B > - ad->ad=5Fnis=5Fsrvr =3D srvr; /* transient */ > - ad->ad=5Fdosync =3D TRUE; > - =7D else =7B > - ad->ad=5Fdosync =3D =46ALSE; > - =7D > - memcpy(ad->ad=5Ffullname, namebuf, ad->ad=5Ffullnamelen + 1); > - memcpy(ad->ad=5Fservername, servername, ad->ad=5Fservernamelen + 1); > - ad->ad=5Fwindow =3D window; > - if (ckey =3D=3D NULL) =7B > - if (key=5Fgendes(&auth->ah=5Fkey) < 0) =7B > - syslog(LOG=5FERR, > - =22authdes=5Fseccreate: keyserv(1m) is unable to generate session key= =22); > - goto failed; > - =7D > - =7D else =7B > - auth->ah=5Fkey =3D *ckey; > - =7D > - > - /* > - * Set up auth handle > - */ > - auth->ah=5Fcred.oa=5Fflavor =3D AUTH=5FDES; > - auth->ah=5Fverf.oa=5Fflavor =3D AUTH=5FDES; > - auth->ah=5Fops =3D authdes=5Fops(); > - auth->ah=5Fprivate =3D (caddr=5Ft)ad; > - > - if (=21authdes=5Frefresh(auth, NULL)) =7B > - goto failed; > - =7D > - ad->ad=5Fnis=5Fsrvr =3D NULL; /* not needed any longer */ > - return (auth); > - > -failed: > - if (auth) > - =46REE(auth, sizeof (AUTH)); > - if (ad) =7B > - if (ad->ad=5Ffullname) > - =46REE(ad->ad=5Ffullname, ad->ad=5Ffullnamelen + 1); > - if (ad->ad=5Fservername) > - =46REE(ad->ad=5Fservername, ad->ad=5Fservernamelen + 1); > - if (ad->ad=5Ftimehost) > - =46REE(ad->ad=5Ftimehost, strlen(ad->ad=5Ftimehost) + 1); > - if (ad->ad=5Fnetid) > - =46REE(ad->ad=5Fnetid, strlen(ad->ad=5Fnetid) + 1); > - if (ad->ad=5Fuaddr) > - =46REE(ad->ad=5Fuaddr, strlen(ad->ad=5Fuaddr) + 1); > - =46REE(ad, sizeof (struct ad=5Fprivate)); > - =7D > return (NULL); > =7D > +=5F=5Fsym=5Fcompat(authdes=5Fseccreate, =5F=5Fauthdes=5Fseccreate, =46= BSD=5F1.0); > > -/* > - * Implement the five authentication operations > - */ > - > - > -/* > - * 1. Next Verifier > - */ > -/*ARGSUSED*/ > -static void > -authdes=5Fnextverf(AUTH *auth =5F=5Funused) > +static AUTH * > +=5F=5Fauthdes=5Fpk=5Fseccreate(const char *servername =5F=5Funused, ne= tobj *pkey =5F=5Funused, > + u=5Fint window =5F=5Funused, const char *timehost =5F=5Funused, > + const des=5Fblock *ckey =5F=5Funused, nis=5Fserver *srvr =5F=5Funused= ) > =7B > - /* what the heck am I supposed to do=3F=3F=3F */ > -=7D > - > - > -/* > - * 2. Marshal > - */ > -static bool=5Ft > -authdes=5Fmarshal(AUTH *auth, XDR *xdrs) > -=7B > -/* LINTED pointer alignment */ > - struct ad=5Fprivate *ad =3D AUTH=5FPRIVATE(auth); > - struct authdes=5Fcred *cred =3D &ad->ad=5Fcred; > - struct authdes=5Fverf *verf =3D &ad->ad=5Fverf; > - des=5Fblock cryptbuf=5B2=5D; > - des=5Fblock ivec; > - int status; > - int len; > - rpc=5Finline=5Ft *ixdr; > - > - /* > - * =46igure out the =22time=22, accounting for any time difference > - * with the server if necessary. > - */ > - (void)gettimeofday(&ad->ad=5Ftimestamp, NULL); > - ad->ad=5Ftimestamp.tv=5Fsec +=3D ad->ad=5Ftimediff.tv=5Fsec; > - ad->ad=5Ftimestamp.tv=5Fusec +=3D ad->ad=5Ftimediff.tv=5Fusec; > - while (ad->ad=5Ftimestamp.tv=5Fusec >=3D USEC=5FPER=5FSEC) =7B > - ad->ad=5Ftimestamp.tv=5Fusec -=3D USEC=5FPER=5FSEC; > - ad->ad=5Ftimestamp.tv=5Fsec++; > - =7D > - > - /* > - * XDR the timestamp and possibly some other things, then > - * encrypt them. > - */ > - ixdr =3D (rpc=5Finline=5Ft *)cryptbuf; > - IXDR=5FPUT=5FINT32(ixdr, ad->ad=5Ftimestamp.tv=5Fsec); > - IXDR=5FPUT=5FINT32(ixdr, ad->ad=5Ftimestamp.tv=5Fusec); > - if (ad->ad=5Fcred.adc=5Fnamekind =3D=3D ADN=5F=46ULLNAME) =7B > - IXDR=5FPUT=5FU=5FINT32(ixdr, ad->ad=5Fwindow); > - IXDR=5FPUT=5FU=5FINT32(ixdr, ad->ad=5Fwindow - 1); > - ivec.key.high =3D ivec.key.low =3D 0; > - status =3D cbc=5Fcrypt((char *)&auth->ah=5Fkey, (char *)cryptbuf, > - (u=5Fint) 2 * sizeof (des=5Fblock), > - DES=5FENCRYPT =7C DES=5FHW, (char *)&ivec); > - =7D else =7B > - status =3D ecb=5Fcrypt((char *)&auth->ah=5Fkey, (char *)cryptbuf, > - (u=5Fint) sizeof (des=5Fblock), > - DES=5FENCRYPT =7C DES=5FHW); > - =7D > - if (DES=5F=46AILED(status)) =7B > - syslog(LOG=5FERR, =22authdes=5Fmarshal: DES encryption failure=22); > - return (=46ALSE); > - =7D > - ad->ad=5Fverf.adv=5Fxtimestamp =3D cryptbuf=5B0=5D; > - if (ad->ad=5Fcred.adc=5Fnamekind =3D=3D ADN=5F=46ULLNAME) =7B > - ad->ad=5Fcred.adc=5Ffullname.window =3D cryptbuf=5B1=5D.key.high; > - ad->ad=5Fverf.adv=5Fwinverf =3D cryptbuf=5B1=5D.key.low; > - =7D else =7B > - ad->ad=5Fcred.adc=5Fnickname =3D ad->ad=5Fnickname; > - ad->ad=5Fverf.adv=5Fwinverf =3D 0; > - =7D > - > - /* > - * Serialize the credential and verifier into opaque > - * authentication data. > - */ > - if (ad->ad=5Fcred.adc=5Fnamekind =3D=3D ADN=5F=46ULLNAME) =7B > - len =3D ((1 + 1 + 2 + 1)*BYTES=5FPER=5FXDR=5FUNIT + ad->ad=5Ffullname= len); > - =7D else =7B > - len =3D (1 + 1)*BYTES=5FPER=5FXDR=5FUNIT; > - =7D > - > - if ((ixdr =3D xdr=5Finline(xdrs, 2*BYTES=5FPER=5FXDR=5FUNIT))) =7B > - IXDR=5FPUT=5FINT32(ixdr, AUTH=5FDES); > - IXDR=5FPUT=5FINT32(ixdr, len); > - =7D else =7B > - ATTEMPT(xdr=5Fputint32(xdrs, (int *)&auth->ah=5Fcred.oa=5Fflavor)); > - ATTEMPT(xdr=5Fputint32(xdrs, &len)); > - =7D > - ATTEMPT(xdr=5Fauthdes=5Fcred(xdrs, cred)); > - > - len =3D (2 + 1)*BYTES=5FPER=5FXDR=5FUNIT; > - if ((ixdr =3D xdr=5Finline(xdrs, 2*BYTES=5FPER=5FXDR=5FUNIT))) =7B > - IXDR=5FPUT=5FINT32(ixdr, AUTH=5FDES); > - IXDR=5FPUT=5FINT32(ixdr, len); > - =7D else =7B > - ATTEMPT(xdr=5Fputint32(xdrs, (int *)&auth->ah=5Fverf.oa=5Fflavor)); > - ATTEMPT(xdr=5Fputint32(xdrs, &len)); > - =7D > - ATTEMPT(xdr=5Fauthdes=5Fverf(xdrs, verf)); > - return (TRUE); > -=7D > - > - > -/* > - * 3. Validate > - */ > -static bool=5Ft > -authdes=5Fvalidate(AUTH *auth, struct opaque=5Fauth *rverf) > -=7B > -/* LINTED pointer alignment */ > - struct ad=5Fprivate *ad =3D AUTH=5FPRIVATE(auth); > - struct authdes=5Fverf verf; > - int status; > - uint32=5Ft *ixdr; > - des=5Fblock buf; > - > - if (rverf->oa=5Flength =21=3D (2 + 1) * BYTES=5FPER=5FXDR=5FUNIT) =7B= > - return (=46ALSE); > - =7D > -/* LINTED pointer alignment */ > - ixdr =3D (uint32=5Ft *)rverf->oa=5Fbase; > - buf.key.high =3D (uint32=5Ft)*ixdr++; > - buf.key.low =3D (uint32=5Ft)*ixdr++; > - verf.adv=5Fint=5Fu =3D (uint32=5Ft)*ixdr++; > - > - /* > - * Decrypt the timestamp > - */ > - status =3D ecb=5Fcrypt((char *)&auth->ah=5Fkey, (char *)&buf, > - (u=5Fint)sizeof (des=5Fblock), DES=5FDECRYPT =7C DES=5FHW); > - > - if (DES=5F=46AILED(status)) =7B > - syslog(LOG=5FERR, =22authdes=5Fvalidate: DES decryption failure=22); > - return (=46ALSE); > - =7D > - > - /* > - * xdr the decrypted timestamp > - */ > -/* LINTED pointer alignment */ > - ixdr =3D (uint32=5Ft *)buf.c; > - verf.adv=5Ftimestamp.tv=5Fsec =3D IXDR=5FGET=5FINT32(ixdr) + 1; > - verf.adv=5Ftimestamp.tv=5Fusec =3D IXDR=5FGET=5FINT32(ixdr); > - > - /* > - * validate > - */ > - if (bcmp((char *)&ad->ad=5Ftimestamp, (char *)&verf.adv=5Ftimestamp, > - sizeof(struct timeval)) =21=3D 0) =7B > - syslog(LOG=5FDEBUG, =22authdes=5Fvalidate: verifier mismatch=22); > - return (=46ALSE); > - =7D > - > - /* > - * We have a nickname now, let's use it > - */ > - ad->ad=5Fnickname =3D verf.adv=5Fnickname; > - ad->ad=5Fcred.adc=5Fnamekind =3D ADN=5FNICKNAME; > - return (TRUE); > -=7D > - > -/* > - * 4. Refresh > - */ > -/*ARGSUSED*/ > -static bool=5Ft > -authdes=5Frefresh(AUTH *auth, void *dummy =5F=5Funused) > -=7B > -/* LINTED pointer alignment */ > - struct ad=5Fprivate *ad =3D AUTH=5FPRIVATE(auth); > - struct authdes=5Fcred *cred =3D &ad->ad=5Fcred; > - int ok; > - netobj pkey; > - > - if (ad->ad=5Fdosync) =7B > - ok =3D =5F=5Frpc=5Fget=5Ftime=5Foffset(&ad->ad=5Ftimediff, ad->ad=5Fn= is=5Fsrvr, > - ad->ad=5Ftimehost, &(ad->ad=5Fuaddr), > - &(ad->ad=5Fnetid)); > - if (=21 ok) =7B > - /* > - * Hope the clocks are synced=21 > - */ > - ad->ad=5Fdosync =3D 0; > - syslog(LOG=5FDEBUG, > - =22authdes=5Frefresh: unable to synchronize clock=22); > - =7D > - =7D > - ad->ad=5Fxkey =3D auth->ah=5Fkey; > - pkey.n=5Fbytes =3D (char *)(ad->ad=5Fpkey); > - pkey.n=5Flen =3D (u=5Fint)strlen((char *)ad->ad=5Fpkey) + 1; > - if (key=5Fencryptsession=5Fpk(ad->ad=5Fservername, &pkey, &ad->ad=5Fx= key) < 0) =7B > - syslog(LOG=5FIN=46O, > - =22authdes=5Frefresh: keyserv(1m) is unable to encrypt session key=22= ); > - return (=46ALSE); > - =7D > - cred->adc=5Ffullname.key =3D ad->ad=5Fxkey; > - cred->adc=5Fnamekind =3D ADN=5F=46ULLNAME; > - cred->adc=5Ffullname.name =3D ad->ad=5Ffullname; > - return (TRUE); > -=7D > - > - > -/* > - * 5. Destroy > - */ > -static void > -authdes=5Fdestroy(AUTH *auth) > -=7B > -/* LINTED pointer alignment */ > - struct ad=5Fprivate *ad =3D AUTH=5FPRIVATE(auth); > - > - =46REE(ad->ad=5Ffullname, ad->ad=5Ffullnamelen + 1); > - =46REE(ad->ad=5Fservername, ad->ad=5Fservernamelen + 1); > - if (ad->ad=5Ftimehost) > - =46REE(ad->ad=5Ftimehost, strlen(ad->ad=5Ftimehost) + 1); > - if (ad->ad=5Fnetid) > - =46REE(ad->ad=5Fnetid, strlen(ad->ad=5Fnetid) + 1); > - if (ad->ad=5Fuaddr) > - =46REE(ad->ad=5Fuaddr, strlen(ad->ad=5Fuaddr) + 1); > - =46REE(ad, sizeof (struct ad=5Fprivate)); > - =46REE(auth, sizeof(AUTH)); > -=7D > - > -static struct auth=5Fops * > -authdes=5Fops(void) > -=7B > - static struct auth=5Fops ops; > - > - /* VARIABLES PROTECTED BY ops=5Flock: ops */ > - > - mutex=5Flock(&authdes=5Fops=5Flock); > - if (ops.ah=5Fnextverf =3D=3D NULL) =7B > - ops.ah=5Fnextverf =3D authdes=5Fnextverf; > - ops.ah=5Fmarshal =3D authdes=5Fmarshal; > - ops.ah=5Fvalidate =3D authdes=5Fvalidate; > - ops.ah=5Frefresh =3D authdes=5Frefresh; > - ops.ah=5Fdestroy =3D authdes=5Fdestroy; > - =7D > - mutex=5Funlock(&authdes=5Fops=5Flock); > - return (&ops); > + return (NULL); > =7D > +=5F=5Fsym=5Fcompat(authdes=5Fpk=5Fseccreate, =5F=5Fauthdes=5Fpk=5Fsecc= reate, =46BSD=5F1.0); > diff --git a/lib/libc/rpc/authdes=5Fprot.c b/lib/libc/rpc/authdes=5Fpro= t.c > index 79a0e5baa084..56b44daafe41 100644 > --- a/lib/libc/rpc/authdes=5Fprot.c > +++ b/lib/libc/rpc/authdes=5Fprot.c > =40=40 -42,44 +42,16 =40=40 > =23include > =23include =22un-namespace.h=22 > > -=23define ATTEMPT(xdr=5Fop) if (=21(xdr=5Fop)) return (=46ALSE) > - > -bool=5Ft > -xdr=5Fauthdes=5Fcred(XDR *xdrs, struct authdes=5Fcred *cred) > +static bool=5Ft > +=5F=5Fxdr=5Fauthdes=5Fcred(XDR *xdrs, void *cred) > =7B > - enum authdes=5Fnamekind *padc=5Fnamekind =3D &cred->adc=5Fnamekind; > - /* > - * Unrolled xdr > - */ > - ATTEMPT(xdr=5Fenum(xdrs, (enum=5Ft *) padc=5Fnamekind)); > - switch (cred->adc=5Fnamekind) =7B > - case ADN=5F=46ULLNAME: > - ATTEMPT(xdr=5Fstring(xdrs, &cred->adc=5Ffullname.name, > - MAXNETNAMELEN)); > - ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&cred->adc=5Ffullname.key, > - sizeof(des=5Fblock))); > - ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&cred->adc=5Ffullname.window, > - sizeof(cred->adc=5Ffullname.window))); > - return (TRUE); > - case ADN=5FNICKNAME: > - ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&cred->adc=5Fnickname, > - sizeof(cred->adc=5Fnickname))); > - return (TRUE); > - default: > - return (=46ALSE); > - =7D > + return (=46ALSE); > =7D > +=5F=5Fsym=5Fcompat(xdr=5Fauthdes=5Fcred, =5F=5Fxdr=5Fauthdes=5Fcred, =46= BSD=5F1.0); > > - > -bool=5Ft > -xdr=5Fauthdes=5Fverf(XDR *xdrs, struct authdes=5Fverf *verf) > +static bool=5Ft > +=5F=5Fxdr=5Fauthdes=5Fverf(XDR *xdrs, void *verf) > =7B > - /* > - * Unrolled xdr > - */ > - ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&verf->adv=5Fxtimestamp, > - sizeof(des=5Fblock))); > - ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&verf->adv=5Fint=5Fu, > - sizeof(verf->adv=5Fint=5Fu))); > - return (TRUE); > + return (=46ALSE); > =7D > +=5F=5Fsym=5Fcompat(xdr=5Fauthdes=5Fverf, =5F=5Fxdr=5Fauthdes=5Fverf, =46= BSD=5F1.0); > diff --git a/lib/libc/rpc/key=5Fcall.c b/lib/libc/rpc/key=5Fcall.c > index 5c87881c815c..eb274fcfff36 100644 > --- a/lib/libc/rpc/key=5Fcall.c > +++ b/lib/libc/rpc/key=5Fcall.c > =40=40 -32,426 +32,78 =40=40 > */ > > /* > - * key=5Fcall.c, Interface to keyserver > - * > - * setsecretkey(key) - set your secret key > - * encryptsessionkey(agent, deskey) - encrypt a session key to talk to= agent > - * decryptsessionkey(agent, deskey) - decrypt ditto > - * gendeskey(deskey) - generate a secure des key > + * Secure RPC keyserver support was removed in =46reeBSD 15.0. > + * These symbols are provided for backward compatibility, but provide = no > + * functionality and will always return an error. > */ > > =23include =22namespace.h=22 > =23include =22reentrant.h=22 > -=23include > -=23include > -=23include > -=23include > =23include > -=23include > -=23include > =23include > -=23include > -=23include > -=23include > -=23include > -=23include > -=23include > -=23include > +=23include > =23include =22un-namespace.h=22 > =23include =22mt=5Fmisc.h=22 > > - > -=23define KEY=5FTIMEOUT 5 /* per-try timeout in seconds */ > -=23define KEY=5FNRETRY 12 /* number of retries */ > - > -=23ifdef DEBUG > -=23define debug(msg) (void) fprintf(stderr, =22%s=5Cn=22, msg); > -=23else > -=23define debug(msg) > -=23endif /* DEBUG */ > - > -/* > - * Hack to allow the keyserver to use AUTH=5FDES (for authenticated > - * NIS+ calls, for example). The only functions that get called > - * are key=5Fencryptsession=5Fpk, key=5Fdecryptsession=5Fpk, and key=5F= gendes. > - * > - * The approach is to have the keyserver fill in pointers to local > - * implementations of these functions, and to call those in key=5Fcall= (). > - */ > - > -cryptkeyres *(*=5F=5Fkey=5Fencryptsession=5Fpk=5FLOCAL)(uid=5Ft, void = *arg) =3D 0; > -cryptkeyres *(*=5F=5Fkey=5Fdecryptsession=5Fpk=5FLOCAL)(uid=5Ft, void = *arg) =3D 0; > -des=5Fblock *(*=5F=5Fkey=5Fgendes=5FLOCAL)(uid=5Ft, void *) =3D 0; > - > -static int key=5Fcall( u=5Flong, xdrproc=5Ft, void *, xdrproc=5Ft, voi= d *); > - > -int > -key=5Fsetsecret(const char *secretkey) > -=7B > - keystatus status; > - > - if (=21key=5Fcall((u=5Flong) KEY=5FSET, (xdrproc=5Ft)xdr=5Fkeybuf, > - (void *)secretkey, > - (xdrproc=5Ft)xdr=5Fkeystatus, &status)) =7B > - return (-1); > - =7D > - if (status =21=3D KEY=5FSUCCESS) =7B > - debug(=22set status is nonzero=22); > - return (-1); > - =7D > - return (0); > -=7D > - > - > -/* key=5Fsecretkey=5Fis=5Fset() returns 1 if the keyserver has a secre= t key > - * stored for the caller's effective uid; it returns 0 otherwise > - * > - * N.B.: The KEY=5FNET=5FGET key call is undocumented. Applications sh= ouldn't > - * be using it, because it allows them to get the user's secret key. > - */ > - > -int > -key=5Fsecretkey=5Fis=5Fset(void) > -=7B > - struct key=5Fnetstres kres; > - > - memset((void*)&kres, 0, sizeof (kres)); > - if (key=5Fcall((u=5Flong) KEY=5FNET=5FGET, (xdrproc=5Ft)xdr=5Fvoid, N= ULL, > - (xdrproc=5Ft)xdr=5Fkey=5Fnetstres, &kres) && > - (kres.status =3D=3D KEY=5FSUCCESS) && > - (kres.key=5Fnetstres=5Fu.knet.st=5Fpriv=5Fkey=5B0=5D =21=3D 0)) =7B > - /* avoid leaving secret key in memory */ > - memset(kres.key=5Fnetstres=5Fu.knet.st=5Fpriv=5Fkey, 0, HEXKEYBYTES);= > - return (1); > - =7D > - return (0); > -=7D > - > -int > -key=5Fencryptsession=5Fpk(char *remotename, netobj *remotekey, des=5Fb= lock *deskey) > -=7B > - cryptkeyarg2 arg; > - cryptkeyres res; > - > - arg.remotename =3D remotename; > - arg.remotekey =3D *remotekey; > - arg.deskey =3D *deskey; > - if (=21key=5Fcall((u=5Flong)KEY=5FENCRYPT=5FPK, (xdrproc=5Ft)xdr=5Fcr= yptkeyarg2, &arg, > - (xdrproc=5Ft)xdr=5Fcryptkeyres, &res)) =7B > - return (-1); > - =7D > - if (res.status =21=3D KEY=5FSUCCESS) =7B > - debug(=22encrypt status is nonzero=22); > - return (-1); > - =7D > - *deskey =3D res.cryptkeyres=5Fu.deskey; > - return (0); > -=7D > - > -int > -key=5Fdecryptsession=5Fpk(char *remotename, netobj *remotekey, des=5Fb= lock *deskey) > -=7B > - cryptkeyarg2 arg; > - cryptkeyres res; > - > - arg.remotename =3D remotename; > - arg.remotekey =3D *remotekey; > - arg.deskey =3D *deskey; > - if (=21key=5Fcall((u=5Flong)KEY=5FDECRYPT=5FPK, (xdrproc=5Ft)xdr=5Fcr= yptkeyarg2, &arg, > - (xdrproc=5Ft)xdr=5Fcryptkeyres, &res)) =7B > - return (-1); > - =7D > - if (res.status =21=3D KEY=5FSUCCESS) =7B > - debug(=22decrypt status is nonzero=22); > - return (-1); > - =7D > - *deskey =3D res.cryptkeyres=5Fu.deskey; > - return (0); > -=7D > - > -int > -key=5Fencryptsession(const char *remotename, des=5Fblock *deskey) > +static int > +=5F=5Fkey=5Fsetsecret(const char *secretkey) > =7B > - cryptkeyarg arg; > - cryptkeyres res; > - > - arg.remotename =3D (char *) remotename; > - arg.deskey =3D *deskey; > - if (=21key=5Fcall((u=5Flong)KEY=5FENCRYPT, (xdrproc=5Ft)xdr=5Fcryptke= yarg, &arg, > - (xdrproc=5Ft)xdr=5Fcryptkeyres, &res)) =7B > - return (-1); > - =7D > - if (res.status =21=3D KEY=5FSUCCESS) =7B > - debug(=22encrypt status is nonzero=22); > - return (-1); > - =7D > - *deskey =3D res.cryptkeyres=5Fu.deskey; > - return (0); > + return (-1); > =7D > +=5F=5Fsym=5Fcompat(key=5Fsetsecret, =5F=5Fkey=5Fsetsecret, =46BSD=5F1.= 0); > > -int > -key=5Fdecryptsession(const char *remotename, des=5Fblock *deskey) > +static int > +=5F=5Fkey=5Fsecretkey=5Fis=5Fset(void) > =7B > - cryptkeyarg arg; > - cryptkeyres res; > - > - arg.remotename =3D (char *) remotename; > - arg.deskey =3D *deskey; > - if (=21key=5Fcall((u=5Flong)KEY=5FDECRYPT, (xdrproc=5Ft)xdr=5Fcryptke= yarg, &arg, > - (xdrproc=5Ft)xdr=5Fcryptkeyres, &res)) =7B > - return (-1); > - =7D > - if (res.status =21=3D KEY=5FSUCCESS) =7B > - debug(=22decrypt status is nonzero=22); > - return (-1); > - =7D > - *deskey =3D res.cryptkeyres=5Fu.deskey; > return (0); > =7D > +=5F=5Fsym=5Fcompat(key=5Fsecretkey=5Fis=5Fset, =5F=5Fkey=5Fsecretkey=5F= is=5Fset, =46BSD=5F1.0); > > -int > -key=5Fgendes(des=5Fblock *key) > +static int > +=5F=5Fkey=5Fencryptsession=5Fpk(char *remotename, netobj *remotekey, d= es=5Fblock *deskey) > =7B > - if (=21key=5Fcall((u=5Flong)KEY=5FGEN, (xdrproc=5Ft)xdr=5Fvoid, NULL,= > - (xdrproc=5Ft)xdr=5Fdes=5Fblock, key)) =7B > - return (-1); > - =7D > - return (0); > + return (-1); > =7D > +=5F=5Fsym=5Fcompat(key=5Fencryptsession=5Fpk, =5F=5Fkey=5Fencryptsessi= on=5Fpk, =46BSD=5F1.0); > > -int > -key=5Fsetnet(struct key=5Fnetstarg *arg) > +static int > +=5F=5Fkey=5Fdecryptsession=5Fpk(char *remotename, netobj *remotekey, d= es=5Fblock *deskey) > =7B > *** 2726 LINES SKIPPED *** > --689b1a61_60709938_50e Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline <= meta name=3D=22viewport=22 content=3D=22width=3Ddevice-width, initial-sca= le=3D1.0, user-scalable=3Dno=22>
Hello=21

This commit bre= aks x11-server/xwayland

=46AILED: os/liblibxserv= er=5Fos.a.p/rpcauth.c.o =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 cc -Ios/liblibxserver=5Fos.a.p -Ios -= I../os -I. -I.. -IXext -I../Xext -IXi -I../Xi -Icomposite -I../composite = -Idamageext -I../damageext -Ifb -I../fb -Iglamor -I../glamor -Imi -I../mi= -Imiext/damage -I../miext/damage -Imiext/sync -I../miext/sync -Idbe -I..= /dbe -Idix -I../dix -Idri3 -I../dri3 -Iinclude -I../include -Ipresent -I.= ./present -Irandr -I../randr -Irender -I../render -Ixfixes -I../xfixes -I= /usr/local/include -I/usr/local/include/pixman-1 -I/usr/local/include/fre= etype2 -I/usr/local/include/libpng16 -fdiagnostics-color=3Dnever -D=5F=46= ILE=5FO=46=46SET=5FBITS=3D64 -Wall -Winvalid-pch -std=3Dgnu99 -DHAVE=5FDI= X=5FCON=46IG=5FH -fno-strict-aliasing -fvisibility=3Dhidden -Wall -Wpoint= er-arith -Wmissing-declarations -Wformat=3D2 -Wstrict-prototypes -Wmissin= g-prototypes -Wnested-externs -Wbad-function-cast -Wold-style-definition = -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissing-format-att= ribute -Wredundant-decls -Werror=3Dimplicit -Werror=3Dnonnull -Werror=3Di= nit-self -Werror=3Dmain -Werror=3Dmissing-braces -Werror=3Dsequence-point= -Werror=3Dreturn-type -Werror=3Dtrigraphs -Werror=3Darray-bounds -Werror= =3Dwrite-strings -Werror=3Daddress -Werror=3Dint-to-pointer-cast -Werror=3D= pointer-to-int-cast -O2 -pipe -fstack-protector-strong -fno-strict-aliasi= ng -fPIC -D=5FTHREAD=5FSA=46E -D=5FDE=46AULT=5FSOURCE -D=5FBSD=5FSOURCE -= DHAS=5F=46CHOWN -DHAS=5FSTICKY=5FDIR=5FBIT -DCLIENTIDS -MD -MQ os/liblibx= server=5Fos.a.p/rpcauth.c.o -M=46 os/liblibxserver=5Fos.a.p/rpcauth.c.o.d= -o os/liblibxserver=5Fos.a.p/rpcauth.c.o -c ../os/rpcauth.c =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ../os/rpcauth.c:110:52: error:= incomplete definition of type 'struct authdes=5Fcred' =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0110 =7C =C2=A0 =C2=A0 return (((struct authdes=5Fcred *) r.rq=5F= clntcred)->adc=5Ffullname.name); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0=7C =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =7E=7E=7E=7E=7E= =7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E= =7E=7E=7E=7E=7E=7E=7E=7E=7E=5E =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0../os/rpcauth.= c:110:22: note: forward declaration of 'struct authdes=5Fcred' =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0110 =7C =C2=A0 =C2=A0 re= turn (((struct authdes=5Fcred *) r.rq=5Fclntcred)->adc=5Ffullname.name= ); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=7C =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=5E =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01 error generated.


=
--
Dima. (desktop, kde, x11, office, ports-secte= am)=40=46reeBSD team
(fluffy=40=46reeBSD.org, https://t.me/=46l= uffyBSD)

On =D0=B2=D0=BE=D1=81=D0=BA=D1=80=D0=B5=D1=81=D0=B5=D0=BD=D1=8C=D0=B5, =D0= =B0=D0=B2=D0=B3. 10, 2025 at 6:37 PM, Lexi Winter <ivy=40=46reeBSD.org> wrote:
The branch main has been updated by ivy:

URL: https://cgit.=46r= eeBSD.org/src/commit/=3Fid=3D7ac276298b72982189ac1a5b17461936dc00163e
commit 7ac276298b72982189ac1a5b17461936dc00163e
Author: Lexi Wi= nter <ivy=40=46reeBSD.org>
AuthorDate: 2025-08-10 12:57:36 +000= 0
Commit: Lexi Winter <ivy=40=46reeBSD.org>
CommitDate: 202= 5-08-10 15:36:40 +0000

Remove Secure RPC DES authentication
=46ollowing the earlier removal of keyserv, none of this functiona= lity
works since it requires keyserv.

Remove the relevant = symbols from libc's Symbol.map. Leave compatibility
symbols for exis= ting applications, but since the functions don't work
without keyser= v, stub them out to return an error.

Remove some private symbol= s that were only used by keyserv; these don't
get compatibility symb= ols.

Remove the documentation for the old functions.

= Remove rpc.ypupdated since it requires DES authentication.

Revi= ewed by: manu, des, emaste
Differential Revision: https://reviews.fr= eebsd.org/D50442
---
Obsolete=46iles.inc =7C 4 +
include/rp= c/auth=5Fdes.h =7C 79 +----
lib/libc/rpc/Symbol.map =7C 19 --
l= ib/libc/rpc/auth=5Fdes.c =7C 455 +----------------------------
lib/l= ibc/rpc/authdes=5Fprot.c =7C 44 +--
lib/libc/rpc/key=5Fcall.c =7C 42= 4 +++------------------------
lib/libc/rpc/publickey.5 =7C 40 --- lib/libc/rpc/rpc=5Fsecure.3 =7C 177 +-----------
lib/libc/rpc/rpc= =5Fsoc.3 =7C 13 +-
lib/libc/rpc/rpc=5Fsoc.c =7C 31 +-
lib/libc/= rpc/svc=5Fauth.c =7C 8 -
lib/libc/rpc/svc=5Fauth=5Fdes.c =7C 460 +--= ---------------------------
lib/librpcsvc/Makefile =7C 2 +-
lib= /librpcsvc/yp=5Fupdate.c =7C 199 -------------
libexec/rc/rc.conf =7C= 1 -
libexec/rc/rc.d/Makefile =7C 1 -
libexec/rc/rc.d/ypupdated= =7C 35 ---
share/man/man5/rc.conf.5 =7C 9 +-
sys/rpc/auth.h =7C= 26 --
tools/build/mk/OptionalObsolete=46iles.inc =7C 2 -
usr.s= bin/Makefile =7C 1 -
usr.sbin/rpc.ypupdated/Makefile =7C 32 ---
= usr.sbin/rpc.ypupdated/Makefile.depend =7C 18 --
usr.sbin/rpc.ypupd= ated/update.c =7C 328 ---------------------
usr.sbin/rpc.ypupdated/y= p=5Fdbdelete.c =7C 68 -----
usr.sbin/rpc.ypupdated/yp=5Fdbupdate.c =7C= 147 ----------
usr.sbin/rpc.ypupdated/ypupdate =7C 32 ---
usr.= sbin/rpc.ypupdated/ypupdated=5Fextern.h =7C 32 ---
usr.sbin/rpc.ypup= dated/ypupdated=5Fmain.c =7C 287 -------------------
usr.sbin/rpc.yp= updated/ypupdated=5Fserver.c =7C 227 ---------------
30 files change= d, 83 insertions(+), 3118 deletions(-)

diff --git a/Obsolete=46i= les.inc b/Obsolete=46iles.inc
index ec324e82f86d..a6662d31829f 100644=
--- a/Obsolete=46iles.inc
+++ b/Obsolete=46iles.inc
=40=40 -= 51,6 +51,10 =40=40
=23 xargs -n1 =7C sort =7C uniq -d;
=23 done=

+=23 20250810: Removal of remaining Secure RPC (DES) bits
+= OLD=5F=46ILES+=3Dusr/sbin/rpc.ypupdated
+OLD=5F=46ILES+=3Detc/rc.d/yp= updated
+
=23 20250808: nvmfd removed from base install
OLD= =5F=46ILES+=3Dusr/sbin/nvmfd
OLD=5F=46ILES+=3Dusr/share/man/man8/nvm= fd.8.gz
diff --git a/include/rpc/auth=5Fdes.h b/include/rpc/auth=5Fde= s.h
index 0ff43c13139b..1b4943a74b8b 100644
--- a/include/rpc/aut= h=5Fdes.h
+++ b/include/rpc/auth=5Fdes.h
=40=40 -33,91 +33,14 =40= =40
* Copyright (c) 1986 - 1991 by Sun Microsystems, Inc.
*/
-/*
- * auth=5Fdes.h, Protocol for DES style authentication fo= r RPC
- */
+/* Note, RPC DES authentication was removed in =46ree= BSD 15.0. */

=23ifndef =5FAUTH=5FDES=5F
=23define =5FAUTH=5F= DES=5F

-/*
- * There are two kinds of =22names=22: fullnames= and nicknames
- */
-enum authdes=5Fnamekind =7B
- ADN=5F=46U= LLNAME,
- ADN=5FNICKNAME
-=7D;
-
-/*
- * A fullname c= ontains the network name of the client,
- * a conversation key and th= e window
- */
-struct authdes=5Ffullname =7B
- char *name; /*= network name of client, up to MAXNETNAMELEN */
- des=5Fblock key; /*= conversation key */
- u=5Flong window; /* associated window */
-= =7D;
-
-
-/*
- * A credential
- */
-struct authde= s=5Fcred =7B
- enum authdes=5Fnamekind adc=5Fnamekind;
- struct a= uthdes=5Ffullname adc=5Ffullname;
- u=5Flong adc=5Fnickname;
-=7D= ;
-
-
-
-/*
- * A des authentication verifier
- *= /
-struct authdes=5Fverf =7B
- union =7B
- struct timeval adv= =5Fctime; /* clear time */
- des=5Fblock adv=5Fxtime; /* crypt time *= /
- =7D adv=5Ftime=5Fu;
- u=5Flong adv=5Fint=5Fu;
-=7D;
-=
-/*
- * des authentication verifier: client variety
- *
= - * adv=5Ftimestamp is the current time.
- * adv=5Fwinverf is the cre= dential window + 1.
- * Both are encrypted using the conversation key= .
- */
-=23define adv=5Ftimestamp adv=5Ftime=5Fu.adv=5Fctime
= -=23define adv=5Fxtimestamp adv=5Ftime=5Fu.adv=5Fxtime
-=23define adv= =5Fwinverf adv=5Fint=5Fu
-
-/*
- * des authentication verifie= r: server variety
- *
- * adv=5Ftimeverf is the client's timestam= p + client's window
- * adv=5Fnickname is the server's nickname for t= he client.
- * adv=5Ftimeverf is encrypted using the conversation key= .
- */
-=23define adv=5Ftimeverf adv=5Ftime=5Fu.adv=5Fctime
-= =23define adv=5Fxtimeverf adv=5Ftime=5Fu.adv=5Fxtime
-=23define adv=5F= nickname adv=5Fint=5Fu
-
-/*
- * Map a des credential into a = unix cred.
- *
- */
-=5F=5FBEGIN=5FDECLS
-extern int auth= des=5Fgetucred( struct authdes=5Fcred *, uid=5Ft *, gid=5Ft *, int *, gid= =5Ft * );
-=5F=5FEND=5FDECLS
-
=5F=5FBEGIN=5FDECLS
-exte= rn bool=5Ft xdr=5Fauthdes=5Fcred(XDR *, struct authdes=5Fcred *);
-ex= tern bool=5Ft xdr=5Fauthdes=5Fverf(XDR *, struct authdes=5Fverf *);
= extern int rtime(dev=5Ft, struct netbuf *, int, struct timeval *,
st= ruct timeval *);
-extern void kgetnetname(char *);
-extern enum a= uth=5Fstat =5Fsvcauth=5Fdes(struct svc=5Freq *, struct rpc=5Fmsg *);
= =5F=5FEND=5FDECLS

=23endif /* ndef =5FAUTH=5FDES=5F */
dif= f --git a/lib/libc/rpc/Symbol.map b/lib/libc/rpc/Symbol.map
index 105= d6fb6b54e..61e8e084b1e0 100644
--- a/lib/libc/rpc/Symbol.map
+++ = b/lib/libc/rpc/Symbol.map
=40=40 -8,13 +8,9 =40=40 =46BSD=5F1.0 =7B <= br> xdr=5Fdesargs;
xdr=5Fdesresp;

- authdes=5Fseccreate; - authdes=5Fpk=5Fseccreate;
authnone=5Fcreate;
authunix=5Fcre= ate;
authunix=5Fcreate=5Fdefault;
- xdr=5Fauthdes=5Fcred;
- = xdr=5Fauthdes=5Fverf;
xdr=5Fauthunix=5Fparms;
bindresvport; bindresvport=5Fsa;
=40=40 -58,15 +54,6 =40=40 =46BSD=5F1.0 =7B
= endrpcent;
getrpcent;
getrpcport;
- key=5Fsetsecret;
-= key=5Fsecretkey=5Fis=5Fset;
- key=5Fencryptsession=5Fpk;
- key=5F= decryptsession=5Fpk;
- key=5Fencryptsession;
- key=5Fdecryptsessi= on;
- key=5Fgendes;
- key=5Fsetnet;
- key=5Fget=5Fconv;
= xdr=5Fkeystatus;
xdr=5Fkeybuf;
xdr=5Fnetnamestr;
=40=40 -13= 0,7 +117,6 =40=40 =46BSD=5F1.0 =7B
callrpc;
registerrpc;
c= lnt=5Fbroadcast;
- authdes=5Fcreate;
clntunix=5Fcreate;
svc= unix=5Fcreate;
svcunixfd=5Fcreate;
=40=40 -180,8 +166,6 =40=40 =46= BSD=5F1.0 =7B
=5Fauthenticate;
=5Fsvcauth=5Fnull;
svc=5Fau= th=5Freg;
- =5Fsvcauth=5Fdes;
- authdes=5Fgetucred;
=5Fsvcau= th=5Funix;
=5Fsvcauth=5Fshort;
svc=5Fdg=5Fcreate;
=40=40 -2= 05,9 +189,6 =40=40 =46BSD=5F1.8 =7B

=46BSDprivate=5F1.0 =7B =5F=5Fdes=5Fcrypt=5FLOCAL;
- =5F=5Fkey=5Fencryptsession=5Fpk=5FLOCA= L;
- =5F=5Fkey=5Fdecryptsession=5Fpk=5FLOCAL;
- =5F=5Fkey=5Fgende= s=5FLOCAL;
=5F=5Fsvc=5Fclean=5Fidle;
=5F=5Frpc=5Fgss=5Funwrap; =
=5F=5Frpc=5Fgss=5Funwrap=5Fstub;
diff --git a/lib/libc/rpc/auth=5F= des.c b/lib/libc/rpc/auth=5Fdes.c
index c9b20de25cda..754d55cbed3e 10= 0644
--- a/lib/libc/rpc/auth=5Fdes.c
+++ b/lib/libc/rpc/auth=5Fde= s.c
=40=40 -30,463 +30,34 =40=40
/*
* Copyright (c) 1988 by= Sun Microsystems, Inc.
*/
+
/*
- * auth=5Fdes.c, clien= t-side implementation of DES authentication
+ * Secure RPC DES authen= tication was removed in =46reeBSD 15.0.
+ * These symbols are provide= d for backward compatibility, but provide no
+ * functionality and wi= ll always return an error.
*/

=23include =22namespace.h=22=
=23include =22reentrant.h=22
-=23include <err.h>
-=23= include <errno.h>
-=23include <string.h>
-=23include = <stdlib.h>
-=23include <unistd.h>
-=23include <rpc= /des=5Fcrypt.h>
-=23include <syslog.h>
=23include <r= pc/types.h>
=23include <rpc/auth.h>
=23include <rpc= /auth=5Fdes.h>
-=23include <rpc/clnt.h>
-=23include <= rpc/xdr.h>
-=23include <sys/socket.h>
-=23undef NIS
= =23include <rpcsvc/nis.h>
=23include =22un-namespace.h=22 -=23include =22mt=5Fmisc.h=22
-
-=23define USEC=5FPER=5FSEC 1000= 000
-=23define RTIME=5FTIMEOUT 5 /* seconds to wait for sync */
-=
-=23define AUTH=5FPRIVATE(auth) (struct ad=5Fprivate *) auth->ah=5F= private
-=23define ALLOC(object=5Ftype) (object=5Ftype *) mem=5Falloc= (sizeof(object=5Ftype))
-=23define =46REE(ptr, size) mem=5Ffree((char= *)(ptr), (int) size)
-=23define ATTEMPT(xdr=5Fop) if (=21(xdr=5Fop))= return (=46ALSE)
-
-extern bool=5Ft xdr=5Fauthdes=5Fcred( XDR *,= struct authdes=5Fcred *);
-extern bool=5Ft xdr=5Fauthdes=5Fverf( XDR= *, struct authdes=5Fverf *);
-extern int key=5Fencryptsession=5Fpk(c= har *, netobj *, des=5Fblock *);
-
-extern bool=5Ft =5F=5Frpc=5Fg= et=5Ftime=5Foffset(struct timeval *, nis=5Fserver *, char *,
- char *= *, char **);

-/*
- * DES authenticator operations vector - */
-static void authdes=5Fnextverf(AUTH *);
-static bool=5Ft a= uthdes=5Fmarshal(AUTH *, XDR *);
-static bool=5Ft authdes=5Fvalidate(= AUTH *, struct opaque=5Fauth *);
-static bool=5Ft authdes=5Frefresh(A= UTH *, void *);
-static void authdes=5Fdestroy(AUTH *);
-
-st= atic struct auth=5Fops *authdes=5Fops(void);
-
-/*
- * This s= truct is pointed to by the ah=5Fprivate field of an =22AUTH *=22
- */=
-struct ad=5Fprivate =7B
- char *ad=5Ffullname; /* client's full= name */
- u=5Fint ad=5Ffullnamelen; /* length of name, rounded up */=
- char *ad=5Fservername; /* server's full name */
- u=5Fint ad=5F= servernamelen; /* length of name, rounded up */
- u=5Fint ad=5Fwindow= ; /* client specified window */
- bool=5Ft ad=5Fdosync; /* synchroniz= e=3F */
- struct netbuf ad=5Fsyncaddr; /* remote host to synch with *= /
- char *ad=5Ftimehost; /* remote host to synch with */
- struct= timeval ad=5Ftimediff; /* server's time - client's time */
- u=5Fint= ad=5Fnickname; /* server's nickname for client */
- struct authdes=5F= cred ad=5Fcred; /* storage for credential */
- struct authdes=5Fverf = ad=5Fverf; /* storage for verifier */
- struct timeval ad=5Ftimestamp= ; /* timestamp sent */
- des=5Fblock ad=5Fxkey; /* encrypted conversa= tion key */
- u=5Fchar ad=5Fpkey=5B1024=5D; /* Server's actual public= key */
- char *ad=5Fnetid; /* Timehost netid */
- char *ad=5Fuad= dr; /* Timehost uaddr */
- nis=5Fserver *ad=5Fnis=5Fsrvr; /* NIS+ ser= ver struct */
-=7D;
-
-AUTH *authdes=5Fpk=5Fseccreate(const c= har *, netobj *, u=5Fint, const char *,
- const des=5Fblock *, nis=5F= server *);
-
-/*
- * documented version of authdes=5Fseccreat= e
- */
-/*
- servername: network name of server
- win: ti= me to live
- timehost: optional hostname to sync with
- ckey: opt= ional conversation key to use
-*/
-
-AUTH *
-authdes=5Fse= ccreate(const char *servername, const u=5Fint win,
+static AUTH * +=5F=5Fauthdes=5Fseccreate(const char *servername, const u=5Fint win, const char *timehost, const des=5Fblock *ckey)
=7B
- u=5Fchar= pkey=5Fdata=5B1024=5D;
- netobj pkey;
- AUTH *dummy;
-
-= if (=21 getpublickey(servername, (char *) pkey=5Fdata)) =7B
- syslog= (LOG=5FERR,
- =22authdes=5Fseccreate: no public key found for %s=22, =
- servername);
- return (NULL);
- =7D
-
- pkey.n=5Fby= tes =3D (char *) pkey=5Fdata;
- pkey.n=5Flen =3D (u=5Fint)strlen((cha= r *)pkey=5Fdata) + 1;
- dummy =3D authdes=5Fpk=5Fseccreate(servername= , &pkey, win, timehost,
- ckey, NULL);
- return (dummy);
= -=7D
-
-/*
- * Slightly modified version of authdessec=5Fcrea= te which takes the public key
- * of the server principal as an argum= ent. This spares us a call to
- * getpublickey() which in the nameser= ver context can cause a deadlock.
- */
-AUTH *
-authdes=5Fpk=5F= seccreate(const char *servername, netobj *pkey, u=5Fint window,
- con= st char *timehost, const des=5Fblock *ckey, nis=5Fserver *srvr)
-=7B =
- AUTH *auth;
- struct ad=5Fprivate *ad;
- char namebuf=5BMAX= NETNAMELEN+1=5D;
-
- /*
- * Allocate everything now
- */ =
- auth =3D ALLOC(AUTH);
- if (auth =3D=3D NULL) =7B
- syslog(= LOG=5FERR, =22authdes=5Fpk=5Fseccreate: out of memory=22);
- return (= NULL);
- =7D
- ad =3D ALLOC(struct ad=5Fprivate);
- if (ad =3D= =3D NULL) =7B
- syslog(LOG=5FERR, =22authdes=5Fpk=5Fseccreate: out of= memory=22);
- goto failed;
- =7D
- ad->ad=5Ffullname =3D = ad->ad=5Fservername =3D NULL; /* Sanity reasons */
- ad->ad=5Ft= imehost =3D NULL;
- ad->ad=5Fnetid =3D NULL;
- ad->ad=5Fuad= dr =3D NULL;
- ad->ad=5Fnis=5Fsrvr =3D NULL;
- ad->ad=5Ftim= ediff.tv=5Fsec =3D 0;
- ad->ad=5Ftimediff.tv=5Fusec =3D 0;
- m= emcpy(ad->ad=5Fpkey, pkey->n=5Fbytes, pkey->n=5Flen);
- if (= =21getnetname(namebuf))
- goto failed;
- ad->ad=5Ffullnamelen = =3D RNDUP((u=5Fint) strlen(namebuf));
- ad->ad=5Ffullname =3D (cha= r *)mem=5Falloc(ad->ad=5Ffullnamelen + 1);
- ad->ad=5Fservernam= elen =3D strlen(servername);
- ad->ad=5Fservername =3D (char *)mem= =5Falloc(ad->ad=5Fservernamelen + 1);
-
- if (ad->ad=5Ffull= name =3D=3D NULL =7C=7C ad->ad=5Fservername =3D=3D NULL) =7B
- sys= log(LOG=5FERR, =22authdes=5Fseccreate: out of memory=22);
- goto fail= ed;
- =7D
- if (timehost =21=3D NULL) =7B
- ad->ad=5Ftimeh= ost =3D (char *)mem=5Falloc(strlen(timehost) + 1);
- if (ad->ad=5F= timehost =3D=3D NULL) =7B
- syslog(LOG=5FERR, =22authdes=5Fseccreate:= out of memory=22);
- goto failed;
- =7D
- memcpy(ad->ad=5F= timehost, timehost, strlen(timehost) + 1);
- ad->ad=5Fdosync =3D T= RUE;
- =7D else if (srvr =21=3D NULL) =7B
- ad->ad=5Fnis=5Fsrv= r =3D srvr; /* transient */
- ad->ad=5Fdosync =3D TRUE;
- =7D = else =7B
- ad->ad=5Fdosync =3D =46ALSE;
- =7D
- memcpy(ad-= >ad=5Ffullname, namebuf, ad->ad=5Ffullnamelen + 1);
- memcpy(ad= ->ad=5Fservername, servername, ad->ad=5Fservernamelen + 1);
- a= d->ad=5Fwindow =3D window;
- if (ckey =3D=3D NULL) =7B
- if (k= ey=5Fgendes(&auth->ah=5Fkey) < 0) =7B
- syslog(LOG=5FERR, <= br>- =22authdes=5Fseccreate: keyserv(1m) is unable to generate session ke= y=22);
- goto failed;
- =7D
- =7D else =7B
- auth->ah=5F= key =3D *ckey;
- =7D
-
- /*
- * Set up auth handle
- = */
- auth->ah=5Fcred.oa=5Fflavor =3D AUTH=5FDES;
- auth->ah= =5Fverf.oa=5Fflavor =3D AUTH=5FDES;
- auth->ah=5Fops =3D authdes=5F= ops();
- auth->ah=5Fprivate =3D (caddr=5Ft)ad;
-
- if (=21= authdes=5Frefresh(auth, NULL)) =7B
- goto failed;
- =7D
- ad-= >ad=5Fnis=5Fsrvr =3D NULL; /* not needed any longer */
- return (a= uth);
-
-failed:
- if (auth)
- =46REE(auth, sizeof (AUTH)= );
- if (ad) =7B
- if (ad->ad=5Ffullname)
- =46REE(ad->= ad=5Ffullname, ad->ad=5Ffullnamelen + 1);
- if (ad->ad=5Fserver= name)
- =46REE(ad->ad=5Fservername, ad->ad=5Fservernamelen + 1)= ;
- if (ad->ad=5Ftimehost)
- =46REE(ad->ad=5Ftimehost, strl= en(ad->ad=5Ftimehost) + 1);
- if (ad->ad=5Fnetid)
- =46REE(= ad->ad=5Fnetid, strlen(ad->ad=5Fnetid) + 1);
- if (ad->ad=5F= uaddr)
- =46REE(ad->ad=5Fuaddr, strlen(ad->ad=5Fuaddr) + 1); - =46REE(ad, sizeof (struct ad=5Fprivate));
- =7D
return (NULL= );
=7D
+=5F=5Fsym=5Fcompat(authdes=5Fseccreate, =5F=5Fauthdes=5F= seccreate, =46BSD=5F1.0);

-/*
- * Implement the five authent= ication operations
- */
-
-
-/*
- * 1. Next Verifier =
- */
-/*ARGSUSED*/
-static void
-authdes=5Fnextverf(AUTH = *auth =5F=5Funused)
+static AUTH *
+=5F=5Fauthdes=5Fpk=5Fseccreat= e(const char *servername =5F=5Funused, netobj *pkey =5F=5Funused,
+ u= =5Fint window =5F=5Funused, const char *timehost =5F=5Funused,
+ cons= t des=5Fblock *ckey =5F=5Funused, nis=5Fserver *srvr =5F=5Funused)
=7B=
- /* what the heck am I supposed to do=3F=3F=3F */
-=7D
- -
-/*
- * 2. Marshal
- */
-static bool=5Ft
-authdes= =5Fmarshal(AUTH *auth, XDR *xdrs)
-=7B
-/* LINTED pointer alignme= nt */
- struct ad=5Fprivate *ad =3D AUTH=5FPRIVATE(auth);
- struc= t authdes=5Fcred *cred =3D &ad->ad=5Fcred;
- struct authdes=5F= verf *verf =3D &ad->ad=5Fverf;
- des=5Fblock cryptbuf=5B2=5D; =
- des=5Fblock ivec;
- int status;
- int len;
- rpc=5Finli= ne=5Ft *ixdr;
-
- /*
- * =46igure out the =22time=22, account= ing for any time difference
- * with the server if necessary.
- *= /
- (void)gettimeofday(&ad->ad=5Ftimestamp, NULL);
- ad-&g= t;ad=5Ftimestamp.tv=5Fsec +=3D ad->ad=5Ftimediff.tv=5Fsec;
- ad-&g= t;ad=5Ftimestamp.tv=5Fusec +=3D ad->ad=5Ftimediff.tv=5Fusec;
- whi= le (ad->ad=5Ftimestamp.tv=5Fusec >=3D USEC=5FPER=5FSEC) =7B
- a= d->ad=5Ftimestamp.tv=5Fusec -=3D USEC=5FPER=5FSEC;
- ad->ad=5Ft= imestamp.tv=5Fsec++;
- =7D
-
- /*
- * XDR the timestamp a= nd possibly some other things, then
- * encrypt them.
- */
- = ixdr =3D (rpc=5Finline=5Ft *)cryptbuf;
- IXDR=5FPUT=5FINT32(ixdr, ad-= >ad=5Ftimestamp.tv=5Fsec);
- IXDR=5FPUT=5FINT32(ixdr, ad->ad=5F= timestamp.tv=5Fusec);
- if (ad->ad=5Fcred.adc=5Fnamekind =3D=3D AD= N=5F=46ULLNAME) =7B
- IXDR=5FPUT=5FU=5FINT32(ixdr, ad->ad=5Fwindow= );
- IXDR=5FPUT=5FU=5FINT32(ixdr, ad->ad=5Fwindow - 1);
- ivec= .key.high =3D ivec.key.low =3D 0;
- status =3D cbc=5Fcrypt((char *)&a= mp;auth->ah=5Fkey, (char *)cryptbuf,
- (u=5Fint) 2 * sizeof (des=5F= block),
- DES=5FENCRYPT =7C DES=5FHW, (char *)&ivec);
- =7D e= lse =7B
- status =3D ecb=5Fcrypt((char *)&auth->ah=5Fkey, (cha= r *)cryptbuf,
- (u=5Fint) sizeof (des=5Fblock),
- DES=5FENCRYPT =7C= DES=5FHW);
- =7D
- if (DES=5F=46AILED(status)) =7B
- syslog(= LOG=5FERR, =22authdes=5Fmarshal: DES encryption failure=22);
- return= (=46ALSE);
- =7D
- ad->ad=5Fverf.adv=5Fxtimestamp =3D cryptbu= f=5B0=5D;
- if (ad->ad=5Fcred.adc=5Fnamekind =3D=3D ADN=5F=46ULLNA= ME) =7B
- ad->ad=5Fcred.adc=5Ffullname.window =3D cryptbuf=5B1=5D.= key.high;
- ad->ad=5Fverf.adv=5Fwinverf =3D cryptbuf=5B1=5D.key.lo= w;
- =7D else =7B
- ad->ad=5Fcred.adc=5Fnickname =3D ad->ad= =5Fnickname;
- ad->ad=5Fverf.adv=5Fwinverf =3D 0;
- =7D
- =
- /*
- * Serialize the credential and verifier into opaque
- = * authentication data.
- */
- if (ad->ad=5Fcred.adc=5Fnamekind= =3D=3D ADN=5F=46ULLNAME) =7B
- len =3D ((1 + 1 + 2 + 1)*BYTES=5FPER=5F= XDR=5FUNIT + ad->ad=5Ffullnamelen);
- =7D else =7B
- len =3D (= 1 + 1)*BYTES=5FPER=5FXDR=5FUNIT;
- =7D
-
- if ((ixdr =3D xdr=5F= inline(xdrs, 2*BYTES=5FPER=5FXDR=5FUNIT))) =7B
- IXDR=5FPUT=5FINT32(i= xdr, AUTH=5FDES);
- IXDR=5FPUT=5FINT32(ixdr, len);
- =7D else =7B=
- ATTEMPT(xdr=5Fputint32(xdrs, (int *)&auth->ah=5Fcred.oa=5Ff= lavor));
- ATTEMPT(xdr=5Fputint32(xdrs, &len));
- =7D
- A= TTEMPT(xdr=5Fauthdes=5Fcred(xdrs, cred));
-
- len =3D (2 + 1)*BYT= ES=5FPER=5FXDR=5FUNIT;
- if ((ixdr =3D xdr=5Finline(xdrs, 2*BYTES=5FP= ER=5FXDR=5FUNIT))) =7B
- IXDR=5FPUT=5FINT32(ixdr, AUTH=5FDES);
- = IXDR=5FPUT=5FINT32(ixdr, len);
- =7D else =7B
- ATTEMPT(xdr=5Fput= int32(xdrs, (int *)&auth->ah=5Fverf.oa=5Fflavor));
- ATTEMPT(x= dr=5Fputint32(xdrs, &len));
- =7D
- ATTEMPT(xdr=5Fauthdes=5Fv= erf(xdrs, verf));
- return (TRUE);
-=7D
-
-
-/*
-= * 3. Validate
- */
-static bool=5Ft
-authdes=5Fvalidate(AUTH= *auth, struct opaque=5Fauth *rverf)
-=7B
-/* LINTED pointer alig= nment */
- struct ad=5Fprivate *ad =3D AUTH=5FPRIVATE(auth);
- st= ruct authdes=5Fverf verf;
- int status;
- uint32=5Ft *ixdr;
-= des=5Fblock buf;
-
- if (rverf->oa=5Flength =21=3D (2 + 1) * = BYTES=5FPER=5FXDR=5FUNIT) =7B
- return (=46ALSE);
- =7D
-/* L= INTED pointer alignment */
- ixdr =3D (uint32=5Ft *)rverf->oa=5Fba= se;
- buf.key.high =3D (uint32=5Ft)*ixdr++;
- buf.key.low =3D (ui= nt32=5Ft)*ixdr++;
- verf.adv=5Fint=5Fu =3D (uint32=5Ft)*ixdr++;
-=
- /*
- * Decrypt the timestamp
- */
- status =3D ecb=5Fc= rypt((char *)&auth->ah=5Fkey, (char *)&buf,
- (u=5Fint)siz= eof (des=5Fblock), DES=5FDECRYPT =7C DES=5FHW);
-
- if (DES=5F=46= AILED(status)) =7B
- syslog(LOG=5FERR, =22authdes=5Fvalidate: DES dec= ryption failure=22);
- return (=46ALSE);
- =7D
-
- /* - * xdr the decrypted timestamp
- */
-/* LINTED pointer alignmen= t */
- ixdr =3D (uint32=5Ft *)buf.c;
- verf.adv=5Ftimestamp.tv=5F= sec =3D IXDR=5FGET=5FINT32(ixdr) + 1;
- verf.adv=5Ftimestamp.tv=5Fuse= c =3D IXDR=5FGET=5FINT32(ixdr);
-
- /*
- * validate
- */ =
- if (bcmp((char *)&ad->ad=5Ftimestamp, (char *)&verf.adv=5F= timestamp,
- sizeof(struct timeval)) =21=3D 0) =7B
- syslog(LOG=5F= DEBUG, =22authdes=5Fvalidate: verifier mismatch=22);
- return (=46ALS= E);
- =7D
-
- /*
- * We have a nickname now, let's use it=
- */
- ad->ad=5Fnickname =3D verf.adv=5Fnickname;
- ad-&g= t;ad=5Fcred.adc=5Fnamekind =3D ADN=5FNICKNAME;
- return (TRUE);
-= =7D
-
-/*
- * 4. Refresh
- */
-/*ARGSUSED*/
-stat= ic bool=5Ft
-authdes=5Frefresh(AUTH *auth, void *dummy =5F=5Funused) =
-=7B
-/* LINTED pointer alignment */
- struct ad=5Fprivate *a= d =3D AUTH=5FPRIVATE(auth);
- struct authdes=5Fcred *cred =3D &ad= ->ad=5Fcred;
- int ok;
- netobj pkey;
-
- if (ad->a= d=5Fdosync) =7B
- ok =3D =5F=5Frpc=5Fget=5Ftime=5Foffset(&ad->= ad=5Ftimediff, ad->ad=5Fnis=5Fsrvr,
- ad->ad=5Ftimehost, &(= ad->ad=5Fuaddr),
- &(ad->ad=5Fnetid));
- if (=21 ok) =7B=
- /*
- * Hope the clocks are synced=21
- */
- ad->ad=5F= dosync =3D 0;
- syslog(LOG=5FDEBUG,
- =22authdes=5Frefresh: unabl= e to synchronize clock=22);
- =7D
- =7D
- ad->ad=5Fxkey =3D= auth->ah=5Fkey;
- pkey.n=5Fbytes =3D (char *)(ad->ad=5Fpkey); =
- pkey.n=5Flen =3D (u=5Fint)strlen((char *)ad->ad=5Fpkey) + 1; - if (key=5Fencryptsession=5Fpk(ad->ad=5Fservername, &pkey, &= ad->ad=5Fxkey) < 0) =7B
- syslog(LOG=5FIN=46O,
- =22authdes= =5Frefresh: keyserv(1m) is unable to encrypt session key=22);
- retur= n (=46ALSE);
- =7D
- cred->adc=5Ffullname.key =3D ad->ad=5F= xkey;
- cred->adc=5Fnamekind =3D ADN=5F=46ULLNAME;
- cred->= adc=5Ffullname.name =3D ad->ad=5Ffullname;
- return (TRUE);
-=7D=
-
-
-/*
- * 5. Destroy
- */
-static void
-au= thdes=5Fdestroy(AUTH *auth)
-=7B
-/* LINTED pointer alignment */ =
- struct ad=5Fprivate *ad =3D AUTH=5FPRIVATE(auth);
-
- =46RE= E(ad->ad=5Ffullname, ad->ad=5Ffullnamelen + 1);
- =46REE(ad->= ;ad=5Fservername, ad->ad=5Fservernamelen + 1);
- if (ad->ad=5Ft= imehost)
- =46REE(ad->ad=5Ftimehost, strlen(ad->ad=5Ftimehost) = + 1);
- if (ad->ad=5Fnetid)
- =46REE(ad->ad=5Fnetid, strlen= (ad->ad=5Fnetid) + 1);
- if (ad->ad=5Fuaddr)
- =46REE(ad-&g= t;ad=5Fuaddr, strlen(ad->ad=5Fuaddr) + 1);
- =46REE(ad, sizeof (st= ruct ad=5Fprivate));
- =46REE(auth, sizeof(AUTH));
-=7D
- -static struct auth=5Fops *
-authdes=5Fops(void)
-=7B
- stat= ic struct auth=5Fops ops;
-
- /* VARIABLES PROTECTED BY ops=5Floc= k: ops */
-
- mutex=5Flock(&authdes=5Fops=5Flock);
- if (= ops.ah=5Fnextverf =3D=3D NULL) =7B
- ops.ah=5Fnextverf =3D authdes=5F= nextverf;
- ops.ah=5Fmarshal =3D authdes=5Fmarshal;
- ops.ah=5Fva= lidate =3D authdes=5Fvalidate;
- ops.ah=5Frefresh =3D authdes=5Frefre= sh;
- ops.ah=5Fdestroy =3D authdes=5Fdestroy;
- =7D
- mutex=5F= unlock(&authdes=5Fops=5Flock);
- return (&ops);
+ return = (NULL);
=7D
+=5F=5Fsym=5Fcompat(authdes=5Fpk=5Fseccreate, =5F=5F= authdes=5Fpk=5Fseccreate, =46BSD=5F1.0);
diff --git a/lib/libc/rpc/au= thdes=5Fprot.c b/lib/libc/rpc/authdes=5Fprot.c
index 79a0e5baa084..56= b44daafe41 100644
--- a/lib/libc/rpc/authdes=5Fprot.c
+++ b/lib/l= ibc/rpc/authdes=5Fprot.c
=40=40 -42,44 +42,16 =40=40
=23include = <rpc/auth=5Fdes.h>
=23include =22un-namespace.h=22

-=23= define ATTEMPT(xdr=5Fop) if (=21(xdr=5Fop)) return (=46ALSE)
-
-b= ool=5Ft
-xdr=5Fauthdes=5Fcred(XDR *xdrs, struct authdes=5Fcred *cred)=
+static bool=5Ft
+=5F=5Fxdr=5Fauthdes=5Fcred(XDR *xdrs, void *cr= ed)
=7B
- enum authdes=5Fnamekind *padc=5Fnamekind =3D &cred= ->adc=5Fnamekind;
- /*
- * Unrolled xdr
- */
- ATTEMPT= (xdr=5Fenum(xdrs, (enum=5Ft *) padc=5Fnamekind));
- switch (cred->= adc=5Fnamekind) =7B
- case ADN=5F=46ULLNAME:
- ATTEMPT(xdr=5Fstri= ng(xdrs, &cred->adc=5Ffullname.name,
- MAXNETNAMELEN));
- = ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&cred->adc=5Ffullname.key, <= br>- sizeof(des=5Fblock)));
- ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&= amp;cred->adc=5Ffullname.window,
- sizeof(cred->adc=5Ffullname.= window)));
- return (TRUE);
- case ADN=5FNICKNAME:
- ATTEMPT(= xdr=5Fopaque(xdrs, (caddr=5Ft)&cred->adc=5Fnickname,
- sizeof(= cred->adc=5Fnickname)));
- return (TRUE);
- default:
- ret= urn (=46ALSE);
- =7D
+ return (=46ALSE);
=7D
+=5F=5Fsym=5F= compat(xdr=5Fauthdes=5Fcred, =5F=5Fxdr=5Fauthdes=5Fcred, =46BSD=5F1.0); <= br>
-
-bool=5Ft
-xdr=5Fauthdes=5Fverf(XDR *xdrs, struct authd= es=5Fverf *verf)
+static bool=5Ft
+=5F=5Fxdr=5Fauthdes=5Fverf(XDR= *xdrs, void *verf)
=7B
- /*
- * Unrolled xdr
- */
-= ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&verf->adv=5Fxtimestamp, - sizeof(des=5Fblock)));
- ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&a= mp;verf->adv=5Fint=5Fu,
- sizeof(verf->adv=5Fint=5Fu)));
- = return (TRUE);
+ return (=46ALSE);
=7D
+=5F=5Fsym=5Fcompat(x= dr=5Fauthdes=5Fverf, =5F=5Fxdr=5Fauthdes=5Fverf, =46BSD=5F1.0);
diff = --git a/lib/libc/rpc/key=5Fcall.c b/lib/libc/rpc/key=5Fcall.c
index 5= c87881c815c..eb274fcfff36 100644
--- a/lib/libc/rpc/key=5Fcall.c
= +++ b/lib/libc/rpc/key=5Fcall.c
=40=40 -32,426 +32,78 =40=40
*/ =

/*
- * key=5Fcall.c, Interface to keyserver
- *
- *= setsecretkey(key) - set your secret key
- * encryptsessionkey(agent,= deskey) - encrypt a session key to talk to agent
- * decryptsessionk= ey(agent, deskey) - decrypt ditto
- * gendeskey(deskey) - generate a = secure des key
+ * Secure RPC keyserver support was removed in =46ree= BSD 15.0.
+ * These symbols are provided for backward compatibility, = but provide no
+ * functionality and will always return an error. */

=23include =22namespace.h=22
=23include =22reentrant.= h=22
-=23include <stdio.h>
-=23include <stdlib.h> -=23include <unistd.h>
-=23include <errno.h>
=23inc= lude <rpc/rpc.h>
-=23include <rpc/auth.h>
-=23include= <rpc/auth=5Funix.h>
=23include <rpc/key=5Fprot.h>
-= =23include <string.h>
-=23include <netconfig.h>
-=23i= nclude <sys/utsname.h>
-=23include <stdlib.h>
-=23inc= lude <signal.h>
-=23include <sys/wait.h>
-=23include = <sys/fcntl.h>
+=23include <rpc/auth.h>
=23include =22= un-namespace.h=22
=23include =22mt=5Fmisc.h=22

-
-=23de= fine KEY=5FTIMEOUT 5 /* per-try timeout in seconds */
-=23define KEY=5F= NRETRY 12 /* number of retries */
-
-=23ifdef DEBUG
-=23defin= e debug(msg) (void) fprintf(stderr, =22%s=5Cn=22, msg);
-=23else
= -=23define debug(msg)
-=23endif /* DEBUG */
-
-/*
- * Hac= k to allow the keyserver to use AUTH=5FDES (for authenticated
- * NIS= + calls, for example). The only functions that get called
- * are key= =5Fencryptsession=5Fpk, key=5Fdecryptsession=5Fpk, and key=5Fgendes.
= - *
- * The approach is to have the keyserver fill in pointers to loc= al
- * implementations of these functions, and to call those in key=5F= call().
- */
-
-cryptkeyres *(*=5F=5Fkey=5Fencryptsession=5Fp= k=5FLOCAL)(uid=5Ft, void *arg) =3D 0;
-cryptkeyres *(*=5F=5Fkey=5Fdec= ryptsession=5Fpk=5FLOCAL)(uid=5Ft, void *arg) =3D 0;
-des=5Fblock *(*= =5F=5Fkey=5Fgendes=5FLOCAL)(uid=5Ft, void *) =3D 0;
-
-static int= key=5Fcall( u=5Flong, xdrproc=5Ft, void *, xdrproc=5Ft, void *);
- <= br>-int
-key=5Fsetsecret(const char *secretkey)
-=7B
- keysta= tus status;
-
- if (=21key=5Fcall((u=5Flong) KEY=5FSET, (xdrproc=5F= t)xdr=5Fkeybuf,
- (void *)secretkey,
- (xdrproc=5Ft)xdr=5Fkeystat= us, &status)) =7B
- return (-1);
- =7D
- if (status =21=3D= KEY=5FSUCCESS) =7B
- debug(=22set status is nonzero=22);
- retur= n (-1);
- =7D
- return (0);
-=7D
-
-
-/* key=5Fse= cretkey=5Fis=5Fset() returns 1 if the keyserver has a secret key
- * = stored for the caller's effective uid; it returns 0 otherwise
- * - * N.B.: The KEY=5FNET=5FGET key call is undocumented. Applications sho= uldn't
- * be using it, because it allows them to get the user's secr= et key.
- */
-
-int
-key=5Fsecretkey=5Fis=5Fset(void) -=7B
- struct key=5Fnetstres kres;
-
- memset((void*)&kr= es, 0, sizeof (kres));
- if (key=5Fcall((u=5Flong) KEY=5FNET=5FGET, (= xdrproc=5Ft)xdr=5Fvoid, NULL,
- (xdrproc=5Ft)xdr=5Fkey=5Fnetstres, &a= mp;kres) &&
- (kres.status =3D=3D KEY=5FSUCCESS) && <= br>- (kres.key=5Fnetstres=5Fu.knet.st=5Fpriv=5Fkey=5B0=5D =21=3D 0)) =7B =
- /* avoid leaving secret key in memory */
- memset(kres.key=5Fne= tstres=5Fu.knet.st=5Fpriv=5Fkey, 0, HEXKEYBYTES);
- return (1);
-= =7D
- return (0);
-=7D
-
-int
-key=5Fencryptsession=5F= pk(char *remotename, netobj *remotekey, des=5Fblock *deskey)
-=7B - cryptkeyarg2 arg;
- cryptkeyres res;
-
- arg.remotename =3D= remotename;
- arg.remotekey =3D *remotekey;
- arg.deskey =3D *de= skey;
- if (=21key=5Fcall((u=5Flong)KEY=5FENCRYPT=5FPK, (xdrproc=5Ft)= xdr=5Fcryptkeyarg2, &arg,
- (xdrproc=5Ft)xdr=5Fcryptkeyres, &= res)) =7B
- return (-1);
- =7D
- if (res.status =21=3D KEY=5F= SUCCESS) =7B
- debug(=22encrypt status is nonzero=22);
- return (= -1);
- =7D
- *deskey =3D res.cryptkeyres=5Fu.deskey;
- return= (0);
-=7D
-
-int
-key=5Fdecryptsession=5Fpk(char *remote= name, netobj *remotekey, des=5Fblock *deskey)
-=7B
- cryptkeyarg2= arg;
- cryptkeyres res;
-
- arg.remotename =3D remotename; <= br>- arg.remotekey =3D *remotekey;
- arg.deskey =3D *deskey;
- if= (=21key=5Fcall((u=5Flong)KEY=5FDECRYPT=5FPK, (xdrproc=5Ft)xdr=5Fcryptkey= arg2, &arg,
- (xdrproc=5Ft)xdr=5Fcryptkeyres, &res)) =7B
= - return (-1);
- =7D
- if (res.status =21=3D KEY=5FSUCCESS) =7B <= br>- debug(=22decrypt status is nonzero=22);
- return (-1);
- =7D=
- *deskey =3D res.cryptkeyres=5Fu.deskey;
- return (0);
-=7D=
-
-int
-key=5Fencryptsession(const char *remotename, des=5Fb= lock *deskey)
+static int
+=5F=5Fkey=5Fsetsecret(const char *secr= etkey)
=7B
- cryptkeyarg arg;
- cryptkeyres res;
-
-= arg.remotename =3D (char *) remotename;
- arg.deskey =3D *deskey; - if (=21key=5Fcall((u=5Flong)KEY=5FENCRYPT, (xdrproc=5Ft)xdr=5Fcryptke= yarg, &arg,
- (xdrproc=5Ft)xdr=5Fcryptkeyres, &res)) =7B
= - return (-1);
- =7D
- if (res.status =21=3D KEY=5FSUCCESS) =7B <= br>- debug(=22encrypt status is nonzero=22);
- return (-1);
- =7D=
- *deskey =3D res.cryptkeyres=5Fu.deskey;
- return (0);
+ re= turn (-1);
=7D
+=5F=5Fsym=5Fcompat(key=5Fsetsecret, =5F=5Fkey=5F= setsecret, =46BSD=5F1.0);

-int
-key=5Fdecryptsession(const c= har *remotename, des=5Fblock *deskey)
+static int
+=5F=5Fkey=5Fse= cretkey=5Fis=5Fset(void)
=7B
- cryptkeyarg arg;
- cryptkeyre= s res;
-
- arg.remotename =3D (char *) remotename;
- arg.desk= ey =3D *deskey;
- if (=21key=5Fcall((u=5Flong)KEY=5FDECRYPT, (xdrproc= =5Ft)xdr=5Fcryptkeyarg, &arg,
- (xdrproc=5Ft)xdr=5Fcryptkeyres, &= amp;res)) =7B
- return (-1);
- =7D
- if (res.status =21=3D KE= Y=5FSUCCESS) =7B
- debug(=22decrypt status is nonzero=22);
- retu= rn (-1);
- =7D
- *deskey =3D res.cryptkeyres=5Fu.deskey;
ret= urn (0);
=7D
+=5F=5Fsym=5Fcompat(key=5Fsecretkey=5Fis=5Fset, =5F= =5Fkey=5Fsecretkey=5Fis=5Fset, =46BSD=5F1.0);

-int
-key=5Fge= ndes(des=5Fblock *key)
+static int
+=5F=5Fkey=5Fencryptsession=5F= pk(char *remotename, netobj *remotekey, des=5Fblock *deskey)
=7B - if (=21key=5Fcall((u=5Flong)KEY=5FGEN, (xdrproc=5Ft)xdr=5Fvoid, NULL, =
- (xdrproc=5Ft)xdr=5Fdes=5Fblock, key)) =7B
- return (-1);
- = =7D
- return (0);
+ return (-1);
=7D
+=5F=5Fsym=5Fcompat= (key=5Fencryptsession=5Fpk, =5F=5Fkey=5Fencryptsession=5Fpk, =46BSD=5F1.0= );

-int
-key=5Fsetnet(struct key=5Fnetstarg *arg)
+stati= c int
+=5F=5Fkey=5Fdecryptsession=5Fpk(char *remotename, netobj *remo= tekey, des=5Fblock *deskey)
=7B
*** 2726 LINES SKIPPED ***
=
--689b1a61_60709938_50e-- From nobody Tue Aug 12 12:26:26 2025 X-Original-To: dev-commits-src-main@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 4c1W2W11ZPz64fwq; Tue, 12 Aug 2025 12:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1W2V6vP8z3DFM; Tue, 12 Aug 2025 12:26:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755001587; 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=4PhTLTpnl+MhabrL1CPQqKsc+YyFy9gE1eVEfRWILPg=; b=Lr1pG5WN7JO5USmRu3h97WiN+DPy6GDK2ZZhTs8cBUrj1I264iTcdMt4Sz+syuyUyjKO77 A8TG2gaOgE4lXvmCE8YFYz/FbnGqm9m4z5dLrNiT+BocQ/fGskOkdEbQyG5cMRN7fiBxlT +bUbeyTuTq2LusiBM4M70dd9yVwoGwtfBxPvjrkM287omMUGooZ3MxAt9vUMEL//JG0rxu 65wUsexUdd/wtHtzyUQoIgz/V82LpFBrmgqs7/X/Y4f9wPX0saOars205nUOK8n1WhjygB FGSdNyYkrJgKyRqQLM/JUokiVwmrdGOW93KHeo1ssP8F1mN07a991c98L5h6GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755001587; 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=4PhTLTpnl+MhabrL1CPQqKsc+YyFy9gE1eVEfRWILPg=; b=AhFxYQPwfbXHNpNGB/SPMu7hFsXTrrE7adCwGKg+GwPNdk0dZn76b1puZEEeTlHuF1qWR7 pz61fL5kB0zQ92z7rTHHnjdch6vQbG76qCqOFjbtKIGdXa5LMUOkctNqpZQZE7al2FabIl 8OZdkAjVQ3NkeEX1H16ZbhgM5KzgJEUfel/X/WH4kCCjbhlxxKbaEHAa5GcZ6oFWcsIWZW t48W//o3YA1WTNtjA3lGCDtMGW5uzlPcVD21y1Fdck0RA8q48mA3MLJiyn6LgUtC0c9l1c xwCI4fMUu4l37IbXfOfdQBxMcs+T2d+BX7m3mnOgTSu2iAtJaGQlWn+KJuMOEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755001587; a=rsa-sha256; cv=none; b=TNlyqtZq5NfkB5QjJHwstu1G0wJjiWIlb0aUsJ+jb4iDb+rx7Jn9H0gFBVdNnR/vitWhYa x6X3sc6SG56zEJxjPcDSrrAwSMKdLPY1kx43w5/zarXhvuAbP3OomrtfITvtpZQgflsgu+ 682eiX9mrjui8XGhZmpyUtxttQRu3KaNa2xJrRjJLaRSgJ46oiP8sO7eWd6sV2Ldjigawo WPfjdHOL3kbkIdZ0aEdb7I7GSl8TCDCmrvnpTkrwOQXmXqbZSKL820SShKXqzbefN7AaQu GWCTN6F5NTDZn61tllj/JED5WhEJvh+V/RVmKFMp/8Gmunv6epOXm1Zhk4HQaQ== 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 4c1W2V6M7lzdk3; Tue, 12 Aug 2025 12:26: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 57CCQQt8032031; Tue, 12 Aug 2025 12:26:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CCQQPN032028; Tue, 12 Aug 2025 12:26:26 GMT (envelope-from git) Date: Tue, 12 Aug 2025 12:26:26 GMT Message-Id: <202508121226.57CCQQPN032028@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: 0312f80349ee - main - udp: use appropriate error counters List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 0312f80349eedfc2b0d2f24b4fd073795148d3d5 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=0312f80349eedfc2b0d2f24b4fd073795148d3d5 commit 0312f80349eedfc2b0d2f24b4fd073795148d3d5 Author: Michael Tuexen AuthorDate: 2025-08-12 12:24:20 +0000 Commit: Michael Tuexen CommitDate: 2025-08-12 12:24:20 +0000 udp: use appropriate error counters Since there are multicast and broadcast specific error counters, use them. Reviewed by: rrs MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D51869 --- sys/netinet/udp_usrreq.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index df8f293f9426..2f2f9abf1c83 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -654,7 +654,11 @@ udp_input(struct mbuf **mp, int *offp, int proto) else UDP_PROBE(receive, NULL, NULL, ip, NULL, uh); UDPSTAT_INC(udps_noport); - if (m->m_flags & (M_BCAST | M_MCAST)) { + if (m->m_flags & M_MCAST) { + UDPSTAT_INC(udps_noportmcast); + goto badunlocked; + } + if (m->m_flags & M_BCAST) { UDPSTAT_INC(udps_noportbcast); goto badunlocked; } From nobody Tue Aug 12 12:30:56 2025 X-Original-To: dev-commits-src-main@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 4c1W7h2w4Bz64gGm; Tue, 12 Aug 2025 12:30: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1W7h2GvQz3Dbh; Tue, 12 Aug 2025 12:30:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755001856; 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=20kiX1VT3nNhKejcrxPzBkJPYRaQRJ1dlG8cQH1kTqs=; b=MI+2m1pFiPfwRNRWI91/g1azeBekYYvnTSrQN7vMKwnfcvca9VkG0OSXqFBGoKWn3wOhEJ T0cqhHoWzg6dYxYIp8hsyZ6cVtwEB4nBxvZAHpTRa+wdUf/0L29V8JlHk7K4mh97teMvYx a43ILlvlt+gs5IXtu6iTihlviXdFTyxyfZNINFUkptobQpn9R7lmisjtxYA1TGBB6HpCbf hojUIS5Od6oKGeQ109uxl5sog/UcVW+elrA12Q2W84xLUXmqFF9GJoNcov9MBwXNSK6pnR 8nmBUAcf5jRNyqIlvb+KuxByC43ycxgyyfkz7OZqUNDQoDiDKpvmMiNHu9MBtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755001856; 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=20kiX1VT3nNhKejcrxPzBkJPYRaQRJ1dlG8cQH1kTqs=; b=Xo35UrVWRVI3eW6swZJGAUYFrAMM3e95JcxVOIWSe+XN5FzjFG9RvYz+m53FDJxNIhIoq4 G9BOI1u/nhR6otcxSddWNHgNZuBjNO1bP4MsoULOPYL0CA0tyKxRRr65Mqm2EYYbg22L1y pqaoZJTuHaNCc++XNPEYuC4MV+zLNCGezggw4HweUCyNU27ihYqcUYuit24R04P6etARmR Zy7FlomWe6M5352OsN25i2YR4LlItLw/yjLeUnjnbFFF+JFrkJp7f+m1Jf98Fk5aDrdBNz ElbrQ6NUCKv2zx0vyeuTvfZDHV2A07CkwlrWwKYR0onXu7wb+Rv1v72KKUvutA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755001856; a=rsa-sha256; cv=none; b=mC+g6O0ZCRJheQVJvGykN4MvPiPNal25uEf+9WlkIxWrjxwNHWRGu1aMN8effsMcUCLWiw PgqBbOUE68ZR9Jydb8iq1up5vJBeJ02nYkWAmMJZ9iJ0joGvmM94wF3uaMg+GH3I+l38ul qLrpZ8+/aBLVFiZSfCezrOH5XhARSC2zHnVlDdjRaeV9f+0UmW/Xu9LfqXyGCU48jfW/mz ikQ8jxsfpYAUV01DtbuqWWyb5pwf/Z+ybhkQ0cCNeqlTD+VvHFcyMER0zRQ43/GeGp/R9f k8rfyGJ62BPTz1lAL8sGxZX3wAEbZD1WW1Ofc/1ZkD1CkMCKyl9YClvknl/tJw== 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 4c1W7h1szzzdmY; Tue, 12 Aug 2025 12:30: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 57CCUudR045786; Tue, 12 Aug 2025 12:30:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CCUuHn045783; Tue, 12 Aug 2025 12:30:56 GMT (envelope-from git) Date: Tue, 12 Aug 2025 12:30:56 GMT Message-Id: <202508121230.57CCUuHn045783@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: babab49eee94 - main - chroot: don't setgroups() without -G having been specified List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: babab49eee9472f628d774996de13d13d296c8c0 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=babab49eee9472f628d774996de13d13d296c8c0 commit babab49eee9472f628d774996de13d13d296c8c0 Author: Kyle Evans AuthorDate: 2025-08-12 12:14:38 +0000 Commit: Kyle Evans CommitDate: 2025-08-12 12:30:23 +0000 chroot: don't setgroups() without -G having been specified We previously would not have setgroups() at all, but now we would drop our supplementary groups every time. This broke chroot -n, probably among other things. We need tests here, but lets unbreak things first. A future change may try to setgroups(2) when -u is specified in addition to -G, so predicate the call on gidlist and don't populate that without a grouplist. PR: 288751 Fixes: 48fd05999b0f ("chroot: don't clobber the egid [...]") --- usr.sbin/chroot/chroot.c | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/usr.sbin/chroot/chroot.c b/usr.sbin/chroot/chroot.c index d9fb29474d87..7ec5a00b50f0 100644 --- a/usr.sbin/chroot/chroot.c +++ b/usr.sbin/chroot/chroot.c @@ -103,7 +103,9 @@ main(int argc, char *argv[]) gid = 0; uid = 0; + gids = 0; user = group = grouplist = NULL; + gidlist = NULL; nonprivileged = false; while ((ch = getopt(argc, argv, "G:g:u:n")) != -1) { switch(ch) { @@ -119,6 +121,11 @@ main(int argc, char *argv[]) break; case 'G': grouplist = optarg; + + /* + * XXX Why not allow us to drop all of our supplementary + * groups? + */ if (*grouplist == '\0') usage(); break; @@ -139,23 +146,25 @@ main(int argc, char *argv[]) if (group != NULL) gid = resolve_group(group); - ngroups_max = sysconf(_SC_NGROUPS_MAX) + 1; - if ((gidlist = malloc(sizeof(gid_t) * ngroups_max)) == NULL) - err(1, "malloc"); - /* Populate the egid slot in our groups to avoid accidents. */ - if (gid == 0) - gidlist[0] = getegid(); - else - gidlist[0] = gid; - for (gids = 1; - (p = strsep(&grouplist, ",")) != NULL && gids < ngroups_max; ) { - if (*p == '\0') - continue; - - gidlist[gids++] = resolve_group(p); + if (grouplist != NULL) { + ngroups_max = sysconf(_SC_NGROUPS_MAX) + 1; + if ((gidlist = malloc(sizeof(gid_t) * ngroups_max)) == NULL) + err(1, "malloc"); + /* Populate the egid slot in our groups to avoid accidents. */ + if (gid == 0) + gidlist[0] = getegid(); + else + gidlist[0] = gid; + for (gids = 1; (p = strsep(&grouplist, ",")) != NULL && + gids < ngroups_max; ) { + if (*p == '\0') + continue; + + gidlist[gids++] = resolve_group(p); + } + if (p != NULL && gids == ngroups_max) + errx(1, "too many supplementary groups provided"); } - if (p != NULL && gids == ngroups_max) - errx(1, "too many supplementary groups provided"); if (user != NULL) uid = resolve_user(user); @@ -175,7 +184,7 @@ main(int argc, char *argv[]) err(1, "%s", argv[0]); } - if (gids && setgroups(gids, gidlist) == -1) + if (gidlist != NULL && setgroups(gids, gidlist) == -1) err(1, "setgroups"); if (group && setgid(gid) == -1) err(1, "setgid"); From nobody Tue Aug 12 12:51:20 2025 X-Original-To: dev-commits-src-main@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 4c1WbD6KKwz64j19; Tue, 12 Aug 2025 12:51: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1WbD5bPnz3HHN; Tue, 12 Aug 2025 12:51:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755003080; 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=2RFH1P5A0MHjpx3WtPEdC8dl5KNzgmm58z2o2QLD1CE=; b=OoQEYMGBqIU7V7xUgmaf/lOEHiXZuoW00GoARhojJA2FsPN47faPXsRBDdJgGcL5qha6Jn G9MgBT/9VwLynZFNYER51KtbNMMZxV5nrMkkF4j2PXAjcnUkFnwLcR+O4DzMz9DFRM/eTg 4SsoNbRBt15Zd0xEWENKzfx7vy8fUfCOFU4B/v7GpHGEisK99z7PlZgxmQXrXlpAvGvMNA 8uKbZNLRPmUNovxXRZwXuM6h832cI06nkhoxTGuFwqW+OCz27rRYtPxC0otfL7RZEWrCJi gYSkur40Vt0wVh+Y+wPmbCdGvVyInQwtxj+25jskFkYf4ll1/Hvc7A4edcCtgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755003080; 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=2RFH1P5A0MHjpx3WtPEdC8dl5KNzgmm58z2o2QLD1CE=; b=CR3QLZfBYkgQlG/HKRsgKr6II/Jy93PoqUXOYhp1Qiasxsm1pXXi32a9sm338ke0bPTgRt I2fun0mxiPcrBMFNPhjIoYyQcPcbAvTuVYYnUoD05IYZzxqTf7upOrXFAWk6WOX8UO6euG LSA9qz6j7agTTALxzrNHClRxtUn5TllA8N9+EO20/xmfLRDu5EaZzTmlmt8A8fC1/sBN4h mDmrCLqW5lVGOPl1++31HDdsAQg+RBUZBnqK7yKfRdwCerlYZx1d0mg4igUgNuI6w9dbtC Ub51WuPiAv5rgPhBVWl978wP9HJNIG5zh8Z1WjyRA2rWOqt/5kIBa1jFdA1/yQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755003080; a=rsa-sha256; cv=none; b=BS4jlK7DYBaiVCNIq1Aiy98o1VLMYvLtQty13PfeAIlxTE1vPt/MJM3yrViQ84bcQW87Dg UoRnB+AD/bGaHcoWeZsvKD+nuVkYnqVDaqvFXhrrZLDKEV9dX0gbXt5wwvl3w09CEkCuLd Dv6m1/JcszMqeuJjTqAWl4uRIDrOuJHEFVsBsLRZYVLdQPqdhA9ZvJv1Mf9INM9AuGkm8n rf12H4SdFmZudTgfU2Y+wKmUKjtMfXsPoE08OUpkr5pcaSHF6huhNou2FjHigPuGwpsXv+ 8xLd8pUvFSMlwGsVH4i01n5wGty4SdWb4yLgcWu1zofoxYG9VDdEFSz++XK6Dw== 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 4c1WbD59MSzfVS; Tue, 12 Aug 2025 12:51: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 57CCpKG3081971; Tue, 12 Aug 2025 12:51:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CCpKbq081967; Tue, 12 Aug 2025 12:51:20 GMT (envelope-from git) Date: Tue, 12 Aug 2025 12:51:20 GMT Message-Id: <202508121251.57CCpKbq081967@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: 6e07231667e6 - main - tcp: minor cleanup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 6e07231667e639bd825e6cdb67609a39e3098e9d Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=6e07231667e639bd825e6cdb67609a39e3098e9d commit 6e07231667e639bd825e6cdb67609a39e3098e9d Author: Michael Tuexen AuthorDate: 2025-08-12 12:48:27 +0000 Commit: Michael Tuexen CommitDate: 2025-08-12 12:51:07 +0000 tcp: minor cleanup Don't use the rstreason variable as a hint that a second lookup is performed, since the rstreason variable will be removed. Use the INPLOOKUP_WILDCARD flag in the lookupflag variable instead. No functional change intended. Reviewed by: rrs MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D51847 --- sys/netinet/tcp_input.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index d392cbe09950..ddd0dbeafd06 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -905,23 +905,23 @@ findpcb: * XXX MRT Send RST using which routing table? */ if (inp == NULL) { - if (rstreason != 0) { + if ((lookupflag & INPLOOKUP_WILDCARD) == 0) { /* We came here after second (safety) lookup. */ - MPASS((lookupflag & INPLOOKUP_WILDCARD) == 0); - goto dropwithreset; - } - /* - * Log communication attempts to ports that are not - * in use. - */ - if ((V_tcp_log_in_vain == 1 && (thflags & TH_SYN)) || - V_tcp_log_in_vain == 2) { - if ((s = tcp_log_vain(NULL, th, (void *)ip, ip6))) + MPASS(!closed_port); + } else { + /* + * Log communication attempts to ports that are not + * in use. + */ + if (((V_tcp_log_in_vain == 1 && (thflags & TH_SYN)) || + V_tcp_log_in_vain == 2) && + (s = tcp_log_vain(NULL, th, (void *)ip, ip6))) { log(LOG_INFO, "%s; %s: Connection attempt " "to closed port\n", s, __func__); + } + closed_port = true; } rstreason = BANDLIM_TCP_RST; - closed_port = true; goto dropwithreset; } INP_LOCK_ASSERT(inp); @@ -1102,7 +1102,8 @@ findpcb: * don't want to sent RST for the second ACK, * so we perform second lookup without wildcard * match, hoping to find the new socket. If - * the ACK is stray indeed, rstreason would + * the ACK is stray indeed, the missing + * INPLOOKUP_WILDCARD flag in lookupflag would * hint the above code that the lookup was a * second attempt. * @@ -1110,7 +1111,6 @@ findpcb: * of the failure cause. */ INP_WUNLOCK(inp); - rstreason = BANDLIM_TCP_RST; lookupflag &= ~INPLOOKUP_WILDCARD; goto findpcb; } From nobody Tue Aug 12 12:55:24 2025 X-Original-To: dev-commits-src-main@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 4c1Wgw5MwJz64jX5; Tue, 12 Aug 2025 12:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1Wgw3NNPz3JP6; Tue, 12 Aug 2025 12:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755003324; 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=lKqWrGbz5H/1mtVGGlkG0CXrQr0cpmpMncYGvrB2Cq4=; b=nUgbxFnf50UaTY7nHvaDB/1okBbvkvZY/oJBMv5gRp/xVWfUHRjsAaZcNibJiZj29xrzXg 7RDJHAeWSgPUSNHdkQtRLYyvIrjP3MfmhaPRsR6eW9AeCPs+id5yirADdNXpWHxvq+LuDP NjCHpUXmiJQa84eXlmZpurq6Kso2wjRecfizPhg0UyLPTl3FiNNuUyBZORzfBWNrljhZaU Lzmx5UYYwzwQKk8kVKq3PctmqaN+WaM/M4fopL/MpgJNojOSacgwZmbvO3rmU00vQsKHwm YyHmZn5tEaYHXbD995o8WSrdBII58iIYM/3AKhUIoL7CFCqP/ZzGtqb4EpM49g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755003324; 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=lKqWrGbz5H/1mtVGGlkG0CXrQr0cpmpMncYGvrB2Cq4=; b=Duz9BOyjzmd+AD+CH3olUSPauTW8E7eV8+x+PesMpWXo/2b1v+vdZBwER/8GaZ0zAnIhaH fSHK+0zbOtuYVg+o6iUa6s/LvmoBhE4NwHOBA/WGC0L3SzU451JprofX3AdoJ+xULGoRXf HjpLkWaBq1EEojHdTW+C+tSSsD6d7u5SxOdMvTx6cdNQYp1v2exrkdlz0RTuFQTdnJPbT8 veUxjGu1DXhvIB3kR7juwBPWSEvmtpZVftGGdf89Kf5nzFXFW8ywS3Ha4cvhn7zZz5QO7+ utNa7M0Fs21gEWRchGM+SG0nXOfNU68m/Q76QtqVULxlyHOFKEco6u0n8BeCMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755003324; a=rsa-sha256; cv=none; b=gQlxo6efM4UybLRk2YDEvFmRKBM9Al7fKvIoNVyhWC14pMAoLI6XGR5PRVryK4OQyKaERq jAmVH7nqz8XUQG+qNRgi+XiZ2NnsBTQ0aHPnADORgYkXe41DS6IHl7286YYp3O4i52XWN/ Q6v0pQIsQeYN/woe8TQ1UzpPJWNv2HZtgl3WV2XpZ7JH3I9pEz8AhtwdtrnFhJ2ACYN2Qa fJ3RDordKZkqzKBjRIhlhLg1WSkS+0WQS7SR3UR/EpVv3ax7fwt6cBgEBj0KjuVXKvhgS5 XqNllWga/T6NCKv9aH+HZVu1Hgxcy+/7Tat4L04TpYiL7k8UKuKzJaEOuG/Nqw== 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 4c1Wgw2RXpzfyp; Tue, 12 Aug 2025 12:55: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 57CCtOxH087923; Tue, 12 Aug 2025 12:55:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CCtOqb087920; Tue, 12 Aug 2025 12:55:24 GMT (envelope-from git) Date: Tue, 12 Aug 2025 12:55:24 GMT Message-Id: <202508121255.57CCtOqb087920@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 7400d04407c0 - main - libutil: Remove manual link for nonexistent function List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7400d04407c033341ddc0b323b5ae7cd1cca358f Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=7400d04407c033341ddc0b323b5ae7cd1cca358f commit 7400d04407c033341ddc0b323b5ae7cd1cca358f Author: Dag-Erling Smørgrav AuthorDate: 2025-08-12 12:53:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-12 12:55:01 +0000 libutil: Remove manual link for nonexistent function I believe quota_statfs() was the original name of the function now called quota_check_path(). I must have forgotten to update the MLINK when I renamed it. MFC after: 1 week Fixes: 5666aadb3ddf ("Further extend the quotafile API.") Fixes: 22afc767869a ("libutil: Add missing MLINKs") Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D51863 --- lib/libutil/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile index f8c566ca731a..f6251c093345 100644 --- a/lib/libutil/Makefile +++ b/lib/libutil/Makefile @@ -136,7 +136,6 @@ MLINKS+=quotafile.3 quota_on.3 MLINKS+=quotafile.3 quota_open.3 MLINKS+=quotafile.3 quota_qfname.3 MLINKS+=quotafile.3 quota_read.3 -MLINKS+=quotafile.3 quota_statfs.3 MLINKS+=quotafile.3 quota_write_limits.3 MLINKS+=quotafile.3 quota_write_usage.3 MAN+= realhostname.3 From nobody Tue Aug 12 12:55:25 2025 X-Original-To: dev-commits-src-main@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 4c1Wgx3wnfz64jQH; Tue, 12 Aug 2025 12:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1Wgx2wgGz3JcM; Tue, 12 Aug 2025 12:55:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755003325; 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=4n8mhyzMWyi3jRJsQKMaVM8kqRmswKGp1v7c+hgN1NQ=; b=sDEjb3vea1KG5MhyldpucGU1x7TnGp0rjkDIUp1PUTRuexwwoH2mNO+ROGNuXT9FvWL9/l rg1gcmIkj6hczwNYYt4FCS1S6Nz3gOh5Osy0KxvtA754W4Rhh0sgrSjlLpYCwztPTHv37K ahuGt8hmb+DPSi6pL1SsSQT37WOVWU+B8CK+r9OVNGNcNIHYgnaSz1PtRMfW2fSYHkTNHr YeE38CVPn8ghjmbxkdd+TGN55cUAwjo/aps60UQbXTAHqDXQYFEsHVq2rWzmIXQ/HVCq1F RTm0CpAP/SvFRt8dtKLD+AGbAQ3xs5FY92zY0z2uIABwFKg+lurjWGjeK/Z4zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755003325; 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=4n8mhyzMWyi3jRJsQKMaVM8kqRmswKGp1v7c+hgN1NQ=; b=nuQHTd1HHCYRluEAVmsih8BGceZzqu7po12+aFGQDFD/2U98/w34b+L8qNj1JLOK8/1a+S Z8lv/ucMLOj29cVAsxqLyf+ElUQYvE1eBdts3JAkZH+RTzDklogvSHMLkO2xJriV7gk4x/ khlV1lOscqgX90ajOZjp+GK68GDrolUVfbna9bI/vtzUEdtaShsxzATobIcltZvtQtVr75 d9IsFX0XLeRPHlefuu8oZBjgzHcyReCVmnfM7BiqlhLReZlbFxjkpEUJNtDSiIFQFAr0a+ sT6zm/j0D2Dd+TzHfZDzJQbE6qeCn/mRsCOReWAPHcd8S1b4foyQ7Zh1WXLPeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755003325; a=rsa-sha256; cv=none; b=fJHKTrA6pCg5L0rA3zodDtj69Wq4rCp60QMXoyu5dDYxA2uX2wdisDSwcwI4Gg1JEifb+5 Ce7rKuqwxYwexS1cfxkzFzKo+BvIURjCTqdBoGcSXe9VH0g3IBkwbcijZ7p9GiPjketwIp 3u1cG4f7xFKtRlJPyS1B5ORZFqtFS3rUj+oqRZIY9VEH0G1VE9/+3jRdD+JmiLf7/mndOC jqamMksKPe5zURXDiolDD0lkyT1mWl23lwUvcBhSPjUTl3teWZseOwxivpXnBwOcMhVyw9 ZuKWMba3JAi8S1+qhI27tiXcvGFw8lE0SHF7pXrEny9JoidoD1cyWgH2T8yY9w== 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 4c1Wgx2LKNzfyq; Tue, 12 Aug 2025 12:55: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 57CCtPXi087964; Tue, 12 Aug 2025 12:55:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CCtPRw087961; Tue, 12 Aug 2025 12:55:25 GMT (envelope-from git) Date: Tue, 12 Aug 2025 12:55:25 GMT Message-Id: <202508121255.57CCtPRw087961@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d0cc09fcdb4a - main - libutil: Fix manlint failures List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d0cc09fcdb4a3192fb76c95b1bd3c7f31a4cf486 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d0cc09fcdb4a3192fb76c95b1bd3c7f31a4cf486 commit d0cc09fcdb4a3192fb76c95b1bd3c7f31a4cf486 Author: Dag-Erling Smørgrav AuthorDate: 2025-08-12 12:54:02 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-12 12:55:01 +0000 libutil: Fix manlint failures MFC after: 1 week Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D51864 --- lib/libutil/login.conf.5 | 7 ++++--- lib/libutil/login_auth.3 | 4 ++-- lib/libutil/login_cap.3 | 1 + lib/libutil/mntopts.3 | 10 ++++++---- lib/libutil/uucplock.3 | 1 + 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lib/libutil/login.conf.5 b/lib/libutil/login.conf.5 index d43fdfb761f3..27f37fb5fc30 100644 --- a/lib/libutil/login.conf.5 +++ b/lib/libutil/login.conf.5 @@ -380,14 +380,15 @@ If is specified, then logins are only allowed during the periods given. If .Em times.deny -is specified, then logins are denied during the periods given, regardless of whether -one of the periods specified in +is specified, then logins are denied during the periods given, +regardless of whether one of the periods specified in .Em times.allow applies. .Pp Note that .Xr login 1 -enforces only that the actual login falls within periods allowed by these entries. +enforces only that the actual login falls within periods allowed by +these entries. Further enforcement over the life of a session requires a separate daemon to monitor transitions from an allowed period to a non-allowed one. .Pp diff --git a/lib/libutil/login_auth.3 b/lib/libutil/login_auth.3 index fafe43b906e6..dd5ba3e01265 100644 --- a/lib/libutil/login_auth.3 +++ b/lib/libutil/login_auth.3 @@ -58,8 +58,8 @@ .\" .Ft int .\" .Fn auth_timesok "login_cap_t *lc" "time_t now" .Sh DESCRIPTION -This set of functions support the login class authorisation style interface provided -by +This set of functions support the login class authorisation style +interface provided by .Xr login.conf 5 . .\" .Sh RETURN VALUES .Sh SEE ALSO diff --git a/lib/libutil/login_cap.3 b/lib/libutil/login_cap.3 index 86142c3b19f9..48af0e3c9c46 100644 --- a/lib/libutil/login_cap.3 +++ b/lib/libutil/login_cap.3 @@ -31,6 +31,7 @@ .Nm login_getcaptime , .Nm login_getclass , .Nm login_getclassbyname , +.Nm login_getpath , .Nm login_getpwclass , .Nm login_getstyle , .Nm login_getuserclass , diff --git a/lib/libutil/mntopts.3 b/lib/libutil/mntopts.3 index 35f6d476fcec..28e5a02442c2 100644 --- a/lib/libutil/mntopts.3 +++ b/lib/libutil/mntopts.3 @@ -342,9 +342,9 @@ By default .Va getmnt_silent is zero. .Sh SEE ALSO +.Xr nmount 2 , .Xr err 3 , -.Xr mount 8 , -.Xr nmount 8 +.Xr mount 8 .Sh HISTORY The .Fn getmntopts @@ -358,7 +358,7 @@ The and .Fn rmslashes functions were added with -.Xr nmount 8 +.Xr nmount 2 in .Fx 5.0 . The @@ -368,7 +368,9 @@ and functions were added in .Fx 13.2 . .Pp -Historically, these functions were found in getmntopts.c in the sources for the +Historically, these functions were found in +.Pa getmntopts.c +in the source code of the .Xr mount 8 program. As of diff --git a/lib/libutil/uucplock.3 b/lib/libutil/uucplock.3 index dd19d0311b4e..ee8c9f6bb995 100644 --- a/lib/libutil/uucplock.3 +++ b/lib/libutil/uucplock.3 @@ -28,6 +28,7 @@ .Os .Sh NAME .Nm uu_lock , +.Nm uu_lock_txfr , .Nm uu_unlock , .Nm uu_lockerr .Nd acquire and release control of a serial device From nobody Tue Aug 12 12:55:26 2025 X-Original-To: dev-commits-src-main@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 4c1Wgy5kh8z64jQM; Tue, 12 Aug 2025 12:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1Wgy3m40z3JcP; Tue, 12 Aug 2025 12:55:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755003326; 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=4ojdCOMduZcRiskE/cwJIegR3uVEAyoBHTngD7XFWmA=; b=KpckOe57JgGHD+ztlMKxIqGTxIqQ2us94nwluqhK26jfHhZBwDL2sxPk8kWYpzdsD1Kmm0 TnavdUpJCyKhuOkbucjdCsXPMdPDrr/tWcUAbJC8k7OZ7ttdMFTCg0MndYdAPiJouQt5ms NcjtUZroFDrn7jERWTGPDu/rIorRjf82eXDQs3MxB6jQC0DXWHLg5ZDaUf2eAGHqszcQp0 ioA4/67Zd5HrB5oKKQTf/xMy+HfRdBXtny8Iv91fFzfwuIlKhAyOpIgFIONV88y837Oqiw +rVRTW6tC238azgosZ/y7Dmtkariy4V/l3cs+SLV7RqPCIiKuRiVjqj9YjdwSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755003326; 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=4ojdCOMduZcRiskE/cwJIegR3uVEAyoBHTngD7XFWmA=; b=SHapfT5mgRjc3fMmQa1v4lp1N8G7XF4MyhKz5PYHFe0vSE3atrsiilkkkxXlZEoVu3a4UZ sZe0roNaaetgZ45VbH64GUzrbFQKmiMycsfUd67lHtcI9a0NQeix0dGF7iT3DRXYUt1EoI 7ss9+0Fg42qpH8XhTP87yGEvPCrxSvOKN2ASnD9Kli88tuUwSfYAK7u3rC/arzBqP6YdcV DZhd5vtKWo1vehOY9c/lajMHtNZtaPrskQyPdcCAeMv1O1leFjhNaPFVnT1opxLBI4a0is SijmzBJDgaCsiPpcHeyEixlLuYTqJvHJlacEdjsElwWr3ceLpMMn1HiCY2yiEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755003326; a=rsa-sha256; cv=none; b=dCV8G25kXK0TdjWa/iOqjq07sTfcsjP7vQpwzFm4sYsq/U83MrkgXNxRs4sCpQwpSy37Zw 9HdGXMMKrquLKdqC/RKHIIMwblDXFVXRLuYxE0O96WWjMgaE2UPNHPoltLP5BHRwfeAVjs 3GErtX5JmvnpheK7YpH9P7Cj/v+TzyfT+r6qtw3uLobbHfiYg9CMiGZeeD30eKtv0RSexX IkjGtylN14jp6G4253eUuNUXNvAGDyxiKVnsJ5kKAdzm/WFuFHdB2falFsMCZKabrbdjoL o2bDDrvY7kU82R4dB6ZlALQAr15MIMp3QVtOsHvZx0i+07h2cTjYA7DY26Hbug== 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 4c1Wgy3KFszfyr; Tue, 12 Aug 2025 12:55: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 57CCtQCa088000; Tue, 12 Aug 2025 12:55:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CCtQxa087997; Tue, 12 Aug 2025 12:55:26 GMT (envelope-from git) Date: Tue, 12 Aug 2025 12:55:26 GMT Message-Id: <202508121255.57CCtQxa087997@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 18a9f83630a7 - main - bsd.man.mk: Add checkmanlinks target List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 18a9f83630a7d4612066bb690bcec0437c0e2e72 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=18a9f83630a7d4612066bb690bcec0437c0e2e72 commit 18a9f83630a7d4612066bb690bcec0437c0e2e72 Author: Dag-Erling Smørgrav AuthorDate: 2025-08-12 12:54:08 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-12 12:55:01 +0000 bsd.man.mk: Add checkmanlinks target This target checks that every page mentioned in MLINKS exists and that every link corresponds to a (possibly commented-out) name entry in the page it links to. MFC after: 1 week Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D51862 --- share/mk/bsd.man.mk | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index f44048b4e453..66155d1b4cd9 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -288,11 +288,11 @@ manlinksinstall-${__group}: .endif .endfor -manlint: +manlint: .PHONY checkmanlinks .if defined(${__group}) && !empty(${__group}) .for __page in ${${__group}} manlint: ${__page:S/:/\:/g}lint -${__page:S/:/\:/g}lint: ${__page} +${__page:S/:/\:/g}lint: .PHONY ${__page} .if defined(MANFILTER) ${MANFILTER} < ${.ALLSRC} | ${MANDOC_CMD} -Tlint .else @@ -301,4 +301,18 @@ ${__page:S/:/\:/g}lint: ${__page} .endfor .endif +checkmanlinks: .PHONY +.if defined(${__group}LINKS) +checkmanlinks: checkmanlinks-${__group} +checkmanlinks-${__group}: .PHONY +.for __page __link in ${${__group}LINKS} +checkmanlinks-${__group}: checkmanlinks-${__group}-${__link} +checkmanlinks-${__group}-${__link}: .PHONY ${__page} + @if ! egrep -q "^(\.\\\\\" )?\.Nm ${__link:R}( ,)?$$" ${.ALLSRC}; then \ + echo "${__group}LINKS: '.Nm ${__link:R}' not found in ${__page}"; \ + exit 1; \ + fi >&2 +.endfor # __page __link in ${${__group}LINKS} +.endif # defined(${__group}LINKS) + .endfor # __group in ${MANGROUPS} From nobody Tue Aug 12 13:21:31 2025 X-Original-To: dev-commits-src-main@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 4c1XG44ngsz64lcD; Tue, 12 Aug 2025 13:21: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1XG44HkXz3Nvn; Tue, 12 Aug 2025 13:21:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755004892; 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=zOEMl/cjD4MIvfIn6dhC/75q9f9W2GYHjksIPzA9smA=; b=EXp/tLBBpqdpTyJqVg8vuNDn3t0FzNqmwxj6oA9MbNRBHlEwYLATdmuhF2gtOqtCmPZ2xU PA2LbfJchN7NfuZM9POKgpCnAFLZ4bNd6e1nWTdM7iwXk3WL/vg6+imL2XMddACtutQ0Eo IaqD9WukQX87ff4b9PN7dNz42jK2w8DFLfab26hWXj+scMYvhJ/AfuYD6xKOm7/DDzLxuv 467IGiLcPByrT2B58PxlSrrMABldzW0k0NIpb5qRxyGvubyS20Xwya6MfBwl/na3Rd1fZ5 oYVFYYds4SvNglR6N4shu6zEq1cL5q1h2HVeQuUEgYPuFcJ/0Dan0lo0iSLF7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755004892; 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=zOEMl/cjD4MIvfIn6dhC/75q9f9W2GYHjksIPzA9smA=; b=ssPcVjkKtpo3wOn5EqeXbYGRi/cxnEDMfdpN0l/cEB6kSe4jhAYugCBV5SzTm4RAGfkkHV 5j6kssFSzIz9O++iwY6JwZwXcbDV7R/cr8IsGvvVQuLBmlGRzgLc2Wz0WMt6cekIiRW3pA Hk1RB0lMom6sHuXOE3ikxMX8h3/aYkapuUoMIubU+Yt8Bl9n8pnedmF6jktVUSEX08VbNc tRxN+WQeSZ+w6ps8HukXZq3CQU8LD5RRUtpgkNSkU/HKORIT75us5m5U1Sw2VszTCIhxhn JLmohcTHO0QsRayxt0uqAWFhxYKi+QDUGT6FMOlITl6trGF/u3/G8y6OFPrNdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755004892; a=rsa-sha256; cv=none; b=phNMH3eis59U4cAe896nR4pIx0G7lpWd8jejU6CQwVj0Wg6rETJ2l1/3t/Y6PVdvMugQ90 27xO/8j5Ltcr9LE3oeCCWdeyfgUHkWO2jrSJCGsltXhq86xPsbfLQyffHvOlhVqII9n37c 9ZwGQlGYE3HYXcQnq2Dce3dpDsZTEGleUBr9xffQ41ZYZ/78OscRQuD9CXIH3B6++8fk6Q eTQ0rMEMQxYjLbl7LCbCpw2ZFphvGdqGlyk/ip4NCrxlhkhICC+fhFg1Anlo0om56jDlFK XLeIdn0w2mqf3K/WI2OEjXgZpaezoW9fmuLdUk+jtZGYSQRJ2n2GNNH5IEM5bw== 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 4c1XG43jn0zgfG; Tue, 12 Aug 2025 13:21: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 57CDLWB3038723; Tue, 12 Aug 2025 13:21:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CDLVhC038721; Tue, 12 Aug 2025 13:21:31 GMT (envelope-from git) Date: Tue, 12 Aug 2025 13:21:31 GMT Message-Id: <202508121321.57CDLVhC038721@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: d0abb9a6399a - main - zfs: merge openzfs/zfs@1d0b94c4e List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d0abb9a6399accc9053e2808052be00a6754ecef Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=d0abb9a6399accc9053e2808052be00a6754ecef commit d0abb9a6399accc9053e2808052be00a6754ecef Merge: 18a9f83630a7 1d0b94c4e73d Author: Martin Matuska AuthorDate: 2025-08-12 13:20:09 +0000 Commit: Martin Matuska CommitDate: 2025-08-12 13:21:00 +0000 zfs: merge openzfs/zfs@1d0b94c4e Notable upstream pull request merges: #17398 -multiple ZIL: "crash" the ZIL if the pool suspends during fallback #17585 0c376d0f5 Document the new '-a' zpool option #17590 03592417c SIMD: Don't require definition of `HAVE_XSAVE` #17591 -multiple Prefer VERIFY0 over comparision with 0 or NULL #17596 -multiple zvol: misc cleanups #17605 2fd145b57 zvol: cleanup error handling and passthrough Obtained from: OpenZFS OpenZFS commit: 1d0b94c4e73d83299528c44fb4fa3b29eb6009a3 sys/contrib/openzfs/cmd/zdb/zdb.c | 30 +- sys/contrib/openzfs/cmd/zed/zed.d/zed-functions.sh | 3 +- sys/contrib/openzfs/cmd/zfs/zfs_main.c | 2 +- sys/contrib/openzfs/cmd/zhack.c | 10 +- sys/contrib/openzfs/cmd/zilstat.in | 1 + sys/contrib/openzfs/cmd/zpool/zpool_main.c | 13 +- sys/contrib/openzfs/cmd/ztest.c | 29 +- sys/contrib/openzfs/config/toolchain-simd.m4 | 69 ++- .../openzfs/include/os/freebsd/spl/sys/debug.h | 4 + .../openzfs/include/os/freebsd/spl/sys/proc.h | 4 +- .../include/os/linux/kernel/linux/simd_x86.h | 21 +- .../openzfs/include/os/linux/spl/sys/debug.h | 4 + .../openzfs/include/os/linux/spl/sys/mutex.h | 2 +- sys/contrib/openzfs/include/sys/dmu.h | 4 +- sys/contrib/openzfs/include/sys/zfs_znode.h | 2 +- sys/contrib/openzfs/include/sys/zil.h | 33 +- sys/contrib/openzfs/include/sys/zil_impl.h | 4 + sys/contrib/openzfs/lib/libspl/include/sys/debug.h | 4 + sys/contrib/openzfs/lib/libzfs/libzfs_diff.c | 4 +- sys/contrib/openzfs/lib/libzfs/libzfs_import.c | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs_mount.c | 2 +- sys/contrib/openzfs/lib/libzfs/libzfs_sendrecv.c | 8 +- sys/contrib/openzfs/lib/libzpool/abd_os.c | 4 +- sys/contrib/openzfs/lib/libzpool/kernel.c | 2 +- sys/contrib/openzfs/lib/libzpool/util.c | 8 +- sys/contrib/openzfs/lib/libzutil/zutil_import.c | 4 +- sys/contrib/openzfs/module/avl/avl.c | 16 +- sys/contrib/openzfs/module/icp/core/kcf_sched.c | 2 +- sys/contrib/openzfs/module/icp/io/aes.c | 10 +- sys/contrib/openzfs/module/nvpair/nvpair.c | 6 +- .../openzfs/module/os/freebsd/spl/spl_kmem.c | 2 +- .../openzfs/module/os/freebsd/spl/spl_sysevent.c | 2 +- sys/contrib/openzfs/module/os/freebsd/zfs/abd_os.c | 4 +- sys/contrib/openzfs/module/os/freebsd/zfs/dmu_os.c | 8 +- .../openzfs/module/os/freebsd/zfs/vdev_geom.c | 2 +- .../openzfs/module/os/freebsd/zfs/zfs_acl.c | 4 +- .../openzfs/module/os/freebsd/zfs/zfs_ctldir.c | 4 +- .../openzfs/module/os/freebsd/zfs/zfs_dir.c | 4 +- .../openzfs/module/os/freebsd/zfs/zfs_vfsops.c | 11 +- .../openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 90 ++-- .../openzfs/module/os/freebsd/zfs/zfs_znode_os.c | 18 +- .../openzfs/module/os/freebsd/zfs/zvol_os.c | 20 +- .../openzfs/module/os/linux/spl/spl-condvar.c | 8 +- .../openzfs/module/os/linux/spl/spl-generic.c | 2 +- .../openzfs/module/os/linux/spl/spl-kmem-cache.c | 24 +- .../openzfs/module/os/linux/spl/spl-kstat.c | 2 +- .../openzfs/module/os/linux/spl/spl-thread.c | 2 +- sys/contrib/openzfs/module/os/linux/spl/spl-tsd.c | 2 +- sys/contrib/openzfs/module/os/linux/zfs/abd_os.c | 6 +- .../openzfs/module/os/linux/zfs/vdev_disk.c | 6 +- sys/contrib/openzfs/module/os/linux/zfs/zfs_acl.c | 6 +- .../openzfs/module/os/linux/zfs/zfs_ctldir.c | 8 +- sys/contrib/openzfs/module/os/linux/zfs/zfs_dir.c | 24 +- .../openzfs/module/os/linux/zfs/zfs_sysfs.c | 2 +- .../openzfs/module/os/linux/zfs/zfs_vfsops.c | 27 +- .../openzfs/module/os/linux/zfs/zfs_vnops_os.c | 132 +++--- .../openzfs/module/os/linux/zfs/zfs_znode_os.c | 58 +-- sys/contrib/openzfs/module/os/linux/zfs/zpl_file.c | 63 ++- .../openzfs/module/os/linux/zfs/zpl_inode.c | 2 +- .../openzfs/module/os/linux/zfs/zpl_super.c | 4 +- .../openzfs/module/os/linux/zfs/zpl_xattr.c | 4 +- sys/contrib/openzfs/module/os/linux/zfs/zvol_os.c | 57 ++- sys/contrib/openzfs/module/zfs/abd.c | 2 +- sys/contrib/openzfs/module/zfs/arc.c | 68 +-- sys/contrib/openzfs/module/zfs/bpobj.c | 6 +- sys/contrib/openzfs/module/zfs/btree.c | 8 +- sys/contrib/openzfs/module/zfs/dataset_kstats.c | 1 + sys/contrib/openzfs/module/zfs/dbuf.c | 74 ++-- sys/contrib/openzfs/module/zfs/ddt.c | 8 +- sys/contrib/openzfs/module/zfs/ddt_log.c | 8 +- sys/contrib/openzfs/module/zfs/dmu.c | 12 +- sys/contrib/openzfs/module/zfs/dmu_direct.c | 6 +- sys/contrib/openzfs/module/zfs/dmu_object.c | 2 +- sys/contrib/openzfs/module/zfs/dmu_objset.c | 4 +- sys/contrib/openzfs/module/zfs/dmu_recv.c | 12 +- sys/contrib/openzfs/module/zfs/dmu_redact.c | 2 +- sys/contrib/openzfs/module/zfs/dmu_send.c | 6 +- sys/contrib/openzfs/module/zfs/dmu_tx.c | 18 +- sys/contrib/openzfs/module/zfs/dnode.c | 22 +- sys/contrib/openzfs/module/zfs/dnode_sync.c | 6 +- sys/contrib/openzfs/module/zfs/dsl_bookmark.c | 6 +- sys/contrib/openzfs/module/zfs/dsl_crypt.c | 4 +- sys/contrib/openzfs/module/zfs/dsl_dataset.c | 10 +- sys/contrib/openzfs/module/zfs/dsl_deadlist.c | 2 +- sys/contrib/openzfs/module/zfs/dsl_deleg.c | 20 +- sys/contrib/openzfs/module/zfs/dsl_destroy.c | 8 +- sys/contrib/openzfs/module/zfs/dsl_dir.c | 4 +- sys/contrib/openzfs/module/zfs/dsl_pool.c | 10 +- sys/contrib/openzfs/module/zfs/dsl_prop.c | 31 +- sys/contrib/openzfs/module/zfs/dsl_scan.c | 6 +- sys/contrib/openzfs/module/zfs/dsl_userhold.c | 2 +- sys/contrib/openzfs/module/zfs/fm.c | 2 +- sys/contrib/openzfs/module/zfs/metaslab.c | 34 +- sys/contrib/openzfs/module/zfs/mmp.c | 2 +- sys/contrib/openzfs/module/zfs/range_tree.c | 4 +- sys/contrib/openzfs/module/zfs/rrwlock.c | 8 +- sys/contrib/openzfs/module/zfs/sa.c | 24 +- sys/contrib/openzfs/module/zfs/spa.c | 66 +-- sys/contrib/openzfs/module/zfs/spa_misc.c | 19 +- sys/contrib/openzfs/module/zfs/spa_stats.c | 2 +- sys/contrib/openzfs/module/zfs/space_map.c | 2 +- sys/contrib/openzfs/module/zfs/space_reftree.c | 2 +- sys/contrib/openzfs/module/zfs/vdev.c | 46 +- sys/contrib/openzfs/module/zfs/vdev_draid.c | 16 +- sys/contrib/openzfs/module/zfs/vdev_indirect.c | 6 +- sys/contrib/openzfs/module/zfs/vdev_initialize.c | 6 +- sys/contrib/openzfs/module/zfs/vdev_label.c | 14 +- sys/contrib/openzfs/module/zfs/vdev_queue.c | 2 +- sys/contrib/openzfs/module/zfs/vdev_raidz.c | 8 +- sys/contrib/openzfs/module/zfs/vdev_rebuild.c | 4 +- sys/contrib/openzfs/module/zfs/vdev_removal.c | 22 +- sys/contrib/openzfs/module/zfs/vdev_trim.c | 8 +- sys/contrib/openzfs/module/zfs/zap.c | 8 +- sys/contrib/openzfs/module/zfs/zap_micro.c | 6 +- sys/contrib/openzfs/module/zfs/zcp.c | 2 +- sys/contrib/openzfs/module/zfs/zfeature.c | 4 +- sys/contrib/openzfs/module/zfs/zfs_fuid.c | 44 +- sys/contrib/openzfs/module/zfs/zfs_ioctl.c | 119 +++--- sys/contrib/openzfs/module/zfs/zfs_log.c | 4 +- sys/contrib/openzfs/module/zfs/zfs_quota.c | 4 +- sys/contrib/openzfs/module/zfs/zfs_rlock.c | 2 +- sys/contrib/openzfs/module/zfs/zfs_sa.c | 15 +- sys/contrib/openzfs/module/zfs/zfs_vnops.c | 27 +- sys/contrib/openzfs/module/zfs/zil.c | 461 ++++++++++++++++++--- sys/contrib/openzfs/module/zfs/zio.c | 62 +-- sys/contrib/openzfs/module/zfs/zio_checksum.c | 2 +- sys/contrib/openzfs/module/zfs/zio_compress.c | 15 - sys/contrib/openzfs/module/zfs/zio_inject.c | 2 +- sys/contrib/openzfs/module/zfs/zrlock.c | 2 +- sys/contrib/openzfs/module/zfs/zthr.c | 2 +- sys/contrib/openzfs/module/zfs/zvol.c | 117 +++--- sys/contrib/openzfs/rpm/generic/zfs.spec.in | 1 - sys/contrib/openzfs/tests/runfiles/common.run | 6 +- sys/contrib/openzfs/tests/zfs-tests/cmd/.gitignore | 1 + .../openzfs/tests/zfs-tests/cmd/Makefile.am | 2 +- .../openzfs/tests/zfs-tests/cmd/btree_test.c | 4 +- .../openzfs/tests/zfs-tests/cmd/mmap_write_sync.c | 84 ++++ .../openzfs/tests/zfs-tests/include/commands.cfg | 1 + .../openzfs/tests/zfs-tests/tests/Makefile.am | 9 + .../tests/functional/failmode/failmode.kshlib | 149 +++++++ .../failmode/failmode_fsync_continue.ksh | 36 ++ .../functional/failmode/failmode_fsync_wait.ksh | 36 ++ .../failmode/failmode_msync_continue.ksh | 36 ++ .../functional/failmode/failmode_msync_wait.ksh | 36 ++ .../failmode/failmode_osync_continue.ksh | 36 ++ .../functional/failmode/failmode_osync_wait.ksh | 37 ++ .../failmode/failmode_syncalways_continue.ksh | 37 ++ .../failmode/failmode_syncalways_wait.ksh | 37 ++ sys/modules/zfs/zfs_config.h | 4 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 150 files changed, 2044 insertions(+), 988 deletions(-) diff --cc sys/contrib/openzfs/tests/zfs-tests/cmd/mmap_write_sync.c index 000000000000,ad5e37f24960..ad5e37f24960 mode 000000,100644..100644 --- a/sys/contrib/openzfs/tests/zfs-tests/cmd/mmap_write_sync.c +++ b/sys/contrib/openzfs/tests/zfs-tests/cmd/mmap_write_sync.c diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode.kshlib index 000000000000,d0b7404557ab..d0b7404557ab mode 000000,100644..100644 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode.kshlib +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode.kshlib diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_fsync_continue.ksh index 000000000000,7b145d3a2b4c..7b145d3a2b4c mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_fsync_continue.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_fsync_continue.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_fsync_wait.ksh index 000000000000,677d226b5481..677d226b5481 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_fsync_wait.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_fsync_wait.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_msync_continue.ksh index 000000000000,0c79ee15a1ba..0c79ee15a1ba mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_msync_continue.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_msync_continue.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_msync_wait.ksh index 000000000000,a59d8cc50d61..a59d8cc50d61 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_msync_wait.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_msync_wait.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_osync_continue.ksh index 000000000000,c4fa0c8f042c..c4fa0c8f042c mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_osync_continue.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_osync_continue.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_osync_wait.ksh index 000000000000,5f65cf92ad33..5f65cf92ad33 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_osync_wait.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_osync_wait.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_syncalways_continue.ksh index 000000000000,b80d776224a0..b80d776224a0 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_syncalways_continue.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_syncalways_continue.ksh diff --cc sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_syncalways_wait.ksh index 000000000000,4fcb167b5c77..4fcb167b5c77 mode 000000,100755..100755 --- a/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_syncalways_wait.ksh +++ b/sys/contrib/openzfs/tests/zfs-tests/tests/functional/failmode/failmode_syncalways_wait.ksh diff --cc sys/modules/zfs/zfs_config.h index 6561d62b5e26,000000000000..c79c9eaa1a5f mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,869 -1,0 +1,869 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* __assign_str() has one arg */ +/* #undef HAVE_1ARG_ASSIGN_STR */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* backtrace() is available */ +/* #undef HAVE_BACKTRACE */ + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_file_open_by_path() exists */ +/* #undef HAVE_BDEV_FILE_OPEN_BY_PATH */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* bdev_nr_bytes() is available */ +/* #undef HAVE_BDEV_NR_BYTES */ + +/* bdev_open_by_path() exists */ +/* #undef HAVE_BDEV_OPEN_BY_PATH */ + +/* bdev_release() exists */ +/* #undef HAVE_BDEV_RELEASE */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* __blkdev_issue_discard(flags) is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_FLAGS */ + +/* __blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_ASYNC_NOFLAGS */ + +/* blkdev_issue_discard(flags) is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_FLAGS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD_NOFLAGS */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() exists */ +/* #undef HAVE_BLKDEV_PUT */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* struct queue_limits has a features field */ +/* #undef HAVE_BLKDEV_QUEUE_LIMITS_FEATURES */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_disk() exists and takes 2 args */ +/* #undef HAVE_BLK_ALLOC_DISK_2ARG */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue hardware context is cached in struct request */ +/* #undef HAVE_BLK_MQ_RQ_HCTX */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* backing_dev_info is available through queue gendisk */ +/* #undef HAVE_BLK_QUEUE_DISK_BDI */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* 3-arg dequeue_signal() takes a type argument */ +/* #undef HAVE_DEQUEUE_SIGNAL_3ARG_TYPE */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* dops->d_revalidate() takes 4 args */ +/* #undef HAVE_D_REVALIDATE_4ARGS */ + +/* Define to 1 if you have the 'execvpe' function. */ +#define HAVE_EXECVPE 1 + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* file->f_version exists */ +/* #undef HAVE_FILE_F_VERSION */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fsync_bdev() is declared in include/blkdev.h */ +/* #undef HAVE_FSYNC_BDEV */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct mnt_idmap* and u32 request_mask */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* GENHD_FL_EXT_DEVT flag is available */ +/* #undef HAVE_GENHD_FL_EXT_DEVT */ + +/* GENHD_FL_NO_PART flag is available */ +/* #undef HAVE_GENHD_FL_NO_PART */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* Define to 1 if you have the 'gettid' function. */ +/* #undef HAVE_GETTID */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* mnt_idmap does not have user_namespace */ +/* #undef HAVE_IDMAP_NO_USERNS */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* inode_get_atime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_ATIME */ + +/* inode_get_ctime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_CTIME */ + +/* inode_get_mtime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_MTIME */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_atime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_ATIME_TO_TS */ + +/* inode_set_ctime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_CTIME_TO_TS */ + +/* inode_set_mtime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_MTIME_TO_TS */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() returns struct dentry* */ +/* #undef HAVE_IOPS_MKDIR_DENTRY */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_get_pages2() is available */ +/* #undef HAVE_IOV_ITER_GET_PAGES2 */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* Define to 1 if you have the 'issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* iter_is_ubuf() is available */ +/* #undef HAVE_ITER_IS_UBUF */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel defines intptr_t */ +/* #undef HAVE_KERNEL_INTPTR_T */ + +/* kernel has kernel_neon_* functions */ +/* #undef HAVE_KERNEL_NEON */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* strlcpy() exists */ +/* #undef HAVE_KERNEL_STRLCPY */ + +/* kernel has kmap_local_page */ +/* #undef HAVE_KMAP_LOCAL_PAGE */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [unwind] */ +/* #undef HAVE_LIBUNWIND */ + +/* libunwind has unw_get_elf_filename */ +/* #undef HAVE_LIBUNWIND_ELF */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* building against unsupported kernel version */ +/* #undef HAVE_LINUX_EXPERIMENTAL */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_STAT_H */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Define to 1 if you have the 'mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* PG_error flag is available */ +/* #undef HAVE_MM_PAGE_FLAG_ERROR */ + +/* page_mapping() is available */ +/* #undef HAVE_MM_PAGE_MAPPING */ + +/* page_size() is available */ +/* #undef HAVE_MM_PAGE_SIZE */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* readahead_page() exists */ +/* #undef HAVE_PAGEMAP_READAHEAD_PAGE */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* pin_user_pages_unlocked() is available */ +/* #undef HAVE_PIN_USER_PAGES_UNLOCKED */ + +/* proc_handler ctl_table arg is const */ +/* #undef HAVE_PROC_HANDLER_CTL_TABLE_CONST */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* If available, contains the Python version number currently in use. */ +/* #undef HAVE_PYTHON */ + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_sz exists */ +/* #undef HAVE_REGISTER_SYSCTL_SZ */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* shrinker_register exists */ +/* #undef HAVE_SHRINKER_REGISTER */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* sops->free_inode() exists */ +/* #undef HAVE_SOPS_FREE_INODE */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* STACK_FRAME_NON_STANDARD asm macro is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD_ASM */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* statx() is available */ +/* #undef HAVE_STATX */ + +/* STATX_MNT_ID is available */ +/* #undef HAVE_STATX_MNT_ID */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the 'strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the 'strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* have super_block s_shrink */ +/* #undef HAVE_SUPER_BLOCK_S_SHRINK */ + +/* have super_block s_shrink pointer */ +/* #undef HAVE_SUPER_BLOCK_S_SHRINK_PTR */ + +/* have super_block s_wb_err */ +/* #undef HAVE_SUPER_BLOCK_S_WB_ERR */ + +/* sync_blockdev() is declared in include/blkdev.h */ +/* #undef HAVE_SYNC_BLOCKDEV */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* timer_delete_sync is available */ +/* #undef HAVE_TIMER_DELETE_SYNC */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the 'udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + +/* filemap_dirty_folio exists */ +/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */ + +/* generic_copy_file_range() is available */ +/* #undef HAVE_VFS_GENERIC_COPY_FILE_RANGE */ + +/* migratepage exists */ +/* #undef HAVE_VFS_MIGRATEPAGE */ + +/* migrate_folio exists */ +/* #undef HAVE_VFS_MIGRATE_FOLIO */ + +/* address_space_operations->readpages exists */ +/* #undef HAVE_VFS_READPAGES */ + +/* read_folio exists */ +/* #undef HAVE_VFS_READ_FOLIO */ + +/* fops->remap_file_range() is available */ +/* #undef HAVE_VFS_REMAP_FILE_RANGE */ + +/* __set_page_dirty_nobuffers exists */ +/* #undef HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS */ + +/* splice_copy_file_range() is available */ +/* #undef HAVE_VFS_SPLICE_COPY_FILE_RANGE */ + +/* address_space_operations->writepage exists */ +/* #undef HAVE_VFS_WRITEPAGE */ + +/* __vmalloc page flags exists */ +/* #undef HAVE_VMALLOC_PAGE_KERNEL */ + +/* int (*writepage_t)() takes struct folio* */ +/* #undef HAVE_WRITEPAGE_T_FOLIO */ + +/* xattr_handler->get() wants dentry and inode and flags */ +/* #undef HAVE_XATTR_GET_DENTRY_INODE_FLAGS */ + +/* xattr_handler->set() wants both dentry and inode */ +/* #undef HAVE_XATTR_SET_DENTRY_INODE */ + +/* xattr_handler->set() takes mnt_idmap */ *** 124 LINES SKIPPED *** From nobody Tue Aug 12 13:21:33 2025 X-Original-To: dev-commits-src-main@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 4c1XG56dXrz64lR4; Tue, 12 Aug 2025 13:21:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1XG55Cmgz3P83; Tue, 12 Aug 2025 13:21:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755004893; 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=vQ+n8BbF0dtxyylRNnI9NHo4f0vyjOtyFKD8BdwHKLc=; b=RixXq4mwSexsy7IR75/8iOmapT2PvctYIFcrBJHucjj8WGmLqppoBU0LdwTrLwduSuk/sP gXEGIde5QFx7K4nIREggCgEeZcMDFSF8qZi6VYoNUnHGDb1kPbK18uh6aL79U5ZWV3yUCH u6k8sSrIjcVCVP/Kb7iJb8mRW88qgiemxHdyFNovWGG6Dz4ikDs3tJtfpqwWcAGy3qSVtB FnNDKNB+w0RHBr1K07pbAVZUZ7S1bhefyrlFBYkZyvNS6kE9+qKd6ZvDqiRTD8mZnjOz0U VW7zkOmIuWLGwQy9F3X6Up4rsE5nkv2jNTuQiYzncs4ia+bjM5QmRzGlUzGqow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755004893; 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=vQ+n8BbF0dtxyylRNnI9NHo4f0vyjOtyFKD8BdwHKLc=; b=jimvuC8kA2G5TlsJ051U2FbaPCZAZGm38JrU12AKSFuRSgCl3xYE1Vv2iVGNb6XrFyOkmR uFgsGTEfQgTV48omM29R3bS0Jta/1yJOaTPbrxeg3ZFclQvkYYjk3f5Nm4TVcQLHzpj8wQ 9bt9qpE0kaalr92xYFx+snRpBcz1NSKQteLDY97nh92BovEq4M5hldECbwQ7nWZxs2bKIP SlTNolegza8xxFqItp8o9zS5zm7vVfogn8jfzGknco1GWCdos7nQWrqt3dleDOf5ZCFnYb 1Q2uKLDxn4a+Qc06eLFmqYqHhJYaRW/j7B9FW4SBbZ20r4jilQixN+H0BESzew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755004893; a=rsa-sha256; cv=none; b=gND60EqAo0fViNnCBdvdrSEY+GtdFd8GxqNDch7cwLph6/b9e+ba9alXuItLTvcsF87E4B 9NDR88X6rrSmK0+/YwyPpY6c/VrzKAv2UOykvAMEbKm45fqb8zMngrMKNZDRUoRWORf2l2 1av1/XuLhJ0kmBrtxMCygvvdL3QXRejPMLBlt97pwQgu8MVjb2SZzJr0Y3GxByf/fEvM4b lbPnhmRX91As8eqJEIfA9HV7UrKypXUGTkwtM5qd/YsGOvSB3eXAGTXZD1xpKHITNbKwQI wYDhpvOY6FJvxw/LJ/FHiMIZNwAPcQLFqLQuxIUbDTMVA3stIznHjysgr6UUuw== 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 4c1XG54f41zfch; Tue, 12 Aug 2025 13:21:33 +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 57CDLXZe038757; Tue, 12 Aug 2025 13:21:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CDLX8j038754; Tue, 12 Aug 2025 13:21:33 GMT (envelope-from git) Date: Tue, 12 Aug 2025 13:21:33 GMT Message-Id: <202508121321.57CDLX8j038754@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 6188ca6a9d72 - main - zfs: add workaround to unbreak kernel compilation on MacOS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6188ca6a9d72af9be987e1aedc345210f834ad80 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=6188ca6a9d72af9be987e1aedc345210f834ad80 commit 6188ca6a9d72af9be987e1aedc345210f834ad80 Author: Martin Matuska AuthorDate: 2025-08-11 21:16:24 +0000 Commit: Martin Matuska CommitDate: 2025-08-12 13:21:08 +0000 zfs: add workaround to unbreak kernel compilation on MacOS This needs to be resolved later with the correct macros or a different approach in discussion with Rob Norris (OpenZFS). --- sys/contrib/openzfs/lib/libspl/tunables.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/contrib/openzfs/lib/libspl/tunables.c b/sys/contrib/openzfs/lib/libspl/tunables.c index 67dc9710dee8..2e9535f1fbf9 100644 --- a/sys/contrib/openzfs/lib/libspl/tunables.c +++ b/sys/contrib/openzfs/lib/libspl/tunables.c @@ -74,7 +74,9 @@ extern const zfs_tunable_t *__stop_zfs_tunables; * any NULL pointers. */ static void *__zfs_tunable__placeholder +#if !defined(__APPLE__) __attribute__((__section__("zfs_tunables"))) +#endif __attribute__((__used__)) = NULL; /* From nobody Tue Aug 12 13:24:51 2025 X-Original-To: dev-commits-src-main@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 4c1XL04wn1z64mF7; Tue, 12 Aug 2025 13:24:56 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1XL03xDnz3Q3b; Tue, 12 Aug 2025 13:24:56 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755005096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4Y9u87pt1iOOItT5b+FO047MnvguQh82Waxdy7/HcBU=; b=k69eJ1f7GlhWdMn3y2bBlZBkvH9u2InYqDRAUaL6HjR2m/YZcKWy1L+mkbTlFnRt4vPWZf 34O1Fyd1ssEpgtNtwVOtwOfCk2qW/Mdza8rERw5sJnpuu0427MOJ+w0JNXTJhiyI4TuhUi 0ZHgQipzRoaf3kbvmcCmr0uiGlQMVQM1ZhsvI0DHIgz+njnnoaThn7v+Y2UMI5e+YG0qer iFRMHVy7H0Fy79NBprVcZD5nJNNbKb3rK5ja+fKJAeebMIxdTNWhqFzTK00BAyrkgvG68P EHySl5ThqbMS+koeo77Iq8RMD+csJjXUDiWKjQURHTs39m793WybXPi72TLciQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755005096; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=4Y9u87pt1iOOItT5b+FO047MnvguQh82Waxdy7/HcBU=; b=bhlw2WCgQzOURJEJv8/kwarB1g52w7q4PrYJqlz1SZfGvNQEsB6Yfu/5R8Jv7hfnFdrKU1 nfywstdkDe6qzTtHXnZUtkNKB+f32UOBI2JcSbTP+7YWkjK+7u8X317m4OvdXYS14MbmR8 2mQ6XnU05aSlatzVHDebE9fw1EwAvD31l7WmpDxRqh0CKLTLQEBzBI3ZP29fXSXiMH9wUX hQiQTiSsVfDjxH4gs+/N1Yqmhoo7/lsM2SgNjTUaB2QUwhd13r0pctIcnfCC0PwO78Rtnx eaeJtrVsmT7mSI8wYzKHCcZsZl1QaUyh8ayZgfHRUfVtia5R5+L9joNVeXMfMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755005096; a=rsa-sha256; cv=none; b=eZMvYYdQXZo7BpoxHt59D6tjOJDotT/6Lku4F9Aw9zak6pFVIEq3pk1/Bj0i+ql+4MqutM OvtEODKt9AZqsM/xX4TJ15mmaFP+6k5TtzCNcRABLJSJuQaZjAsVuIsG1LfBIkBFFe0wmy bCHgz6hfYHVextYIoNU329KOs1L/rqIS/FTPsmdSVdS1/G048s50fPU2LMPIEr+KJ6oiVl Q+w0SRxUTakQIZAOrb1O57FLnmNE4KAbjsrYsSAx/H3CAHZZVYeW+XSx1sbAQZ+QW7nnuK yQ2dBpMLfOabCYMUN9vk9RCBjOryzPTtZg/13+7jaPflF58mf3fGr9x7no+7jQ== Received: from [100.109.252.209] (unknown [176.15.166.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4c1XKy35zczPWH; Tue, 12 Aug 2025 13:24:54 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Date: Tue, 12 Aug 2025 16:24:51 +0300 From: Dima Panov To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, Lexi Winter Message-ID: <8e7a9c07-5efd-4450-a590-a6aeaa59b402@Canary> In-Reply-To: <851c968c-923a-4809-83d4-b0600e70867b@Canary> References: <202508101537.57AFbHrI067216@gitrepo.freebsd.org> <851c968c-923a-4809-83d4-b0600e70867b@Canary> Subject: git: 7ac276298b72 - main - Remove Secure RPC DES authentication X-Canary-Draft: 2 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="689b40a3_2336c6b7_50e" --689b40a3_2336c6b7_50e Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline All xservers are affected. However, upstream already deal with it in commit https://gitlab.freedeskt= op.org/xorg/xserver/-/commit/71b207a2ebc1465c7d9ad9262f60930f6a1d42ee -- Dima. (desktop, kde, x11, office, ports-secteam)=40=46reeBSD team (fluffy=40=46reeBSD.org, https://t.me/=46luffyBSD) > On =D0=B2=D1=82=D0=BE=D1=80=D0=BD=D0=B8=D0=BA, =D0=B0=D0=B2=D0=B3. 12, = 2025 at 1:41 PM, Dima Panov wrote: > Hello=21 > > This commit breaks x11-server/xwayland > > =46AILED: os/liblibxserver=5Fos.a.p/rpcauth.c.o cc -Ios/liblibxserver=5F= os.a.p -Ios -I../os -I. -I.. -IXext -I../Xext -IXi -I../Xi -Icomposite -I= ../composite -Idamageext -I../damageext -Ifb -I../fb -Iglamor -I../glamor= -Imi -I../mi -Imiext/damage -I../miext/damage -Imiext/sync -I../miext/sy= nc -Idbe -I../dbe -Idix -I../dix -Idri3 -I../dri3 -Iinclude -I../include = -Ipresent -I../present -Irandr -I../randr -Irender -I../render -Ixfixes -= I../xfixes -I/usr/local/include -I/usr/local/include/pixman-1 -I/usr/loca= l/include/freetype2 -I/usr/local/include/libpng16 -fdiagnostics-color=3Dn= ever -D=5F=46ILE=5FO=46=46SET=5FBITS=3D64 -Wall -Winvalid-pch -std=3Dgnu9= 9 -DHAVE=5FDIX=5FCON=46IG=5FH -fno-strict-aliasing -fvisibility=3Dhidden = -Wall -Wpointer-arith -Wmissing-declarations -Wformat=3D2 -Wstrict-protot= ypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast -Wold-styl= e-definition -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn -Wmissi= ng-format-attribute -Wredundant-decls -Werror=3Dimplicit -Werror=3Dnonnul= l -Werror=3Dinit-self -Werror=3Dmain -Werror=3Dmissing-braces -Werror=3Ds= equence-point -Werror=3Dreturn-type -Werror=3Dtrigraphs -Werror=3Darray-b= ounds -Werror=3Dwrite-strings -Werror=3Daddress -Werror=3Dint-to-pointer-= cast -Werror=3Dpointer-to-int-cast -O2 -pipe -fstack-protector-strong -fn= o-strict-aliasing -fPIC -D=5FTHREAD=5FSA=46E -D=5FDE=46AULT=5FSOURCE -D=5F= BSD=5FSOURCE -DHAS=5F=46CHOWN -DHAS=5FSTICKY=5FDIR=5FBIT -DCLIENTIDS -MD = -MQ os/liblibxserver=5Fos.a.p/rpcauth.c.o -M=46 os/liblibxserver=5Fos.a.p= /rpcauth.c.o.d -o os/liblibxserver=5Fos.a.p/rpcauth.c.o -c ../os/rpcauth.= c ../os/rpcauth.c:110:52: error: incomplete definition of type 'struct au= thdes=5Fcred' 110 =7C return (((struct authdes=5Fcred *) r.rq=5Fclntcred)= ->adc=5Ffullname.name); =7C =7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E= =7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=5E= ../os/rpcauth.c:110:22: note: forward declaration of 'struct authdes=5Fc= red' 110 =7C return (((struct authdes=5Fcred *) r.rq=5Fclntcred)->adc=5Ff= ullname.name); =7C =5E 1 error generated. > > > -- > Dima. (desktop, kde, x11, office, ports-secteam)=40=46reeBSD team > (fluffy=40=46reeBSD.org, https://t.me/=46luffyBSD) > > > > > On =D0=B2=D0=BE=D1=81=D0=BA=D1=80=D0=B5=D1=81=D0=B5=D0=BD=D1=8C=D0=B5= , =D0=B0=D0=B2=D0=B3. 10, 2025 at 6:37 PM, Lexi Winter wrote: > > The branch main has been updated by ivy: > > > > URL: https://cgit.=46reeBSD.org/src/commit/=3Fid=3D7ac276298b72982189= ac1a5b17461936dc00163e > > > > commit 7ac276298b72982189ac1a5b17461936dc00163e > > Author: Lexi Winter > > AuthorDate: 2025-08-10 12:57:36 +0000 > > Commit: Lexi Winter > > CommitDate: 2025-08-10 15:36:40 +0000 > > > > Remove Secure RPC DES authentication > > > > =46ollowing the earlier removal of keyserv, none of this functionalit= y > > works since it requires keyserv. > > > > Remove the relevant symbols from libc's Symbol.map. Leave compatibili= ty > > symbols for existing applications, but since the functions don't work= > > without keyserv, stub them out to return an error. > > > > Remove some private symbols that were only used by keyserv; these don= 't > > get compatibility symbols. > > > > Remove the documentation for the old functions. > > > > Remove rpc.ypupdated since it requires DES authentication. > > > > Reviewed by: manu, des, emaste > > Differential Revision: https://reviews.freebsd.org/D50442 > > --- > > Obsolete=46iles.inc =7C 4 + > > include/rpc/auth=5Fdes.h =7C 79 +---- > > lib/libc/rpc/Symbol.map =7C 19 -- > > lib/libc/rpc/auth=5Fdes.c =7C 455 +---------------------------- > > lib/libc/rpc/authdes=5Fprot.c =7C 44 +-- > > lib/libc/rpc/key=5Fcall.c =7C 424 +++------------------------ > > lib/libc/rpc/publickey.5 =7C 40 --- > > lib/libc/rpc/rpc=5Fsecure.3 =7C 177 +----------- > > lib/libc/rpc/rpc=5Fsoc.3 =7C 13 +- > > lib/libc/rpc/rpc=5Fsoc.c =7C 31 +- > > lib/libc/rpc/svc=5Fauth.c =7C 8 - > > lib/libc/rpc/svc=5Fauth=5Fdes.c =7C 460 +----------------------------= - > > lib/librpcsvc/Makefile =7C 2 +- > > lib/librpcsvc/yp=5Fupdate.c =7C 199 ------------- > > libexec/rc/rc.conf =7C 1 - > > libexec/rc/rc.d/Makefile =7C 1 - > > libexec/rc/rc.d/ypupdated =7C 35 --- > > share/man/man5/rc.conf.5 =7C 9 +- > > sys/rpc/auth.h =7C 26 -- > > tools/build/mk/OptionalObsolete=46iles.inc =7C 2 - > > usr.sbin/Makefile =7C 1 - > > usr.sbin/rpc.ypupdated/Makefile =7C 32 --- > > usr.sbin/rpc.ypupdated/Makefile.depend =7C 18 -- > > usr.sbin/rpc.ypupdated/update.c =7C 328 --------------------- > > usr.sbin/rpc.ypupdated/yp=5Fdbdelete.c =7C 68 ----- > > usr.sbin/rpc.ypupdated/yp=5Fdbupdate.c =7C 147 ---------- > > usr.sbin/rpc.ypupdated/ypupdate =7C 32 --- > > usr.sbin/rpc.ypupdated/ypupdated=5Fextern.h =7C 32 --- > > usr.sbin/rpc.ypupdated/ypupdated=5Fmain.c =7C 287 -------------------= > > usr.sbin/rpc.ypupdated/ypupdated=5Fserver.c =7C 227 --------------- > > 30 files changed, 83 insertions(+), 3118 deletions(-) > > > > diff --git a/Obsolete=46iles.inc b/Obsolete=46iles.inc > > index ec324e82f86d..a6662d31829f 100644 > > --- a/Obsolete=46iles.inc > > +++ b/Obsolete=46iles.inc > > =40=40 -51,6 +51,10 =40=40 > > =23 xargs -n1 =7C sort =7C uniq -d; > > =23 done > > > > +=23 20250810: Removal of remaining Secure RPC (DES) bits > > +OLD=5F=46ILES+=3Dusr/sbin/rpc.ypupdated > > +OLD=5F=46ILES+=3Detc/rc.d/ypupdated > > + > > =23 20250808: nvmfd removed from base install > > OLD=5F=46ILES+=3Dusr/sbin/nvmfd > > OLD=5F=46ILES+=3Dusr/share/man/man8/nvmfd.8.gz > > diff --git a/include/rpc/auth=5Fdes.h b/include/rpc/auth=5Fdes.h > > index 0ff43c13139b..1b4943a74b8b 100644 > > --- a/include/rpc/auth=5Fdes.h > > +++ b/include/rpc/auth=5Fdes.h > > =40=40 -33,91 +33,14 =40=40 > > * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. > > */ > > > > -/* > > - * auth=5Fdes.h, Protocol for DES style authentication for RPC > > - */ > > +/* Note, RPC DES authentication was removed in =46reeBSD 15.0. */ > > > > =23ifndef =5FAUTH=5FDES=5F > > =23define =5FAUTH=5FDES=5F > > > > -/* > > - * There are two kinds of =22names=22: fullnames and nicknames > > - */ > > -enum authdes=5Fnamekind =7B > > - ADN=5F=46ULLNAME, > > - ADN=5FNICKNAME > > -=7D; > > - > > -/* > > - * A fullname contains the network name of the client, > > - * a conversation key and the window > > - */ > > -struct authdes=5Ffullname =7B > > - char *name; /* network name of client, up to MAXNETNAMELEN */ > > - des=5Fblock key; /* conversation key */ > > - u=5Flong window; /* associated window */ > > -=7D; > > - > > - > > -/* > > - * A credential > > - */ > > -struct authdes=5Fcred =7B > > - enum authdes=5Fnamekind adc=5Fnamekind; > > - struct authdes=5Ffullname adc=5Ffullname; > > - u=5Flong adc=5Fnickname; > > -=7D; > > - > > - > > - > > -/* > > - * A des authentication verifier > > - */ > > -struct authdes=5Fverf =7B > > - union =7B > > - struct timeval adv=5Fctime; /* clear time */ > > - des=5Fblock adv=5Fxtime; /* crypt time */ > > - =7D adv=5Ftime=5Fu; > > - u=5Flong adv=5Fint=5Fu; > > -=7D; > > - > > -/* > > - * des authentication verifier: client variety > > - * > > - * adv=5Ftimestamp is the current time. > > - * adv=5Fwinverf is the credential window + 1. > > - * Both are encrypted using the conversation key. > > - */ > > -=23define adv=5Ftimestamp adv=5Ftime=5Fu.adv=5Fctime > > -=23define adv=5Fxtimestamp adv=5Ftime=5Fu.adv=5Fxtime > > -=23define adv=5Fwinverf adv=5Fint=5Fu > > - > > -/* > > - * des authentication verifier: server variety > > - * > > - * adv=5Ftimeverf is the client's timestamp + client's window > > - * adv=5Fnickname is the server's nickname for the client. > > - * adv=5Ftimeverf is encrypted using the conversation key. > > - */ > > -=23define adv=5Ftimeverf adv=5Ftime=5Fu.adv=5Fctime > > -=23define adv=5Fxtimeverf adv=5Ftime=5Fu.adv=5Fxtime > > -=23define adv=5Fnickname adv=5Fint=5Fu > > - > > -/* > > - * Map a des credential into a unix cred. > > - * > > - */ > > -=5F=5FBEGIN=5FDECLS > > -extern int authdes=5Fgetucred( struct authdes=5Fcred *, uid=5Ft *, g= id=5Ft *, int *, gid=5Ft * ); > > -=5F=5FEND=5FDECLS > > - > > =5F=5FBEGIN=5FDECLS > > -extern bool=5Ft xdr=5Fauthdes=5Fcred(XDR *, struct authdes=5Fcred *)= ; > > -extern bool=5Ft xdr=5Fauthdes=5Fverf(XDR *, struct authdes=5Fverf *)= ; > > extern int rtime(dev=5Ft, struct netbuf *, int, struct timeval *, > > struct timeval *); > > -extern void kgetnetname(char *); > > -extern enum auth=5Fstat =5Fsvcauth=5Fdes(struct svc=5Freq *, struct = rpc=5Fmsg *); > > =5F=5FEND=5FDECLS > > > > =23endif /* ndef =5FAUTH=5FDES=5F */ > > diff --git a/lib/libc/rpc/Symbol.map b/lib/libc/rpc/Symbol.map > > index 105d6fb6b54e..61e8e084b1e0 100644 > > --- a/lib/libc/rpc/Symbol.map > > +++ b/lib/libc/rpc/Symbol.map > > =40=40 -8,13 +8,9 =40=40 =46BSD=5F1.0 =7B > > xdr=5Fdesargs; > > xdr=5Fdesresp; > > > > - authdes=5Fseccreate; > > - authdes=5Fpk=5Fseccreate; > > authnone=5Fcreate; > > authunix=5Fcreate; > > authunix=5Fcreate=5Fdefault; > > - xdr=5Fauthdes=5Fcred; > > - xdr=5Fauthdes=5Fverf; > > xdr=5Fauthunix=5Fparms; > > bindresvport; > > bindresvport=5Fsa; > > =40=40 -58,15 +54,6 =40=40 =46BSD=5F1.0 =7B > > endrpcent; > > getrpcent; > > getrpcport; > > - key=5Fsetsecret; > > - key=5Fsecretkey=5Fis=5Fset; > > - key=5Fencryptsession=5Fpk; > > - key=5Fdecryptsession=5Fpk; > > - key=5Fencryptsession; > > - key=5Fdecryptsession; > > - key=5Fgendes; > > - key=5Fsetnet; > > - key=5Fget=5Fconv; > > xdr=5Fkeystatus; > > xdr=5Fkeybuf; > > xdr=5Fnetnamestr; > > =40=40 -130,7 +117,6 =40=40 =46BSD=5F1.0 =7B > > callrpc; > > registerrpc; > > clnt=5Fbroadcast; > > - authdes=5Fcreate; > > clntunix=5Fcreate; > > svcunix=5Fcreate; > > svcunixfd=5Fcreate; > > =40=40 -180,8 +166,6 =40=40 =46BSD=5F1.0 =7B > > =5Fauthenticate; > > =5Fsvcauth=5Fnull; > > svc=5Fauth=5Freg; > > - =5Fsvcauth=5Fdes; > > - authdes=5Fgetucred; > > =5Fsvcauth=5Funix; > > =5Fsvcauth=5Fshort; > > svc=5Fdg=5Fcreate; > > =40=40 -205,9 +189,6 =40=40 =46BSD=5F1.8 =7B > > > > =46BSDprivate=5F1.0 =7B > > =5F=5Fdes=5Fcrypt=5FLOCAL; > > - =5F=5Fkey=5Fencryptsession=5Fpk=5FLOCAL; > > - =5F=5Fkey=5Fdecryptsession=5Fpk=5FLOCAL; > > - =5F=5Fkey=5Fgendes=5FLOCAL; > > =5F=5Fsvc=5Fclean=5Fidle; > > =5F=5Frpc=5Fgss=5Funwrap; > > =5F=5Frpc=5Fgss=5Funwrap=5Fstub; > > diff --git a/lib/libc/rpc/auth=5Fdes.c b/lib/libc/rpc/auth=5Fdes.c > > index c9b20de25cda..754d55cbed3e 100644 > > --- a/lib/libc/rpc/auth=5Fdes.c > > +++ b/lib/libc/rpc/auth=5Fdes.c > > =40=40 -30,463 +30,34 =40=40 > > /* > > * Copyright (c) 1988 by Sun Microsystems, Inc. > > */ > > + > > /* > > - * auth=5Fdes.c, client-side implementation of DES authentication > > + * Secure RPC DES authentication was removed in =46reeBSD 15.0. > > + * These symbols are provided for backward compatibility, but provid= e no > > + * functionality and will always return an error. > > */ > > > > =23include =22namespace.h=22 > > =23include =22reentrant.h=22 > > -=23include > > -=23include > > -=23include > > -=23include > > -=23include > > -=23include > > -=23include > > =23include > > =23include > > =23include > > -=23include > > -=23include > > -=23include > > -=23undef NIS > > =23include > > =23include =22un-namespace.h=22 > > -=23include =22mt=5Fmisc.h=22 > > - > > -=23define USEC=5FPER=5FSEC 1000000 > > -=23define RTIME=5FTIMEOUT 5 /* seconds to wait for sync */ > > - > > -=23define AUTH=5FPRIVATE(auth) (struct ad=5Fprivate *) auth->ah=5Fpr= ivate > > -=23define ALLOC(object=5Ftype) (object=5Ftype *) mem=5Falloc(sizeof(= object=5Ftype)) > > -=23define =46REE(ptr, size) mem=5Ffree((char *)(ptr), (int) size) > > -=23define ATTEMPT(xdr=5Fop) if (=21(xdr=5Fop)) return (=46ALSE) > > - > > -extern bool=5Ft xdr=5Fauthdes=5Fcred( XDR *, struct authdes=5Fcred *= ); > > -extern bool=5Ft xdr=5Fauthdes=5Fverf( XDR *, struct authdes=5Fverf *= ); > > -extern int key=5Fencryptsession=5Fpk(char *, netobj *, des=5Fblock *= ); > > - > > -extern bool=5Ft =5F=5Frpc=5Fget=5Ftime=5Foffset(struct timeval *, ni= s=5Fserver *, char *, > > - char **, char **); > > > > -/* > > - * DES authenticator operations vector > > - */ > > -static void authdes=5Fnextverf(AUTH *); > > -static bool=5Ft authdes=5Fmarshal(AUTH *, XDR *); > > -static bool=5Ft authdes=5Fvalidate(AUTH *, struct opaque=5Fauth *); > > -static bool=5Ft authdes=5Frefresh(AUTH *, void *); > > -static void authdes=5Fdestroy(AUTH *); > > - > > -static struct auth=5Fops *authdes=5Fops(void); > > - > > -/* > > - * This struct is pointed to by the ah=5Fprivate field of an =22AUTH= *=22 > > - */ > > -struct ad=5Fprivate =7B > > - char *ad=5Ffullname; /* client's full name */ > > - u=5Fint ad=5Ffullnamelen; /* length of name, rounded up */ > > - char *ad=5Fservername; /* server's full name */ > > - u=5Fint ad=5Fservernamelen; /* length of name, rounded up */ > > - u=5Fint ad=5Fwindow; /* client specified window */ > > - bool=5Ft ad=5Fdosync; /* synchronize=3F */ > > - struct netbuf ad=5Fsyncaddr; /* remote host to synch with */ > > - char *ad=5Ftimehost; /* remote host to synch with */ > > - struct timeval ad=5Ftimediff; /* server's time - client's time */ > > - u=5Fint ad=5Fnickname; /* server's nickname for client */ > > - struct authdes=5Fcred ad=5Fcred; /* storage for credential */ > > - struct authdes=5Fverf ad=5Fverf; /* storage for verifier */ > > - struct timeval ad=5Ftimestamp; /* timestamp sent */ > > - des=5Fblock ad=5Fxkey; /* encrypted conversation key */ > > - u=5Fchar ad=5Fpkey=5B1024=5D; /* Server's actual public key */ > > - char *ad=5Fnetid; /* Timehost netid */ > > - char *ad=5Fuaddr; /* Timehost uaddr */ > > - nis=5Fserver *ad=5Fnis=5Fsrvr; /* NIS+ server struct */ > > -=7D; > > - > > -AUTH *authdes=5Fpk=5Fseccreate(const char *, netobj *, u=5Fint, cons= t char *, > > - const des=5Fblock *, nis=5Fserver *); > > - > > -/* > > - * documented version of authdes=5Fseccreate > > - */ > > -/* > > - servername: network name of server > > - win: time to live > > - timehost: optional hostname to sync with > > - ckey: optional conversation key to use > > -*/ > > - > > -AUTH * > > -authdes=5Fseccreate(const char *servername, const u=5Fint win, > > +static AUTH * > > +=5F=5Fauthdes=5Fseccreate(const char *servername, const u=5Fint win,= > > const char *timehost, const des=5Fblock *ckey) > > =7B > > - u=5Fchar pkey=5Fdata=5B1024=5D; > > - netobj pkey; > > - AUTH *dummy; > > - > > - if (=21 getpublickey(servername, (char *) pkey=5Fdata)) =7B > > - syslog(LOG=5FERR, > > - =22authdes=5Fseccreate: no public key found for %s=22, > > - servername); > > - return (NULL); > > - =7D > > - > > - pkey.n=5Fbytes =3D (char *) pkey=5Fdata; > > - pkey.n=5Flen =3D (u=5Fint)strlen((char *)pkey=5Fdata) + 1; > > - dummy =3D authdes=5Fpk=5Fseccreate(servername, &pkey, win, timehost= , > > - ckey, NULL); > > - return (dummy); > > -=7D > > - > > -/* > > - * Slightly modified version of authdessec=5Fcreate which takes the = public key > > - * of the server principal as an argument. This spares us a call to > > - * getpublickey() which in the nameserver context can cause a deadlo= ck. > > - */ > > -AUTH * > > -authdes=5Fpk=5Fseccreate(const char *servername, netobj *pkey, u=5Fi= nt window, > > - const char *timehost, const des=5Fblock *ckey, nis=5Fserver *srvr) > > -=7B > > - AUTH *auth; > > - struct ad=5Fprivate *ad; > > - char namebuf=5BMAXNETNAMELEN+1=5D; > > - > > - /* > > - * Allocate everything now > > - */ > > - auth =3D ALLOC(AUTH); > > - if (auth =3D=3D NULL) =7B > > - syslog(LOG=5FERR, =22authdes=5Fpk=5Fseccreate: out of memory=22); > > - return (NULL); > > - =7D > > - ad =3D ALLOC(struct ad=5Fprivate); > > - if (ad =3D=3D NULL) =7B > > - syslog(LOG=5FERR, =22authdes=5Fpk=5Fseccreate: out of memory=22); > > - goto failed; > > - =7D > > - ad->ad=5Ffullname =3D ad->ad=5Fservername =3D NULL; /* Sanity reaso= ns */ > > - ad->ad=5Ftimehost =3D NULL; > > - ad->ad=5Fnetid =3D NULL; > > - ad->ad=5Fuaddr =3D NULL; > > - ad->ad=5Fnis=5Fsrvr =3D NULL; > > - ad->ad=5Ftimediff.tv=5Fsec =3D 0; > > - ad->ad=5Ftimediff.tv=5Fusec =3D 0; > > - memcpy(ad->ad=5Fpkey, pkey->n=5Fbytes, pkey->n=5Flen); > > - if (=21getnetname(namebuf)) > > - goto failed; > > - ad->ad=5Ffullnamelen =3D RNDUP((u=5Fint) strlen(namebuf)); > > - ad->ad=5Ffullname =3D (char *)mem=5Falloc(ad->ad=5Ffullnamelen + 1)= ; > > - ad->ad=5Fservernamelen =3D strlen(servername); > > - ad->ad=5Fservername =3D (char *)mem=5Falloc(ad->ad=5Fservernamelen = + 1); > > - > > - if (ad->ad=5Ffullname =3D=3D NULL =7C=7C ad->ad=5Fservername =3D=3D= NULL) =7B > > - syslog(LOG=5FERR, =22authdes=5Fseccreate: out of memory=22); > > - goto failed; > > - =7D > > - if (timehost =21=3D NULL) =7B > > - ad->ad=5Ftimehost =3D (char *)mem=5Falloc(strlen(timehost) + 1); > > - if (ad->ad=5Ftimehost =3D=3D NULL) =7B > > - syslog(LOG=5FERR, =22authdes=5Fseccreate: out of memory=22); > > - goto failed; > > - =7D > > - memcpy(ad->ad=5Ftimehost, timehost, strlen(timehost) + 1); > > - ad->ad=5Fdosync =3D TRUE; > > - =7D else if (srvr =21=3D NULL) =7B > > - ad->ad=5Fnis=5Fsrvr =3D srvr; /* transient */ > > - ad->ad=5Fdosync =3D TRUE; > > - =7D else =7B > > - ad->ad=5Fdosync =3D =46ALSE; > > - =7D > > - memcpy(ad->ad=5Ffullname, namebuf, ad->ad=5Ffullnamelen + 1); > > - memcpy(ad->ad=5Fservername, servername, ad->ad=5Fservernamelen + 1)= ; > > - ad->ad=5Fwindow =3D window; > > - if (ckey =3D=3D NULL) =7B > > - if (key=5Fgendes(&auth->ah=5Fkey) < 0) =7B > > - syslog(LOG=5FERR, > > - =22authdes=5Fseccreate: keyserv(1m) is unable to generate session k= ey=22); > > - goto failed; > > - =7D > > - =7D else =7B > > - auth->ah=5Fkey =3D *ckey; > > - =7D > > - > > - /* > > - * Set up auth handle > > - */ > > - auth->ah=5Fcred.oa=5Fflavor =3D AUTH=5FDES; > > - auth->ah=5Fverf.oa=5Fflavor =3D AUTH=5FDES; > > - auth->ah=5Fops =3D authdes=5Fops(); > > - auth->ah=5Fprivate =3D (caddr=5Ft)ad; > > - > > - if (=21authdes=5Frefresh(auth, NULL)) =7B > > - goto failed; > > - =7D > > - ad->ad=5Fnis=5Fsrvr =3D NULL; /* not needed any longer */ > > - return (auth); > > - > > -failed: > > - if (auth) > > - =46REE(auth, sizeof (AUTH)); > > - if (ad) =7B > > - if (ad->ad=5Ffullname) > > - =46REE(ad->ad=5Ffullname, ad->ad=5Ffullnamelen + 1); > > - if (ad->ad=5Fservername) > > - =46REE(ad->ad=5Fservername, ad->ad=5Fservernamelen + 1); > > - if (ad->ad=5Ftimehost) > > - =46REE(ad->ad=5Ftimehost, strlen(ad->ad=5Ftimehost) + 1); > > - if (ad->ad=5Fnetid) > > - =46REE(ad->ad=5Fnetid, strlen(ad->ad=5Fnetid) + 1); > > - if (ad->ad=5Fuaddr) > > - =46REE(ad->ad=5Fuaddr, strlen(ad->ad=5Fuaddr) + 1); > > - =46REE(ad, sizeof (struct ad=5Fprivate)); > > - =7D > > return (NULL); > > =7D > > +=5F=5Fsym=5Fcompat(authdes=5Fseccreate, =5F=5Fauthdes=5Fseccreate, =46= BSD=5F1.0); > > > > -/* > > - * Implement the five authentication operations > > - */ > > - > > - > > -/* > > - * 1. Next Verifier > > - */ > > -/*ARGSUSED*/ > > -static void > > -authdes=5Fnextverf(AUTH *auth =5F=5Funused) > > +static AUTH * > > +=5F=5Fauthdes=5Fpk=5Fseccreate(const char *servername =5F=5Funused, = netobj *pkey =5F=5Funused, > > + u=5Fint window =5F=5Funused, const char *timehost =5F=5Funused, > > + const des=5Fblock *ckey =5F=5Funused, nis=5Fserver *srvr =5F=5Funus= ed) > > =7B > > - /* what the heck am I supposed to do=3F=3F=3F */ > > -=7D > > - > > - > > -/* > > - * 2. Marshal > > - */ > > -static bool=5Ft > > -authdes=5Fmarshal(AUTH *auth, XDR *xdrs) > > -=7B > > -/* LINTED pointer alignment */ > > - struct ad=5Fprivate *ad =3D AUTH=5FPRIVATE(auth); > > - struct authdes=5Fcred *cred =3D &ad->ad=5Fcred; > > - struct authdes=5Fverf *verf =3D &ad->ad=5Fverf; > > - des=5Fblock cryptbuf=5B2=5D; > > - des=5Fblock ivec; > > - int status; > > - int len; > > - rpc=5Finline=5Ft *ixdr; > > - > > - /* > > - * =46igure out the =22time=22, accounting for any time difference > > - * with the server if necessary. > > - */ > > - (void)gettimeofday(&ad->ad=5Ftimestamp, NULL); > > - ad->ad=5Ftimestamp.tv=5Fsec +=3D ad->ad=5Ftimediff.tv=5Fsec; > > - ad->ad=5Ftimestamp.tv=5Fusec +=3D ad->ad=5Ftimediff.tv=5Fusec; > > - while (ad->ad=5Ftimestamp.tv=5Fusec >=3D USEC=5FPER=5FSEC) =7B > > - ad->ad=5Ftimestamp.tv=5Fusec -=3D USEC=5FPER=5FSEC; > > - ad->ad=5Ftimestamp.tv=5Fsec++; > > - =7D > > - > > - /* > > - * XDR the timestamp and possibly some other things, then > > - * encrypt them. > > - */ > > - ixdr =3D (rpc=5Finline=5Ft *)cryptbuf; > > - IXDR=5FPUT=5FINT32(ixdr, ad->ad=5Ftimestamp.tv=5Fsec); > > - IXDR=5FPUT=5FINT32(ixdr, ad->ad=5Ftimestamp.tv=5Fusec); > > - if (ad->ad=5Fcred.adc=5Fnamekind =3D=3D ADN=5F=46ULLNAME) =7B > > - IXDR=5FPUT=5FU=5FINT32(ixdr, ad->ad=5Fwindow); > > - IXDR=5FPUT=5FU=5FINT32(ixdr, ad->ad=5Fwindow - 1); > > - ivec.key.high =3D ivec.key.low =3D 0; > > - status =3D cbc=5Fcrypt((char *)&auth->ah=5Fkey, (char *)cryptbuf, > > - (u=5Fint) 2 * sizeof (des=5Fblock), > > - DES=5FENCRYPT =7C DES=5FHW, (char *)&ivec); > > - =7D else =7B > > - status =3D ecb=5Fcrypt((char *)&auth->ah=5Fkey, (char *)cryptbuf, > > - (u=5Fint) sizeof (des=5Fblock), > > - DES=5FENCRYPT =7C DES=5FHW); > > - =7D > > - if (DES=5F=46AILED(status)) =7B > > - syslog(LOG=5FERR, =22authdes=5Fmarshal: DES encryption failure=22);= > > - return (=46ALSE); > > - =7D > > - ad->ad=5Fverf.adv=5Fxtimestamp =3D cryptbuf=5B0=5D; > > - if (ad->ad=5Fcred.adc=5Fnamekind =3D=3D ADN=5F=46ULLNAME) =7B > > - ad->ad=5Fcred.adc=5Ffullname.window =3D cryptbuf=5B1=5D.key.high; > > - ad->ad=5Fverf.adv=5Fwinverf =3D cryptbuf=5B1=5D.key.low; > > - =7D else =7B > > - ad->ad=5Fcred.adc=5Fnickname =3D ad->ad=5Fnickname; > > - ad->ad=5Fverf.adv=5Fwinverf =3D 0; > > - =7D > > - > > - /* > > - * Serialize the credential and verifier into opaque > > - * authentication data. > > - */ > > - if (ad->ad=5Fcred.adc=5Fnamekind =3D=3D ADN=5F=46ULLNAME) =7B > > - len =3D ((1 + 1 + 2 + 1)*BYTES=5FPER=5FXDR=5FUNIT + ad->ad=5Ffullna= melen); > > - =7D else =7B > > - len =3D (1 + 1)*BYTES=5FPER=5FXDR=5FUNIT; > > - =7D > > - > > - if ((ixdr =3D xdr=5Finline(xdrs, 2*BYTES=5FPER=5FXDR=5FUNIT))) =7B > > - IXDR=5FPUT=5FINT32(ixdr, AUTH=5FDES); > > - IXDR=5FPUT=5FINT32(ixdr, len); > > - =7D else =7B > > - ATTEMPT(xdr=5Fputint32(xdrs, (int *)&auth->ah=5Fcred.oa=5Fflavor));= > > - ATTEMPT(xdr=5Fputint32(xdrs, &len)); > > - =7D > > - ATTEMPT(xdr=5Fauthdes=5Fcred(xdrs, cred)); > > - > > - len =3D (2 + 1)*BYTES=5FPER=5FXDR=5FUNIT; > > - if ((ixdr =3D xdr=5Finline(xdrs, 2*BYTES=5FPER=5FXDR=5FUNIT))) =7B > > - IXDR=5FPUT=5FINT32(ixdr, AUTH=5FDES); > > - IXDR=5FPUT=5FINT32(ixdr, len); > > - =7D else =7B > > - ATTEMPT(xdr=5Fputint32(xdrs, (int *)&auth->ah=5Fverf.oa=5Fflavor));= > > - ATTEMPT(xdr=5Fputint32(xdrs, &len)); > > - =7D > > - ATTEMPT(xdr=5Fauthdes=5Fverf(xdrs, verf)); > > - return (TRUE); > > -=7D > > - > > - > > -/* > > - * 3. Validate > > - */ > > -static bool=5Ft > > -authdes=5Fvalidate(AUTH *auth, struct opaque=5Fauth *rverf) > > -=7B > > -/* LINTED pointer alignment */ > > - struct ad=5Fprivate *ad =3D AUTH=5FPRIVATE(auth); > > - struct authdes=5Fverf verf; > > - int status; > > - uint32=5Ft *ixdr; > > - des=5Fblock buf; > > - > > - if (rverf->oa=5Flength =21=3D (2 + 1) * BYTES=5FPER=5FXDR=5FUNIT) =7B= > > - return (=46ALSE); > > - =7D > > -/* LINTED pointer alignment */ > > - ixdr =3D (uint32=5Ft *)rverf->oa=5Fbase; > > - buf.key.high =3D (uint32=5Ft)*ixdr++; > > - buf.key.low =3D (uint32=5Ft)*ixdr++; > > - verf.adv=5Fint=5Fu =3D (uint32=5Ft)*ixdr++; > > - > > - /* > > - * Decrypt the timestamp > > - */ > > - status =3D ecb=5Fcrypt((char *)&auth->ah=5Fkey, (char *)&buf, > > - (u=5Fint)sizeof (des=5Fblock), DES=5FDECRYPT =7C DES=5FHW); > > - > > - if (DES=5F=46AILED(status)) =7B > > - syslog(LOG=5FERR, =22authdes=5Fvalidate: DES decryption failure=22)= ; > > - return (=46ALSE); > > - =7D > > - > > - /* > > - * xdr the decrypted timestamp > > - */ > > -/* LINTED pointer alignment */ > > - ixdr =3D (uint32=5Ft *)buf.c; > > - verf.adv=5Ftimestamp.tv=5Fsec =3D IXDR=5FGET=5FINT32(ixdr) + 1; > > - verf.adv=5Ftimestamp.tv=5Fusec =3D IXDR=5FGET=5FINT32(ixdr); > > - > > - /* > > - * validate > > - */ > > - if (bcmp((char *)&ad->ad=5Ftimestamp, (char *)&verf.adv=5Ftimestamp= , > > - sizeof(struct timeval)) =21=3D 0) =7B > > - syslog(LOG=5FDEBUG, =22authdes=5Fvalidate: verifier mismatch=22); > > - return (=46ALSE); > > - =7D > > - > > - /* > > - * We have a nickname now, let's use it > > - */ > > - ad->ad=5Fnickname =3D verf.adv=5Fnickname; > > - ad->ad=5Fcred.adc=5Fnamekind =3D ADN=5FNICKNAME; > > - return (TRUE); > > -=7D > > - > > -/* > > - * 4. Refresh > > - */ > > -/*ARGSUSED*/ > > -static bool=5Ft > > -authdes=5Frefresh(AUTH *auth, void *dummy =5F=5Funused) > > -=7B > > -/* LINTED pointer alignment */ > > - struct ad=5Fprivate *ad =3D AUTH=5FPRIVATE(auth); > > - struct authdes=5Fcred *cred =3D &ad->ad=5Fcred; > > - int ok; > > - netobj pkey; > > - > > - if (ad->ad=5Fdosync) =7B > > - ok =3D =5F=5Frpc=5Fget=5Ftime=5Foffset(&ad->ad=5Ftimediff, ad->ad=5F= nis=5Fsrvr, > > - ad->ad=5Ftimehost, &(ad->ad=5Fuaddr), > > - &(ad->ad=5Fnetid)); > > - if (=21 ok) =7B > > - /* > > - * Hope the clocks are synced=21 > > - */ > > - ad->ad=5Fdosync =3D 0; > > - syslog(LOG=5FDEBUG, > > - =22authdes=5Frefresh: unable to synchronize clock=22); > > - =7D > > - =7D > > - ad->ad=5Fxkey =3D auth->ah=5Fkey; > > - pkey.n=5Fbytes =3D (char *)(ad->ad=5Fpkey); > > - pkey.n=5Flen =3D (u=5Fint)strlen((char *)ad->ad=5Fpkey) + 1; > > - if (key=5Fencryptsession=5Fpk(ad->ad=5Fservername, &pkey, &ad->ad=5F= xkey) < 0) =7B > > - syslog(LOG=5FIN=46O, > > - =22authdes=5Frefresh: keyserv(1m) is unable to encrypt session key=22= ); > > - return (=46ALSE); > > - =7D > > - cred->adc=5Ffullname.key =3D ad->ad=5Fxkey; > > - cred->adc=5Fnamekind =3D ADN=5F=46ULLNAME; > > - cred->adc=5Ffullname.name =3D ad->ad=5Ffullname; > > - return (TRUE); > > -=7D > > - > > - > > -/* > > - * 5. Destroy > > - */ > > -static void > > -authdes=5Fdestroy(AUTH *auth) > > -=7B > > -/* LINTED pointer alignment */ > > - struct ad=5Fprivate *ad =3D AUTH=5FPRIVATE(auth); > > - > > - =46REE(ad->ad=5Ffullname, ad->ad=5Ffullnamelen + 1); > > - =46REE(ad->ad=5Fservername, ad->ad=5Fservernamelen + 1); > > - if (ad->ad=5Ftimehost) > > - =46REE(ad->ad=5Ftimehost, strlen(ad->ad=5Ftimehost) + 1); > > - if (ad->ad=5Fnetid) > > - =46REE(ad->ad=5Fnetid, strlen(ad->ad=5Fnetid) + 1); > > - if (ad->ad=5Fuaddr) > > - =46REE(ad->ad=5Fuaddr, strlen(ad->ad=5Fuaddr) + 1); > > - =46REE(ad, sizeof (struct ad=5Fprivate)); > > - =46REE(auth, sizeof(AUTH)); > > -=7D > > - > > -static struct auth=5Fops * > > -authdes=5Fops(void) > > -=7B > > - static struct auth=5Fops ops; > > - > > - /* VARIABLES PROTECTED BY ops=5Flock: ops */ > > - > > - mutex=5Flock(&authdes=5Fops=5Flock); > > - if (ops.ah=5Fnextverf =3D=3D NULL) =7B > > - ops.ah=5Fnextverf =3D authdes=5Fnextverf; > > - ops.ah=5Fmarshal =3D authdes=5Fmarshal; > > - ops.ah=5Fvalidate =3D authdes=5Fvalidate; > > - ops.ah=5Frefresh =3D authdes=5Frefresh; > > - ops.ah=5Fdestroy =3D authdes=5Fdestroy; > > - =7D > > - mutex=5Funlock(&authdes=5Fops=5Flock); > > - return (&ops); > > + return (NULL); > > =7D > > +=5F=5Fsym=5Fcompat(authdes=5Fpk=5Fseccreate, =5F=5Fauthdes=5Fpk=5Fse= ccreate, =46BSD=5F1.0); > > diff --git a/lib/libc/rpc/authdes=5Fprot.c b/lib/libc/rpc/authdes=5Fp= rot.c > > index 79a0e5baa084..56b44daafe41 100644 > > --- a/lib/libc/rpc/authdes=5Fprot.c > > +++ b/lib/libc/rpc/authdes=5Fprot.c > > =40=40 -42,44 +42,16 =40=40 > > =23include > > =23include =22un-namespace.h=22 > > > > -=23define ATTEMPT(xdr=5Fop) if (=21(xdr=5Fop)) return (=46ALSE) > > - > > -bool=5Ft > > -xdr=5Fauthdes=5Fcred(XDR *xdrs, struct authdes=5Fcred *cred) > > +static bool=5Ft > > +=5F=5Fxdr=5Fauthdes=5Fcred(XDR *xdrs, void *cred) > > =7B > > - enum authdes=5Fnamekind *padc=5Fnamekind =3D &cred->adc=5Fnamekind;= > > - /* > > - * Unrolled xdr > > - */ > > - ATTEMPT(xdr=5Fenum(xdrs, (enum=5Ft *) padc=5Fnamekind)); > > - switch (cred->adc=5Fnamekind) =7B > > - case ADN=5F=46ULLNAME: > > - ATTEMPT(xdr=5Fstring(xdrs, &cred->adc=5Ffullname.name, > > - MAXNETNAMELEN)); > > - ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&cred->adc=5Ffullname.key, > > - sizeof(des=5Fblock))); > > - ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&cred->adc=5Ffullname.window,= > > - sizeof(cred->adc=5Ffullname.window))); > > - return (TRUE); > > - case ADN=5FNICKNAME: > > - ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&cred->adc=5Fnickname, > > - sizeof(cred->adc=5Fnickname))); > > - return (TRUE); > > - default: > > - return (=46ALSE); > > - =7D > > + return (=46ALSE); > > =7D > > +=5F=5Fsym=5Fcompat(xdr=5Fauthdes=5Fcred, =5F=5Fxdr=5Fauthdes=5Fcred,= =46BSD=5F1.0); > > > > - > > -bool=5Ft > > -xdr=5Fauthdes=5Fverf(XDR *xdrs, struct authdes=5Fverf *verf) > > +static bool=5Ft > > +=5F=5Fxdr=5Fauthdes=5Fverf(XDR *xdrs, void *verf) > > =7B > > - /* > > - * Unrolled xdr > > - */ > > - ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&verf->adv=5Fxtimestamp, > > - sizeof(des=5Fblock))); > > - ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&verf->adv=5Fint=5Fu, > > - sizeof(verf->adv=5Fint=5Fu))); > > - return (TRUE); > > + return (=46ALSE); > > =7D > > +=5F=5Fsym=5Fcompat(xdr=5Fauthdes=5Fverf, =5F=5Fxdr=5Fauthdes=5Fverf,= =46BSD=5F1.0); > > diff --git a/lib/libc/rpc/key=5Fcall.c b/lib/libc/rpc/key=5Fcall.c > > index 5c87881c815c..eb274fcfff36 100644 > > --- a/lib/libc/rpc/key=5Fcall.c > > +++ b/lib/libc/rpc/key=5Fcall.c > > =40=40 -32,426 +32,78 =40=40 > > */ > > > > /* > > - * key=5Fcall.c, Interface to keyserver > > - * > > - * setsecretkey(key) - set your secret key > > - * encryptsessionkey(agent, deskey) - encrypt a session key to talk = to agent > > - * decryptsessionkey(agent, deskey) - decrypt ditto > > - * gendeskey(deskey) - generate a secure des key > > + * Secure RPC keyserver support was removed in =46reeBSD 15.0. > > + * These symbols are provided for backward compatibility, but provid= e no > > + * functionality and will always return an error. > > */ > > > > =23include =22namespace.h=22 > > =23include =22reentrant.h=22 > > -=23include > > -=23include > > -=23include > > -=23include > > =23include > > -=23include > > -=23include > > =23include > > -=23include > > -=23include > > -=23include > > -=23include > > -=23include > > -=23include > > -=23include > > +=23include > > =23include =22un-namespace.h=22 > > =23include =22mt=5Fmisc.h=22 > > > > - > > -=23define KEY=5FTIMEOUT 5 /* per-try timeout in seconds */ > > -=23define KEY=5FNRETRY 12 /* number of retries */ > > - > > -=23ifdef DEBUG > > -=23define debug(msg) (void) fprintf(stderr, =22%s=5Cn=22, msg); > > -=23else > > -=23define debug(msg) > > -=23endif /* DEBUG */ > > - > > -/* > > - * Hack to allow the keyserver to use AUTH=5FDES (for authenticated > > - * NIS+ calls, for example). The only functions that get called > > - * are key=5Fencryptsession=5Fpk, key=5Fdecryptsession=5Fpk, and key= =5Fgendes. > > - * > > - * The approach is to have the keyserver fill in pointers to local > > - * implementations of these functions, and to call those in key=5Fca= ll(). > > - */ > > - > > -cryptkeyres *(*=5F=5Fkey=5Fencryptsession=5Fpk=5FLOCAL)(uid=5Ft, voi= d *arg) =3D 0; > > -cryptkeyres *(*=5F=5Fkey=5Fdecryptsession=5Fpk=5FLOCAL)(uid=5Ft, voi= d *arg) =3D 0; > > -des=5Fblock *(*=5F=5Fkey=5Fgendes=5FLOCAL)(uid=5Ft, void *) =3D 0; > > - > > -static int key=5Fcall( u=5Flong, xdrproc=5Ft, void *, xdrproc=5Ft, v= oid *); > > - > > -int > > -key=5Fsetsecret(const char *secretkey) > > -=7B > > - keystatus status; > > - > > - if (=21key=5Fcall((u=5Flong) KEY=5FSET, (xdrproc=5Ft)xdr=5Fkeybuf, > > - (void *)secretkey, > > - (xdrproc=5Ft)xdr=5Fkeystatus, &status)) =7B > > - return (-1); > > - =7D > > - if (status =21=3D KEY=5FSUCCESS) =7B > > - debug(=22set status is nonzero=22); > > - return (-1); > > - =7D > > - return (0); > > -=7D > > - > > - > > -/* key=5Fsecretkey=5Fis=5Fset() returns 1 if the keyserver has a sec= ret key > > - * stored for the caller's effective uid; it returns 0 otherwise > > - * > > - * N.B.: The KEY=5FNET=5FGET key call is undocumented. Applications = shouldn't > > - * be using it, because it allows them to get the user's secret key.= > > - */ > > - > > -int > > -key=5Fsecretkey=5Fis=5Fset(void) > > -=7B > > - struct key=5Fnetstres kres; > > - > > - memset((void*)&kres, 0, sizeof (kres)); > > - if (key=5Fcall((u=5Flong) KEY=5FNET=5FGET, (xdrproc=5Ft)xdr=5Fvoid,= NULL, > > - (xdrproc=5Ft)xdr=5Fkey=5Fnetstres, &kres) && > > - (kres.status =3D=3D KEY=5FSUCCESS) && > > - (kres.key=5Fnetstres=5Fu.knet.st=5Fpriv=5Fkey=5B0=5D =21=3D 0)) =7B= > > - /* avoid leaving secret key in memory */ > > - memset(kres.key=5Fnetstres=5Fu.knet.st=5Fpriv=5Fkey, 0, HEXKEYBYTES= ); > > - return (1); > > - =7D > > - return (0); > > -=7D > > - > > -int > > -key=5Fencryptsession=5Fpk(char *remotename, netobj *remotekey, des=5F= block *deskey) > > -=7B > > - cryptkeyarg2 arg; > > - cryptkeyres res; > > - > > - arg.remotename =3D remotename; > > - arg.remotekey =3D *remotekey; > > - arg.deskey =3D *deskey; > > - if (=21key=5Fcall((u=5Flong)KEY=5FENCRYPT=5FPK, (xdrproc=5Ft)xdr=5F= cryptkeyarg2, &arg, > > - (xdrproc=5Ft)xdr=5Fcryptkeyres, &res)) =7B > > - return (-1); > > - =7D > > - if (res.status =21=3D KEY=5FSUCCESS) =7B > > - debug(=22encrypt status is nonzero=22); > > - return (-1); > > - =7D > > - *deskey =3D res.cryptkeyres=5Fu.deskey; > > - return (0); > > -=7D > > - > > -int > > -key=5Fdecryptsession=5Fpk(char *remotename, netobj *remotekey, des=5F= block *deskey) > > -=7B > > - cryptkeyarg2 arg; > > - cryptkeyres res; > > - > > - arg.remotename =3D remotename; > > - arg.remotekey =3D *remotekey; > > - arg.deskey =3D *deskey; > > - if (=21key=5Fcall((u=5Flong)KEY=5FDECRYPT=5FPK, (xdrproc=5Ft)xdr=5F= cryptkeyarg2, &arg, > > - (xdrproc=5Ft)xdr=5Fcryptkeyres, &res)) =7B > > - return (-1); > > - =7D > > - if (res.status =21=3D KEY=5FSUCCESS) =7B > > - debug(=22decrypt status is nonzero=22); > > - return (-1); > > - =7D > > - *deskey =3D res.cryptkeyres=5Fu.deskey; > > - return (0); > > -=7D > > - > > -int > > -key=5Fencryptsession(const char *remotename, des=5Fblock *deskey) > > +static int > > +=5F=5Fkey=5Fsetsecret(const char *secretkey) > > =7B > > - cryptkeyarg arg; > > - cryptkeyres res; > > - > > - arg.remotename =3D (char *) remotename; > > - arg.deskey =3D *deskey; > > - if (=21key=5Fcall((u=5Flong)KEY=5FENCRYPT, (xdrproc=5Ft)xdr=5Fcrypt= keyarg, &arg, > > - (xdrproc=5Ft)xdr=5Fcryptkeyres, &res)) =7B > > - return (-1); > > - =7D > > - if (res.status =21=3D KEY=5FSUCCESS) =7B > > - debug(=22encrypt status is nonzero=22); > > - return (-1); > > - =7D > > - *deskey =3D res.cryptkeyres=5Fu.deskey; > > - return (0); > > + return (-1); > > =7D > > +=5F=5Fsym=5Fcompat(key=5Fsetsecret, =5F=5Fkey=5Fsetsecret, =46BSD=5F= 1.0); > > > > -int > > -key=5Fdecryptsession(const char *remotename, des=5Fblock *deskey) > > +static int > > +=5F=5Fkey=5Fsecretkey=5Fis=5Fset(void) > > =7B > > - cryptkeyarg arg; > > - cryptkeyres res; > > - > > - arg.remotename =3D (char *) remotename; > > - arg.deskey =3D *deskey; > > - if (=21key=5Fcall((u=5Flong)KEY=5FDECRYPT, (xdrproc=5Ft)xdr=5Fcrypt= keyarg, &arg, > > - (xdrproc=5Ft)xdr=5Fcryptkeyres, &res)) =7B > > - return (-1); > > - =7D > > - if (res.status =21=3D KEY=5FSUCCESS) =7B > > - debug(=22decrypt status is nonzero=22); > > - return (-1); > > - =7D > > - *deskey =3D res.cryptkeyres=5Fu.deskey; > > return (0); > > =7D > > +=5F=5Fsym=5Fcompat(key=5Fsecretkey=5Fis=5Fset, =5F=5Fkey=5Fsecretkey= =5Fis=5Fset, =46BSD=5F1.0); > > > > -int > > -key=5Fgendes(des=5Fblock *key) > > +static int > > +=5F=5Fkey=5Fencryptsession=5Fpk(char *remotename, netobj *remotekey,= des=5Fblock *deskey) > > =7B > > - if (=21key=5Fcall((u=5Flong)KEY=5FGEN, (xdrproc=5Ft)xdr=5Fvoid, NUL= L, > > - (xdrproc=5Ft)xdr=5Fdes=5Fblock, key)) =7B > > - return (-1); > > - =7D > > - return (0); > > + return (-1); > > =7D > > +=5F=5Fsym=5Fcompat(key=5Fencryptsession=5Fpk, =5F=5Fkey=5Fencryptses= sion=5Fpk, =46BSD=5F1.0); > > > > -int > > -key=5Fsetnet(struct key=5Fnetstarg *arg) > > +static int > > +=5F=5Fkey=5Fdecryptsession=5Fpk(char *remotename, netobj *remotekey,= des=5Fblock *deskey) > > =7B > > *** 2726 LINES SKIPPED *** > > --689b40a3_2336c6b7_50e Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline <= meta name=3D=22viewport=22 content=3D=22width=3Ddevice-width, initial-sca= le=3D1.0, user-scalable=3Dno=22>
All xservers are affected.=C2=A0

However, upstream already deal with it in commit=C2=A0https://gitlab.freedes= ktop.org/xorg/xserver/-/commit/71b207a2ebc1465c7d9ad9262f60930f6a1d42ee

--
Dima. (desktop, kde, x11, office, ports-secteam)=40=46re= eBSD team
(fluffy=40=46reeBSD.org, https://t.me/=46luffyBSD)

On =D0=B2=D1= =82=D0=BE=D1=80=D0=BD=D0=B8=D0=BA, =D0=B0=D0=B2=D0=B3. 12, 2025 at 1:41 P= M, Dima Panov <fluffy=40= =46reeBSD.org> wrote:
Hello=21

This commit breaks x11-serve= r/xwayland

=46AILED: os/liblibxserver=5Fos.a.p/r= pcauth.c.o =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 cc -Ios/liblibxserver=5Fos.a.p -Ios -I../os -I. -I.= . -IXext -I../Xext -IXi -I../Xi -Icomposite -I../composite -Idamageext -I= ../damageext -Ifb -I../fb -Iglamor -I../glamor -Imi -I../mi -Imiext/damag= e -I../miext/damage -Imiext/sync -I../miext/sync -Idbe -I../dbe -Idix -I.= ./dix -Idri3 -I../dri3 -Iinclude -I../include -Ipresent -I../present -Ira= ndr -I../randr -Irender -I../render -Ixfixes -I../xfixes -I/usr/local/inc= lude -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/= local/include/libpng16 -fdiagnostics-color=3Dnever -D=5F=46ILE=5FO=46=46S= ET=5FBITS=3D64 -Wall -Winvalid-pch -std=3Dgnu99 -DHAVE=5FDIX=5FCON=46IG=5F= H -fno-strict-aliasing -fvisibility=3Dhidden -Wall -Wpointer-arith -Wmiss= ing-declarations -Wformat=3D2 -Wstrict-prototypes -Wmissing-prototypes -W= nested-externs -Wbad-function-cast -Wold-style-definition -Wunused -Wunin= itialized -Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredund= ant-decls -Werror=3Dimplicit -Werror=3Dnonnull -Werror=3Dinit-self -Werro= r=3Dmain -Werror=3Dmissing-braces -Werror=3Dsequence-point -Werror=3Dretu= rn-type -Werror=3Dtrigraphs -Werror=3Darray-bounds -Werror=3Dwrite-string= s -Werror=3Daddress -Werror=3Dint-to-pointer-cast -Werror=3Dpointer-to-in= t-cast -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -D=5F= THREAD=5FSA=46E -D=5FDE=46AULT=5FSOURCE -D=5FBSD=5FSOURCE -DHAS=5F=46CHOW= N -DHAS=5FSTICKY=5FDIR=5FBIT -DCLIENTIDS -MD -MQ os/liblibxserver=5Fos.a.= p/rpcauth.c.o -M=46 os/liblibxserver=5Fos.a.p/rpcauth.c.o.d -o os/liblibx= server=5Fos.a.p/rpcauth.c.o -c ../os/rpcauth.c =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 ../os/rpcauth.c:110:52: error: incomplete de= finition of type 'struct authdes=5Fcred' =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0110= =7C =C2=A0 =C2=A0 return (((struct authdes=5Fcred *) r.rq=5Fclntcred)-&g= t;adc=5Ffullname.name); =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0=7C =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =7E=7E=7E=7E=7E=7E=7E=7E= =7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E=7E= =7E=7E=7E=7E=7E=7E=5E =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0../os/rpcauth.c:110:22: = note: forward declaration of 'struct authdes=5Fcred' =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0110 =7C =C2=A0 =C2=A0 return (((str= uct authdes=5Fcred *) r.rq=5Fclntcred)->adc=5Ffullname.name); =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=7C =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=5E =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A01 error generated.

--
=
Dima. (desktop, kde, x11, office, ports-secteam)=40=46reeBSD team
(fluffy=40=46reeBSD.org, https://t.me/=46luffyBSD)

<= blockquote id=3D=22=22>
On =D0=B2=D0=BE=D1=81=D0=BA=D1=80=D0=B5= =D1=81=D0=B5=D0=BD=D1=8C=D0=B5, =D0=B0=D0=B2=D0=B3. 10, 2025 at 6:37 PM, = Lexi Winter <ivy=40=46reeBS= D.org> wrote:
The branch main has been updated by i= vy:

URL: https://cgit.=46reeBSD.org/src/commit/=3Fid=3D7ac276298= b72982189ac1a5b17461936dc00163e

commit 7ac276298b72982189ac1a5b1= 7461936dc00163e
Author: Lexi Winter <ivy=40=46reeBSD.org>
A= uthorDate: 2025-08-10 12:57:36 +0000
Commit: Lexi Winter <ivy=40=46= reeBSD.org>
CommitDate: 2025-08-10 15:36:40 +0000

Remove= Secure RPC DES authentication

=46ollowing the earlier removal = of keyserv, none of this functionality
works since it requires keyse= rv.

Remove the relevant symbols from libc's Symbol.map. Leave c= ompatibility
symbols for existing applications, but since the functi= ons don't work
without keyserv, stub them out to return an error.
Remove some private symbols that were only used by keyserv; these= don't
get compatibility symbols.

Remove the documentation= for the old functions.

Remove rpc.ypupdated since it requires = DES authentication.

Reviewed by: manu, des, emaste
Differe= ntial Revision: https://reviews.freebsd.org/D50442
---
Obsolete=46= iles.inc =7C 4 +
include/rpc/auth=5Fdes.h =7C 79 +----
lib/libc= /rpc/Symbol.map =7C 19 --
lib/libc/rpc/auth=5Fdes.c =7C 455 +-------= ---------------------
lib/libc/rpc/authdes=5Fprot.c =7C 44 +--
= lib/libc/rpc/key=5Fcall.c =7C 424 +++------------------------
lib/li= bc/rpc/publickey.5 =7C 40 ---
lib/libc/rpc/rpc=5Fsecure.3 =7C 177 +-= ----------
lib/libc/rpc/rpc=5Fsoc.3 =7C 13 +-
lib/libc/rpc/rpc=5F= soc.c =7C 31 +-
lib/libc/rpc/svc=5Fauth.c =7C 8 -
lib/libc/rpc/= svc=5Fauth=5Fdes.c =7C 460 +-----------------------------
lib/librpc= svc/Makefile =7C 2 +-
lib/librpcsvc/yp=5Fupdate.c =7C 199 ----------= ---
libexec/rc/rc.conf =7C 1 -
libexec/rc/rc.d/Makefile =7C 1 -=
libexec/rc/rc.d/ypupdated =7C 35 ---
share/man/man5/rc.conf.5 = =7C 9 +-
sys/rpc/auth.h =7C 26 --
tools/build/mk/OptionalObsole= te=46iles.inc =7C 2 -
usr.sbin/Makefile =7C 1 -
usr.sbin/rpc.yp= updated/Makefile =7C 32 ---
usr.sbin/rpc.ypupdated/Makefile.depend =7C= 18 --
usr.sbin/rpc.ypupdated/update.c =7C 328 ---------------------=
usr.sbin/rpc.ypupdated/yp=5Fdbdelete.c =7C 68 -----
usr.sbin/r= pc.ypupdated/yp=5Fdbupdate.c =7C 147 ----------
usr.sbin/rpc.ypupdat= ed/ypupdate =7C 32 ---
usr.sbin/rpc.ypupdated/ypupdated=5Fextern.h =7C= 32 ---
usr.sbin/rpc.ypupdated/ypupdated=5Fmain.c =7C 287 ----------= ---------
usr.sbin/rpc.ypupdated/ypupdated=5Fserver.c =7C 227 ------= ---------
30 files changed, 83 insertions(+), 3118 deletions(-)
=
diff --git a/Obsolete=46iles.inc b/Obsolete=46iles.inc
index ec3= 24e82f86d..a6662d31829f 100644
--- a/Obsolete=46iles.inc
+++ b/Ob= solete=46iles.inc
=40=40 -51,6 +51,10 =40=40
=23 xargs -n1 =7C s= ort =7C uniq -d;
=23 done

+=23 20250810: Removal of remaini= ng Secure RPC (DES) bits
+OLD=5F=46ILES+=3Dusr/sbin/rpc.ypupdated +OLD=5F=46ILES+=3Detc/rc.d/ypupdated
+
=23 20250808: nvmfd remo= ved from base install
OLD=5F=46ILES+=3Dusr/sbin/nvmfd
OLD=5F=46= ILES+=3Dusr/share/man/man8/nvmfd.8.gz
diff --git a/include/rpc/auth=5F= des.h b/include/rpc/auth=5Fdes.h
index 0ff43c13139b..1b4943a74b8b 100= 644
--- a/include/rpc/auth=5Fdes.h
+++ b/include/rpc/auth=5Fdes.h=
=40=40 -33,91 +33,14 =40=40
* Copyright (c) 1986 - 1991 by Sun = Microsystems, Inc.
*/

-/*
- * auth=5Fdes.h, Protocol fo= r DES style authentication for RPC
- */
+/* Note, RPC DES authent= ication was removed in =46reeBSD 15.0. */

=23ifndef =5FAUTH=5FD= ES=5F
=23define =5FAUTH=5FDES=5F

-/*
- * There are two = kinds of =22names=22: fullnames and nicknames
- */
-enum authdes=5F= namekind =7B
- ADN=5F=46ULLNAME,
- ADN=5FNICKNAME
-=7D;
-=
-/*
- * A fullname contains the network name of the client,
= - * a conversation key and the window
- */
-struct authdes=5Ffull= name =7B
- char *name; /* network name of client, up to MAXNETNAMELEN= */
- des=5Fblock key; /* conversation key */
- u=5Flong window; = /* associated window */
-=7D;
-
-
-/*
- * A credentia= l
- */
-struct authdes=5Fcred =7B
- enum authdes=5Fnamekind a= dc=5Fnamekind;
- struct authdes=5Ffullname adc=5Ffullname;
- u=5F= long adc=5Fnickname;
-=7D;
-
-
-
-/*
- * A des au= thentication verifier
- */
-struct authdes=5Fverf =7B
- union= =7B
- struct timeval adv=5Fctime; /* clear time */
- des=5Fblock= adv=5Fxtime; /* crypt time */
- =7D adv=5Ftime=5Fu;
- u=5Flong a= dv=5Fint=5Fu;
-=7D;
-
-/*
- * des authentication verifier= : client variety
- *
- * adv=5Ftimestamp is the current time. - * adv=5Fwinverf is the credential window + 1.
- * Both are encrypt= ed using the conversation key.
- */
-=23define adv=5Ftimestamp ad= v=5Ftime=5Fu.adv=5Fctime
-=23define adv=5Fxtimestamp adv=5Ftime=5Fu.a= dv=5Fxtime
-=23define adv=5Fwinverf adv=5Fint=5Fu
-
-/*
-= * des authentication verifier: server variety
- *
- * adv=5Ftime= verf is the client's timestamp + client's window
- * adv=5Fnickname i= s the server's nickname for the client.
- * adv=5Ftimeverf is encrypt= ed using the conversation key.
- */
-=23define adv=5Ftimeverf adv= =5Ftime=5Fu.adv=5Fctime
-=23define adv=5Fxtimeverf adv=5Ftime=5Fu.adv= =5Fxtime
-=23define adv=5Fnickname adv=5Fint=5Fu
-
-/*
- = * Map a des credential into a unix cred.
- *
- */
-=5F=5FBEGI= N=5FDECLS
-extern int authdes=5Fgetucred( struct authdes=5Fcred *, ui= d=5Ft *, gid=5Ft *, int *, gid=5Ft * );
-=5F=5FEND=5FDECLS
-
= =5F=5FBEGIN=5FDECLS
-extern bool=5Ft xdr=5Fauthdes=5Fcred(XDR *, str= uct authdes=5Fcred *);
-extern bool=5Ft xdr=5Fauthdes=5Fverf(XDR *, s= truct authdes=5Fverf *);
extern int rtime(dev=5Ft, struct netbuf *, = int, struct timeval *,
struct timeval *);
-extern void kgetnetna= me(char *);
-extern enum auth=5Fstat =5Fsvcauth=5Fdes(struct svc=5Fre= q *, struct rpc=5Fmsg *);
=5F=5FEND=5FDECLS

=23endif /* nd= ef =5FAUTH=5FDES=5F */
diff --git a/lib/libc/rpc/Symbol.map b/lib/lib= c/rpc/Symbol.map
index 105d6fb6b54e..61e8e084b1e0 100644
--- a/li= b/libc/rpc/Symbol.map
+++ b/lib/libc/rpc/Symbol.map
=40=40 -8,13 = +8,9 =40=40 =46BSD=5F1.0 =7B
xdr=5Fdesargs;
xdr=5Fdesresp;
=
- authdes=5Fseccreate;
- authdes=5Fpk=5Fseccreate;
authnone= =5Fcreate;
authunix=5Fcreate;
authunix=5Fcreate=5Fdefault;
= - xdr=5Fauthdes=5Fcred;
- xdr=5Fauthdes=5Fverf;
xdr=5Fauthunix=5F= parms;
bindresvport;
bindresvport=5Fsa;
=40=40 -58,15 +54,6= =40=40 =46BSD=5F1.0 =7B
endrpcent;
getrpcent;
getrpcport;=
- key=5Fsetsecret;
- key=5Fsecretkey=5Fis=5Fset;
- key=5Fenc= ryptsession=5Fpk;
- key=5Fdecryptsession=5Fpk;
- key=5Fencryptses= sion;
- key=5Fdecryptsession;
- key=5Fgendes;
- key=5Fsetnet;=
- key=5Fget=5Fconv;
xdr=5Fkeystatus;
xdr=5Fkeybuf;
xd= r=5Fnetnamestr;
=40=40 -130,7 +117,6 =40=40 =46BSD=5F1.0 =7B
cal= lrpc;
registerrpc;
clnt=5Fbroadcast;
- authdes=5Fcreate; clntunix=5Fcreate;
svcunix=5Fcreate;
svcunixfd=5Fcreate; =40=40 -180,8 +166,6 =40=40 =46BSD=5F1.0 =7B
=5Fauthenticate;
= =5Fsvcauth=5Fnull;
svc=5Fauth=5Freg;
- =5Fsvcauth=5Fdes;
- a= uthdes=5Fgetucred;
=5Fsvcauth=5Funix;
=5Fsvcauth=5Fshort;
= svc=5Fdg=5Fcreate;
=40=40 -205,9 +189,6 =40=40 =46BSD=5F1.8 =7B
=
=46BSDprivate=5F1.0 =7B
=5F=5Fdes=5Fcrypt=5FLOCAL;
- =5F=5F= key=5Fencryptsession=5Fpk=5FLOCAL;
- =5F=5Fkey=5Fdecryptsession=5Fpk=5F= LOCAL;
- =5F=5Fkey=5Fgendes=5FLOCAL;
=5F=5Fsvc=5Fclean=5Fidle; <= br> =5F=5Frpc=5Fgss=5Funwrap;
=5F=5Frpc=5Fgss=5Funwrap=5Fstub;
d= iff --git a/lib/libc/rpc/auth=5Fdes.c b/lib/libc/rpc/auth=5Fdes.c
ind= ex c9b20de25cda..754d55cbed3e 100644
--- a/lib/libc/rpc/auth=5Fdes.c =
+++ b/lib/libc/rpc/auth=5Fdes.c
=40=40 -30,463 +30,34 =40=40
= /*
* Copyright (c) 1988 by Sun Microsystems, Inc.
*/
+ /*
- * auth=5Fdes.c, client-side implementation of DES authenticati= on
+ * Secure RPC DES authentication was removed in =46reeBSD 15.0. <= br>+ * These symbols are provided for backward compatibility, but provide= no
+ * functionality and will always return an error.
*/
<= br> =23include =22namespace.h=22
=23include =22reentrant.h=22
-=23= include <err.h>
-=23include <errno.h>
-=23include <= ;string.h>
-=23include <stdlib.h>
-=23include <unistd= .h>
-=23include <rpc/des=5Fcrypt.h>
-=23include <sysl= og.h>
=23include <rpc/types.h>
=23include <rpc/auth= .h>
=23include <rpc/auth=5Fdes.h>
-=23include <rpc/c= lnt.h>
-=23include <rpc/xdr.h>
-=23include <sys/socke= t.h>
-=23undef NIS
=23include <rpcsvc/nis.h>
=23in= clude =22un-namespace.h=22
-=23include =22mt=5Fmisc.h=22
-
-=23= define USEC=5FPER=5FSEC 1000000
-=23define RTIME=5FTIMEOUT 5 /* secon= ds to wait for sync */
-
-=23define AUTH=5FPRIVATE(auth) (struct = ad=5Fprivate *) auth->ah=5Fprivate
-=23define ALLOC(object=5Ftype)= (object=5Ftype *) mem=5Falloc(sizeof(object=5Ftype))
-=23define =46R= EE(ptr, size) mem=5Ffree((char *)(ptr), (int) size)
-=23define ATTEMP= T(xdr=5Fop) if (=21(xdr=5Fop)) return (=46ALSE)
-
-extern bool=5F= t xdr=5Fauthdes=5Fcred( XDR *, struct authdes=5Fcred *);
-extern bool= =5Ft xdr=5Fauthdes=5Fverf( XDR *, struct authdes=5Fverf *);
-extern i= nt key=5Fencryptsession=5Fpk(char *, netobj *, des=5Fblock *);
-
= -extern bool=5Ft =5F=5Frpc=5Fget=5Ftime=5Foffset(struct timeval *, nis=5F= server *, char *,
- char **, char **);

-/*
- * DES authe= nticator operations vector
- */
-static void authdes=5Fnextverf(A= UTH *);
-static bool=5Ft authdes=5Fmarshal(AUTH *, XDR *);
-stati= c bool=5Ft authdes=5Fvalidate(AUTH *, struct opaque=5Fauth *);
-stati= c bool=5Ft authdes=5Frefresh(AUTH *, void *);
-static void authdes=5F= destroy(AUTH *);
-
-static struct auth=5Fops *authdes=5Fops(void)= ;
-
-/*
- * This struct is pointed to by the ah=5Fprivate fie= ld of an =22AUTH *=22
- */
-struct ad=5Fprivate =7B
- char *a= d=5Ffullname; /* client's full name */
- u=5Fint ad=5Ffullnamelen; /*= length of name, rounded up */
- char *ad=5Fservername; /* server's f= ull name */
- u=5Fint ad=5Fservernamelen; /* length of name, rounded = up */
- u=5Fint ad=5Fwindow; /* client specified window */
- bool= =5Ft ad=5Fdosync; /* synchronize=3F */
- struct netbuf ad=5Fsyncaddr;= /* remote host to synch with */
- char *ad=5Ftimehost; /* remote hos= t to synch with */
- struct timeval ad=5Ftimediff; /* server's time -= client's time */
- u=5Fint ad=5Fnickname; /* server's nickname for c= lient */
- struct authdes=5Fcred ad=5Fcred; /* storage for credential= */
- struct authdes=5Fverf ad=5Fverf; /* storage for verifier */ - struct timeval ad=5Ftimestamp; /* timestamp sent */
- des=5Fblock = ad=5Fxkey; /* encrypted conversation key */
- u=5Fchar ad=5Fpkey=5B10= 24=5D; /* Server's actual public key */
- char *ad=5Fnetid; /* Timeho= st netid */
- char *ad=5Fuaddr; /* Timehost uaddr */
- nis=5Fserv= er *ad=5Fnis=5Fsrvr; /* NIS+ server struct */
-=7D;
-
-AUTH *= authdes=5Fpk=5Fseccreate(const char *, netobj *, u=5Fint, const char *, <= br>- const des=5Fblock *, nis=5Fserver *);
-
-/*
- * document= ed version of authdes=5Fseccreate
- */
-/*
- servername: netw= ork name of server
- win: time to live
- timehost: optional hostn= ame to sync with
- ckey: optional conversation key to use
-*/ -
-AUTH *
-authdes=5Fseccreate(const char *servername, const u=5F= int win,
+static AUTH *
+=5F=5Fauthdes=5Fseccreate(const char *se= rvername, const u=5Fint win,
const char *timehost, const des=5Fblock= *ckey)
=7B
- u=5Fchar pkey=5Fdata=5B1024=5D;
- netobj pkey;=
- AUTH *dummy;
-
- if (=21 getpublickey(servername, (char *)= pkey=5Fdata)) =7B
- syslog(LOG=5FERR,
- =22authdes=5Fseccreate: = no public key found for %s=22,
- servername);
- return (NULL); - =7D
-
- pkey.n=5Fbytes =3D (char *) pkey=5Fdata;
- pkey.n= =5Flen =3D (u=5Fint)strlen((char *)pkey=5Fdata) + 1;
- dummy =3D auth= des=5Fpk=5Fseccreate(servername, &pkey, win, timehost,
- ckey, NU= LL);
- return (dummy);
-=7D
-
-/*
- * Slightly modifi= ed version of authdessec=5Fcreate which takes the public key
- * of t= he server principal as an argument. This spares us a call to
- * getp= ublickey() which in the nameserver context can cause a deadlock.
- */=
-AUTH *
-authdes=5Fpk=5Fseccreate(const char *servername, netobj= *pkey, u=5Fint window,
- const char *timehost, const des=5Fblock *ck= ey, nis=5Fserver *srvr)
-=7B
- AUTH *auth;
- struct ad=5Fpriv= ate *ad;
- char namebuf=5BMAXNETNAMELEN+1=5D;
-
- /*
- * = Allocate everything now
- */
- auth =3D ALLOC(AUTH);
- if (au= th =3D=3D NULL) =7B
- syslog(LOG=5FERR, =22authdes=5Fpk=5Fseccreate: = out of memory=22);
- return (NULL);
- =7D
- ad =3D ALLOC(stru= ct ad=5Fprivate);
- if (ad =3D=3D NULL) =7B
- syslog(LOG=5FERR, =22= authdes=5Fpk=5Fseccreate: out of memory=22);
- goto failed;
- =7D=
- ad->ad=5Ffullname =3D ad->ad=5Fservername =3D NULL; /* Sanit= y reasons */
- ad->ad=5Ftimehost =3D NULL;
- ad->ad=5Fnetid= =3D NULL;
- ad->ad=5Fuaddr =3D NULL;
- ad->ad=5Fnis=5Fsrvr= =3D NULL;
- ad->ad=5Ftimediff.tv=5Fsec =3D 0;
- ad->ad=5Ft= imediff.tv=5Fusec =3D 0;
- memcpy(ad->ad=5Fpkey, pkey->n=5Fbyte= s, pkey->n=5Flen);
- if (=21getnetname(namebuf))
- goto failed= ;
- ad->ad=5Ffullnamelen =3D RNDUP((u=5Fint) strlen(namebuf)); - ad->ad=5Ffullname =3D (char *)mem=5Falloc(ad->ad=5Ffullnamelen += 1);
- ad->ad=5Fservernamelen =3D strlen(servername);
- ad->= ;ad=5Fservername =3D (char *)mem=5Falloc(ad->ad=5Fservernamelen + 1); =
-
- if (ad->ad=5Ffullname =3D=3D NULL =7C=7C ad->ad=5Fserve= rname =3D=3D NULL) =7B
- syslog(LOG=5FERR, =22authdes=5Fseccreate: ou= t of memory=22);
- goto failed;
- =7D
- if (timehost =21=3D N= ULL) =7B
- ad->ad=5Ftimehost =3D (char *)mem=5Falloc(strlen(timeho= st) + 1);
- if (ad->ad=5Ftimehost =3D=3D NULL) =7B
- syslog(LO= G=5FERR, =22authdes=5Fseccreate: out of memory=22);
- goto failed; - =7D
- memcpy(ad->ad=5Ftimehost, timehost, strlen(timehost) + 1= );
- ad->ad=5Fdosync =3D TRUE;
- =7D else if (srvr =21=3D NULL= ) =7B
- ad->ad=5Fnis=5Fsrvr =3D srvr; /* transient */
- ad->= ;ad=5Fdosync =3D TRUE;
- =7D else =7B
- ad->ad=5Fdosync =3D =46= ALSE;
- =7D
- memcpy(ad->ad=5Ffullname, namebuf, ad->ad=5Ff= ullnamelen + 1);
- memcpy(ad->ad=5Fservername, servername, ad->= ad=5Fservernamelen + 1);
- ad->ad=5Fwindow =3D window;
- if (c= key =3D=3D NULL) =7B
- if (key=5Fgendes(&auth->ah=5Fkey) < = 0) =7B
- syslog(LOG=5FERR,
- =22authdes=5Fseccreate: keyserv(1m) = is unable to generate session key=22);
- goto failed;
- =7D
-= =7D else =7B
- auth->ah=5Fkey =3D *ckey;
- =7D
-
- /*=
- * Set up auth handle
- */
- auth->ah=5Fcred.oa=5Fflavor= =3D AUTH=5FDES;
- auth->ah=5Fverf.oa=5Fflavor =3D AUTH=5FDES; - auth->ah=5Fops =3D authdes=5Fops();
- auth->ah=5Fprivate =3D= (caddr=5Ft)ad;
-
- if (=21authdes=5Frefresh(auth, NULL)) =7B - goto failed;
- =7D
- ad->ad=5Fnis=5Fsrvr =3D NULL; /* not n= eeded any longer */
- return (auth);
-
-failed:
- if (aut= h)
- =46REE(auth, sizeof (AUTH));
- if (ad) =7B
- if (ad->= ad=5Ffullname)
- =46REE(ad->ad=5Ffullname, ad->ad=5Ffullnamelen= + 1);
- if (ad->ad=5Fservername)
- =46REE(ad->ad=5Fservern= ame, ad->ad=5Fservernamelen + 1);
- if (ad->ad=5Ftimehost)
= - =46REE(ad->ad=5Ftimehost, strlen(ad->ad=5Ftimehost) + 1);
- i= f (ad->ad=5Fnetid)
- =46REE(ad->ad=5Fnetid, strlen(ad->ad=5F= netid) + 1);
- if (ad->ad=5Fuaddr)
- =46REE(ad->ad=5Fuaddr,= strlen(ad->ad=5Fuaddr) + 1);
- =46REE(ad, sizeof (struct ad=5Fpri= vate));
- =7D
return (NULL);
=7D
+=5F=5Fsym=5Fcompat(au= thdes=5Fseccreate, =5F=5Fauthdes=5Fseccreate, =46BSD=5F1.0);

-/*=
- * Implement the five authentication operations
- */
-
= -
-/*
- * 1. Next Verifier
- */
-/*ARGSUSED*/
-static= void
-authdes=5Fnextverf(AUTH *auth =5F=5Funused)
+static AUTH *=
+=5F=5Fauthdes=5Fpk=5Fseccreate(const char *servername =5F=5Funused,= netobj *pkey =5F=5Funused,
+ u=5Fint window =5F=5Funused, const char= *timehost =5F=5Funused,
+ const des=5Fblock *ckey =5F=5Funused, nis=5F= server *srvr =5F=5Funused)
=7B
- /* what the heck am I supposed = to do=3F=3F=3F */
-=7D
-
-
-/*
- * 2. Marshal
- *= /
-static bool=5Ft
-authdes=5Fmarshal(AUTH *auth, XDR *xdrs)
= -=7B
-/* LINTED pointer alignment */
- struct ad=5Fprivate *ad =3D= AUTH=5FPRIVATE(auth);
- struct authdes=5Fcred *cred =3D &ad->= ad=5Fcred;
- struct authdes=5Fverf *verf =3D &ad->ad=5Fverf; <= br>- des=5Fblock cryptbuf=5B2=5D;
- des=5Fblock ivec;
- int statu= s;
- int len;
- rpc=5Finline=5Ft *ixdr;
-
- /*
- * =46= igure out the =22time=22, accounting for any time difference
- * with= the server if necessary.
- */
- (void)gettimeofday(&ad->a= d=5Ftimestamp, NULL);
- ad->ad=5Ftimestamp.tv=5Fsec +=3D ad->ad= =5Ftimediff.tv=5Fsec;
- ad->ad=5Ftimestamp.tv=5Fusec +=3D ad->a= d=5Ftimediff.tv=5Fusec;
- while (ad->ad=5Ftimestamp.tv=5Fusec >= =3D USEC=5FPER=5FSEC) =7B
- ad->ad=5Ftimestamp.tv=5Fusec -=3D USEC= =5FPER=5FSEC;
- ad->ad=5Ftimestamp.tv=5Fsec++;
- =7D
- - /*
- * XDR the timestamp and possibly some other things, then
= - * encrypt them.
- */
- ixdr =3D (rpc=5Finline=5Ft *)cryptbuf; <= br>- IXDR=5FPUT=5FINT32(ixdr, ad->ad=5Ftimestamp.tv=5Fsec);
- IXDR= =5FPUT=5FINT32(ixdr, ad->ad=5Ftimestamp.tv=5Fusec);
- if (ad->a= d=5Fcred.adc=5Fnamekind =3D=3D ADN=5F=46ULLNAME) =7B
- IXDR=5FPUT=5FU= =5FINT32(ixdr, ad->ad=5Fwindow);
- IXDR=5FPUT=5FU=5FINT32(ixdr, ad= ->ad=5Fwindow - 1);
- ivec.key.high =3D ivec.key.low =3D 0;
- = status =3D cbc=5Fcrypt((char *)&auth->ah=5Fkey, (char *)cryptbuf, =
- (u=5Fint) 2 * sizeof (des=5Fblock),
- DES=5FENCRYPT =7C DES=5FH= W, (char *)&ivec);
- =7D else =7B
- status =3D ecb=5Fcrypt((c= har *)&auth->ah=5Fkey, (char *)cryptbuf,
- (u=5Fint) sizeof (d= es=5Fblock),
- DES=5FENCRYPT =7C DES=5FHW);
- =7D
- if (DES=5F= =46AILED(status)) =7B
- syslog(LOG=5FERR, =22authdes=5Fmarshal: DES e= ncryption failure=22);
- return (=46ALSE);
- =7D
- ad->ad=5F= verf.adv=5Fxtimestamp =3D cryptbuf=5B0=5D;
- if (ad->ad=5Fcred.adc= =5Fnamekind =3D=3D ADN=5F=46ULLNAME) =7B
- ad->ad=5Fcred.adc=5Fful= lname.window =3D cryptbuf=5B1=5D.key.high;
- ad->ad=5Fverf.adv=5Fw= inverf =3D cryptbuf=5B1=5D.key.low;
- =7D else =7B
- ad->ad=5F= cred.adc=5Fnickname =3D ad->ad=5Fnickname;
- ad->ad=5Fverf.adv=5F= winverf =3D 0;
- =7D
-
- /*
- * Serialize the credential = and verifier into opaque
- * authentication data.
- */
- if (= ad->ad=5Fcred.adc=5Fnamekind =3D=3D ADN=5F=46ULLNAME) =7B
- len =3D= ((1 + 1 + 2 + 1)*BYTES=5FPER=5FXDR=5FUNIT + ad->ad=5Ffullnamelen); - =7D else =7B
- len =3D (1 + 1)*BYTES=5FPER=5FXDR=5FUNIT;
- =7D=
-
- if ((ixdr =3D xdr=5Finline(xdrs, 2*BYTES=5FPER=5FXDR=5FUNIT)= )) =7B
- IXDR=5FPUT=5FINT32(ixdr, AUTH=5FDES);
- IXDR=5FPUT=5FINT= 32(ixdr, len);
- =7D else =7B
- ATTEMPT(xdr=5Fputint32(xdrs, (int= *)&auth->ah=5Fcred.oa=5Fflavor));
- ATTEMPT(xdr=5Fputint32(xd= rs, &len));
- =7D
- ATTEMPT(xdr=5Fauthdes=5Fcred(xdrs, cred))= ;
-
- len =3D (2 + 1)*BYTES=5FPER=5FXDR=5FUNIT;
- if ((ixdr =3D= xdr=5Finline(xdrs, 2*BYTES=5FPER=5FXDR=5FUNIT))) =7B
- IXDR=5FPUT=5F= INT32(ixdr, AUTH=5FDES);
- IXDR=5FPUT=5FINT32(ixdr, len);
- =7D e= lse =7B
- ATTEMPT(xdr=5Fputint32(xdrs, (int *)&auth->ah=5Fverf= .oa=5Fflavor));
- ATTEMPT(xdr=5Fputint32(xdrs, &len));
- =7D =
- ATTEMPT(xdr=5Fauthdes=5Fverf(xdrs, verf));
- return (TRUE); -=7D
-
-
-/*
- * 3. Validate
- */
-static bool=5F= t
-authdes=5Fvalidate(AUTH *auth, struct opaque=5Fauth *rverf)
-=7B=
-/* LINTED pointer alignment */
- struct ad=5Fprivate *ad =3D AU= TH=5FPRIVATE(auth);
- struct authdes=5Fverf verf;
- int status; <= br>- uint32=5Ft *ixdr;
- des=5Fblock buf;
-
- if (rverf->o= a=5Flength =21=3D (2 + 1) * BYTES=5FPER=5FXDR=5FUNIT) =7B
- return (=46= ALSE);
- =7D
-/* LINTED pointer alignment */
- ixdr =3D (uint= 32=5Ft *)rverf->oa=5Fbase;
- buf.key.high =3D (uint32=5Ft)*ixdr++;=
- buf.key.low =3D (uint32=5Ft)*ixdr++;
- verf.adv=5Fint=5Fu =3D = (uint32=5Ft)*ixdr++;
-
- /*
- * Decrypt the timestamp
- *= /
- status =3D ecb=5Fcrypt((char *)&auth->ah=5Fkey, (char *)&a= mp;buf,
- (u=5Fint)sizeof (des=5Fblock), DES=5FDECRYPT =7C DES=5FHW);=
-
- if (DES=5F=46AILED(status)) =7B
- syslog(LOG=5FERR, =22a= uthdes=5Fvalidate: DES decryption failure=22);
- return (=46ALSE); - =7D
-
- /*
- * xdr the decrypted timestamp
- */
-= /* LINTED pointer alignment */
- ixdr =3D (uint32=5Ft *)buf.c;
- = verf.adv=5Ftimestamp.tv=5Fsec =3D IXDR=5FGET=5FINT32(ixdr) + 1;
- ver= f.adv=5Ftimestamp.tv=5Fusec =3D IXDR=5FGET=5FINT32(ixdr);
-
- /* =
- * validate
- */
- if (bcmp((char *)&ad->ad=5Ftimesta= mp, (char *)&verf.adv=5Ftimestamp,
- sizeof(struct timeval)) =21=3D= 0) =7B
- syslog(LOG=5FDEBUG, =22authdes=5Fvalidate: verifier mismatc= h=22);
- return (=46ALSE);
- =7D
-
- /*
- * We have a= nickname now, let's use it
- */
- ad->ad=5Fnickname =3D verf.= adv=5Fnickname;
- ad->ad=5Fcred.adc=5Fnamekind =3D ADN=5FNICKNAME;=
- return (TRUE);
-=7D
-
-/*
- * 4. Refresh
- */ =
-/*ARGSUSED*/
-static bool=5Ft
-authdes=5Frefresh(AUTH *auth,= void *dummy =5F=5Funused)
-=7B
-/* LINTED pointer alignment */ <= br>- struct ad=5Fprivate *ad =3D AUTH=5FPRIVATE(auth);
- struct authd= es=5Fcred *cred =3D &ad->ad=5Fcred;
- int ok;
- netobj pke= y;
-
- if (ad->ad=5Fdosync) =7B
- ok =3D =5F=5Frpc=5Fget=5F= time=5Foffset(&ad->ad=5Ftimediff, ad->ad=5Fnis=5Fsrvr,
- ad= ->ad=5Ftimehost, &(ad->ad=5Fuaddr),
- &(ad->ad=5Fnet= id));
- if (=21 ok) =7B
- /*
- * Hope the clocks are synced=21=
- */
- ad->ad=5Fdosync =3D 0;
- syslog(LOG=5FDEBUG,
-= =22authdes=5Frefresh: unable to synchronize clock=22);
- =7D
- =7D=
- ad->ad=5Fxkey =3D auth->ah=5Fkey;
- pkey.n=5Fbytes =3D (= char *)(ad->ad=5Fpkey);
- pkey.n=5Flen =3D (u=5Fint)strlen((char *= )ad->ad=5Fpkey) + 1;
- if (key=5Fencryptsession=5Fpk(ad->ad=5Fs= ervername, &pkey, &ad->ad=5Fxkey) < 0) =7B
- syslog(LOG= =5FIN=46O,
- =22authdes=5Frefresh: keyserv(1m) is unable to encrypt s= ession key=22);
- return (=46ALSE);
- =7D
- cred->adc=5Ffu= llname.key =3D ad->ad=5Fxkey;
- cred->adc=5Fnamekind =3D ADN=5F= =46ULLNAME;
- cred->adc=5Ffullname.name =3D ad->ad=5Ffullname; =
- return (TRUE);
-=7D
-
-
-/*
- * 5. Destroy
= - */
-static void
-authdes=5Fdestroy(AUTH *auth)
-=7B
-/*= LINTED pointer alignment */
- struct ad=5Fprivate *ad =3D AUTH=5FPRI= VATE(auth);
-
- =46REE(ad->ad=5Ffullname, ad->ad=5Ffullname= len + 1);
- =46REE(ad->ad=5Fservername, ad->ad=5Fservernamelen = + 1);
- if (ad->ad=5Ftimehost)
- =46REE(ad->ad=5Ftimehost, = strlen(ad->ad=5Ftimehost) + 1);
- if (ad->ad=5Fnetid)
- =46= REE(ad->ad=5Fnetid, strlen(ad->ad=5Fnetid) + 1);
- if (ad->a= d=5Fuaddr)
- =46REE(ad->ad=5Fuaddr, strlen(ad->ad=5Fuaddr) + 1)= ;
- =46REE(ad, sizeof (struct ad=5Fprivate));
- =46REE(auth, size= of(AUTH));
-=7D
-
-static struct auth=5Fops *
-authdes=5F= ops(void)
-=7B
- static struct auth=5Fops ops;
-
- /* VAR= IABLES PROTECTED BY ops=5Flock: ops */
-
- mutex=5Flock(&auth= des=5Fops=5Flock);
- if (ops.ah=5Fnextverf =3D=3D NULL) =7B
- ops= .ah=5Fnextverf =3D authdes=5Fnextverf;
- ops.ah=5Fmarshal =3D authdes= =5Fmarshal;
- ops.ah=5Fvalidate =3D authdes=5Fvalidate;
- ops.ah=5F= refresh =3D authdes=5Frefresh;
- ops.ah=5Fdestroy =3D authdes=5Fdestr= oy;
- =7D
- mutex=5Funlock(&authdes=5Fops=5Flock);
- retu= rn (&ops);
+ return (NULL);
=7D
+=5F=5Fsym=5Fcompat(auth= des=5Fpk=5Fseccreate, =5F=5Fauthdes=5Fpk=5Fseccreate, =46BSD=5F1.0);
= diff --git a/lib/libc/rpc/authdes=5Fprot.c b/lib/libc/rpc/authdes=5Fprot.= c
index 79a0e5baa084..56b44daafe41 100644
--- a/lib/libc/rpc/auth= des=5Fprot.c
+++ b/lib/libc/rpc/authdes=5Fprot.c
=40=40 -42,44 +4= 2,16 =40=40
=23include <rpc/auth=5Fdes.h>
=23include =22u= n-namespace.h=22

-=23define ATTEMPT(xdr=5Fop) if (=21(xdr=5Fop))= return (=46ALSE)
-
-bool=5Ft
-xdr=5Fauthdes=5Fcred(XDR *xdrs= , struct authdes=5Fcred *cred)
+static bool=5Ft
+=5F=5Fxdr=5Fauth= des=5Fcred(XDR *xdrs, void *cred)
=7B
- enum authdes=5Fnamekind = *padc=5Fnamekind =3D &cred->adc=5Fnamekind;
- /*
- * Unrol= led xdr
- */
- ATTEMPT(xdr=5Fenum(xdrs, (enum=5Ft *) padc=5Fnamek= ind));
- switch (cred->adc=5Fnamekind) =7B
- case ADN=5F=46ULL= NAME:
- ATTEMPT(xdr=5Fstring(xdrs, &cred->adc=5Ffullname.name,=
- MAXNETNAMELEN));
- ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&= cred->adc=5Ffullname.key,
- sizeof(des=5Fblock)));
- ATTEMPT(x= dr=5Fopaque(xdrs, (caddr=5Ft)&cred->adc=5Ffullname.window,
- s= izeof(cred->adc=5Ffullname.window)));
- return (TRUE);
- case = ADN=5FNICKNAME:
- ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&cred->= ;adc=5Fnickname,
- sizeof(cred->adc=5Fnickname)));
- return (T= RUE);
- default:
- return (=46ALSE);
- =7D
+ return (=46A= LSE);
=7D
+=5F=5Fsym=5Fcompat(xdr=5Fauthdes=5Fcred, =5F=5Fxdr=5F= authdes=5Fcred, =46BSD=5F1.0);

-
-bool=5Ft
-xdr=5Fauthde= s=5Fverf(XDR *xdrs, struct authdes=5Fverf *verf)
+static bool=5Ft +=5F=5Fxdr=5Fauthdes=5Fverf(XDR *xdrs, void *verf)
=7B
- /* - * Unrolled xdr
- */
- ATTEMPT(xdr=5Fopaque(xdrs, (caddr=5Ft)&a= mp;verf->adv=5Fxtimestamp,
- sizeof(des=5Fblock)));
- ATTEMPT(= xdr=5Fopaque(xdrs, (caddr=5Ft)&verf->adv=5Fint=5Fu,
- sizeof(v= erf->adv=5Fint=5Fu)));
- return (TRUE);
+ return (=46ALSE); =7D
+=5F=5Fsym=5Fcompat(xdr=5Fauthdes=5Fverf, =5F=5Fxdr=5Fauthdes=5F= verf, =46BSD=5F1.0);
diff --git a/lib/libc/rpc/key=5Fcall.c b/lib/lib= c/rpc/key=5Fcall.c
index 5c87881c815c..eb274fcfff36 100644
--- a/= lib/libc/rpc/key=5Fcall.c
+++ b/lib/libc/rpc/key=5Fcall.c
=40=40 = -32,426 +32,78 =40=40
*/

/*
- * key=5Fcall.c, Interfac= e to keyserver
- *
- * setsecretkey(key) - set your secret key - * encryptsessionkey(agent, deskey) - encrypt a session key to talk to= agent
- * decryptsessionkey(agent, deskey) - decrypt ditto
- * g= endeskey(deskey) - generate a secure des key
+ * Secure RPC keyserver= support was removed in =46reeBSD 15.0.
+ * These symbols are provide= d for backward compatibility, but provide no
+ * functionality and wi= ll always return an error.
*/

=23include =22namespace.h=22=
=23include =22reentrant.h=22
-=23include <stdio.h>
-=23= include <stdlib.h>
-=23include <unistd.h>
-=23include= <errno.h>
=23include <rpc/rpc.h>
-=23include <rp= c/auth.h>
-=23include <rpc/auth=5Funix.h>
=23include &l= t;rpc/key=5Fprot.h>
-=23include <string.h>
-=23include &= lt;netconfig.h>
-=23include <sys/utsname.h>
-=23include = <stdlib.h>
-=23include <signal.h>
-=23include <sys= /wait.h>
-=23include <sys/fcntl.h>
+=23include <rpc/a= uth.h>
=23include =22un-namespace.h=22
=23include =22mt=5Fmi= sc.h=22

-
-=23define KEY=5FTIMEOUT 5 /* per-try timeout in s= econds */
-=23define KEY=5FNRETRY 12 /* number of retries */
- -=23ifdef DEBUG
-=23define debug(msg) (void) fprintf(stderr, =22%s=5C= n=22, msg);
-=23else
-=23define debug(msg)
-=23endif /* DEBUG= */
-
-/*
- * Hack to allow the keyserver to use AUTH=5FDES (= for authenticated
- * NIS+ calls, for example). The only functions th= at get called
- * are key=5Fencryptsession=5Fpk, key=5Fdecryptsession= =5Fpk, and key=5Fgendes.
- *
- * The approach is to have the keys= erver fill in pointers to local
- * implementations of these function= s, and to call those in key=5Fcall().
- */
-
-cryptkeyres *(*= =5F=5Fkey=5Fencryptsession=5Fpk=5FLOCAL)(uid=5Ft, void *arg) =3D 0;
-= cryptkeyres *(*=5F=5Fkey=5Fdecryptsession=5Fpk=5FLOCAL)(uid=5Ft, void *ar= g) =3D 0;
-des=5Fblock *(*=5F=5Fkey=5Fgendes=5FLOCAL)(uid=5Ft, void *= ) =3D 0;
-
-static int key=5Fcall( u=5Flong, xdrproc=5Ft, void *,= xdrproc=5Ft, void *);
-
-int
-key=5Fsetsecret(const char *se= cretkey)
-=7B
- keystatus status;
-
- if (=21key=5Fcall((= u=5Flong) KEY=5FSET, (xdrproc=5Ft)xdr=5Fkeybuf,
- (void *)secretkey, =
- (xdrproc=5Ft)xdr=5Fkeystatus, &status)) =7B
- return (-1); =
- =7D
- if (status =21=3D KEY=5FSUCCESS) =7B
- debug(=22set s= tatus is nonzero=22);
- return (-1);
- =7D
- return (0);
= -=7D
-
-
-/* key=5Fsecretkey=5Fis=5Fset() returns 1 if the ke= yserver has a secret key
- * stored for the caller's effective uid; i= t returns 0 otherwise
- *
- * N.B.: The KEY=5FNET=5FGET key call = is undocumented. Applications shouldn't
- * be using it, because it a= llows them to get the user's secret key.
- */
-
-int
-key= =5Fsecretkey=5Fis=5Fset(void)
-=7B
- struct key=5Fnetstres kres; =
-
- memset((void*)&kres, 0, sizeof (kres));
- if (key=5Fc= all((u=5Flong) KEY=5FNET=5FGET, (xdrproc=5Ft)xdr=5Fvoid, NULL,
- (xdr= proc=5Ft)xdr=5Fkey=5Fnetstres, &kres) &&
- (kres.status =3D= =3D KEY=5FSUCCESS) &&
- (kres.key=5Fnetstres=5Fu.knet.st=5Fpr= iv=5Fkey=5B0=5D =21=3D 0)) =7B
- /* avoid leaving secret key in memor= y */
- memset(kres.key=5Fnetstres=5Fu.knet.st=5Fpriv=5Fkey, 0, HEXKEY= BYTES);
- return (1);
- =7D
- return (0);
-=7D
-
= -int
-key=5Fencryptsession=5Fpk(char *remotename, netobj *remotekey, = des=5Fblock *deskey)
-=7B
- cryptkeyarg2 arg;
- cryptkeyres r= es;
-
- arg.remotename =3D remotename;
- arg.remotekey =3D *r= emotekey;
- arg.deskey =3D *deskey;
- if (=21key=5Fcall((u=5Flong= )KEY=5FENCRYPT=5FPK, (xdrproc=5Ft)xdr=5Fcryptkeyarg2, &arg,
- (xd= rproc=5Ft)xdr=5Fcryptkeyres, &res)) =7B
- return (-1);
- =7D =
- if (res.status =21=3D KEY=5FSUCCESS) =7B
- debug(=22encrypt sta= tus is nonzero=22);
- return (-1);
- =7D
- *deskey =3D res.cr= yptkeyres=5Fu.deskey;
- return (0);
-=7D
-
-int
-key=5F= decryptsession=5Fpk(char *remotename, netobj *remotekey, des=5Fblock *des= key)
-=7B
- cryptkeyarg2 arg;
- cryptkeyres res;
-
- = arg.remotename =3D remotename;
- arg.remotekey =3D *remotekey;
- = arg.deskey =3D *deskey;
- if (=21key=5Fcall((u=5Flong)KEY=5FDECRYPT=5F= PK, (xdrproc=5Ft)xdr=5Fcryptkeyarg2, &arg,
- (xdrproc=5Ft)xdr=5Fc= ryptkeyres, &res)) =7B
- return (-1);
- =7D
- if (res.sta= tus =21=3D KEY=5FSUCCESS) =7B
- debug(=22decrypt status is nonzero=22= );
- return (-1);
- =7D
- *deskey =3D res.cryptkeyres=5Fu.des= key;
- return (0);
-=7D
-
-int
-key=5Fencryptsession(= const char *remotename, des=5Fblock *deskey)
+static int
+=5F=5Fk= ey=5Fsetsecret(const char *secretkey)
=7B
- cryptkeyarg arg; - cryptkeyres res;
-
- arg.remotename =3D (char *) remotename; <= br>- arg.deskey =3D *deskey;
- if (=21key=5Fcall((u=5Flong)KEY=5FENCR= YPT, (xdrproc=5Ft)xdr=5Fcryptkeyarg, &arg,
- (xdrproc=5Ft)xdr=5Fc= ryptkeyres, &res)) =7B
- return (-1);
- =7D
- if (res.sta= tus =21=3D KEY=5FSUCCESS) =7B
- debug(=22encrypt status is nonzero=22= );
- return (-1);
- =7D
- *deskey =3D res.cryptkeyres=5Fu.des= key;
- return (0);
+ return (-1);
=7D
+=5F=5Fsym=5Fcompa= t(key=5Fsetsecret, =5F=5Fkey=5Fsetsecret, =46BSD=5F1.0);

-int -key=5Fdecryptsession(const char *remotename, des=5Fblock *deskey)
= +static int
+=5F=5Fkey=5Fsecretkey=5Fis=5Fset(void)
=7B
- cr= yptkeyarg arg;
- cryptkeyres res;
-
- arg.remotename =3D (cha= r *) remotename;
- arg.deskey =3D *deskey;
- if (=21key=5Fcall((u= =5Flong)KEY=5FDECRYPT, (xdrproc=5Ft)xdr=5Fcryptkeyarg, &arg,
- (x= drproc=5Ft)xdr=5Fcryptkeyres, &res)) =7B
- return (-1);
- =7D=
- if (res.status =21=3D KEY=5FSUCCESS) =7B
- debug(=22decrypt st= atus is nonzero=22);
- return (-1);
- =7D
- *deskey =3D res.c= ryptkeyres=5Fu.deskey;
return (0);
=7D
+=5F=5Fsym=5Fcompat(= key=5Fsecretkey=5Fis=5Fset, =5F=5Fkey=5Fsecretkey=5Fis=5Fset, =46BSD=5F1.= 0);

-int
-key=5Fgendes(des=5Fblock *key)
+static int +=5F=5Fkey=5Fencryptsession=5Fpk(char *remotename, netobj *remotekey, de= s=5Fblock *deskey)
=7B
- if (=21key=5Fcall((u=5Flong)KEY=5FGEN, = (xdrproc=5Ft)xdr=5Fvoid, NULL,
- (xdrproc=5Ft)xdr=5Fdes=5Fblock, key)= ) =7B
- return (-1);
- =7D
- return (0);
+ return (-1); <= br> =7D
+=5F=5Fsym=5Fcompat(key=5Fencryptsession=5Fpk, =5F=5Fkey=5Fen= cryptsession=5Fpk, =46BSD=5F1.0);

-int
-key=5Fsetnet(struct = key=5Fnetstarg *arg)
+static int
+=5F=5Fkey=5Fdecryptsession=5Fpk= (char *remotename, netobj *remotekey, des=5Fblock *deskey)
=7B
*= ** 2726 LINES SKIPPED ***

--689b40a3_2336c6b7_50e-- From nobody Tue Aug 12 13:35:15 2025 X-Original-To: dev-commits-src-main@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 4c1XYv5phJz64mfb; Tue, 12 Aug 2025 13:35:15 +0000 (UTC) (envelope-from ivy@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 "freefall.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1XYv55vyz3RFD; Tue, 12 Aug 2025 13:35:15 +0000 (UTC) (envelope-from ivy@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755005715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6ElthlGUvKY9ava18ulgTwRYrur5BJS3Lf/QGAULOhk=; b=Mc7wZxH+dzOwMA6VTlOYSCMVrvtpey4T6leRejWtA4m5fRy6YGOQXsJ+6gMZk0+yappM6o A4af3QTAKBOsaxNud67xa/+nBeIUdteweGtc85CyfXcDX7haq2guK55rr9SyzvAqR8yYF/ ZGmOJezUZbiU5e7US2U5EgEpDwViqubrXqCmBuUbcJt9NVmeSK7goXX6zEq4KIx9Se3O+E npbHzn0RHnTA9c+2wz1QUDUwHmq4/bfO7T85XHPG69pIKAzu1nbcdycNPF+1jgxJxkeJ9Q fcMsLI1GE/UUcE4684ULaMu9hdpJH/njd6MVfe5hp9BiZkyPqZwQewdCvsQe4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755005715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6ElthlGUvKY9ava18ulgTwRYrur5BJS3Lf/QGAULOhk=; b=Q7SYNlXLY4w6lGluVk6z1FuIwTgsc+9/JzBedtOJUKuBG6i7NoaP/wKShTuyW6zI33zOWd UO/OUtd6IcaPtVrRyBY7dVG6hkbPR5sP5MZf2FBbAdisusGXqbJiM6NwO8Y8mBUON1undo PXTNuQ629RB/mk2woXEUEifvejFW6B5Q28QjOjC0n+z/MBXtRKQWZPjD6qKQR+LPqiFDZQ 0ZBAW2jAUUinThGMstOpUZfDWD17Yfibv0pLEhcHHJxko3jOIac9N1lzCCUz9iDX48TCp6 euOGt8xukO14DwmH3DP66c79YnDj9BsQJCGqfTJaS+IEUxX/hhzRQWtNbZ2ZvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755005715; a=rsa-sha256; cv=none; b=kkoielsgXlqRHczwRixA/CrTIygpVa64fqpSu08VXnrtV6tHnwbXRUCgrPfk1SECcfyHtA 64hoTSckOWKOyv+IuJOchNck8ma/49F8aCUh05PpIRauZIbYpdBSjsW5b53ll4VajmYcJV 2dO7dKKclneAps/Og9PxGnijTUgGOdFx++l49SXETkUNYxtTHrDtBaXRfggeK+NIUVGRLJ 4/TRrALgUDjbIKJK6EGmSe1uGli40n7m5CoGjK/rILYPSBpf2j2uzx1vYE+NaVcS3NyUY2 WBQV7RQaY9en89juOxRdBFRc1PQZAv1MAGKx0M0tcfGpd3RnYQTepsiauvu4Hw== Received: by freefall.freebsd.org (Postfix, from userid 1532) id 967837187; Tue, 12 Aug 2025 13:35:15 +0000 (UTC) Date: Tue, 12 Aug 2025 14:35:15 +0100 From: Lexi Winter To: Dima Panov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 7ac276298b72 - main - Remove Secure RPC DES authentication Message-ID: Mail-Followup-To: Dima Panov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202508101537.57AFbHrI067216@gitrepo.freebsd.org> <851c968c-923a-4809-83d4-b0600e70867b@Canary> <8e7a9c07-5efd-4450-a590-a6aeaa59b402@Canary> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="b5hNBpUpoMH704lL" Content-Disposition: inline In-Reply-To: <8e7a9c07-5efd-4450-a590-a6aeaa59b402@Canary> --b5hNBpUpoMH704lL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable hi Dima, Dima Panov: > All xservers are affected. >=20 > However, upstream already deal with it in commit > https://gitlab.freedesktop.org/xorg/xserver/-/commit/71b207a2ebc1465c7d9a= d9262f60930f6a1d42ee it looks like you could also pass -Dsecure-rpc=3Dfalse to Meson for older servers. are either of these acceptable or do you want to consider reverting this change? (i was trying to build x11-servers/xwayland to test this, but it's taking a long time as i had to fix some unrelated broken ports along the way.) --b5hNBpUpoMH704lL Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaJtDDwAKCRD1nT63mIK/ YK14AQCHbD7MhjqDYhILc9hq8SPVuj8ueTon3FD7tFLcFc+zmQD/Ub+mGemo6TJu CoMpEzoGw2wX/Izm8LPRnojCP4G60w8= =IET5 -----END PGP SIGNATURE----- --b5hNBpUpoMH704lL-- From nobody Tue Aug 12 13:53:22 2025 X-Original-To: dev-commits-src-main@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 4c1Xyq22qjz64p8F; Tue, 12 Aug 2025 13:53: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1Xyq1CmPz3Swh; Tue, 12 Aug 2025 13:53:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755006803; 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=XT2RLB3w7H0jnZcIV8dVbTEmHg52NLT39FCo67szbaI=; b=giunK6K7GLrlacs3lrr/wYyO8tfK/uweOko2OtCy0yZdI+c9h3LdP4OG4j2+CVfv1TprcS NLH9DowaTbvXi/7EEhLMKpATw4HCL6QZyd8pJNzyK5AVcMaZAwUmSQwxm8Wu1Bt+cZSsSn WxWFd3y0H3uF2mMybJ3rqWYUM0P0g1quXIsGmgH+KDoi24W2M3y36UseRGD0XCuKbXJHis mUMe2Qn5BaI0zbflUSrbrR1XSFxZWOCa9mz1IFLDu2I8r5zxz4EUhPPiRqgccu1pG6MKUy aeLckg2wrzKYakgqwYxAREPEqE1avMEWRofnIdKjaAFtyVbLVAJa6gobW0cE8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755006803; 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=XT2RLB3w7H0jnZcIV8dVbTEmHg52NLT39FCo67szbaI=; b=vDK4pP64/mrZx52z5KfqxLVzCOCT90aoGFk9bZSZ6djSMnCwFVZXDmr2xS2aQHXq4oo/t3 lyTlZ2j1bq+dXKlad/Mv+sESIBPj8m6GC4I2fYy+SVMyuMPvPclMravWD/F8MQTpbp+b6P YLne3W8y0btDLply7rpv9RiKBXNaKK1ripo/VdVRQqUnvOIKU3jLkYritb8w9KSPxAsUgk 1L2AQEywet5ilEN9wCmFdxSFtDHhA4hw/acj/c3ryvlxKmUoXALj092IJqL2mzqNKwT9vz 2jheLks41Qj7iza2C7y3sH2WQa/B61cTjX4JMwJRNFEtxNYj7VHax0zF9BE6jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755006803; a=rsa-sha256; cv=none; b=Wf9pTOTg7VQZH63wa6MGZAzXwnd+duoAnkXUikQ1bownStj77RSTHckQiuleAXR1bqMv/l t0It/eQBRfMr5dYDH6z8sRjYsWe7uqpSKq7SWBT2M43i5rXhR1CVUvlyeCR761qYUfNIZD 3ZdjXQRflohgVLaSP9Qqme3uoXbHRkUaLJkJ815rfykDLdvpE5C7AlzYDF5LVaPFbAHxd+ EvakODurvMVpHyzZF9hz9AGlU81EruVz4lHl87Re8FV++gQI1EOa7LFp+PcyRScKcGV4h0 c2L/Ik2FGC47WVGCr3/Ej80uXvHJ7dpx3AG7FTHng/MriTp9JrYniyZKLtMvDw== 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 4c1Xyq0pk5zhJd; Tue, 12 Aug 2025 13:53: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 57CDrNet099956; Tue, 12 Aug 2025 13:53:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CDrM0S099953; Tue, 12 Aug 2025 13:53:22 GMT (envelope-from git) Date: Tue, 12 Aug 2025 13:53:22 GMT Message-Id: <202508121353.57CDrM0S099953@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 46f905636759 - main - ObsoleteFiles: Remove bogus manlink List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 46f9056367596daad0b4f0065e5a8fa0bcbb907d Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=46f9056367596daad0b4f0065e5a8fa0bcbb907d commit 46f9056367596daad0b4f0065e5a8fa0bcbb907d Author: Dag-Erling Smørgrav AuthorDate: 2025-08-12 13:48:46 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-12 13:50:30 +0000 ObsoleteFiles: Remove bogus manlink Fixes: 7400d04407c0 ("libutil: Remove manual link for nonexistent function") --- ObsoleteFiles.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 84c3055f7077..4db0704d88ef 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20250812: Remove a bogus manlink +OLD_FILES+=usr/share/man/man3/quota_statfs.3.gz + # 20250810: Removal of remaining Secure RPC (DES) bits OLD_FILES+=usr/sbin/rpc.ypupdated OLD_FILES+=etc/rc.d/ypupdated From nobody Tue Aug 12 13:57:34 2025 X-Original-To: dev-commits-src-main@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 4c1Y3k67qSz64pbR; Tue, 12 Aug 2025 13:57:38 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1Y3k5BD7z3TRQ; Tue, 12 Aug 2025 13:57:38 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755007058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gELMXH7TUqajZTGje4K3e8uAMln8DMyh0Sx4Qy9vqow=; b=i5BItjxAJuVI71f6blIQShIoc1kYdJeEiQrjcFyJ7UvsVb0ivOjjA9LbVLs7cmhnm7WN0y dR0y5roAKcpYPpokfQJHkWaJM7UMVeiO3Q08owHLfZkJnHwxzVL81uuK9biNOww+l/6YmC YMMT7yniqgmC0aPq8CCxTUTv6QmHsvP5ow4QS4e3cCb2WXyVrANVl+WkPgINEd48mXyv8U utdPQOwj2uAA9Gzn0Fh7enrGFpLcC3JqisU2xvP0gzZxJvegR+v6FVkLcyXYQDM5/pSrNe THQ5LSCYqx9RT1OnjZ9ItP1evDanDx8M0fBKuKgMGht1WQfd/AF1dtRUuoVZ5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755007058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=gELMXH7TUqajZTGje4K3e8uAMln8DMyh0Sx4Qy9vqow=; b=NT6o5/nvbjXtmrWTO0fkLOqq9s7faXCFkDwhBwVVtbWGPnaVMsKLrNdhUh1n8ktd9GbGi/ aKHVqg+fjf+lMQrwMWtdkb9OhTMxDXOCmAhzz2L0efUvzSpG6doSn/dphCBZMDcCYBeOwZ b0XLBukboqLCS9Zu1i+DDSUvM//WFZbFL+JJTvwrbRF1iC3+YzJBRzYk6ynxiEBIeD7dyz KLVDKk3tHMIC8L3JMB1TbRdb3dA4q61zqjTRwL7mSKanDlq/MLWS3h2pnvHvOl6EFLGTHi B+6TLXKCcrE09Fq0CY2yAIcsSr3cl6dUzpCBUMa8/hWCAWeXfYRk9Q0mY23ccg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755007058; a=rsa-sha256; cv=none; b=SevHoVQllD3uJOuD+eHtURrs4r4yFUksZo/QGvWdibnE3+8ak0UyA6f6AGhGLqBbf+wl+P XYhhWCaO1Es/2GbN7e0zDNa1Gf/PLISi25+0QdXoZtxXn26YJgzD+kFvtL+0Epf+RFvgUN 8ewOsflO+gFG48AVgYHuHS4LhHE13cNhVi+XQPu/ZiCjQ8Cg59/c0q22ioP0AOo1fe6Wg1 ZTwmzpdFgozXMuoMwlbsN+oRw/HwrZyZ9dag+BIkhJt/EaQHxRdADAcsjJT38l43Tb+K0Q ZTBc/PiM2StU0FIUF3IXQsEs1MJVOgLMPEXMGwuOKd1Wne9xm77xQWi+6qqWYQ== Received: from [100.109.252.209] (unknown [176.15.166.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4c1Y3j4Tw7zZ0p; Tue, 12 Aug 2025 13:57:37 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Date: Tue, 12 Aug 2025 16:57:34 +0300 From: Dima Panov To: Lexi Winter Cc: dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, src-committers@freebsd.org Message-ID: <7548b9c4-ada1-4bb7-a649-2bdbdbb03cd9@Canary> In-Reply-To: References: <202508101537.57AFbHrI067216@gitrepo.freebsd.org> <851c968c-923a-4809-83d4-b0600e70867b@Canary> <8e7a9c07-5efd-4450-a590-a6aeaa59b402@Canary> Subject: Re: git: 7ac276298b72 - main - Remove Secure RPC DES authentication X-Canary-Draft: 2 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="689b484e_1d0bcfe9_50e" --689b484e_1d0bcfe9_50e Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Indeed, disable secure-rpc build flag for all xservers looks reasonable, = I=E2=80=99ll try it now and commit if build will be successfull. -- Dima. (desktop, kde, x11, office, ports-secteam)=40=46reeBSD team (fluffy=40=46reeBSD.org, https://t.me/=46luffyBSD) > On =D0=B2=D1=82=D0=BE=D1=80=D0=BD=D0=B8=D0=BA, =D0=B0=D0=B2=D0=B3. 12, = 2025 at 4:35 PM, Lexi Winter wrote: > hi Dima, > > Dima Panov: > > All xservers are affected. > > > > However, upstream already deal with it in commit > > https://gitlab.freedesktop.org/xorg/xserver/-/commit/71b207a2ebc1465c= 7d9ad9262f60930f6a1d42ee > > it looks like you could also pass -Dsecure-rpc=3Dfalse to Meson for old= er > servers. are either of these acceptable or do you want to consider > reverting this change=3F > > (i was trying to build x11-servers/xwayland to test this, but it's taki= ng > a long time as i had to fix some unrelated broken ports along the way.)= --689b484e_1d0bcfe9_50e Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline <= meta name=3D=22viewport=22 content=3D=22width=3Ddevice-width, initial-sca= le=3D1.0, user-scalable=3Dno=22>
Indeed, disable secure-rpc build flag for all xse= rvers looks reasonable, I=E2=80=99ll try it now and commit if build will = be successfull.=C2=A0

--
Dima. (desktop, kde, x11, office, ports-= secteam)=40=46reeBSD team
(fluffy=40=46reeBSD.org, https://t.me= /=46luffyBSD)

<= div>On =D0=B2=D1=82=D0=BE=D1=80=D0=BD=D0=B8=D0=BA, =D0=B0=D0=B2=D0=B3. 12= , 2025 at 4:35 PM, Lexi Winter <ivy=40freebsd.org> wrote:
hi Dima,

Dima P= anov:
All xservers are affected.
<= br>However, upstream already deal with it in commit
https://gitlab.fr= eedesktop.org/xorg/xserver/-/commit/71b207a2ebc1465c7d9ad9262f60930f6a1d4= 2ee

it looks like you could also pass -Dsecure-rpc=3D= false to Meson for older
servers. are either of these acceptable or d= o you want to consider
reverting this change=3F

(i was tryin= g to build x11-servers/xwayland to test this, but it's taking
a long = time as i had to fix some unrelated broken ports along the way.)
--689b484e_1d0bcfe9_50e-- From nobody Tue Aug 12 14:12:25 2025 X-Original-To: dev-commits-src-main@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 4c1YNn5XfPz64qhk; Tue, 12 Aug 2025 14:12: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1YNn45lQz3XPM; Tue, 12 Aug 2025 14:12:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755007945; 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=CkLIltAvLfbxsV4lzwLX54kWwMERKK6TpmAe5jwST/I=; b=TPU7iPEyaKNIOVMuc2KVuazgOtdWP5wHlbQC0Wil1nY2jmqeowt70kI85FaMljlzUbQmJI 6WHbVvKanVX6IQSt6kF+k8bifI5WCGQ1i5T1XoVH2Yz1Q4GTy8T5XzbRv/N7jpkIinmNfx HazTYUFJIpvGOeN1gOC/ipizopnYITAX88Mh7uEyQ8IbU5aBk33RIWqsZP3/VNxFNtxd/c tN4eb95dIZj6kDAcR2KjgpTMeOzn7anAqCf2Zv5kAn65WU+SllWmK9WfoznnS4tw03tXDj nYHk9Zj8Z7TDXIqef6ALby5g52uD5bRfXU4TtL47x0u12ocb1a1yh7hgw/gtSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755007945; 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=CkLIltAvLfbxsV4lzwLX54kWwMERKK6TpmAe5jwST/I=; b=xAXSOfPgD9CgAONtW9SCivlbW8C47fBa8Bat1TEyiRwgYyKlmdEApZllztNJkfZUat/tMI fgSXo/r48RHil/RLTWFzDWfDH8ofG8ouor5zAWvdFoEXAOFA7MHQiKKIohF/YgDa4RQhdW 2lu87huZZf4YQofoliP/pINQ36NJzKwi9JWJURL6YeQWNYYr0Wnn5Gv9dQDyvOPROg1htK OmRtDLn709tp6S79YhgqVlKI5mOB/5SPCqE6PTeoGR4zPjbEjOI7Fhc2iOgm51T7tcp8SW 1T/U4CB8Kfgj0oO69eohyK2Hy1TYHHOXukJJIqGnCHmCoBdUX7qGYu+IPQNUNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755007945; a=rsa-sha256; cv=none; b=viVsOIG1zC4fhiFfx0aiF7AQsHLScLZ+YQlxHYNcZA6DnGq5RAC1H9+OB0bEGpOuym5Bng Bf7/ZQ8r629EFC7RbVlyNVUjBhUPXW6hYLYJUCFAkYKgCHQlTcFZo/VEICkfniDhWk061l ekXiDANx4yhiwHOIdQ/HuCY5bgpaWId1nvA5uYTYQhcbucFEatDpJrriz6S3t07z9jQVBp FxZsrwqhAO/62bQUTL8W4YUXtSe7SeVWQYPV1g6VkXjPQv6qWxpofbhvOXjzLEAtGB9OhV qmtHm5CvWW7pppZtjlhbxCtLzeDmtts5ZgkRdNeWtd5EvRRh3cjZiXWoHyI9+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 4c1YNn3Xvbzj2s; Tue, 12 Aug 2025 14:12: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 57CECPnw038663; Tue, 12 Aug 2025 14:12:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CECPcV038660; Tue, 12 Aug 2025 14:12:25 GMT (envelope-from git) Date: Tue, 12 Aug 2025 14:12:25 GMT Message-Id: <202508121412.57CECPcV038660@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: 463b5aed0d62 - main - tcp: retire rstreason List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 463b5aed0d62f094addb700604725767a8904901 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=463b5aed0d62f094addb700604725767a8904901 commit 463b5aed0d62f094addb700604725767a8904901 Author: Michael Tuexen AuthorDate: 2025-08-12 14:08:26 +0000 Commit: Michael Tuexen CommitDate: 2025-08-12 14:12:06 +0000 tcp: retire rstreason With the latest changes, this variable and parameter for tcp_dropwithreset() is not needed anymore. It also makes it harder to introduce the usage of multiple counters for TCP again, which might open side channel attacks. No funtional changes intended. Reviewed by: rrs MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D51872 --- sys/netinet/tcp_input.c | 30 +++++++----------------------- sys/netinet/tcp_stacks/bbr.c | 26 +++++++++++++------------- sys/netinet/tcp_stacks/rack.c | 26 +++++++++++++------------- sys/netinet/tcp_stacks/rack_bbr_common.c | 10 +++++----- sys/netinet/tcp_stacks/rack_bbr_common.h | 4 ++-- sys/netinet/tcp_var.h | 3 +-- 6 files changed, 41 insertions(+), 58 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index ddd0dbeafd06..6492495dc583 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -609,7 +609,6 @@ tcp_input_with_port(struct mbuf **mp, int *offp, int proto, uint16_t port) int tlen = 0, off; int drop_hdrlen; int thflags; - int rstreason = 0; /* For badport_bandlim accounting purposes */ int lookupflag; uint8_t iptos; struct m_tag *fwd_tag = NULL; @@ -921,7 +920,6 @@ findpcb: } closed_port = true; } - rstreason = BANDLIM_TCP_RST; goto dropwithreset; } INP_LOCK_ASSERT(inp); @@ -1012,13 +1010,11 @@ findpcb: * down or it is in the CLOSED state. Either way we drop the * segment and send an appropriate response. */ - rstreason = BANDLIM_TCP_RST; closed_port = true; goto dropwithreset; } if ((tp->t_port != port) && (tp->t_state > TCPS_LISTEN)) { - rstreason = BANDLIM_TCP_RST; closed_port = true; goto dropwithreset; } @@ -1134,7 +1130,6 @@ tfo_socket_result: V_tcp_sc_rst_sock_fail ? "sending RST" : "try again"); if (V_tcp_sc_rst_sock_fail) { - rstreason = BANDLIM_TCP_RST; goto dropwithreset; } else goto dropunlock; @@ -1201,7 +1196,6 @@ tfo_socket_result: s, __func__); syncache_badack(&inc, port); /* XXX: Not needed! */ TCPSTAT_INC(tcps_badsyn); - rstreason = BANDLIM_TCP_RST; goto dropwithreset; } /* @@ -1277,7 +1271,6 @@ tfo_socket_result: "Connection attempt to deprecated " "IPv6 address rejected\n", s, __func__); - rstreason = BANDLIM_TCP_RST; goto dropwithreset; } } @@ -1398,8 +1391,7 @@ dropwithreset: * When blackholing do not respond with a RST but * completely ignore the segment and drop it. */ - if (rstreason == BANDLIM_TCP_RST && - ((!closed_port && V_blackhole == 3) || + if (((!closed_port && V_blackhole == 3) || (closed_port && ((V_blackhole == 1 && (thflags & TH_SYN)) || V_blackhole > 1))) && (V_blackhole_local || ( @@ -1414,7 +1406,7 @@ dropwithreset: ))) goto dropunlock; TCP_PROBE5(receive, NULL, tp, m, tp, th); - tcp_dropwithreset(m, th, tp, tlen, rstreason); + tcp_dropwithreset(m, th, tp, tlen); m = NULL; /* mbuf chain got consumed. */ dropunlock: @@ -1523,7 +1515,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, uint16_t thflags; int acked, ourfinisacked, needoutput = 0; sackstatus_t sack_changed; - int rstreason, todrop, win, incforsyn = 0; + int todrop, win, incforsyn = 0; uint32_t tiwin; uint16_t nsegs; char *s; @@ -1568,7 +1560,6 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, */ if ((tp->t_state == TCPS_SYN_SENT) && (thflags & TH_ACK) && (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { - rstreason = BANDLIM_TCP_RST; tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); goto dropwithreset; } @@ -1984,7 +1975,6 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, if ((thflags & TH_ACK) && (SEQ_LEQ(th->th_ack, tp->snd_una) || SEQ_GT(th->th_ack, tp->snd_max))) { - rstreason = BANDLIM_TCP_RST; tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); goto dropwithreset; } @@ -1997,7 +1987,6 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, * FIN, or a RST. */ if ((thflags & (TH_SYN|TH_ACK)) == (TH_SYN|TH_ACK)) { - rstreason = BANDLIM_TCP_RST; tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); goto dropwithreset; } else if (thflags & TH_SYN) { @@ -2264,7 +2253,6 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, * for the "LAND" DoS attack. */ if (tp->t_state == TCPS_SYN_RECEIVED && SEQ_LT(th->th_seq, tp->irs)) { - rstreason = BANDLIM_TCP_RST; tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); goto dropwithreset; } @@ -2346,7 +2334,6 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, tcp_log_end_status(tp, TCP_EI_STATUS_SERVER_RST); tp = tcp_close(tp); TCPSTAT_INC(tcps_rcvafterclose); - rstreason = BANDLIM_TCP_RST; goto dropwithreset; } @@ -3443,7 +3430,6 @@ dropafterack: if (tp->t_state == TCPS_SYN_RECEIVED && (thflags & TH_ACK) && (SEQ_GT(tp->snd_una, th->th_ack) || SEQ_GT(th->th_ack, tp->snd_max)) ) { - rstreason = BANDLIM_TCP_RST; tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); goto dropwithreset; } @@ -3455,11 +3441,10 @@ dropafterack: return; dropwithreset: + tcp_dropwithreset(m, th, NULL, tlen); if (tp != NULL) { - tcp_dropwithreset(m, th, tp, tlen, rstreason); INP_WUNLOCK(inp); - } else - tcp_dropwithreset(m, th, NULL, tlen, rstreason); + } return; drop: @@ -3479,8 +3464,7 @@ drop: * tp may be NULL. */ void -tcp_dropwithreset(struct mbuf *m, struct tcphdr *th, struct tcpcb *tp, - int tlen, int rstreason) +tcp_dropwithreset(struct mbuf *m, struct tcphdr *th, struct tcpcb *tp, int tlen) { #ifdef INET struct ip *ip; @@ -3520,7 +3504,7 @@ tcp_dropwithreset(struct mbuf *m, struct tcphdr *th, struct tcpcb *tp, #endif /* Perform bandwidth limiting. */ - if (badport_bandlim(rstreason) < 0) + if (badport_bandlim(BANDLIM_TCP_RST) < 0) goto drop; /* tcp_respond consumes the mbuf chain. */ diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index f2960ab9c636..fed259f4d8e1 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -7863,7 +7863,7 @@ nothing_left: /* tcp_close will kill the inp pre-log the Reset */ tcp_log_end_status(tp, TCP_EI_STATUS_SERVER_RST); tp = tcp_close(tp); - ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset(m, tp, th, tlen); BBR_STAT_INC(bbr_dropped_af_data); return (1); } @@ -8763,7 +8763,7 @@ bbr_do_syn_sent(struct mbuf *m, struct tcphdr *th, struct socket *so, (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset(m, tp, th, tlen); return (1); } if ((thflags & (TH_ACK | TH_RST)) == (TH_ACK | TH_RST)) { @@ -8965,7 +8965,7 @@ bbr_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, (SEQ_LEQ(th->th_ack, tp->snd_una) || SEQ_GT(th->th_ack, tp->snd_max))) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset(m, tp, th, tlen); return (1); } if (tp->t_flags & TF_FASTOPEN) { @@ -8977,7 +8977,7 @@ bbr_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, */ if ((thflags & (TH_SYN | TH_ACK)) == (TH_SYN | TH_ACK)) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset(m, tp, th, tlen); return (1); } else if (thflags & TH_SYN) { /* non-initial SYN is ignored */ @@ -9010,7 +9010,7 @@ bbr_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, */ if (SEQ_LT(th->th_seq, tp->irs)) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset(m, tp, th, tlen); return (1); } if (ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val)) { @@ -9288,7 +9288,7 @@ bbr_do_established(struct mbuf *m, struct tcphdr *th, struct socket *so, if (sbavail(&so->so_snd)) { if (ctf_progress_timeout_check(tp, true)) { bbr_log_progress_event(bbr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset_conn(m, tp, th, tlen); return (1); } } @@ -9385,7 +9385,7 @@ bbr_do_close_wait(struct mbuf *m, struct tcphdr *th, struct socket *so, if (sbavail(&so->so_snd)) { if (ctf_progress_timeout_check(tp, true)) { bbr_log_progress_event(bbr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset_conn(m, tp, th, tlen); return (1); } } @@ -9405,7 +9405,7 @@ close_now: tcp_log_end_status(tp, TCP_EI_STATUS_SERVER_RST); tp = tcp_close(tp); KMOD_TCPSTAT_INC(tcps_rcvafterclose); - ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, (*tlen)); + ctf_do_dropwithreset(m, tp, th, *tlen); return (1); } if (sbavail(&so->so_snd) == 0) @@ -9535,7 +9535,7 @@ bbr_do_fin_wait_1(struct mbuf *m, struct tcphdr *th, struct socket *so, if (sbavail(&so->so_snd)) { if (ctf_progress_timeout_check(tp, true)) { bbr_log_progress_event(bbr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset_conn(m, tp, th, tlen); return (1); } } @@ -9637,7 +9637,7 @@ bbr_do_closing(struct mbuf *m, struct tcphdr *th, struct socket *so, if (sbavail(&so->so_snd)) { if (ctf_progress_timeout_check(tp, true)) { bbr_log_progress_event(bbr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset_conn(m, tp, th, tlen); return (1); } } @@ -9739,7 +9739,7 @@ bbr_do_lastack(struct mbuf *m, struct tcphdr *th, struct socket *so, if (sbavail(&so->so_snd)) { if (ctf_progress_timeout_check(tp, true)) { bbr_log_progress_event(bbr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset_conn(m, tp, th, tlen); return (1); } } @@ -9848,7 +9848,7 @@ bbr_do_fin_wait_2(struct mbuf *m, struct tcphdr *th, struct socket *so, if (sbavail(&so->so_snd)) { if (ctf_progress_timeout_check(tp, true)) { bbr_log_progress_event(bbr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset_conn(m, tp, th, tlen); return (1); } } @@ -11510,7 +11510,7 @@ bbr_do_segment_nounlock(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, if ((tp->t_state == TCPS_SYN_SENT) && (thflags & TH_ACK) && (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset_conn(m, tp, th, tlen); return (1); } if (tiwin > bbr->r_ctl.rc_high_rwnd) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 2dfcad84ad99..71dd4de6baf9 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -12038,7 +12038,7 @@ rack_process_ack(struct mbuf *m, struct tcphdr *th, struct socket *so, /* tcp_close will kill the inp pre-log the Reset */ tcp_log_end_status(tp, TCP_EI_STATUS_SERVER_RST); tp = tcp_close(tp); - ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset(m, tp, th, tlen); return (1); } } @@ -12876,7 +12876,7 @@ rack_do_syn_sent(struct mbuf *m, struct tcphdr *th, struct socket *so, (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset(m, tp, th, tlen); return (1); } if ((thflags & (TH_ACK | TH_RST)) == (TH_ACK | TH_RST)) { @@ -13090,7 +13090,7 @@ rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, (SEQ_LEQ(th->th_ack, tp->snd_una) || SEQ_GT(th->th_ack, tp->snd_max))) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset(m, tp, th, tlen); return (1); } if (tp->t_flags & TF_FASTOPEN) { @@ -13103,7 +13103,7 @@ rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, */ if ((thflags & (TH_SYN | TH_ACK)) == (TH_SYN | TH_ACK)) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset(m, tp, th, tlen); return (1); } else if (thflags & TH_SYN) { /* non-initial SYN is ignored */ @@ -13137,7 +13137,7 @@ rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, */ if (SEQ_LT(th->th_seq, tp->irs)) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset(m, tp, th, tlen); return (1); } if (ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val)) { @@ -13400,7 +13400,7 @@ rack_do_established(struct mbuf *m, struct tcphdr *th, struct socket *so, if (sbavail(&so->so_snd)) { if (ctf_progress_timeout_check(tp, true)) { rack_log_progress_event(rack, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset_conn(m, tp, th, tlen); return (1); } } @@ -13496,7 +13496,7 @@ rack_do_close_wait(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_progress_timeout_check(tp, true)) { rack_log_progress_event((struct tcp_rack *)tp->t_fb_ptr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset_conn(m, tp, th, tlen); return (1); } } @@ -13518,7 +13518,7 @@ rack_check_data_after_close(struct mbuf *m, tcp_log_end_status(tp, TCP_EI_STATUS_SERVER_RST); tp = tcp_close(tp); KMOD_TCPSTAT_INC(tcps_rcvafterclose); - ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, (*tlen)); + ctf_do_dropwithreset(m, tp, th, *tlen); return (1); } if (sbavail(&so->so_snd) == 0) @@ -13646,7 +13646,7 @@ rack_do_fin_wait_1(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_progress_timeout_check(tp, true)) { rack_log_progress_event((struct tcp_rack *)tp->t_fb_ptr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset_conn(m, tp, th, tlen); return (1); } } @@ -13747,7 +13747,7 @@ rack_do_closing(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_progress_timeout_check(tp, true)) { rack_log_progress_event((struct tcp_rack *)tp->t_fb_ptr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset_conn(m, tp, th, tlen); return (1); } } @@ -13849,7 +13849,7 @@ rack_do_lastack(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_progress_timeout_check(tp, true)) { rack_log_progress_event((struct tcp_rack *)tp->t_fb_ptr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset_conn(m, tp, th, tlen); return (1); } } @@ -13953,7 +13953,7 @@ rack_do_fin_wait_2(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_progress_timeout_check(tp, true)) { rack_log_progress_event((struct tcp_rack *)tp->t_fb_ptr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset_conn(m, tp, th, tlen); return (1); } } @@ -16653,7 +16653,7 @@ rack_do_segment_nounlock(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, if ((tp->t_state == TCPS_SYN_SENT) && (thflags & TH_ACK) && (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset(m, tp, th, tlen); #ifdef TCP_ACCOUNTING sched_unpin(); #endif diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c index fb013d3d17f0..fc12672a45f7 100644 --- a/sys/netinet/tcp_stacks/rack_bbr_common.c +++ b/sys/netinet/tcp_stacks/rack_bbr_common.c @@ -507,9 +507,9 @@ ctf_flight_size(struct tcpcb *tp, uint32_t rc_sacked) void ctf_do_dropwithreset(struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, - int32_t rstreason, int32_t tlen) + int32_t tlen) { - tcp_dropwithreset(m, th, tp, tlen, rstreason); + tcp_dropwithreset(m, th, tp, tlen); if (tp != NULL) INP_WUNLOCK(tptoinpcb(tp)); } @@ -670,7 +670,7 @@ ctf_do_dropafterack(struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, int32_t (SEQ_GT(tp->snd_una, th->th_ack) || SEQ_GT(th->th_ack, tp->snd_max))) { *ret_val = 1; - ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); + ctf_do_dropwithreset(m, tp, th, tlen); return; } else *ret_val = 0; @@ -864,10 +864,10 @@ ctf_calc_rwin(struct socket *so, struct tcpcb *tp) void ctf_do_dropwithreset_conn(struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, - int32_t rstreason, int32_t tlen) + int32_t tlen) { - tcp_dropwithreset(m, th, tp, tlen, rstreason); + tcp_dropwithreset(m, th, tp, tlen); tp = tcp_drop(tp, ETIMEDOUT); if (tp) INP_WUNLOCK(tptoinpcb(tp)); diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.h b/sys/netinet/tcp_stacks/rack_bbr_common.h index 6a8a056d89b0..cd33cb8ce50b 100644 --- a/sys/netinet/tcp_stacks/rack_bbr_common.h +++ b/sys/netinet/tcp_stacks/rack_bbr_common.h @@ -101,7 +101,7 @@ ctf_do_dropafterack(struct mbuf *m, struct tcpcb *tp, void ctf_do_dropwithreset(struct mbuf *m, struct tcpcb *tp, - struct tcphdr *th, int32_t rstreason, int32_t tlen); + struct tcphdr *th, int32_t tlen); void ctf_do_drop(struct mbuf *m, struct tcpcb *tp); @@ -125,7 +125,7 @@ ctf_calc_rwin(struct socket *so, struct tcpcb *tp); void ctf_do_dropwithreset_conn(struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, - int32_t rstreason, int32_t tlen); + int32_t tlen); uint32_t ctf_fixed_maxseg(struct tcpcb *tp); diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index b90f65e83cb1..53856bae9a66 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1379,8 +1379,7 @@ int tcp_reass(struct tcpcb *, struct tcphdr *, tcp_seq *, int *, void tcp_reass_global_init(void); void tcp_reass_flush(struct tcpcb *); void tcp_dooptions(struct tcpopt *, u_char *, int, int); -void tcp_dropwithreset(struct mbuf *, struct tcphdr *, - struct tcpcb *, int, int); +void tcp_dropwithreset(struct mbuf *, struct tcphdr *, struct tcpcb *, int); void tcp_pulloutofband(struct socket *, struct tcphdr *, struct mbuf *, int); void tcp_xmit_timer(struct tcpcb *, int); From nobody Tue Aug 12 14:37:11 2025 X-Original-To: dev-commits-src-main@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 4c1YxN1RM4z64t0t; Tue, 12 Aug 2025 14:37:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1YxN0fFSz3bdS; Tue, 12 Aug 2025 14:37:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755009432; 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=8QKAiyyE/x7qcvcJO43009VOivrtI5CDDNtUz7z4hxI=; b=EyOoyqwTriluPKu0JUj9SLGpOpls1b43u2eNRfIF2W+D7Fd8sUGVfp8t7we6Wvbut9R/WP jBn6CTHd+5uCxPCU3gwKGxaKNsOqd3jXa6mvzy3cOLNiNZ6C3zGJ6uuuZotTawvca5uqcY hO7Dm4ctJTFvdS6g3+lStEUqRJuTr5TeUyq+lKZ/oKSAxHVRUMSJ3tj/MXCnC4UZjuOlop 5QqE882hggItI545e/TU5l0rnczkYh0lYJKxfeW+ti9tNBFIBw/xfUIR6M4KLwj7JVW+Cf wQqn4bMAlJC4MRgN/UtE+8S9CnxT02p2wJ/1H6OIOqg8BcXUehdpBCYqqP0WHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755009432; 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=8QKAiyyE/x7qcvcJO43009VOivrtI5CDDNtUz7z4hxI=; b=gFb2hNk7IGA/+WsZ8EJBo1OSeuGFWNZD9tLH9Zs20NPTxmmrLWTYuf2t4OB0InutWjS0sU YJqiWX6Vso5HhMXvUCh7GaZnvthY9omBdlc+mMkFqwfIaZp1gyGh7SbJL8T/fevmJPP3ic qe2D1BJr847cu/YhDVRkz4ZmtlDyi/r6fVj5a44V2KHr3TAovBi9atXPywjz//uyqLqt0T owvAu0eAoP3aH3Obzad/gVr5l391Mk0QeaaXnu88PFbTQMYmHGxPHVlEtk9jGhrN9JTy2P rykEDyZsGlxXuAJAW5oSc99LfhDEGGBj+lPfQso3+PxXHgWZfNj23eY2iTEJQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755009432; a=rsa-sha256; cv=none; b=N1P5RbhnXLqxGOL43vEcRfjUIxqSd0AaOUieCvjfsUffxPvblxW35fXcHj1k/zCZYV5vQU gcVzcxZQTutw5PJMewscSdkfpxauEH69JtUST6cL0ITnDb1vOe6dnQMvjhCTx3LYg0dNgY F2T8zzCAakNnyNr8Q/S8xT04Xoq7WjpAgAk30+CmkSCDnMLGoie8+1MSSH63TqC09IY2c9 08HNywxpsXiDlETKFrpyS3YwbsWr1o1h+OTjk5L/EJNQCY0LE/q6p6J3c5u5Gx8dw9yNXf mVGQ11RTIG/ixvCEgn8pMjL5l/5m1MflBU90jsykVjEhvC0sPud8fJbP8JRWag== 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 4c1YxM6qw9zj4V; Tue, 12 Aug 2025 14:37: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 57CEbB2e077335; Tue, 12 Aug 2025 14:37:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CEbBPm077332; Tue, 12 Aug 2025 14:37:11 GMT (envelope-from git) Date: Tue, 12 Aug 2025 14:37:11 GMT Message-Id: <202508121437.57CEbBPm077332@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ronald Klop Subject: git: 78537728efc5 - main - Document tunable net.link.epair.ether_gen_addr List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ronald X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 78537728efc5387558c97ba2730ce746d6259013 Auto-Submitted: auto-generated The branch main has been updated by ronald: URL: https://cgit.FreeBSD.org/src/commit/?id=78537728efc5387558c97ba2730ce746d6259013 commit 78537728efc5387558c97ba2730ce746d6259013 Author: Ronald Klop AuthorDate: 2025-08-11 13:51:16 +0000 Commit: Ronald Klop CommitDate: 2025-08-12 14:36:52 +0000 Document tunable net.link.epair.ether_gen_addr Approved by: hrs Fixes: 590493c1419092e98f7ad1dcadb886973502341e ("if_epair(4): use ether_gen_addr(9) for stable MAC address") MFC after: 1 week (together with the tunable) Differential Revision: https://reviews.freebsd.org/D51861 --- share/man/man4/epair.4 | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/share/man/man4/epair.4 b/share/man/man4/epair.4 index 4bcb54c936cb..342b15b5612a 100644 --- a/share/man/man4/epair.4 +++ b/share/man/man4/epair.4 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 18, 2015 +.Dd August 12, 2025 .Dt EPAIR 4 .Os .Sh NAME @@ -79,12 +79,24 @@ and Like any other Ethernet interface, an .Nm needs to have a network address. -Each +If the tunable +.Va net.link.epair.ether_gen_addr Ns +=0, each .Nm -will be assigned a locally administered address by default, +will be assigned a random locally administered address, that is only guaranteed to be unique within one network stack. -To change the default addresses one may use the SIOCSIFADDR ioctl(2) or -ifconfig(8) utility. +The tunable +.Va net.link.epair.ether_gen_addr Ns +=1 will generate a stable MAC address with +.Fx +OUI using +.Xr ether_gen_addr 9 . +This tunable defaults to 1 in +.Fx 15.0 and might be removed in +.Fx 16.0 . +To change the default addresses one may use the SIOCSIFADDR +.Xr ioctl 2 or +.Xr ifconfig 8 utility. .Pp The basic intent is to provide connectivity between two virtual network stack instances. From nobody Tue Aug 12 15:15:06 2025 X-Original-To: dev-commits-src-main@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 4c1Zn66jcsz64wnk; Tue, 12 Aug 2025 15:15:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1Zn65xM6z3gXP; Tue, 12 Aug 2025 15:15:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755011706; 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=PYYiPXKiElHlf/BXFr7bbBY3XBXdKLA3B1PYdfM/NNg=; b=fVCu3Yyu0WIrq21b6QHwBU1i4Dml3MYpAi2n5anckFATwG53IJ4/ZPRoIYdTef9fZ4l/Um 3VAQGZ4z5SWpruJpjCdEO5xwzMjDDYKAcZiu+Qgg+cekwwhC1tFR0+pFt++blnz0Z1Hgrj MAQRzQt4NTyUyt7ewkjThndaHdHlCznIUvXNet+o2/5CqNRqMdicYOOgaOXpPQlftPW3OV Kt+g2ygw4CxgDKhSALYpxYYDzQdvehhJczeOVEbzUpjlobz9m5O1zObomjDv5O5KxZJxLk uKb6zZFgFaRM5UtGsA4KuXU+QPZJJXlFROnCQkUs+mfEUJvQCXlgT8Z4BUVTtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755011706; 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=PYYiPXKiElHlf/BXFr7bbBY3XBXdKLA3B1PYdfM/NNg=; b=tYMeU0aVDF5JzgnHQtLjgbK2s+Pa744lgzhL3YMLPqjh0OfiUNJVXYeMQyFmhso//zmXEF GendCO4kiRw44eJcUtblD/UHbJ+an6jCfVEqSNJewqjeMr+J3aXSdt/0rxtflqsoTcNw2v JlsRedwVE/X1t94mDSteP4IIXpgT/WCXytPYs9A50BrgUrfcY6mj3JNTU8nfDXWARnkOuv a/bqR0/TEO30q8E7MuWvtxsOARD8b7KefFen6y9/s9px38CPc3x+dgwd1vPu0kYw7OCEgO qvuFoU0dlxzAw6xsj+1Esou3xma1mD0QhSrFYcwdGvgUJtvNdp4osLBtYTJc3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755011706; a=rsa-sha256; cv=none; b=hLJ1PQBo95wOo424OgHIbkG0yIVW31mqLwF3RwbnAqIVHfOrGIfApKq6EK/0jI05h5V/Hk FBtOl6sCC9eu4Gi/4keU4Zl2aZ7Obj3ChWSy2YBSzU/y6NaFvKHCCKZ7S7WhObh3By9H+L ajx38w1Aj4kAbvpXFUns/DKPvYkIoserwXmOttgCH5sFfpf0xwW9wU+iDJp5ALAlV2yiHw N+5YRG1q5knvzi1yrrkxFNUEHRF+iK9twMHDrp7rdFEq7x597IoDxvhge+9ksY11BWz68S ZnnlNyL1+MSHHkYfeqq5N3luvQwGdhAqkMM0pxJJ6Ph/8Q+LSkV6smiKAmsGZA== 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 4c1Zn65VrpzkQy; Tue, 12 Aug 2025 15:15:06 +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 57CFF6Zd052349; Tue, 12 Aug 2025 15:15:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CFF6ZM052346; Tue, 12 Aug 2025 15:15:06 GMT (envelope-from git) Date: Tue, 12 Aug 2025 15:15:06 GMT Message-Id: <202508121515.57CFF6ZM052346@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: 61e404271ab8 - main - sockstat: complete libxo integration and improve formatting List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 61e404271ab81ec8035f4c9d23e6190c15d7f24c Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=61e404271ab81ec8035f4c9d23e6190c15d7f24c commit 61e404271ab81ec8035f4c9d23e6190c15d7f24c Author: Damin Rido AuthorDate: 2025-08-08 13:04:17 +0000 Commit: Alan Somers CommitDate: 2025-08-12 15:13:31 +0000 sockstat: complete libxo integration and improve formatting Fixed missing field names in xo_emit() calls for xolint compliance, treated XO_STYLE_HTML like XO_STYLE_TEXT to apply space-padded formatting for human-readable output, and updated usage() to indicate that --libxo accepts arguments. Reported by: Phil Shafer Sponsored by: Google, LLC (GSoC 2025) MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1806 Reviewed by: asomers --- usr.bin/sockstat/sockstat.c | 148 +++++++++++++++++++++++--------------------- 1 file changed, 78 insertions(+), 70 deletions(-) diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c index 6761faae5210..895c4d453b54 100644 --- a/usr.bin/sockstat/sockstat.c +++ b/usr.bin/sockstat/sockstat.c @@ -99,6 +99,7 @@ static bool opt_U; /* Show remote UDP encapsulation port number */ static bool opt_u; /* Show Unix domain sockets */ static u_int opt_v; /* Verbose mode */ static bool opt_w; /* Automatically size the columns */ +static bool is_xo_style_encoding; /* * Default protocols to use if no -P was defined. @@ -823,9 +824,7 @@ gather_unix(int proto) break; case SOCK_SEQPACKET: varname = "net.local.seqpacket.pcblist"; - protoname = (xo_get_style(NULL) == XO_STYLE_TEXT) - ? "seqpac" - : "seqpacket"; + protoname = is_xo_style_encoding ? "seqpacket" : "seqpack"; break; default: abort(); @@ -935,7 +934,6 @@ formataddr(struct sockaddr_storage *ss, char *buf, size_t bufsize) struct sockaddr_un *sun; char addrstr[NI_MAXHOST] = { '\0', '\0' }; int error, off, port = 0; - const bool is_text_style = (xo_get_style(NULL) == XO_STYLE_TEXT); switch (ss->ss_family) { case AF_INET: @@ -951,7 +949,7 @@ formataddr(struct sockaddr_storage *ss, char *buf, size_t bufsize) case AF_UNIX: sun = sstosun(ss); off = (int)((char *)&sun->sun_path - (char *)sun); - if (!is_text_style) { + if (is_xo_style_encoding) { xo_emit("{:path/%.*s}", sun->sun_len - off, sun->sun_path); return 0; @@ -965,7 +963,7 @@ formataddr(struct sockaddr_storage *ss, char *buf, size_t bufsize) if (error) xo_errx(1, "cap_getnameinfo()"); } - if (!is_text_style) { + if (is_xo_style_encoding) { xo_emit("{:address/%s}", addrstr); xo_emit("{:port/%d}", port); return 0; @@ -1113,15 +1111,14 @@ format_unix_faddr(struct addr *faddr, char *buf, size_t bufsize) { #define SAFESIZE (buf == NULL ? 0 : bufsize - pos) size_t pos = 0; - const bool is_text_style = (xo_get_style(NULL) == XO_STYLE_TEXT); if (faddr->conn != 0) { /* Remote peer we connect(2) to, if any. */ struct sock *p; - if (is_text_style) + if (!is_xo_style_encoding) pos += strlcpy(SAFEBUF, "-> ", SAFESIZE); p = RB_FIND(pcbs_t, &pcbs, &(struct sock){ .pcb = faddr->conn }); - if (__predict_false(p == NULL) && is_text_style) { + if (__predict_false(p == NULL) && !is_xo_style_encoding) { /* XXGL: can this happen at all? */ pos += snprintf(SAFEBUF, SAFESIZE, "??"); } else if (p->laddr->address.ss_len == 0) { @@ -1130,7 +1127,7 @@ format_unix_faddr(struct addr *faddr, char *buf, size_t bufsize) { &(struct file){ .xf_data = p->socket }); if (f != NULL) { - if (is_text_style) { + if (!is_xo_style_encoding) { pos += snprintf(SAFEBUF, SAFESIZE, "[%lu %d]", (u_long)f->xf_pid, f->xf_fd); @@ -1153,7 +1150,7 @@ format_unix_faddr(struct addr *faddr, char *buf, size_t bufsize) { kvaddr_t ref = faddr->firstref; bool fref = true; - if (is_text_style) + if (!is_xo_style_encoding) pos += snprintf(SAFEBUF, SAFESIZE, " <- "); xo_open_list("connections"); while ((p = RB_FIND(pcbs_t, &pcbs, @@ -1161,7 +1158,7 @@ format_unix_faddr(struct addr *faddr, char *buf, size_t bufsize) { f = RB_FIND(files_t, &ftree, &(struct file){ .xf_data = p->socket }); if (f != NULL) { - if (is_text_style) { + if (!is_xo_style_encoding) { pos += snprintf(SAFEBUF, SAFESIZE, "%s[%lu %d]", fref ? "" : ",", (u_long)f->xf_pid, f->xf_fd); @@ -1380,7 +1377,6 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) laddr = s->laddr; faddr = s->faddr; first = true; - const bool is_text_style = (xo_get_style(NULL) == XO_STYLE_TEXT); snprintf(buf, bufsize, "%s%s%s", s->protoname, @@ -1395,55 +1391,62 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) if (laddr->address.ss_len > 0) { xo_open_container("local"); formataddr(&laddr->address, buf, bufsize); - if (is_text_style) { - xo_emit(" {:/%-*.*s}", cw->local_addr, - cw->local_addr, buf); + if (!is_xo_style_encoding) { + xo_emit(" {:local-address/%-*.*s}", + cw->local_addr, cw->local_addr, + buf); } xo_close_container("local"); } else if (laddr->address.ss_len == 0 && - faddr->conn == 0 && is_text_style) { - xo_emit(" {:/%-*.*s}", cw->local_addr, - cw->local_addr, "(not connected)"); - } else if (is_text_style) { - xo_emit(" {:/%-*.*s}", cw->local_addr, - cw->local_addr, "??"); + faddr->conn == 0 && !is_xo_style_encoding) { + xo_emit(" {:local-address/%-*.*s}", + cw->local_addr, cw->local_addr, + "(not connected)"); + } else if (!is_xo_style_encoding) { + xo_emit(" {:local-address/%-*.*s}", + cw->local_addr, cw->local_addr, "??"); } if (faddr->conn != 0 || faddr->firstref != 0) { xo_open_container("foreign"); int len = format_unix_faddr(faddr, buf, bufsize); - if (len == 0 && is_text_style) - xo_emit(" {:/%-*s}", + if (len == 0 && !is_xo_style_encoding) + xo_emit(" {:foreign-address/%-*s}", cw->foreign_addr, "??"); - else if (is_text_style) - xo_emit(" {:/%-*.*s}", cw->foreign_addr, + else if (!is_xo_style_encoding) + xo_emit(" {:foreign-address/%-*.*s}", + cw->foreign_addr, cw->foreign_addr, buf); xo_close_container("foreign"); - } else if (is_text_style) - xo_emit(" {:/%-*s}", cw->foreign_addr, "??"); + } else if (!is_xo_style_encoding) + xo_emit(" {:foreign-address/%-*s}", + cw->foreign_addr, "??"); } else { if (laddr != NULL) { xo_open_container("local"); formataddr(&laddr->address, buf, bufsize); - if (is_text_style) { - xo_emit(" {:/%-*.*s}", cw->local_addr, - cw->local_addr, buf); + if (!is_xo_style_encoding) { + xo_emit(" {:local-address/%-*.*s}", + cw->local_addr, cw->local_addr, + buf); } xo_close_container("local"); - } else if (is_text_style) - xo_emit(" {:/%-*.*s}", cw->local_addr, - cw->local_addr, "??"); + } else if (!is_xo_style_encoding) + xo_emit(" {:local-address/%-*.*s}", + cw->local_addr, cw->local_addr, "??"); if (faddr != NULL) { xo_open_container("foreign"); formataddr(&faddr->address, buf, bufsize); - if (is_text_style) { - xo_emit(" {:/%-*.*s}", cw->foreign_addr, + if (!is_xo_style_encoding) { + xo_emit(" {:foreign-address/%-*.*s}", + cw->foreign_addr, cw->foreign_addr, buf); } xo_close_container("foreign"); - } else if (is_text_style) { - xo_emit(" {:/%-*.*s}", cw->foreign_addr, - cw->foreign_addr, "??"); + } else if (!is_xo_style_encoding) { + xo_emit(" {:foreign-address/%-*.*s}", + cw->foreign_addr, cw->foreign_addr, + "??"); } } if (opt_A) { @@ -1463,12 +1466,13 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) formataddr(&sp->laddr->address, buf, bufsize); xo_close_container("splice"); - } else if (is_text_style) + } else if (!is_xo_style_encoding) strlcpy(buf, "??", bufsize); - } else if (is_text_style) + } else if (!is_xo_style_encoding) strlcpy(buf, "??", bufsize); - if (is_text_style) - xo_emit(" {:/%-*s}", cw->splice_address, buf); + if (!is_xo_style_encoding) + xo_emit(" {:splice-address/%-*s}", + cw->splice_address, buf); } if (opt_i) { if (s->proto == IPPROTO_TCP || s->proto == IPPROTO_UDP) @@ -1476,8 +1480,8 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) snprintf(buf, bufsize, "%" PRIu64, s->inp_gencnt); xo_emit(" {:id/%*s}", cw->inp_gencnt, buf); - } else if (is_text_style) - xo_emit(" {:/%*s}", cw->inp_gencnt, "??"); + } else if (!is_xo_style_encoding) + xo_emit(" {:id/%*s}", cw->inp_gencnt, "??"); } if (opt_U) { if (faddr != NULL && @@ -1490,8 +1494,8 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) s->state != TCPS_LISTEN))) { xo_emit(" {:encaps/%*u}", cw->encaps, ntohs(faddr->encaps_port)); - } else if (is_text_style) - xo_emit(" {:/%*s}", cw->encaps, "??"); + } else if (!is_xo_style_encoding) + xo_emit(" {:encaps/%*s}", cw->encaps, "??"); } if (opt_s) { if (faddr != NULL && @@ -1501,8 +1505,9 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) s->state != SCTP_LISTEN) { xo_emit(" {:path-state/%-*s}", cw->path_state, sctp_path_state(faddr->state)); - } else if (is_text_style) - xo_emit(" {:/%-*s}", cw->path_state, "??"); + } else if (!is_xo_style_encoding) + xo_emit(" {:path-state/%-*s}", cw->path_state, + "??"); } if (first) { if (opt_s) { @@ -1520,37 +1525,37 @@ display_sock(struct sock *s, struct col_widths *cw, char *buf, size_t bufsize) xo_emit(" {:conn-state/%-*s}", cw->conn_state, tcpstates[s->state]); - else if (is_text_style) - xo_emit(" {:/%-*s}", + else if (!is_xo_style_encoding) + xo_emit(" {:conn-state/%-*s}", cw->conn_state, "??"); break; } - } else if (is_text_style) - xo_emit(" {:/%-*s}", + } else if (!is_xo_style_encoding) + xo_emit(" {:conn-state/%-*s}", cw->conn_state, "??"); } if (opt_S) { if (s->proto == IPPROTO_TCP) xo_emit(" {:stack/%-*s}", cw->stack, s->stack); - else if (is_text_style) - xo_emit(" {:/%-*s}", + else if (!is_xo_style_encoding) + xo_emit(" {:stack/%-*s}", cw->stack, "??"); } if (opt_C) { if (s->proto == IPPROTO_TCP) xo_emit(" {:cc/%-*s}", cw->cc, s->cc); - else if (is_text_style) - xo_emit(" {:/%-*s}", cw->cc, "??"); + else if (!is_xo_style_encoding) + xo_emit(" {:cc/%-*s}", cw->cc, "??"); } } if (laddr != NULL) laddr = laddr->next; if (faddr != NULL) faddr = faddr->next; - if (is_text_style && (laddr != NULL || faddr != NULL)) - xo_emit("{:/%-*s} {:/%-*s} {:/%*s} {:/%*s}", - cw->user, "??", cw->command, "??", + if (!is_xo_style_encoding && (laddr != NULL || faddr != NULL)) + xo_emit("{:user/%-*s} {:command/%-*s} {:pid/%*s}" + " {:fd/%*s}", cw->user, "??", cw->command, "??", cw->pid, "??", cw->fd, "??"); first = false; } @@ -1572,7 +1577,7 @@ display(void) return; } - if (xo_get_style(NULL) == XO_STYLE_TEXT) { + if (!is_xo_style_encoding) { cw = (struct col_widths) { .user = strlen("USER"), .command = 10, @@ -1643,8 +1648,8 @@ display(void) (u_long)xf->xf_uid); else xo_emit("{:user/%-*s}", cw.user, pwd->pw_name); - if (xo_get_style(NULL) == XO_STYLE_TEXT) - xo_emit(" {:/%-*.10s}", cw.command, + if (!is_xo_style_encoding) + xo_emit(" {:command/%-*.10s}", cw.command, getprocname(xf->xf_pid)); else xo_emit(" {:command/%-*s}", cw.command, @@ -1661,9 +1666,9 @@ display(void) if (!check_ports(s)) continue; xo_open_instance("socket"); - if (xo_get_style(NULL) == XO_STYLE_TEXT) - xo_emit("{:/%-*s} {:/%-*s} {:/%*s} {:/%*s}", - cw.user, "??", cw.command, "??", + if (!is_xo_style_encoding) + xo_emit("{:user/%-*s} {:command/%-*s} {:pid/%*s}" + " {:fd/%*s}", cw.user, "??", cw.command, "??", cw.pid, "??", cw.fd, "??"); display_sock(s, &cw, buf, bufsize); xo_close_instance("socket"); @@ -1674,9 +1679,9 @@ display(void) if (!check_ports(s)) continue; xo_open_instance("socket"); - if (xo_get_style(NULL) == XO_STYLE_TEXT) - xo_emit("{:/%-*s} {:/%-*s} {:/%*s} {:/%*s}", - cw.user, "??", cw.command, "??", + if (!is_xo_style_encoding) + xo_emit("{:user/%-*s} {:command/%-*s} {:pid/%*s}" + " {:fd/%*s}", cw.user, "??", cw.command, "??", cw.pid, "??", cw.fd, "??"); display_sock(s, &cw, buf, bufsize); xo_close_instance("socket"); @@ -1749,7 +1754,7 @@ static void usage(void) { xo_error( -"usage: sockstat [--libxo] [-46ACcfIiLlnqSsUuvw] [-j jid] [-p ports]\n" +"usage: sockstat [--libxo ...] [-46ACcfIiLlnqSsUuvw] [-j jid] [-p ports]\n" " [-P protocols]\n"); exit(1); } @@ -1767,6 +1772,9 @@ main(int argc, char *argv[]) argc = xo_parse_args(argc, argv); if (argc < 0) exit(1); + if (xo_get_style(NULL) != XO_STYLE_TEXT && + xo_get_style(NULL) != XO_STYLE_HTML) + is_xo_style_encoding = true; opt_j = -1; while ((o = getopt(argc, argv, "46ACcfIij:Llnp:P:qSsUuvw")) != -1) switch (o) { From nobody Tue Aug 12 16:40:30 2025 X-Original-To: dev-commits-src-main@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 4c1cgg0K0Hz655B9; Tue, 12 Aug 2025 16:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1cgf5cqyz3rTP; Tue, 12 Aug 2025 16:40:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755016830; 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=IGkarLs2j4rUfsg/XnyYwxCYrPO1DpUrO1f3C+2w/SY=; b=GX/4yRU2R+BPeltRLQj2jmQKetnnH5rolf24qlkkXKxNpBe/kPr8sy8H/EMx1/1yGrGEQe hX0aH/ADH52jV0ae3Gq7D4xOj+hBnAlpdlbDtrYVsquLEZC58yTgGAFG0nh4NAIUcjZwNX 4yzSQ+ctuthbuc5KmMaAy88MIetiTW2tIuXpAOfs2ewEFrGPNzqeOHMZEGcy18xdxiijH5 BRmuC+Jn+hv6ru7N1cTIym/P3dsvXokFTGJUK1tECYBBNV51gLxYnu+Gz/2SRyBQtC5lAG YN40bMhrQW69xHEpIyv4deIdZh0TinS7C+f7DrSjib63XK/eCRiCg4xs+afaxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755016830; 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=IGkarLs2j4rUfsg/XnyYwxCYrPO1DpUrO1f3C+2w/SY=; b=hlxFYeyTemEb/juoy9b0aRnCS3W1CKrypKuCgqGZN88kOUqjjU4t1SllTSK+NcRmOctlyN 6lehrV0/toy0Th+yRtWa51ZjbjICfVhcSoQGNsLmNwVp1ctkcUNy3R/Z9GPvYrUHTr2Ay5 87v/AToOAcPLN3EvMINOGBCHQRmyAXrqWkCtCgXq06y5PO5hv+HBMcCX0nHjx2YWWwJbnO Qziirw+jfbpHJ1BjKiSD+QaK5AeKf17l//TBjPnLdaWCK5VhdUssobB+e1fK4lECE8vZqI zyHQ2NND7pnDGV4B5qc0AUY+kbfEWrxnzi5xhxfgNVCrdtUUwWzZ1Do+3sLU+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755016830; a=rsa-sha256; cv=none; b=hzC01Zkug3UszGxvUg0CpG/zcfo1Tl2fXcbRsea0JlGCCouQJh1zMTMDCRS6mpdmDAcNGI 4dlg0P+9dsTGzH7BJBuxOD+JQUaThRGThTte/aVc+lG8J/pHKe3l8Py8SEvOkiKAGHCOay ErObTlhnignFsGBiD8VfoVNSVxJcTuVpdo9iittA8b5jLO+xRYpdUcymHt/z+5/aNKFlBn 2IIZA5erjW7n09aUqdFrvUVTLR/G8qnyznVOqjP7UzdAVLg7Fj0OcxculKusIWDXg21o5R LC79pO+2dV0U+QIjeLicoAmllEuc6Nn1Rn9inQE7rGMiJGqLp5SdvJMujLKZkg== 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 4c1cgf5D5Yzm7c; Tue, 12 Aug 2025 16:40: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 57CGeUgM012160; Tue, 12 Aug 2025 16:40:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CGeUWA012157; Tue, 12 Aug 2025 16:40:30 GMT (envelope-from git) Date: Tue, 12 Aug 2025 16:40:30 GMT Message-Id: <202508121640.57CGeUWA012157@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: ec92e61f99f6 - main - sockstat: rename sockstat.c to main.c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: ec92e61f99f62e377910a543f2446e0338aa5563 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=ec92e61f99f62e377910a543f2446e0338aa5563 commit ec92e61f99f62e377910a543f2446e0338aa5563 Author: Alan Somers AuthorDate: 2025-08-12 16:18:55 +0000 Commit: Alan Somers CommitDate: 2025-08-12 16:28:27 +0000 sockstat: rename sockstat.c to main.c In preparation for splitting the file up. This commit is a clean rename, so git's rename detection will work. Sponsored by: ConnectWise PR: https://github.com/freebsd/freebsd-src/pull/1807 --- usr.bin/sockstat/Makefile | 1 + usr.bin/sockstat/{sockstat.c => main.c} | 0 2 files changed, 1 insertion(+) diff --git a/usr.bin/sockstat/Makefile b/usr.bin/sockstat/Makefile index 7254511f21c6..7b71662b7cd4 100644 --- a/usr.bin/sockstat/Makefile +++ b/usr.bin/sockstat/Makefile @@ -1,6 +1,7 @@ .include PROG= sockstat +SRCS= main.c LIBADD= jail xo diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/main.c similarity index 100% rename from usr.bin/sockstat/sockstat.c rename to usr.bin/sockstat/main.c From nobody Tue Aug 12 16:40:31 2025 X-Original-To: dev-commits-src-main@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 4c1cgh0RGSz6558J; Tue, 12 Aug 2025 16:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1cgg6pQ6z3rKv; Tue, 12 Aug 2025 16:40:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755016831; 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=SeZOM6xkv76TDUGZTsIPvyz0e4NJ5ACQ37KakqX0S1s=; b=VZPubnqTvRmjy59Pkf7UnCnmshLX7gy023qOrhXiqHpyJ9dck2fpw/jkHXDdUmJJwkC4B9 NhgF63QIgDqO3EJ0jC5Hbb8FYI8LDn1kGuUc3qd3QRewjaJQkr2ClrmdOz6T6jsJINRX89 I/R1XOMdY0nxtXIC4nLLbJHlOs1WTktd/RQGhBNE452qIqv6Q6YFS+pjiuWsj5/Wp9ErfB JKsmL7pvgyVs2sd/RjgOaLDhDvW71WzH8ToRpgLTM/PQ8PnXputIZC+rr3zMT6/lyCI/zz 0tnejeRM04s2qTEhxWS1DMTIqAT4Xl7ty8o3jowzzMFmdHT2GVTB3/RVaIpGfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755016831; 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=SeZOM6xkv76TDUGZTsIPvyz0e4NJ5ACQ37KakqX0S1s=; b=Gby3gE+zzk5F3yykHTJOHIE1gH+lk744vNOREbrarh8WhhZHH8OXdjmk5H87b0tvLbo1bb Vcgu3DTyLpE0InsPIyk3422ctq7tdzlIXbfJPOks7TwjPUQWRgnEt/gVbFE04QvBnmbrIR rqio5YeYm4TsTRWQ6xZAjY664i1WTcAlv7wsqK9Inbf6z5C00oWHbDWYbLZukIh9eEd6An +6XZaP3k8hWqaQ3eUv8nk2SRUDG9MLFHwjxqKLoYoUu948gvb/fXa8ggKWpjAKfMgT/HLl MKxyAV+7eYsHoa+Tj+TSwQCk1xlZ/1TZsomju4lP3T2tulPrNu24nRWtNgnVfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755016831; a=rsa-sha256; cv=none; b=SOJMjC5yDwsuCM2qEK3t1JFv/c4ei1Td5H50pXYBfIpz/zLlgp3UE+u3X1gh/qtF6Pqukc s0zqTlyctiwUe7zRX5ukAWEiGGwxh0UopizJA6GeivwuCtRJ2aWr9EdyET5Ms9nrThtep+ BdzaHXLPICKZgT7WNBbbBbmij7ClDput6c8hRqwyx8foCnqzXwGoM2HzYq+aH8jljEgB4Q 6sEsyQs0EHQ9jmOCqlGlNxYhA/kscYvvCglBerLDIzIOkfO6vRhe0uTUSwWgI1/AJ6f0Da G/8p8DLWGXOiPOHVl6Y89wWuuEhEL+7+HX13uFm678cp1GUJ0MkmVJiNjpRDUQ== 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 4c1cgg6MJ6zm9Q; Tue, 12 Aug 2025 16:40: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 57CGeV42012194; Tue, 12 Aug 2025 16:40:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CGeVPl012191; Tue, 12 Aug 2025 16:40:31 GMT (envelope-from git) Date: Tue, 12 Aug 2025 16:40:31 GMT Message-Id: <202508121640.57CGeVPl012191@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: d88831779619 - main - sockstat: fix port parsing after libxo integration List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: d888317796190bec350aea3701b8aed3bfdad4c8 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=d888317796190bec350aea3701b8aed3bfdad4c8 commit d888317796190bec350aea3701b8aed3bfdad4c8 Author: Alan Somers AuthorDate: 2025-08-12 16:26:02 +0000 Commit: Alan Somers CommitDate: 2025-08-12 16:38:25 +0000 sockstat: fix port parsing after libxo integration parse_ports has been broken ever since 7b35b4d, and it's a sufficiently complicated function that it really deserves some unit tests. Fix it, and add tests. Refactor the code a little bit to facilitate unit tests. Chiefly, split the tested functions out of main.c into sockstat.c . PR: 288731 Fixes: 7b35b4d ("sockstat: add libxo support") Sponsored by: ConnectWise PR: https://github.com/freebsd/freebsd-src/pull/1807 Reviewed by: rido --- etc/mtree/BSD.tests.dist | 2 + usr.bin/sockstat/Makefile | 5 +- usr.bin/sockstat/main.c | 65 +++-------- usr.bin/sockstat/sockstat.c | 77 +++++++++++++ usr.bin/sockstat/sockstat.h | 35 ++++++ usr.bin/sockstat/tests/Makefile | 8 ++ usr.bin/sockstat/tests/sockstat_test.c | 190 +++++++++++++++++++++++++++++++++ 7 files changed, 328 insertions(+), 54 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index b3b2b61da143..2c25d9386032 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1205,6 +1205,8 @@ .. seq .. + sockstat + .. soelim .. sort diff --git a/usr.bin/sockstat/Makefile b/usr.bin/sockstat/Makefile index 7b71662b7cd4..c6e7a078162b 100644 --- a/usr.bin/sockstat/Makefile +++ b/usr.bin/sockstat/Makefile @@ -1,7 +1,7 @@ .include PROG= sockstat -SRCS= main.c +SRCS= main.c sockstat.c LIBADD= jail xo @@ -14,4 +14,7 @@ LIBADD+= cap_sysctl CFLAGS+= -DWITH_CASPER .endif +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests + .include diff --git a/usr.bin/sockstat/main.c b/usr.bin/sockstat/main.c index 895c4d453b54..b5e0248b743a 100644 --- a/usr.bin/sockstat/main.c +++ b/usr.bin/sockstat/main.c @@ -54,7 +54,6 @@ #include #include -#include #include #include #include @@ -74,6 +73,8 @@ #include #include +#include "sockstat.h" + #define SOCKSTAT_XO_VERSION "1" #define sstosin(ss) ((struct sockaddr_in *)(ss)) #define sstosin6(ss) ((struct sockaddr_in6 *)(ss)) @@ -110,12 +111,6 @@ static size_t default_numprotos = nitems(default_protos); static int *protos; /* protocols to use */ static size_t numprotos; /* allocated size of protos[] */ -static int *ports; - -#define INT_BIT (sizeof(int)*CHAR_BIT) -#define SET_PORT(p) do { ports[p / INT_BIT] |= 1 << (p % INT_BIT); } while (0) -#define CHK_PORT(p) (ports[p / INT_BIT] & (1 << (p % INT_BIT))) - struct addr { union { struct sockaddr_storage address; @@ -276,50 +271,6 @@ parse_protos(char *protospec) return (proto_index); } -static void -parse_ports(const char *portspec) -{ - const char *p, *q; - int port, end; - - if (ports == NULL) - if ((ports = calloc(65536 / INT_BIT, sizeof(int))) == NULL) - xo_err(1, "calloc()"); - p = portspec; - while (*p != '\0') { - if (!isdigit(*p)) - xo_errx(1, "syntax error in port range"); - for (q = p; *q != '\0' && isdigit(*q); ++q) - /* nothing */ ; - for (port = 0; p < q; ++p) - port = port * 10 + digittoint(*p); - if (port < 0 || port > 65535) - xo_errx(1, "invalid port number"); - SET_PORT(port); - switch (*p) { - case '-': - ++p; - break; - case ',': - ++p; - /* fall through */ - case '\0': - default: - continue; - } - for (q = p; *q != '\0' && isdigit(*q); ++q) - /* nothing */ ; - for (end = 0; p < q; ++p) - end = end * 10 + digittoint(*p); - if (end < port || end > 65535) - xo_errx(1, "invalid port number"); - while (port++ < end) - SET_PORT(port); - if (*p == ',') - ++p; - } -} - static void sockaddr(struct sockaddr_storage *ss, int af, void *addr, int port) { @@ -1767,7 +1718,7 @@ main(int argc, char *argv[]) const char *pwdcmds[] = { "setpassent", "getpwuid" }; const char *pwdfields[] = { "pw_name" }; int protos_defined = -1; - int o, i; + int o, i, err; argc = xo_parse_args(argc, argv); if (argc < 0) @@ -1817,7 +1768,15 @@ main(int argc, char *argv[]) opt_n = true; break; case 'p': - parse_ports(optarg); + err = parse_ports(optarg); + switch (err) { + case EINVAL: + xo_errx(1, "syntax error in port range"); + break; + case ERANGE: + xo_errx(1, "invalid port number"); + break; + } break; case 'P': protos_defined = parse_protos(optarg); diff --git a/usr.bin/sockstat/sockstat.c b/usr.bin/sockstat/sockstat.c new file mode 100644 index 000000000000..7bb7f6a66e3f --- /dev/null +++ b/usr.bin/sockstat/sockstat.c @@ -0,0 +1,77 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 ConnectWise + * All rights reserved. + * + * 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 + * in this position and unchanged. + * 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 ``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 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 + +#include "sockstat.h" + +int *ports; + +int +parse_ports(const char *portspec) +{ + const char *p; + + if (ports == NULL) + if ((ports = calloc(65536 / INT_BIT, sizeof(int))) == NULL) + xo_err(1, "calloc()"); + p = portspec; + while (*p != '\0') { + long port, end; + char *endptr = NULL; + + errno = 0; + port = strtol(p, &endptr, 10); + if (errno) + return (errno); + if (port < 0 || port > 65535) + return (ERANGE); + SET_PORT(port); + switch (*endptr) { + case '-': + p = endptr + 1; + end = strtol(p, &endptr, 10); + break; + case ',': + p = endptr + 1; + continue; + default: + p = endptr; + continue; + } + if (errno) + return (errno); + if (end < port || end > 65535) + return (ERANGE); + while (port++ < end) + SET_PORT(port); + } + return (0); +} diff --git a/usr.bin/sockstat/sockstat.h b/usr.bin/sockstat/sockstat.h new file mode 100644 index 000000000000..80d91ebbaddc --- /dev/null +++ b/usr.bin/sockstat/sockstat.h @@ -0,0 +1,35 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 ConnectWise + * All rights reserved. + * + * 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 + * in this position and unchanged. + * 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 ``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 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. + */ + +#define INT_BIT (sizeof(int)*CHAR_BIT) +#define SET_PORT(p) do { ports[p / INT_BIT] |= 1 << (p % INT_BIT); } while (0) +#define CHK_PORT(p) (ports[p / INT_BIT] & (1 << (p % INT_BIT))) + +extern int *ports; + +int parse_ports(const char *portspec); diff --git a/usr.bin/sockstat/tests/Makefile b/usr.bin/sockstat/tests/Makefile new file mode 100644 index 000000000000..9971bca2d474 --- /dev/null +++ b/usr.bin/sockstat/tests/Makefile @@ -0,0 +1,8 @@ +ATF_TESTS_C+= sockstat_test +SRCS.sockstat_test= sockstat_test.c ../sockstat.c + +LIBADD= xo + +PACKAGE= tests + +.include diff --git a/usr.bin/sockstat/tests/sockstat_test.c b/usr.bin/sockstat/tests/sockstat_test.c new file mode 100644 index 000000000000..2d2a23c7a166 --- /dev/null +++ b/usr.bin/sockstat/tests/sockstat_test.c @@ -0,0 +1,190 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 ConnectWise + * All rights reserved. + * + * 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 + * in this position and unchanged. + * 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 ``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 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 + +#include "../sockstat.h" + +ATF_TC_WITHOUT_HEAD(backwards_range); +ATF_TC_BODY(backwards_range, tc) +{ + const char portspec[] = "22-21"; + + ATF_CHECK_EQ(ERANGE, parse_ports(portspec)); +} + +ATF_TC_WITHOUT_HEAD(erange_low); +ATF_TC_BODY(erange_low, tc) +{ + const char portspec[] = "-1"; + + ATF_CHECK_EQ(ERANGE, parse_ports(portspec)); +} + +ATF_TC_WITHOUT_HEAD(erange_high); +ATF_TC_BODY(erange_high, tc) +{ + const char portspec[] = "65536"; + + ATF_CHECK_EQ(ERANGE, parse_ports(portspec)); +} + +ATF_TC_WITHOUT_HEAD(erange_on_range_end); +ATF_TC_BODY(erange_on_range_end, tc) +{ + const char portspec[] = "22-65536"; + + ATF_CHECK_EQ(ERANGE, parse_ports(portspec)); +} + +ATF_TC_WITHOUT_HEAD(multiple); +ATF_TC_BODY(multiple, tc) +{ + const char portspec[] = "80,443"; + + ATF_REQUIRE_EQ(0, parse_ports(portspec)); + + ATF_CHECK(!CHK_PORT(0)); + + ATF_CHECK(!CHK_PORT(79)); + ATF_CHECK(CHK_PORT(80)); + ATF_CHECK(!CHK_PORT(81)); + + ATF_CHECK(!CHK_PORT(442)); + ATF_CHECK(CHK_PORT(443)); + ATF_CHECK(!CHK_PORT(444)); +} + +ATF_TC_WITHOUT_HEAD(multiple_plus_ranges); +ATF_TC_BODY(multiple_plus_ranges, tc) +{ + const char portspec[] = "80,443,500-501,510,520,40000-40002"; + + ATF_REQUIRE_EQ(0, parse_ports(portspec)); + + ATF_CHECK(!CHK_PORT(0)); + + ATF_CHECK(!CHK_PORT(79)); + ATF_CHECK(CHK_PORT(80)); + ATF_CHECK(!CHK_PORT(81)); + + ATF_CHECK(!CHK_PORT(442)); + ATF_CHECK(CHK_PORT(443)); + ATF_CHECK(!CHK_PORT(444)); + + ATF_CHECK(!CHK_PORT(499)); + ATF_CHECK(CHK_PORT(500)); + ATF_CHECK(CHK_PORT(501)); + ATF_CHECK(!CHK_PORT(502)); + + ATF_CHECK(!CHK_PORT(519)); + ATF_CHECK(CHK_PORT(520)); + ATF_CHECK(!CHK_PORT(521)); + + ATF_CHECK(!CHK_PORT(39999)); + ATF_CHECK(CHK_PORT(40000)); + ATF_CHECK(CHK_PORT(40001)); + ATF_CHECK(CHK_PORT(40002)); + ATF_CHECK(!CHK_PORT(40003)); +} + +ATF_TC_WITHOUT_HEAD(nonnumeric); +ATF_TC_BODY(nonnumeric, tc) +{ + const char portspec[] = "foo"; + + ATF_CHECK_EQ(EINVAL, parse_ports(portspec)); +} + +ATF_TC_WITHOUT_HEAD(null_range); +ATF_TC_BODY(null_range, tc) +{ + const char portspec[] = "22-22"; + + ATF_REQUIRE_EQ(0, parse_ports(portspec)); + + ATF_CHECK(!CHK_PORT(0)); + ATF_CHECK(CHK_PORT(22)); + ATF_CHECK(!CHK_PORT(23)); +} + +ATF_TC_WITHOUT_HEAD(range); +ATF_TC_BODY(range, tc) +{ + const char portspec[] = "22-25"; + + ATF_REQUIRE_EQ(0, parse_ports(portspec)); + + ATF_CHECK(!CHK_PORT(0)); + ATF_CHECK(CHK_PORT(22)); + ATF_CHECK(CHK_PORT(23)); + ATF_CHECK(CHK_PORT(24)); + ATF_CHECK(CHK_PORT(25)); + ATF_CHECK(!CHK_PORT(26)); +} + +ATF_TC_WITHOUT_HEAD(single); +ATF_TC_BODY(single, tc) +{ + const char portspec[] = "22"; + + ATF_REQUIRE_EQ(0, parse_ports(portspec)); + + ATF_CHECK(!CHK_PORT(0)); + ATF_CHECK(CHK_PORT(22)); +} + +ATF_TC_WITHOUT_HEAD(zero); +ATF_TC_BODY(zero, tc) +{ + const char portspec[] = "0"; + + ATF_REQUIRE_EQ(0, parse_ports(portspec)); + + ATF_CHECK(CHK_PORT(0)); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, backwards_range); + ATF_TP_ADD_TC(tp, erange_low); + ATF_TP_ADD_TC(tp, erange_high); + ATF_TP_ADD_TC(tp, erange_on_range_end); + ATF_TP_ADD_TC(tp, multiple); + ATF_TP_ADD_TC(tp, multiple_plus_ranges); + ATF_TP_ADD_TC(tp, nonnumeric); + ATF_TP_ADD_TC(tp, null_range); + ATF_TP_ADD_TC(tp, range); + ATF_TP_ADD_TC(tp, single); + ATF_TP_ADD_TC(tp, zero); + + return (atf_no_error()); +} From nobody Tue Aug 12 17:21:18 2025 X-Original-To: dev-commits-src-main@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 4c1dZk6v3kz658FB; Tue, 12 Aug 2025 17:21: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1dZk4dS3z3wCb; Tue, 12 Aug 2025 17:21:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755019278; 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=AxpA2eNvIAfQhiq50MKt/4qApbhe/s80eoSFJALWKLc=; b=FuP0RlVM/oVAK0k4a9UbvLvle88TPT9fPxMhwiOyNGdjNrTl6fRHhQdp5mFO9WyOiIXTjY 6hgs1vXz82UjZLskNUR3G6UeNmRpJlQ+5bCcs55ETrF80+wQ6zRoUXtTGL8N2sgp8VA+j8 jPi0umYUQKeOsB//x0z+FeSiV2tBrUmSjBRnr/Pw1eIpMBJrRQ1n7bCB0KT8YjlAgzpSpL UOyv0l54nT9r96+cGolgsfn8ADm/GPoWkgHUCqpHud3d9MPzVpTMLk8eEif1x/pgRrCttu fuDJKkiPIBTkZY+k+1nQguIadhlp6Nz6/r85Yf+KaM/y9WkyyZkKLBB3iuWCPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755019278; 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=AxpA2eNvIAfQhiq50MKt/4qApbhe/s80eoSFJALWKLc=; b=NQ69tPN6UY8nFa+LNGGSKSq9wET8I4DhQ3xpfOV85b4akYinGQXyAGjCpgMBhL7cOtPTs+ TuCv88gYprYN6y2Vz3oyGugGw97Y6dJ7B6Aa/d05mBkM/Bo0Ua7Kq8uypf+IctDFeYNF8M 9ThSobPvEpFY6gMeyjxNNvHUZU3HfbYeLQJcxi1ztsnzW43qPWNPyR3jN+MOGuFRRbXclu I8vYS9lGk24ouLPnGHGpoR4UISKvckii85lOYvepAMrPIgX8NyIIPbuj40jFrdiVOVcEEu EYHjznYHkV+xvDKA1nTH8bXrdXfiLnfiMlMf7vLtFUlx5Zr2cjaiccaBWxhENQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755019278; a=rsa-sha256; cv=none; b=DW4iqwGQ8orSObWKaHyDWwYOxPXjwEo7ixyX6Wlp7jmrFp72dUpY9gllsXmK9xyWWFLzj5 do8ImCBe3FumQgVU3KcZN0aJeJMYborQazh8C/RO737+eKjxmta5aTm5eDLgbwX2jVbhxI UybR/MPMzIUSXbvzsCnb2IVQ766W3hj7zOzroQzrO4kk2Wg/lVV4MbAtSHBYvNDVNAHDE+ 7G1XYm8Xca6CdNI8L+TrBSvyOCRVZReWCbmRrhXCjA3mftLs9mZmQ8e1zPKDUbBHw8W7VF UCgwqF//QavVFPcjSqQVgvsqVGSLRgQk7UgQ7HHifj5Tn+BMPaIi2pLkbJfr/w== 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 4c1dZk455cznHq; Tue, 12 Aug 2025 17:21: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 57CHLI5m088592; Tue, 12 Aug 2025 17:21:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CHLIJG088589; Tue, 12 Aug 2025 17:21:18 GMT (envelope-from git) Date: Tue, 12 Aug 2025 17:21:18 GMT Message-Id: <202508121721.57CHLIJG088589@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 40c2b622d825 - main - last: Mild style cleanup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 40c2b622d825c7dea5002c9ea64fd8f3e833e8d9 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=40c2b622d825c7dea5002c9ea64fd8f3e833e8d9 commit 40c2b622d825c7dea5002c9ea64fd8f3e833e8d9 Author: Dag-Erling Smørgrav AuthorDate: 2025-08-12 17:20:55 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-12 17:21:12 +0000 last: Mild style cleanup * Prefer explicit NULL comparisons to using pointers as booleans * Prefer explicit 0 comparisons to using strcmp() as a predicate * Avoid use of strcpy() Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D51876 --- usr.bin/last/last.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/usr.bin/last/last.c b/usr.bin/last/last.c index 69848f359d79..2e6754abab8e 100644 --- a/usr.bin/last/last.c +++ b/usr.bin/last/last.c @@ -433,15 +433,15 @@ want(struct utmpx *bp) return (YES); break; case HOST_TYPE: - if (!strcasecmp(step->name, bp->ut_host)) + if (strcasecmp(step->name, bp->ut_host) == 0) return (YES); break; case TTY_TYPE: - if (!strcmp(step->name, bp->ut_line)) + if (strcmp(step->name, bp->ut_line) == 0) return (YES); break; case USER_TYPE: - if (!strcmp(step->name, bp->ut_user)) + if (strcmp(step->name, bp->ut_user) == 0) return (YES); break; } @@ -478,7 +478,7 @@ hostconv(char *arg) static char *hostdot, name[MAXHOSTNAMELEN]; char *argdot; - if (!(argdot = strchr(arg, '.'))) + if ((argdot = strchr(arg, '.')) == NULL) return; if (first) { first = 0; @@ -486,7 +486,7 @@ hostconv(char *arg) xo_err(1, "gethostname"); hostdot = strchr(name, '.'); } - if (hostdot && !strcasecmp(hostdot, argdot)) + if (hostdot != NULL && strcasecmp(hostdot, argdot) == 0) *argdot = '\0'; } @@ -504,19 +504,16 @@ ttyconv(char *arg) * a two character suffix. */ if (strlen(arg) == 2) { - /* either 6 for "ttyxx" or 8 for "console" */ - if ((mval = malloc(8)) == NULL) + if (strcmp(arg, "co") == 0) + mval = strdup("console"); + else + asprintf(&mval, "tty%s", arg); + if (mval == NULL) xo_errx(1, "malloc failure"); - if (!strcmp(arg, "co")) - (void)strcpy(mval, "console"); - else { - (void)strcpy(mval, "tty"); - (void)strcpy(mval + 3, arg); - } return (mval); } - if (!strncmp(arg, _PATH_DEV, sizeof(_PATH_DEV) - 1)) - return (arg + 5); + if (strncmp(arg, _PATH_DEV, strlen(_PATH_DEV)) == 0) + return (arg + strlen(_PATH_DEV)); return (arg); } From nobody Tue Aug 12 17:39:07 2025 X-Original-To: dev-commits-src-main@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 4c1dzH5gRYz659Nt; Tue, 12 Aug 2025 17:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1dzH4pHJz3xQb; Tue, 12 Aug 2025 17:39:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755020347; 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=ATu3NYHMhJLIeC9bngUhTLtNwPQV/VjvQaZSqDAcyHw=; b=h0Kaz5IkWPLCzJX34Sqj51W0wNlImv/1jnH9Qazy65quOJLN/UFC9lKuwOv6lUXTvX+Hxs uYtLsGyEMEB9ALHJiMfni+PFPyjCuuS0fKZJN0jpk97y5Ny/RoXmJA8lU77QnGB2uDqHiO M4YY25yaQzjbPdVY+zGSsPQinWihBnIOWAiCMSRVI+4aGiuoQ6/rY93AC/Gjn3p8Cbj+LD 9nuvJv4YL7z6aXVH6xs8oflIaxKlFEC1BBrVSnjHPpWkccJtwW3lLuL2Nm/MoEsHs1HmIh a4CSw5jQDU7kfRFDTYF/bkA8/T3OIpYrjuYuKls9eer8e10s0+Po9Lg5Zpln9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755020347; 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=ATu3NYHMhJLIeC9bngUhTLtNwPQV/VjvQaZSqDAcyHw=; b=sHVVLrp8/YFzHqHx6qkrvNk+eILWWUStUL0gUSKo+/UaweIQEUeZKKs/o99Zhncb7Wdtvg DtCNVemlVa5xq2o1NXfO0e4zOTLqH5IaHWHaq38zAQRaukMoBzUtakkJOhq2qE9zQgP1gp 6i3+iKc0msv63caz9JEUMIsmz2JyX9EpRbXpPSzqUYgIxIxS4VxylaelGwJL7t27n0l+bE jkw6AOTmPgNwSYW23mYuzixJmVd91T3eGk4bibfNzOURTbvG1JpCU4xgLzG8q1dES1P6J6 sQ52R0ktKkzxnJJluAkyD3xrdq9fHgXDL1S/uIt55t08Bf+DjMPqEm3R6gOeog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755020347; a=rsa-sha256; cv=none; b=l8QRnP9T90g74j5UsnNpQlcRgCBBoEUpyb2VVlWacS8OlOnGOVW5wv/By5ZOfDLJhr13FB e4fsIOr9BPDFvYa+71fPaA5lNsn62R06Ptpv3Yy5MX26cbGHBmrQBb5/ooDov69+sw4yx3 heDBWwa2T1J1NVIz51sgaFBpG3sNHHqjEDZPahDNxfm5PjHUI1XNWiRrcpuoWZQ5L0+dZ2 hpfyZ8tekQZ63fy3EQQf+Mf+DEi+RhjC2KnSoC/xQMZgThbSAEc3zg33YU7PDsBXbaU/hb ev+yraU5HSxpdBUr4sFdUXBVzBFd6iNuTPTaZ52AIfLgjr0sM8d9VCxUW0YYOw== 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 4c1dzH4MXBznw5; Tue, 12 Aug 2025 17:39: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 57CHd7VT016237; Tue, 12 Aug 2025 17:39:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CHd7l3016234; Tue, 12 Aug 2025 17:39:07 GMT (envelope-from git) Date: Tue, 12 Aug 2025 17:39:07 GMT Message-Id: <202508121739.57CHd7l3016234@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: c9332a905cd2 - main - libspl: Don't build tunables.c when bootstrapping List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c9332a905cd2788bfa1c72c8f170c94500a765a2 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=c9332a905cd2788bfa1c72c8f170c94500a765a2 commit c9332a905cd2788bfa1c72c8f170c94500a765a2 Author: Jessica Clarke AuthorDate: 2025-08-12 17:03:25 +0000 Commit: Jessica Clarke CommitDate: 2025-08-12 17:38:56 +0000 libspl: Don't build tunables.c when bootstrapping The upstream source (which we've currently hacked downstream to make it compile, even though it won't work) assumes ELF for its hand-rolled linker set implementation, and macOS's Mach-O is sufficiently different for it to not even compile there. However, we don't actually need this file at all, since we only use the bootstrap libspl for DTrace tools, so just add it to the set of files we don't build when bootstrapping. Fixes: df58e8b1506f ("zfs: merge openzfs/zfs@8302b6e32") --- cddl/lib/libspl/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cddl/lib/libspl/Makefile b/cddl/lib/libspl/Makefile index 13fd6d96f2af..d8d997c6f377 100644 --- a/cddl/lib/libspl/Makefile +++ b/cddl/lib/libspl/Makefile @@ -16,16 +16,16 @@ SRCS = \ os/freebsd/zone.c \ page.c \ timestamp.c \ - tunables.c \ include/sys/list.h \ include/sys/list_impl.h -# These functions are not required when bootstrapping and the atomic code -# will not compile when building on macOS. +# These functions are not required when bootstrapping and the atomic code, +# among others, will not compile when building on macOS. .if !defined(BOOTSTRAPPING) SRCS += \ atomic.c \ getexecname.c \ + tunables.c \ os/freebsd/getexecname.c \ os/freebsd/gethostid.c \ os/freebsd/getmntany.c \ From nobody Tue Aug 12 17:39:08 2025 X-Original-To: dev-commits-src-main@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 4c1dzJ7260z659c3; Tue, 12 Aug 2025 17:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1dzJ61m1z3xN8; Tue, 12 Aug 2025 17:39:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755020348; 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=ks8yQTIMJZiKkXZRZn8i14CZRSTDji3tTCfXWzBooY0=; b=SkSvfTAYVXKm1al4RPvk6VM2rLiIY33ijFsv7XVDBlz5TErZcUNDrlOxBmVhMbQwiAj8ZB 6F3eK4rZJd7F3B4a0Dy1T6tgvoWPzjz8xlcRCWyIIKjIoNVY3FzrnQWgqo6EmqJNs6eDPy 2dwxemb3J9EXL4cZBjW5wY8iINeGozpHHdzlQM75/+bE7jirbXjz/VRe1fzQouu096d6Re m1k5fMnWrCcpm3tcH4svfspWym/kkFuTb/QPHZ+wkahtSdbbcIBKuDEDOMKyC0B/3TLSgO m6+6IwwQrPXwLRfj75Ywx0bjLzi1bD9c8jPXls75DxNMmbiOwReC0O6e9PveVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755020348; 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=ks8yQTIMJZiKkXZRZn8i14CZRSTDji3tTCfXWzBooY0=; b=lR1ZYZDsnS+7Kb7/KeD+2zHhxCZuKG1EgjfvJQE/dYfXMIXtMjNaCNvag/V1Le51n/gXkU NhNZlGDjy4KdYYzSNY0QLSUP/x4n91DSJABuzjTIIfTdmRKEUiUMU1RJi2ijBgMVHWQKPI HEtysQNWmYFraA39CEH44v1fhPTR31xQsY9GY1l9yyQVkbP5r8YHu49YlIKYCvd2/Gvn/r +00SBNJPNqCv1P0IBQ1PlhQG0sN5jB2B0Ci9SkHlL1NPnjUAGUuFAtF59gxfy/WjTZyx8X Av/aRyg7Td/wsSaxRXdtkXf+6ejc5VZXt/G8/VkkCt9YpvKoUOqQ9nWmsBlwzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755020348; a=rsa-sha256; cv=none; b=IGlN1EMUx4pBcTHcLV1h3dAto9Tj4qhEUGwLXedEB+/83yvhnrPTaLnqwKk3dfyKNi4y49 S6/nDAwn4T7eKdAcBl46SNlHNcPapNvnfCJaDKfDD5IJZvbuWGK3cGxm5ksIrn7KYuNIqX N7FG42JKSYK4Fyk7X/rO/pp8aGiX2yufOLt3CXUpyGkBsjRsX0cDcCaiVMeWIGaO3gU0Vc UccT43ZPSKqwaal7hPbcouxzOnuH4RIWzAJRqoQkkhshyjWO2i21eO+S3t3Nh3epczCKQd mOgq5ejJyN2fYmws8Mc8SaANcqWZGK6OheqI/uf7syWOkmnLdAyaQOuo1xzelQ== 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 4c1dzJ5TGfznPj; Tue, 12 Aug 2025 17:39:08 +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 57CHd8ie016269; Tue, 12 Aug 2025 17:39:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CHd83t016266; Tue, 12 Aug 2025 17:39:08 GMT (envelope-from git) Date: Tue, 12 Aug 2025 17:39:08 GMT Message-Id: <202508121739.57CHd83t016266@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: ca98f5ef86e0 - main - Revert "zfs: add workaround to unbreak kernel compilation on MacOS" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ca98f5ef86e0b0642e73a504b7dad20e034c09e7 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=ca98f5ef86e0b0642e73a504b7dad20e034c09e7 commit ca98f5ef86e0b0642e73a504b7dad20e034c09e7 Author: Jessica Clarke AuthorDate: 2025-08-12 17:03:45 +0000 Commit: Jessica Clarke CommitDate: 2025-08-12 17:38:56 +0000 Revert "zfs: add workaround to unbreak kernel compilation on MacOS" This is no longer needed now we don't include tunables.c in the bootstrap libspl. This reverts commit 6188ca6a9d72af9be987e1aedc345210f834ad80. --- sys/contrib/openzfs/lib/libspl/tunables.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/contrib/openzfs/lib/libspl/tunables.c b/sys/contrib/openzfs/lib/libspl/tunables.c index 2e9535f1fbf9..67dc9710dee8 100644 --- a/sys/contrib/openzfs/lib/libspl/tunables.c +++ b/sys/contrib/openzfs/lib/libspl/tunables.c @@ -74,9 +74,7 @@ extern const zfs_tunable_t *__stop_zfs_tunables; * any NULL pointers. */ static void *__zfs_tunable__placeholder -#if !defined(__APPLE__) __attribute__((__section__("zfs_tunables"))) -#endif __attribute__((__used__)) = NULL; /* From nobody Tue Aug 12 17:43:51 2025 X-Original-To: dev-commits-src-main@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 4c1f4m0J25z659vt; Tue, 12 Aug 2025 17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1f4l6qdbz40Kf; Tue, 12 Aug 2025 17: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=1755020632; 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=zwDpFmGyLhDPUD1l+/h2+KQuPm8D1ZnwiGqjHdhsp68=; b=MJEy4a5Sr7bjNF6nlz/d3ctRp8kWYMwkUxYkS6esAFgbjdJJOoXIGAzGp+AsFv5BThUPLA 2Tlj3P9lBP4Y1zSQNYN4ZFtM0UFL9wqQ7vN/oKbTwXoDCIvrIR5aBFTDVs4QwlF7EI82lS 4+ZHWeA/lUyuh02pu0ALYm1+H+YvI/i3bB7StKyE707c0BJIsIx65cQ0Gv/rmzSIbVRUZn T99KdVVakv1Nipr64CivQPn+Cel2eeBx8H8MSnQcA3SFc8DmiTavvg7XiYhxtVK2c2KmjA lAJpE7rWF2kUWhr52K5VFPbycpB1euHuupDMWNzLOOVMezsNuNPch8Z2b54h9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755020632; 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=zwDpFmGyLhDPUD1l+/h2+KQuPm8D1ZnwiGqjHdhsp68=; b=NJ77gaWaxIr3TCQ+vNtGm45lW4YNOaqmIMAwOgsBFBkHkxVtSUgNvrt7lQKM0yYFgjBxRY DcGK6+lRNrtEfOgJNOC8B1NW1trC/VThB5zMVj/O8MUJ8SKKYuXVLopqKfvhiDJdqa8jwE a5K23as9SNmv+dyDCcLcmo+CfXwWr9qixSgkovvRbgf2zD5oN5nMw11bv4norceEDEZH2O CZYjwT107DQ5aunctSgrak5vVdjCzE+1hQn8LAxyTpaneFlVdlVWzw199ur1Tt792G7F4U AF5rMi5cyVqPM+15RP8oSjuwdAGpfl4uzSC2+p36mCvQU7wlfTFucOCSbGON8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755020632; a=rsa-sha256; cv=none; b=KrFWtxgAlJR1Hwjcvl2RoDDQTx45JR5gKDUQRsZ4WO5+ohpnsp/8GtV2lkwd6Z7a1wuVSR pJBbPIRebVTE8veAAmw2Etog5t/6hYN1SHp61i8L3AphgJL/p5PMVb+pL3gSQW7bmeSfB+ 2cvG5+8X0osecx4NXgSH3bcUDY5xr0ViHKlgq67+Afw2QYuxaPk8jSjN8GBsR9/N4liILZ SOzPeEOCumwOrT5IwCbHGNZ/ELWDbvtSbyMneGQt9s6PlxLgy3rMYHYEA7fT4N+zrs1byv ylk0efmIVomBfybk1Ux1W4T+zclZMQ9pEs8Auv0ThE4n8dPB1DDhZP2f7mYy9g== 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 4c1f4l6Qd8znqm; Tue, 12 Aug 2025 17: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 57CHhpr0033793; Tue, 12 Aug 2025 17: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 57CHhpM2033790; Tue, 12 Aug 2025 17:43:51 GMT (envelope-from git) Date: Tue, 12 Aug 2025 17:43:51 GMT Message-Id: <202508121743.57CHhpM2033790@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: d3f2d49e01a8 - main - netstat: fix reporting of delivered UDP packets List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: d3f2d49e01a867e19186a1db095a7dd66e6c77c0 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d3f2d49e01a867e19186a1db095a7dd66e6c77c0 commit d3f2d49e01a867e19186a1db095a7dd66e6c77c0 Author: Michael Tuexen AuthorDate: 2025-08-12 17:40:58 +0000 Commit: Michael Tuexen CommitDate: 2025-08-12 17:40:58 +0000 netstat: fix reporting of delivered UDP packets The counter udps_noport includes udps_noportbcast, so don't subtract udps_noportbcast twice. PR: 288680 Reviewed by: rrs MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D51870 --- usr.bin/netstat/inet.c | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 139ff9294fde..6724c1099a83 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -948,7 +948,6 @@ udp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) udpstat.udps_badlen - udpstat.udps_badsum - udpstat.udps_noport - - udpstat.udps_noportbcast - udpstat.udps_fullsock; if (delivered || sflag <= 1) xo_emit("\t{:delivered-packets/%ju} {N:/delivered}\n", From nobody Tue Aug 12 17:47:45 2025 X-Original-To: dev-commits-src-main@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 4c1f9G1WGBz65BRq; Tue, 12 Aug 2025 17:47: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1f9G0WgBz40xs; Tue, 12 Aug 2025 17:47:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755020866; 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=A9Vbes1bXznmikjdhtksdNdN3iPgNAS693AspRc651M=; b=rwOHyImDYJjEtVsVzoG5erkjPgu+7QYiEPPgAJxnjgi1XP51aM7wCzZdyD10aRG5oYYSHw OCY8nE336TgRvyy5ndPSEi/VghqnRSSaNnIjhPjwRwBUd4YSGlPIFogVoJbYGbcdw98GVy ZlzgqWhZ+UWhRGopQJ+Xiyh9jQeFQQI8yg3KW0tANHvmsBp7qviAUH1zoJV4HUcGIY3X68 yo6U+pbP1CP6ochTs1GNUb8asdTtr9uAPXLjhLACMDMN7diyBY15IJbJA3ZTeJ/A6YaoYz ZP9dAjE70y9pOe7prNusQaywAm1SInd9GCPwkrLLLxNhzTKr9fbY9zrqjBCazQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755020866; 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=A9Vbes1bXznmikjdhtksdNdN3iPgNAS693AspRc651M=; b=Kg0rNgCSrcBv2XtdYkXB+gtn64jAYZYF+HGB5KjqfBVpfEmp6Dta4qmdtwFyeY5NFhEbvj aIbPTXXGlVZ3ZF1lADZwFkSQ49+Sxq2NES1gf9yiglu0Woi14dwDcg1RhrVNTCEu8MZz+p 6+dyPi6YlYrqnChO5PgVMBSlAoLJInL74Q9e3T5TKSq94mg8Ad9lDZQK1cohPn1XcBX2iA Rnnu98bQgJkF8U7b4azuhgulTNWrD3fkDOM9I9Gq4ySpvs7k9s1Zn6HH3ZLi5QD3Semat6 f6q5Le353/xvdRCFuo/7/Bs93m2IwgeK74oLJkv2nrBOMaVwFdm2YtWvsLEb1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755020866; a=rsa-sha256; cv=none; b=XA7OrZuYs/vSl9jMXRk5h0HnbPaXDkEHygmV8Eklp9aOs3/6513JxLEqes3wIeXvB9/2rB hkU6dUAz2bA5Qv3mWOsDeMqN/0BwEBWMatZPD0lqCGm1B4rjaerJCoJIK01ZnlZ3wVIre/ J59zrGyXW7Zwi3526JIXDzoN+/l8MxEqGUnVfPPOwBj+D2mS77RFwQe6vavaYcLXtkBi4P emH6fiU3xTmqvMxzjTVF8Wc4UOW5n3+/Rxqe8yEfNaZHd7iju71XFm29KXNoCpI1BtbI+M PoNksMO7sYWx2pvAp9a3kp0Y+HIWjHzoweUnCTyfuO4fMdR/2pRwZ2mmB3HJ7w== 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 4c1f9F6vx2zpM0; Tue, 12 Aug 2025 17:47: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 57CHljj4035101; Tue, 12 Aug 2025 17:47:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CHlj3a035098; Tue, 12 Aug 2025 17:47:45 GMT (envelope-from git) Date: Tue, 12 Aug 2025 17:47:45 GMT Message-Id: <202508121747.57CHlj3a035098@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: 6bca82843e56 - main - netstat: remove unneeded cast List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 6bca82843e5605fc242211093b56d1129eb4307c Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=6bca82843e5605fc242211093b56d1129eb4307c commit 6bca82843e5605fc242211093b56d1129eb4307c Author: Michael Tuexen AuthorDate: 2025-08-12 17:45:54 +0000 Commit: Michael Tuexen CommitDate: 2025-08-12 17:45:54 +0000 netstat: remove unneeded cast delivered is already an uint64_t, so no need to cast it to that type. MFC after: 1 week Sponsored by: Netflix, Inc. --- usr.bin/netstat/inet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 6724c1099a83..3c4d6d4b62f9 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -951,7 +951,7 @@ udp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) udpstat.udps_fullsock; if (delivered || sflag <= 1) xo_emit("\t{:delivered-packets/%ju} {N:/delivered}\n", - (uint64_t)delivered); + delivered); p(udps_opackets, "{:output-packets/%ju} {N:/datagram%s output}\n"); /* the next statistic is cumulative in udps_noportbcast */ p(udps_filtermcast, "{:multicast-source-filter-matches/%ju} " From nobody Tue Aug 12 18:02:45 2025 X-Original-To: dev-commits-src-main@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 4c1fVY4kfzz65CMW; Tue, 12 Aug 2025 18:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1fVY3fxMz42D1; Tue, 12 Aug 2025 18:02:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755021765; 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=NGW3FELfPisLc/edVCBeEu4qUJUcrX0E/nvyyqi0+2I=; b=sBPjCMPO2SvFJaym/tshtGGWx5W936ZimfX7OjZ6zRJRONkSITQUIrDSGLcY7wnhyElCaA AmMuPJsdersGFCptreelLZXsI/Zh/QVZbBJAKTHhiPZY4qNr/Y/J4PDZXGDMFiirF8HnOb dpNkO1hjygoLkBesQLD9V3Oc88cpWBKkakn/1gSixt3lQhnk0nI0PhKuMNymLnC41hbBqP Aa4hKE/hJx7H5BNZL1jxEgVCBmKdMm9DCVeDyLbe4jAfuVe1bQAlNKanXu+d627vlgAp3s +BfI1yQzZZIvtJXl4ZyfUZm0uiYXRtzhmtzXcKFLhO0mrzHyEFNcvGZAEvDDcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755021765; 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=NGW3FELfPisLc/edVCBeEu4qUJUcrX0E/nvyyqi0+2I=; b=smyxTvJ4QK//TjkXu6t1QrA1FZurrqp49mIY1BUkrhhmFYxcewTPQExMUzmgQxPiJHlsZw uRfIoc+Pw7NqDQFe+JyAQHvOrSSLVNxUc0xU1EE8KelUfONfZHsFdxSwfe1ryWtvFZNiSY IPRsqtEZTqUBUiSVBtnP6uDpdRw+x9LTwLwm8f8csSdUDLJgtGirW481BwaYgYSXonhNeT 9hLtyXyVwQJj40K7D8quIV9fNXnFhB6miErsWRfRZn7SZZ/LWooFQWja++5pocGLWkq69b HCn9gRpPsER7TyOhXxAzjg7kjJyKSOG6+Fw7AYJkEMb0T2WwfhXMR+l68xijDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755021765; a=rsa-sha256; cv=none; b=a+EBVkIbxFIfCMDdQyv6F1oH9/KaYUFZlyapnT58wRwj445UqgTnpo1VOSCH2USzXj41XT 3/InfF7P2N1XXZDHdfJNsiOxPUO9zSSZ8woy43bTY2dOXHgBsqED/C4YZFWZ/1bPODvdzQ bH2dJWE2+G2FqxtvXuZCy/iI+NZMoRsFjx8LetfaOa1eJGzUEQTsvmgVpuL0Ug6d7ZCRQD yPQy4dI1LH+O/bLz+lPQmG9GH1AdSVFWoYCn0tOjx4ciiksxnVvHAD6fk7WUd/9zpm/klh PHE8W9YI4/m51UC/UinDMZA4ukrvf3qtn2DEI+Zt01XxXeX9Iyx53vAfUBncIg== 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 4c1fVY3Fyyzptj; Tue, 12 Aug 2025 18:02: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 57CI2jnq071933; Tue, 12 Aug 2025 18:02:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CI2jvt071930; Tue, 12 Aug 2025 18:02:45 GMT (envelope-from git) Date: Tue, 12 Aug 2025 18:02:45 GMT Message-Id: <202508121802.57CI2jvt071930@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: e69573bc2bee - main - iflib: simplify lro & use tcp_lro_queue_mbuf() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: e69573bc2bee2ebdba06a71425c9a0069ed8e5fd Auto-Submitted: auto-generated The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=e69573bc2bee2ebdba06a71425c9a0069ed8e5fd commit e69573bc2bee2ebdba06a71425c9a0069ed8e5fd Author: Andrew Gallatin AuthorDate: 2025-08-12 17:54:26 +0000 Commit: Andrew Gallatin CommitDate: 2025-08-12 18:02:28 +0000 iflib: simplify lro & use tcp_lro_queue_mbuf() Simplify LRO handling by: - removing fowarding checks... LRO will already do this - using the rss sorted LRO (tcp_lro_queue_mbuf()) API, which allows LRO to accumulated large numbers of packets and sort them by LRO hash and arrival time, leading to far higher LRO aggregation rates on servers with lots of connections (esp. internet facing servers). - eliminate cache busing loop over chained packets Note that this change may slightly pessimize a silly case (LRO enabled + IP forwarding enabled) wth the benefit of giving a small speedup for forwarding with LRO disabled, and a very large speedup for LRO w/o forwarding disabled. And the large benefit of simplifying the code. Reviewed by: kbowling, markj Tested by: olivier Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D51772 --- sys/net/iflib.c | 108 +++++++++----------------------------------------------- 1 file changed, 16 insertions(+), 92 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 2eca81d54f99..6638c90882aa 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2890,51 +2890,6 @@ iflib_rxd_pkt_get(iflib_rxq_t rxq, if_rxd_info_t ri) return (m); } -#if defined(INET6) || defined(INET) -static void -iflib_get_ip_forwarding(struct lro_ctrl *lc, bool *v4, bool *v6) -{ - CURVNET_SET(if_getvnet(lc->ifp)); -#if defined(INET6) - *v6 = V_ip6_forwarding; -#endif -#if defined(INET) - *v4 = V_ipforwarding; -#endif - CURVNET_RESTORE(); -} - -/* - * Returns true if it's possible this packet could be LROed. - * if it returns false, it is guaranteed that tcp_lro_rx() - * would not return zero. - */ -static bool -iflib_check_lro_possible(struct mbuf *m, bool v4_forwarding, bool v6_forwarding) -{ - struct ether_header *eh; - - eh = mtod(m, struct ether_header *); - switch (eh->ether_type) { -#if defined(INET6) - case htons(ETHERTYPE_IPV6): - return (!v6_forwarding); -#endif -#if defined(INET) - case htons(ETHERTYPE_IP): - return (!v4_forwarding); -#endif - } - - return (false); -} -#else -static void -iflib_get_ip_forwarding(struct lro_ctrl *lc __unused, bool *v4 __unused, bool *v6 __unused) -{ -} -#endif - static void _task_fn_rx_watchdog(void *context) { @@ -2956,18 +2911,16 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) int err, budget_left, rx_bytes, rx_pkts; iflib_fl_t fl; int lro_enabled; - bool v4_forwarding, v6_forwarding, lro_possible; uint8_t retval = 0; /* * XXX early demux data packets so that if_input processing only handles * acks in interrupt context */ - struct mbuf *m, *mh, *mt, *mf; + struct mbuf *m, *mh, *mt; NET_EPOCH_ASSERT(); - lro_possible = v4_forwarding = v6_forwarding = false; ifp = ctx->ifc_ifp; mh = mt = NULL; MPASS(budget > 0); @@ -2983,6 +2936,8 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) return (retval); } + lro_enabled = (if_getcapenable(ifp) & IFCAP_LRO); + /* pfil needs the vnet to be set */ CURVNET_SET_QUIET(if_getvnet(ifp)); for (budget_left = budget; budget_left > 0 && avail > 0;) { @@ -3027,7 +2982,17 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) if (__predict_false(m == NULL)) continue; - /* imm_pkt: -- cxgb */ +#ifndef __NO_STRICT_ALIGNMENT + if (!IP_ALIGNED(m) && (m = iflib_fixup_rx(m)) == NULL) + continue; +#endif +#if defined(INET6) || defined(INET) + if (lro_enabled) { + tcp_lro_queue_mbuf(&rxq->ifr_lc, m); + continue; + } +#endif + if (mh == NULL) mh = mt = m; else { @@ -3040,49 +3005,8 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) for (i = 0, fl = &rxq->ifr_fl[0]; i < sctx->isc_nfl; i++, fl++) retval |= iflib_fl_refill_all(ctx, fl); - lro_enabled = (if_getcapenable(ifp) & IFCAP_LRO); - if (lro_enabled) - iflib_get_ip_forwarding(&rxq->ifr_lc, &v4_forwarding, &v6_forwarding); - mt = mf = NULL; - while (mh != NULL) { - m = mh; - mh = mh->m_nextpkt; - m->m_nextpkt = NULL; -#ifndef __NO_STRICT_ALIGNMENT - if (!IP_ALIGNED(m) && (m = iflib_fixup_rx(m)) == NULL) - continue; -#endif -#if defined(INET6) || defined(INET) - if (lro_enabled) { - if (!lro_possible) { - lro_possible = iflib_check_lro_possible(m, v4_forwarding, v6_forwarding); - if (lro_possible && mf != NULL) { - if_input(ifp, mf); - DBG_COUNTER_INC(rx_if_input); - mt = mf = NULL; - } - } - if ((m->m_pkthdr.csum_flags & (CSUM_L4_CALC | CSUM_L4_VALID)) == - (CSUM_L4_CALC | CSUM_L4_VALID)) { - if (lro_possible && tcp_lro_rx(&rxq->ifr_lc, m, 0) == 0) - continue; - } - } -#endif - if (lro_possible) { - if_input(ifp, m); - DBG_COUNTER_INC(rx_if_input); - continue; - } - - if (mf == NULL) - mf = m; - if (mt != NULL) - mt->m_nextpkt = m; - mt = m; - } - if (mf != NULL) { - if_input(ifp, mf); + if (mh != NULL) { + if_input(ifp, mh); DBG_COUNTER_INC(rx_if_input); } From nobody Tue Aug 12 20:35:28 2025 X-Original-To: dev-commits-src-main@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 4c1jtn02Yrz6421P; Tue, 12 Aug 2025 20:35: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1jtm6YWqz3dt2; Tue, 12 Aug 2025 20:35:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755030928; 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=SxNICtEbTsVC+1kSnXSP1f770cQKq6NT3idydVphvFM=; b=JmW3eSy+4BdBQE8rBF9AJwfjp7UCQC7LXHIoQI8I2FbFgjN20hIJPZD4wVWPxSLrcs9GiH hmILhhNCTy4IwAnO/rlQIryw7BviiZYM0c4G9AWnvCSRAB4Yb2oJ+oYq2FNWUjzf7A2Gt/ D861BKjEHHfxdbR92v7bB0YtczvzJgl4JMsf/Wy8mp6UYkAYOlBmFR6CpuL6i8pbESneh4 /1Z7qqRCB73u2u5GPj1hrqnLx8XQwS4/21g2y5c8dVD+XIr2ACfiEUBXTCZ1PVPeCtSF5k n8rOczEivLq3KvBgPZN3QZrNpqIqOSsmq3obRUdF7q1WjE9DiBX3Ly7R+BNQwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755030928; 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=SxNICtEbTsVC+1kSnXSP1f770cQKq6NT3idydVphvFM=; b=cBFP5ZGim9qNmlAPAyq23kt5N6G9naEJaCNf3LxGW8V/KsZImZUKAV7hYTjEBbXGQAJr5R 1K21hUCxRveHgdjPjBkX+lntYaoxnqDSN21frOIcy0bJdt8BYgmDTsHA0WzLnzQlYBJKVD j5+rYyOem8JFXDdlR/7eiIUb5cZdAz/i0i7j/wj1VwfS5p5D/lTO6dwn25T2d2zDym8Bcc LuzD3wY3Jn6uCMFSHYK9OZnZxtECZ6WANhySAzBaHFKJ8MPSKyQOqojKANGsU64QCxOpB/ 7MMO8Tolgmf6z7RBoazk7Cw44g+XO0f3gj7yFZJZxhUh1blWAdWSAqlBi1kccg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755030928; a=rsa-sha256; cv=none; b=qJRzKAObew/GYcp9GXb5sGCw5kK5+pZ5aum39YuLaaJ6IWbam5He497Iq/iZ5UhWSS54ja fxch3jj0ePKHbkzMG/bUyeCDoZsSl3zQcBc8iUlJhtPpR2fGgQlL0qhDMP2NzDJj7EkJIj YXXVFifQdpCJ/VrqN7r4+4Wy1gCxoJnUPG6RBYAdJXBPtzISIwqheA8Y+2Jo+AHJdRgfG+ RaOIqafsvPYaet3jlyYODSoV9G6CkQ8WWoPjvD3FZ2kNVbpncIdaK1z9MvJj3DRG0jySBH OZYLrCnrCuW91GGH0snupdNPpBZwF1qH+82t8w9JLJXyPGFcIorGQqmxsqKTyA== 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 4c1jtm62n9ztHb; Tue, 12 Aug 2025 20:35: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 57CKZSxI061999; Tue, 12 Aug 2025 20:35:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CKZSGh061996; Tue, 12 Aug 2025 20:35:28 GMT (envelope-from git) Date: Tue, 12 Aug 2025 20:35:28 GMT Message-Id: <202508122035.57CKZSGh061996@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: d831bd8878db - main - autofs: partial is also leaked. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: d831bd8878db38c5c84477a2efa24bdbbf2fead6 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d831bd8878db38c5c84477a2efa24bdbbf2fead6 commit d831bd8878db38c5c84477a2efa24bdbbf2fead6 Author: Warner Losh AuthorDate: 2025-08-10 22:43:16 +0000 Commit: Warner Losh CommitDate: 2025-08-12 20:35:35 +0000 autofs: partial is also leaked. partial is also always leaked (since we reallocate it each time through the loop). It should be freed before we return as well. Noticed by: kib Sponsored by: Netflix --- usr.sbin/autofs/common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/autofs/common.c b/usr.sbin/autofs/common.c index 6b98214162ae..2dd7c290cebc 100644 --- a/usr.sbin/autofs/common.c +++ b/usr.sbin/autofs/common.c @@ -153,6 +153,7 @@ create_directory(const char *path) } } + free(partial); free(tofree); } From nobody Tue Aug 12 21:45:29 2025 X-Original-To: dev-commits-src-main@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 4c1lRZ3TzVz647yv; Tue, 12 Aug 2025 21:45: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1lRZ29bGz3m29; Tue, 12 Aug 2025 21:45:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755035130; 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=Kx3wRF63mY9ftaDD9MdULdxJSk7RYM3aRl6cDBaCoic=; b=PFKJZUaxzUh/c6NqDL4YbTWm8OmZawCKsT6EU7tkwYhIEgeEeKkIHNsxp9iLTpMMIh3qwl O3DR+pow/qDTXj2Iup8KjhOEt7/m0xEzQbWTQ5HIg5esA1BZN+reYZXUBQZAdCbURbUZe/ PkIqCDlUnfuJFZpQZ8ldfUvFuYdRv6lhjAhxUlcQTEaMLK4H+4BEL0ZpjRJtXvr0RaZkcu eVdrVh/Z8pZN6laSlnGD/RFGE4ykHsMfcFHR1TS6pTOWkISASAFH7pdCszjY42wsebgca7 nNWuA3YqXlCJOP9+jHGRAvgtlzGkegnX6W7aV1k5OURzQXqgIPJFtI5ntRo+ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755035130; 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=Kx3wRF63mY9ftaDD9MdULdxJSk7RYM3aRl6cDBaCoic=; b=Q4r0ARC4yjd1tJ+9MQvLi8qmZCbtybEefAkrjOCchOXE/jhUoAWWyxvMCwMNfnnxZF+AbV gmBrrXC5pT9uF0etmT1+9fEM0pDdHJpp6BYy2A9a7CYhzKRApaKDuEp+4+YCgPcTdcelGe N0iPjIfqlDL1WOgadfzv6uzSvEWqfJLIKIvCfAxMYIhXLWTSoV1TKE72L/L4mEh1PhGGXB 7b/YkJpAI/uaGcjFRm//9+oH5cDqFQgzFMN0mDX+OLYc5NPiOi5PqsPwtAMtwV9Io0H0Rx Y1L5gfKOvQ+bWrZC6pOpB9U48hxzoQI/L0zGpJYcdySXqDyz4vbyTl3Q5JfsWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755035130; a=rsa-sha256; cv=none; b=j7pwcqd0XDnpmT7cuDPq1zcb8tSxefWo/aGgsuWxuZJL4qfKnP/upBxVLJdYGrbKGpurTb fYPW2WCK+chThm2W+LQsrYOk/OmxmLBUWlzo1Uo1ycZMb2T+z9PNLSmm5OSQyyeiZT6cbf qS6/bTYJYIX6DHxSPIMNgpbuDJnZ+z/2HFA/GANyJSRbbf8FtnZ2/PYvaHeZycdP2DCGAB 3NT3QeYgYfoJioE6vcXvl66HNynLdSfuSFo7UGVBgXLExMs0NvBBwjCqjauFPoa0QpUFCn 1hNFga43lcP0mht2hQRKyjEkLe6d2zINU4AdlUDW0sCIz28LJ5Ov7Gwu4SKdgw== 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 4c1lRY6rmJzvv3; Tue, 12 Aug 2025 21:45: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 57CLjTAC092770; Tue, 12 Aug 2025 21:45:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CLjT29092767; Tue, 12 Aug 2025 21:45:29 GMT (envelope-from git) Date: Tue, 12 Aug 2025 21:45:29 GMT Message-Id: <202508122145.57CLjT29092767@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: 3af6f55735ce - main - tests: Add some regression tests for copy_file_range() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 3af6f55735cef7df72ca3f4ecf2b0027abb5fcb8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3af6f55735cef7df72ca3f4ecf2b0027abb5fcb8 commit 3af6f55735cef7df72ca3f4ecf2b0027abb5fcb8 Author: Mark Johnston AuthorDate: 2025-08-09 21:21:41 +0000 Commit: Mark Johnston CommitDate: 2025-08-12 21:45:24 +0000 tests: Add some regression tests for copy_file_range() These cover a few bugs that have cropped up, including the ones fixed by commits 4046ad6bb0e and 2319ca6a0181. PR: 276045 Reviewed by: rmacklem MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D51856 --- tests/sys/kern/Makefile | 2 + tests/sys/kern/copy_file_range.c | 231 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 233 insertions(+) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index 336e73f29835..9044b1e7e4f2 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -8,6 +8,7 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/kernel TESTSDIR= ${TESTSBASE}/sys/kern ATF_TESTS_C+= basic_signal +ATF_TESTS_C+= copy_file_range .if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "powerpc" && \ ${MACHINE_ARCH} != "powerpcspe" # No support for atomic_load_64 on i386 or (32-bit) powerpc @@ -81,6 +82,7 @@ PROGS+= coredump_phnum_helper PROGS+= pdeathsig_helper PROGS+= sendfile_helper +LIBADD.copy_file_range+= md LIBADD.jail_lookup_root+= jail util CFLAGS.sys_getrandom+= -I${SRCTOP}/sys/contrib/zstd/lib LIBADD.sys_getrandom+= zstd diff --git a/tests/sys/kern/copy_file_range.c b/tests/sys/kern/copy_file_range.c new file mode 100644 index 000000000000..ca52eaf668e3 --- /dev/null +++ b/tests/sys/kern/copy_file_range.c @@ -0,0 +1,231 @@ +/* + * Copyright (c) 2025 Mark Johnston + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +/* + * Create a file with random data and size between 1B and 32MB. Return a file + * descriptor for the file. + */ +static int +genfile(void) +{ + char buf[256], file[NAME_MAX]; + size_t sz; + int fd; + + sz = (random() % (32 * 1024 * 1024ul)) + 1; + + snprintf(file, sizeof(file), "testfile.XXXXXX"); + fd = mkstemp(file); + ATF_REQUIRE(fd != -1); + + while (sz > 0) { + ssize_t n; + int error; + + error = getentropy(buf, sizeof(buf)); + ATF_REQUIRE(error == 0); + n = write(fd, buf, sizeof(buf) < sz ? sizeof(buf) : sz); + ATF_REQUIRE(n > 0); + + sz -= n; + } + + ATF_REQUIRE(lseek(fd, 0, SEEK_SET) == 0); + return (fd); +} + +/* + * Return true if the file data in the two file descriptors is the same, + * false otherwise. + */ +static bool +cmpfile(int fd1, int fd2) +{ + struct stat st1, st2; + void *addr1, *addr2; + size_t sz; + int res; + + ATF_REQUIRE(fstat(fd1, &st1) == 0); + ATF_REQUIRE(fstat(fd2, &st2) == 0); + if (st1.st_size != st2.st_size) + return (false); + + sz = st1.st_size; + addr1 = mmap(NULL, sz, PROT_READ, MAP_PRIVATE, fd1, 0); + ATF_REQUIRE(addr1 != MAP_FAILED); + addr2 = mmap(NULL, sz, PROT_READ, MAP_PRIVATE, fd2, 0); + ATF_REQUIRE(addr2 != MAP_FAILED); + + res = memcmp(addr1, addr2, sz); + + ATF_REQUIRE(munmap(addr1, sz) == 0); + ATF_REQUIRE(munmap(addr2, sz) == 0); + + return (res == 0); +} + +/* + * Exercise a few error paths in the copy_file_range() syscall. + */ +ATF_TC_WITHOUT_HEAD(copy_file_range_invalid); +ATF_TC_BODY(copy_file_range_invalid, tc) +{ + off_t off1, off2; + int fd1, fd2; + + fd1 = genfile(); + fd2 = genfile(); + + /* Can't copy a file to itself without explicit offsets. */ + ATF_REQUIRE_ERRNO(EINVAL, + copy_file_range(fd1, NULL, fd1, NULL, SSIZE_MAX, 0) == -1); + + /* When copying a file to itself, ranges cannot overlap. */ + off1 = off2 = 0; + ATF_REQUIRE_ERRNO(EINVAL, + copy_file_range(fd1, &off1, fd1, &off2, 1, 0) == -1); + + /* Negative offsets are not allowed. */ + off1 = -1; + off2 = 0; + ATF_REQUIRE_ERRNO(EINVAL, + copy_file_range(fd1, &off1, fd2, &off2, 42, 0) == -1); + ATF_REQUIRE_ERRNO(EINVAL, + copy_file_range(fd2, &off2, fd1, &off1, 42, 0) == -1); +} + +/* + * Make sure that copy_file_range() updates the file offsets passed to it. + */ +ATF_TC_WITHOUT_HEAD(copy_file_range_offset); +ATF_TC_BODY(copy_file_range_offset, tc) +{ + struct stat sb; + off_t off1, off2; + ssize_t n; + int fd1, fd2; + + off1 = off2 = 0; + + fd1 = genfile(); + fd2 = open("copy", O_RDWR | O_CREAT, 0644); + ATF_REQUIRE(fd2 != -1); + + ATF_REQUIRE(fstat(fd1, &sb) == 0); + + ATF_REQUIRE(lseek(fd1, 0, SEEK_CUR) == 0); + ATF_REQUIRE(lseek(fd2, 0, SEEK_CUR) == 0); + + do { + off_t ooff1, ooff2; + + ooff1 = off1; + ooff2 = off2; + n = copy_file_range(fd1, &off1, fd2, &off2, sb.st_size, 0); + ATF_REQUIRE(n >= 0); + ATF_REQUIRE_EQ(off1, ooff1 + n); + ATF_REQUIRE_EQ(off2, ooff2 + n); + } while (n != 0); + + /* Offsets should have been adjusted by copy_file_range(). */ + ATF_REQUIRE_EQ(off1, sb.st_size); + ATF_REQUIRE_EQ(off2, sb.st_size); + /* Seek offsets should have been left alone. */ + ATF_REQUIRE(lseek(fd1, 0, SEEK_CUR) == 0); + ATF_REQUIRE(lseek(fd2, 0, SEEK_CUR) == 0); + /* Make sure the file contents are the same. */ + ATF_REQUIRE_MSG(cmpfile(fd1, fd2), "file contents differ"); + + ATF_REQUIRE(close(fd1) == 0); + ATF_REQUIRE(close(fd2) == 0); +} + +/* + * Make sure that copying to a larger file doesn't cause it to be truncated. + */ +ATF_TC_WITHOUT_HEAD(copy_file_range_truncate); +ATF_TC_BODY(copy_file_range_truncate, tc) +{ + struct stat sb, sb1, sb2; + char digest1[65], digest2[65]; + off_t off; + ssize_t n; + int fd1, fd2; + + fd1 = genfile(); + fd2 = genfile(); + + ATF_REQUIRE(fstat(fd1, &sb1) == 0); + ATF_REQUIRE(fstat(fd2, &sb2) == 0); + + /* fd1 refers to the smaller file. */ + if (sb1.st_size > sb2.st_size) { + int tmp; + + tmp = fd1; + fd1 = fd2; + fd2 = tmp; + ATF_REQUIRE(fstat(fd1, &sb1) == 0); + ATF_REQUIRE(fstat(fd2, &sb2) == 0); + } + + /* + * Compute a hash of the bytes in the larger file which lie beyond the + * length of the smaller file. + */ + SHA256_FdChunk(fd2, digest1, sb1.st_size, sb2.st_size - sb1.st_size); + ATF_REQUIRE(lseek(fd2, 0, SEEK_SET) == 0); + + do { + n = copy_file_range(fd1, NULL, fd2, NULL, SSIZE_MAX, 0); + ATF_REQUIRE(n >= 0); + } while (n != 0); + + /* Validate file offsets after the copy. */ + off = lseek(fd1, 0, SEEK_CUR); + ATF_REQUIRE(off == sb1.st_size); + off = lseek(fd2, 0, SEEK_CUR); + ATF_REQUIRE(off == sb1.st_size); + + /* The larger file's size should remain the same. */ + ATF_REQUIRE(fstat(fd2, &sb) == 0); + ATF_REQUIRE(sb.st_size == sb2.st_size); + + /* The bytes beyond the end of the copy should be unchanged. */ + SHA256_FdChunk(fd2, digest2, sb1.st_size, sb2.st_size - sb1.st_size); + ATF_REQUIRE_MSG(strcmp(digest1, digest2) == 0, + "trailing file contents differ after copy_file_range()"); + + /* + * Verify that the copy actually replicated bytes from the smaller file. + */ + ATF_REQUIRE(ftruncate(fd2, sb1.st_size) == 0); + ATF_REQUIRE(cmpfile(fd1, fd2)); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, copy_file_range_invalid); + ATF_TP_ADD_TC(tp, copy_file_range_offset); + ATF_TP_ADD_TC(tp, copy_file_range_truncate); + + return (atf_no_error()); +} From nobody Tue Aug 12 21:45:30 2025 X-Original-To: dev-commits-src-main@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 4c1lRb37whz647tQ; Tue, 12 Aug 2025 21:45: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1lRb0RhHz3mTk; Tue, 12 Aug 2025 21:45:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755035131; 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=F+1FS5WT0e6boxHBNvViHGSZTC7RpRSzEuWiQR/avQU=; b=FnIy7EcNJdejTT9ul2B7/iRDScsGncWEYw9dKw4UgUX56U9RNT8FwZ9YWnH09403tC5CCk h/P0pIcCuOFLgAvbxfBFZVlTFgUPT1fxr2waiXFS0LxF0BbSXD1KCZpojWVtVBHe0jLtJF Yj1j+ti4SoX/EWJ/B8zzb5xs2fS6cuh2sNBNavhU+h3FBaPyf7vOyME9/c3X6+jXsa6GjC dqHxikZonlU+JUwT8KExZZvN5PsouVCpHd4zhI88PVb+UPQMf7ioeis89GdQfF2K7qBON9 TSWpXJeVwONgE+561nH8ggePD8wiFcAhVyaT5N9eCvDAJu6gESXHQkp4g3c6sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755035131; 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=F+1FS5WT0e6boxHBNvViHGSZTC7RpRSzEuWiQR/avQU=; b=bCOCZWOs8/8OLzMuK1x0Ben6Y0oe3+BEUCiIeqX75rHYuGYBPUUV0lXK4tZQYL9S6uKGBJ J1izlLnxPiBbXTWp81ozCmwvDRIcZfHwzPfj64GdueqYsglsCt4NvpsnwhMHJhxKvBe5SL yk2IgZI22PYNrzAfdOB3v6kOjKOiVp6GvQmtfK2YC+hiueAuoEkHC3AHi0kKbboHAAX+Fj Z7aFWVPSLso0MTRtbReI1YCPM3YsoC9yeT4lTnT3rugt8jXCbjI3imBGWWY5iJz6zGW8cW miOls8soUYPSSBmB9kvfBQIjqO9DFGilbFb7BXAQczZBVCoAa333eTJhaB1FrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755035131; a=rsa-sha256; cv=none; b=B6odEV42TZnLqY0c1S4+YjlbdmH6FkIdbC1EGswHXAqMZJYGoKLMI62YcImtzJrNxKslIn GtPWuX9gApHaiRWsRbovJWMzesWvzklw3juDLiFLz7fdHTCa3+c+6iP8odcJvasRFBJn3M TGic1RYksrWMgb3xhYbMvfGK5EPo1QN1TaZy/2vZsy/mQbRbaTpzFuztY5bSyjzjcMcl0V CQBdL0p1HWhxtHHIKrNuQ+0hdVhrxmyvFfdeer1z5nCGWcXm5ESObTgwc1zmwrPHku+OG6 ARpDn+3zrgsOFmEipSya6i/gH2914QFokz+wawNBiKp/zgHXH/6uUSe2OUMcHQ== 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 4c1lRZ72P5zvv4; Tue, 12 Aug 2025 21:45: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 57CLjUqo092805; Tue, 12 Aug 2025 21:45:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CLjUhh092802; Tue, 12 Aug 2025 21:45:30 GMT (envelope-from git) Date: Tue, 12 Aug 2025 21:45:30 GMT Message-Id: <202508122145.57CLjUhh092802@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: 5e8b3eeb6096 - main - kern: Allow O_CLOFORK to be passed to shm_open(2) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 5e8b3eeb6096f01c12a5b42f0327c2066e91a640 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5e8b3eeb6096f01c12a5b42f0327c2066e91a640 commit 5e8b3eeb6096f01c12a5b42f0327c2066e91a640 Author: Ricardo Branco AuthorDate: 2025-08-04 14:56:17 +0000 Commit: Mark Johnston CommitDate: 2025-08-12 21:45:24 +0000 kern: Allow O_CLOFORK to be passed to shm_open(2) Signed-off-by: Ricardo Branco Reviewed by: kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1802 --- lib/libsys/shm_open.2 | 5 +++-- sys/kern/uipc_shm.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libsys/shm_open.2 b/lib/libsys/shm_open.2 index 8bea939690ba..c3196d966e6b 100644 --- a/lib/libsys/shm_open.2 +++ b/lib/libsys/shm_open.2 @@ -26,7 +26,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 30, 2023 +.Dd August 4, 2025 .Dt SHM_OPEN 2 .Os .Sh NAME @@ -74,8 +74,9 @@ must be included in The optional flags .Dv O_CREAT , .Dv O_EXCL , +.Dv O_TRUNC , and -.Dv O_TRUNC +.Dv O_CLOFORK may also be specified. .Pp If diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 85fe48ddd466..eb1327f7f2de 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -1160,7 +1160,8 @@ kern_shm_open2(struct thread *td, const char *userpath, int flags, mode_t mode, if ((flags & O_ACCMODE) != O_RDONLY && (flags & O_ACCMODE) != O_RDWR) return (EINVAL); - if ((flags & ~(O_ACCMODE | O_CREAT | O_EXCL | O_TRUNC | O_CLOEXEC)) != 0) + if ((flags & ~(O_ACCMODE | O_CREAT | O_EXCL | O_TRUNC | O_CLOEXEC | + O_CLOFORK)) != 0) return (EINVAL); largepage = (shmflags & SHM_LARGEPAGE) != 0; From nobody Tue Aug 12 23:23:50 2025 X-Original-To: dev-commits-src-main@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 4c1nd25dGBz64JgC; Tue, 12 Aug 2025 23:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1nd24sw7z3tmT; Tue, 12 Aug 2025 23:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755041030; 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=//NnM762IEjtqEJjiIEA4f7lUXf+iNlVUQlNK6928Q4=; b=SprXzmMQUFcVjm1ZUJpOzNS7cOnobV7dDPeqGlyDsP0mRbinQwSgH1jiLe08KW65k05yfV 5IJpERTztIBv2SWJCrY2ia8VBgutg42sirT4Pg2t0FUNA+7OVp7/1bX/JCXaoKIoAOF/s4 vhh9ZwQrz2BZsYLxhukafpDXHbBPXXS2NsUVxyDgtclqYmBEUuD1wvnfFP7lH+Nei/ckob 4oKGDP10kK/DzaRhjpo85fHQT72/xZstRMXVVgaSv2UoGsbbFlbHNUcRUALg9An0viU4+e SbHgRBxjuFCHDJ7GGu36+hIGlvylBX2rRyjeVZKFGMeIH6phjoA8APE5dbeWhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755041030; 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=//NnM762IEjtqEJjiIEA4f7lUXf+iNlVUQlNK6928Q4=; b=V1STWIdF8SScgolIbY5Wica2wRM5JceodjV83KoyDOMsBTtsKhlisAgbKK4QeFytD88UkF EuS9FZhcZ7D8lvNDW5RJzA0Y06Ue70N0n4uGZ3/2x+gfg6ISPcXWlhz9SDnmxFT/wtPyS/ vST852JWvvj2Ff2UsiO4GAubGRtG/AV4j2WkXtqEXyMHGtwYJ8Ei7fy7ALZ99FizLsno/w DcNcsYwmqg3pyOVmY2BD3Nv/MNyfPPyuAOyAAuWgEwRZlDhsL8TS3kjWvujfQdvu3jf7xM XRasYNK3LV3oBu/E7FoF1TFL34ioS9Mh2nTS5iiwsA3ve1A2j7t1b2AkhhQwbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755041030; a=rsa-sha256; cv=none; b=C1tX/h1JxbkLZtrvQhjfv1DSdwcz0oC9Rxply5OQQww1YYMtZDhATZvAqUthZfKtIMkO73 4tKmZc78rVOK4A3yFn1ZWeTQNQGEId6t7joDaVYO73RZmWkV/5fJU2qG7DulMroEG7ZuRS pef2/8qDG/VGnzcvI+nVJzWUnC5/Bqhp6AmzLojSa6giV6OzbB6PqaMjFhk7jjHMq5CytL syfhzIO4e97RpDu1ZmdYZG93mxfQR+oj4u6Dw6tASkznUKZSPNbLogtFR1HrGjec/3WkI9 nQIidYnbHinclcrJ66Zpych1Gy3UXG80HkCVD5WcBpv2PL0CXuFNi6OZF7eSjw== 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 4c1nd244xYzy7S; Tue, 12 Aug 2025 23:23: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 57CNNovw080618; Tue, 12 Aug 2025 23:23:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57CNNoww080615; Tue, 12 Aug 2025 23:23:50 GMT (envelope-from git) Date: Tue, 12 Aug 2025 23:23:50 GMT Message-Id: <202508122323.57CNNoww080615@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric van Gyzen Subject: git: a9f5b6883709 - main - IPv6: Ignore PTB packets with an MTU < 1280 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9f5b68837094699a3d5204d79c1cbe59d93ae00 Auto-Submitted: auto-generated The branch main has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=a9f5b68837094699a3d5204d79c1cbe59d93ae00 commit a9f5b68837094699a3d5204d79c1cbe59d93ae00 Author: Eric van Gyzen AuthorDate: 2025-08-08 21:59:31 +0000 Commit: Eric van Gyzen CommitDate: 2025-08-12 14:38:55 +0000 IPv6: Ignore PTB packets with an MTU < 1280 RFC 2460 section 5 paragraph 7 allowed a Packet Too Big message to report a Next-Hop MTU less than 1280 in support of 6-to-4 routers. A node receiving such a message was required to add a Fragment Header to outgoing packets, even though they were not fragmented. Almost 20 years later, RFC 8200 was published. It obsoletes RFC 2460 and removes that paragraph. UNH IOL Intact was updated to test for compliance with the new standard. Remove code supporting that obsolete paragraph. Test cases v6LC_4_1_06a and 06b failed before this change, saying: DUT processed PTB and sent a fragmented echo reply Those two test cases now pass: DUT did not process PTB and sent un-fragmented echo reply All PMTU test cases pass except v6LC_4_1_08. It fails because we ignore the MTU in RAs. Reviewed by: tuexen MFC After: 1 month Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D51835 --- sys/netinet/icmp6.h | 3 -- sys/netinet/tcp_subr.c | 2 +- sys/netinet6/icmp6.c | 38 +++------------- sys/netinet6/ip6_output.c | 107 +++++++++++++++------------------------------- 4 files changed, 40 insertions(+), 110 deletions(-) diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 7845b682f3e4..2ca5b3433e47 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -713,9 +713,6 @@ void icmp6_redirect_input(struct mbuf *, int); void icmp6_redirect_output(struct mbuf *, struct nhop_object *); int icmp6_ratelimit(const struct in6_addr *, const int, const int); -struct ip6ctlparam; -void icmp6_mtudisc_update(struct ip6ctlparam *, int); - /* XXX: is this the right place for these macros? */ #define icmp6_ifstat_inc(ifp, tag) \ do { \ diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 1fce7c591639..2e039ebbfdd2 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -3205,7 +3205,7 @@ tcp6_next_pmtu(const struct icmp6_hdr *icmp6) * small, set to the min. */ if (mtu < IPV6_MMTU) - mtu = IPV6_MMTU - 8; /* XXXNP: what is the adjustment for? */ + mtu = IPV6_MMTU; return (mtu); } diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index d89515d7eda5..f98381499b2d 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -159,6 +159,7 @@ static int ni6_addrs(struct icmp6_nodeinfo *, struct mbuf *, static int ni6_store_addrs(struct icmp6_nodeinfo *, struct icmp6_nodeinfo *, struct ifnet *, int); static int icmp6_notify_error(struct mbuf **, int, int); +static void icmp6_mtudisc_update(struct ip6ctlparam *ip6cp); /* * Kernel module interface for updating icmp6stat. The argument is an index @@ -1115,7 +1116,7 @@ icmp6_notify_error(struct mbuf **mp, int off, int icmp6len) if (icmp6type == ICMP6_PACKET_TOO_BIG) { notifymtu = ntohl(icmp6->icmp6_mtu); ip6cp.ip6c_cmdarg = (void *)¬ifymtu; - icmp6_mtudisc_update(&ip6cp, 1); /*XXX*/ + icmp6_mtudisc_update(&ip6cp); } if (ip6_ctlprotox[nxt] != NULL) @@ -1130,47 +1131,18 @@ icmp6_notify_error(struct mbuf **mp, int off, int icmp6len) return (-1); } -void -icmp6_mtudisc_update(struct ip6ctlparam *ip6cp, int validated) +static void +icmp6_mtudisc_update(struct ip6ctlparam *ip6cp) { struct in6_addr *dst = &ip6cp->ip6c_finaldst->sin6_addr; struct icmp6_hdr *icmp6 = ip6cp->ip6c_icmp6; - struct mbuf *m = ip6cp->ip6c_m; /* will be necessary for scope issue */ + struct mbuf *m = ip6cp->ip6c_m; u_int mtu = ntohl(icmp6->icmp6_mtu); struct in_conninfo inc; uint32_t max_mtu; -#if 0 - /* - * RFC2460 section 5, last paragraph. - * even though minimum link MTU for IPv6 is IPV6_MMTU, - * we may see ICMPv6 too big with mtu < IPV6_MMTU - * due to packet translator in the middle. - * see ip6_output() and ip6_getpmtu() "alwaysfrag" case for - * special handling. - */ if (mtu < IPV6_MMTU) return; -#endif - - /* - * we reject ICMPv6 too big with abnormally small value. - * XXX what is the good definition of "abnormally small"? - */ - if (mtu < sizeof(struct ip6_hdr) + sizeof(struct ip6_frag) + 8) - return; - - if (!validated) - return; - - /* - * In case the suggested mtu is less than IPV6_MMTU, we - * only need to remember that it was for above mentioned - * "alwaysfrag" case. - * Try to be as close to the spec as possible. - */ - if (mtu < IPV6_MMTU) - mtu = IPV6_MMTU - 8; bzero(&inc, sizeof(inc)); inc.inc_fibnum = M_GETFIB(m); diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index ed71c58fffbe..6299ce6e146b 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -145,11 +145,10 @@ static int ip6_insertfraghdr(struct mbuf *, struct mbuf *, int, struct ip6_frag **); static int ip6_insert_jumboopt(struct ip6_exthdrs *, u_int32_t); static int ip6_splithdr(struct mbuf *, struct ip6_exthdrs *); -static int ip6_getpmtu(struct route_in6 *, int, - struct ifnet *, const struct in6_addr *, u_long *, int *, u_int, - u_int); -static int ip6_calcmtu(struct ifnet *, const struct in6_addr *, u_long, - u_long *, int *, u_int); +static void ip6_getpmtu(struct route_in6 *, int, + struct ifnet *, const struct in6_addr *, u_long *, u_int, u_int); +static void ip6_calcmtu(struct ifnet *, const struct in6_addr *, u_long, + u_long *, u_int); static int ip6_getpmtu_ctl(u_int, const struct in6_addr *, u_long *); static int copypktopts(struct ip6_pktopts *, struct ip6_pktopts *, int); @@ -418,7 +417,7 @@ ip6_output(struct mbuf *m0, struct ip6_pktopts *opt, int vlan_pcp = -1; struct in6_ifaddr *ia = NULL; u_long mtu; - int alwaysfrag, dontfrag; + int dontfrag; u_int32_t optlen, plen = 0, unfragpartlen; struct ip6_exthdrs exthdrs; struct in6_addr src0, dst0; @@ -939,12 +938,10 @@ nonh6lookup: *ifpp = ifp; /* Determine path MTU. */ - if ((error = ip6_getpmtu(ro_pmtu, ro != ro_pmtu, ifp, &ip6->ip6_dst, - &mtu, &alwaysfrag, fibnum, *nexthdrp)) != 0) - goto bad; - KASSERT(mtu > 0, ("%s:%d: mtu %ld, ro_pmtu %p ro %p ifp %p " - "alwaysfrag %d fibnum %u\n", __func__, __LINE__, mtu, ro_pmtu, ro, - ifp, alwaysfrag, fibnum)); + ip6_getpmtu(ro_pmtu, ro != ro_pmtu, ifp, &ip6->ip6_dst, &mtu, fibnum, + *nexthdrp); + KASSERT(mtu > 0, ("%s:%d: mtu %ld, ro_pmtu %p ro %p ifp %p fibnum %u", + __func__, __LINE__, mtu, ro_pmtu, ro, ifp, fibnum)); /* * The caller of this function may specify to use the minimum MTU @@ -1121,20 +1118,13 @@ passout: * Send the packet to the outgoing interface. * If necessary, do IPv6 fragmentation before sending. * - * The logic here is rather complex: - * 1: normal case (dontfrag == 0, alwaysfrag == 0) + * 1: normal case (dontfrag == 0) * 1-a: send as is if tlen <= path mtu * 1-b: fragment if tlen > path mtu * * 2: if user asks us not to fragment (dontfrag == 1) * 2-a: send as is if tlen <= interface mtu * 2-b: error if tlen > interface mtu - * - * 3: if we always need to attach fragment header (alwaysfrag == 1) - * always fragment - * - * 4: if dontfrag == 1 && alwaysfrag == 1 - * error, as we cannot handle this conflicting request. */ sw_csum = m->m_pkthdr.csum_flags; if (!hdrsplit) { @@ -1157,14 +1147,9 @@ passout: dontfrag = 1; else dontfrag = 0; - if (dontfrag && alwaysfrag) { /* Case 4. */ - /* Conflicting request - can't transmit. */ - error = EMSGSIZE; - goto bad; - } if (dontfrag && tlen > IN6_LINKMTU(ifp) && !tso) { /* Case 2-b. */ /* - * Even if the DONTFRAG option is specified, we cannot send the + * If the DONTFRAG option is specified, we cannot send the * packet when the data length is larger than the MTU of the * outgoing interface. * Notify the error by sending IPV6_PATHMTU ancillary data if @@ -1178,7 +1163,7 @@ passout: } /* Transmit packet without fragmentation. */ - if (dontfrag || (!alwaysfrag && tlen <= mtu)) { /* Cases 1-a and 2-a. */ + if (dontfrag || tlen <= mtu) { /* Cases 1-a and 2-a. */ struct in6_ifaddr *ia6; ip6 = mtod(m, struct ip6_hdr *); @@ -1194,7 +1179,7 @@ passout: goto done; } - /* Try to fragment the packet. Cases 1-b and 3. */ + /* Try to fragment the packet. Case 1-b. */ if (mtu < IPV6_MMTU) { /* Path MTU cannot be less than IPV6_MMTU. */ error = EMSGSIZE; @@ -1478,9 +1463,10 @@ ip6_getpmtu_ctl(u_int fibnum, const struct in6_addr *dst, u_long *mtup) NET_EPOCH_ENTER(et); nh = fib6_lookup(fibnum, &kdst, scopeid, NHR_NONE, 0); - if (nh != NULL) - error = ip6_calcmtu(nh->nh_ifp, dst, nh->nh_mtu, mtup, NULL, 0); - else + if (nh != NULL) { + ip6_calcmtu(nh->nh_ifp, dst, nh->nh_mtu, mtup, 0); + error = 0; + } else error = EHOSTUNREACH; NET_EPOCH_EXIT(et); @@ -1494,13 +1480,12 @@ ip6_getpmtu_ctl(u_int fibnum, const struct in6_addr *dst, u_long *mtup) * inside @ro_pmtu to avoid subsequent route lookups after packet * filter processing. * - * Stores mtu and always-frag value into @mtup and @alwaysfragp. - * Returns 0 on success. + * Stores mtu into @mtup. */ -static int +static void ip6_getpmtu(struct route_in6 *ro_pmtu, int do_lookup, struct ifnet *ifp, const struct in6_addr *dst, u_long *mtup, - int *alwaysfragp, u_int fibnum, u_int proto) + u_int fibnum, u_int proto) { struct nhop_object *nh; struct in6_addr kdst; @@ -1544,65 +1529,41 @@ ip6_getpmtu(struct route_in6 *ro_pmtu, int do_lookup, if (ro_pmtu != NULL && ro_pmtu->ro_nh != NULL) mtu = ro_pmtu->ro_nh->nh_mtu; - return (ip6_calcmtu(ifp, dst, mtu, mtup, alwaysfragp, proto)); + ip6_calcmtu(ifp, dst, mtu, mtup, proto); } /* * Calculate MTU based on transmit @ifp, route mtu @rt_mtu and * hostcache data for @dst. - * Stores mtu and always-frag value into @mtup and @alwaysfragp. - * - * Returns 0 on success. + * Stores mtu into @mtup. */ -static int +static void ip6_calcmtu(struct ifnet *ifp, const struct in6_addr *dst, u_long rt_mtu, - u_long *mtup, int *alwaysfragp, u_int proto) + u_long *mtup, u_int proto) { u_long mtu = 0; - int alwaysfrag = 0; - int error = 0; if (rt_mtu > 0) { - u_int32_t ifmtu; - struct in_conninfo inc; - - bzero(&inc, sizeof(inc)); - inc.inc_flags |= INC_ISIPV6; - inc.inc6_faddr = *dst; - - ifmtu = IN6_LINKMTU(ifp); + /* Skip the hostcache if the protocol handles PMTU changes. */ + if (proto != IPPROTO_TCP && proto != IPPROTO_SCTP) { + struct in_conninfo inc = { + .inc_flags = INC_ISIPV6, + .inc6_faddr = *dst, + }; - /* TCP is known to react to pmtu changes so skip hc */ - if (proto != IPPROTO_TCP) mtu = tcp_hc_getmtu(&inc); + } if (mtu) mtu = min(mtu, rt_mtu); else mtu = rt_mtu; - if (mtu == 0) - mtu = ifmtu; - else if (mtu < IPV6_MMTU) { - /* - * RFC2460 section 5, last paragraph: - * if we record ICMPv6 too big message with - * mtu < IPV6_MMTU, transmit packets sized IPV6_MMTU - * or smaller, with framgent header attached. - * (fragment header is needed regardless from the - * packet size, for translators to identify packets) - */ - alwaysfrag = 1; - mtu = IPV6_MMTU; - } - } else if (ifp) { + } + + if (mtu == 0) mtu = IN6_LINKMTU(ifp); - } else - error = EHOSTUNREACH; /* XXX */ *mtup = mtu; - if (alwaysfragp) - *alwaysfragp = alwaysfrag; - return (error); } /* From nobody Wed Aug 13 04:14:46 2025 X-Original-To: dev-commits-src-main@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 4c1w4x3LF8z64rN9; Wed, 13 Aug 2025 04:14:57 +0000 (UTC) (envelope-from philip@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1w4x2m2fz3BmT; Wed, 13 Aug 2025 04:14:57 +0000 (UTC) (envelope-from philip@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755058497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FFDZhlT5kc5046hrAwRcf7KiEtKXxOEU8Ag+Oy/X614=; b=aXuErTi+6p7iO4DGaThu6j/IPnteJ/yGKvwIY7zdCRF0QZQMNrvBNzvLTlXQbI8Ka3ACTA XunsjX0Jds6EvI0wXvIhT5Nd/5erldNrnAmfdzBfV9bQcDxccD4K/p2/kfXJMGt7LOk4t4 vsRqec/OY8NI8eRCyFSD6KVVOnLjtEuiZrzZwYQj54ENcrHVVd4E61vDzRVsQ8TR3D9Y68 vhOf7tj/uKdWukh2RrPg6cXPoi1Bw+1djSE4OD0gEEdzRQ9Kxo0Q0+9g1t0qpdZKPAmoeM fKA3j+/yCxcRKpdIy9hQMkLFOIuiokYcqseVpW+iX+31qtYkYFgKx/lZYEcpDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755058497; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FFDZhlT5kc5046hrAwRcf7KiEtKXxOEU8Ag+Oy/X614=; b=Alusa/2srFwD9P7ZB1szoivj6hHJjUN8oPaBVLJvjK6LKt+NhzxVp8rCkB3ckFypkSulve /Ctviiqb2N96Smp0KT62HlmSQ88yJf0qlVHoMC8Pewu8/wwPD3bBx5mA+/6hMd0laHIp6m K+Fr+onPg1TDYPhqfNyg/jKnP7Dz6IlfdDCCxEaScsuRXMvkr2SPP3iUP14LPIaJvkMj3I ZjZrI1fn2jG2kNy6YIGNyIJCsCyk8s0W+0LP9uHqWFGyFHuiQFy/oQlAuXN5GmbbvfPwGJ gbpNYpq0TFdYfuzfkyhMBd1Cq8UBAZz1PQ2FuMIqICd+OQSdu0lJpPrBK1nr2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755058497; a=rsa-sha256; cv=none; b=b3LojHgjmYX/g8sMap1loqAe67LmODjUC6yP5KucZ5VNIjxZLgzkWBN87zREVOR/7UrwOt laww10NNk6G/PMCMeEt62HlSMZTDBGJexq0wOMEbT9IbTRZGrKi80ZcbX+q5vrRJXSdwVX 4JplRHHJgpprbMcNnuGilaQEKqF2BBsMyn26hT12wTb9uu+jNdtSiJOkt871WrLfgaI2g/ UgZE0W+RvUSSHxg/sTb810NavBPn5C27mcTEvSBX1i9EeCYQWd1VrnmlTUDs4b9Eu1rdk2 0k/P7oj/Ma10/26u2nyhBNE90TuKFTtoKU/TVHEcYEhq8Z78v8ldxmJ87W5iYA== Received: from fauth-a1-smtp.messagingengine.com (fauth-a1-smtp.messagingengine.com [103.168.172.200]) (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) (Authenticated sender: philip/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4c1w4x1mfCz122p; Wed, 13 Aug 2025 04:14:57 +0000 (UTC) (envelope-from philip@freebsd.org) Received: from phl-compute-10.internal (phl-compute-10.internal [10.202.2.50]) by mailfauth.phl.internal (Postfix) with ESMTP id 98FC7F40067; Wed, 13 Aug 2025 00:14:56 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-10.internal (MEProxy); Wed, 13 Aug 2025 00:14:56 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgddufeejvddvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggujghofgesthdtredttdervdenucfhrhhomheprfhhihhl ihhpucfrrggvphhsuceophhhihhlihhpsehfrhgvvggsshgurdhorhhgqeenucggtffrrg htthgvrhhnpeethfekfedvudeggedvudevjeekheefvdehtdffheduhedttedvffekveff jedtudenucffohhmrghinhepfhhrvggvsghsugdrohhrghenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehphhhilhhiphdomhgvshhmthhprghu thhhphgvrhhsohhnrghlihhthidqudduieeivdeivdegkedqvdefhedukedttdekqdhphh hilhhipheppehfrhgvvggsshgurdhorhhgsehtrhhouhgslhgvrdhishdpnhgspghrtghp thhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepkhgvvhgrnhhssehfrh gvvggsshgurdhorhhgpdhrtghpthhtohepshhrtgdqtghomhhmihhtthgvrhhssehfrhgv vggsshgurdhorhhgpdhrtghpthhtohepuggvvhdqtghomhhmihhtshdqshhrtgdqrghllh esfhhrvggvsghsugdrohhrghdprhgtphhtthhopeguvghvqdgtohhmmhhithhsqdhsrhgt qdhmrghinhesfhhrvggvsghsugdrohhrgh X-ME-Proxy: Feedback-ID: ia691475d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Aug 2025 00:14:54 -0400 (EDT) Date: Wed, 13 Aug 2025 12:14:46 +0800 From: Philip Paeps To: Kyle Evans Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: babab49eee94 - main - chroot: don't setgroups() without -G having been specified Message-ID: Mail-Followup-To: Kyle Evans , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202508121230.57CCUuHn045783@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <202508121230.57CCUuHn045783@gitrepo.freebsd.org> X-PGP-Fingerprint: B851 CD3A C248 F2ED 3E2C C18C BB6D 8A14 AFE7 D96B X-Date: Today is Setting Orange, the 6th day of Bureaucracy in the YOLD 3191 X-Phase-of-Moon: The Moon is Waning Gibbous (82% of Full) X-Clacks-Overhead: GNU Terry Pratchett Organization: Happily Disorganized User-Agent: Mutt/2.2.14 (2025-02-20) On 2025-08-12 12:30:56 (+0000), Kyle Evans wrote: >The branch main has been updated by kevans: > >URL: https://cgit.FreeBSD.org/src/commit/?id=babab49eee9472f628d774996de13d13d296c8c0 > >commit babab49eee9472f628d774996de13d13d296c8c0 >Author: Kyle Evans >AuthorDate: 2025-08-12 12:14:38 +0000 >Commit: Kyle Evans >CommitDate: 2025-08-12 12:30:23 +0000 > > chroot: don't setgroups() without -G having been specified > > We previously would not have setgroups() at all, but now we would drop > our supplementary groups every time. This broke chroot -n, probably > among other things. We need tests here, but lets unbreak things first. > > A future change may try to setgroups(2) when -u is specified in addition > to -G, so predicate the call on gidlist and don't populate that without > a grouplist. > > PR: 288751 > Fixes: 48fd05999b0f ("chroot: don't clobber the egid [...]") Thank you! This made the FreeBSD-kmods builds happy again. :) Philip From nobody Wed Aug 13 07:00:22 2025 X-Original-To: dev-commits-src-main@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 4c1zlp494bz647lv; Wed, 13 Aug 2025 07:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1zlp38q5z3VLl; Wed, 13 Aug 2025 07:00:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755068422; 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=m2GKolM8984pa194/OxsuJKH9oGmy6VJRgY6aSGfOB0=; b=gWQo5U7mSX9J5/Yg1fSILLP/hgb8zpxk8B62r7hAzImM4url0SNhewidh8kP+sxtq/kK3S OERA9+Q1TAUoC/0YPs7IzAr66ATrMnAbWCMypnNHqRPe46JwLFfoqTPwpSedwhQNvW5c1a xCBJ9VO7vqkdAthSlwQ/Kqy+zfV3W+9b6iaCq6Drrf1ikHnE4f2ZkDe3o5uFYwaK18OtSO qIRj9XPmf1+Av8zDrV0yr6lLicIgMfRi+gLih6ttJNM/RcYmn0V2nx7nk0sJE+pbD+usEm qY0WRby+Wtsd1C/Z4Y8Kv3PEOJjBWfKdtTjDioqaj/Kz+2F9nXJdeodCR1jkrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755068422; 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=m2GKolM8984pa194/OxsuJKH9oGmy6VJRgY6aSGfOB0=; b=xFAXHV1QRJGHjehMcCj5X+CVoRVxR4G5M/uIlpScQ9//qWY8ZGhK/XQnTsoMbtJDdDe3M2 LwZaL5pdiNXUbV1cYJgYpftuycMBq8vR5XzUsxvSbetKWAoSf91lKW3iOsxxExdtkSgj0D 0p84tK0js4EN9QGLd9ODX/0a7Nn3DoGpjSe0Opwgvev0zwz3esonVf3XVynMqz7pHV5Mw6 oSszRsm/di60kS09uCMJmJuEG1E1gGhPpptVs6tZFwO3/sLZpCIXfpkC13XLelYPpl4+Eq NJsQ5h5rHepFnIJUvrRAofo38aT5SLJj2j3rxJQYaNBk1pnc0SDmQrbL4o72Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755068422; a=rsa-sha256; cv=none; b=sDR+2q2rjZpYc50vmMYEwPxlo7+WFU4zvgxUL46LVsMYYKiM+u++KfkIvFHfLvi6icSIew IME7cZpxa79r8S/SEAbRVWOP8XBgrCuVSwAPfDm+b5L3O1ZjYPggpwoDdNl42R2rovvfo9 YYugjUKZw8AzAcVXyZRCQivL/BQKhfHdUothRScIKRX95HrJCnkkZWAvkRyfpVMCYroZRr ci+DXN8mr6TzDlHgnuvAi1DSoDc3hJtsuraXDcsksKX9fAcvAjGnFPnrcl1dmwtni6CDqE a+8WjU2/dBsnuSTx9gZ3GBjiZFGO221UDdu2jTcLfaybt4y+L23srpL30rklLA== 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 4c1zlp26DTz1BvF; Wed, 13 Aug 2025 07:00: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 57D70M3d040858; Wed, 13 Aug 2025 07:00:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57D70Mew040856; Wed, 13 Aug 2025 07:00:22 GMT (envelope-from git) Date: Wed, 13 Aug 2025 07:00:22 GMT Message-Id: <202508130700.57D70Mew040856@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: 2b068d35de84 - main - netstat: report undelivered multi and broadcast UDP packets correctly List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 2b068d35de84975ea4b04a19413786663a51dc70 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=2b068d35de84975ea4b04a19413786663a51dc70 commit 2b068d35de84975ea4b04a19413786663a51dc70 Author: Michael Tuexen AuthorDate: 2025-08-13 06:57:04 +0000 Commit: Michael Tuexen CommitDate: 2025-08-13 06:57:04 +0000 netstat: report undelivered multi and broadcast UDP packets correctly When reporting undelivered broadcast/multicast datagrams, don't just report the undelivered broadcast ones. Actually report the sum of both. Alternatively, one could also report broadcast and multicast datagrams separately, but that would change the output format of netstat. While there, use the correct type for casting a variable printed with %ju. Reviewed by: cc MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D51881 --- usr.bin/netstat/inet.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 3c4d6d4b62f9..7014f02032c2 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -904,7 +904,7 @@ void udp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) { struct udpstat udpstat; - uint64_t delivered; + uint64_t delivered, noportbmcast; #ifdef INET6 if (udp_done != 0) @@ -937,8 +937,11 @@ udp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) "{N:/with no checksum}\n"); p1a(udps_noport, "{:dropped-no-socket/%ju} " "{N:/dropped due to no socket}\n"); - p(udps_noportbcast, "{:dropped-broadcast-multicast/%ju} " - "{N:/broadcast\\/multicast datagram%s undelivered}\n"); + noportbmcast = udpstat.udps_noportmcast + udpstat.udps_noportbcast; + if (noportbmcast || sflag <= 1) + xo_emit("\t{:dropped-broadcast-multicast/%ju} " + "{N:/broadcast\\/multicast datagram%s undelivered}\n", + (uintmax_t)noportbmcast, plural(noportbmcast)); p1a(udps_fullsock, "{:dropped-full-socket-buffer/%ju} " "{N:/dropped due to full socket buffers}\n"); p1a(udpps_pcbhashmiss, "{:not-for-hashed-pcb/%ju} " @@ -951,7 +954,7 @@ udp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) udpstat.udps_fullsock; if (delivered || sflag <= 1) xo_emit("\t{:delivered-packets/%ju} {N:/delivered}\n", - delivered); + (uintmax_t)delivered); p(udps_opackets, "{:output-packets/%ju} {N:/datagram%s output}\n"); /* the next statistic is cumulative in udps_noportbcast */ p(udps_filtermcast, "{:multicast-source-filter-matches/%ju} " From nobody Wed Aug 13 07:08:22 2025 X-Original-To: dev-commits-src-main@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 4c1zx26fCWz649T9; Wed, 13 Aug 2025 07:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c1zx26L0Wz3WPg; Wed, 13 Aug 2025 07:08:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755068902; 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=/e2aEwzq73M5hj9+KKeug3aRyi2/PRc8m45gl2lBd9M=; b=iNegz1xmZOqg/9GvDnKy2qQaoOXhdEOmDSLOp4vmd+i+3ah0+fsje2wwEi5kIV6mRnd1WE lxjwjQNl+WlkbTDFhI9Ys846f7Qb7rrVaRTRT3ScqqjBhGSxbkJMeG2cjr6JQaOugAXX/Q N9dEEEDCgZJyONiy2ZM1CzVYNsQQPf+4cKyPJ1Q/3phu+m7nynKNBw20R1lNa3rQ/o7XqQ Ptka+eevrhAMAWnWcLiBhgUo/BWKmSpMCYJnesbkQIi1G6SAANzqNpTW8zYhvKWXHLfxHo 1f0DEb60hOrR1JEMOrT6ayVv6jSGfU6HK8A48g3Mwrk+KD1/mSsIBAgQYfhOgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755068902; 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=/e2aEwzq73M5hj9+KKeug3aRyi2/PRc8m45gl2lBd9M=; b=qIXRKoMAb5ECCybmDdenijdYLcnqbMum1PkGxcULY56cqTFajShyawBNBFhgLKAaPltqNv IHhhp6W8RqCMsOMayPWKOcA1vlGAYhnVOfMub569VT23wzjX6SZftbcSbUtpndYzVx5tcV UsWQYXocEmKlHdXXWrFnIEPBjQM4Vw0zsm+VvOSH9/W39MLFGrr37jIj8aQZkAn1Fa9+w4 an9QbHbqpdu2/zd1Bij6at/y/wYWZCLZzMg/FEo6sUONgPR9pCTkO96RnB4ZB46P3au8x5 pa3WhDB60mr91e7qiYUNIxeDd4e7rApkdn9UnlitlQknfjFoyk3eBGdV0H8YHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755068902; a=rsa-sha256; cv=none; b=xlPaXNUYCBVqnZ4GqfMTpOdAYxmNPEVu/0MNYpNYn7MdGkvAQ/LnRiCoaSSwO4TGpHMBCK s+3hQd6bMU1tdMH7t79l5GZxDP/BAv6d0T35UNmPDmun7f6239qYpEKXvzBhRYcyxoc/CS O7OAXx8Mrb3vFft1qQIlTrQs2otew7i+ZyM19aWL3caKqJV6yxSxJX+El7yVUhak86sHyR AVTCbQyTAe0SN5lC/jPhgsilxVBcJmcI63Z3eYlz++iNHgAz78JIP0Jmpl28cCYQcGKGGR U2Qt4i2HmIZJw81vDHMxvRZO3dbaPtiHG9tTCMdt0RFigygYdXaAjzD14EPI+w== 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 4c1zx25pqFz1Bjr; Wed, 13 Aug 2025 07:08: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 57D78MYX050133; Wed, 13 Aug 2025 07:08:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57D78Mis050130; Wed, 13 Aug 2025 07:08:22 GMT (envelope-from git) Date: Wed, 13 Aug 2025 07:08:22 GMT Message-Id: <202508130708.57D78Mis050130@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: 4f766afc1ca0 - main - tcopy: Refactor and add support for SIMH-TAPFILES List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f766afc1ca0595fcabafe4dbc61974bb81bfbfe Auto-Submitted: auto-generated The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=4f766afc1ca0595fcabafe4dbc61974bb81bfbfe commit 4f766afc1ca0595fcabafe4dbc61974bb81bfbfe Author: Poul-Henning Kamp AuthorDate: 2025-08-13 07:03:47 +0000 Commit: Poul-Henning Kamp CommitDate: 2025-08-13 07:06:45 +0000 tcopy: Refactor and add support for SIMH-TAPFILES See manpage for new features. Preliminary review by: imp --- usr.bin/tcopy/Makefile | 4 +- usr.bin/tcopy/tcopy.1 | 195 +++++++++--- usr.bin/tcopy/tcopy.c | 338 -------------------- usr.bin/tcopy/tcopy.cc | 837 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 994 insertions(+), 380 deletions(-) diff --git a/usr.bin/tcopy/Makefile b/usr.bin/tcopy/Makefile index 73dcd45b2e0f..831de7625db8 100644 --- a/usr.bin/tcopy/Makefile +++ b/usr.bin/tcopy/Makefile @@ -1,4 +1,4 @@ -PROG= tcopy -LIBADD= util +PROG_CXX= tcopy +LIBADD= util .include diff --git a/usr.bin/tcopy/tcopy.1 b/usr.bin/tcopy/tcopy.1 index 3f12a807e41e..f74a29ba1173 100644 --- a/usr.bin/tcopy/tcopy.1 +++ b/usr.bin/tcopy/tcopy.1 @@ -30,65 +30,189 @@ .Os .Sh NAME .Nm tcopy -.Nd copy and/or verify mag tapes +.Nd read, write, copy and verify tapes .Sh SYNOPSIS .Nm -.Op Fl cvx +.Op Fl crvx +.Op Fl l Ar logfile .Op Fl s Ar maxblk .Oo Ar src Op Ar dest .Oc .Sh DESCRIPTION The .Nm -utility is designed to copy magnetic tapes. +utility is designed to read, write and copy tapes. +.Pp The only assumption made about the tape layout is that there are two sequential EOF marks at the end. -By default, the -.Nm -utility will print -information about the sizes of records and files found -on the +.Pp +The +.Ar src +argument can be a tape device and defaults to .Pa /dev/sa0 -tape, or on the tape specified by the +or it can be data in SIMH-TAP format. +If +.Ar src +is +.Dq Cm - +the standard input is read. +.Pp +If the +.Ar dest +argument is also specified, a copy of the .Ar src -argument. -If a destination tape is also specified by the +will be made onto the +.Ar dest . +If +.Ar dest +is +.Dq Cm - +standard output will be written to. +.Pp +If .Ar dest -argument, a copy of the source tape will be made. -The blocking on the -destination tape will be identical to that used on the source tape. -Copying -a tape will yield the same program output as if just printing the sizes. +is a tape device, the file and record structure will be the same. +.Pp +If +.Ar dest +is a filename ending in +.Dq Cm .000 +the contents each file on +.Ar src +will be written to sequentially numbered files +.Dq Cm .000 , +.Dq Cm .001 , +.Dq Cm .002 +etc. +Information about record sizes will be lost. +.Pp +If the +.Fl r +flag is specified, only the data will be written, information about +file and record layout is lost. +.Pp +Otherwise the data, file and record structure of +.Ar src +will be written in SIMH-TAP format. +.Pp +The +.Nm +utility will report information about the layout of +.Ar src +like this on standard output: +.Bd -literal -offset indent +file 0: block size 80: 6 records +file 0: eof after 6 records: 480 bytes +file 1: block size 3072: records 0 to 262 +file 1: block size 612: record 262 +file 1: eof after 263 records: 805476 bytes +[…] +eot +total length: 972851280 bytes time: 41 s rate: 22934.8 kB/s +.Ed +.Pp +If +.Ar dest +is +.Dq Cm - +or if +.Fl x +is specified this goes to standard error instead, +and can also be redirected with +.Fl l Ar logfile , +in which case the final total line will also be reported on standard error. +.Pp +If +.Nm +receives a +.Dv SIGINFO +signal, current counts are reported on standard error. .Pp The following options are available: .Bl -tag -width ".Fl s Ar maxblk" .It Fl c -Copy +Rewind both tapes, copy .Ar src to -.Ar dest -and then verify that the two tapes are identical. +.Ar dest , +rewind again and verify that the two tapes are now identical. +.It Fl l Ar logfile +Output all informational messages to +.Ar logfile . +.It Fl r +Write only the contents of all data blocks to the output. +The file and record structure of the input will be lost. .It Fl s Ar maxblk Specify a maximum block size, .Ar maxblk . +The default is +.Va kern.maxphys . .It Fl v -Given the two tapes +Verify that .Ar src and -.Ar dest , -verify that they are identical. +.Ar dest +are identical. +Note that the tapes are not rewound prior to the comparison. .It Fl x Output all informational messages to the standard error instead of the standard output. -This option is useful when +This option is automatic if .Ar dest is given as -.Pa /dev/stdout . +.Dq Cm - . .El +.Sh EXIT STATUS +Unfortunately all over the place, but zero always means succeess. +.Sh EXAMPLES +Verify that the tape in /dev/sa0 can be read and see the layout +of its content: +.Bd -literal -offset indent +tcopy +.Ed +.Pp +Copy a tape using two tape drives: +.Bd -literal -offset indent +tcopy /dev/sa0 /dev/sa1 +.Ed +.Pp +Copy a tape using only a single tape drive, and verify the result: +.Bd -literal -offset indent +tcopy /dev/sa0 /tmp/temp.tapfile +# change tape +tcopy -c /tmp/temp.tapfile /dev/sa0 +.Ed +.Pp +Make a cryptographic hash of both the contents and the layout of the tape in +/dev/sa1: +.Pp +.Bd -literal -offset indent +tcopy /dev/sa1 - | sha256 +.Ed +.Pp +Copy a tape to a tape drive on another machine: +.Bd -literal -offset indent +tcopy /dev/sa0 - | ssh otherhost tcopy - /dev/sa0 +.Ed +.Pp +Extract the tape files into individual files: +.Bd -literal -offset indent +tcopy /dev/sa0 /tmp/_.tape.000 +.Ed +.Pp +Ignore all structure on the tape and feed all data to +.Xr tar 1 : +.Bd -literal -offset indent +tcopy -l /dev/null -r /dev/sa0 - | tar tvf - +.Ed .Sh SEE ALSO .Xr mt 1 , +.Xr sa 4 , .Xr mtio 4 +.Sh STANDARDS +The SIMH-TAP format is documented in the open-simh github repos: +.Pa https://github.com/open-simh/simh/blob/master/doc/simh_magtape.doc .Sh HISTORY The .Nm @@ -99,19 +223,16 @@ command appeared in .It Modern tape drives may return a SCSI "Incorrect Length Indicator (ILI)" for each read with a different block size that what is on the -tape, and that slows things down a lot. +tape, and that slows +.Nm +down a lot. This can be disabled with the .Xr mt 1 command: .Bd -literal -offset indent -$ mt param sili -s 1 +mt param sili -s 1 .Ed .It -Writing an image of a tape to a file does not preserve much more than -the raw data. -Block size(s) and tape EOF marks are lost which would -otherwise be preserved in a tape-to-tape copy. -.It End of data (EOD) is determined by two sequential EOF marks with no data between them. There used to be old systems which typically wrote three EOF's between tape @@ -120,13 +241,7 @@ The .Nm utility will erroneously stop copying early in this case. .It -When using the copy/verify option -.Fl c , -.Nm -does not rewind the tapes prior to start. -A rewind is performed -after writing, prior to the verification stage. -If one does not start -at the beginning-of-tape (BOT) then the comparison -may not be of the intended data. +With +.Fl c +the tape drives are not rewound at the same time, but one after the other. .El diff --git a/usr.bin/tcopy/tcopy.c b/usr.bin/tcopy/tcopy.c deleted file mode 100644 index 39eae4126324..000000000000 --- a/usr.bin/tcopy/tcopy.c +++ /dev/null @@ -1,338 +0,0 @@ -/*- - * SPDX-License-Identifier: BSD-3-Clause - * - * Copyright (c) 1985, 1987, 1993 - * The Regents of the University of California. All rights reserved. - * - * 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. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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 -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define MAXREC (64 * 1024) -#define NOCOUNT (-2) - -static int filen, guesslen, maxblk = MAXREC; -static uint64_t lastrec, record, size, tsize; -static FILE *msg; - -static void *getspace(int); -static void intr(int); -static void usage(void) __dead2; -static void verify(int, int, char *); -static void writeop(int, int); -static void rewind_tape(int); - -int -main(int argc, char *argv[]) -{ - int lastnread, nread, nw, inp, outp; - enum {READ, VERIFY, COPY, COPYVERIFY} op = READ; - sig_t oldsig; - int ch, needeof; - char *buff; - const char *inf; - unsigned long maxphys = 0; - size_t l_maxphys = sizeof maxphys; - uint64_t tmp; - - if (!sysctlbyname("kern.maxphys", &maxphys, &l_maxphys, NULL, 0)) - maxblk = maxphys; - - msg = stdout; - guesslen = 1; - outp = -1; - while ((ch = getopt(argc, argv, "cs:vx")) != -1) - switch((char)ch) { - case 'c': - op = COPYVERIFY; - break; - case 's': - if (expand_number(optarg, &tmp)) { - warnx("illegal block size"); - usage(); - } - maxblk = tmp; - if (maxblk == 0) { - warnx("illegal block size"); - usage(); - } - guesslen = 0; - break; - case 'v': - op = VERIFY; - break; - case 'x': - msg = stderr; - break; - case '?': - default: - usage(); - } - argc -= optind; - argv += optind; - - switch(argc) { - case 0: - if (op != READ) - usage(); - inf = _PATH_DEFTAPE; - break; - case 1: - if (op != READ) - usage(); - inf = argv[0]; - break; - case 2: - if (op == READ) - op = COPY; - inf = argv[0]; - if ((outp = open(argv[1], op == VERIFY ? O_RDONLY : - op == COPY ? O_WRONLY : O_RDWR, DEFFILEMODE)) < 0) - err(3, "%s", argv[1]); - break; - default: - usage(); - } - - if ((inp = open(inf, O_RDONLY, 0)) < 0) - err(1, "%s", inf); - - buff = getspace(maxblk); - - if (op == VERIFY) { - verify(inp, outp, buff); - exit(0); - } - - if ((oldsig = signal(SIGINT, SIG_IGN)) != SIG_IGN) - (void) signal(SIGINT, intr); - - needeof = 0; - for (lastnread = NOCOUNT;;) { - if ((nread = read(inp, buff, maxblk)) == -1) { - while (errno == EINVAL && (maxblk -= 1024)) { - nread = read(inp, buff, maxblk); - if (nread >= 0) - goto r1; - } - err(1, "read error, file %d, record %ju", filen, (intmax_t)record); - } else if (nread != lastnread) { - if (lastnread != 0 && lastnread != NOCOUNT) { - if (lastrec == 0 && nread == 0) - fprintf(msg, "%ju records\n", (intmax_t)record); - else if (record - lastrec > 1) - fprintf(msg, "records %ju to %ju\n", - (intmax_t)lastrec, (intmax_t)record); - else - fprintf(msg, "record %ju\n", (intmax_t)lastrec); - } - if (nread != 0) - fprintf(msg, "file %d: block size %d: ", - filen, nread); - (void) fflush(stdout); - lastrec = record; - } -r1: guesslen = 0; - if (nread > 0) { - if (op == COPY || op == COPYVERIFY) { - if (needeof) { - writeop(outp, MTWEOF); - needeof = 0; - } - nw = write(outp, buff, nread); - if (nw != nread) { - if (nw == -1) { - warn("write error, file %d, record %ju", filen, - (intmax_t)record); - } else { - warnx("write error, file %d, record %ju", filen, - (intmax_t)record); - warnx("write (%d) != read (%d)", nw, nread); - } - errx(5, "copy aborted"); - } - } - size += nread; - record++; - } else { - if (lastnread <= 0 && lastnread != NOCOUNT) { - fprintf(msg, "eot\n"); - break; - } - fprintf(msg, - "file %d: eof after %ju records: %ju bytes\n", - filen, (intmax_t)record, (intmax_t)size); - needeof = 1; - filen++; - tsize += size; - size = record = lastrec = 0; - lastnread = 0; - } - lastnread = nread; - } - fprintf(msg, "total length: %ju bytes\n", (intmax_t)tsize); - (void)signal(SIGINT, oldsig); - if (op == COPY || op == COPYVERIFY) { - writeop(outp, MTWEOF); - writeop(outp, MTWEOF); - if (op == COPYVERIFY) { - rewind_tape(outp); - rewind_tape(inp); - verify(inp, outp, buff); - } - } - exit(0); -} - -static void -verify(int inp, int outp, char *outb) -{ - int eot, inmaxblk, inn, outmaxblk, outn; - char *inb; - - inb = getspace(maxblk); - inmaxblk = outmaxblk = maxblk; - for (eot = 0;; guesslen = 0) { - if ((inn = read(inp, inb, inmaxblk)) == -1) { - if (guesslen) - while (errno == EINVAL && (inmaxblk -= 1024)) { - inn = read(inp, inb, inmaxblk); - if (inn >= 0) - goto r1; - } - warn("read error"); - break; - } -r1: if ((outn = read(outp, outb, outmaxblk)) == -1) { - if (guesslen) - while (errno == EINVAL && (outmaxblk -= 1024)) { - outn = read(outp, outb, outmaxblk); - if (outn >= 0) - goto r2; - } - warn("read error"); - break; - } -r2: if (inn != outn) { - fprintf(msg, - "%s: tapes have different block sizes; %d != %d.\n", - "tcopy", inn, outn); - break; - } - if (!inn) { - if (eot++) { - fprintf(msg, "tcopy: tapes are identical.\n"); - free(inb); - return; - } - } else { - if (bcmp(inb, outb, inn)) { - fprintf(msg, - "tcopy: tapes have different data.\n"); - break; - } - eot = 0; - } - } - exit(1); -} - -static void -intr(int signo __unused) -{ - if (record) { - if (record - lastrec > 1) - fprintf(msg, "records %ju to %ju\n", (intmax_t)lastrec, (intmax_t)record); - else - fprintf(msg, "record %ju\n", (intmax_t)lastrec); - } - fprintf(msg, "interrupt at file %d: record %ju\n", filen, (intmax_t)record); - fprintf(msg, "total length: %ju bytes\n", (uintmax_t)(tsize + size)); - exit(1); -} - -static void * -getspace(int blk) -{ - void *bp; - - if ((bp = malloc((size_t)blk)) == NULL) - errx(11, "no memory"); - return (bp); -} - -static void -writeop(int fd, int type) -{ - struct mtop op; - - op.mt_op = type; - op.mt_count = (daddr_t)1; - if (ioctl(fd, MTIOCTOP, (char *)&op) < 0) - err(6, "tape op"); -} - -static void -usage(void) -{ - fprintf(stderr, "usage: tcopy [-cvx] [-s maxblk] [src [dest]]\n"); - exit(1); -} - -static void -rewind_tape(int fd) -{ - struct stat sp; - - if(fstat(fd, &sp)) - errx(12, "fstat in rewind"); - - /* - * don't want to do tape ioctl on regular files: - */ - if( S_ISREG(sp.st_mode) ) { - if( lseek(fd, 0, SEEK_SET) == -1 ) - errx(13, "lseek"); - } else - /* assume its a tape */ - writeop(fd, MTREW); -} diff --git a/usr.bin/tcopy/tcopy.cc b/usr.bin/tcopy/tcopy.cc new file mode 100644 index 000000000000..640344758402 --- /dev/null +++ b/usr.bin/tcopy/tcopy.cc @@ -0,0 +1,837 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 Poul-Henning Kamp, + * Copyright (c) 1985, 1987, 1993 + * The Regents of the University of California. All rights reserved. + * + * 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 REGENTS 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 REGENTS 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#define MAXREC (1024 * 1024) +#define NOCOUNT (-2) + +enum operation {READ, VERIFY, COPY, COPYVERIFY}; + +// Stuff the tape_devs need to know about +static int filen; +static uint64_t record; + +//--------------------------------------------------------------------- + +class tape_dev { + size_t max_read_size; +public: + int fd; + char *name; + enum direction {SRC, DST} direction; + + tape_dev(int file_handle, const char *spec, bool destination); + + virtual ssize_t read_blk(void *dst, size_t len); + virtual ssize_t verify_blk(void *dst, size_t len, size_t expected); + virtual void write_blk(const void *src, size_t len); + virtual void file_mark(void); + virtual void rewind(void); +}; + +tape_dev::tape_dev(int file_handle, const char *spec, bool destination) +{ + assert(file_handle >= 0); + fd = file_handle; + name = strdup(spec); + assert(name != NULL); + direction = destination ? DST : SRC; + max_read_size = 0; +} + +ssize_t +tape_dev::read_blk(void *dst, size_t len) +{ + ssize_t retval = -1; + + if (max_read_size == 0) { + max_read_size = len; + while (max_read_size > 0) { + retval = read(fd, dst, max_read_size); + if (retval >= 0 || (errno != EINVAL && errno != EFBIG)) + break; + if (max_read_size < 512) + errx(1, "Cannot find a sane max blocksize"); + + // Reduce to next lower power of two + int i = flsl((long)max_read_size - 1L); + max_read_size = 1UL << (i - 1); + } + } else { + retval = read(fd, dst, (size_t)max_read_size); + } + if (retval < 0) { + err(1, "read error, %s, file %d, record %ju", + name, filen, (uintmax_t)record); + } + return (retval); +} + +ssize_t +tape_dev::verify_blk(void *dst, size_t len, size_t expected) +{ + (void)expected; + return read_blk(dst, len); +} + +void +tape_dev::write_blk(const void *src, size_t len) +{ + assert(len > 0); + ssize_t nwrite = write(fd, src, len); + if (nwrite < 0 || (size_t) nwrite != len) { + if (nwrite == -1) { + warn("write error, file %d, record %ju", + filen, (intmax_t)record); + } else { + warnx("write error, file %d, record %ju", + filen, (intmax_t)record); + warnx("write (%zd) != read (%zd)", nwrite, len); + } + errx(5, "copy aborted"); + } + return; +} + +void +tape_dev::file_mark(void) +{ + struct mtop op; + + op.mt_op = MTWEOF; + op.mt_count = (daddr_t)1; + if (ioctl(fd, MTIOCTOP, (char *)&op) < 0) + err(6, "tape op (write file mark)"); +} + +void +tape_dev::rewind(void) +{ + struct mtop op; + + op.mt_op = MTREW; + op.mt_count = (daddr_t)1; + if (ioctl(fd, MTIOCTOP, (char *)&op) < 0) + err(6, "tape op (rewind)"); +} + +//--------------------------------------------------------------------- + +class tap_file: public tape_dev { +public: + tap_file(int file_handle, const char *spec, bool dst) : + tape_dev(file_handle, spec, dst) {}; + ssize_t read_blk(void *dst, size_t len); + void write_blk(const void *src, size_t len); + void file_mark(void); + virtual void rewind(void); +}; + +static +ssize_t full_read(int fd, void *dst, size_t len) +{ + // Input may be a socket which returns partial reads + + ssize_t retval = read(fd, dst, len); + if (retval <= 0 || (size_t)retval == len) + return (retval); + + char *ptr = (char *)dst + retval; + size_t left = len - (size_t)retval; + while (left > 0) { + retval = read(fd, ptr, left); + if (retval <= 0) + return (retval); + left -= (size_t)retval; + ptr += retval; + } + return ((ssize_t)len); +} + +ssize_t +tap_file::read_blk(void *dst, size_t len) +{ + char lbuf[4]; + + ssize_t nread = full_read(fd, lbuf, sizeof lbuf); + if (nread == 0) + return (0); + + if ((size_t)nread != sizeof lbuf) + err(EX_DATAERR, "Corrupt tap-file, read hdr1=%zd", nread); + + uint32_t u = le32dec(lbuf); + if (u == 0 || (u >> 24) == 0xff) + return(0); + + if (u > len) + err(17, "tapfile blocksize too big, 0x%08x", u); + + size_t alen = (u + 1) & ~1; + assert (alen <= len); + + ssize_t retval = full_read(fd, dst, alen); + if (retval < 0 || (size_t)retval != alen) + err(EX_DATAERR, "Corrupt tap-file, read data=%zd", retval); + + nread = full_read(fd, lbuf, sizeof lbuf); + if ((size_t)nread != sizeof lbuf) + err(EX_DATAERR, "Corrupt tap-file, read hdr2=%zd", nread); + + uint32_t v = le32dec(lbuf); + if (u == v) + return (u); + err(EX_DATAERR, + "Corrupt tap-file, headers differ (0x%08x != 0x%08x)", u, v); +} + +void +tap_file::write_blk(const void *src, size_t len) +{ + struct iovec iov[4]; + uint8_t zero = 0; + int niov = 0; + size_t expect = 0; + char tbuf[4]; + + assert((len & ~0xffffffffULL) == 0); + le32enc(tbuf, (uint32_t)len); + + iov[niov].iov_base = tbuf; + iov[niov].iov_len = sizeof tbuf; + expect += iov[niov].iov_len; + niov += 1; + + iov[niov].iov_base = (void*)(uintptr_t)src; + iov[niov].iov_len = len; + expect += iov[niov].iov_len; + niov += 1; + + if (len & 1) { + iov[niov].iov_base = &zero; + iov[niov].iov_len = 1; + expect += iov[niov].iov_len; + niov += 1; + } + + iov[niov].iov_base = tbuf; + iov[niov].iov_len = sizeof tbuf; + expect += iov[niov].iov_len; + niov += 1; + + ssize_t nwrite = writev(fd, iov, niov); + if (nwrite < 0 || (size_t)nwrite != expect) + errx(17, "write error (%zd != %zd)", nwrite, expect); +} + +void +tap_file::file_mark(void) +{ + char tbuf[4]; + le32enc(tbuf, 0); + ssize_t nwrite = write(fd, tbuf, sizeof tbuf); + if ((size_t)nwrite != sizeof tbuf) + errx(17, "write error (%zd != %zd)", nwrite, sizeof tbuf); +} + +void +tap_file::rewind(void) +{ + off_t where; + if (direction == DST) { + char tbuf[4]; + le32enc(tbuf, 0xffffffff); + ssize_t nwrite = write(fd, tbuf, sizeof tbuf); + if ((size_t)nwrite != sizeof tbuf) + errx(17, + "write error (%zd != %zd)", nwrite, sizeof tbuf); + } + where = lseek(fd, 0L, SEEK_SET); + if (where != 0 && errno == ESPIPE) + err(EX_USAGE, "Cannot rewind sockets and pipes"); + if (where != 0) + err(17, "lseek(0) failed"); +} + +//--------------------------------------------------------------------- + +class file_set: public tape_dev { +public: + file_set(int file_handle, const char *spec, bool dst) : + tape_dev(file_handle, spec, dst) {}; + ssize_t read_blk(void *dst, size_t len); + ssize_t verify_blk(void *dst, size_t len, size_t expected); + void write_blk(const void *src, size_t len); + void file_mark(void); + void rewind(void); + void open_next(bool increment); +}; + +void +file_set::open_next(bool increment) +{ + if (fd >= 0) { + assert(close(fd) >= 0); + fd = -1; + } + if (increment) { + char *p = strchr(name, '\0') - 3; + if (++p[2] == '9') { + p[2] = '0'; + if (++p[1] == '9') { + p[1] = '0'; + if (++p[0] == '9') { + errx(EX_USAGE, + "file-set sequence overflow"); + } + } + } + } + if (direction == DST) { + fd = open(name, O_RDWR|O_CREAT, DEFFILEMODE); + if (fd < 0) + err(1, "Could not open %s", name); + } else { + fd = open(name, O_RDONLY, 0); + } +} *** 493 LINES SKIPPED *** From nobody Wed Aug 13 07:19:49 2025 X-Original-To: dev-commits-src-main@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 4c20BF5Dw7z649vb; Wed, 13 Aug 2025 07:19: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c20BF4cVKz3XCY; Wed, 13 Aug 2025 07:19:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755069589; 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=GlLtKb+kKreLiqdpr4T13PQenc5eNOhwC9/gn0EC3tk=; b=PiHOqy988Zl8yb6M5N8qqfn2X4CW9SZPbNgsZw4F/xtAxcZMgzWaFCFRTK3QjThWdhuhbY PMkghQ792X4jE4EK4UwK86bmeaoieER2hwlQKxyUatSPHs2q0ryGDPddfIFU7iqnJXrZiQ pMa3vnZD8yZrE2smtJz0GOIJLsY5nbExa42V30TmeKCIF1OUNHHG9rELm6eCL3FEWjJKxT chv5bxQFUMGsw24L0KmcC+KHCv918hz8mwsyDNhRKG38eqS111UegNjwzLtchc3L0GHS1v DTKuwyOTdNwzpnMI7wMf2Rs8uTwtSPan4qB8otlvjTu58tl0SOyE+PXXAeK3jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755069589; 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=GlLtKb+kKreLiqdpr4T13PQenc5eNOhwC9/gn0EC3tk=; b=qL+SnGSy33Oa6Cs7Og/iR7gdjpXnITMOeHGLoExat4B8/aeMmXFCt5hAv3T04urAopDNj6 /QNcDDtBUNZTxHTzzpS3YthCyS5GPc/8QDAFqq+xbVGGSXespgpsUXn3lpQ51dLc8j8GXa a/vJ2Q3YHfL52UnmR3GVHdSHEDwO7WO3dwd18VwZNvieW3VmlBrS0m8IEJDx34PwNN0AQp 2KkiDB/IOE/j9cbKHBdngW9Ti2c/q6LSIlZIdBZ0hAp2X1cKlOB8HMLrkDjWgkaOV3oJpa tJ1PuxsrvAbJ5jrzjqeITYW2a/yK6huuHqfLXDo16Xi+RDiS2rSG74KRLvmKrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755069589; a=rsa-sha256; cv=none; b=nZt8rYTbMviXnnfiDavcY7gJ3CzO3BzRDc1+DkixdEf7Yy6DaSLbcvr/m8kpMXLXP4zb9w KZkAY2eaJNVGcvOnZUP8COQAx5tIK3EoW592JrcBl+3tRodg8FrAGQ5vfPgcRJ6vJ6SwT9 fku82GnwAPMB3dz1YHkTvbwEuPXM7kCWVU7J4iafLAxsxKjIu0GYcgukwkvR0JWz104CeL RH2j/bPSJ4f8lWH5kVHHSl00WnU46nKio1tPqpEGLOPBmMbQnFX9Q7jIlRixxEtqLjKITb LDocb7l+ZVW6Tr/8lfK7Wy8SI3i0WhpwFSUF3ba8aJA1whmhOK3sDPaTYS8bpw== 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 4c20BF3ztJz1Cfx; Wed, 13 Aug 2025 07:19: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 57D7JnnE069391; Wed, 13 Aug 2025 07:19:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57D7Jn3D069388; Wed, 13 Aug 2025 07:19:49 GMT (envelope-from git) Date: Wed, 13 Aug 2025 07:19:49 GMT Message-Id: <202508130719.57D7Jn3D069388@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: 406bb67b4fd7 - main - sa(4): Dont talk about minor device numbers: We have had DEVFS for 25 years. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 406bb67b4fd7595b2e833b6e6e7ae3d744dd84fb Auto-Submitted: auto-generated The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=406bb67b4fd7595b2e833b6e6e7ae3d744dd84fb commit 406bb67b4fd7595b2e833b6e6e7ae3d744dd84fb Author: Poul-Henning Kamp AuthorDate: 2025-08-13 07:18:28 +0000 Commit: Poul-Henning Kamp CommitDate: 2025-08-13 07:18:28 +0000 sa(4): Dont talk about minor device numbers: We have had DEVFS for 25 years. --- share/man/man4/sa.4 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/share/man/man4/sa.4 b/share/man/man4/sa.4 index 699a940a34d1..6c948a0f21ab 100644 --- a/share/man/man4/sa.4 +++ b/share/man/man4/sa.4 @@ -82,21 +82,19 @@ the case where a control mode device is opened. In the latter case, exclusive access is only sought when needed (e.g., to set parameters). .Sh SUB-MODES -Bits 0 and 1 of the minor number are interpreted as -.Sq sub-modes . The sub-modes differ in the action taken when the device is closed: .Bl -tag -width XXXX -.It 00 +.It Pa /dev/sa* A close will rewind the device; if the tape has been written, then a file mark will be written before the rewind is requested. The device is unmounted. -.It 01 +.It Pa /dev/nsa* A close will leave the tape mounted. If the tape was written to, a file mark will be written. No other head positioning takes place. Any further reads or writes will occur directly after the last read, or the written file mark. -.It 10 +.It Pa /dev/esa* A close will rewind the device. If the tape has been written, then a file mark will be written before the rewind is requested. From nobody Wed Aug 13 09:11:34 2025 X-Original-To: dev-commits-src-main@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 4c22gB65YKz64PQd; Wed, 13 Aug 2025 09:11: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c22gB35Kfz3lSj; Wed, 13 Aug 2025 09:11:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755076294; 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=OijaNikkCxnXk00MouDVu+qZ/Rh9z34lR7/14x3kNq0=; b=shcVd03jgBa1XPKiayLjVNFn7vNawTN4nXMh68kWUo9k7Tm05YSheY7rCbQGkgNjHiNfIo 3/4awEjNc7Tw0FHUanBA8AyPW2yJ6RYlyYMEt8ybnECgkLJqTfATR38eL3GJV1+OLEkw9u P1p5IXqtAPtLlN5ON9s+JD5OVeCQPXTGfdwZMto8jf2wkOZK6HV0FQBM2Ldf85AIIP6oqC ffKuUkkQJ1fO1Gx/qauli2OYHqLdAkObngoEtCLp5g9Cr8mM1af9qQ+vwFxXW2h7Nlratc 7r9KxAVWDw1Kxfoa4dwn2hBhC8AOcLrGS0ITGrE34m+xMP8QFJgooPTy7mAlyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755076294; 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=OijaNikkCxnXk00MouDVu+qZ/Rh9z34lR7/14x3kNq0=; b=HYu0n+IoRHW21Z/zmIl4sX5wC8ed0hSocHuHO3R5AkPjRh+njEZYQkXlolWFN9EA6BnMnb F++ijA8W53doNTZ/BZiXK9uUFtdv2Q296jPGKDOEhO6+8q/jJb+NIYGtTsErseBI5VEyhm yZ5uNk1+a+dbAxkUtYQJa+jTrEJaRbTtSiKFOLYbySdxg+JKSzoQJKpMcMO6DHdJqjj7/y Mtud9ZvCe9ZvgIut4bgaQXfN4O/7250HzEMl4X4NTdVFDXSe1l8rvUB15bIS+1G65IftYI 7i+EKH0P8iXeOjvBZXWwTs9bh7VFCuyRAx62mBK9TJEgB31/4eHYmaycBbWD9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755076294; a=rsa-sha256; cv=none; b=uRFzTYqkTAFPVqJH7y00EWkputExdd7nbfDFsKADo3vXygPBwsxv8dPH6UBkYSf66j0CEj vHcquwEzQyB5HJQyJcAeMxA57LyjbaUMGJZefRo45Fi0uQ1CzZstfgsREl7npBpyC51OSO wOZNqid39HLQ5nYH05weRSA47lDgq8ydZ/7SoEQ/tu/EyY6f/QkGXM1xWXlN3FltYoSSr0 6aUmt40GkGDJqFVmE2l7DlUB+3qHxKj5Nd6Dbv9Cer+GfjRMefOQkhuUSjQvXxn9ZoT6O2 RICdh+IjddMRAukSiidJYDGLrJtkl7B6T6TF15ykk9JJLNR5dv5enjqAGpAeGw== 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 4c22gB2hN6z1G4h; Wed, 13 Aug 2025 09:11: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 57D9BYSZ089315; Wed, 13 Aug 2025 09:11:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57D9BYfW089312; Wed, 13 Aug 2025 09:11:34 GMT (envelope-from git) Date: Wed, 13 Aug 2025 09:11:34 GMT Message-Id: <202508130911.57D9BYfW089312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: aa0538b997cf - main - tcopy: Fix printf format for 32bit arm List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa0538b997cf55c6f6722a2c38de3d031457e9c8 Auto-Submitted: auto-generated The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=aa0538b997cf55c6f6722a2c38de3d031457e9c8 commit aa0538b997cf55c6f6722a2c38de3d031457e9c8 Author: Poul-Henning Kamp AuthorDate: 2025-08-13 09:11:11 +0000 Commit: Poul-Henning Kamp CommitDate: 2025-08-13 09:11:11 +0000 tcopy: Fix printf format for 32bit arm --- usr.bin/tcopy/tcopy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/tcopy/tcopy.cc b/usr.bin/tcopy/tcopy.cc index 640344758402..62032740a788 100644 --- a/usr.bin/tcopy/tcopy.cc +++ b/usr.bin/tcopy/tcopy.cc @@ -387,7 +387,7 @@ file_set::file_mark(void) int i = ftruncate(fd, where); if (i < 0) - errx(17, "truncate error, %s to %zd", name, where); + errx(17, "truncate error, %s to %jd", name, (intmax_t)where); assert(close(fd) >= 0); fd = -1; } From nobody Wed Aug 13 10:10:18 2025 X-Original-To: dev-commits-src-main@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 4c23yz0S2fz64W4V; Wed, 13 Aug 2025 10:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c23yy6yrmz3twX; Wed, 13 Aug 2025 10:10:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755079819; 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=qSoA6S1yVZ6nS8ylrux/CVMJgdZ8B4vdpYJb/jHKHNY=; b=nxYSRRteyYri7IGsx5/Ji0dHdtejVcATRQoDBD7Cl5Gw6bekfoyMllAJV3zX9DFTwsP2NW H2aVPp+THEEdQ0QrQKWQ4W/jlWFWQgpAxhxPo+mZFBMXNk+q0fL8tT71eHdc3JzH3rUjsM 6B1U71NTAmoyq6peJpqQfBCIyuM5caxsaKB8MOQLvh7WNm0+R0pDNwF/lVZ66MICEBGHPE RxGktYZxPszUccBrssD1tPHJRWe0kEfzz3kVlXakmCyeCr+PwFEbYbaUUWwNr1oEGmNqGL imOE5h5vda2Sn+GUs4luGC5Jk+3vDlROOgLYmKT1VtTJO8dONqR4TiO/WG5MOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755079819; 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=qSoA6S1yVZ6nS8ylrux/CVMJgdZ8B4vdpYJb/jHKHNY=; b=P9kub6LFpqpubIqULIcXhkezdyK0y4ZTPJ+zVSwMpc57uH6zZeW+QCwEwsPFQ/d97dM98e 8DD/zIC0XlgPXjIXMTopUf5yJSCyPJ+eySNreWQRMi25v2NHS6tfGvgJM3peSJwsC/uIWC xc/Rmx7gQfE4UF9HbCNWne3lPzeJAmhPZp1s0Gw40K0DTHRXIg2Rw9CzT1Cw9+BgaoxBco 4PAUwI5UEaC1Fsc4Z9hcVpSUFG22DtkhI4S9sWrn9EIRudOshhIx51zUnap7f4krHaMSDH 1cBxUNxmGw5PYjtMtQOYePfd8AE7Ublu3CTWwUhwKMugAmBmCYtGY6GstBNo7w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755079819; a=rsa-sha256; cv=none; b=NTQHS/wpx7AQhMJcEHn/tr4qzIgD3OW+lXeSgNdtmF9irOu2fMkW1r2x0V88l+5PX6cy6E BY6k2MGjrrtwrrlcF4Kl1f9A95fcblPmwzLBNJeFatDxweaiR2JA37U+LInCKoymJ6Syg0 nh/jGMDEpPYB++V6yZNZ1SJWe4RNJxhLnFFaGmnCtEujtuYylOpRtUkRrof5vHT+cV3LRk uL0NjN1cQvmP6+oNv/GtJ6Q3lMOs8AFDtfbDCD3+qw3aaUVgSXwJVNaXBbNE9G2gyABH09 sBhh3ZuKpv4s7e9Bnj4pyzWuwRClzIPgFywaGfOaXvi/sJ/x92XSc6T4uHbviA== 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 4c23yy6Z59z1HpV; Wed, 13 Aug 2025 10:10: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 57DAAIsB099247; Wed, 13 Aug 2025 10:10:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DAAITi099244; Wed, 13 Aug 2025 10:10:18 GMT (envelope-from git) Date: Wed, 13 Aug 2025 10:10:18 GMT Message-Id: <202508131010.57DAAITi099244@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: a99a7e0f653f - main - uart: Remove UART_ACPI_CLASS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a99a7e0f653ff548ba38a5017c2db77024499b74 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=a99a7e0f653ff548ba38a5017c2db77024499b74 commit a99a7e0f653ff548ba38a5017c2db77024499b74 Author: Andrew Turner AuthorDate: 2025-08-13 09:14:26 +0000 Commit: Andrew Turner CommitDate: 2025-08-13 09:31:16 +0000 uart: Remove UART_ACPI_CLASS It's unused, we can remove it. Reviewed by: imp, jhibbits Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51877 --- sys/dev/uart/uart_cpu_acpi.c | 8 -------- sys/dev/uart/uart_cpu_acpi.h | 8 -------- 2 files changed, 16 deletions(-) diff --git a/sys/dev/uart/uart_cpu_acpi.c b/sys/dev/uart/uart_cpu_acpi.c index 7382c47a8db6..2e2ff101619b 100644 --- a/sys/dev/uart/uart_cpu_acpi.c +++ b/sys/dev/uart/uart_cpu_acpi.c @@ -58,14 +58,6 @@ uart_cpu_acpi_scan(uint8_t interface_type) } } - SET_FOREACH(cd, uart_acpi_class_set) { - curcd = *cd; - for (i = 0; curcd[i].cd_hid != NULL; i++) { - if (curcd[i].cd_port_subtype == interface_type) - return (&curcd[i]); - } - } - return (NULL); } diff --git a/sys/dev/uart/uart_cpu_acpi.h b/sys/dev/uart/uart_cpu_acpi.h index 94329e1f1349..c11ead373b86 100644 --- a/sys/dev/uart/uart_cpu_acpi.h +++ b/sys/dev/uart/uart_cpu_acpi.h @@ -56,14 +56,6 @@ SET_DECLARE(uart_acpi_class_and_device_set, struct acpi_uart_compat_data); #define UART_ACPI_CLASS_AND_DEVICE(data) \ DATA_SET(uart_acpi_class_and_device_set, data) -/* - * If your UART driver implements uart_class and custom device layer, - * then use UART_ACPI_CLASS for its declaration - */ -SET_DECLARE(uart_acpi_class_set, struct acpi_uart_compat_data); -#define UART_ACPI_CLASS(data) \ - DATA_SET(uart_acpi_class_set, data) - /* Try to initialize UART device from ACPI tables */ int uart_cpu_acpi_setup(int devtype, struct uart_devinfo *di); From nobody Wed Aug 13 10:10:19 2025 X-Original-To: dev-commits-src-main@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 4c23z02snqz64W8k; Wed, 13 Aug 2025 10:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c23z00sBXz3ttL; Wed, 13 Aug 2025 10:10:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755079820; 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=rCITLk8iU7QceQpyXQIuP56C0s1KMMrr5/yBac3T9YI=; b=qU4jrCpbxROuranZ5FK42RTAxt0kY+ZK7hHZw2lvo0m0TP14AQhhTl98T9qtF+74J3AeZy lLuUWFnZCO9BlY0pXGvdkWT5T0KLLflLyWlgYGLMYhz1sQDcbhVAR6r4/2gwjBBK5Agt1w WSTyq/HjUstv1TSWrgY8XnuiBDVH3Jozda4YVEY0sBtZxgYPfAfQlutd4IbZwcAZeMM6lK +hqyiaf99+DKUWBQCquw9cz7Ybi2Xvp4c6ze6YkWru/Tji6HboG9z1X5OFXRzMYJEnas3u 7EKNwdnSh9f6JCa+zLM0vmvglBL2K3F9afQfBszxx9G8HPLHDGYu8YRun29LaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755079820; 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=rCITLk8iU7QceQpyXQIuP56C0s1KMMrr5/yBac3T9YI=; b=hKQTpYTDF2ukbILErokpxEYWA8CPmdEk0R0XI3HTbirQwNza/2N45yKULc6yVizLQSu7ih cuRO9uSaUvdQrhuBEcR9WkuobY2WGjkS4JvVgS/n5Eo/Zcs/4z8MRckjhL9/kaR/KOQ2Iy efjq7fw7XNkoxdPahYf/EB45HtKP+5J7SvbyNRebCPxgEm9m8FEEnCcahl/Zpr6EejGR1x mE4DBjArVR4gCf1+e709RdYXg2XIp/XwGqXTVO4JoNzK3Tt15rNHMgfM96ppgvuupgsVPm 0bvlqCLj1R1TVwU0RkklND5Oty0GdUjlhGH3bsgeZ7OHRmWmyE4eAOs4ebqOKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755079820; a=rsa-sha256; cv=none; b=IrrhdWxtoHBXCLHWbyqKoLtgGe3943t7wo3C/ZFHqz3h6N3DDrbSADhQNW5TTzNtnENgXl jNe/dUpPEQ6cRdnPrKNWa2IGE5t3j8XN+lPO1Ihqqte1UxET0LzkYbsBgSY5zfwWgFATW4 8pkodv9tlyZT+KoA0cJZIV8D8AKrA5A1enACYpQrTmqk0BD9tOsGAyOUJDc4LEweVZaGnP tDt91wMPPXcBbA7+epQL9iMWjiNadj5rzP7EmCEMK3Ti3stbyDoQi2sh5IQW4qX0LD/EH3 +bC9wLJE2di3Z+LbSDKqCiRW/kNx+3wHGsQKa1F72H54Zw80YeLxQ2urUZnXWg== 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 4c23z00Sc8z1HpW; Wed, 13 Aug 2025 10:10: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 57DAAJPr099286; Wed, 13 Aug 2025 10:10:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DAAJta099283; Wed, 13 Aug 2025 10:10:19 GMT (envelope-from git) Date: Wed, 13 Aug 2025 10:10:19 GMT Message-Id: <202508131010.57DAAJta099283@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: e822f1d6f533 - main - uart: Add UART_ACPI_SPCR_CLASS List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e822f1d6f5333cc7ff47a88238c269b8a6a6f01a Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=e822f1d6f5333cc7ff47a88238c269b8a6a6f01a commit e822f1d6f5333cc7ff47a88238c269b8a6a6f01a Author: Andrew Turner AuthorDate: 2025-08-13 09:23:07 +0000 Commit: Andrew Turner CommitDate: 2025-08-13 09:31:16 +0000 uart: Add UART_ACPI_SPCR_CLASS We don't care about most of acpi_uart_compat_data in the spcr code. Split out the mapping from the SPCR interface type to uart class into a new struct. This allows new SPCR interface types to be added that don't have an entry in the DSDT, e.g. some PCI uarts may not. Reviewed by: imp, jhibbits Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51878 --- sys/dev/uart/uart_cpu_acpi.c | 12 ++++++------ sys/dev/uart/uart_cpu_acpi.h | 8 ++++++++ sys/dev/uart/uart_dev_ns8250.c | 7 +++++++ sys/dev/uart/uart_dev_pl011.c | 8 ++++++++ 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/sys/dev/uart/uart_cpu_acpi.c b/sys/dev/uart/uart_cpu_acpi.c index 2e2ff101619b..da77603f0093 100644 --- a/sys/dev/uart/uart_cpu_acpi.c +++ b/sys/dev/uart/uart_cpu_acpi.c @@ -44,15 +44,15 @@ #include #include -static struct acpi_uart_compat_data * +static struct acpi_spcr_compat_data * uart_cpu_acpi_scan(uint8_t interface_type) { - struct acpi_uart_compat_data **cd, *curcd; + struct acpi_spcr_compat_data **cd, *curcd; int i; - SET_FOREACH(cd, uart_acpi_class_and_device_set) { + SET_FOREACH(cd, uart_acpi_spcr_class_set) { curcd = *cd; - for (i = 0; curcd[i].cd_hid != NULL; i++) { + for (i = 0; curcd[i].cd_class != NULL; i++) { if (curcd[i].cd_port_subtype == interface_type) return (&curcd[i]); } @@ -135,7 +135,7 @@ uart_cpu_acpi_spcr(int devtype, struct uart_devinfo *di) { vm_paddr_t spcr_physaddr; ACPI_TABLE_SPCR *spcr; - struct acpi_uart_compat_data *cd; + struct acpi_spcr_compat_data *cd; struct uart_class *class; int error = ENXIO; @@ -229,7 +229,7 @@ uart_cpu_acpi_dbg2(struct uart_devinfo *di) ACPI_TABLE_DBG2 *dbg2; ACPI_DBG2_DEVICE *dbg2_dev; ACPI_GENERIC_ADDRESS *base_address; - struct acpi_uart_compat_data *cd; + struct acpi_spcr_compat_data *cd; struct uart_class *class; int error; bool found; diff --git a/sys/dev/uart/uart_cpu_acpi.h b/sys/dev/uart/uart_cpu_acpi.h index c11ead373b86..7205303f0084 100644 --- a/sys/dev/uart/uart_cpu_acpi.h +++ b/sys/dev/uart/uart_cpu_acpi.h @@ -35,6 +35,14 @@ struct uart_class; +struct acpi_spcr_compat_data { + struct uart_class *cd_class; + uint16_t cd_port_subtype; +}; +SET_DECLARE(uart_acpi_spcr_class_set, struct acpi_spcr_compat_data); +#define UART_ACPI_SPCR_CLASS(data) \ + DATA_SET(uart_acpi_spcr_class_set, data) + struct acpi_uart_compat_data { const char *cd_hid; struct uart_class *cd_class; diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index 0f19ede6d9df..09eadb5d75e3 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -492,6 +492,13 @@ UART_CLASS(uart_ns8250_class); * XXX -- refactor out ACPI and FDT ifdefs */ #ifdef DEV_ACPI +static struct acpi_spcr_compat_data acpi_spcr_compat_data[] = { + { &uart_ns8250_class, ACPI_DBG2_16550_COMPATIBLE }, + { &uart_ns8250_class, ACPI_DBG2_16550_SUBSET }, + { NULL, 0 }, +}; +UART_ACPI_SPCR_CLASS(acpi_spcr_compat_data); + static struct acpi_uart_compat_data acpi_compat_data[] = { {"AMD0020", &uart_ns8250_class, 0, 2, 0, 48000000, UART_F_BUSY_DETECT, "AMD / Synopsys Designware UART"}, {"AMDI0020", &uart_ns8250_class, 0, 2, 0, 48000000, UART_F_BUSY_DETECT, "AMD / Synopsys Designware UART"}, diff --git a/sys/dev/uart/uart_dev_pl011.c b/sys/dev/uart/uart_dev_pl011.c index a0d5a5b1c7e2..dca2765cac59 100644 --- a/sys/dev/uart/uart_dev_pl011.c +++ b/sys/dev/uart/uart_dev_pl011.c @@ -391,6 +391,14 @@ UART_FDT_CLASS_AND_DEVICE(fdt_compat_data); #endif #ifdef DEV_ACPI +static struct acpi_spcr_compat_data acpi_spcr_compat_data[] = { + { &uart_pl011_class, ACPI_DBG2_ARM_PL011 }, + { &uart_pl011_class, ACPI_DBG2_ARM_SBSA_GENERIC }, + { &uart_pl011_class, ACPI_DBG2_ARM_SBSA_32BIT }, + { NULL, 0 }, +}; +UART_ACPI_SPCR_CLASS(acpi_spcr_compat_data); + static struct acpi_uart_compat_data acpi_compat_data[] = { {"ARMH0011", &uart_pl011_class, ACPI_DBG2_ARM_PL011, 2, 0, 0, 0, "uart pl011"}, {"ARMHB000", &uart_pl011_class, ACPI_DBG2_ARM_SBSA_GENERIC, 2, 0, 0, 0, "uart pl011"}, From nobody Wed Aug 13 10:10:21 2025 X-Original-To: dev-commits-src-main@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 4c23z14f0Tz64W6b; Wed, 13 Aug 2025 10:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c23z11YZ6z3v0H; Wed, 13 Aug 2025 10:10:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755079821; 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=olMI3lqD9jULEZSDnzz4lcfleLMK3X5jvESaqtyOlbo=; b=PrTcY/VFPdReOQJc3hdqjfAhYTL4oabA3trJwP3JL5em2Sdghw8/+aHbXUs4hOZdHpnbqm GQF8VYaFOZ62Kf1fNrizPBh2rsSFforKnrGehwOI8Ykcg22S2j4EIPyaH1ntwxDEQN9e6D sHEO2Ec7tISgEr9o7i0grPiKJCYioMY1pkHTdQpaMNbfItUIVQKfQSFXDqN4FX4NKPUfYN 4l91yVbELyOLoj4s8B/DzRKyueGl9iI++n1JZc49k5AFjIccqEohGrFTVfqUqpWNniwv6v /meUnWWF41oHOU9nlSBjzrEDPJQ3cwO4OTpbS6QxCwBKfesdZ7IxCRQ+WnuTpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755079821; 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=olMI3lqD9jULEZSDnzz4lcfleLMK3X5jvESaqtyOlbo=; b=iq2nHPeUwHQ5HD71QQhwCiyaqXxE/8K4MG94plPw6voqQOKHwMunjlgKIBB1OfCZjcCTZR glZmh4yFyKP/i7R99Yh+HwJyGa5mML5onWU3Ees3OosZaC7BEK2RtNfNn+aQbwatimfoEh I94RCE/D6O9n+ojRxH+HAEF+x9bcBLdQr9tOanzqE2rtjYjpEMzX/hGStFjPEFM4q9jvfG WGjYskbfXxzPyxOMl41xJXNSUfUJgVQ1rt/ct69QCESEt3f7abNcFUtybeOlaoeV25/cTd MR+phshSJjlFS3eK7j625pCQZ2h734wcWc+XyLm1wti7mjU2o4eAqWAo+fFgUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755079821; a=rsa-sha256; cv=none; b=ADJgRpUWM2oTKGcdHaHY8h43rXyiAs+OEaB9MX/QgMEytsfy3zbRNc0m/lcJmWXmpWQnO9 xSjhOb5IYdJSTpvz37f+a4H6Rqc+mSNTP4CB+rQgyADGec6OvvKpR13kGJXziq1VteSKhP T/yyLiUvL6sO8IWHf3azklK0qamiEnPQCXpmLSszNRVD9maYR5TZsCATX51BhsnwQXsDgG 9ESV3XAgTvRcmOOPTYNOxvf2VN8daQtC4UnrBGFmLHIFmWTqE1TwNKEwVdxW0nZVNBqRDH CV64aKzzMCRzxs6M1ZLKWRl/ja9jYpsjKYjNNS7NAqIwz6o3p5cNSvnt2aMsKg== 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 4c23z116w9z1HhR; Wed, 13 Aug 2025 10:10: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 57DAALVF099322; Wed, 13 Aug 2025 10:10:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DAAL54099319; Wed, 13 Aug 2025 10:10:21 GMT (envelope-from git) Date: Wed, 13 Aug 2025 10:10:21 GMT Message-Id: <202508131010.57DAAL54099319@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 25ec7ca857b4 - main - uart: Remove the unused cd_port_subtype List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 25ec7ca857b4d0f8c5b99114e6630f0dfae73751 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=25ec7ca857b4d0f8c5b99114e6630f0dfae73751 commit 25ec7ca857b4d0f8c5b99114e6630f0dfae73751 Author: Andrew Turner AuthorDate: 2025-08-13 09:23:38 +0000 Commit: Andrew Turner CommitDate: 2025-08-13 09:31:16 +0000 uart: Remove the unused cd_port_subtype This is now unused. It was used for the SPCR interface type, but that has now been split out into a new struct. Reviewed by: imp, jhibbits Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51879 --- sys/dev/uart/uart_cpu_acpi.h | 1 - sys/dev/uart/uart_dev_ns8250.c | 34 +++++++++++++++++----------------- sys/dev/uart/uart_dev_pl011.c | 8 ++++---- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/sys/dev/uart/uart_cpu_acpi.h b/sys/dev/uart/uart_cpu_acpi.h index 7205303f0084..218f643c7621 100644 --- a/sys/dev/uart/uart_cpu_acpi.h +++ b/sys/dev/uart/uart_cpu_acpi.h @@ -47,7 +47,6 @@ struct acpi_uart_compat_data { const char *cd_hid; struct uart_class *cd_class; - uint16_t cd_port_subtype; int cd_regshft; int cd_regiowidth; int cd_rclk; diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index 09eadb5d75e3..56db0b26487b 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -500,23 +500,23 @@ static struct acpi_spcr_compat_data acpi_spcr_compat_data[] = { UART_ACPI_SPCR_CLASS(acpi_spcr_compat_data); static struct acpi_uart_compat_data acpi_compat_data[] = { - {"AMD0020", &uart_ns8250_class, 0, 2, 0, 48000000, UART_F_BUSY_DETECT, "AMD / Synopsys Designware UART"}, - {"AMDI0020", &uart_ns8250_class, 0, 2, 0, 48000000, UART_F_BUSY_DETECT, "AMD / Synopsys Designware UART"}, - {"APMC0D08", &uart_ns8250_class, ACPI_DBG2_16550_COMPATIBLE, 2, 4, 0, 0, "APM compatible UART"}, - {"MRVL0001", &uart_ns8250_class, ACPI_DBG2_16550_SUBSET, 2, 0, 200000000, UART_F_BUSY_DETECT, "Marvell / Synopsys Designware UART"}, - {"SCX0006", &uart_ns8250_class, 0, 2, 0, 62500000, UART_F_BUSY_DETECT, "SynQuacer / Synopsys Designware UART"}, - {"HISI0031", &uart_ns8250_class, 0, 2, 0, 200000000, UART_F_BUSY_DETECT, "HiSilicon / Synopsys Designware UART"}, - {"INTC1006", &uart_ns8250_class, 0, 2, 0, 25000000, 0, "Intel ARM64 UART"}, - {"NXP0018", &uart_ns8250_class, 0, 0, 0, 350000000, UART_F_BUSY_DETECT, "NXP / Synopsys Designware UART"}, - {"PNP0500", &uart_ns8250_class, 0, 0, 0, 0, 0, "Standard PC COM port"}, - {"PNP0501", &uart_ns8250_class, 0, 0, 0, 0, 0, "16550A-compatible COM port"}, - {"PNP0502", &uart_ns8250_class, 0, 0, 0, 0, 0, "Multiport serial device (non-intelligent 16550)"}, - {"PNP0510", &uart_ns8250_class, 0, 0, 0, 0, 0, "Generic IRDA-compatible device"}, - {"PNP0511", &uart_ns8250_class, 0, 0, 0, 0, 0, "Generic IRDA-compatible device"}, - {"WACF004", &uart_ns8250_class, 0, 0, 0, 0, 0, "Wacom Tablet PC Screen"}, - {"WACF00E", &uart_ns8250_class, 0, 0, 0, 0, 0, "Wacom Tablet PC Screen 00e"}, - {"FUJ02E5", &uart_ns8250_class, 0, 0, 0, 0, 0, "Wacom Tablet at FuS Lifebook T"}, - {NULL, NULL, 0, 0 , 0, 0, 0, NULL}, + {"AMD0020", &uart_ns8250_class, 2, 0, 48000000, UART_F_BUSY_DETECT, "AMD / Synopsys Designware UART"}, + {"AMDI0020", &uart_ns8250_class, 2, 0, 48000000, UART_F_BUSY_DETECT, "AMD / Synopsys Designware UART"}, + {"APMC0D08", &uart_ns8250_class, 2, 4, 0, 0, "APM compatible UART"}, + {"MRVL0001", &uart_ns8250_class, 2, 0, 200000000, UART_F_BUSY_DETECT, "Marvell / Synopsys Designware UART"}, + {"SCX0006", &uart_ns8250_class, 2, 0, 62500000, UART_F_BUSY_DETECT, "SynQuacer / Synopsys Designware UART"}, + {"HISI0031", &uart_ns8250_class, 2, 0, 200000000, UART_F_BUSY_DETECT, "HiSilicon / Synopsys Designware UART"}, + {"INTC1006", &uart_ns8250_class, 2, 0, 25000000, 0, "Intel ARM64 UART"}, + {"NXP0018", &uart_ns8250_class, 0, 0, 350000000, UART_F_BUSY_DETECT, "NXP / Synopsys Designware UART"}, + {"PNP0500", &uart_ns8250_class, 0, 0, 0, 0, "Standard PC COM port"}, + {"PNP0501", &uart_ns8250_class, 0, 0, 0, 0, "16550A-compatible COM port"}, + {"PNP0502", &uart_ns8250_class, 0, 0, 0, 0, "Multiport serial device (non-intelligent 16550)"}, + {"PNP0510", &uart_ns8250_class, 0, 0, 0, 0, "Generic IRDA-compatible device"}, + {"PNP0511", &uart_ns8250_class, 0, 0, 0, 0, "Generic IRDA-compatible device"}, + {"WACF004", &uart_ns8250_class, 0, 0, 0, 0, "Wacom Tablet PC Screen"}, + {"WACF00E", &uart_ns8250_class, 0, 0, 0, 0, "Wacom Tablet PC Screen 00e"}, + {"FUJ02E5", &uart_ns8250_class, 0, 0, 0, 0, "Wacom Tablet at FuS Lifebook T"}, + {NULL, NULL, 0 , 0, 0, 0, NULL}, }; UART_ACPI_CLASS_AND_DEVICE(acpi_compat_data); #endif diff --git a/sys/dev/uart/uart_dev_pl011.c b/sys/dev/uart/uart_dev_pl011.c index dca2765cac59..6afc693cd347 100644 --- a/sys/dev/uart/uart_dev_pl011.c +++ b/sys/dev/uart/uart_dev_pl011.c @@ -400,10 +400,10 @@ static struct acpi_spcr_compat_data acpi_spcr_compat_data[] = { UART_ACPI_SPCR_CLASS(acpi_spcr_compat_data); static struct acpi_uart_compat_data acpi_compat_data[] = { - {"ARMH0011", &uart_pl011_class, ACPI_DBG2_ARM_PL011, 2, 0, 0, 0, "uart pl011"}, - {"ARMHB000", &uart_pl011_class, ACPI_DBG2_ARM_SBSA_GENERIC, 2, 0, 0, 0, "uart pl011"}, - {"ARMHB000", &uart_pl011_class, ACPI_DBG2_ARM_SBSA_32BIT, 2, 0, 0, 0, "uart pl011"}, - {NULL, NULL, 0, 0, 0, 0, 0, NULL}, + {"ARMH0011", &uart_pl011_class, 2, 0, 0, 0, "uart pl011"}, + {"ARMHB000", &uart_pl011_class, 2, 0, 0, 0, "uart pl011"}, + {"ARMHB000", &uart_pl011_class, 2, 0, 0, 0, "uart pl011"}, + {NULL, NULL, 0, 0, 0, 0, NULL}, }; UART_ACPI_CLASS_AND_DEVICE(acpi_compat_data); #endif From nobody Wed Aug 13 10:42:16 2025 X-Original-To: dev-commits-src-main@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 4c24gr5STkz64ZlQ; Wed, 13 Aug 2025 10:42:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c24gr45rzz42My; Wed, 13 Aug 2025 10:42:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755081736; 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=auEh+zxW8q4Vfied5DJXT1iEB30cwnZTfjE6t2VSTfE=; b=Hj+vdt3+1euEqu7UFAPrAz5M4hVVRaczFqGbgK9JudOXWDVazUOwqzJOexAtkpG2vW/iLX CFnnzFEYdDxoBIOYOy5DbYkAb4STry8LnhkBTLIU6v9Bzv4S25Z0e7Sb35hN3FTWKe4bJH XH2qoLXWqn5m33frVbqPUC2pP7/A4oexO86M47qrvRAJaGK0B5Hc1V7m+XoosWTdX/knh6 SPqq+QUDPUL+dOMhqoUlhjNg231ExUZCXyEz7j8/dc6NUpRbQWNhPH/n0CvHqVyPZlmKax 0jNxG558Bd//hEPH56Iii+G/oxpuclJou2Wqi4NRm06OvfTWD/H/IGT4NdPJsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755081736; 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=auEh+zxW8q4Vfied5DJXT1iEB30cwnZTfjE6t2VSTfE=; b=BRXCuNtCQzTHNfIaefTvg6FOZyzXiEMJQN7vW/MWjowOsdOW7EHOKYSBxYZTwe7Hf81nrs 78eK7SEZSivKV1o7oLMT8xiJVqRO0DE/+d6RYRGJmx+7TD9AAHas40+mgAqP1gddHlxXXl lo6EmUWY4pvX29fVvSjON8dtOdKTyvQ6sc28rmTnQacV17lN0NX7uOtCexNPNcsbU0iwRm cfqpxmvMz2FDvVWiqSZpHevaDf/fp4esm3orFvgqOmpKsHJrJ2jWWrdqBjWgAVkE4/t8Dh j6yNkccEYOJD3Ld5MO/9+u3s6ExgXrRrWGiFDtfPGgoc5S/T8g/2cwkTb5jL+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755081736; a=rsa-sha256; cv=none; b=OOvqdQdtH0ZwHFNgfgncK1gzp5Nh8Kuatm1oXd/byhjOTIQ0L3vW6caRkZVBTs+SxkXBvo BFO4OYCU0zQ8MENQbrL6D8bvPVY5OHxxwJW7N9y8uzdz4Is/HtgNyji69WKEG/yTV4C7Ra oxSo+x5jhMDL5yL/+VDStLE6TFyrhuK45CK1JOt6eq2R5xeK4szMXnuvK6rNjtYf0phyar Nlh1eDFW1HeZnmK5IxYaUbHzOYlxeWGqQkz8+SenofFnQrLRSeGnevJ/HDJ0Wh1nIfYJt2 0sfntmWphMW5Pf/8s31kP14lFTxSyJha/I6xatk/76RJrHtED8Pr/Xm8O+Nu0w== 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 4c24gr3ftfz1JVB; Wed, 13 Aug 2025 10:42:16 +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 57DAgGZG062876; Wed, 13 Aug 2025 10:42:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DAgGO4062873; Wed, 13 Aug 2025 10:42:16 GMT (envelope-from git) Date: Wed, 13 Aug 2025 10:42:16 GMT Message-Id: <202508131042.57DAgGO4062873@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: 49f924187fb5 - main - tcopy: Catch up to expand_number() now being signed. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49f924187fb54b381153b427c9c4dbda933226ca Auto-Submitted: auto-generated The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=49f924187fb54b381153b427c9c4dbda933226ca commit 49f924187fb54b381153b427c9c4dbda933226ca Author: Poul-Henning Kamp AuthorDate: 2025-08-13 10:41:46 +0000 Commit: Poul-Henning Kamp CommitDate: 2025-08-13 10:41:46 +0000 tcopy: Catch up to expand_number() now being signed. --- usr.bin/tcopy/tcopy.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/tcopy/tcopy.cc b/usr.bin/tcopy/tcopy.cc index 62032740a788..891c37f871e5 100644 --- a/usr.bin/tcopy/tcopy.cc +++ b/usr.bin/tcopy/tcopy.cc @@ -710,7 +710,7 @@ main(int argc, char *argv[]) int ch; unsigned long maxphys = 0; size_t l_maxphys = sizeof maxphys; - uint64_t tmp; + int64_t tmp; int rawfile = 0; setbuf(stderr, NULL); @@ -738,11 +738,11 @@ main(int argc, char *argv[]) warnx("illegal block size"); usage(); } - maxblk = tmp; - if (maxblk == 0) { + if (maxblk <= 0) { warnx("illegal block size"); usage(); } + maxblk = tmp; break; case 'v': op = VERIFY; From nobody Wed Aug 13 11:33:09 2025 X-Original-To: dev-commits-src-main@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 4c25pZ2L4Rz64gHk; Wed, 13 Aug 2025 11:33: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c25pY6mkDz49nJ; Wed, 13 Aug 2025 11:33:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755084789; 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=2wukoLx6cW5BVMe0Ad4Abm2VdZ7AQDi36caRc67HDPE=; b=LanGqpbXI+hS1pZb385rRdvXkYVD1CjqFgtga3j6SgZq5jJkOjKCT9M/R/CB7hoNhvbwjl DhNzC3Rg7UCRzpznSsLkKGI32rUjv0vh2difTjgn320MXMMCnlv1qlKlnfGFF1xRKcmK2l FJ/wJ69g+quPPJJKl2dJXjha6DwtSO3mlfpNqc3VR7dhrUxCYMr3IWx1kg7aVSVObVsHDn Qd5vqa/6kwnh4roSK/G4mFR+YvmrXXX6bBl52DyZ2yxZIPTq7dzNN2XGn7cmhz0Zk+NLqU dC01FUMCv34yfpeoesnIV8YMWAC+AWozJFRW1d8iLY1iPRiNK/pEyZBYGhKS7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755084789; 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=2wukoLx6cW5BVMe0Ad4Abm2VdZ7AQDi36caRc67HDPE=; b=WnwuZQXyRh73tkfKiSXXbzSiIj+sWjCf74osQBtEYc9PKSn+Hx4XKZb/C8baHTeMZSHDP3 IczxmjubJauWxJEOrAmdpPfaV4iQM/Ux3ym5Tv/MJHo9WafpTuGQWcqM5xT0iNq1FJY7/Z H0Fer1DO/zY3Lv3/GdriZHS6s3RqISyKvT7iied23vT7erMIYcl3kMjb2PVKaKP6if6UNi 2p76IKZSFYNgXrTF/w+duuaXa3ZwYCNw/It6mo6glw9N2LmuUsbrDkbeeWHpFUsA0jdkhw m/tgu3mdYDvKcGB88br8lKGcqhaO3TMO23yqv3aesK65aVNxNCp354Ur6sgumw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755084789; a=rsa-sha256; cv=none; b=ehLyBA2PQ/6vn/aqfIQXVzvVFm4sj3tx/2hQU9fJaF+YJsM3y8objJxbYc+N7Dmg3GR61k JTOnbfVbZSLgtZGljrCdMSgfCU22oim+yWKjoLKrr1hfLmLhP0FTFiqbIo4m7/JkHU6bS0 HGwEjnzISYkhY9S7bGGLVuGtzV5BXT53iWlIEl68NY5hUK7/Jt4eRhjyP8qoRN+trPF5ft qYeXoE0HiGrDcwyzRzE2z4rpuRXyt2qIgyJDSePbFrTMDo/pgHLMGbgHsSVnM2YuNuu2TI 4cMCmc2EYqL7WvoLWIuozvwrwsAxOdJr7jBfNooLxf03R8gE79vSaNkmcJM22g== 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 4c25pY6NP7z1L0q; Wed, 13 Aug 2025 11:33: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 57DBX9kC057136; Wed, 13 Aug 2025 11:33:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DBX9B6057133; Wed, 13 Aug 2025 11:33:09 GMT (envelope-from git) Date: Wed, 13 Aug 2025 11:33:09 GMT Message-Id: <202508131133.57DBX9B6057133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: c063fb7accae - main - gpio: remove gpiobus_attach_bus List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c063fb7accae4cbe5e0fb808a1382600dc1b4249 Auto-Submitted: auto-generated The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=c063fb7accae4cbe5e0fb808a1382600dc1b4249 commit c063fb7accae4cbe5e0fb808a1382600dc1b4249 Author: Ahmad Khalifa AuthorDate: 2025-08-13 11:14:00 +0000 Commit: Ahmad Khalifa CommitDate: 2025-08-13 11:14:00 +0000 gpio: remove gpiobus_attach_bus Since gpiobus_attach_bus can attach the gpiobus child along with its children in the same bus pass, the parent controller's reference to gpiobus might not be set by the time the children need it. Instead, drivers should use gpiobus_add_bus and explicitly call bus_attach_children. Reviewed by: mmel, imp (older version) Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D51578 --- sys/arm/allwinner/aw_gpio.c | 3 ++- sys/arm/allwinner/axp209.c | 5 +++-- sys/arm/allwinner/axp81x.c | 3 ++- sys/arm/broadcom/bcm2835/bcm2835_gpio.c | 3 ++- sys/arm/broadcom/bcm2835/raspberrypi_gpio.c | 3 ++- sys/arm/freescale/imx/imx_gpio.c | 3 ++- sys/arm/freescale/vybrid/vf_gpio.c | 3 ++- sys/arm/mv/a37x0_gpio.c | 3 ++- sys/arm/mv/gpio.c | 3 ++- sys/arm/mv/mvebu_gpio.c | 3 ++- sys/arm/nvidia/tegra_gpio.c | 3 ++- sys/arm/ti/ti_gpio.c | 3 ++- sys/arm/xilinx/zy7_gpio.c | 3 ++- sys/arm64/apple/apple_pinctrl.c | 3 ++- sys/arm64/rockchip/rk_gpio.c | 3 ++- sys/arm64/rockchip/rk_grf_gpio.c | 3 ++- sys/dev/amdgpio/amdgpio.c | 3 ++- sys/dev/bhnd/cores/chipc/chipc_gpio.c | 4 +++- sys/dev/ftgpio/ftgpio.c | 3 ++- sys/dev/gpio/bytgpio.c | 3 ++- sys/dev/gpio/chvgpio.c | 3 ++- sys/dev/gpio/dwgpio/dwgpio.c | 3 ++- sys/dev/gpio/gpiobus.c | 18 ------------------ sys/dev/gpio/gpiobusvar.h | 1 - sys/dev/gpio/pl061.c | 3 ++- sys/dev/gpio/qoriq_gpio.c | 3 ++- sys/dev/iicbus/gpio/pcf8574.c | 3 ++- sys/dev/iicbus/gpio/tca64xx.c | 3 ++- sys/dev/nctgpio/nctgpio.c | 3 ++- sys/dev/p2sb/lewisburg_gpio.c | 3 ++- sys/dev/qcom_tlmm/qcom_tlmm_ipq4018.c | 3 ++- sys/dev/rccgpio/rccgpio.c | 3 ++- sys/dev/usb/misc/cp2112.c | 5 +++-- sys/powerpc/mpc85xx/mpc85xx_gpio.c | 3 ++- sys/riscv/sifive/sifive_gpio.c | 3 ++- sys/riscv/starfive/jh7110_gpio.c | 3 ++- 36 files changed, 71 insertions(+), 55 deletions(-) diff --git a/sys/arm/allwinner/aw_gpio.c b/sys/arm/allwinner/aw_gpio.c index 2061e38a155f..f1b6f0bc9193 100644 --- a/sys/arm/allwinner/aw_gpio.c +++ b/sys/arm/allwinner/aw_gpio.c @@ -1162,11 +1162,12 @@ aw_gpio_attach(device_t dev) fdt_pinctrl_register(dev, "allwinner,pins"); fdt_pinctrl_configure_tree(dev); - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) goto fail; config_intrhook_oneshot(aw_gpio_enable_bank_supply, sc); + bus_attach_children(dev); return (0); diff --git a/sys/arm/allwinner/axp209.c b/sys/arm/allwinner/axp209.c index 239ead02d0e0..ff999a0f9b9b 100644 --- a/sys/arm/allwinner/axp209.c +++ b/sys/arm/allwinner/axp209.c @@ -1322,7 +1322,7 @@ axp2xx_attach(device_t dev) case AXP209: sc->pins = axp209_pins; sc->npins = nitems(axp209_pins); - sc->gpiodev = gpiobus_attach_bus(dev); + sc->gpiodev = gpiobus_add_bus(dev); sc->sensors = axp209_sensors; sc->nsensors = nitems(axp209_sensors); @@ -1333,7 +1333,7 @@ axp2xx_attach(device_t dev) case AXP221: sc->pins = axp221_pins; sc->npins = nitems(axp221_pins); - sc->gpiodev = gpiobus_attach_bus(dev); + sc->gpiodev = gpiobus_add_bus(dev); sc->sensors = axp221_sensors; sc->nsensors = nitems(axp221_sensors); @@ -1374,6 +1374,7 @@ axp2xx_attach(device_t dev) } } + bus_attach_children(dev); return (0); } diff --git a/sys/arm/allwinner/axp81x.c b/sys/arm/allwinner/axp81x.c index fc1a168595e5..71f0c8156a0d 100644 --- a/sys/arm/allwinner/axp81x.c +++ b/sys/arm/allwinner/axp81x.c @@ -1609,7 +1609,8 @@ axp8xx_attach(device_t dev) EVENTHANDLER_REGISTER(shutdown_final, axp8xx_shutdown, dev, SHUTDOWN_PRI_LAST); - sc->gpiodev = gpiobus_attach_bus(dev); + sc->gpiodev = gpiobus_add_bus(dev); + bus_attach_children(dev); return (0); } diff --git a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c index 48d1d2af5abc..93ee5d7c8bd3 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c @@ -840,10 +840,11 @@ bcm_gpio_attach(device_t dev) fdt_pinctrl_register(dev, "brcm,pins"); fdt_pinctrl_configure_tree(dev); - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) goto fail; + bus_attach_children(dev); return (0); fail: diff --git a/sys/arm/broadcom/bcm2835/raspberrypi_gpio.c b/sys/arm/broadcom/bcm2835/raspberrypi_gpio.c index 5a0f5cf2b1b3..b286654c6f18 100644 --- a/sys/arm/broadcom/bcm2835/raspberrypi_gpio.c +++ b/sys/arm/broadcom/bcm2835/raspberrypi_gpio.c @@ -404,10 +404,11 @@ rpi_fw_gpio_attach(device_t dev) } } free(names, M_OFWPROP); - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) goto fail; + bus_attach_children(dev); return (0); fail: diff --git a/sys/arm/freescale/imx/imx_gpio.c b/sys/arm/freescale/imx/imx_gpio.c index 7610d28af90e..3b19ef1b5e67 100644 --- a/sys/arm/freescale/imx/imx_gpio.c +++ b/sys/arm/freescale/imx/imx_gpio.c @@ -861,13 +861,14 @@ imx51_gpio_attach(device_t dev) gpio_pic_register_isrcs(sc); intr_pic_register(dev, OF_xref_from_node(ofw_bus_get_node(dev))); #endif - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) { imx51_gpio_detach(dev); return (ENXIO); } + bus_attach_children(dev); return (0); } diff --git a/sys/arm/freescale/vybrid/vf_gpio.c b/sys/arm/freescale/vybrid/vf_gpio.c index c81524a8a27e..b4e1ba9af586 100644 --- a/sys/arm/freescale/vybrid/vf_gpio.c +++ b/sys/arm/freescale/vybrid/vf_gpio.c @@ -147,13 +147,14 @@ vf_gpio_attach(device_t dev) "vf_gpio%d.%d", device_get_unit(dev), i); } - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) { bus_release_resources(dev, vf_gpio_spec, sc->res); mtx_destroy(&sc->sc_mtx); return (ENXIO); } + bus_attach_children(dev); return (0); } diff --git a/sys/arm/mv/a37x0_gpio.c b/sys/arm/mv/a37x0_gpio.c index 86110ff87ab1..754663d2991e 100644 --- a/sys/arm/mv/a37x0_gpio.c +++ b/sys/arm/mv/a37x0_gpio.c @@ -291,10 +291,11 @@ a37x0_gpio_attach(device_t dev) if (sc->sc_npins > sc->sc_max_pins) return (ENXIO); - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) return (ENXIO); + bus_attach_children(dev); return (0); } diff --git a/sys/arm/mv/gpio.c b/sys/arm/mv/gpio.c index 934c00236153..b3c2314fb2d6 100644 --- a/sys/arm/mv/gpio.c +++ b/sys/arm/mv/gpio.c @@ -340,7 +340,7 @@ mv_gpio_attach(device_t dev) if (rv != 0) return (rv); - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) { mtx_destroy(&sc->mutex); bus_release_resource(dev, SYS_RES_IRQ, @@ -348,6 +348,7 @@ mv_gpio_attach(device_t dev) return (ENXIO); } + bus_attach_children(dev); return (0); } diff --git a/sys/arm/mv/mvebu_gpio.c b/sys/arm/mv/mvebu_gpio.c index 7acdfff539dc..4cc9b7030a65 100644 --- a/sys/arm/mv/mvebu_gpio.c +++ b/sys/arm/mv/mvebu_gpio.c @@ -804,12 +804,13 @@ mvebu_gpio_attach(device_t dev) } } - sc->busdev = gpiobus_attach_bus(dev); + sc->busdev = gpiobus_add_bus(dev); if (sc->busdev == NULL) { mvebu_gpio_detach(dev); return (ENXIO); } + bus_attach_children(dev); return (0); } diff --git a/sys/arm/nvidia/tegra_gpio.c b/sys/arm/nvidia/tegra_gpio.c index e37fd69a121e..aa34537352be 100644 --- a/sys/arm/nvidia/tegra_gpio.c +++ b/sys/arm/nvidia/tegra_gpio.c @@ -818,12 +818,13 @@ tegra_gpio_attach(device_t dev) return (ENXIO); } - sc->busdev = gpiobus_attach_bus(dev); + sc->busdev = gpiobus_add_bus(dev); if (sc->busdev == NULL) { tegra_gpio_detach(dev); return (ENXIO); } + bus_attach_children(dev); return (0); } diff --git a/sys/arm/ti/ti_gpio.c b/sys/arm/ti/ti_gpio.c index aceb3d63204e..01b9597a4418 100644 --- a/sys/arm/ti/ti_gpio.c +++ b/sys/arm/ti/ti_gpio.c @@ -674,12 +674,13 @@ ti_gpio_attach(device_t dev) } } - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) { ti_gpio_detach(dev); return (ENXIO); } + bus_attach_children(dev); return (0); } diff --git a/sys/arm/xilinx/zy7_gpio.c b/sys/arm/xilinx/zy7_gpio.c index 71b6fc3c0586..2434e43bf27c 100644 --- a/sys/arm/xilinx/zy7_gpio.c +++ b/sys/arm/xilinx/zy7_gpio.c @@ -441,12 +441,13 @@ zy7_gpio_attach(device_t dev) return (ENOMEM); } - sc->busdev = gpiobus_attach_bus(dev); + sc->busdev = gpiobus_add_bus(dev); if (sc->busdev == NULL) { zy7_gpio_detach(dev); return (ENOMEM); } + bus_attach_children(dev); return (0); } diff --git a/sys/arm64/apple/apple_pinctrl.c b/sys/arm64/apple/apple_pinctrl.c index ebaaccea1d99..c28b1c62d78c 100644 --- a/sys/arm64/apple/apple_pinctrl.c +++ b/sys/arm64/apple/apple_pinctrl.c @@ -171,12 +171,13 @@ apple_pinctrl_attach(device_t dev) OF_xref_from_node(ofw_bus_get_node(dev))); } - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) { device_printf(dev, "failed to attach gpiobus\n"); goto error; } + bus_attach_children(dev); return (0); error: mtx_destroy(&sc->sc_mtx); diff --git a/sys/arm64/rockchip/rk_gpio.c b/sys/arm64/rockchip/rk_gpio.c index 847bc7394dd0..61614f532634 100644 --- a/sys/arm64/rockchip/rk_gpio.c +++ b/sys/arm64/rockchip/rk_gpio.c @@ -371,12 +371,13 @@ rk_gpio_attach(device_t dev) sc->swporta_ddr = rk_gpio_read_4(sc, RK_GPIO_SWPORTA_DDR); RK_GPIO_UNLOCK(sc); - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) { rk_gpio_detach(dev); return (ENXIO); } + bus_attach_children(dev); return (0); } diff --git a/sys/arm64/rockchip/rk_grf_gpio.c b/sys/arm64/rockchip/rk_grf_gpio.c index 6818bd85bb95..6ac419889614 100644 --- a/sys/arm64/rockchip/rk_grf_gpio.c +++ b/sys/arm64/rockchip/rk_grf_gpio.c @@ -181,11 +181,12 @@ rk_grf_gpio_attach(device_t dev) return (ENXIO); } - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) { return (ENXIO); } + bus_attach_children(dev); return (0); } diff --git a/sys/dev/amdgpio/amdgpio.c b/sys/dev/amdgpio/amdgpio.c index f39006d95805..2bd455c612b8 100644 --- a/sys/dev/amdgpio/amdgpio.c +++ b/sys/dev/amdgpio/amdgpio.c @@ -408,12 +408,13 @@ amdgpio_attach(device_t dev) GPIO_PIN_OUTPUT : GPIO_PIN_INPUT; } - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) { device_printf(dev, "could not attach gpiobus\n"); goto err_bus; } + bus_attach_children(dev); return (0); err_bus: diff --git a/sys/dev/bhnd/cores/chipc/chipc_gpio.c b/sys/dev/bhnd/cores/chipc/chipc_gpio.c index a110bdda5fa7..429de0fc1fd8 100644 --- a/sys/dev/bhnd/cores/chipc/chipc_gpio.c +++ b/sys/dev/bhnd/cores/chipc/chipc_gpio.c @@ -173,11 +173,13 @@ chipc_gpio_attach(device_t dev) if (CC_GPIO_QUIRK(sc, NO_GPIOC)) { sc->gpiobus = NULL; } else { - if ((sc->gpiobus = gpiobus_attach_bus(dev)) == NULL) { + if ((sc->gpiobus = gpiobus_add_bus(dev)) == NULL) { device_printf(dev, "failed to attach gpiobus\n"); error = ENXIO; goto failed; } + + bus_attach_children(dev); } /* Register as the bus GPIO provider */ diff --git a/sys/dev/ftgpio/ftgpio.c b/sys/dev/ftgpio/ftgpio.c index 7acfdd5b900e..68787b54bb16 100644 --- a/sys/dev/ftgpio/ftgpio.c +++ b/sys/dev/ftgpio/ftgpio.c @@ -398,12 +398,13 @@ ftgpio_attach(device_t dev) FTGPIO_VERBOSE_PRINTF(sc->dev, "groups GPIO1..GPIO6 enabled\n"); GPIO_UNLOCK(sc); - sc->busdev = gpiobus_attach_bus(dev); + sc->busdev = gpiobus_add_bus(dev); if (sc->busdev == NULL) { GPIO_LOCK_DESTROY(sc); return (ENXIO); } + bus_attach_children(dev); return (0); } diff --git a/sys/dev/gpio/bytgpio.c b/sys/dev/gpio/bytgpio.c index f7b2a73ec6cb..5d685c155a03 100644 --- a/sys/dev/gpio/bytgpio.c +++ b/sys/dev/gpio/bytgpio.c @@ -608,7 +608,7 @@ bytgpio_attach(device_t dev) sc->sc_pad_funcs[pin] = val & BYTGPIO_PCONF0_FUNC_MASK; } - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) { BYTGPIO_LOCK_DESTROY(sc); bus_release_resource(dev, SYS_RES_MEMORY, @@ -616,6 +616,7 @@ bytgpio_attach(device_t dev) return (ENXIO); } + bus_attach_children(dev); return (0); error: diff --git a/sys/dev/gpio/chvgpio.c b/sys/dev/gpio/chvgpio.c index 199ad4d6f373..3273aad9242b 100644 --- a/sys/dev/gpio/chvgpio.c +++ b/sys/dev/gpio/chvgpio.c @@ -441,7 +441,7 @@ chvgpio_attach(device_t dev) bus_write_4(sc->sc_mem_res, CHVGPIO_INTERRUPT_MASK, 0); bus_write_4(sc->sc_mem_res, CHVGPIO_INTERRUPT_STATUS, 0xffff); - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) { CHVGPIO_LOCK_DESTROY(sc); bus_release_resource(dev, SYS_RES_MEMORY, @@ -451,6 +451,7 @@ chvgpio_attach(device_t dev) return (ENXIO); } + bus_attach_children(dev); return (0); } diff --git a/sys/dev/gpio/dwgpio/dwgpio.c b/sys/dev/gpio/dwgpio/dwgpio.c index 5acb99ca591e..3908113d5fd4 100644 --- a/sys/dev/gpio/dwgpio/dwgpio.c +++ b/sys/dev/gpio/dwgpio/dwgpio.c @@ -167,12 +167,13 @@ dwgpio_attach(device_t dev) snprintf(sc->gpio_pins[i].gp_name, GPIOMAXNAME, "dwgpio%d.%d", device_get_unit(dev), i); } - sc->busdev = gpiobus_attach_bus(dev); + sc->busdev = gpiobus_add_bus(dev); if (sc->busdev == NULL) { mtx_destroy(&sc->sc_mtx); return (ENXIO); } + bus_attach_children(dev); return (0); } diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c index 764bcb7e6ee8..c25c41f43042 100644 --- a/sys/dev/gpio/gpiobus.c +++ b/sys/dev/gpio/gpiobus.c @@ -330,24 +330,6 @@ gpiobus_add_bus(device_t dev) return (busdev); } -/* - * Attach a gpiobus child. - * Note that the controller is expected - * to be fully initialized at this point. - */ -device_t -gpiobus_attach_bus(device_t dev) -{ - device_t busdev; - - busdev = gpiobus_add_bus(dev); - if (busdev == NULL) - return (NULL); - - bus_attach_children(dev); - return (busdev); -} - int gpiobus_detach_bus(device_t dev) { diff --git a/sys/dev/gpio/gpiobusvar.h b/sys/dev/gpio/gpiobusvar.h index 7f504236a774..0528efe45525 100644 --- a/sys/dev/gpio/gpiobusvar.h +++ b/sys/dev/gpio/gpiobusvar.h @@ -171,7 +171,6 @@ struct resource *gpio_alloc_intr_resource(device_t consumer_dev, int *rid, int gpio_check_flags(uint32_t, uint32_t); device_t gpiobus_add_bus(device_t); -device_t gpiobus_attach_bus(device_t); int gpiobus_detach_bus(device_t); #endif /* __GPIOBUS_H__ */ diff --git a/sys/dev/gpio/pl061.c b/sys/dev/gpio/pl061.c index 87d4310a6396..32109e5982bc 100644 --- a/sys/dev/gpio/pl061.c +++ b/sys/dev/gpio/pl061.c @@ -495,13 +495,14 @@ pl061_attach(device_t dev) goto free_isrc; } - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) { device_printf(dev, "couldn't attach gpio bus\n"); PL061_LOCK_DESTROY(sc); goto free_isrc; } + bus_attach_children(dev); return (0); free_isrc: diff --git a/sys/dev/gpio/qoriq_gpio.c b/sys/dev/gpio/qoriq_gpio.c index 8b44cd256c79..d11868a23751 100644 --- a/sys/dev/gpio/qoriq_gpio.c +++ b/sys/dev/gpio/qoriq_gpio.c @@ -379,12 +379,13 @@ qoriq_gpio_attach(device_t dev) OF_device_register_xref(OF_xref_from_node(ofw_bus_get_node(dev)), dev); - sc->busdev = gpiobus_attach_bus(dev); + sc->busdev = gpiobus_add_bus(dev); if (sc->busdev == NULL) { qoriq_gpio_detach(dev); return (ENOMEM); } + bus_attach_children(dev); return (0); } diff --git a/sys/dev/iicbus/gpio/pcf8574.c b/sys/dev/iicbus/gpio/pcf8574.c index ab6e2bc07d1f..86c78ffb15e6 100644 --- a/sys/dev/iicbus/gpio/pcf8574.c +++ b/sys/dev/iicbus/gpio/pcf8574.c @@ -142,12 +142,13 @@ pcf8574_attach(device_t dev) (void)pcf8574_write(sc, 0xff); sx_init(&sc->lock, "pcf8574"); - sc->busdev = gpiobus_attach_bus(dev); + sc->busdev = gpiobus_add_bus(dev); if (sc->busdev == NULL) { device_printf(dev, "Could not create busdev child\n"); sx_destroy(&sc->lock); return (ENXIO); } + bus_attach_children(dev); return (0); } diff --git a/sys/dev/iicbus/gpio/tca64xx.c b/sys/dev/iicbus/gpio/tca64xx.c index cd011ae9be75..a973ef22f3fa 100644 --- a/sys/dev/iicbus/gpio/tca64xx.c +++ b/sys/dev/iicbus/gpio/tca64xx.c @@ -262,7 +262,7 @@ tca64xx_attach(device_t dev) mtx_init(&sc->mtx, "tca64xx gpio", "gpio", MTX_DEF); OF_device_register_xref(OF_xref_from_node(ofw_bus_get_node(dev)), dev); - sc->busdev = gpiobus_attach_bus(dev); + sc->busdev = gpiobus_add_bus(dev); if (sc->busdev == NULL) { device_printf(dev, "Could not create busdev child\n"); return (ENXIO); @@ -281,6 +281,7 @@ tca64xx_attach(device_t dev) } #endif + bus_attach_children(dev); return (0); } diff --git a/sys/dev/nctgpio/nctgpio.c b/sys/dev/nctgpio/nctgpio.c index 75ea1fbdba17..ddc2ceef7dfb 100644 --- a/sys/dev/nctgpio/nctgpio.c +++ b/sys/dev/nctgpio/nctgpio.c @@ -1258,13 +1258,14 @@ nct_attach(device_t dev) GPIO_UNLOCK(sc); - sc->busdev = gpiobus_attach_bus(dev); + sc->busdev = gpiobus_add_bus(dev); if (sc->busdev == NULL) { device_printf(dev, "failed to attach to gpiobus\n"); GPIO_LOCK_DESTROY(sc); return (ENXIO); } + bus_attach_children(dev); return (0); } diff --git a/sys/dev/p2sb/lewisburg_gpio.c b/sys/dev/p2sb/lewisburg_gpio.c index b45d7767602c..3be777ab9524 100644 --- a/sys/dev/p2sb/lewisburg_gpio.c +++ b/sys/dev/p2sb/lewisburg_gpio.c @@ -217,10 +217,11 @@ lbggpio_attach(device_t dev) } /* support gpio */ - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) return (ENXIO); + bus_attach_children(dev); return (0); } diff --git a/sys/dev/qcom_tlmm/qcom_tlmm_ipq4018.c b/sys/dev/qcom_tlmm/qcom_tlmm_ipq4018.c index 2d390cd449af..50f54b896748 100644 --- a/sys/dev/qcom_tlmm/qcom_tlmm_ipq4018.c +++ b/sys/dev/qcom_tlmm/qcom_tlmm_ipq4018.c @@ -346,13 +346,14 @@ qcom_tlmm_ipq4018_attach(device_t dev) fdt_pinctrl_register(dev, NULL); fdt_pinctrl_configure_by_name(dev, "default"); - sc->busdev = gpiobus_attach_bus(dev); + sc->busdev = gpiobus_add_bus(dev); if (sc->busdev == NULL) { device_printf(dev, "%s: failed to attach bus\n", __func__); qcom_tlmm_ipq4018_detach(dev); return (ENXIO); } + bus_attach_children(dev); return (0); } diff --git a/sys/dev/rccgpio/rccgpio.c b/sys/dev/rccgpio/rccgpio.c index b2b775b879ad..dafd0b511fa9 100644 --- a/sys/dev/rccgpio/rccgpio.c +++ b/sys/dev/rccgpio/rccgpio.c @@ -308,7 +308,7 @@ rcc_gpio_attach(device_t dev) RCC_WRITE(sc, RCC_GPIO_GP_LVL, sc->sc_output); /* Attach the gpiobus. */ - sc->sc_busdev = gpiobus_attach_bus(dev); + sc->sc_busdev = gpiobus_add_bus(dev); if (sc->sc_busdev == NULL) { bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_io_rid, sc->sc_io_res); @@ -316,6 +316,7 @@ rcc_gpio_attach(device_t dev) return (ENXIO); } + bus_attach_children(dev); return (0); } diff --git a/sys/dev/usb/misc/cp2112.c b/sys/dev/usb/misc/cp2112.c index d4776ca342cb..201a3ec51ce4 100644 --- a/sys/dev/usb/misc/cp2112.c +++ b/sys/dev/usb/misc/cp2112.c @@ -708,11 +708,12 @@ cp2112gpio_attach(device_t dev) } } - sc->busdev = gpiobus_attach_bus(dev); + sc->busdev = gpiobus_add_bus(dev); if (sc->busdev == NULL) { - device_printf(dev, "gpiobus_attach_bus failed\n"); + device_printf(dev, "gpiobus_add_bus failed\n"); goto detach; } + bus_attach_children(dev); return (0); detach: diff --git a/sys/powerpc/mpc85xx/mpc85xx_gpio.c b/sys/powerpc/mpc85xx/mpc85xx_gpio.c index cb96d768adef..7353ed7bac7b 100644 --- a/sys/powerpc/mpc85xx/mpc85xx_gpio.c +++ b/sys/powerpc/mpc85xx/mpc85xx_gpio.c @@ -228,12 +228,13 @@ mpc85xx_gpio_attach(device_t dev) OF_device_register_xref(OF_xref_from_node(ofw_bus_get_node(dev)), dev); - sc->busdev = gpiobus_attach_bus(dev); + sc->busdev = gpiobus_add_bus(dev); if (sc->busdev == NULL) { mpc85xx_gpio_detach(dev); return (ENOMEM); } + bus_attach_children(dev); return (0); } diff --git a/sys/riscv/sifive/sifive_gpio.c b/sys/riscv/sifive/sifive_gpio.c index ef68d2b39da3..98bff2f72082 100644 --- a/sys/riscv/sifive/sifive_gpio.c +++ b/sys/riscv/sifive/sifive_gpio.c @@ -157,13 +157,14 @@ sfgpio_attach(device_t dev) sc->gpio_pins[i].gp_name[GPIOMAXNAME - 1] = '\0'; } - sc->busdev = gpiobus_attach_bus(dev); + sc->busdev = gpiobus_add_bus(dev); if (sc->busdev == NULL) { device_printf(dev, "Cannot attach gpiobus\n"); error = ENXIO; goto fail; } + bus_attach_children(dev); return (0); fail: diff --git a/sys/riscv/starfive/jh7110_gpio.c b/sys/riscv/starfive/jh7110_gpio.c index 452a3306b4a1..1ed7d9f42259 100644 --- a/sys/riscv/starfive/jh7110_gpio.c +++ b/sys/riscv/starfive/jh7110_gpio.c @@ -321,13 +321,14 @@ jh7110_gpio_attach(device_t dev) JH7110_GPIO_WRITE(sc, GPIOE_1, 0); JH7110_GPIO_WRITE(sc, GPIOEN, 1); - sc->busdev = gpiobus_attach_bus(dev); + sc->busdev = gpiobus_add_bus(dev); if (sc->busdev == NULL) { device_printf(dev, "Cannot attach gpiobus\n"); jh7110_gpio_detach(dev); return (ENXIO); } + bus_attach_children(dev); return (0); } From nobody Wed Aug 13 11:33:10 2025 X-Original-To: dev-commits-src-main@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 4c25pb22s1z64gPb; Wed, 13 Aug 2025 11:33:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c25pb0m6tz49by; Wed, 13 Aug 2025 11:33:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755084791; 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=sp1ydZsA+Ko8y1qu0E0ZAjdbyfCVvehOEd4/jx9zqr4=; b=E17/L+kaevj+fRwbuENdtFkSQd577YiFbsub9U5bZ1A2Q1jSFMLtDq1Jr/9+IktUBRvkUW JX69hHAlwkEejnG+KgtIKIDaWXLAwjtaLHTktOcLHQt5vOAoxrAqccnTf09op2v8+z+Grq KfSD/aOPmVImTqyJzRCLgdKSwTsSN5+AdoKaWbucsZTrgCgzwSLcp8LkDAo7mKfCT2Xipd XeXfaS2dbt92KP41Q4DYfXQ9tcG7HvakG7C9QFHYSN7N367TOEF1s3L2zU0L6rFX4DWc7o k7Y48iueOb8w47ja8CVb7U3n+LH+FcWjeC9s09Fkb6qkMxBCCUWXC0BRIa6t9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755084791; 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=sp1ydZsA+Ko8y1qu0E0ZAjdbyfCVvehOEd4/jx9zqr4=; b=mi2KQ2rYL6qlpgQHhy6MSXNy7kV+K8XPsbK/OvINmQd9+u91DJnELfqfdEYrDRvM1m7aiS uQzJxc6i5mEVUJDZy0Rlny9THVIW9NMfVfRHVzqy3a4hfrFNZs9BCZ+fD5ICGKBbH2060h wwI4F3Qh3BeFSsFl7+VKciAQTYxFRzoM9ijUetZNKWFvSA8ThTSCFWFYOl5k9FU7zJs6gT czcqo1GulYS9pa/wWx9b5HEytTy/oMTfxa1onGsiTinCUtgKlNDC7HTa/BZJ9BMxYVksgs JRWt0O7n3H5I8ulY7S1h9WgxFcq1YJS7sQsPRxiXl9/3Nnnp5U5wP2QLseiTUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755084791; a=rsa-sha256; cv=none; b=u5NILwiWI6jGU/d9U1AcgY0c6m9Pgabz/1/vgo6sxfp+RsxVTrxjCbJBqfWrdT48gnx9Ke 6+kG2jcQEfVtp1lRbvoa8lIiyBT2k5oJdban35ZfysbpvKfRGaXIw2Q8aFCB9emJdFOfjC tpH9QkaXgIYSYtxmN39LRwW1gRNQCzPPASnJMsrEyV3viKXW1hSGehOqDTd+pRlKDUO2t5 rcddEFLipybI+Iu+toGv1FKChsPNN9yAjqzY9/5Z9UutwQ2SINeVyG4JZq7e03opwnfqa2 65cetDoEWcCqpraFyUZsBEXiEleR81NqlgjUNOxvVy62pymSNfolgbR933LjGw== 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 4c25pb0M63z1L56; Wed, 13 Aug 2025 11:33: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 57DBXA6U057168; Wed, 13 Aug 2025 11:33:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DBXA5i057165; Wed, 13 Aug 2025 11:33:10 GMT (envelope-from git) Date: Wed, 13 Aug 2025 11:33:10 GMT Message-Id: <202508131133.57DBXA5i057165@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: f13e8ea08310 - main - bump FreeBSD_version to 1500060 for gpiobus changes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f13e8ea08310fe8a0d8bc7817ae428939f8e5144 Auto-Submitted: auto-generated The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=f13e8ea08310fe8a0d8bc7817ae428939f8e5144 commit f13e8ea08310fe8a0d8bc7817ae428939f8e5144 Author: Ahmad Khalifa AuthorDate: 2025-08-13 11:14:24 +0000 Commit: Ahmad Khalifa CommitDate: 2025-08-13 11:14:24 +0000 bump FreeBSD_version to 1500060 for gpiobus changes Bump FreeBSD_version and add UPDATING entry for gpiobus changes. Reviewed by: imp Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D51579 --- UPDATING | 6 ++++++ sys/sys/param.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/UPDATING b/UPDATING index 78562d021e37..c4452354b189 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250813: + The gpiobus_attach_bus() function has been removed. Drivers should now + use the gpiobus_add_bus() function instead. The difference being that + gpiobus_add_bus() doesn't call bus_attach_children(), calling it will + be the responsibility of the caller now. + 20250810: Support for Secure RPC DES authentication has been removed. The keyserv(8) daemon was already removed, but support for it in libc diff --git a/sys/sys/param.h b/sys/sys/param.h index b9942c7bc2fd..c410a6ee666f 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -74,7 +74,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500059 +#define __FreeBSD_version 1500060 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Wed Aug 13 11:33:12 2025 X-Original-To: dev-commits-src-main@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 4c25pc4phsz64gHm; Wed, 13 Aug 2025 11:33:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c25pc1ZNYz49hk; Wed, 13 Aug 2025 11:33:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755084792; 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=uvCtk6yPOSSYl1hZ/6nfjDYC76bznMPV3AH+iZJFtyM=; b=ldEitrReUTnICEWzWMSW/cr5gFyfLorCFki/u4mxxn3gans6eu/Iwb1smtAQ8lAoY6RKmr BZSIUDTwhJFb0KZDhe0WMjTb/7h6PDcGCOULtJqOl+tGsPeqX/Ib0YR2uePyrjybPBjMKC k4K0pNqbQpWWGM3gIKMzqmoXPoMpcbQJ9py+8NNa4c8Qrv8y8CiMdb1SSooZcBtK6zzLTG QbAI2XD3JrN63ebM7fOm02PaZS8B13BTiMT96wMPIeRyUxPYZAyvxxv9Bnsy+t5eFcKO9p MWDx5WqwaNu3GZKjWR5Bv5yydMQeoE1hWlaHLLX/m572ZtU0dPik+OpvfJ/gJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755084792; 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=uvCtk6yPOSSYl1hZ/6nfjDYC76bznMPV3AH+iZJFtyM=; b=F2ScNI3bX02dT6zQyB+knRj12QXAYZ7X81Ud+nBac7/zHkTu3n11zXs3bNLSZR7WX4R6Ft 0M0l7qf/tad7hhsceeY3hZsndHjq/jd00m3M88ye3TtCUWx01lBeEGf5neE+HbD7njIF8q 6TgZOYXdcPp2QnVpDM232zZkk1noUG/GY4H2msAwe0YW37N3qt3vu9j9YuJYO8qyLL46QO PirEGFyO4VqnCCgoTPJlPnL5UvZ8JcaT5L3BtjsI96bQXrAekDxFNDWPEsOcpJXVAO/pTc JxGC4KdcUJjpFCEwqsFHQq6pELr5kJ5vUND5A2Ho+b4qsizOqxu6lvXYUejtUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755084792; a=rsa-sha256; cv=none; b=d+Atsl+mvHV14T5NZVpC2As9fNXONsWgs+0EvPRXJ2U/Eylo5OPaTY3vliSrVrSc89X0ei Sxyb33DIMHF/woE7rPLiVL5n3x9mHN+XFPD2y82RXAQ6iprs959mrkN8j9VoO3GhX3j7Vs a4bpxAN/NHnWu+lfZGy8riDQkZ+wilQbdqydHzseIlcaUl4bI3yZSOeJh+Ol4DArkxLoc6 AyzjDP7Q2tuAza4PR9m4Dc3iJ3hhrpbqn4eyx7pEV55eke1pByqvNKAaauRyCdh1rzUdvk avLUIt+Hgc9fa58IppTnBNRhpOR8RGqlfgSkuk2jBHh9m9fpoB50vW+Jg9zFMg== 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 4c25pc10qnz1KZD; Wed, 13 Aug 2025 11:33:12 +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 57DBXCu6057207; Wed, 13 Aug 2025 11:33:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DBXCf6057204; Wed, 13 Aug 2025 11:33:12 GMT (envelope-from git) Date: Wed, 13 Aug 2025 11:33:12 GMT Message-Id: <202508131133.57DBXCf6057204@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: 0e5e956bb393 - main - acpi_gpiobus: style nit List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e5e956bb393ad3665b552763db56f4a18893fbe Auto-Submitted: auto-generated The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=0e5e956bb393ad3665b552763db56f4a18893fbe commit 0e5e956bb393ad3665b552763db56f4a18893fbe Author: Ahmad Khalifa AuthorDate: 2025-08-13 11:15:06 +0000 Commit: Ahmad Khalifa CommitDate: 2025-08-13 11:15:06 +0000 acpi_gpiobus: style nit Reviewed by: imp Approved by: imp (mentor) Differential Revision: https://reviews.freebsd.org/D51587 --- sys/dev/gpio/acpi_gpiobus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/gpio/acpi_gpiobus.c b/sys/dev/gpio/acpi_gpiobus.c index 94f4e5771266..170f23615416 100644 --- a/sys/dev/gpio/acpi_gpiobus.c +++ b/sys/dev/gpio/acpi_gpiobus.c @@ -383,7 +383,8 @@ acpi_gpiobus_detach(device_t dev) } static int -acpi_gpiobus_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) +acpi_gpiobus_read_ivar(device_t dev, device_t child, int which, + uintptr_t *result) { struct acpi_gpiobus_ivar *devi = device_get_ivars(child); From nobody Wed Aug 13 11:33:13 2025 X-Original-To: dev-commits-src-main@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 4c25pd5yzrz64gFb; Wed, 13 Aug 2025 11:33: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c25pd2gGpz49nP; Wed, 13 Aug 2025 11:33:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755084793; 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=ZeSI/MWitKQGMlziejEabQT14dorgm+6/d9G7vC8hlY=; b=YWfB2eNA/L60Spaxju/6h/EKw1USlrJYd0YiU0DNWXIwn2dYfKR9jsi9+pyN0H4SskZJjz hoBsbDOUFUFKIuIdAf/h8Eb2bZDGJc4GnCk9nCLwVHPDbKCGTJiiAMiYsxt0rd5qoRybCV uRinfM7XSb/najc0elUgieWaoq9CTUO9NZUczR8CPZs8V1NMGcXWuGAHTux2XR5/hEKilX At98D9BuAh5qoj9074J2UmTwNhifE7rZjVq2FSsRqkGv6/5Ziob3jSUXctoAGjPGRZQt3V zqX57g5JXfaSiEFjxRor8hoNtj1XGgNeT/oPvVRqh0F4ZKl3sUmxipsIJAgh7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755084793; 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=ZeSI/MWitKQGMlziejEabQT14dorgm+6/d9G7vC8hlY=; b=PvDm0bFOt0pkxH+A0WkRjEtVYot1NAW5O02E/mDP7qeusxPk2ayUZvgRpO0yjeddOStE2X vVIkFTEaOUqrHzpY8AeK+igtbIeyl9MUJi4vHzcJgPTEAhC5BQ/tfVCfN0fv9UJ7MAyZaE AaBofHPQLDdwmtBw+Ey5Bn2/YdOwoud1I2BmG01yzi5Pa108xLJVVp0sR8tavhMdEGXf2W +7+ZljPtRTPsFP2GARX93qETLr64hwG/y1/L/4lO21TA+1fKGppbed7oZIUr56VCsCEiNn XkcQmCX+JKkxAkUhJ0/NTUK0jeitKU1KrT+JTetcNovLbXNM7uOxZI9w/NO/RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755084793; a=rsa-sha256; cv=none; b=VgfU9JwM7ac+gL79io/hi1271eX+fl9KifV5OModQTDEUGVrlcX4dC7NYXlnGhFBYP3s2e Y5Std7KKt+d3rXnKh0LVYfNmOcqYxlvg7M5ITYu5PZSmEay60qFjv3Om3F3hepXv5aoNsX Nnq+iRgl6H8lOnVdx7P3iwOMrfBLfTkJjMNKYquXy8wm7rliJRkaP0LYjjr1om4j+WeyEQ +PMxplpcFZN7arzkY+oNiP+/qSuOtZD8ozrZAJmuHL05FppC+2uO0+Pbi6VuuJ2sDRz2xB 3i2Nmd2iMRYmK4TOvqcbStcPU+JF8WahJ8HfSqRnDyLK7nghuXCsdiHDeM4HAQ== 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 4c25pd1zVLz1K5S; Wed, 13 Aug 2025 11:33: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 57DBXDVd057239; Wed, 13 Aug 2025 11:33:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DBXD2D057236; Wed, 13 Aug 2025 11:33:13 GMT (envelope-from git) Date: Wed, 13 Aug 2025 11:33:13 GMT Message-Id: <202508131133.57DBXD2D057236@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ahmad Khalifa Subject: git: 28bac28d9074 - main - gpio: Fix incorrect dev being passed to gpiobus_detach_bus List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vexeduxr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28bac28d90740b2bd48e532ad7500d2f46210413 Auto-Submitted: auto-generated The branch main has been updated by vexeduxr: URL: https://cgit.FreeBSD.org/src/commit/?id=28bac28d90740b2bd48e532ad7500d2f46210413 commit 28bac28d90740b2bd48e532ad7500d2f46210413 Author: Evgenii Ivanov AuthorDate: 2025-08-12 04:17:13 +0000 Commit: Ahmad Khalifa CommitDate: 2025-08-13 11:15:46 +0000 gpio: Fix incorrect dev being passed to gpiobus_detach_bus Passing in the busdev will not detach from the bus correctly leaving the /dev/gpiocN entry Reviewed by: vexeduxr, imp Differential Revision: https://reviews.freebsd.org/D51857 --- sys/dev/iicbus/gpio/pcf8574.c | 4 +--- sys/dev/iicbus/gpio/tca64xx.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/dev/iicbus/gpio/pcf8574.c b/sys/dev/iicbus/gpio/pcf8574.c index 86c78ffb15e6..bf60dec67557 100644 --- a/sys/dev/iicbus/gpio/pcf8574.c +++ b/sys/dev/iicbus/gpio/pcf8574.c @@ -159,9 +159,7 @@ pcf8574_detach(device_t dev) sc = device_get_softc(dev); - if (sc->busdev != NULL) - gpiobus_detach_bus(sc->busdev); - + gpiobus_detach_bus(dev); sx_destroy(&sc->lock); return (0); } diff --git a/sys/dev/iicbus/gpio/tca64xx.c b/sys/dev/iicbus/gpio/tca64xx.c index a973ef22f3fa..ab8fedd3f8fd 100644 --- a/sys/dev/iicbus/gpio/tca64xx.c +++ b/sys/dev/iicbus/gpio/tca64xx.c @@ -292,9 +292,7 @@ tca64xx_detach(device_t dev) sc = device_get_softc(dev); - if (sc->busdev != NULL) - gpiobus_detach_bus(sc->busdev); - + gpiobus_detach_bus(dev); mtx_destroy(&sc->mtx); return (0); From nobody Wed Aug 13 14:02:37 2025 X-Original-To: dev-commits-src-main@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 4c29712myFz64wQb; Wed, 13 Aug 2025 14:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c29711Qj7z3X5S; Wed, 13 Aug 2025 14:02:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755093757; 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=X044qEH1+HU3HXas00RFDLbgqPN9JM5OpU3IulHxs34=; b=cKdmiJ5B0FnMNGs6G+yy/qzKCSuD9Jo6ohwBfgK7KYlikNUsTun3CVpFkQiZzhHQ0AgB0U rB38ujZ09bGv0veaXZhKBynUDrD86oHAuOPAqz3ia2CSbyAXniJbuTF+/r9hMFkTeWPN1j UryXpmpm4j4hcAkeuiDgysRSmW2T4Hti42q2b44JbXwr75lGiisQeIqDsVB0uONNrpMFE8 5RMLEA1BEWhwHShm0q7omB1uZ0rdHCKFT8xubeOJzea/3dBdSV2aVFVcQUDOKWtwrIlA8J 4LZsd5+e4EZyWAdvNlB4JdXHijqO9K0af0NkkIJk2WYFUAZC4ajNi4Wfv1ruBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755093757; 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=X044qEH1+HU3HXas00RFDLbgqPN9JM5OpU3IulHxs34=; b=KGRRQ4vTK4Q4oy26oBz3AX8M46KxjGZvEqOfAIU6LZJEwG3H/ghm2bQwpwwT3cUBpxsGlX TTDzdTZa97Bs2AMwP1FQq2pyfOsJIbGMFTImbMKVbWJgpH1/HgC0p3QDussacAh/WP1JFD U7wIlsh3EXlO4hKATLOXnJRJlZlnrwuzGUoUyku/ZiDV1dWEoVHPkhDI6TMCdsh6Msp/d3 FXnMZALRRaZPFGx0eLxaBGt/u/8MgPNNjhgqovKjuk7VfXSZRAA62OwExieIjL+ie6eL/N qIwXVlk1sRRJO8Wco/cjzqQK2uY8N/PLBSUMdRnBF4wGhcFSVw8sNt+mCFYjRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755093757; a=rsa-sha256; cv=none; b=ZvO28YzGcTnan7x7FklcP5Ykb7IL+znCC6cYgU60aIMlwnWb+/08vkX25vUAAec33t4357 sSCKVWGELCgpDzqr4RkqQK80FHr/r1QXBKUNIfKB0QL/jJTt0xihtwx4z/kVvz/kmHh2jw d1XX5HL5v/ivW4f/ySHlsfZycT0aTK9OlBD12SCy9JCV5FDQtgFFUsYlARR2FmCrEpziz1 cY25ReGI2h9eUFZxAuVlYUeJ1mP+Vyo9/UHTRvAlj27TyqAULmKLwBCi7iCvYWAvS4q1aY D0r0y590K2SDZfcaEtlJMrUmLbKJdH7mxjXiCEM/xYx+VMdJv2SxpFeA4PmmzA== 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 4c29710vx9z1P6b; Wed, 13 Aug 2025 14:02:37 +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 57DE2b8A040442; Wed, 13 Aug 2025 14:02:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DE2b4q040439; Wed, 13 Aug 2025 14:02:37 GMT (envelope-from git) Date: Wed, 13 Aug 2025 14:02:37 GMT Message-Id: <202508131402.57DE2b4q040439@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: a685a263b803 - main - uart: Add ns8250 ACPI entry for SPCR rev 2 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a685a263b803012d9546abaca4dcf52f80c6b8d6 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=a685a263b803012d9546abaca4dcf52f80c6b8d6 commit a685a263b803012d9546abaca4dcf52f80c6b8d6 Author: Justin Hibbits AuthorDate: 2025-08-06 20:46:27 +0000 Commit: Justin Hibbits CommitDate: 2025-08-13 14:02:14 +0000 uart: Add ns8250 ACPI entry for SPCR rev 2 Summary: SPCR rev 2 adds a series of new device types, with 0x12 being "16550-compatible with parameters defined in the Generic Address Structure". Since we look for the parameters already in the GAS there's nothing extra for us to do beyond adding the entry so that it probes successfully. Reviewed by: imp, andrew Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D51771 --- sys/dev/uart/uart_dev_ns8250.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index 56db0b26487b..c38d50e54ad8 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -495,6 +495,7 @@ UART_CLASS(uart_ns8250_class); static struct acpi_spcr_compat_data acpi_spcr_compat_data[] = { { &uart_ns8250_class, ACPI_DBG2_16550_COMPATIBLE }, { &uart_ns8250_class, ACPI_DBG2_16550_SUBSET }, + { &uart_ns8250_class, ACPI_DBG2_16550_WITH_GAS }, { NULL, 0 }, }; UART_ACPI_SPCR_CLASS(acpi_spcr_compat_data); From nobody Wed Aug 13 14:03:48 2025 X-Original-To: dev-commits-src-main@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 4c298P203xz64w5w; Wed, 13 Aug 2025 14:03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c298P0Sq9z3XJV; Wed, 13 Aug 2025 14:03:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755093829; 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=vuiUrNeXEwJuZ7fzR4dqbRZpCsu9WtnHSIrFuyOzLFE=; b=SK8IWf/cNu44iBLnC3W1ptPr6DSBZLpC+D5Erx/TgCkjcSa9okIsSkqaIY9krG/mnYHcUs O3bYzIyZCwVeZUT5SLX9ySOvVODJjIdd7L4Z2FOpu9wz89WJ6AL4CPfaEVcf+eMk0p4HP4 YB92agWvd1u4LG4kweLtmeKvR0ja8jOoDUKx+hm+1Xpfn2Kd85L5FpKjvqPrH1nz9o5Jn4 veJ9jZvVO8yUZugNrMf5n9EzRSvqXLjUSieMKtsgImkuxgnCalbUuT0utYa+dYKGOlG3na ihd5R6/uqxubSDiRB4ySg4dKRUMQ8uAR3BkyFBe01TCrVQgBU7HISMCw6OQYRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755093829; 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=vuiUrNeXEwJuZ7fzR4dqbRZpCsu9WtnHSIrFuyOzLFE=; b=GBlFjiX+63QavT43qCs6pxBi1KlKGK/DAM5RdtKx/R7LzqduDF+jFT6DbRszkulg3BuUg1 dfhSpMYga83S+JXBZ2+jtIURXiwk1hcS/hQzhpuw6yRXcXXXAROs8y5W3fKHi2at6ktjG5 LshGJ7PQdQsMMfjk11j59Mbq2eLDaSeNIpO/2LDlHSZTDqy4D4Q0AmzdO6jqTOru8Dy66t 8C3lXoP2hNDzRBy14zuZijW5CMekjggKY+JZEP+MR8elq2/n1sPwIPtuz6oO7N/GkUhEv1 pJfAM56yjJ+KDO4LY3tBP/+5vGy/Ov7mvxS3xdWU4qKE571E5rNsvWOmKF7TdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755093829; a=rsa-sha256; cv=none; b=uIhoveaSINDegF98djvpf+eEfYQXTj+qHPQluoRaGdgJRL+mtgLIypN8acrVFwT8f0H5pM a73TTIq2OJ4ceRYFvhH0U6e6+Nke1OUeoUOi4dydJvo49iS1l80mPLDkIK1zE9U15b6pTW x43IDUWYaGf0UAozBhvW/Lnt0g5NwqyhQv/eo0v76EQfT7QyzhkbRdxgz88TBm9F78CiKE BvjGnVX/BGXwjbIRhcHCf4sXl3qiwl38ShGjANvZ6hEYZSRezBgR/jKLo5Gs8lKVlR0LGQ nRBvyBj813T0OuBPrqpoTtIaQf2qdUziyfPYxP54tRVoHJ5KqAMA7w1/wMwkzA== 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 4c298P01p6z1Ph0; Wed, 13 Aug 2025 14:03: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 57DE3mRK040922; Wed, 13 Aug 2025 14:03:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DE3mU0040919; Wed, 13 Aug 2025 14:03:48 GMT (envelope-from git) Date: Wed, 13 Aug 2025 14:03:48 GMT Message-Id: <202508131403.57DE3mU0040919@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Reifenberger Subject: git: 235071bd9816 - main - Modify nanobsd/defaults.sh to reduce buildsize, buildtime and increase imgsize to fit. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 235071bd981647a4adfdb500c77cd2603790958c Auto-Submitted: auto-generated The branch main has been updated by mr: URL: https://cgit.FreeBSD.org/src/commit/?id=235071bd981647a4adfdb500c77cd2603790958c commit 235071bd981647a4adfdb500c77cd2603790958c Author: Michael Reifenberger AuthorDate: 2025-04-18 09:53:46 +0000 Commit: Michael Reifenberger CommitDate: 2025-08-13 14:03:32 +0000 Modify nanobsd/defaults.sh to reduce buildsize, buildtime and increase imgsize to fit. Not building debug symbols and tests reduces _.w/ from 1465 to 503 MB. Increasing the mediasize to 6000000 let the image be built. Otherwise I get: ... 00:33:58 ## build code slice 00:33:58 ### log: /usr/obj/nanobsd.full/_.cs /usr/obj/nanobsd.full/_.mnt: write failed, filesystem is full Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D49885 --- tools/tools/nanobsd/defaults.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index 65bace957f71..59ae8d92f4af 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -79,7 +79,12 @@ CONF_BUILD=' ' CONF_INSTALL=' ' # Options to put in make.conf during both build- & installworld. -CONF_WORLD=' ' +CONF_WORLD=' +WITHOUT_DEBUG_FILES=true +WITHOUT_LIB32=true +WITHOUT_KERNEL_SYMBOLS=true +WITHOUT_TESTS=true +' # Kernel config file to use NANO_KERNEL=GENERIC @@ -104,7 +109,7 @@ NANO_NEWFS="-b 4096 -f 512 -i 8192 -U" NANO_DRIVE=ada0 # Target media size in 512 bytes sectors -NANO_MEDIASIZE=2000000 +NANO_MEDIASIZE=4000000 # Number of code images on media (1 or 2) NANO_IMAGES=2 From nobody Wed Aug 13 15:08:37 2025 X-Original-To: dev-commits-src-main@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 4c2BbB2gV0z642XR; Wed, 13 Aug 2025 15: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2BbB0wHtz3fkf; Wed, 13 Aug 2025 15: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=1755097718; 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=AKvSSVb5L/fcML4S482Pp1zpOZn1kB92SSOFJ6XYCCk=; b=KYqEVPmcSTwRlXjFe1yxQXDHRGh5jjjqDMUAuFozlElB3gK+7sbBZVYhCUT60hQvC88pqP L6useGBr4ajkj9nj4JZlNPwGUKdkx3ZExPNbW5kwBjL7eTXaoYJVxjSf/gxomCmV1by/hd mrHp0jVWhIw2foOjpIU6OHjbegxk9g68sq5CZE9qGWGXMBj3TiF/1jgDZypGK2V7gVu6Fc aCfwrud+9/u6YBBKH5mYY31ScIe/mlh624yN8fP11iJQA4o9lHaEkxZ0iAn+7rb8VKNNks aVC2fM1U/1EC08Q5WgACrd33b4ComLJzivGz9OHmYueDjkdVn4id6/GsXTyLlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755097718; 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=AKvSSVb5L/fcML4S482Pp1zpOZn1kB92SSOFJ6XYCCk=; b=dZlwTtaAtnS52+y/XxRWxpp+A62AMsGFSMIZZ0u9rzyaa7k7jb4D8QEqfgtk7qvLhhtziX E2gnXLzpqXMoAgjNfeWVazQJQc9S/0wpkPj3NR4N2ht99M0eFQvzqP9BoqGbjet0+Zft8z UrQU6vznkuQgjBWjEOA7xECKroHcBfqzVeAX+SmfaqYEJufuBa88VegFpCsbG3S2Uw5KqK 1IRVEI2NLHESC2JejefGj6VI0nMzE7BHkDsugmMYbK2Pgj5oyOmF6uFOCNdaPrxvYS2tTr f1w3UyrmYmWDDaM/Ws2WMXleIxIpLP8yBDa09+Tgr90mMtrruIxJZ1hkIoUDVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755097718; a=rsa-sha256; cv=none; b=JWZk+xCOui020wAN5yz0LB/bKVX3qjw35ZFcMNfgXa2ULWiL3cScGDrrstI9v4aOjbYWvM vPMgCfmvxMuZbMpzVqJ1zUoeZAnl/Hqb9+OKu6lQLIRvpTRNQhYzURh4+0APeC0BhOMDl8 MZrP+rgvjp56ZTsbGGZtmFL4q8g3j+GmUFGgKhRQnGufrpmdQJGp3kbgeSFc+Do/0e0jE9 zn0W33o8PblIFeYXOwFYobgWlc3KEFO4dkZYm4+gasWXlvK8BFPEo593+lh3pfkFfevT6E TfNHkRrDRYNQP0MByZEIiqr9SZxSUvFJY2EjlZe7keHkH6KLcCUO15nn996hqg== 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 4c2BbB0Kg5z1RWr; Wed, 13 Aug 2025 15: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 57DF8bp2055191; Wed, 13 Aug 2025 15:08:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DF8bM7055188; Wed, 13 Aug 2025 15:08:37 GMT (envelope-from git) Date: Wed, 13 Aug 2025 15:08:37 GMT Message-Id: <202508131508.57DF8bM7055188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: dec341af7695 - main - pathconf.2: Add an entry for _PC_CLONE_BLKSIZE List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dec341af769568090fd439b5ea69fc3cc4bfcd89 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=dec341af769568090fd439b5ea69fc3cc4bfcd89 commit dec341af769568090fd439b5ea69fc3cc4bfcd89 Author: Rick Macklem AuthorDate: 2025-08-13 15:05:35 +0000 Commit: Rick Macklem CommitDate: 2025-08-13 15:05:35 +0000 pathconf.2: Add an entry for _PC_CLONE_BLKSIZE Commit 37b2cb5ecb0f added VFS support for cloning, including a new pathconf name to acquire the clone block size called _PC_CLONE_BLKSIZE. This patch documents this new name. This is a content change. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D51851 Fixes: 37b2cb5ecb0f ("vfs: Add support for file cloning to VOP_COPY_FILE_RANGE") --- lib/libsys/pathconf.2 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/libsys/pathconf.2 b/lib/libsys/pathconf.2 index 79ac8310000d..5a983a3a13e2 100644 --- a/lib/libsys/pathconf.2 +++ b/lib/libsys/pathconf.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 5, 2025 +.Dd August 6, 2025 .Dt PATHCONF 2 .Os .Sh NAME @@ -187,6 +187,11 @@ and flags can be set by .Xr chflags 2 , otherwise 0. +.It Li _PC_CLONE_BLKSIZE +Returns the block size required for block cloning via +.Xr copy_file_range 2 +for a file system if block cloning is supported, +otherwise 0. .El .Sh RETURN VALUES If the call to @@ -264,6 +269,7 @@ Corrupted data was detected while reading from the file system. .El .Sh SEE ALSO .Xr chflags 2 , +.Xr copy_file_range 2 , .Xr lseek 2 , .Xr sysctl 3 .Sh HISTORY From nobody Wed Aug 13 16:21:39 2025 X-Original-To: dev-commits-src-main@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 4c2DCT1RRRz647kq; Wed, 13 Aug 2025 16:21:41 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2DCT0ZSnz3pf1; Wed, 13 Aug 2025 16:21:41 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755102101; 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: in-reply-to:in-reply-to:references:references; bh=RAK2QYHf80uDXtxzfKwY7AOth9Ng+zDkHH9Q4SYhWc8=; b=q1ChmIxBKC47RhBdF3Hru0qK5nd4p0MJwAQV1RlOJAQgTSZrlEt3Iy6DscNm6G2a/H9/il smquVRdfZJOgHOJWe73jrAgkplV0b9r+zJQbNnDOGgbvVLMLC00ZVzbZsV4t90emnWJyGa +Yxizom9VTW34mLLPazux4oUfrAcMhvvm4CYoordl8d//NTvnWv8lxlbdqe+a4bEyhmGbA nhHz7or67PHo5kpNFMUYZwr1vGDoRbQuMnfooh8tHqxWnIozhQjleGnC2PrbSTjk9v9nAJ tP2CpkAY39P8Rm3CzwfAGhdAzveNucEX3RAybQrqB9ILBkE6SKMdvk1O9br4Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755102101; 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: in-reply-to:in-reply-to:references:references; bh=RAK2QYHf80uDXtxzfKwY7AOth9Ng+zDkHH9Q4SYhWc8=; b=HifEfsVJeNz9l3HSCDK3a5AeNVgL5h4iOEQU158ikIZLEF1SxiA03sls4rPDUauoy9cg6X DimXywW5FgClqYNMKWUTJdLHYSYEV1U/3Zjl1l2g/1tBa00nWJDHDEUYG8rg8gNIO+lXuW VMNw+lIDLG+CY21JW64/OmXJkfW+HaEMWKVcscZMGP33mruACbJApTFEiQxGesnZP3fcXg HLhJxaPSrYF5PpDVnmiodkhWKhaGqCegRwlwIhyD9Pq/JRLNTgKNoul8qtb9lN6w30VM5K qBBrD9QyZ0276js+/lw9qx5MXs7PwthTwScxxgW6jgC67jRX8puJwNz5EurVuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755102101; a=rsa-sha256; cv=none; b=GMYHsR63NFql8fB068KfDS6KQtxKC2ApgWHhKFzMQbJWP5a9xEP+344vlPOYm2RfymtQCY rh/CEcwzHbpssqAyOum6CEXxDjkaeAk0+pzge3m/OX3ObY7ObKYrEpm5dnFNjX7kYWWSq5 Grd0pHxQ7oKthqXXqa5Jiw9AZkwNBLNhJ3Kuf4ePyPfvHmGWx+8fn/+MnSfRBtda5uO890 xpeOv3UtkbdcpQYBy3gbZc/yrXa4SbaAt7AU+ly7HfybtdgWK9DpynPxbwrRaSBFtxvFLF EddhROgMhodM1XDeTI6NuJ+WMkSvVFZ7uOsmfDdN8YXLrlyhI+L3P4lw8/FBNw== Received: from [10.9.4.95] (unknown [209.182.120.176]) (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 did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4c2DCS4pDzz1GDZ; Wed, 13 Aug 2025 16:21:40 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <13572e72-c061-4c89-82e0-0b72bf833cb5@FreeBSD.org> Date: Wed, 13 Aug 2025 11:21:39 -0500 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: babab49eee94 - main - chroot: don't setgroups() without -G having been specified To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202508121230.57CCUuHn045783@gitrepo.freebsd.org> Content-Language: en-US From: Kyle Evans In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 8/12/25 23:14, Philip Paeps wrote: > On 2025-08-12 12:30:56 (+0000), Kyle Evans wrote: >> The branch main has been updated by kevans: >> >> URL: https://cgit.FreeBSD.org/src/commit/? >> id=babab49eee9472f628d774996de13d13d296c8c0 >> >> commit babab49eee9472f628d774996de13d13d296c8c0 >> Author:     Kyle Evans >> AuthorDate: 2025-08-12 12:14:38 +0000 >> Commit:     Kyle Evans >> CommitDate: 2025-08-12 12:30:23 +0000 >> >>    chroot: don't setgroups() without -G having been specified >> >>    We previously would not have setgroups() at all, but now we would drop >>    our supplementary groups every time.  This broke chroot -n, probably >>    among other things.  We need tests here, but lets unbreak things >> first. >> >>    A future change may try to setgroups(2) when -u is specified in >> addition >>    to -G, so predicate the call on gidlist and don't populate that >> without >>    a grouplist. >> >>    PR:             288751 >>    Fixes:  48fd05999b0f ("chroot: don't clobber the egid [...]") > > Thank you! > > This made the FreeBSD-kmods builds happy again. :) > Excellent, thanks for confirming! Sorry for the breakage- From nobody Wed Aug 13 16:55:24 2025 X-Original-To: dev-commits-src-main@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 4c2DyN6MK5z649p4; Wed, 13 Aug 2025 16:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2DyN5fm4z3sBv; Wed, 13 Aug 2025 16:55:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755104124; 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=GlZ4T0+NfGfIwudtqXJ12gR3ZLfovscJw0qBrIGSCo4=; b=CB7imobOJwEifoWGtVymupQjJZotpVc/KfJJ64YQ41Z3pe0wMXeKSZMVu0a1yPcpQbIy5H zA5bKczwhFezKAQc9O6fHZVdNR7P8V9EXHs4e190iBIe7kWpHs0njH5CGlVJmui0aUjRDD 17ZZxhA+Ejq9GnhH04bq1+IB0WeL1Y6MG8uQY46r+wVoyTLm8HWaYVrnzqoLJ7UPS8kJiY oB9tP0nUOAdzlItymw1U7ylxXwkJ/5qHhZypiSfBeND0QiYwxs5BiiyXhECgtX4NKKCxJq ye/CgQ3GxVSJ8DhyOGnw5wjqKVkMHFeeAkReiFuoasd257ZKtOuVJxRV0cmLOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755104124; 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=GlZ4T0+NfGfIwudtqXJ12gR3ZLfovscJw0qBrIGSCo4=; b=G6sagSruI2yC0VoCthGMjpoiALsqJHQtyqCESE6wPWCU+T0/ckpnZKozf43rhRCgRlevKG sxZ1eropDhGpuRp4DdCyjavE0FP7Cj91gmDcLoVxDadDnryccUq5OwjKdutlKCIrfjL+rJ 6/AArmVudJYVUjSJi69Milxts/blDAlr0HhAxvDxo6pjXEcGGSnXa1uPG2jWgOiFeNQwAH Wz9kIWzkEt//8Oei2p+uYghQmM1zjqrMuLnwDlIsIrUrISRpzZrLPUzbsxwu7KC6JOZsXe ljyjw9zo+eahIF0uz1WmzR2bFvjElf0RyWKnGsvVfv7djMd3zqqeipqhHX+Otw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755104124; a=rsa-sha256; cv=none; b=lnl7ZlQ2/TErICChZXiqfgsKTIshTPAnl22GSoswSQiOoIRLle8/qM/onDjlJCNMYfey4P UE8uq8qBl7uKg4kxLpVN09BCarLzxRzC9HDTS5PxYvTxQtJcCwe6H8IDcUP0ZX5KIQBo+M XFnmy46nNPPszucJftqEbWZJwJ//onU/j+c6G+AMFUGG13NRq7skC6nXJgcVxx9VOZ7m2u PoOY4bZETB8A0RJmQNP5tYc13FWEiaKWT8JupNbylepOY5ORmrOH94bF0/1QELA5/iuNRe lb6o5OgGGZa+IgtDYmTGtErGiewR0PbdZjoNytXyJK6+e0I6anRF/7rJzAGq9A== 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 4c2DyN5FJ4z1Hp; Wed, 13 Aug 2025 16:55: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 57DGtOaa061598; Wed, 13 Aug 2025 16:55:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DGtORI061595; Wed, 13 Aug 2025 16:55:24 GMT (envelope-from git) Date: Wed, 13 Aug 2025 16:55:24 GMT Message-Id: <202508131655.57DGtORI061595@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: fa085cc78673 - main - tcp: fix sysctl name in the gone_in() printf List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa085cc786731b9c30de54dc980470086d4768b6 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=fa085cc786731b9c30de54dc980470086d4768b6 commit fa085cc786731b9c30de54dc980470086d4768b6 Author: Gleb Smirnoff AuthorDate: 2025-08-13 16:54:41 +0000 Commit: Gleb Smirnoff CommitDate: 2025-08-13 16:54:41 +0000 tcp: fix sysctl name in the gone_in() printf Fixes: c3fc0db3bc50df18a724e6e6b12ea4e060fd9255 --- sys/netinet/tcp_timewait.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index c095fc8f7765..ce63fcf9ffc0 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -101,7 +101,7 @@ sysctl_net_inet_tcp_nolocaltimewait(SYSCTL_HANDLER_ARGS) if (error == 0 && req->newptr) { V_nolocaltimewait = new; gone_in(16, "net.inet.tcp.nolocaltimewait is obsolete." - " Use net.inet.tcp.local_msl instead.\n"); + " Use net.inet.tcp.msl_local instead.\n"); } return (error); } From nobody Wed Aug 13 18:23:45 2025 X-Original-To: dev-commits-src-main@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 4c2GwK5dxNz64KB7; Wed, 13 Aug 2025 18:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2GwK2xPQz48WN; Wed, 13 Aug 2025 18:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755109425; 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=c9Qupzr4p0gYFbz1EjSIT4HPVK5JUb25n7PYIYgN/Ks=; b=t2l290BmFG4v/jN95xz1WatjET8d/m2zrCd7tLQUyJUyPK4ufBaXlxNIqThBZuWaB+G7c8 7M42oRhGS2rFms4aw22FXjvCo2k+aPV0AdsK2DoqIZ6lMXdcp/arh+THcix4dNnY7ulDnO QGBO0ZA8Q6p2JZg/rJcb24Dtw8fQh6jhtBaNQ6nNq6AiYHYt1VK0SeWeXElWSVCRX8aa4W jt2Km4o6rCMiWYOgiuJK9t+MlHrmhUsFf1I5CjsrOUGh8FNnzGn1tvbR89xUPPY+jEwoYA foDhJB6yRJxx/rjaT6Q3sG2rQsAb8hoI/N+G/rjPti/7xVxNk184EbPQ/c6ZWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755109425; 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=c9Qupzr4p0gYFbz1EjSIT4HPVK5JUb25n7PYIYgN/Ks=; b=myjQfyq52IPFUXaMQ8SelJRNg7t4EL5T4jvzvo80SScke94DzyaPch7gFhDDb24Hb83Ahp K825STuQOHlWI39ELsh9Ls6psWc/FnX9+I8PQF/rIyomCCgJnwj+OH+qmcV1/Ldffdf0Zh h9V1XCxD6VCYzc00oQlSblD4l6Wfm8HRGMW0bFzaun3ZgsbB2pmCXRycFaR57E7FUBnY84 LH8h6roN57ULqfjxyDWe4lOGlIY1Bt814B1I1mGADxcr421KKZiSyL0P5ZPVpdVts3+6/p eRt/+A/rvq47BMRqBRx5nvSw/JNHUuoOSOyTyT/8POtueQh1cbCpUH4y+r4aeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755109425; a=rsa-sha256; cv=none; b=pXevJ2J0FDJbgEnidxrP7iSZO9l8YhdQQOSx5mUeT3+F7srbm/fqo1nSTShTUpdh54WAKM 98r2NkMov/8hCv1fTdDMuYLog49F4IP4Lr7gZqgpC0y6Ac7y3phxolt/l+ef8aAF1mJvbO ypnEpyCKDVPolPIfR+Yer8emE3B+7n0bMEO2Y+DR0HFFJqPtAgI3Cuf82E46YWiXzgqChe EW5ej8CXIqptRWDo9GLBaycrwIJKxH7Ue8tJqCZk0dkL5D73C2VdWMzs0qbxhTY0PnPsMz wrIor+Zs1W+XQDiyteWv6SA9Xs56v52vr3AmjO1YO7mO4VXiu4M1lKtIEIGCCw== 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 4c2GwK2FJ3z3tN; Wed, 13 Aug 2025 18:23: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 57DINjMm031122; Wed, 13 Aug 2025 18:23:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DINjHv031119; Wed, 13 Aug 2025 18:23:45 GMT (envelope-from git) Date: Wed, 13 Aug 2025 18:23:45 GMT Message-Id: <202508131823.57DINjHv031119@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: b9de52a0ec07 - main - systat: improve reporting of UDP statistics List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: b9de52a0ec07088006dc373c2d882f410aa51f1e Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=b9de52a0ec07088006dc373c2d882f410aa51f1e commit b9de52a0ec07088006dc373c2d882f410aa51f1e Author: Michael Tuexen AuthorDate: 2025-08-13 18:21:34 +0000 Commit: Michael Tuexen CommitDate: 2025-08-13 18:21:34 +0000 systat: improve reporting of UDP statistics Report the undelivered multi and broadcast UDP packets separately. Reviewed by: rrs, cc MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D51884 --- usr.bin/systat/ip.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/usr.bin/systat/ip.c b/usr.bin/systat/ip.c index 6cb3787b3f91..344b74011e99 100644 --- a/usr.bin/systat/ip.c +++ b/usr.bin/systat/ip.c @@ -82,9 +82,10 @@ static struct stat curstat, initstat, oldstat; 13999999999 packets forwarded 999999999 - no checksum 14999999999 - unreachable dests 999999999 - invalid length 15999999999 - redirects generated 999999999 - no socket for dest port -16999999999 option errors 999999999 - no socket for broadcast -17999999999 unwanted multicasts 999999999 - socket buffer full -18999999999 delivered to upper layer 999999999 total output packets +16999999999 option errors 999999999 - no socket for broadcast +17999999999 unwanted multicasts 999999999 - no socket for multicast +18999999999 delivered to upper layer 999999999 - socket buffer full +19999999999 999999999 total output packets --0123456789012345678901234567890123456789012345678901234567890123456789012345 --0 1 2 3 4 5 6 7 */ @@ -127,9 +128,10 @@ labelip(void) L(13, "packets forwarded"); R(13, "- no checksum"); L(14, "- unreachable dests"); R(14, "- invalid length"); L(15, "- redirects generated"); R(15, "- no socket for dest port"); - L(16, "option errors"); R(16, "- no socket for broadcast"); - L(17, "unwanted multicasts"); R(17, "- socket buffer full"); - L(18, "delivered to upper layer"); R(18, "total output packets"); + L(16, "option errors"); R(16, " - no socket for broadcast"); + L(17, "unwanted multicasts"); R(17, " - no socket for multicast"); + L(18, "delivered to upper layer"); R(18, "- socket buffer full"); + R(19, "total output packets"); #undef L #undef R } @@ -189,6 +191,7 @@ domode(struct stat *ret) DO(u.udps_badlen); DO(u.udps_noport); DO(u.udps_noportbcast); + DO(u.udps_noportmcast); DO(u.udps_fullsock); DO(u.udps_opackets); #undef DO @@ -237,9 +240,10 @@ showip(void) DO(i.ips_badoptions, 16, 0); DO(u.udps_noportbcast, 16, 35); DO(i.ips_notmember, 17, 0); - DO(u.udps_fullsock, 17, 35); + DO(u.udps_noportmcast, 17, 35); DO(i.ips_delivered, 18, 0); - DO(u.udps_opackets, 18, 35); + DO(u.udps_fullsock, 18, 35); + DO(u.udps_opackets, 19, 35); #undef DO } From nobody Wed Aug 13 19:41:40 2025 X-Original-To: dev-commits-src-main@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 4c2JfF046Zz64QJT; Wed, 13 Aug 2025 19:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2JfD4J5Lz3JKL; Wed, 13 Aug 2025 19:41:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755114100; 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=U4iKMpdxmII2OZqJv07ji+LO2gYDIA+NuauT8WL4PJA=; b=lp1i+zHENI2ld8BkKLf+NXPbYICbOXse8yEIY3Ca2/R91IeVrj7mJPxhscrvqqB18prN++ zr0/1Tpl9Mhb9ZwQLyUPNk1JThFqe2kwSTiUNrG2ooCPkEw1OCoJdPkdrkKZRi/mA6fwLM OHhEDOvv2NoCyOtxg1jZ/KsVfVy0/DkqX9FWHum4B4mzr2Gv+PirUcjw7zjV3bEpSYy5FK vpUNwvzXlg6amyIkhdUF0DSmLw01Dxa5df3Fni5XLE/euM9dVqGDJRHYqp6NDL0v2YG4XR JcmADhatk97UyCLKDOa9llwxppK8LSZSDtNCjHpMcBSYfX8bFKmy8RlVbgYykA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755114100; 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=U4iKMpdxmII2OZqJv07ji+LO2gYDIA+NuauT8WL4PJA=; b=wk8G+DdW2P6PoIAYdrsTHQBZhtlzBOvNKxxXsA14qOUOREgOdiegAllYrhv+s8uA5FJbf5 GP0HThQsBqAVmzooRfh5R7LEZHQNSFFjC6gwFMIkV0wFNRJIe0J5LG9D/9bx05MTEjBi/F 8y8fCaWkG/pbMeZ8RxinQDEMgUxxwFpwQQ8nzXDh034Wq8XGGIBWFmbrj+83rd48IN17Cl ZnQJMFH0fOOAP47geER/ThPP/KESozBCBCwjM3zoCTbt4+JW/asC5p/L+ED2qPAXPk5We2 KQrmGIK20n4yb9mFEDQ3i7k1wgnaiMYmoeuGqWzYCc9hpJtnvYfn4sP87afvgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755114100; a=rsa-sha256; cv=none; b=KgxkC2Y9Ly6MDeAPzDRe0XrO4YZaHGtA5p4i0O/LQGEw225KbUdRmZiX58ErbwbhU2x6NO yVJzjNQM/3sCNeZFVqxS7iL/lM8Bf3LxTGaS9oIapbztMAPww9puwjo7RyG1jNIgI/y65p VdKUKsgAQAv6HGqzI5sGfbBXlo/NoQn4Zjs+0wpeCsyOiyha7lWkDLrimPewUIH/kf06jd UMjIVSIauZPR1wDuwt1Y2tAG7w53EaiGjXoPSisKyy7XbarNMjO6QZJvcq3eKo3lLUlh5O LU4LO3a5Hd6O3h+HDVcoSJwxR6sgKWlXTuTyRZehImfV606Ieco1ymmhZCjxvg== 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 4c2JfD3vD3z5Z9; Wed, 13 Aug 2025 19:41: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 57DJfePC077257; Wed, 13 Aug 2025 19:41:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DJfeZF077254; Wed, 13 Aug 2025 19:41:40 GMT (envelope-from git) Date: Wed, 13 Aug 2025 19:41:40 GMT Message-Id: <202508131941.57DJfeZF077254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: cce64f2e6851 - main - nfsv4: Add support for the NFSv4.2 Clone operation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cce64f2e68511652a0edc3e3482d801115e91b43 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=cce64f2e68511652a0edc3e3482d801115e91b43 commit cce64f2e68511652a0edc3e3482d801115e91b43 Author: Rick Macklem AuthorDate: 2025-08-13 19:35:59 +0000 Commit: Rick Macklem CommitDate: 2025-08-13 19:35:59 +0000 nfsv4: Add support for the NFSv4.2 Clone operation Commit 37b2cb5ecb0f added VFS support for block cloning. This patch uses the VFS changes to add support for the NFSv4.2 Clone operation, which copies ranges within one or two files via block cloning. The Clone operation is similar to Copy, but always completes the "copy on write". It is not allowed to return partially done. It also allows copying of bytes ranges within the same file, which the NFSv4.2 Copy operation does not allow. Unless COPY_FILE_RANGE_CLONE has been specified for copy_file_range(2), a failing Clone operation will be redone with a Copy. The Clone operation requires that offsets (and length, if it does not go to EOF in the input file) be aligned to _PC_CLONE_BLKSIZE. This is similar to what ZFS implements now. At this time, ZFS is the only exportable file system that supports block cloning. As such, the Clone operation is only supported for ZFS exports at this time. Fixes: 37b2cb5ecb0f ("vfs: Add support for file cloning to VOP_COPY_FILE_RANGE") --- sys/fs/nfs/nfs_commonkrpc.c | 1 + sys/fs/nfs/nfs_commonsubs.c | 45 +++++++- sys/fs/nfs/nfs_var.h | 17 ++- sys/fs/nfs/nfsport.h | 7 +- sys/fs/nfs/nfsproto.h | 13 ++- sys/fs/nfsclient/nfs_clcomsubs.c | 2 +- sys/fs/nfsclient/nfs_clport.c | 13 ++- sys/fs/nfsclient/nfs_clrpcops.c | 237 +++++++++++++++++++++++++++++++++++--- sys/fs/nfsclient/nfs_clstate.c | 2 +- sys/fs/nfsclient/nfs_clvfsops.c | 10 +- sys/fs/nfsclient/nfs_clvnops.c | 139 +++++++++++++++++----- sys/fs/nfsclient/nfsmount.h | 1 + sys/fs/nfsserver/nfs_nfsdport.c | 45 +++++--- sys/fs/nfsserver/nfs_nfsdserv.c | 216 +++++++++++++++++++++++++++++++++- sys/fs/nfsserver/nfs_nfsdsocket.c | 2 +- sys/fs/nfsserver/nfs_nfsdstate.c | 2 +- 16 files changed, 660 insertions(+), 92 deletions(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 0ae3b94bef89..1e4e8506790f 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -239,6 +239,7 @@ static bool nfscl_use_gss[NFSV42_NPROCS] = { true, true, true, + true, }; /* diff --git a/sys/fs/nfs/nfs_commonsubs.c b/sys/fs/nfs/nfs_commonsubs.c index 67e33193ecec..7f5b29ca2085 100644 --- a/sys/fs/nfs/nfs_commonsubs.c +++ b/sys/fs/nfs/nfs_commonsubs.c @@ -187,7 +187,7 @@ struct nfsv4_opflag nfsv4_opflag[NFSV42_NOPS] = { { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Read Plus */ { 0, 1, 0, 0, LK_SHARED, 1, 0 }, /* Seek */ { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Write Same */ - { 0, 0, 0, 0, LK_EXCLUSIVE, 1, 1 }, /* Clone */ + { 2, 1, 1, 0, LK_SHARED, 1, 0 }, /* Clone */ { 0, 1, 0, 0, LK_SHARED, 1, 1 }, /* Getxattr */ { 0, 1, 1, 1, LK_EXCLUSIVE, 1, 1 }, /* Setxattr */ { 0, 1, 0, 0, LK_SHARED, 1, 1 }, /* Listxattrs */ @@ -219,7 +219,7 @@ NFSD_VNET_DEFINE_STATIC(u_char *, nfsrv_dnsname) = NULL; static int nfs_bigreply[NFSV42_NPROCS] = { 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, - 1, 0, 0, 1, 0, 0, 0, 0, 0, 0 }; + 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0 }; /* local functions */ static int nfsrv_skipace(struct nfsrv_descript *nd, int *acesizep); @@ -310,6 +310,7 @@ static struct { { NFSV4OP_LAYOUTERROR, 1, "LayoutError", 11, }, { NFSV4OP_VERIFY, 3, "AppendWrite", 11, }, { NFSV4OP_OPENATTR, 3, "OpenAttr", 8, }, + { NFSV4OP_SAVEFH, 5, "Clone", 5, }, }; /* @@ -319,7 +320,7 @@ static int nfs_bigrequest[NFSV42_NPROCS] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, - 0, 1, 0 + 0, 1, 0, 0 }; /* @@ -648,7 +649,7 @@ nfscl_fillsattr(struct nfsrv_descript *nd, struct vattr *vap, NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_TIMECREATE); (void) nfsv4_fillattr(nd, vp->v_mount, vp, NULL, vap, NULL, 0, &attrbits, NULL, NULL, 0, 0, 0, 0, (uint64_t)0, NULL, - false, false, false); + false, false, false, 0); break; } } @@ -1302,7 +1303,7 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, struct nfsv3_pathconf *pc, struct statfs *sbp, struct nfsstatfs *sfp, struct nfsfsinfo *fsp, NFSACL_T *aclp, int compare, int *retcmpp, u_int32_t *leasep, u_int32_t *rderrp, bool *has_namedattrp, - NFSPROC_T *p, struct ucred *cred) + uint32_t *clone_blksizep, NFSPROC_T *p, struct ucred *cred) { u_int32_t *tl; int i = 0, j, k, l = 0, m, bitpos, attrsum = 0; @@ -1437,6 +1438,13 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, NFSCLRBIT_ATTRBIT(&checkattrbits, NFSATTRBIT_SYSTEM); } + /* Some filesystems do not support block cloning */ + if (vp == NULL || VOP_PATHCONF(vp, + _PC_CLONE_BLKSIZE, &has_pathconf) != 0) + has_pathconf = 0; + if (has_pathconf == 0) + NFSCLRBIT_ATTRBIT(&checkattrbits, + NFSATTRBIT_CLONEBLKSIZE); if (!NFSEQUAL_ATTRBIT(&retattrbits, &checkattrbits) || retnotsup) *retcmpp = NFSERR_NOTSAME; @@ -2374,6 +2382,23 @@ nfsv4_loadattr(struct nfsrv_descript *nd, vnode_t vp, if (compare && !(*retcmpp) && i != nfs_srvmaxio) *retcmpp = NFSERR_NOTSAME; break; + case NFSATTRBIT_CLONEBLKSIZE: + NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); + if (compare) { + if (!(*retcmpp)) { + if (vp == NULL || VOP_PATHCONF(vp, + _PC_CLONE_BLKSIZE, &has_pathconf) + != 0) + has_pathconf = 0; + if (has_pathconf != + fxdr_unsigned(uint32_t, *tl)) + *retcmpp = NFSERR_NOTSAME; + } + } else if (clone_blksizep != NULL) { + *clone_blksizep = fxdr_unsigned(uint32_t, *tl); + } + attrsum += NFSX_UNSIGNED; + break; case NFSATTRBIT_CHANGEATTRTYPE: NFSM_DISSECT(tl, uint32_t *, NFSX_UNSIGNED); if (compare) { @@ -2648,7 +2673,7 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp, nfsattrbit_t *attrbitp, struct ucred *cred, NFSPROC_T *p, int isdgram, int reterr, int supports_nfsv4acls, int at_root, uint64_t mounted_on_fileno, struct statfs *pnfssf, bool xattrsupp, bool has_hiddensystem, - bool has_namedattr) + bool has_namedattr, uint32_t clone_blksize) { int bitpos, retnum = 0; u_int32_t *tl; @@ -2771,6 +2796,9 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp, NFSCLRBIT_ATTRBIT(&attrbits, NFSATTRBIT_HIDDEN); NFSCLRBIT_ATTRBIT(&attrbits, NFSATTRBIT_SYSTEM); } + if (clone_blksize == 0) + NFSCLRBIT_ATTRBIT(&attrbits, + NFSATTRBIT_CLONEBLKSIZE); retnum += nfsrv_putattrbit(nd, &attrbits); break; case NFSATTRBIT_TYPE: @@ -3249,6 +3277,11 @@ nfsv4_fillattr(struct nfsrv_descript *nd, struct mount *mp, vnode_t vp, } retnum += NFSX_UNSIGNED; break; + case NFSATTRBIT_CLONEBLKSIZE: + NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(clone_blksize); + retnum += NFSX_UNSIGNED; + break; default: printf("EEK! Bad V4 attribute bitpos=%d\n", bitpos); } diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h index 54f60a753c50..61083ecf2d66 100644 --- a/sys/fs/nfs/nfs_var.h +++ b/sys/fs/nfs/nfs_var.h @@ -286,6 +286,8 @@ int nfsrvd_deallocate(struct nfsrv_descript *, int, vnode_t, struct nfsexstuff *); int nfsrvd_copy_file_range(struct nfsrv_descript *, int, vnode_t, vnode_t, struct nfsexstuff *, struct nfsexstuff *); +int nfsrvd_clone(struct nfsrv_descript *, int, + vnode_t, vnode_t, struct nfsexstuff *, struct nfsexstuff *); int nfsrvd_seek(struct nfsrv_descript *, int, vnode_t, struct nfsexstuff *); int nfsrvd_getxattr(struct nfsrv_descript *, int, @@ -341,7 +343,8 @@ int nfsv4_loadattr(struct nfsrv_descript *, vnode_t, struct nfsvattr *, struct nfsfh **, fhandle_t *, int, struct nfsv3_pathconf *, struct statfs *, struct nfsstatfs *, struct nfsfsinfo *, NFSACL_T *, - int, int *, u_int32_t *, u_int32_t *, bool *, NFSPROC_T *, struct ucred *); + int, int *, u_int32_t *, u_int32_t *, bool *, uint32_t *, NFSPROC_T *, + struct ucred *); int nfsv4_lock(struct nfsv4lock *, int, int *, struct mtx *, struct mount *); void nfsv4_unlock(struct nfsv4lock *, int); void nfsv4_relref(struct nfsv4lock *); @@ -397,7 +400,7 @@ void nfsrv_wcc(struct nfsrv_descript *, int, struct nfsvattr *, int, int nfsv4_fillattr(struct nfsrv_descript *, struct mount *, vnode_t, NFSACL_T *, struct vattr *, fhandle_t *, int, nfsattrbit_t *, struct ucred *, NFSPROC_T *, int, int, int, int, uint64_t, struct statfs *, bool, bool, - bool); + bool, uint32_t); void nfsrv_fillattr(struct nfsrv_descript *, struct nfsvattr *); struct mbuf *nfsrv_adj(struct mbuf *, int, int); void nfsrv_postopattr(struct nfsrv_descript *, int, struct nfsvattr *); @@ -517,10 +520,10 @@ int nfsrpc_lock(struct nfsrv_descript *, struct nfsmount *, vnode_t, u_int8_t *, int, struct nfscllockowner *, int, int, u_int64_t, u_int64_t, short, struct ucred *, NFSPROC_T *, int); int nfsrpc_statfs(vnode_t, struct nfsstatfs *, struct nfsfsinfo *, uint32_t *, - struct ucred *, NFSPROC_T *, struct nfsvattr *, int *); + uint32_t *, struct ucred *, NFSPROC_T *, struct nfsvattr *, int *); int nfsrpc_fsinfo(vnode_t, struct nfsfsinfo *, struct ucred *, NFSPROC_T *, struct nfsvattr *, int *); -int nfsrpc_pathconf(vnode_t, struct nfsv3_pathconf *, bool *, +int nfsrpc_pathconf(vnode_t, struct nfsv3_pathconf *, bool *, uint32_t *, struct ucred *, NFSPROC_T *, struct nfsvattr *, int *); int nfsrpc_renew(struct nfsclclient *, struct nfsclds *, struct ucred *, NFSPROC_T *); @@ -562,6 +565,8 @@ int nfsrpc_deallocate(vnode_t, off_t, off_t, struct nfsvattr *, int *, int nfsrpc_copy_file_range(vnode_t, off_t *, vnode_t, off_t *, size_t *, unsigned int, int *, struct nfsvattr *, int *, struct nfsvattr *, struct ucred *, bool, bool *); +int nfsrpc_clone(vnode_t, off_t *, vnode_t, off_t *, size_t *, bool, + int *, struct nfsvattr *, int *, struct nfsvattr *, struct ucred *); int nfsrpc_seek(vnode_t, off_t *, bool *, int, struct ucred *, struct nfsvattr *, int *); int nfsrpc_getextattr(vnode_t, const char *, struct uio *, ssize_t *, @@ -668,7 +673,7 @@ int nfscl_nget(mount_t, vnode_t, struct nfsfh *, NFSPROC_T *nfscl_getparent(NFSPROC_T *); void nfscl_start_renewthread(struct nfsclclient *); void nfscl_loadsbinfo(struct nfsmount *, struct nfsstatfs *, void *); -void nfscl_loadfsinfo (struct nfsmount *, struct nfsfsinfo *); +void nfscl_loadfsinfo(struct nfsmount *, struct nfsfsinfo *, uint32_t); void nfscl_delegreturn(struct nfscldeleg *, int, struct nfsmount *, struct ucred *, NFSPROC_T *); void nfsrvd_cbinit(int); @@ -737,7 +742,7 @@ int nfsvno_updfilerev(vnode_t, struct nfsvattr *, struct nfsrv_descript *, int nfsvno_fillattr(struct nfsrv_descript *, struct mount *, vnode_t, struct nfsvattr *, fhandle_t *, int, nfsattrbit_t *, struct ucred *, NFSPROC_T *, int, int, int, int, uint64_t, bool, bool, - bool); + bool, uint32_t); int nfsrv_sattr(struct nfsrv_descript *, vnode_t, struct nfsvattr *, nfsattrbit_t *, NFSACL_T *, NFSPROC_T *); int nfsv4_sattr(struct nfsrv_descript *, vnode_t, struct nfsvattr *, nfsattrbit_t *, diff --git a/sys/fs/nfs/nfsport.h b/sys/fs/nfs/nfsport.h index c30b46261df0..bd6107187966 100644 --- a/sys/fs/nfs/nfsport.h +++ b/sys/fs/nfs/nfsport.h @@ -442,10 +442,13 @@ /* Do a NFSv4 Openattr. */ #define NFSPROC_OPENATTR 70 +/* Do a NFSv4.2 Clone. */ +#define NFSPROC_CLONE 71 + /* * Must be defined as one higher than the last NFSv4.2 Proc# above. */ -#define NFSV42_NPROCS 71 +#define NFSV42_NPROCS 72 /* Value of NFSV42_NPROCS for old nfsstats structure. (Always 69) */ #define NFSV42_OLDNPROCS 69 @@ -477,7 +480,7 @@ struct nfsstatsv1 { uint64_t readlink_bios; uint64_t biocache_readdirs; uint64_t readdir_bios; - uint64_t rpccnt[NFSV42_NPROCS + 9]; + uint64_t rpccnt[NFSV42_NPROCS + 8]; uint64_t rpcretries; uint64_t srvrpccnt[NFSV42_NOPS + NFSV4OP_FAKENOPS + 15]; uint64_t srvlayouts; diff --git a/sys/fs/nfs/nfsproto.h b/sys/fs/nfs/nfsproto.h index cb5a80e8df73..d628108bdc1a 100644 --- a/sys/fs/nfs/nfsproto.h +++ b/sys/fs/nfs/nfsproto.h @@ -411,10 +411,13 @@ /* Do a NFSv4 Openattr. */ #define NFSPROC_OPENATTR 70 +/* Do a NFSv4.2 Clone. */ +#define NFSPROC_CLONE 71 + /* * Must be defined as one higher than the last NFSv4.2 Proc# above. */ -#define NFSV42_NPROCS 71 +#define NFSV42_NPROCS 72 /* Value of NFSV42_NPROCS for old nfsstats structure. (Always 69) */ #define NFSV42_OLDNPROCS 69 @@ -1194,6 +1197,7 @@ struct nfsv3_sattr { NFSATTRBM_LAYOUTBLKSIZE | \ NFSATTRBM_LAYOUTALIGNMENT | \ NFSATTRBM_SUPPATTREXCLCREAT | \ + NFSATTRBM_CLONEBLKSIZE | \ NFSATTRBM_CHANGEATTRTYPE | \ NFSATTRBM_XATTRSUPPORT) @@ -1242,7 +1246,8 @@ struct nfsv3_sattr { * NFSATTRBIT_NFSV42 - Attributes only supported by NFSv4.2. */ #define NFSATTRBIT_NFSV42_2 \ - (NFSATTRBM_CHANGEATTRTYPE | \ + (NFSATTRBM_CLONEBLKSIZE | \ + NFSATTRBM_CHANGEATTRTYPE | \ NFSATTRBM_XATTRSUPPORT | \ NFSATTRBM_MODEUMASK) @@ -1415,7 +1420,7 @@ struct nfsv3_sattr { /* * NFSGETATTRBIT_STATFS2 - bits 64<->95 */ -#define NFSGETATTRBIT_STATFS2 0 +#define NFSGETATTRBIT_STATFS2 (NFSATTRBM_CLONEBLKSIZE) /* * Set of attributes for the equivalent of an nfsv3 pathconf rpc. @@ -1438,7 +1443,7 @@ struct nfsv3_sattr { /* * NFSGETATTRBIT_PATHCONF2 - bits 64<->95 */ -#define NFSGETATTRBIT_PATHCONF2 0 +#define NFSGETATTRBIT_PATHCONF2 (NFSATTRBM_CLONEBLKSIZE) /* * Sets of attributes required by readdir and readdirplus. diff --git a/sys/fs/nfsclient/nfs_clcomsubs.c b/sys/fs/nfsclient/nfs_clcomsubs.c index bca0bdcd0df1..05963074e53d 100644 --- a/sys/fs/nfsclient/nfs_clcomsubs.c +++ b/sys/fs/nfsclient/nfs_clcomsubs.c @@ -272,7 +272,7 @@ nfsm_loadattr(struct nfsrv_descript *nd, struct nfsvattr *nap) if (nd->nd_flag & ND_NFSV4) { error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, - NULL); + NULL, NULL); } else if (nd->nd_flag & ND_NFSV3) { NFSM_DISSECT(fp, struct nfs_fattr *, NFSX_V3FATTR); nap->na_type = nfsv34tov_type(fp->fa_type); diff --git a/sys/fs/nfsclient/nfs_clport.c b/sys/fs/nfsclient/nfs_clport.c index b25d967982a1..704aeeeabdf2 100644 --- a/sys/fs/nfsclient/nfs_clport.c +++ b/sys/fs/nfsclient/nfs_clport.c @@ -828,7 +828,7 @@ nfscl_wcc_data(struct nfsrv_descript *nd, struct vnode *vp, == (ND_NFSV4 | ND_V4WCCATTR)) { error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, - NULL, NULL, NULL, NULL, NULL, NULL); + NULL, NULL, NULL, NULL, NULL, NULL, NULL); if (error) return (error); /* @@ -963,7 +963,8 @@ nfscl_loadsbinfo(struct nfsmount *nmp, struct nfsstatfs *sfp, void *statfs) * Use the fsinfo stuff to update the mount point. */ void -nfscl_loadfsinfo(struct nfsmount *nmp, struct nfsfsinfo *fsp) +nfscl_loadfsinfo(struct nfsmount *nmp, struct nfsfsinfo *fsp, + uint32_t clone_blksize) { if ((nmp->nm_wsize == 0 || fsp->fs_wtpref < nmp->nm_wsize) && @@ -1003,6 +1004,14 @@ nfscl_loadfsinfo(struct nfsmount *nmp, struct nfsfsinfo *fsp) fsp->fs_maxfilesize < nmp->nm_maxfilesize) nmp->nm_maxfilesize = fsp->fs_maxfilesize; nmp->nm_mountp->mnt_stat.f_iosize = newnfs_iosize(nmp); + + /* + * Although ZFS reports a clone_blksize of 16Mbytes, + * 128Kbytes usually works, so set it to that. + */ + if (clone_blksize > 128 * 1024) + clone_blksize = 128 * 1024; + nmp->nm_cloneblksize = clone_blksize; nmp->nm_state |= NFSSTA_GOTFSINFO; } diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 920fcf7b8c61..4ec621de2eff 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -225,6 +225,9 @@ static int nfsrpc_layoutgetres(struct nfsmount *, vnode_t, uint8_t *, static int nfsrpc_copyrpc(vnode_t, off_t, vnode_t, off_t, size_t *, nfsv4stateid_t *, nfsv4stateid_t *, struct nfsvattr *, int *, struct nfsvattr *, int *, bool, int *, struct ucred *, NFSPROC_T *); +static int nfsrpc_clonerpc(vnode_t, off_t, vnode_t, off_t, size_t *, bool, + nfsv4stateid_t *, nfsv4stateid_t *, struct nfsvattr *, int *, + struct nfsvattr *, int *, struct ucred *, NFSPROC_T *); static int nfsrpc_seekrpc(vnode_t, off_t *, nfsv4stateid_t *, bool *, int, struct nfsvattr *, int *, struct ucred *); static struct mbuf *nfsm_split(struct mbuf *, uint64_t); @@ -696,7 +699,7 @@ nfsrpc_openrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, int fhlen, ("nfsrpc_openrpc: Getattr repstat")); error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, - NULL, NULL, NULL, NULL, p, cred); + NULL, NULL, NULL, NULL, NULL, p, cred); if (error) goto nfsmout; } @@ -1355,7 +1358,7 @@ nfsrpc_getattrnovp(struct nfsmount *nmp, u_int8_t *fhp, int fhlen, int syscred, if ((nd->nd_flag & ND_NFSV4) != 0) error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, NULL, leasep, NULL, - NULL, NULL, NULL); + NULL, NULL, NULL, NULL); else error = nfsm_loadattr(nd, nap); } else @@ -3597,7 +3600,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, nfsva.na_mntonfileno = UINT64_MAX; error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, - NULL, NULL, NULL, NULL, p, cred); + NULL, NULL, NULL, NULL, NULL, p, cred); if (error) { dotdotfileid = dotfileid; } else if (gotmnton) { @@ -3847,7 +3850,7 @@ nfsrpc_readdir(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, nfsva.na_mntonfileno = UINT64_MAX; error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, - NULL, NULL, &rderr, NULL, p, cred); + NULL, NULL, &rderr, NULL, NULL, p, cred); if (error) goto nfsmout; NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED); @@ -4072,7 +4075,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, nfsva.na_mntonfileno = UINT64_MAX; error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, - NULL, NULL, NULL, NULL, p, cred); + NULL, NULL, NULL, NULL, NULL, p, cred); if (error) { dotdotfileid = dotfileid; } else if (gotmnton) { @@ -4346,7 +4349,7 @@ nfsrpc_readdirplus(vnode_t vp, struct uio *uiop, nfsuint64 *cookiep, nfsva.na_mntonfileno = 0xffffffff; error = nfsv4_loadattr(nd, NULL, &nfsva, &nfhp, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, - NULL, NULL, &rderr, NULL, p, cred); + NULL, NULL, &rderr, NULL, NULL, p, cred); if (error) goto nfsmout; } @@ -4981,8 +4984,8 @@ nfsmout: */ int nfsrpc_statfs(vnode_t vp, struct nfsstatfs *sbp, struct nfsfsinfo *fsp, - uint32_t *leasep, struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, - int *attrflagp) + uint32_t *leasep, uint32_t *cloneblksizep, struct ucred *cred, NFSPROC_T *p, + struct nfsvattr *nap, int *attrflagp) { u_int32_t *tl = NULL; struct nfsrv_descript nfsd, *nd = &nfsd; @@ -4991,6 +4994,8 @@ nfsrpc_statfs(vnode_t vp, struct nfsstatfs *sbp, struct nfsfsinfo *fsp, int error; *attrflagp = 0; + if (cloneblksizep != NULL) + *cloneblksizep = 0; nmp = VFSTONFS(vp->v_mount); if (NFSHASNFSV4(nmp)) { /* @@ -5009,7 +5014,7 @@ nfsrpc_statfs(vnode_t vp, struct nfsstatfs *sbp, struct nfsfsinfo *fsp, if (nd->nd_repstat == 0) { error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0, NULL, NULL, sbp, fsp, NULL, 0, NULL, leasep, NULL, - NULL, p, cred); + NULL, cloneblksizep, p, cred); if (!error) { nmp->nm_fsid[0] = nap->na_filesid[0]; nmp->nm_fsid[1] = nap->na_filesid[1]; @@ -5063,7 +5068,8 @@ nfsmout: */ int nfsrpc_pathconf(vnode_t vp, struct nfsv3_pathconf *pc, bool *has_namedattrp, - struct ucred *cred, NFSPROC_T *p, struct nfsvattr *nap, int *attrflagp) + uint32_t *clone_blksizep, struct ucred *cred, NFSPROC_T *p, + struct nfsvattr *nap, int *attrflagp) { struct nfsrv_descript nfsd, *nd = &nfsd; struct nfsmount *nmp; @@ -5074,6 +5080,7 @@ nfsrpc_pathconf(vnode_t vp, struct nfsv3_pathconf *pc, bool *has_namedattrp, *has_namedattrp = false; *attrflagp = 0; + *clone_blksizep = 0; nmp = VFSTONFS(vp->v_mount); if (NFSHASNFSV4(nmp)) { np = VTONFS(vp); @@ -5100,7 +5107,7 @@ nfsrpc_pathconf(vnode_t vp, struct nfsv3_pathconf *pc, bool *has_namedattrp, if (nd->nd_repstat == 0) { error = nfsv4_loadattr(nd, NULL, nap, NULL, NULL, 0, pc, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, - has_namedattrp, p, cred); + has_namedattrp, clone_blksizep, p, cred); if (!error) *attrflagp = 1; } else { @@ -5395,7 +5402,8 @@ nfsrpc_getacl(vnode_t vp, struct ucred *cred, NFSPROC_T *p, struct acl *aclp) return (error); if (!nd->nd_repstat) error = nfsv4_loadattr(nd, vp, NULL, NULL, NULL, 0, NULL, - NULL, NULL, NULL, aclp, 0, NULL, NULL, NULL, NULL, p, cred); + NULL, NULL, NULL, aclp, 0, NULL, NULL, NULL, NULL, NULL, p, + cred); else error = nd->nd_repstat; m_freem(nd->nd_mrep); @@ -5437,7 +5445,7 @@ nfsrpc_setaclrpc(vnode_t vp, struct ucred *cred, NFSPROC_T *p, NFSSETBIT_ATTRBIT(&attrbits, NFSATTRBIT_ACL); (void) nfsv4_fillattr(nd, vp->v_mount, vp, aclp, NULL, NULL, 0, &attrbits, NULL, NULL, 0, 0, 0, 0, (uint64_t)0, NULL, false, false, - false); + false, 0); error = nfscl_request(nd, vp, p, cred); if (error) return (error); @@ -8496,7 +8504,7 @@ nfsrpc_openlayoutrpc(struct nfsmount *nmp, vnode_t vp, u_int8_t *nfhp, if (*++tl == 0) { error = nfsv4_loadattr(nd, NULL, &nfsva, NULL, NULL, 0, NULL, NULL, NULL, NULL, NULL, 0, - NULL, NULL, NULL, NULL, p, cred); + NULL, NULL, NULL, NULL, NULL, p, cred); if (error != 0) goto nfsmout; if (ndp != NULL) { @@ -9167,6 +9175,199 @@ nfsmout: return (error); } +/* + * nfs clone operation. + */ +int +nfsrpc_clone(vnode_t invp, off_t *inoffp, vnode_t outvp, + off_t *outoffp, size_t *lenp, bool toeof, int *inattrflagp, + struct nfsvattr *innap, int *outattrflagp, struct nfsvattr *outnap, + struct ucred *cred) +{ + int error, expireret = 0, retrycnt; + uint32_t clidrev = 0; + struct nfsmount *nmp = VFSTONFS(invp->v_mount); + struct nfsfh *innfhp = NULL, *outnfhp = NULL; + nfsv4stateid_t instateid, outstateid; + void *inlckp, *outlckp; + + if (nmp->nm_clp != NULL) + clidrev = nmp->nm_clp->nfsc_clientidrev; + innfhp = VTONFS(invp)->n_fhp; + outnfhp = VTONFS(outvp)->n_fhp; + retrycnt = 0; + do { + /* Get both stateids. */ + inlckp = NULL; + nfscl_getstateid(invp, innfhp->nfh_fh, innfhp->nfh_len, + NFSV4OPEN_ACCESSREAD, 0, NULL, curthread, &instateid, + &inlckp); + outlckp = NULL; + nfscl_getstateid(outvp, outnfhp->nfh_fh, outnfhp->nfh_len, + NFSV4OPEN_ACCESSWRITE, 0, NULL, curthread, &outstateid, + &outlckp); + + error = nfsrpc_clonerpc(invp, *inoffp, outvp, *outoffp, lenp, + toeof, &instateid, &outstateid, innap, inattrflagp, outnap, + outattrflagp, cred, curthread); + if (error == 0) { + *inoffp += *lenp; + *outoffp += *lenp; + } else if (error == NFSERR_STALESTATEID) + nfscl_initiate_recovery(nmp->nm_clp); + if (inlckp != NULL) + nfscl_lockderef(inlckp); + if (outlckp != NULL) + nfscl_lockderef(outlckp); + if (error == NFSERR_GRACE || error == NFSERR_STALESTATEID || + error == NFSERR_STALEDONTRECOVER || error == NFSERR_DELAY || + error == NFSERR_OLDSTATEID || error == NFSERR_BADSESSION) { + (void) nfs_catnap(PZERO, error, "nfs_cfr"); + } else if ((error == NFSERR_EXPIRED || (!NFSHASINT(nmp) && + error == NFSERR_BADSTATEID)) && clidrev != 0) { + expireret = nfscl_hasexpired(nmp->nm_clp, clidrev, + curthread); + } else if (error == NFSERR_BADSTATEID && NFSHASINT(nmp)) { + error = EIO; + } + retrycnt++; + } while (error == NFSERR_GRACE || error == NFSERR_DELAY || + error == NFSERR_STALESTATEID || error == NFSERR_BADSESSION || + error == NFSERR_STALEDONTRECOVER || + (error == NFSERR_OLDSTATEID && retrycnt < 20) || + ((error == NFSERR_EXPIRED || error == NFSERR_BADSTATEID) && + expireret == 0 && clidrev != 0 && retrycnt < 4)); + if (error != 0 && (retrycnt >= 4 || + error == NFSERR_STALESTATEID || error == NFSERR_BADSESSION || + error == NFSERR_STALEDONTRECOVER)) + error = EIO; + return (error); +} + +/* + * The clone RPC. + */ +static int +nfsrpc_clonerpc(vnode_t invp, off_t inoff, vnode_t outvp, off_t outoff, + size_t *lenp, bool toeof, nfsv4stateid_t *instateidp, + nfsv4stateid_t *outstateidp, struct nfsvattr *innap, int *inattrflagp, + struct nfsvattr *outnap, int *outattrflagp, struct ucred *cred, + NFSPROC_T *p) +{ + uint32_t *tl, *opcntp; + int error; + struct nfsrv_descript nfsd; + struct nfsrv_descript *nd = &nfsd; + struct nfsmount *nmp; + nfsattrbit_t attrbits; + struct vattr va; + uint64_t len; + + nmp = VFSTONFS(invp->v_mount); + *inattrflagp = *outattrflagp = 0; + len = *lenp; + if (len == 0) + return (0); + if (toeof) + len = 0; + nfscl_reqstart(nd, NFSPROC_CLONE, nmp, VTONFS(invp)->n_fhp->nfh_fh, + VTONFS(invp)->n_fhp->nfh_len, &opcntp, NULL, 0, 0, cred); + /* + * First do a Setattr of atime to the server's clock + * time. The FreeBSD "collective" was of the opinion + * that setting atime was necessary for this syscall. + * Do the Setattr before the Clone, so that it can be + * handled well if the server replies NFSERR_DELAY to + * the Setattr operation. + */ + if ((nmp->nm_mountp->mnt_flag & MNT_NOATIME) == 0) { + NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_SETATTR); + nfsm_stateidtom(nd, instateidp, NFSSTATEID_PUTSTATEID); + VATTR_NULL(&va); + va.va_atime.tv_sec = va.va_atime.tv_nsec = 0; + va.va_vaflags = VA_UTIMES_NULL; + nfscl_fillsattr(nd, &va, invp, 0, 0); + /* Bump opcnt from 7 to 8. */ + *opcntp = txdr_unsigned(8); + } + + /* Now Getattr the invp attributes. */ + NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_GETATTR); + NFSGETATTR_ATTRBIT(&attrbits); + nfsrv_putattrbit(nd, &attrbits); + + /* Set outvp. */ + NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_PUTFH); + (void)nfsm_fhtom(nmp, nd, VTONFS(outvp)->n_fhp->nfh_fh, + VTONFS(outvp)->n_fhp->nfh_len, 0); + + /* Do the Clone. */ + NFSM_BUILD(tl, uint32_t *, NFSX_UNSIGNED); + *tl = txdr_unsigned(NFSV4OP_CLONE); + nfsm_stateidtom(nd, instateidp, NFSSTATEID_PUTSTATEID); + nfsm_stateidtom(nd, outstateidp, NFSSTATEID_PUTSTATEID); + NFSM_BUILD(tl, uint32_t *, 3 * NFSX_HYPER + NFSX_UNSIGNED); + txdr_hyper(inoff, tl); tl += 2; + txdr_hyper(outoff, tl); tl += 2; + txdr_hyper(len, tl); tl += 2; + + /* Get the outvp attributes. */ + *tl = txdr_unsigned(NFSV4OP_GETATTR); + NFSWRITEGETATTR_ATTRBIT(&attrbits); + nfsrv_putattrbit(nd, &attrbits); + + error = nfscl_request(nd, invp, p, cred); + if (error != 0) + return (error); + /* Skip over the Setattr reply. */ + if ((nd->nd_flag & ND_NOMOREDATA) == 0 && + (nmp->nm_mountp->mnt_flag & MNT_NOATIME) == 0) { + NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED); + if (*(tl + 1) == 0) { + error = nfsrv_getattrbits(nd, &attrbits, NULL, NULL); + if (error != 0) + goto nfsmout; + } else + nd->nd_flag |= ND_NOMOREDATA; + } + if ((nd->nd_flag & ND_NOMOREDATA) == 0) { + /* Get the input file's attributes. */ + NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED); + if (*(tl + 1) == 0) { + error = nfsm_loadattr(nd, innap); + if (error != 0) + goto nfsmout; + *inattrflagp = 1; + } else + nd->nd_flag |= ND_NOMOREDATA; + } + /* Skip over return stat for PutFH. */ + if ((nd->nd_flag & ND_NOMOREDATA) == 0) { + NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED); + if (*++tl != 0) + nd->nd_flag |= ND_NOMOREDATA; + } + /* Skip over return stat for Clone. */ + if ((nd->nd_flag & ND_NOMOREDATA) == 0) + NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED); + if (nd->nd_repstat == 0) { + NFSM_DISSECT(tl, uint32_t *, 2 * NFSX_UNSIGNED); + error = nfsm_loadattr(nd, outnap); + if (error == 0) + *outattrflagp = NFS_LATTR_NOSHRINK; + } else { + *lenp = 0; + } + if (error == 0) + error = nd->nd_repstat; +nfsmout: + m_freem(nd->nd_mrep); + return (error); +} + /* * Seek operation. */ @@ -9724,13 +9925,13 @@ nfscl_statfs(struct vnode *vp, struct ucred *cred, NFSPROC_T *td) struct nfsstatfs sb; struct mount *mp; struct nfsmount *nmp; - uint32_t lease; + uint32_t clone_blksize, lease; int attrflag, error; mp = vp->v_mount; nmp = VFSTONFS(mp); - error = nfsrpc_statfs(vp, &sb, &fs, &lease, cred, td, &nfsva, - &attrflag); + error = nfsrpc_statfs(vp, &sb, &fs, &lease, &clone_blksize, cred, td, + &nfsva, &attrflag); if (attrflag != 0) (void) nfscl_loadattrcache(&vp, &nfsva, NULL, 0, 1); if (error == 0) { @@ -9739,7 +9940,7 @@ nfscl_statfs(struct vnode *vp, struct ucred *cred, NFSPROC_T *td) nmp->nm_clp->nfsc_renew = NFSCL_RENEW(lease); NFSUNLOCKCLSTATE(); mtx_lock(&nmp->nm_mtx); - nfscl_loadfsinfo(nmp, &fs); + nfscl_loadfsinfo(nmp, &fs, clone_blksize); nfscl_loadsbinfo(nmp, &sb, &mp->mnt_stat); mp->mnt_stat.f_iosize = newnfs_iosize(nmp); mtx_unlock(&nmp->nm_mtx); diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 99a781640c53..aa9d01fc4632 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -3701,7 +3701,7 @@ nfscl_docb(struct nfsrv_descript *nd, NFSPROC_T *p) if (!error) (void) nfsv4_fillattr(nd, NULL, NULL, NULL, &va, NULL, 0, &rattrbits, NULL, p, 0, 0, 0, 0, - (uint64_t)0, NULL, false, false, false); + (uint64_t)0, NULL, false, false, false, 0); break; case NFSV4OP_CBRECALL: NFSCL_DEBUG(4, "cbrecall\n"); diff --git a/sys/fs/nfsclient/nfs_clvfsops.c b/sys/fs/nfsclient/nfs_clvfsops.c index 0bd05c03885b..5ea7eab07632 100644 --- a/sys/fs/nfsclient/nfs_clvfsops.c +++ b/sys/fs/nfsclient/nfs_clvfsops.c @@ -292,8 +292,10 @@ nfs_statfs(struct mount *mp, struct statfs *sbp) int error = 0, attrflag, gotfsinfo = 0, ret; struct nfsnode *np; char *fakefh; + uint32_t clone_blksize; td = curthread; + clone_blksize = 0; error = vfs_busy(mp, MBF_NOWAIT); if (error) @@ -337,8 +339,8 @@ nfs_statfs(struct mount *mp, struct statfs *sbp) } else mtx_unlock(&nmp->nm_mtx); if (!error) - error = nfsrpc_statfs(vp, &sb, &fs, NULL, td->td_ucred, td, - &nfsva, &attrflag); + error = nfsrpc_statfs(vp, &sb, &fs, NULL, &clone_blksize, + td->td_ucred, td, &nfsva, &attrflag); if ((nmp->nm_privflag & NFSMNTP_FAKEROOTFH) != 0 && error == NFSERR_WRONGSEC) { /* Cannot get new stats, so return what is in mnt_stat. */ @@ -375,7 +377,7 @@ nfs_statfs(struct mount *mp, struct statfs *sbp) if (!error) { mtx_lock(&nmp->nm_mtx); if (gotfsinfo || (nmp->nm_flag & NFSMNT_NFSV4)) - nfscl_loadfsinfo(nmp, &fs); + nfscl_loadfsinfo(nmp, &fs, clone_blksize); nfscl_loadsbinfo(nmp, &sb, sbp); sbp->f_iosize = newnfs_iosize(nmp); mtx_unlock(&nmp->nm_mtx); @@ -408,7 +410,7 @@ ncl_fsinfo(struct nfsmount *nmp, struct vnode *vp, struct ucred *cred, if (attrflag) (void) nfscl_loadattrcache(&vp, &nfsva, NULL, 0, 1); mtx_lock(&nmp->nm_mtx); - nfscl_loadfsinfo(nmp, &fs); + nfscl_loadfsinfo(nmp, &fs, 0); mtx_unlock(&nmp->nm_mtx); } return (error); diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index fa451887e73e..6824ee6ef13d 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -4027,31 +4027,51 @@ nfs_copy_file_range(struct vop_copy_file_range_args *ap) struct vattr va, *vap; struct uio io; struct nfsmount *nmp; + struct nfsnode *np; size_t len, len2; ssize_t r; int error, inattrflag, outattrflag, ret, ret2, invp_lock; off_t inoff, outoff; - bool consecutive, must_commit, tryoutcred; + bool consecutive, must_commit, onevp, toeof, tryclone, tryoutcred; + bool mustclone; /* * NFSv4.2 Copy is not permitted for infile == outfile. + * The NFSv4.2 Clone operation does work on non-overlapping + * byte ranges in the same file, but only if offsets + * (and len if not to EOF) are aligned properly. * TODO: copy_file_range() between multiple NFS mountpoints + * --> This is not possible now, since each mount appears to + * the NFSv4.n server as a separate client. */ - if (invp == outvp || invp->v_mount != outvp->v_mount) { + if ((invp == outvp && (ap->a_flags & COPY_FILE_RANGE_CLONE) == 0) || + (invp != outvp && invp->v_mount != outvp->v_mount)) { generic_copy: return (ENOSYS); } - - invp_lock = LK_SHARED; + if (invp == outvp) { + onevp = true; + invp_lock = LK_EXCLUSIVE; + } else { + onevp = false; + invp_lock = LK_SHARED; + } + mustclone = false; + if (onevp || (ap->a_flags & COPY_FILE_RANGE_CLONE) != 0) + mustclone = true; relock: + inoff = *ap->a_inoffp; + outoff = *ap->a_outoffp; - /* Lock both vnodes, avoiding risk of deadlock. */ + /* Lock vnode(s), avoiding risk of deadlock. */ do { mp = NULL; error = vn_start_write(outvp, &mp, V_WAIT); if (error == 0) { error = vn_lock(outvp, LK_EXCLUSIVE); if (error == 0) { + if (onevp) + break; error = vn_lock(invp, invp_lock | LK_NOWAIT); if (error == 0) break; @@ -4071,16 +4091,24 @@ relock: return (error); /* - * More reasons to avoid nfs copy: not NFSv4.2, or explicitly - * disabled. + * More reasons to avoid nfs copy/clone: not NFSv4.2, explicitly + * disabled or requires cloning and unable to clone. + * Only clone if the clone_blksize attribute is supported + * and the clone_blksize is greater than 0. + * Alignment of offsets and length will be checked later. */ nmp = VFSTONFS(invp->v_mount); + np = VTONFS(invp); mtx_lock(&nmp->nm_mtx); + if ((nmp->nm_privflag & NFSMNTP_NOCOPY) != 0) + mustclone = true; if (!NFSHASNFSV4(nmp) || nmp->nm_minorvers < NFSV42_MINORVERSION || - (nmp->nm_privflag & NFSMNTP_NOCOPY) != 0) { + (mustclone && (!NFSISSET_ATTRBIT(&np->n_vattr.na_suppattr, + NFSATTRBIT_CLONEBLKSIZE) || nmp->nm_cloneblksize == 0))) { mtx_unlock(&nmp->nm_mtx); VOP_UNLOCK(invp); - VOP_UNLOCK(outvp); + if (!onevp) + VOP_UNLOCK(outvp); /* For onevp, same as invp. */ if (mp != NULL) vn_finished_write(mp); goto generic_copy; @@ -4111,6 +4139,8 @@ relock: invp_obj = invp->v_object; if (invp_obj != NULL && vm_object_mightbedirty(invp_obj)) { if (invp_lock != LK_EXCLUSIVE) { + KASSERT(!onevp, ("nfs_copy_file_range: " + "invp_lock LK_SHARED for onevp")); invp_lock = LK_EXCLUSIVE; VOP_UNLOCK(invp); VOP_UNLOCK(outvp); @@ -4134,10 +4164,10 @@ relock: else consecutive = false; mtx_unlock(&nmp->nm_mtx); - inoff = *ap->a_inoffp; - outoff = *ap->a_outoffp; tryoutcred = true; must_commit = false; + toeof = false; + if (error == 0) { vap = &VTONFS(invp)->n_vattr.na_vattr; error = VOP_GETATTR(invp, vap, ap->a_incred); @@ -4169,29 +4199,63 @@ relock: if (error == 0 && ret != 0) error = ret; } - } else if (inoff + len > vap->va_size) + } else if (inoff + len >= vap->va_size) { + toeof = true; *ap->a_lenp = len = vap->va_size - inoff; + } } else error = 0; } + /* + * For cloning, the offsets must be clone blksize aligned and + * the len must be blksize aligned unless it goes to EOF on + * the input file. + */ + tryclone = false; + if (len > 0) { + if (error == 0 && NFSISSET_ATTRBIT(&np->n_vattr.na_suppattr, + NFSATTRBIT_CLONEBLKSIZE) && nmp->nm_cloneblksize != 0 && + (inoff % nmp->nm_cloneblksize) == 0 && + (outoff % nmp->nm_cloneblksize) == 0 && + (toeof || (len % nmp->nm_cloneblksize) == 0)) + tryclone = true; + else if (mustclone) + error = ENOSYS; + } + /* * len will be set to 0 upon a successful Copy RPC. - * As such, this only loops when the Copy RPC needs to be retried. + * As such, this only loops when the Copy/Clone RPC needs to be retried. */ while (len > 0 && error == 0) { inattrflag = outattrflag = 0; len2 = len; - if (tryoutcred) *** 575 LINES SKIPPED *** From nobody Wed Aug 13 19:55:21 2025 X-Original-To: dev-commits-src-main@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 4c2Jy25Bdnz64R2t; Wed, 13 Aug 2025 19:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2Jy224z0z3K9w; Wed, 13 Aug 2025 19:55:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755114922; 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=vpJArRoyVmaZ4Jqxbs/8ov5QUoG+GVNxQWq0Ivt7Cp8=; b=V2saGohJ02FBpCX0wQvo9Os/w0aQ+K6GCjnEzVXpfcPjvZ7ymvl5KwTTIRDveI4ADbZUSf ocdMPjd9vlMYK5EuhrHmj/vKtdiVKiSncxLPeVM3tYKCg0YCk+ErlJwDnPumESqKZRpvHV kmixs6r3dngIJ6VB0wzuqZ6L6tPsHGk5WOp1wIxS3uV+N83D7f1k3HPTpzW1GtUnplWtX0 u/HY9q3j3WEguME7kLlNbetOuzwpJlEfTzf2vGWG8kFtKR98BOxoCsypb+t6zsUhLpP0Op bTYbYCgb3orG/J5vgxe0xGXdMwwycp3yyVAPx2udX0RPtHDNrv9gCd+0J0wBBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755114922; 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=vpJArRoyVmaZ4Jqxbs/8ov5QUoG+GVNxQWq0Ivt7Cp8=; b=rdfCez73mBazczU6cSxg3qq5IEi5I4fLuz0fIWaPCIQd8Z5YDELyi31xBgP5d8DAlX2T+s Oj8p1M1ZgwoIwcbEGuzzxupb9XLE+l+gMyb43bsCuIgOz2wSzL4L/+nH2Rysa1Aln9PiRX 3WoGsDuhP4Yt72Ju4uIjn2K4Oa5jxiwESwcxRu++7xhm1bG6F6U0DVY5VDx4cE1VyxT8Xi IpSZwKX40z/RT3DoDA4MnsCwpXJqvtBEB04y3okP4UFgrKJNjXg4HTO4OU5hYo+r4tYmMc GynOgJkbqwIKsV1TrXwhAqZim6BV87jLRJ4jetm53XJFa0Txop/TqK2GwdO10g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755114922; a=rsa-sha256; cv=none; b=viWcQgAuszqqDTDDmPH+uCKtaYxkwuDLFBGN3amgrs+ScMTiBU/91JaJghLIEM4Zf4VYua fynY4dMIGcluCoMe6voN5H6SMVNruwjvM6J9oIsqxfiyyHmIkX3+TghC7JqtvhlGEMc4BP 9we7DnpwHJUiD8nOMxintsium+NmrNyUAhTSIkKMeNKNeATOE0K0JdeKO0Ljat9BDx9lF0 OiEYlxOcWpz3oCv3BVlUeHFR5wvMrxO7H0LX6jhkoNoCEWnmQ3jOfMY651MsVdysxgPJI/ Qnh3V1FEYZLao36tGNk6y2sXLid1ymGP5au0DEZDCNmzVWfbLzBSvtRuHjx4Tg== 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 4c2Jy21DVwz5n2; Wed, 13 Aug 2025 19:55: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 57DJtLhr000645; Wed, 13 Aug 2025 19:55:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DJtLaW000642; Wed, 13 Aug 2025 19:55:21 GMT (envelope-from git) Date: Wed, 13 Aug 2025 19:55:21 GMT Message-Id: <202508131955.57DJtLaW000642@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: db57584068f6 - main - UPDATING: Make an entry for cce64f2e6851 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db57584068f6d62b852aaf942314948206c1e668 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=db57584068f6d62b852aaf942314948206c1e668 commit db57584068f6d62b852aaf942314948206c1e668 Author: Rick Macklem AuthorDate: 2025-08-13 19:52:09 +0000 Commit: Rick Macklem CommitDate: 2025-08-13 19:52:09 +0000 UPDATING: Make an entry for cce64f2e6851 --- UPDATING | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/UPDATING b/UPDATING index c4452354b189..82399310d299 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250813: + Commit cce64f2e6851 changed the internal KAPI between the NFS + modules. As such, all of them need to be rebuilt from sources. + __FreeBSD_version has been bumped to 1500060 already today, + so I will not bump it again for this. + 20250813: The gpiobus_attach_bus() function has been removed. Drivers should now use the gpiobus_add_bus() function instead. The difference being that From nobody Wed Aug 13 20:01:33 2025 X-Original-To: dev-commits-src-main@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 4c2K595CK6z64R8F; Wed, 13 Aug 2025 20:01:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2K594Jjkz3KZy; Wed, 13 Aug 2025 20:01:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755115293; 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=Mn/VMsNLLCXNgAls8FM8ndk3a+AoB2oSQiTvCq+WuiA=; b=ogvrty4gYVI1ccYHUo87VB0xh+dLowZEqX6x9+TQGp94D7j8tcd+WUw9mOvU8GJ5NmGj6W 3euzF1mRcPCnt61aiNQHHHfmyoXWSM/y+kDtxM03myz4AHuWxqAtkBU7WtWTOf4xf4WYK/ mwz4ARibRUd9W55eOLG/F8uE+RFJvwAQBy40gHWty+YSe4r+31ErMrBK9+mjd2DlN6tG0D 3g2/Piq66gi+XPd67vbsFUZy3RQTCl9hA3YMag8etUDqkm5DRyQnvEj6c8u41y/DKEWDXk d4cSQ/l+Et/PQQUTd4uhckuvwliCZd25PBx91JEcVXpUnQWm7v8GAOcArgNUGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755115293; 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=Mn/VMsNLLCXNgAls8FM8ndk3a+AoB2oSQiTvCq+WuiA=; b=IDRPWCASjbBjo1PfRH/Uc55L4hs7H2ks3/ia/m4vJV/kN8n9o5VJrMX1Lt32t47XPQ6TcN ejQ46RZ0OYJ9JgaQdsTCkpzYioNqV1AcJoJ0XnKV9scxtmtGhJm1aKai1GEWLbe/RkY8tU s1CPwpmZwfP6rd++EKAQkH2Cf/uLUGke1FUzoqlpaR14z1vgGZ4c4TZOFLjpYRVZvH9e2W D+cFOisLW9ExVdebEluB+pYNTxESYQJjciw7NQpuH2AzO+RAqg4Lc/LqKTItcJ0EEeXUIq So4yqZ/zH4M7j2lcGXeAjDyA/a8KhTdixZvgk6Zpv0Sr5OWD+N0ojzbmPpBggQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755115293; a=rsa-sha256; cv=none; b=b6SNqeBnlkhJ5fxjsBIK7WOhSkEXOsfSXrYB3CX9PxzkME2mRbsuYRSWN6pFkEmc5HquqR UVBc6xEuS/3dUC8c3xcIBlgtbjlq52rblawpYnschG/XuX6sX7cLxW9My4JnWofjzjuyJ1 xtjRHhzsyjqkmS+b/G05p4G2UpYbgk9AgNO24BuDklKEkMF8Cg0T2tdCU1tzl0MTx3hF6U vzbRH00a+h9l0bZnVnvS4FbEHELamJ75gMkXQ7ezdoKnLnpEnWjaEEb365CbKd2q5BrfZe QqGPf5NumtieJMD9p7hKHcnfnHMidtSLBmdlhtHyetS/CAB9j+gc/eD32QUQrg== 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 4c2K593n88z6k8; Wed, 13 Aug 2025 20:01:33 +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 57DK1XXj014378; Wed, 13 Aug 2025 20:01:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DK1XSS014375; Wed, 13 Aug 2025 20:01:33 GMT (envelope-from git) Date: Wed, 13 Aug 2025 20:01:33 GMT Message-Id: <202508132001.57DK1XSS014375@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: ef5e966e6e7c - main - RELNOTES: Make an entry for cce64f2e6851 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef5e966e6e7c0b4123abf28a8a7770a54f383b24 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=ef5e966e6e7c0b4123abf28a8a7770a54f383b24 commit ef5e966e6e7c0b4123abf28a8a7770a54f383b24 Author: Rick Macklem AuthorDate: 2025-08-13 19:58:21 +0000 Commit: Rick Macklem CommitDate: 2025-08-13 19:58:21 +0000 RELNOTES: Make an entry for cce64f2e6851 --- RELNOTES | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RELNOTES b/RELNOTES index da466b594f60..c11e8543746c 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,12 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +cce64f2e6851: + Add support for the NFSv4.2 Clone operation, which uses + block cloning to "copy on write" files on an NFS server. + This only works for exported ZFS file systems that have + block cloning enabled, at this time. + 7ac276298b72, 7b8c9de17448, 1271b1d747a7, 9dcb984251b3: Support for Secure RPC DES authentication has been removed. This includes publickey(5), keyserv(8) and the rpc_secure(3) routines which From nobody Wed Aug 13 20:05:28 2025 X-Original-To: dev-commits-src-main@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 4c2K9j03YSz64RRP; Wed, 13 Aug 2025 20:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2K9h6PnBz3LTf; Wed, 13 Aug 2025 20:05:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755115528; 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=nmrFTwMOD6GQ6Oml1s/6FhPOgsCAKsojnFKe5VfwSWs=; b=pHfCSkmMZh9sKh8lsdwoy3z9eAuJkHnNO687b+FICXe6xvd9wrtBuzjqAZtq2eaFjB6vsu ZDpfoOjOEWdRhPHD9rmvsC56Uyeae3REMKY+BT7g5hKWm7zCEWdL28M663+CthWbdYM7OW V63f65ttdlA/FSNicvm9BcM6y2CZOhK7RvTcEDI8J2HJYRMO2+9tnnvSMglP/KdNs0YUtx 2ncQ5g+l0cdZJEqZ2nIbgfTum1woCq2YxhgedC4FaseiS+KM1m+9xnpZklEY+3msnEtzc5 ho0nZVZIYOz2nnup08ZaafRqakDUWYeoNhPOqeEzlVwWkra9a3/DyeyhXrjs7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755115528; 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=nmrFTwMOD6GQ6Oml1s/6FhPOgsCAKsojnFKe5VfwSWs=; b=SQE2X5Wq6MLJGwVu3y4GlTXpsEQ4NGkVNbiNopI7+Fl8E1QNNAcyTmciSEAiu2bPHd4MFu vxsZG2ORl9jNb09vPWh9qZIWySwlZOqbKrTh0UY35Z70dDURVyo0l5mbO6y4Fyaj5NC9sv ZrFH+fXQd4f5T2Qi8KsYEHbf9SETiX2Maqj0EJ/SSjbMwBBZdVIzuBk9a9oC9904evKi4s ATW5b2ebVrcFwn6eIkmRFujMnPM4v+eFj9fdGbXB1KMr5QLWsGFzqZMq+t/Oy/tVa2B80/ tXqeG2QOGJPmLjhB+DSlJRr0SUmHmAYZFvAWYJ6PPf/IImsBBrxHWc2R3WMDHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755115528; a=rsa-sha256; cv=none; b=DRyTMgXKYYS/EkEcwuOUpNgOPQmQ1UoFRs3fqEX1uFTmoewpczFXY7Q835/1iJs9QzOXGx C3KXicdGqzixfRRVxAMOD54a60+Slr30OT3HrmRwjkJFUI40N04cl8IaLgkgBr31SCIlZv LNcymR2psqeK93r/C0FwAffD86tj4hu5BAIp8oEKZYmewT92vfYQHT/jXtg6onhjZiH4Yo B0f1o7FAvJUA7eFH5BNzbk7b88tYAGQlS3FeuraOBMAP0D1FKmitfJOl6pAQ3Un7Gk2U2p pLkdTdTVndH+cZgUF5wKyqKiy0pWxGElTvT4tfH70vUiiAin/zFLBy+ba0BYGg== 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 4c2K9h5ZXRz6ml; Wed, 13 Aug 2025 20:05: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 57DK5StB020392; Wed, 13 Aug 2025 20:05:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DK5S00020389; Wed, 13 Aug 2025 20:05:28 GMT (envelope-from git) Date: Wed, 13 Aug 2025 20:05:28 GMT Message-Id: <202508132005.57DK5S00020389@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 503769f2a7f6 - main - Fix missed assertion update in physical rewrite patch List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 503769f2a7f665c7b9d59020e94064ee8c5365a1 Auto-Submitted: auto-generated The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=503769f2a7f665c7b9d59020e94064ee8c5365a1 commit 503769f2a7f665c7b9d59020e94064ee8c5365a1 Author: Alexander Motin AuthorDate: 2025-08-13 20:01:44 +0000 Commit: Alexander Motin CommitDate: 2025-08-13 20:05:06 +0000 Fix missed assertion update in physical rewrite patch Physical rewrite patch changed the meaning of BP_GET_BIRTH(), but I missed update one of its occurences, ending up asserting equal logical birth times instead of equal physical birth times. PR: 288722 --- sys/contrib/openzfs/module/zfs/dsl_deadlist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/contrib/openzfs/module/zfs/dsl_deadlist.c b/sys/contrib/openzfs/module/zfs/dsl_deadlist.c index 475db3c89508..41ac72bf1c16 100644 --- a/sys/contrib/openzfs/module/zfs/dsl_deadlist.c +++ b/sys/contrib/openzfs/module/zfs/dsl_deadlist.c @@ -1049,7 +1049,8 @@ dsl_livelist_iterate(void *arg, const blkptr_t *bp, boolean_t bp_freed, ASSERT3U(BP_GET_PSIZE(bp), ==, BP_GET_PSIZE(&found->le_bp)); ASSERT3U(BP_GET_CHECKSUM(bp), ==, BP_GET_CHECKSUM(&found->le_bp)); - ASSERT3U(BP_GET_BIRTH(bp), ==, BP_GET_BIRTH(&found->le_bp)); + ASSERT3U(BP_GET_PHYSICAL_BIRTH(bp), ==, + BP_GET_PHYSICAL_BIRTH(&found->le_bp)); } if (bp_freed) { if (found == NULL) { From nobody Wed Aug 13 20:11:18 2025 X-Original-To: dev-commits-src-main@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 4c2KJQ5sCZz64SFR; Wed, 13 Aug 2025 20:11: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2KJQ4pyGz3MCl; Wed, 13 Aug 2025 20:11:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755115878; 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=lM+pRxiFhrxWrL9kVSlGmZgjTPhEv08qPZsAvhnQIXE=; b=VN5Ah04Gd1C773ijT448q+xhqSX49kYniqYjS+x1J0qkxr/7YZ2B1qIA86ptSqF+p3wiSc PiWMUvdI8ZgC7LMSR4XB5ZVm8vl51TLVz+3l5+XZr8zeZ29esIo7hSeqRv5lMwMKhv5Sms cYh7Tfdy2NFep28UC3hkHeK0ouI1r4OGGAssZUNc973ppx1YA3YfO9WjgGhvEdqX0K2iRF hG9xJZ7kxKelMPHXPKFkebag5v4HbjmueABMKFnhe3sxEpz1IgJZHngw/cR6RHEIUPb3Lm cmOzAv7sJ082GduOWKE7hRKTL1JRzs1qzFhzDyKBMK1aK7/KjTInDEkXfg/lKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755115878; 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=lM+pRxiFhrxWrL9kVSlGmZgjTPhEv08qPZsAvhnQIXE=; b=Lba+lyd0iB+XdBgaW8qTqjH9CvA5sxrpB3YThF2oNUu1iT9J1+PZcXFtSrEOeTWdyPfncP VlHIqFsH9a2E8wZXm2JoTMoh2Soag6/oWcKh7d3Xs8oNX+13NGbHgQBdUdy3pOyX0sYXxi rh0pm96BQeb1BTHCqhi4LFaIOzpdq0Mcyn0dMCXWBCYD3YBrew4aEnQkHFhUvDSruKhXPf K/+MALyKzYdOo7EyPzDXdy8fa0nASbHjOeyb9C/icG4nL6nGpUUOf35NS/5xLquh+ox/Xf 9v3Id5ryKWdcOJbjLHeJ8bk77hgXea+s3mv2qq4frtxUvsFTVAiTa3WJAFcm6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755115878; a=rsa-sha256; cv=none; b=CzXW3VXb5yNx3ObCHt9z6zAoU7P6NflYe4vAilMu6o93TfkffHF7aMi8TkwDXawh7K7RwV kfHDuN45XZDJ2aC12o/vP7RgguzT12XrPNeuB02OiHFvhUF0idpHgWFNZOT6rRDipldVbV vlUtRGYcThk0TfDpFvmS9oOkcvgzmHLkW2cVY/yzazfl/OmiRnv7BuAo0BfCFKZeZlpQcq +wLZ+59S3mUtPU92ym4zF6bzUkzk3d9NTPFm7/rZ0HpfXAmEIDZ+gHh2UwJ5hhozefBnbQ tE5fWWdIhGbMZAUa6Bh+UFM0L/6Nsy+UdHezrv4yOtM40LdHgk+YG0ccg0BC1A== 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 4c2KJQ44lNz74R; Wed, 13 Aug 2025 20:11: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 57DKBIvS030960; Wed, 13 Aug 2025 20:11:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DKBIZo030957; Wed, 13 Aug 2025 20:11:18 GMT (envelope-from git) Date: Wed, 13 Aug 2025 20:11:18 GMT Message-Id: <202508132011.57DKBIZo030957@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 92a7f2d57763 - main - tests/ci: Add KYUA_TEST_FILTERS to allow user to select specific tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 92a7f2d577630d670643f855a1d123a2260102af Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=92a7f2d577630d670643f855a1d123a2260102af commit 92a7f2d577630d670643f855a1d123a2260102af Author: Siva Mahadevan AuthorDate: 2025-08-13 20:09:32 +0000 Commit: Li-Wen Hsu CommitDate: 2025-08-13 20:11:09 +0000 tests/ci: Add KYUA_TEST_FILTERS to allow user to select specific tests Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51306 --- tests/ci/Makefile | 1 + tests/ci/tools/ci.conf | 1 + tests/ci/tools/freebsdci | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/ci/Makefile b/tests/ci/Makefile index 48e638fdb79c..bc45c6acdfb4 100644 --- a/tests/ci/Makefile +++ b/tests/ci/Makefile @@ -73,6 +73,7 @@ CIIMAGE= ci-${OSRELEASE}-${GITREV}-${KERNCONF}.${FORMAT} CIDISK?= ${.OBJDIR}/${CIIMAGE} VMSIZE?= 6g CITYPE?= full +KYUA_TEST_FILTERS?= META_TAR!=mktemp /tmp/meta.XXXXXX META_DIR!=mktemp -d /tmp/meta.XXXXXX META_DIROUT!=mktemp -d /tmp/meta.XXXXXX diff --git a/tests/ci/tools/ci.conf b/tests/ci/tools/ci.conf index a9998a3e5373..b5286304c607 100644 --- a/tests/ci/tools/ci.conf +++ b/tests/ci/tools/ci.conf @@ -68,6 +68,7 @@ EOF elif [ "${CITYPE}" = "full" ]; then cat << EOF >> ${DESTDIR}/etc/rc.conf freebsdci_type="full" +freebsdci_test_filters="${KYUA_TEST_FILTERS}" EOF fi cat << EOF >> ${DESTDIR}/etc/sysctl.conf diff --git a/tests/ci/tools/freebsdci b/tests/ci/tools/freebsdci index 51bd19e2967d..42c565a45055 100755 --- a/tests/ci/tools/freebsdci +++ b/tests/ci/tools/freebsdci @@ -39,6 +39,7 @@ istar=$(file -s ${tardev} | grep "POSIX tar archive" | wc -l) load_rc_config $name : ${freebsdci_enable:="NO"} : ${freebsdci_type:="full"} +: ${freebsdci_test_filters:=""} PATH="${PATH}:/usr/local/sbin:/usr/local/bin" auto_shutdown() @@ -77,7 +78,9 @@ full_tests() tar xvf ${tardev} -C ${metadir} cd /usr/tests set +e - kyua -v parallelism=${parallelism} test + kyua \ + -v parallelism=${parallelism} \ + test ${freebsdci_test_filters} rc=$? set -e if [ ${rc} -ne 0 ] && [ ${rc} -ne 1 ]; then From nobody Wed Aug 13 20:29:58 2025 X-Original-To: dev-commits-src-main@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 4c2Kjz2k4Pz64TBY; Wed, 13 Aug 2025 20:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2Kjz0Hpqz3Pj1; Wed, 13 Aug 2025 20:29:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755116999; 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=/BTBT6OkL1Vy/mVLevqja+mzbDvd53862jInzKIb/Jo=; b=xGs9nEQnUEu8A/3i+R40swBqAlL7wGj8rf3ACjObtbVSVQeHVFM1jAYQXF5uMJIZZC/BB9 5mGma3DtwtRC7t7+xNvhTIyeoatfuma/UPuCkLd+dbA8AHxYGQTdBiTL9Ihpk3S7VC/t1t cJeXRymwbzYhrDBF+0wpm9Q4ja0mAJCC4X3NdPgvDRYhqM5dF2OzU4ucpwWZ+NGR8vlpSe I3HcYcP5i7r0fEFmZGeS/om15+m0jKyVWcxz3PTRYw8dJjNdUUkQZJGCPx0gkpz3M9RraC CT/PS4f80oYTMYlGtHRUSQJLmDPKWhDvLE/TAhPBuSjvQBO8GyennCwG9/Cedw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755116999; 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=/BTBT6OkL1Vy/mVLevqja+mzbDvd53862jInzKIb/Jo=; b=JKqZd4rjJBS/2889FT18+v9jGHkZ/Vt7eDC22WUgeiLAvU6+JG4pf4Zulzl04fk11kA3W+ mWdRDyCAQWuYhKYtWFTCwZxQhBY3dAICB2HVRF+kmaX9VAwT1ewaAdI+5UuUKGXkjACpLb lcfTf80i4aaIBYzboLs5ni8ykTQ0H3Hfdr/tLnDl0yk4xh8zDnDYYg6Yt6uvQxfbV821tH 8ZX3q7tavbxLdVImvpyR3NXLCDnT+HxtNj+EYBd4attlsBDxFLbN6HRp1THOlJRVvSUcLX tIZER+w2nntd9pgBmEcP3JPInL2zVbry00RQR7GQ/GmGah8L1PS9pKk/SFMPrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755116999; a=rsa-sha256; cv=none; b=dFR63B48qcvtG66ZxtFoLbqsmd/Yc1KBggNH4cCQ3JtHHcjMpwcsaL9MS5UHWYdEminmi6 +R/uQsHIOwvitGTdWWx/k+82gcloaat2Oi98eV8T4oeciYUAQ0vx/W79ADQVp74snczQ9R NxZbIhX5Jj/xjFkEhJTDNRZzCd8WMb4OcX5WL9f58xdhIFVrDy4iriNxla8Pw59/AOnAri PnHBT5V5J22iKgl6qV360Dw0oIvHJGlfGPUHdbvHkq5TH9gbqmqUNn50PcmM3Otw4qZdXr 1LWgGS2shldvB/e4EOWl+jcA584In/OWFLPb+04oDYFbS26lx3Ab2LLdArr11Q== 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 4c2Kjy6VNrz7J0; Wed, 13 Aug 2025 20:29: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 57DKTw8O059090; Wed, 13 Aug 2025 20:29:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DKTwAD059087; Wed, 13 Aug 2025 20:29:58 GMT (envelope-from git) Date: Wed, 13 Aug 2025 20:29:58 GMT Message-Id: <202508132029.57DKTwAD059087@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: e990e460d50c - main - tests/ci: Fix unescaped kld_list var in rc.conf List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e990e460d50c628dfa681c5693bd8ece87b001ad Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=e990e460d50c628dfa681c5693bd8ece87b001ad commit e990e460d50c628dfa681c5693bd8ece87b001ad Author: Siva Mahadevan AuthorDate: 2025-08-13 20:22:04 +0000 Commit: Li-Wen Hsu CommitDate: 2025-08-13 20:22:04 +0000 tests/ci: Fix unescaped kld_list var in rc.conf Signed-off-by: Siva Mahadevan Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51305 --- tests/ci/tools/ci.conf | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/ci/tools/ci.conf b/tests/ci/tools/ci.conf index b5286304c607..9db0819498ab 100644 --- a/tests/ci/tools/ci.conf +++ b/tests/ci/tools/ci.conf @@ -39,22 +39,22 @@ test_suites.FreeBSD.disks = '/dev/vtbd2 /dev/vtbd3 /dev/vtbd4 /dev/vtbd5 /dev/vt EOF cat << EOF >> ${DESTDIR}/etc/rc.conf kld_list="" # Load modules needed by tests -kld_list="${kld_list} blake2" # sys/opencrypto -kld_list="${kld_list} cryptodev" # sys/opencrypto -kld_list="${kld_list} dummymbuf" # sys/netpfil -kld_list="${kld_list} fusefs" # sys/fs/fusefs -kld_list="${kld_list} ipsec" # sys/netipsec -kld_list="${kld_list} mac_portacl" # sys/mac/portacl -kld_list="${kld_list} mqueuefs" # sys/kern/mqueue_test -kld_list="${kld_list} pfsync" # sys/netpfil/pf (loads pf) -kld_list="${kld_list} pflog" # sys/netpfil/pf -kld_list="${kld_list} ipl" # sys/sbin/ipf (loads ipfilter) -kld_list="${kld_list} ipfw" # sys/netpfil/ipfw (loads ipfw) -kld_list="${kld_list} ipfw_nat" # sys/netpfil/ipfw (loads ipfw_nat) -kld_list="${kld_list} ipdivert" # sys/netinet (loads ipdivert) -kld_list="${kld_list} dummynet" # sys/netpfil/common -kld_list="${kld_list} carp" # sys/netinet/carp -kld_list="${kld_list} if_stf" # sys/net/if_stf +kld_list="\${kld_list} blake2" # sys/opencrypto +kld_list="\${kld_list} cryptodev" # sys/opencrypto +kld_list="\${kld_list} dummymbuf" # sys/netpfil +kld_list="\${kld_list} fusefs" # sys/fs/fusefs +kld_list="\${kld_list} ipsec" # sys/netipsec +kld_list="\${kld_list} mac_portacl" # sys/mac/portacl +kld_list="\${kld_list} mqueuefs" # sys/kern/mqueue_test +kld_list="\${kld_list} pfsync" # sys/netpfil/pf (loads pf) +kld_list="\${kld_list} pflog" # sys/netpfil/pf +kld_list="\${kld_list} ipl" # sys/sbin/ipf (loads ipfilter) +kld_list="\${kld_list} ipfw" # sys/netpfil/ipfw (loads ipfw) +kld_list="\${kld_list} ipfw_nat" # sys/netpfil/ipfw (loads ipfw_nat) +kld_list="\${kld_list} ipdivert" # sys/netinet (loads ipdivert) +kld_list="\${kld_list} dummynet" # sys/netpfil/common +kld_list="\${kld_list} carp" # sys/netinet/carp +kld_list="\${kld_list} if_stf" # sys/net/if_stf background_fsck="NO" sendmail_enable="NONE" cron_enable="NO" From nobody Wed Aug 13 20:32:18 2025 X-Original-To: dev-commits-src-main@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 4c2Kmg1cL0z64TJb; Wed, 13 Aug 2025 20:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2Kmg0VW0z3QP3; Wed, 13 Aug 2025 20:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755117139; 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=zGVrhgtu0TQfXm5rJN9IG7LbJn7cHlH+8Wnk8cxtrf4=; b=rQrkVGoMwl2ve/BxaP4mipRCSnd9GwpwQKNmkiu2wzYEy2tMQs9A9GUTmNNKmpmd0CbpWn 4FP2MFJaCg/WgZMJFIeG7KN4+CfpqwnSWJhC5K0q3PUIbLGaU+mfgyAb5YcV31LgNjYQzH ciULsDBR9wJM5nDr8U2od+evivh/gt+t8gws7xmqTFpaLif+y73DL6RM6/Z5V2IB/lDCzG UKkSCDSpd/N03+s7twSKEhZxYfF+9UvnRhA7RebY4tAOwQLZAIIv9213QllrZEItRmBgt4 b6nMZWul2dMfviJ07LLrAjK7Q8qg9pjFNYwXY+uV2OPK0L1m9NcDm3s/yhHOUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755117139; 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=zGVrhgtu0TQfXm5rJN9IG7LbJn7cHlH+8Wnk8cxtrf4=; b=nKyBx84htAZDlkbQjU9MYOYX8ABtWwc/mLPIf1+RjlQSjPnruu0G2sWAxKgVhJr8iqjFu8 iPXkj57kX6dw0EoFQYY+EU+PcIe2d12go+r8aYzGg+oY23bKd3Ofn3eEojO7S90b/7QUn8 hq8XEPv54n+f+N2TJ0Eana1gDzWQxT45JVhwjIHJv0eUlKbGBCRMFHtPvFKnh+i5aK/Cvd XEFH3S3l33MgRM2nwYJViaYaWLfSnHg+i49r4/y2eOUcHWo0zydeXCGMC3myirjOZX8Rfk 3c/ttKu63Dk2b8OXmTnnQO357ubhgw3WrAscDH2TktmGXFIKjUnpRbN50VVHZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755117139; a=rsa-sha256; cv=none; b=bWvP3E/pg0oOGgx1tjkvabLUV1dyhycLsHWG8JjewJ8CCsIwUWPwjF8kaAw+NvFNKGjTRZ vRITE88KXeFmoZUypU3j48CRUFR6Vc7HSArxxc31cpfDnwU5bwioMKa+goIMGKdhsSJuQr fsoZY5RuayHkzfdZj9a+TLLJ3fTJYX8P/DeB4PJl93uUOs8Yn75ObUlWBgTtcHZM+zS87F STjiA2c99kQRQ03Ru1FoGQd9d3/RA9QXAT/FTpRGULyzx8YYZvVedhCJPFJSbTRKI3VeY0 o62CE5JIzbQPwKp9/1/ussS2m0zp84oPkEDHvvlUykv4/eY+tMeIGPJNAZvKcA== 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 4c2Kmg068lz7b4; Wed, 13 Aug 2025 20:32:19 +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 57DKWIo7075605; Wed, 13 Aug 2025 20:32:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DKWI7w075602; Wed, 13 Aug 2025 20:32:18 GMT (envelope-from git) Date: Wed, 13 Aug 2025 20:32:18 GMT Message-Id: <202508132032.57DKWI7w075602@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 313a68ea20b4 - main - bhyve: Add CPUID_BHYVE_FEATURES leaf List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 313a68ea20b48629f655cf38987f4a6ff822f1ab Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=313a68ea20b48629f655cf38987f4a6ff822f1ab commit 313a68ea20b48629f655cf38987f4a6ff822f1ab Author: David Woodhouse AuthorDate: 2025-08-11 10:44:05 +0000 Commit: Colin Percival CommitDate: 2025-08-13 20:31:15 +0000 bhyve: Add CPUID_BHYVE_FEATURES leaf This allows the hypervisor to advertise features to the guest. The first such feature is CPUID_BHYVE_EXT_DEST_ID which advertises that 15 bits of target APIC ID are available in MSI (and I/O APIC) interrupts, as documented in http://david.woodhou.se/ExtDestId.pdf This defines the guest ABI. The actual implementation will come in a subsequent commit. Reviewed by: kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1797 Signed-off-by: David Woodhouse --- sys/amd64/vmm/x86.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c index 366f1da9f850..9c2fdac11a81 100644 --- a/sys/amd64/vmm/x86.c +++ b/sys/amd64/vmm/x86.c @@ -48,7 +48,12 @@ SYSCTL_DECL(_hw_vmm); static SYSCTL_NODE(_hw_vmm, OID_AUTO, topology, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, NULL); -#define CPUID_VM_HIGH 0x40000000 +#define CPUID_VM_SIGNATURE 0x40000000 +#define CPUID_BHYVE_FEATURES 0x40000001 +#define CPUID_VM_HIGH CPUID_BHYVE_FEATURES + +/* Features advertised in CPUID_BHYVE_FEATURES %eax */ +#define CPUID_BHYVE_FEAT_EXT_DEST_ID (1UL << 0) /* MSI Extended Dest ID */ static const char bhyve_id[12] = "bhyve bhyve "; @@ -100,7 +105,7 @@ x86_emulate_cpuid(struct vcpu *vcpu, uint64_t *rax, uint64_t *rbx, if (cpu_exthigh != 0 && func >= 0x80000000) { if (func > cpu_exthigh) func = cpu_exthigh; - } else if (func >= 0x40000000) { + } else if (func >= CPUID_VM_SIGNATURE) { if (func > CPUID_VM_HIGH) func = CPUID_VM_HIGH; } else if (func > cpu_high) { @@ -601,13 +606,20 @@ x86_emulate_cpuid(struct vcpu *vcpu, uint64_t *rax, uint64_t *rbx, regs[3] = 0; break; - case 0x40000000: + case CPUID_VM_SIGNATURE: regs[0] = CPUID_VM_HIGH; bcopy(bhyve_id, ®s[1], 4); bcopy(bhyve_id + 4, ®s[2], 4); bcopy(bhyve_id + 8, ®s[3], 4); break; + case CPUID_BHYVE_FEATURES: + regs[0] = 0; /* No features to advertise yet */ + regs[1] = 0; + regs[2] = 0; + regs[3] = 0; + break; + default: default_leaf: /* From nobody Wed Aug 13 20:32:20 2025 X-Original-To: dev-commits-src-main@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 4c2Kmh3zQVz64Tb1; Wed, 13 Aug 2025 20:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2Kmh1Qpyz3QP6; Wed, 13 Aug 2025 20:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755117140; 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=cgQiP+brOMuckZz608CPmNDMFa017ZaSgqoSMU/AwJg=; b=V7BeBGwWubrsLdEGZyGfa36+EThhxEXMZS3Vx4MI1jioO18570Kv4Tn9OMAnFxnb4llIZV oAtVno/Zp/TZhwE76GQcSMmFyAIda4TLakicGxsYDL0zR+lQpS4xdUpmf9xzVVTm6FesZu n2fES6WT+WNHc+PHRePLl6cpnmfTvKAmXj3fI452rlJSgj45IP/GHLRPbhUt7K0yHhaEW+ wFhCq9NaJiVxcIsd4BP08i0lTVRiUqG4Lnw6VwcQQJHXgZLTVb0o5A7FdIkRxm70/xTWlw moRqjZxT1/5DaPaHgc45TCaM2UEs1JxBlGMgnkZ3dH3nDZhc0tpYAnhtDmhKyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755117140; 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=cgQiP+brOMuckZz608CPmNDMFa017ZaSgqoSMU/AwJg=; b=wOP6NWFi8fMziEdagRzOyIzY93pG1OgY/Wm6mKWBVhe/jf0L3RnN0XMd7i/eWlKlp8l4VA 0nO0/ziad+jF+Ggh2WIMGY0CBW8ellKPJ8fIuhcmKki+8WY6Fyf8/dXQJ84BbSwu6z1xYw W1W8r5oVQA0gu9hcjb97NQ+FwigvI4had/TqtOdXoGNvc/QS7oMHFbI+PoN+8n1ePXCPhG 6CcFkYzTN62tKZHN7U+IViNinfCrfriPRmbF3UhSFPkXywaehRzCbxyITXrbQPWDp/V4pC jSWf993fYkP3hbCZ4a3Ot/jIZpQEqCyVAErjQvssKzVx7IIhzoFEaSwwDMJ89A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755117140; a=rsa-sha256; cv=none; b=QdBgqzdQxBjF2wViTjmfiXcQ7kz45OV39wt0CIZ9XDuNmx6frsPvF1VStzyrAR8k7b6mDq jL6YWYAaMmuHZH6cf7QpaNDek5g6Trch1v+XplcBD7mCuB0ukoJnD76rYybd83wbKYR4dh UxYiPa/IEksRIW/wBiKCQPw1vBJXgwjc4BUjMZmUwSf0CpJ95yQfNRuCeo5SpCUHSHCGTR C8Gi8EU2upIao7NOOf8JtSiCNE6qirYnlMnFvawOYVqHqYk1XsgGnObt4Czj6IFXql8JEC qd/+UCB0kvE42FRfHHFr39fkOlsHWDRoe8EiCgdXlaOSrZpTXQnVqpzEgzXAow== 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 4c2Kmh0vcbz7b2; Wed, 13 Aug 2025 20:32: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 57DKWKVC075638; Wed, 13 Aug 2025 20:32:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DKWKmf075635; Wed, 13 Aug 2025 20:32:20 GMT (envelope-from git) Date: Wed, 13 Aug 2025 20:32:20 GMT Message-Id: <202508132032.57DKWKmf075635@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 4322d597453d - main - bhyve: Support and advertise 15-bit MSI Extended Destination ID List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4322d597453d63d638675b8612d7aaabd65dcadd Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=4322d597453d63d638675b8612d7aaabd65dcadd commit 4322d597453d63d638675b8612d7aaabd65dcadd Author: David Woodhouse AuthorDate: 2025-07-31 07:33:54 +0000 Commit: Colin Percival CommitDate: 2025-08-13 20:31:15 +0000 bhyve: Support and advertise 15-bit MSI Extended Destination ID To support guests with more than 255 vCPUs, allow bits 5-11 of the MSI address to be used as additional destination ID bits. This is compatible with Hyper-V, KVM and Xen's implementation of the same enlightenment, as documented at http://david.woodhou.se/ExtDestId.pdf Reviewed by: kib Pull Request: https://github.com/freebsd/freebsd-src/pull/1797 Signed-off-by: David Woodhouse --- sys/amd64/vmm/io/vioapic.c | 9 +++++++++ sys/amd64/vmm/vmm_lapic.c | 5 +++++ sys/amd64/vmm/x86.c | 2 +- sys/x86/include/apicreg.h | 2 ++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/sys/amd64/vmm/io/vioapic.c b/sys/amd64/vmm/io/vioapic.c index 8869dc1383e6..7df6193d6dc0 100644 --- a/sys/amd64/vmm/io/vioapic.c +++ b/sys/amd64/vmm/io/vioapic.c @@ -130,6 +130,15 @@ vioapic_send_intr(struct vioapic *vioapic, int pin) vector = low & IOART_INTVEC; dest = high >> APIC_ID_SHIFT; + /* + * Ideally we'd just call lapic_intr_msi() here with the + * constructed MSI instead of interpreting it for ourselves. + * But until/unless we support emulated IOMMUs with interrupt + * remapping, interpretation is simple. We just need to mask + * in the Extended Destination ID bits for the 15-bit + * enlightenment (http://david.woodhou.se/ExtDestId.pdf) + */ + dest |= ((high & APIC_EXT_ID_MASK) >> APIC_EXT_ID_SHIFT) << 8; vlapic_deliver_intr(vioapic->vm, level, dest, phys, delmode, vector); } diff --git a/sys/amd64/vmm/vmm_lapic.c b/sys/amd64/vmm/vmm_lapic.c index fd511733492e..0cae01f172ec 100644 --- a/sys/amd64/vmm/vmm_lapic.c +++ b/sys/amd64/vmm/vmm_lapic.c @@ -115,6 +115,11 @@ lapic_intr_msi(struct vm *vm, uint64_t addr, uint64_t msg) * physical otherwise. */ dest = (addr >> 12) & 0xff; + /* + * Extended Destination ID support uses bits 5-11 of the address: + * http://david.woodhou.se/ExtDestId.pdf + */ + dest |= ((addr >> 5) & 0x7f) << 8; phys = ((addr & (MSI_X86_ADDR_RH | MSI_X86_ADDR_LOG)) != (MSI_X86_ADDR_RH | MSI_X86_ADDR_LOG)); delmode = msg & APIC_DELMODE_MASK; diff --git a/sys/amd64/vmm/x86.c b/sys/amd64/vmm/x86.c index 9c2fdac11a81..2e2224595ab4 100644 --- a/sys/amd64/vmm/x86.c +++ b/sys/amd64/vmm/x86.c @@ -614,7 +614,7 @@ x86_emulate_cpuid(struct vcpu *vcpu, uint64_t *rax, uint64_t *rbx, break; case CPUID_BHYVE_FEATURES: - regs[0] = 0; /* No features to advertise yet */ + regs[0] = CPUID_BHYVE_FEAT_EXT_DEST_ID; regs[1] = 0; regs[2] = 0; regs[3] = 0; diff --git a/sys/x86/include/apicreg.h b/sys/x86/include/apicreg.h index d610d7f11a1c..1252647fbab3 100644 --- a/sys/x86/include/apicreg.h +++ b/sys/x86/include/apicreg.h @@ -296,6 +296,8 @@ typedef struct IOAPIC ioapic_t; /* constants relating to APIC ID registers */ #define APIC_ID_MASK 0xff000000 #define APIC_ID_SHIFT 24 +#define APIC_EXT_ID_MASK 0x00fe0000 +#define APIC_EXT_ID_SHIFT 17 #define APIC_ID_CLUSTER 0xf0 #define APIC_ID_CLUSTER_ID 0x0f #define APIC_MAX_CLUSTER 0xe From nobody Wed Aug 13 21:02:24 2025 X-Original-To: dev-commits-src-main@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 4c2LRP4Hp9z64WMy; Wed, 13 Aug 2025 21:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2LRN6DV5z3VGs; Wed, 13 Aug 2025 21:02:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755118944; 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/IhbdVqxKf9YJed9qJUNenTrolISI1Ve8C2yE12sS4=; b=JOU73ujmoGXH35H9Tnmm3b68YXvaDf1KJhlSOO2Qla8dE4Jkujp7INS0oh1jtGOHtaReYL GLoDst6oB+14LGxWWATEUnNRaWxr4u0/rXGultcMpwcheVjhDgVl98E7JIaFECA2qS5oLD /8PHytrycqiPeTOGYNkSb5zhAu1CwDC4yeZckLv+z2WeoFyabXgdKn2Dm2Ygaux1EhCbmx RaDGa9Nxg22Tj6gHUP2H5fMWG8JfUGPvNpDQKSo7740g1c3Ru4bpgPQp5esYNvV8/LDJIq NqbsOaYxcDXdSXcTaO7NNFNmQx2QcnHhiBDC8UBR5FTjEipooOw1pWFyVbhYsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755118944; 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/IhbdVqxKf9YJed9qJUNenTrolISI1Ve8C2yE12sS4=; b=rmQ7MF1uT0Elr7dwkOfc/F+7wAIBIMfDoSGuRmOjn72ivtLjXeTJ8wPyA3Vag8b2iH7kPS 2Qj6DYqqzYTOksabHA44za2EH0QJQysvPeP5sjuD/zUpxt/ooej4Q3Kkk3xbsO8WIWWg3z WTllF/jBPqxzl+PMzpaXHtq3PBRz4YLFl2S8NaAohp1g/ULp7XCldiyMHIg4iuh/aHJ89a UP1qjaHVwnCe+zuVFtcWxa74vQChlYCay5byRfH0xmsnVKNp4nWJbjfnqGMkJ10uYezRyT 8YBVTMwyDcp9QA3rq0fPMr/UFXW/Nuk4JVd8smNDQ5kA5vPmwyKONkzWygE0Sg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755118944; a=rsa-sha256; cv=none; b=sFdJBYPR4XO7GEiQ54zt03n9/o0DF/AcQty+/84O/VaCtNOTTwa1uP44d5isL3ncNU08sJ 9yigzP+y5gS9hVzrvpSqgSmJt6BgHk/qIv41rjZCnr0J4GCs1AkgOowZVcqPSriorOaZMF nJmUn60bH9xSpwuaRskaKA7yOsfWXiUa5alvApiN/VKlCYWdmsUsx/nUbSabVleUiD5OiJ K4+gG+onMp+/niVonRLN1qneuPsFUavnYy3eOuQmW9ffrjBkTnE9PHWJa5gwXEBLefeuSa i3jL4B5tsop71iQZueCk2pSbYD0hD7+ytGYkeHn2eSYBM+4e9ys8Vn18j7alJQ== 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 4c2LRN5rCDz7hP; Wed, 13 Aug 2025 21:02: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 57DL2OHv031866; Wed, 13 Aug 2025 21:02:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DL2Ocm031863; Wed, 13 Aug 2025 21:02:24 GMT (envelope-from git) Date: Wed, 13 Aug 2025 21:02:24 GMT Message-Id: <202508132102.57DL2Ocm031863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: ad9b27e097b1 - main - tests/ci: style: canonicalize, sort, and multiline kmods/pkgs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad9b27e097b1b69b16a41d8ae10734750e5cff5c Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=ad9b27e097b1b69b16a41d8ae10734750e5cff5c commit ad9b27e097b1b69b16a41d8ae10734750e5cff5c Author: Siva Mahadevan AuthorDate: 2025-08-13 20:40:02 +0000 Commit: Li-Wen Hsu CommitDate: 2025-08-13 21:01:26 +0000 tests/ci: style: canonicalize, sort, and multiline kmods/pkgs This helps to remove ambiguity and reduce future diffs of changes to the VM_EXTRA_PACKAGES list. Also sort kld_list. Signed-off-by: Siva Mahadevan Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51308 --- tests/ci/tools/ci.conf | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/tests/ci/tools/ci.conf b/tests/ci/tools/ci.conf index 9db0819498ab..63ede1fd1883 100644 --- a/tests/ci/tools/ci.conf +++ b/tests/ci/tools/ci.conf @@ -11,10 +11,26 @@ export VM_RC_LIST="auditd freebsdci" if [ "${CITYPE}" != "smoke" ]; then -export VM_EXTRA_PACKAGES="coreutils devel/py-pytest gdb jq ksh93 net/py-dpkt net/scapy nist-kat nmap perl5 python python3 sudo sysutils/porch tcptestsuite" +export VM_EXTRA_PACKAGES=" +devel/gdb +devel/py-pytest +perl5 +lang/python +lang/python3 +net/py-dpkt +net/scapy +net/tcptestsuite +security/nist-kat +security/nmap +security/sudo +shells/ksh93 +sysutils/coreutils +sysutils/porch +textproc/jq +" if [ "${TARGET}" = "amd64" ]; then - export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} linux-c7-ltp" + export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} devel/linux-ltp" fi fi @@ -40,21 +56,21 @@ EOF cat << EOF >> ${DESTDIR}/etc/rc.conf kld_list="" # Load modules needed by tests kld_list="\${kld_list} blake2" # sys/opencrypto +kld_list="\${kld_list} carp" # sys/netinet/carp kld_list="\${kld_list} cryptodev" # sys/opencrypto kld_list="\${kld_list} dummymbuf" # sys/netpfil +kld_list="\${kld_list} dummynet" # sys/netpfil/common kld_list="\${kld_list} fusefs" # sys/fs/fusefs +kld_list="\${kld_list} if_stf" # sys/net/if_stf +kld_list="\${kld_list} ipdivert" # sys/netinet (loads ipdivert) +kld_list="\${kld_list} ipfw" # sys/netpfil/ipfw (loads ipfw) +kld_list="\${kld_list} ipfw_nat" # sys/netpfil/ipfw (loads ipfw_nat) +kld_list="\${kld_list} ipl" # sys/sbin/ipf (loads ipfilter) kld_list="\${kld_list} ipsec" # sys/netipsec kld_list="\${kld_list} mac_portacl" # sys/mac/portacl -kld_list="\${kld_list} mqueuefs" # sys/kern/mqueue_test -kld_list="\${kld_list} pfsync" # sys/netpfil/pf (loads pf) +kld_list="\${kld_list} mqueuefs" # sys/kern/mqueue_test kld_list="\${kld_list} pflog" # sys/netpfil/pf -kld_list="\${kld_list} ipl" # sys/sbin/ipf (loads ipfilter) -kld_list="\${kld_list} ipfw" # sys/netpfil/ipfw (loads ipfw) -kld_list="\${kld_list} ipfw_nat" # sys/netpfil/ipfw (loads ipfw_nat) -kld_list="\${kld_list} ipdivert" # sys/netinet (loads ipdivert) -kld_list="\${kld_list} dummynet" # sys/netpfil/common -kld_list="\${kld_list} carp" # sys/netinet/carp -kld_list="\${kld_list} if_stf" # sys/net/if_stf +kld_list="\${kld_list} pfsync" # sys/netpfil/pf (loads pf) background_fsck="NO" sendmail_enable="NONE" cron_enable="NO" From nobody Wed Aug 13 21:05:51 2025 X-Original-To: dev-commits-src-main@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 4c2LWM4C8Yz64WKS; Wed, 13 Aug 2025 21:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2LWM3PqGz3VV1; Wed, 13 Aug 2025 21:05:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755119151; 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=aSBCvgfHO9LsorpXvQGM7URqRw86v99kQ7DAqVTSe4I=; b=oJ+jTaxVYJwl+MyPx+1GuVy0PMUipJ8+NCy8PAaaBZs7R1GDWp2rcvqXjH7tKjaJvDd1R+ wHJINd81KFrlnErn9bUcetuvb4sx7OCCMFkNrqQufzhsckDe5LrvrPYlYFDjw9xqyWrgsv qPZ988ZF6CN5YBBSs+97IxkpZLGdo/S58+QVp+7toeTHTkaV0KYrXGCbXiB5WMKNRYHpbd hyNLxUIRLFqxbb9YmJ1BSC/USZKfTcn/tY9mjkDztazTU43Vq8vz/3Z9Bq4eo2A0bmSqfA CVWSwyroM15LQ7xKeh16YhjFglSRMo20gFbzG3FVTUmHKABunLoqIi1vOuQ7gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755119151; 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=aSBCvgfHO9LsorpXvQGM7URqRw86v99kQ7DAqVTSe4I=; b=SYV5Y5PDmOamjNdpIOgfhi6lsJLPIegZTHDh39YNfSre+Tp9GsQ78Y+QNRaLOGJlG6ldWX mrkMhz9MhQpWeJmC966e2EK5Qc+pCYVG2Q7P7Dfq/hiA4tXxO0+xL6jlTf0K6RRXJ5pmcJ bj+btr8dJnTDDgCHxnktg2/KeIElL7VgyV59/tJqoz7uM2AdKkhzjrGPDIwlSxT7mSiwqB 3Imbb+BMrUf35if3EIVRwD1qcGifUJPpg/pD0HY6zDHnLPujPL6wkm8x1wAnGksHaXqGGc LD9dSLAwA0x84Z6g2sb0KLHOZhtO20hdb2sWsEFlkb9nv1aWIaX08nlmwlT6JQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755119151; a=rsa-sha256; cv=none; b=f81tVUKMDkASCDKeU7EruAPdB1AXCNp+R1ueZl+2lK5cAZtNoxSPaAtUDG+oZn8k4XdkzW wjQ5cw7l7kOl59YUy0keJ//k17HpVAcKvgagq3QXAeeY+FQmD0eMn6kqIDJg89r/SKdnyY 21Yx3M0QA4RVWm4qzBUE4viSP2VoJbNgzcq/YEfwNqYChb+aJjzqHfFU32HJh89LNOYWz1 N/J3sY1SPotQY6QS1UHvlMdX4JWqA/2aq6gENzCtLUsbqxNtzvB4Lixh+hltK+R0Xz2EuS s9CWh2ZI9tmffcylwA4qLfdYT5v777Fk5xJBeuqtqiAERDyc3l6foRLnUdsdUg== 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 4c2LWM2M8gz8PL; Wed, 13 Aug 2025 21:05: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 57DL5pCW033914; Wed, 13 Aug 2025 21:05:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DL5p2Y033911; Wed, 13 Aug 2025 21:05:51 GMT (envelope-from git) Date: Wed, 13 Aug 2025 21:05:51 GMT Message-Id: <202508132105.57DL5p2Y033911@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 178b9c236474 - main - tests/ci: Add missing kmods and pkgs to unskip tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 178b9c2364740ead21f584dc30c3aa45bd0bb8bf Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=178b9c2364740ead21f584dc30c3aa45bd0bb8bf commit 178b9c2364740ead21f584dc30c3aa45bd0bb8bf Author: Siva Mahadevan AuthorDate: 2025-08-13 21:03:47 +0000 Commit: Li-Wen Hsu CommitDate: 2025-08-13 21:05:09 +0000 tests/ci: Add missing kmods and pkgs to unskip tests Signed-off-by: Siva Mahadevan Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51309 --- tests/ci/tools/ci.conf | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/ci/tools/ci.conf b/tests/ci/tools/ci.conf index 63ede1fd1883..1d2921ab75f3 100644 --- a/tests/ci/tools/ci.conf +++ b/tests/ci/tools/ci.conf @@ -12,20 +12,26 @@ export VM_RC_LIST="auditd freebsdci" if [ "${CITYPE}" != "smoke" ]; then export VM_EXTRA_PACKAGES=" +archivers/gtar +devel/git devel/gdb devel/py-pytest perl5 lang/python lang/python3 +net/isc-dhcp44-server +net/ndisc6 net/py-dpkt net/scapy net/tcptestsuite security/nist-kat security/nmap +security/openvpn security/sudo shells/ksh93 sysutils/coreutils sysutils/porch +sysutils/sg3_utils textproc/jq " @@ -55,12 +61,20 @@ test_suites.FreeBSD.disks = '/dev/vtbd2 /dev/vtbd3 /dev/vtbd4 /dev/vtbd5 /dev/vt EOF cat << EOF >> ${DESTDIR}/etc/rc.conf kld_list="" # Load modules needed by tests +kld_list="\${kld_list} accf_data" # sys/kern/socket_accf +kld_list="\${kld_list} accf_dns" # sys/kern/socket_accf +kld_list="\${kld_list} accf_http" # sys/kern/socket_accf +kld_list="\${kld_list} accf_tls" # sys/kern/socket_accf kld_list="\${kld_list} blake2" # sys/opencrypto kld_list="\${kld_list} carp" # sys/netinet/carp kld_list="\${kld_list} cryptodev" # sys/opencrypto kld_list="\${kld_list} dummymbuf" # sys/netpfil kld_list="\${kld_list} dummynet" # sys/netpfil/common kld_list="\${kld_list} fusefs" # sys/fs/fusefs +kld_list="\${kld_list} if_bridge" # sys/net/if_bridge_test +kld_list="\${kld_list} if_enc" # sys/netpfil/pf +kld_list="\${kld_list} if_epair" # sys/net/if_epair_test +kld_list="\${kld_list} if_ovpn" # sys/net/if_ovpn kld_list="\${kld_list} if_stf" # sys/net/if_stf kld_list="\${kld_list} ipdivert" # sys/netinet (loads ipdivert) kld_list="\${kld_list} ipfw" # sys/netpfil/ipfw (loads ipfw) @@ -69,8 +83,13 @@ kld_list="\${kld_list} ipl" # sys/sbin/ipf (loads ipfilter) kld_list="\${kld_list} ipsec" # sys/netipsec kld_list="\${kld_list} mac_portacl" # sys/mac/portacl kld_list="\${kld_list} mqueuefs" # sys/kern/mqueue_test +kld_list="\${kld_list} pf" # sys/netpfil/pf kld_list="\${kld_list} pflog" # sys/netpfil/pf +kld_list="\${kld_list} pflow" # sys/netpfil/pf kld_list="\${kld_list} pfsync" # sys/netpfil/pf (loads pf) +kld_list="\${kld_list} sctp" # sys/netpfil/pf +kld_list="\${kld_list} tarfs" # sys/fs/tarfs +kld_list="\${kld_list} tcpmd5" # sys/netinet background_fsck="NO" sendmail_enable="NONE" cron_enable="NO" From nobody Wed Aug 13 22:25:47 2025 X-Original-To: dev-commits-src-main@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 4c2NHb4yp1z64cF5; Wed, 13 Aug 2025 22:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2NHb4JcHz3cxq; Wed, 13 Aug 2025 22:25:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755123947; 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=8GR+OwA5rr2PMt7OMbFDXhU0LpntE8ZrxoZEh5sTZFI=; b=K564S8kIiz9Rbi75aaL7ULx0MLCb6n83dvh+xvFoCF1agyCQzvvrnlbtELaD17aOpPmNU0 WHW5zFAN5G8rFRnNPtvTSfA5ey1NslqCh5gAra43li5ANCvIOONuVXc29lp8inTspObLt0 nh8n403KLz3JBtBASh4HJB5r52IxhsRsl/vzfC7MQRXNuu6iFTHGmfdx2NO7bTNOYGt6dJ 6xc/sTOdk1GlpgKCniGAuQ13No2SFlckWGyT6H1b74TH374lCV5tkX7EYzm64HMN/mtYVV hkKqSPkqsTOevSdZtWaUZsT3pGiZ0PFNK18DbfsKtbzxWmb1Nxh/7JQfEqWShA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755123947; 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=8GR+OwA5rr2PMt7OMbFDXhU0LpntE8ZrxoZEh5sTZFI=; b=XzFK+bRuLEA1HiC6GvHvYtysVBCwtnoFvKjf+30+EDVKNAdfQacFpxHxaR2n81niivfuT/ +muuiCUZ1IWyKoK/dBrY/o3Pv+KZ6hdJaXL34uduZU158ETQrgY1omqfV4ldYEvBNa2ARL UiSj5HhbFU3Y6api5CfPXVfPhHo9sepek8KuSpMWqGYhDKrXhUFGLf1F5NpCs6ge+6GA8+ a9lEl6K4MRUAjp4R9r43uS3xKBrBdUgsKTZt1AoCllaT/eopdkxX8H8SSNUyRX2VY/YG8+ lOkZezKBPQdqX+RXkHqRSlHQWqcmrghBujz5ISqk4qkZhwf0GVd3bvI3IlDr+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755123947; a=rsa-sha256; cv=none; b=TIzSolTD7CXVCeqcrq+dqCC+6uDt4u+OTeUPqO6RtjaJNqB7MPE4dM8ppCTdFhKvtF2H9H O59QMeJakaLfwT08WO5flCyytEHJC6vbymBjiqF3JMqEd4ervkP56L0DLSyr+Ax1vHuvd9 JxiDnxYytUQAD+DmSOPRWBB8887ANgAlOxHnBiGss6lRR5UfpUNCQsk0PLzacIHpy8OxMC OU6iHX66ZdLv6MXSFGaq/41eDEDFzypegGmR7gV8btdTGm0DnnDFZFmqINxwKup1DdFiHY RX5Vuvn1t7sYINXPOmVIw6/Apzr+mfg1lujGweSJN8hU7/Wuhn3xbhIJb8Qu9A== 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 4c2NHb3BmZzBJd; Wed, 13 Aug 2025 22:25: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 57DMPl5Z083344; Wed, 13 Aug 2025 22:25:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DMPlLZ083341; Wed, 13 Aug 2025 22:25:47 GMT (envelope-from git) Date: Wed, 13 Aug 2025 22:25:47 GMT Message-Id: <202508132225.57DMPlLZ083341@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 81d8827ad875 - main - certctl: Reimplement in C List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 81d8827ad8752e35411204541f1f09df1481e417 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=81d8827ad8752e35411204541f1f09df1481e417 commit 81d8827ad8752e35411204541f1f09df1481e417 Author: Dag-Erling Smørgrav AuthorDate: 2025-08-13 22:25:27 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-13 22:25:27 +0000 certctl: Reimplement in C Notable changes include: * We no longer forget manually untrusted certificates when rehashing. * Rehash will now scan the existing directory and progressively replace its contents with those of the new trust store. The trust store as a whole is not replaced atomically, but each file within it is. * We no longer attempt to link to the original files, but we don't copy them either. Instead, we write each certificate out in its minimal form. * We now generate a trust bundle in addition to the hashed diretory. This also contains only the minimal DER form of each certificate. * The C version is approximately two orders of magnitude faster than the sh version, with rehash taking ~100 ms vs ~5-25 s depending on whether ca_root_nss is installed. * The DISTBASE concept has been dropped; the same effect can be achieved by adjusting DESTDIR. * We now also have rudimentary tests. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D42320 --- Makefile.inc1 | 21 +- usr.sbin/certctl/Makefile | 7 +- usr.sbin/certctl/certctl.8 | 94 +-- usr.sbin/certctl/certctl.c | 1060 ++++++++++++++++++++++++++++++++ usr.sbin/certctl/certctl.sh | 366 ----------- usr.sbin/certctl/tests/Makefile | 5 + usr.sbin/certctl/tests/certctl.subr | 44 ++ usr.sbin/certctl/tests/certctl_test.sh | 221 +++++++ 8 files changed, 1404 insertions(+), 414 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 9128d1d8ee77..e67bc7f5d1b1 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1021,8 +1021,7 @@ IMAKE_MTREE= MTREE_CMD="${MTREE_CMD} ${MTREEFLAGS}" .endif .if make(distributeworld) -CERTCTLDESTDIR= ${DESTDIR}/${DISTDIR} -CERTCTLFLAGS+= -d /base +CERTCTLDESTDIR= ${DESTDIR}/${DISTDIR}/base .else CERTCTLDESTDIR= ${DESTDIR} .endif @@ -1541,14 +1540,10 @@ distributeworld installworld stageworld: _installcheck_world .PHONY .endif # make(distributeworld) ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \ ${IMAKEENV} rm -rf ${INSTALLTMP} -.if !make(packageworld) && ${MK_CAROOT} != "no" - @if which openssl>/dev/null; then \ - PATH=${TMPPATH:Q}:${PATH:Q} \ - LOCALBASE=${LOCALBASE:Q} \ - sh ${SRCTOP}/usr.sbin/certctl/certctl.sh ${CERTCTLFLAGS} rehash; \ - else \ - echo "No openssl on the host, not rehashing certificates target -- /etc/ssl may not be populated."; \ - fi +.if !make(packageworld) && ${MK_CAROOT} != "no" && ${MK_OPENSSL} != "no" + PATH=${TMPPATH:Q}:${PATH:Q} \ + LOCALBASE=${LOCALBASE:Q} \ + certctl ${CERTCTLFLAGS} rehash .endif .if make(distributeworld) .for dist in ${EXTRA_DISTRIBUTIONS} @@ -2712,6 +2707,11 @@ _basic_bootstrap_tools+=sbin/md5 _basic_bootstrap_tools+=usr.sbin/tzsetup .endif +# certctl is needed as an install tool +.if ${MK_CAROOT} != "no" && ${MK_OPENSSL} != "no" +_certctl=usr.sbin/certctl +.endif + .if defined(BOOTSTRAP_ALL_TOOLS) _other_bootstrap_tools+=${_basic_bootstrap_tools} .for _subdir _links in ${_basic_bootstrap_tools_multilink} @@ -2775,6 +2775,7 @@ bootstrap-tools: ${_bt}-links .PHONY ${_strfile} \ usr.bin/dtc \ ${_cat} \ + ${_certctl} \ ${_kbdcontrol} \ ${_elftoolchain_libs} \ ${_libkldelf} \ diff --git a/usr.sbin/certctl/Makefile b/usr.sbin/certctl/Makefile index 88c024daf7e6..5430dbf24853 100644 --- a/usr.sbin/certctl/Makefile +++ b/usr.sbin/certctl/Makefile @@ -1,5 +1,10 @@ +.include + PACKAGE= certctl -SCRIPTS=certctl.sh +PROG= certctl MAN= certctl.8 +LIBADD= crypto +HAS_TESTS= +SUBDIR.${MK_TESTS}= tests .include diff --git a/usr.sbin/certctl/certctl.8 b/usr.sbin/certctl/certctl.8 index 7e49bb89e2ac..97bdc840c359 100644 --- a/usr.sbin/certctl/certctl.8 +++ b/usr.sbin/certctl/certctl.8 @@ -24,7 +24,7 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 17, 2025 +.Dd August 11, 2025 .Dt CERTCTL 8 .Os .Sh NAME @@ -32,63 +32,83 @@ .Nd "tool for managing trusted and untrusted TLS certificates" .Sh SYNOPSIS .Nm -.Op Fl v +.Op Fl lv .Ic list .Nm -.Op Fl v +.Op Fl lv .Ic untrusted .Nm -.Op Fl cnUv +.Op Fl BnUv .Op Fl D Ar destdir .Op Fl M Ar metalog .Ic rehash .Nm -.Op Fl cnv -.Ic untrust Ar file +.Op Fl nv +.Ic untrust Ar .Nm -.Op Fl cnv -.Ic trust Ar file +.Op Fl nv +.Ic trust Ar .Sh DESCRIPTION The .Nm utility manages the list of TLS Certificate Authorities that are trusted by applications that use OpenSSL. .Pp -Flags: +The following options are available: .Bl -tag -width 4n -.It Fl c -Copy certificates instead of linking to them. +.It Fl B +Do not generate a bundle. +This option is only valid in conjunction with the +.Ic rehash +command. .It Fl D Ar destdir Specify the DESTDIR (overriding values from the environment). -.It Fl d Ar distbase -Specify the DISTBASE (overriding values from the environment). +.It Fl l +When listing installed (trusted or untrusted) certificates, show the +full path and distinguished name for each certificate. .It Fl M Ar metalog -Specify the path of the METALOG file (default: $DESTDIR/METALOG). +Specify the path of the METALOG file +.Po +default: +.Pa ${DESTDIR}/METALOG +.Pc . +This option is only valid in conjunction with the +.Ic rehash +command. .It Fl n -No-Op mode, do not actually perform any actions. +Dry-run mode. +Do not actually perform any actions except write the metalog. .It Fl v -Be verbose, print details about actions before performing them. +Verbose mode. +Print detailed information about each action taken. .It Fl U -Unprivileged mode, do not change the ownership of created links. -Do record the ownership in the METALOG file. +Unprivileged mode. +Do not attempt to set the ownership of created files. +This option is only valid in conjunction with the +.Fl M +option and the +.Ic rehash +command. .El .Pp Primary command functions: .Bl -tag -width untrusted .It Ic list -List all currently trusted certificate authorities. +List all currently trusted certificates. .It Ic untrusted List all currently untrusted certificates. .It Ic rehash -Rebuild the list of trusted certificate authorities by scanning all directories +Rebuild the list of trusted certificates by scanning all directories in .Ev TRUSTPATH and all untrusted certificates in .Ev UNTRUSTPATH . -A symbolic link to each trusted certificate is placed in +A copy of each trusted certificate is placed in .Ev CERTDESTDIR and each untrusted certificate in .Ev UNTRUSTDESTDIR . +In addition, a bundle containing the trusted certificates is placed in +.Ev BUNDLEFILE . .It Ic untrust Add the specified file to the untrusted list. .It Ic trust @@ -98,8 +118,6 @@ Remove the specified file from the untrusted list. .Bl -tag -width UNTRUSTDESTDIR .It Ev DESTDIR Alternate destination directory to operate on. -.It Ev DISTBASE -Additional path component to include when operating on certificate directories. .It Ev LOCALBASE Location for local programs. Defaults to the value of the user.localbase sysctl which is usually @@ -107,32 +125,34 @@ Defaults to the value of the user.localbase sysctl which is usually .It Ev TRUSTPATH List of paths to search for trusted certificates. Default: -.Pa /usr/share/certs/trusted -.Pa /usr/local/share/certs -.Pa /etc/ssl/certs +.Pa ${DESTDIR}/usr/share/certs/trusted +.Pa ${DESTDIR}${LOCALBASE}/share/certs/trusted +.Pa ${DESTDIR}${LOCALBASE}/share/certs .It Ev UNTRUSTPATH List of paths to search for untrusted certificates. Default: -.Pa /usr/share/certs/untrusted -.Pa /etc/ssl/untrusted -.Pa /etc/ssl/blacklisted -.It Ev CERTDESTDIR +.Pa ${DESTDIR}/usr/share/certs/untrusted +.Pa ${DESTDIR}${LOCALBASE}/share/certs/untrusted +.It Ev TRUSTDESTDIR Destination directory for symbolic links to trusted certificates. Default: -.Pa /etc/ssl/certs +.Pa ${DESTDIR}/etc/ssl/certs .It Ev UNTRUSTDESTDIR Destination directory for symbolic links to untrusted certificates. Default: -.Pa /etc/ssl/untrusted -.It Ev EXTENSIONS -List of file extensions to read as certificate files. -Default: *.pem *.crt *.cer *.crl *.0 +.Pa ${DESTDIR}/etc/ssl/untrusted +.It Ev BUNDLE +File name of bundle to produce. .El .Sh SEE ALSO .Xr openssl 1 .Sh HISTORY .Nm first appeared in -.Fx 12.2 +.Fx 12.2 . .Sh AUTHORS -.An Allan Jude Aq Mt allanjude@freebsd.org +.An -nosplit +The original shell implementation was written by +.An Allan Jude Aq Mt allanjude@FreeBSD.org . +The current C implementation was written by +.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . diff --git a/usr.sbin/certctl/certctl.c b/usr.sbin/certctl/certctl.c new file mode 100644 index 000000000000..6687e56f23b4 --- /dev/null +++ b/usr.sbin/certctl/certctl.c @@ -0,0 +1,1060 @@ +/*- + * Copyright (c) 2023-2025 Dag-Erling Smørgrav + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define info(fmt, ...) \ + do { \ + if (verbose) \ + fprintf(stderr, fmt "\n", ##__VA_ARGS__); \ + } while (0) + +static char * +xasprintf(const char *fmt, ...) +{ + va_list ap; + char *str; + int ret; + + va_start(ap, fmt); + ret = vasprintf(&str, fmt, ap); + va_end(ap); + if (ret < 0 || str == NULL) + err(1, NULL); + return (str); +} + +static char * +xstrdup(const char *str) +{ + char *dup; + + if ((dup = strdup(str)) == NULL) + err(1, NULL); + return (dup); +} + +static void usage(void); + +static bool dryrun; +static bool longnames; +static bool nobundle; +static bool unprivileged; +static bool verbose; + +static const char *localbase; +static const char *destdir; +static const char *metalog; + +static const char *uname = "root"; +static const char *gname = "wheel"; + +static const char *const default_trusted_paths[] = { + "/usr/share/certs/trusted", + "%L/share/certs/trusted", + "%L/share/certs", + NULL +}; +static char **trusted_paths; + +static const char *const default_untrusted_paths[] = { + "/usr/share/certs/untrusted", + "%L/share/certs/untrusted", + NULL +}; +static char **untrusted_paths; + +static char *trusted_dest; +static char *untrusted_dest; +static char *bundle_dest; + +#define SSL_PATH "/etc/ssl" +#define TRUSTED_DIR "certs" +#define TRUSTED_PATH SSL_PATH "/" TRUSTED_DIR +#define UNTRUSTED_DIR "untrusted" +#define UNTRUSTED_PATH SSL_PATH "/" UNTRUSTED_DIR +#define LEGACY_DIR "blacklisted" +#define LEGACY_PATH SSL_PATH "/" LEGACY_DIR +#define BUNDLE_FILE "cert.pem" +#define BUNDLE_PATH SSL_PATH "/" BUNDLE_FILE + +static FILE *mlf; + +/* + * Split a colon-separated list into a NULL-terminated array. + */ +static char ** +split_paths(const char *str) +{ + char **paths; + const char *p, *q; + unsigned int i, n; + + for (p = str, n = 1; *p; p++) { + if (*p == ':') + n++; + } + if ((paths = calloc(n + 1, sizeof(*paths))) == NULL) + err(1, NULL); + for (p = q = str, i = 0; i < n; i++, p = q + 1) { + q = strchrnul(p, ':'); + if ((paths[i] = strndup(p, q - p)) == NULL) + err(1, NULL); + } + return (paths); +} + +/* + * Expand %L into LOCALBASE and prefix DESTDIR. + */ +static char * +expand_path(const char *template) +{ + if (template[0] == '%' && template[1] == 'L') + return (xasprintf("%s%s%s", destdir, localbase, template + 2)); + return (xasprintf("%s%s", destdir, template)); +} + +/* + * Expand an array of paths. + */ +static char ** +expand_paths(const char *const *templates) +{ + char **paths; + unsigned int i, n; + + for (n = 0; templates[n] != NULL; n++) + continue; + if ((paths = calloc(n + 1, sizeof(*paths))) == NULL) + err(1, NULL); + for (i = 0; i < n; i++) + paths[i] = expand_path(templates[i]); + return (paths); +} + +/* + * If destdir is a prefix of path, returns a pointer to the rest of path, + * otherwise returns path. + */ +static const char * +unexpand_path(const char *path) +{ + const char *p = path; + const char *q = destdir; + + while (*p && *p == *q) { + p++; + q++; + } + return (*q == '\0' && *p == '/' ? p : path); +} + +/* + * X509 certificate in a rank-balanced tree. + */ +struct cert { + RB_ENTRY(cert) entry; + unsigned long hash; + char *name; + X509 *x509; + char *path; +}; + +static void +free_cert(struct cert *cert) +{ + free(cert->name); + X509_free(cert->x509); + free(cert->path); + free(cert); +} + +static int +certcmp(const struct cert *a, const struct cert *b) +{ + return (X509_cmp(a->x509, b->x509)); +} + +RB_HEAD(cert_tree, cert); +static struct cert_tree trusted = RB_INITIALIZER(&trusted); +static struct cert_tree untrusted = RB_INITIALIZER(&untrusted); +RB_GENERATE_STATIC(cert_tree, cert, entry, certcmp); + +static void +free_certs(struct cert_tree *tree) +{ + struct cert *cert, *tmp; + + RB_FOREACH_SAFE(cert, cert_tree, tree, tmp) { + RB_REMOVE(cert_tree, tree, cert); + free_cert(cert); + } +} + +static struct cert * +find_cert(struct cert_tree *haystack, X509 *x509) +{ + struct cert needle = { .x509 = x509 }; + + return (RB_FIND(cert_tree, haystack, &needle)); +} + +/* + * File containing a certificate in a rank-balanced tree sorted by + * certificate hash and disambiguating counter. This is needed because + * the certificate hash function is prone to collisions, necessitating a + * counter to distinguish certificates that hash to the same value. + */ +struct file { + RB_ENTRY(file) entry; + const struct cert *cert; + unsigned int c; +}; + +static int +filecmp(const struct file *a, const struct file *b) +{ + if (a->cert->hash > b->cert->hash) + return (1); + if (a->cert->hash < b->cert->hash) + return (-1); + return (a->c - b->c); +} + +RB_HEAD(file_tree, file); +RB_GENERATE_STATIC(file_tree, file, entry, filecmp); + +/* + * Lexicographical sort for scandir(). + */ +static int +lexisort(const struct dirent **d1, const struct dirent **d2) +{ + return (strcmp((*d1)->d_name, (*d2)->d_name)); +} + +/* + * Read certificate(s) from a single file and insert them into a tree. + * Ignore certificates that already exist in the tree. If exclude is not + * null, also ignore certificates that exist in exclude. + * + * Returns the number certificates added to the tree, or -1 on failure. + */ +static int +read_cert(const char *path, struct cert_tree *tree, struct cert_tree *exclude) +{ + FILE *f; + X509 *x509; + X509_NAME *name; + struct cert *cert; + unsigned long hash; + int ni, no; + + if ((f = fopen(path, "r")) == NULL) { + warn("%s", path); + return (-1); + } + for (ni = no = 0; + (x509 = PEM_read_X509(f, NULL, NULL, NULL)) != NULL; + ni++) { + hash = X509_subject_name_hash(x509); + if (exclude && find_cert(exclude, x509)) { + info("%08lx: excluded", hash); + X509_free(x509); + continue; + } + if (find_cert(tree, x509)) { + info("%08lx: duplicate", hash); + X509_free(x509); + continue; + } + if ((cert = calloc(1, sizeof(*cert))) == NULL) + err(1, NULL); + cert->x509 = x509; + name = X509_get_subject_name(x509); + cert->hash = X509_NAME_hash_ex(name, NULL, NULL, NULL); + cert->name = X509_NAME_oneline(name, NULL, 0); + cert->path = xstrdup(unexpand_path(path)); + if (RB_INSERT(cert_tree, tree, cert) != NULL) + errx(1, "unexpected duplicate"); + info("%08lx: %s", cert->hash, strrchr(cert->name, '=') + 1); + no++; + } + /* + * ni is the number of certificates we found in the file. + * no is the number of certificates that weren't already in our + * tree or on the exclusion list. + */ + if (ni == 0) + warnx("%s: no valid certificates found", path); + fclose(f); + return (no); +} + +/* + * Load all certificates found in the specified path into a tree, + * optionally excluding those that already exist in a different tree. + * + * Returns the number of certificates added to the tree, or -1 on failure. + */ +static int +read_certs(const char *path, struct cert_tree *tree, struct cert_tree *exclude) +{ + struct stat sb; + char *paths[] = { (char *)(uintptr_t)path, NULL }; + FTS *fts; + FTSENT *ent; + int fts_options = FTS_LOGICAL | FTS_NOCHDIR; + int ret, total = 0; + + if (stat(path, &sb) != 0) { + return (-1); + } else if (!S_ISDIR(sb.st_mode)) { + errno = ENOTDIR; + return (-1); + } + if ((fts = fts_open(paths, fts_options, NULL)) == NULL) + err(1, "fts_open()"); + while ((ent = fts_read(fts)) != NULL) { + if (ent->fts_info != FTS_F) { + if (ent->fts_info == FTS_ERR) + warnc(ent->fts_errno, "fts_read()"); + continue; + } + info("found %s", ent->fts_path); + ret = read_cert(ent->fts_path, tree, exclude); + if (ret > 0) + total += ret; + } + fts_close(fts); + return (total); +} + +/* + * Save the contents of a cert tree to disk. + * + * Returns 0 on success and -1 on failure. + */ +static int +write_certs(const char *dir, struct cert_tree *tree) +{ + struct file_tree files = RB_INITIALIZER(&files); + struct cert *cert; + struct file *file, *tmp; + struct dirent **dents, **ent; + char *path, *tmppath = NULL; + FILE *f; + mode_t mode = 0444; + int cmp, d, fd, ndents, ret = 0; + + /* + * Start by generating unambiguous file names for each certificate + * and storing them in lexicographical order + */ + RB_FOREACH(cert, cert_tree, tree) { + if ((file = calloc(1, sizeof(*file))) == NULL) + err(1, NULL); + file->cert = cert; + for (file->c = 0; file->c < INT_MAX; file->c++) + if (RB_INSERT(file_tree, &files, file) == NULL) + break; + if (file->c == INT_MAX) + errx(1, "unable to disambiguate %08lx", cert->hash); + free(cert->path); + cert->path = xasprintf("%08lx.%d", cert->hash, file->c); + } + /* + * Open and scan the directory. + */ + if ((d = open(dir, O_DIRECTORY | O_RDONLY)) < 0 || + (ndents = fdscandir(d, &dents, NULL, lexisort)) < 0) + err(1, "%s", dir); + /* + * Iterate over the directory listing and the certificate listing + * in parallel. If the directory listing gets ahead of the + * certificate listing, we need to write the current certificate + * and advance the certificate listing. If the certificate + * listing is ahead of the directory listing, we need to delete + * the current file and advance the directory listing. If they + * are neck and neck, we have a match and could in theory compare + * the two, but in practice it's faster to just replace the + * current file with the current certificate (and advance both). + */ + ent = dents; + file = RB_MIN(file_tree, &files); + for (;;) { + if (ent < dents + ndents) { + /* skip directories */ + if ((*ent)->d_type == DT_DIR) { + free(*ent++); + continue; + } + if (file != NULL) { + /* compare current dirent to current cert */ + path = file->cert->path; + cmp = strcmp((*ent)->d_name, path); + } else { + /* trailing files in directory */ + path = NULL; + cmp = -1; + } + } else { + if (file != NULL) { + /* trailing certificates */ + path = file->cert->path; + cmp = 1; + } else { + /* end of both lists */ + path = NULL; + break; + } + } + if (cmp < 0) { + /* a file on disk with no matching certificate */ + info("removing %s/%s", dir, (*ent)->d_name); + if (!dryrun) + (void)unlinkat(d, (*ent)->d_name, 0); + free(*ent++); + continue; + } + if (cmp == 0) { + /* a file on disk with a matching certificate */ + info("replacing %s/%s", dir, (*ent)->d_name); + if (dryrun) { + fd = open(_PATH_DEVNULL, O_WRONLY); + } else { + tmppath = xasprintf(".%s", path); + fd = openat(d, tmppath, + O_CREAT | O_WRONLY | O_TRUNC, mode); + if (!unprivileged && fd >= 0) + (void)fchmod(fd, mode); + } + free(*ent++); + } else { + /* a certificate with no matching file */ + info("writing %s/%s", dir, path); + if (dryrun) { + fd = open(_PATH_DEVNULL, O_WRONLY); + } else { + tmppath = xasprintf(".%s", path); + fd = openat(d, tmppath, + O_CREAT | O_WRONLY | O_EXCL, mode); + } + } + /* write the certificate */ + if (fd < 0 || + (f = fdopen(fd, "w")) == NULL || + !PEM_write_X509(f, file->cert->x509)) { + if (tmppath != NULL && fd >= 0) { + int serrno = errno; + (void)unlinkat(d, tmppath, 0); + errno = serrno; + } + err(1, "%s/%s", dir, tmppath ? tmppath : path); + } + /* rename temp file if applicable */ + if (tmppath != NULL) { + if (ret == 0 && renameat(d, tmppath, d, path) != 0) { + warn("%s/%s", dir, path); + ret = -1; + } + if (ret != 0) + (void)unlinkat(d, tmppath, 0); + free(tmppath); + tmppath = NULL; + } + /* emit metalog */ + if (mlf != NULL) { + fprintf(mlf, "%s/%s type=file " + "uname=%s gname=%s mode=%#o size=%ld\n", + unexpand_path(dir), path, + uname, gname, mode, ftell(f)); + } + fclose(f); + /* advance certificate listing */ + tmp = RB_NEXT(file_tree, &files, file); + RB_REMOVE(file_tree, &files, file); + free(file); + file = tmp; + } + free(dents); + close(d); + return (ret); +} + +/* + * Save all certs in a tree to a single file (bundle). + * + * Returns 0 on success and -1 on failure. + */ +static int +write_bundle(const char *dir, const char *file, struct cert_tree *tree) +{ + struct cert *cert; + char *tmpfile = NULL; + FILE *f; + int d, fd, ret = 0; + mode_t mode = 0444; + + if (dir != NULL) { + if ((d = open(dir, O_DIRECTORY | O_RDONLY)) < 0) + err(1, "%s", dir); + } else { + dir = "."; + d = AT_FDCWD; + } + info("writing %s/%s", dir, file); + if (dryrun) { + fd = open(_PATH_DEVNULL, O_WRONLY); + } else { + tmpfile = xasprintf(".%s", file); + fd = openat(d, tmpfile, O_WRONLY | O_CREAT | O_EXCL, mode); + } + if (fd < 0 || (f = fdopen(fd, "w")) == NULL) { + if (tmpfile != NULL && fd >= 0) { + int serrno = errno; + (void)unlinkat(d, tmpfile, 0); + errno = serrno; + } + err(1, "%s/%s", dir, tmpfile ? tmpfile : file); + } + RB_FOREACH(cert, cert_tree, tree) { + if (!PEM_write_X509(f, cert->x509)) { + warn("%s/%s", dir, tmpfile ? tmpfile : file); + ret = -1; + break; + } + } + if (tmpfile != NULL) { + if (ret == 0 && renameat(d, tmpfile, d, file) != 0) { + warn("%s/%s", dir, file); + ret = -1; + } + if (ret != 0) + (void)unlinkat(d, tmpfile, 0); + free(tmpfile); + } + if (ret == 0 && mlf != NULL) { + fprintf(mlf, + "%s/%s type=file uname=%s gname=%s mode=%#o size=%ld\n", + unexpand_path(dir), file, uname, gname, mode, ftell(f)); + } + fclose(f); + if (d != AT_FDCWD) + close(d); + return (ret); +} + +/* + * Load trusted certificates. + * + * Returns the number of certificates loaded. + */ +static unsigned int +load_trusted(bool all, struct cert_tree *exclude) +{ + unsigned int i, n; + int ret; + + /* load external trusted certs */ + for (i = n = 0; all && trusted_paths[i] != NULL; i++) { + ret = read_certs(trusted_paths[i], &trusted, exclude); + if (ret > 0) + n += ret; + } + + /* load installed trusted certs */ + ret = read_certs(trusted_dest, &trusted, exclude); + if (ret > 0) + n += ret; + + info("%d trusted certificates found", n); + return (n); +} + +/* + * Load untrusted certificates. + * + * Returns the number of certificates loaded. + */ +static unsigned int +load_untrusted(bool all) +{ + char *path; + unsigned int i, n; + int ret; + + /* load external untrusted certs */ + for (i = n = 0; all && untrusted_paths[i] != NULL; i++) { + ret = read_certs(untrusted_paths[i], &untrusted, NULL); + if (ret > 0) + n += ret; + } + + /* load installed untrusted certs */ + ret = read_certs(untrusted_dest, &untrusted, NULL); + if (ret > 0) + n += ret; + + /* load legacy untrusted certs */ + path = expand_path(LEGACY_PATH); + ret = read_certs(path, &untrusted, NULL); + if (ret > 0) { + warnx("certificates found in legacy directory %s", + path); + n += ret; + } else if (ret == 0) { + warnx("legacy directory %s can safely be deleted", + path); + } + free(path); + + info("%d untrusted certificates found", n); + return (n); +} + +/* + * Save trusted certificates. + * + * Returns 0 on success and -1 on failure. + */ +static int +save_trusted(void) +{ + int ret; + + /* save untrusted certs */ + ret = write_certs(trusted_dest, &trusted); + return (ret); +} + +/* + * Save untrusted certificates. + * + * Returns 0 on success and -1 on failure. + */ +static int +save_untrusted(void) +{ + int ret; + + ret = write_certs(untrusted_dest, &untrusted); + return (ret); +} + +/* + * Save certificate bundle. + * + * Returns 0 on success and -1 on failure. + */ +static int +save_bundle(void) +{ + char *dir, *file, *sep; + int ret; + + if ((sep = strrchr(bundle_dest, '/')) == NULL) { + dir = NULL; + file = bundle_dest; + } else { + dir = xasprintf("%.*s", (int)(sep - bundle_dest), bundle_dest); + file = sep + 1; + } + ret = write_bundle(dir, file, &trusted); + free(dir); + return (ret); +} + +/* *** 1032 LINES SKIPPED *** From nobody Wed Aug 13 22:36:45 2025 X-Original-To: dev-commits-src-main@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 4c2NXG1XVmz64cmv; Wed, 13 Aug 2025 22:36: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2NXG0yMRz3dBy; Wed, 13 Aug 2025 22:36:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755124606; 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=9YiMPa2z05XFEGE+vyfbXaKTFNn1UIOHlKmgCqq1F/U=; b=T2x0JetsYQS0bTIa34MvXb4Vh5S7e1oaFup2X54nAKRpsM47Q8GCRJrBrqXCQKyvvRHcgM Y6mUFXAcQ1m/iXDWyOM4U417FPRpNDZBJHKAWK0HuVhfQIPs4VJHvlqoo2mAwlr5KbHUEt bE0BfznKkq77xdG7rWdbGCnBtB4yCjUUU/QN+XDnPBhsQqvInULZCsD7l5rAUSs2iLguoC BsXum+GVSOBJl2Ev7kjnIDukKVOx9vLYrZ931MKmwnY4K9pDacC+MUxIrqcn4vcdl7DDyu sYzSvh1BgrUnPqa+NUBSvYsQJdiB2vW7yrh09r29ZnBCdmfbBRDrfYOIhzc4ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755124606; 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=9YiMPa2z05XFEGE+vyfbXaKTFNn1UIOHlKmgCqq1F/U=; b=i5FIY/qLATbxg5RTpWh6aNqTEX9i+4+TVOvN/1hyL7Uk8fDU0mHOHejOuSTIbalEXCSmTt UeK9kdfxbD1GuI10re6Pc7vIxT30xkOE/shUMxr/tt26tX8+CAs4hPBeAZROuJjgT/p2K0 BrbXKnntfK2Qeoq0m2QxcmX1PxggFFH500Y7of5cjrAvdJNwbScxqEyJ9OBojdkJLc1nVb HKpbff09Fud7XtPcGbB/LKX1+qjOzxd0Dyq0snp6dYxcb6l9pugMmjta8g1bO8mGy1LL+a F7hT/r576Uk1yyt5i+I144Q/1Fbqe+k9UMQYL9k6ac9yfd02ZqltsKq+hWgoKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755124606; a=rsa-sha256; cv=none; b=YCn7bCETi2vkOC4Azy1T8UyHmj/UxCNRSi2qzjCXPYjAsv5cBYpSOYp64kEm3nkZjqaxhd qzN3OIxp4yv99vM+/EUtyyYZfuRWQ+asocimfcDiJ3aifBnNE/93KrrgxY8Dc0aNsB9Obl lbOLFFvowoG6kMfiBALUzkmbZ+KSbSfc9+cZ+zHElmeQfVU23zVTJGVLXQaa9SDlg5C+wg Q36T4vljoSDwZgNagpRvOTaT68PTadhKe7W3/VTZZ5nCfqn79f/C8ggkAGvmJU1blbH9QU ViToguxcjX3FC7EsA//qyprNfPSy5H3tl3hE/untANlexlEs7+UtlVS7wnHlvg== 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 4c2NXG07KKzBNn; Wed, 13 Aug 2025 22:36: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 57DMajxP002380; Wed, 13 Aug 2025 22:36:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DMajia002376; Wed, 13 Aug 2025 22:36:45 GMT (envelope-from git) Date: Wed, 13 Aug 2025 22:36:45 GMT Message-Id: <202508132236.57DMajia002376@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 42ac41983ee1 - main - certctl: Fix bootstrap build List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 42ac41983ee184e818f6e8da791a5c6c7530f87e Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=42ac41983ee184e818f6e8da791a5c6c7530f87e commit 42ac41983ee184e818f6e8da791a5c6c7530f87e Author: Dag-Erling Smørgrav AuthorDate: 2025-08-13 22:35:17 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-13 22:36:36 +0000 certctl: Fix bootstrap build Fixes: 81d8827ad875 ("certctl: Reimplement in C") --- usr.sbin/certctl/Makefile | 6 ++- usr.sbin/certctl/certctl.8 | 7 +++- usr.sbin/certctl/certctl.c | 94 ++++++++++++++++++++++++++++++++-------------- 3 files changed, 77 insertions(+), 30 deletions(-) diff --git a/usr.sbin/certctl/Makefile b/usr.sbin/certctl/Makefile index 5430dbf24853..8f19bde8aaf6 100644 --- a/usr.sbin/certctl/Makefile +++ b/usr.sbin/certctl/Makefile @@ -3,8 +3,12 @@ PACKAGE= certctl PROG= certctl MAN= certctl.8 -LIBADD= crypto +LIBADD= crypto util HAS_TESTS= SUBDIR.${MK_TESTS}= tests +.ifdef BOOTSTRAPPING +CFLAGS+=-DBOOTSTRAPPING +.endif + .include diff --git a/usr.sbin/certctl/certctl.8 b/usr.sbin/certctl/certctl.8 index 97bdc840c359..c53ad9765544 100644 --- a/usr.sbin/certctl/certctl.8 +++ b/usr.sbin/certctl/certctl.8 @@ -38,7 +38,7 @@ .Op Fl lv .Ic untrusted .Nm -.Op Fl BnUv +.Op Fl BNnUv .Op Fl D Ar destdir .Op Fl M Ar metalog .Ic rehash @@ -75,6 +75,11 @@ default: This option is only valid in conjunction with the .Ic rehash command. +.It Fl N +Base the file name on the certificate's name instead of its hash. +This option is only valid in conjunction with the +.Ic rehash +command. .It Fl n Dry-run mode. Do not actually perform any actions except write the metalog. diff --git a/usr.sbin/certctl/certctl.c b/usr.sbin/certctl/certctl.c index 6687e56f23b4..f5876736d604 100644 --- a/usr.sbin/certctl/certctl.c +++ b/usr.sbin/certctl/certctl.c @@ -4,7 +4,6 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#include #include #include @@ -13,6 +12,8 @@ #include #include #include +#include +#include #include #include #include @@ -20,6 +21,7 @@ #include #include +#include #include #define info(fmt, ...) \ @@ -58,6 +60,7 @@ static void usage(void); static bool dryrun; static bool longnames; static bool nobundle; +static bool nohash; static bool unprivileged; static bool verbose; @@ -381,14 +384,58 @@ write_certs(const char *dir, struct cert_tree *tree) if (file->c == INT_MAX) errx(1, "unable to disambiguate %08lx", cert->hash); free(cert->path); - cert->path = xasprintf("%08lx.%d", cert->hash, file->c); + if (nohash) { + X509_NAME *xn; + X509_NAME_ENTRY *xe; + ASN1_STRING *as; + unsigned char *us = NULL; + int xi, usl; + + xn = X509_get_subject_name(cert->x509); + xi = X509_NAME_get_index_by_NID(xn, NID_commonName, -1); + if (xi < 0) { + warnx("%08lx.%d: certificate has no CN", + cert->hash, file->c); + xi = X509_NAME_get_index_by_NID(xn, + NID_organizationalUnitName, -1); + } + if (xi < 0) { + warnx("%08lx.%d: certificate has no OU", + cert->hash, file->c); + xi = X509_NAME_get_index_by_NID(xn, + NID_organizationName, -1); + } + if (xi < 0) { + warnx("%08lx.%d: certificate has no O", + cert->hash, file->c); + cert->path = xasprintf("%08lx.%d", cert->hash, + file->c); + } + xe = X509_NAME_get_entry(xn, xi); + as = X509_NAME_ENTRY_get_data(xe); + usl = ASN1_STRING_to_UTF8(&us, as); + if (usl < 0) { + errx(1, "%08lx.%d: %s", cert->hash, file->c, + ERR_error_string(ERR_get_error(), NULL)); + } + cert->path = xasprintf("%s.pem", (char *)us); + OPENSSL_free(us); + } else { + cert->path = xasprintf("%08lx.%d", cert->hash, file->c); + } } /* * Open and scan the directory. */ if ((d = open(dir, O_DIRECTORY | O_RDONLY)) < 0 || - (ndents = fdscandir(d, &dents, NULL, lexisort)) < 0) +#ifdef BOOTSTRAPPING + (ndents = scandir(dir, &dents, NULL, lexisort)) +#else + (ndents = fdscandir(d, &dents, NULL, lexisort)) +#endif + < 0) err(1, "%s", dir); + /* * Iterate over the directory listing and the certificate listing * in parallel. If the directory listing gets ahead of the @@ -598,7 +645,7 @@ load_trusted(bool all, struct cert_tree *exclude) * Returns the number of certificates loaded. */ static unsigned int -load_untrusted(bool all) +load_untrusted(bool all, struct cert_tree *exclude) { char *path; unsigned int i, n; @@ -606,19 +653,19 @@ load_untrusted(bool all) /* load external untrusted certs */ for (i = n = 0; all && untrusted_paths[i] != NULL; i++) { - ret = read_certs(untrusted_paths[i], &untrusted, NULL); + ret = read_certs(untrusted_paths[i], &untrusted, exclude); if (ret > 0) n += ret; } /* load installed untrusted certs */ - ret = read_certs(untrusted_dest, &untrusted, NULL); + ret = read_certs(untrusted_dest, &untrusted, exclude); if (ret > 0) n += ret; /* load legacy untrusted certs */ path = expand_path(LEGACY_PATH); - ret = read_certs(path, &untrusted, NULL); + ret = read_certs(path, &untrusted, exclude); if (ret > 0) { warnx("certificates found in legacy directory %s", path); @@ -748,7 +795,7 @@ certctl_untrusted(int argc, char **argv __unused) if (argc > 1) usage(); /* load untrusted certificates */ - load_untrusted(false); + load_untrusted(false, NULL); /* list them */ list_certs(&untrusted); free_certs(&untrusted); @@ -775,7 +822,7 @@ certctl_rehash(int argc, char **argv __unused) } /* load untrusted certs first */ - load_untrusted(true); + load_untrusted(true, NULL); /* load trusted certs, excluding any that are already untrusted */ load_trusted(true, &untrusted); @@ -808,7 +855,7 @@ certctl_trust(int argc, char **argv) usage(); /* load untrusted certs first */ - load_untrusted(true); + load_untrusted(true, NULL); /* load trusted certs, excluding any that are already untrusted */ load_trusted(true, &untrusted); @@ -869,7 +916,7 @@ certctl_untrust(int argc, char **argv) usage(); /* load untrusted certs first */ - load_untrusted(true); + load_untrusted(true, NULL); /* now load the additional untrusted certificates */ n = 0; @@ -900,22 +947,10 @@ static void set_defaults(void) { const char *value; - char *str; - size_t len; if (localbase == NULL && - (localbase = getenv("LOCALBASE")) == NULL) { - if ((str = malloc((len = PATH_MAX) + 1)) == NULL) - err(1, NULL); - while (sysctlbyname("user.localbase", str, &len, NULL, 0) < 0) { - if (errno != ENOMEM) - err(1, "sysctl(user.localbase)"); - if ((str = realloc(str, len + 1)) == NULL) - err(1, NULL); - } - str[len] = '\0'; - localbase = str; - } + (localbase = getenv("LOCALBASE")) == NULL) + localbase = getlocalbase(); if (destdir == NULL && (destdir = getenv("DESTDIR")) == NULL) @@ -984,7 +1019,7 @@ usage(void) { fprintf(stderr, "usage: certctl [-lv] [-D destdir] list\n" " certctl [-lv] [-D destdir] untrusted\n" - " certctl [-BnUv] [-D destdir] [-M metalog] rehash\n" + " certctl [-BNnUv] [-D destdir] [-M metalog] rehash\n" " certctl [-nv] [-D destdir] untrust \n" " certctl [-nv] [-D destdir] trust \n"); exit(1); @@ -996,7 +1031,7 @@ main(int argc, char *argv[]) const char *command; int opt; - while ((opt = getopt(argc, argv, "BcD:g:lL:M:no:Uv")) != -1) + while ((opt = getopt(argc, argv, "BcD:g:lL:M:Nno:Uv")) != -1) switch (opt) { case 'B': nobundle = true; @@ -1019,6 +1054,9 @@ main(int argc, char *argv[]) case 'M': metalog = optarg; break; + case 'N': + nohash = true; + break; case 'n': dryrun = true; break; @@ -1043,7 +1081,7 @@ main(int argc, char *argv[]) command = *argv; - if ((nobundle || unprivileged || metalog != NULL) && + if ((nobundle || nohash || unprivileged || metalog != NULL) && strcmp(command, "rehash") != 0) usage(); if (!unprivileged && metalog != NULL) { From nobody Wed Aug 13 22:39:42 2025 X-Original-To: dev-commits-src-main@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 4c2Nbf3KTNz64d5T; Wed, 13 Aug 2025 22:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2Nbf2kwgz3fCF; Wed, 13 Aug 2025 22:39:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755124782; 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=6yo5hMlasTmvHK3ol2s7rHzEMbFTVm0RtuEy9t/x61o=; b=tZfurx6NC+GbJAo01cgn3Hh9MofRxpMI8lq9j18FE6dJg9MzaiIHTEd6Ol7SsVfDHKbJDF XZrC5NQzp1x3QO93zE2TQOsaLehax5xRILX6k2sZ9XfGpD6WCnieBqHmrrFK9vEcM3bf1H nPSgKeXIJmBc6codJTSzxqZSRzEVn+0BUYgdHYBmyaspQ/13ml7nChOp4lxT4QcyIB2fz5 xEYG8kqbo6XqnrNXpFICqLaxSmvDvUTtXhpMc8qGZp9eKWTyHIVLAv8d2Rax8MRZL+pGKA C7W5OjnvVQOCai2u5UFk8SWoyCRY91KqwHpzfWBu8fiNxM6AIyZREGfryg+mbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755124782; 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=6yo5hMlasTmvHK3ol2s7rHzEMbFTVm0RtuEy9t/x61o=; b=XImIGdO1qSxnH9nQQgMCV4Rk5FnboD/b2KC4KcqgmhQEJE741Elmo3PoqHYHjVxIK4eVcP 62pehKe89J/7rHrZz5kh9++fPzU72BpipGZK9QyA/pLnP0LotCQ35xmczYKewsydNUoqGi wdaVntlJ5tgSwHjxJKTIQCoaD31QlC0OkB6LWxlp/YQVsLmrxCYU+nrq5ULhg4dYhZpKwE lcEaW8RMIV/z5fKFVU9c8UrKV32pHi1Tu9np7sQPgTDifolAi8xXi2wiy9Zr73pDTb8AkQ 6ouMjx5Hx+8arZKAQgKjh6GaldvaD2kHBO+y6yd3BSiuazxls1X23GXp/J4iAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755124782; a=rsa-sha256; cv=none; b=YozUZzjSaYeeXM6E67Ixp4xhBu+BlKwiiurDMOe8PUTULNrBzqs19v7yrxUUAw1F4vS6Eh PqAWMboYhinWej+8LMjTT2Ira1VM8Cquyx2HPqLqkUDNKS6OCUALCHNJ2MOSgHqTCKgSjw AJ2nPNq/AftU8cQBTsE6LUarXRdE4PCgms4HX0Q/ZtpodgOVNz8k8hNU8MfXHmEECOUua1 +c/SJzQrx6ANDd6YdJcRBNPhKS9LhDEBPB+9qarIoiQGcsWnM1fHrOHhfp4s5I4NuUVfJT x8keQfHjz/QHUJgZ/bC9BdGQyoJ83cl+2eimGTkzVQvBEM5t5mQrlvNCvJbC2A== 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 4c2Nbf2KfXzBWY; Wed, 13 Aug 2025 22:39: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 57DMdgOY003379; Wed, 13 Aug 2025 22:39:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DMdgSA003376; Wed, 13 Aug 2025 22:39:42 GMT (envelope-from git) Date: Wed, 13 Aug 2025 22:39:42 GMT Message-Id: <202508132239.57DMdgSA003376@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 2f8bbfe5873b - main - Revert "certctl: Fix bootstrap build" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f8bbfe5873bf652619e7e433cff17ac18c9d4fa Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2f8bbfe5873bf652619e7e433cff17ac18c9d4fa commit 2f8bbfe5873bf652619e7e433cff17ac18c9d4fa Author: Dag-Erling Smørgrav AuthorDate: 2025-08-13 22:37:52 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-13 22:37:52 +0000 Revert "certctl: Fix bootstrap build" This reverts commit 42ac41983ee184e818f6e8da791a5c6c7530f87e. --- usr.sbin/certctl/Makefile | 6 +-- usr.sbin/certctl/certctl.8 | 7 +--- usr.sbin/certctl/certctl.c | 94 ++++++++++++++-------------------------------- 3 files changed, 30 insertions(+), 77 deletions(-) diff --git a/usr.sbin/certctl/Makefile b/usr.sbin/certctl/Makefile index 8f19bde8aaf6..5430dbf24853 100644 --- a/usr.sbin/certctl/Makefile +++ b/usr.sbin/certctl/Makefile @@ -3,12 +3,8 @@ PACKAGE= certctl PROG= certctl MAN= certctl.8 -LIBADD= crypto util +LIBADD= crypto HAS_TESTS= SUBDIR.${MK_TESTS}= tests -.ifdef BOOTSTRAPPING -CFLAGS+=-DBOOTSTRAPPING -.endif - .include diff --git a/usr.sbin/certctl/certctl.8 b/usr.sbin/certctl/certctl.8 index c53ad9765544..97bdc840c359 100644 --- a/usr.sbin/certctl/certctl.8 +++ b/usr.sbin/certctl/certctl.8 @@ -38,7 +38,7 @@ .Op Fl lv .Ic untrusted .Nm -.Op Fl BNnUv +.Op Fl BnUv .Op Fl D Ar destdir .Op Fl M Ar metalog .Ic rehash @@ -75,11 +75,6 @@ default: This option is only valid in conjunction with the .Ic rehash command. -.It Fl N -Base the file name on the certificate's name instead of its hash. -This option is only valid in conjunction with the -.Ic rehash -command. .It Fl n Dry-run mode. Do not actually perform any actions except write the metalog. diff --git a/usr.sbin/certctl/certctl.c b/usr.sbin/certctl/certctl.c index f5876736d604..6687e56f23b4 100644 --- a/usr.sbin/certctl/certctl.c +++ b/usr.sbin/certctl/certctl.c @@ -4,6 +4,7 @@ * SPDX-License-Identifier: BSD-2-Clause */ +#include #include #include @@ -12,8 +13,6 @@ #include #include #include -#include -#include #include #include #include @@ -21,7 +20,6 @@ #include #include -#include #include #define info(fmt, ...) \ @@ -60,7 +58,6 @@ static void usage(void); static bool dryrun; static bool longnames; static bool nobundle; -static bool nohash; static bool unprivileged; static bool verbose; @@ -384,58 +381,14 @@ write_certs(const char *dir, struct cert_tree *tree) if (file->c == INT_MAX) errx(1, "unable to disambiguate %08lx", cert->hash); free(cert->path); - if (nohash) { - X509_NAME *xn; - X509_NAME_ENTRY *xe; - ASN1_STRING *as; - unsigned char *us = NULL; - int xi, usl; - - xn = X509_get_subject_name(cert->x509); - xi = X509_NAME_get_index_by_NID(xn, NID_commonName, -1); - if (xi < 0) { - warnx("%08lx.%d: certificate has no CN", - cert->hash, file->c); - xi = X509_NAME_get_index_by_NID(xn, - NID_organizationalUnitName, -1); - } - if (xi < 0) { - warnx("%08lx.%d: certificate has no OU", - cert->hash, file->c); - xi = X509_NAME_get_index_by_NID(xn, - NID_organizationName, -1); - } - if (xi < 0) { - warnx("%08lx.%d: certificate has no O", - cert->hash, file->c); - cert->path = xasprintf("%08lx.%d", cert->hash, - file->c); - } - xe = X509_NAME_get_entry(xn, xi); - as = X509_NAME_ENTRY_get_data(xe); - usl = ASN1_STRING_to_UTF8(&us, as); - if (usl < 0) { - errx(1, "%08lx.%d: %s", cert->hash, file->c, - ERR_error_string(ERR_get_error(), NULL)); - } - cert->path = xasprintf("%s.pem", (char *)us); - OPENSSL_free(us); - } else { - cert->path = xasprintf("%08lx.%d", cert->hash, file->c); - } + cert->path = xasprintf("%08lx.%d", cert->hash, file->c); } /* * Open and scan the directory. */ if ((d = open(dir, O_DIRECTORY | O_RDONLY)) < 0 || -#ifdef BOOTSTRAPPING - (ndents = scandir(dir, &dents, NULL, lexisort)) -#else - (ndents = fdscandir(d, &dents, NULL, lexisort)) -#endif - < 0) + (ndents = fdscandir(d, &dents, NULL, lexisort)) < 0) err(1, "%s", dir); - /* * Iterate over the directory listing and the certificate listing * in parallel. If the directory listing gets ahead of the @@ -645,7 +598,7 @@ load_trusted(bool all, struct cert_tree *exclude) * Returns the number of certificates loaded. */ static unsigned int -load_untrusted(bool all, struct cert_tree *exclude) +load_untrusted(bool all) { char *path; unsigned int i, n; @@ -653,19 +606,19 @@ load_untrusted(bool all, struct cert_tree *exclude) /* load external untrusted certs */ for (i = n = 0; all && untrusted_paths[i] != NULL; i++) { - ret = read_certs(untrusted_paths[i], &untrusted, exclude); + ret = read_certs(untrusted_paths[i], &untrusted, NULL); if (ret > 0) n += ret; } /* load installed untrusted certs */ - ret = read_certs(untrusted_dest, &untrusted, exclude); + ret = read_certs(untrusted_dest, &untrusted, NULL); if (ret > 0) n += ret; /* load legacy untrusted certs */ path = expand_path(LEGACY_PATH); - ret = read_certs(path, &untrusted, exclude); + ret = read_certs(path, &untrusted, NULL); if (ret > 0) { warnx("certificates found in legacy directory %s", path); @@ -795,7 +748,7 @@ certctl_untrusted(int argc, char **argv __unused) if (argc > 1) usage(); /* load untrusted certificates */ - load_untrusted(false, NULL); + load_untrusted(false); /* list them */ list_certs(&untrusted); free_certs(&untrusted); @@ -822,7 +775,7 @@ certctl_rehash(int argc, char **argv __unused) } /* load untrusted certs first */ - load_untrusted(true, NULL); + load_untrusted(true); /* load trusted certs, excluding any that are already untrusted */ load_trusted(true, &untrusted); @@ -855,7 +808,7 @@ certctl_trust(int argc, char **argv) usage(); /* load untrusted certs first */ - load_untrusted(true, NULL); + load_untrusted(true); /* load trusted certs, excluding any that are already untrusted */ load_trusted(true, &untrusted); @@ -916,7 +869,7 @@ certctl_untrust(int argc, char **argv) usage(); /* load untrusted certs first */ - load_untrusted(true, NULL); + load_untrusted(true); /* now load the additional untrusted certificates */ n = 0; @@ -947,10 +900,22 @@ static void set_defaults(void) { const char *value; + char *str; + size_t len; if (localbase == NULL && - (localbase = getenv("LOCALBASE")) == NULL) - localbase = getlocalbase(); + (localbase = getenv("LOCALBASE")) == NULL) { + if ((str = malloc((len = PATH_MAX) + 1)) == NULL) + err(1, NULL); + while (sysctlbyname("user.localbase", str, &len, NULL, 0) < 0) { + if (errno != ENOMEM) + err(1, "sysctl(user.localbase)"); + if ((str = realloc(str, len + 1)) == NULL) + err(1, NULL); + } + str[len] = '\0'; + localbase = str; + } if (destdir == NULL && (destdir = getenv("DESTDIR")) == NULL) @@ -1019,7 +984,7 @@ usage(void) { fprintf(stderr, "usage: certctl [-lv] [-D destdir] list\n" " certctl [-lv] [-D destdir] untrusted\n" - " certctl [-BNnUv] [-D destdir] [-M metalog] rehash\n" + " certctl [-BnUv] [-D destdir] [-M metalog] rehash\n" " certctl [-nv] [-D destdir] untrust \n" " certctl [-nv] [-D destdir] trust \n"); exit(1); @@ -1031,7 +996,7 @@ main(int argc, char *argv[]) const char *command; int opt; - while ((opt = getopt(argc, argv, "BcD:g:lL:M:Nno:Uv")) != -1) + while ((opt = getopt(argc, argv, "BcD:g:lL:M:no:Uv")) != -1) switch (opt) { case 'B': nobundle = true; @@ -1054,9 +1019,6 @@ main(int argc, char *argv[]) case 'M': metalog = optarg; break; - case 'N': - nohash = true; - break; case 'n': dryrun = true; break; @@ -1081,7 +1043,7 @@ main(int argc, char *argv[]) command = *argv; - if ((nobundle || nohash || unprivileged || metalog != NULL) && + if ((nobundle || unprivileged || metalog != NULL) && strcmp(command, "rehash") != 0) usage(); if (!unprivileged && metalog != NULL) { From nobody Wed Aug 13 22:39:43 2025 X-Original-To: dev-commits-src-main@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 4c2Nbg5ZCHz64cyq; Wed, 13 Aug 2025 22:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2Nbg3fgwz3f7M; Wed, 13 Aug 2025 22:39:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755124783; 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=7mRA8NQJDQruPVxBxJI+ylMcZ7kLgQRgYCBXzea6CTQ=; b=S0rt0fhHngTPjL5VH9EZI96ei5jiLlQ2loUK+RPuSS+BcbeSlbxFO0kHvqf7niyxe8p03I /+AnZ8X2B5f1DeCDse9Ta+CaYJGpdf7v0jNJ2BrkSLHZTGIQY29fkDStguVXaHi9vphTKt Ufy2qJ5LWlUUQk47DEIf2hEjyneAJdbpSPuGfK176hrZM3xjHoRgsKCPKknW7rDA5hoGdK 0MXRrY4u75ZuFwkAGgc4bC0CYrPUfkW99S4XBdxhFkj05x0JRgjBVjIjZ3TsQgUCeMSepf 2cXo2hO5xBi1W3IOyOf9zPrR+URmO50jtvTjFKgZaZbSY9mQ0tQBotz/npM61g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755124783; 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=7mRA8NQJDQruPVxBxJI+ylMcZ7kLgQRgYCBXzea6CTQ=; b=jirejmjvdEwIIR3/tyLJtIpfP2xjaOM5NRfxmJqNrPaH/bsiDOVeT/FGYdC1cuCPprv0V+ iERlFmb9BEsBoL9Za8BDn8btnSl3HGHdZh/2mnQNAQyrDss/ptMboPFlfZ1RDsV5ZIE0MI N07GZ+gkgzcLA06bWlNUP0S9/qaoWBW5ZmsbuQMCKAvfq4ss5f/C8JdSE1XN4PLrUbcqBr s/n5CfSImDqfVyZD/yRT/X/SAciiKF6TTDUKF9nmB/5TWVH4vofE8p9VLsXZdxuoBBXr2y AVhsW+8ixrqeLeFzDg6n4etDEZ9zbh5n9cZDWRzipDrpLUQk+t37vIXnAycpVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755124783; a=rsa-sha256; cv=none; b=e/VSKOhnHLpN6Cm4ZCb0DPop+1K9Y3bRATmRT1RzQEXvawEs74DUTZotKraYxdJPIV1061 lGl1uvpPf/m6elFQNe3+3PGSrHDdthFppped5gOri+hNUkU1+iNzrzp6LpxC9/1jFbBJPB DaIdD+snGMmOb7BtjCZrk0BLUdSAviUym6irs+Y80bjNatEFXNkVTjWGuVjSxZLQh4yH6X a9MosTz0wPCLWStGQylbHtI0vpGrZWOUBaojQPH0+OSjszm6f69IRM25MFyjMx1wO3j8Hn rglnBGgc3PFe6zSE9ajtGcCWBe0rbW8AWSBy9Etp1RRDEu0TUMcs9TgC1E3h+w== 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 4c2Nbg3G6zzBNp; Wed, 13 Aug 2025 22:39: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 57DMdhGm003415; Wed, 13 Aug 2025 22:39:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57DMdha8003412; Wed, 13 Aug 2025 22:39:43 GMT (envelope-from git) Date: Wed, 13 Aug 2025 22:39:43 GMT Message-Id: <202508132239.57DMdha8003412@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: c989e3cc3da1 - main - certctl: Fix bootstrap build List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c989e3cc3da1bfd8ac3ec5a05d1e86ab8ff719f7 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c989e3cc3da1bfd8ac3ec5a05d1e86ab8ff719f7 commit c989e3cc3da1bfd8ac3ec5a05d1e86ab8ff719f7 Author: Dag-Erling Smørgrav AuthorDate: 2025-08-13 22:38:52 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-13 22:39:21 +0000 certctl: Fix bootstrap build Fixes: 81d8827ad875 ("certctl: Reimplement in C") --- usr.sbin/certctl/Makefile | 4 ++++ usr.sbin/certctl/certctl.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/usr.sbin/certctl/Makefile b/usr.sbin/certctl/Makefile index 5430dbf24853..6900f0ce3b65 100644 --- a/usr.sbin/certctl/Makefile +++ b/usr.sbin/certctl/Makefile @@ -7,4 +7,8 @@ LIBADD= crypto HAS_TESTS= SUBDIR.${MK_TESTS}= tests +.ifdef BOOTSTRAPPING +CFLAGS+=-DBOOTSTRAPPING +.endif + .include diff --git a/usr.sbin/certctl/certctl.c b/usr.sbin/certctl/certctl.c index 6687e56f23b4..365870167aeb 100644 --- a/usr.sbin/certctl/certctl.c +++ b/usr.sbin/certctl/certctl.c @@ -387,7 +387,12 @@ write_certs(const char *dir, struct cert_tree *tree) * Open and scan the directory. */ if ((d = open(dir, O_DIRECTORY | O_RDONLY)) < 0 || - (ndents = fdscandir(d, &dents, NULL, lexisort)) < 0) +#ifdef BOOTSTRAPPING + (ndents = scandir(dir, &dents, NULL, lexisort)) +#else + (ndents = fdscandir(d, &dents, NULL, lexisort)) +#endif + < 0) err(1, "%s", dir); /* * Iterate over the directory listing and the certificate listing From nobody Wed Aug 13 22:53:10 2025 X-Original-To: dev-commits-src-main@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 4c2P4M0R58z64dyF for ; Wed, 13 Aug 2025 23:01:07 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) (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 4c2P4L4wrkz3h8D for ; Wed, 13 Aug 2025 23:01:06 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-55ce521f77bso308081e87.1 for ; Wed, 13 Aug 2025 16:01:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755126065; x=1755730865; 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=xNYTLIL06ify0ucbOLLuZeBFAlehj1IWwIB2D4OsuZc=; b=ssc64xVMvh7BazhRVGf7UZNqteyzghVMh6qEtPANN9gULsAcy0TDMUJ1TcI2Rdnpyo d+DNHt3UpQc2FOOZuIvIrdOk7P59nnyhMh9iNj6LJBXYK9+JQyMjaAzgErCEmfb6AXAj OC5fDwN+mh0O8Yt2IbqVq3r9k6bR/XxV1rNkM0YoUlQ7H8yLkbMGSsRH7ohmDHtsn0+U i5OuFtQMkS6e/S1Y/JbgogR4Wjih78yBZ2WAevbin2dq7gRYjK0tNiD6mZXMayLUNe2s MCKG1epYLZg5Coztd3n66F6MD4PU9liCtS1k97ff07GhG7XfiAZ1jxQLZWNyqlxXNHmK oovw== X-Forwarded-Encrypted: i=1; AJvYcCXsXf0esKV+AXAX6arhPmm0olEZ7YHXyefhjaCaqqjYkJ5cMtcK9KurPgUhA/R6/DLw0RVFBZxhpQ/eirQFyy4L5dTT8g==@freebsd.org X-Gm-Message-State: AOJu0YzMdykHh9n4k7uWyiLiPSiu3Fzj8cOWsQPnH4u5/jQ9YakpjWiM 4Qby0vblDTaXJBLEtugvX9lPDDiJkc7qL8hurXd0FPT7bbELGdbT1oqKk4Hh7Q0NdTuFgV0RdwC VA4nZ X-Gm-Gg: ASbGnct6ItaU+YcQLOe7QyaY2dTd26CQWKdZ039A+zyWD/k8+ezCS5YBaLqfMmdgOd0 axFnN6187zHDJovkEHZ2W5k6pvQ2hkH172WjpxqvbY2AvsUMCrwdvYxqmedxv1VRpUbnco58eYT 9DnPYWh5h0QMfuh3PMPWSVsDtq0wRn+J3GS5yIpfMiPz/yfWV48SpWOjAJqSu6vMEBIpm7lneIx 4VlFXEpslusnlr8fRbhZ9yIIC9Q/aDF7Um/krAkQAGPp0djOyW6TupFNPJgZeM5zGwYhXXIy48H YUhhTM5RS640mbEDGQRRgMS6YuvAhoq4hXXf1p1n8FKBMrFoes3Y1g+t233K95ZJ92bT7yIxNl2 iHcBHIjaXvFrwqIA2+VqxDGo7Q/FVkfNm/ldToEJFQRrVYfdO+T6hapVYHOCwT1FKh4k7 X-Google-Smtp-Source: AGHT+IHuyl7lNUkrxvjpzBB+G3wn7d7nGlvlyncEs4qVQ6Z0o4v3NtpxDG0OjGcpE+hpEQB3v69Kng== X-Received: by 2002:a05:600c:a06:b0:456:1d61:b0f2 with SMTP id 5b1f17b1804b1-45a1b687253mr4062295e9.30.1755125603591; Wed, 13 Aug 2025 15:53:23 -0700 (PDT) Received: from smtpclient.apple (global-184-7.n-1.net.cam.ac.uk. [131.111.184.7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45a1a50a42asm16908215e9.1.2025.08.13.15.53.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Aug 2025 15:53:22 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\)) Subject: Re: git: 81d8827ad875 - main - certctl: Reimplement in C From: Jessica Clarke In-Reply-To: <202508132225.57DMPlLZ083341@gitrepo.freebsd.org> Date: Wed, 13 Aug 2025 23:53:10 +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: References: <202508132225.57DMPlLZ083341@gitrepo.freebsd.org> To: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= X-Mailer: Apple Mail (2.3826.600.51.1.1) X-Rspamd-Queue-Id: 4c2P4L4wrkz3h8D 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] On 13 Aug 2025, at 23:25, Dag-Erling Sm=C3=B8rgrav = wrote: >=20 > The branch main has been updated by des: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D81d8827ad8752e35411204541f1f09df= 1481e417 >=20 > commit 81d8827ad8752e35411204541f1f09df1481e417 > Author: Dag-Erling Sm=C3=B8rgrav > AuthorDate: 2025-08-13 22:25:27 +0000 > Commit: Dag-Erling Sm=C3=B8rgrav > CommitDate: 2025-08-13 22:25:27 +0000 >=20 > certctl: Reimplement in C >=20 > Notable changes include: >=20 > * We no longer forget manually untrusted certificates when = rehashing. >=20 > * Rehash will now scan the existing directory and progressively = replace > its contents with those of the new trust store. The trust store = as a > whole is not replaced atomically, but each file within it is. >=20 > * We no longer attempt to link to the original files, but we don't = copy > them either. Instead, we write each certificate out in its = minimal > form. >=20 > * We now generate a trust bundle in addition to the hashed = diretory. > This also contains only the minimal DER form of each certificate. >=20 > * The C version is approximately two orders of magnitude faster = than the > sh version, with rehash taking ~100 ms vs ~5-25 s depending on = whether > ca_root_nss is installed. >=20 > * The DISTBASE concept has been dropped; the same effect can be = achieved > by adjusting DESTDIR. That=E2=80=99s not quite true. DISTBASE was separate from DESTDIR = because the expectation of distributeworld is that there is a single METALOG file for all of the distribution sets combined, where each line in the METALOG includes the distribution set=E2=80=99s directory name. Have you verified that distributeworld -DNO_ROOT (as is now the only supported option for release builds) works correctly and includes all the hashed certs? See 232cf6be4bc4 ("certctl: Introduce a new -d option=E2=80=9D)= for the rationale behind why I introduced it as a separate option in the first place; prior to that there was just DESTDIR that pointed at the distribution=E2=80=99s subdirectory. As mentioned on IRC this also breaks the macOS cross-build due to not being able to find OpenSSL headers. Jessica > * We now also have rudimentary tests. >=20 > Reviewed by: kevans > Differential Revision: https://reviews.freebsd.org/D42320 > --- > Makefile.inc1 | 21 +- > usr.sbin/certctl/Makefile | 7 +- > usr.sbin/certctl/certctl.8 | 94 +-- > usr.sbin/certctl/certctl.c | 1060 = ++++++++++++++++++++++++++++++++ > usr.sbin/certctl/certctl.sh | 366 ----------- > usr.sbin/certctl/tests/Makefile | 5 + > usr.sbin/certctl/tests/certctl.subr | 44 ++ > usr.sbin/certctl/tests/certctl_test.sh | 221 +++++++ > 8 files changed, 1404 insertions(+), 414 deletions(-) >=20 > diff --git a/Makefile.inc1 b/Makefile.inc1 > index 9128d1d8ee77..e67bc7f5d1b1 100644 > --- a/Makefile.inc1 > +++ b/Makefile.inc1 > @@ -1021,8 +1021,7 @@ IMAKE_MTREE=3D MTREE_CMD=3D"${MTREE_CMD} = ${MTREEFLAGS}" > .endif >=20 > .if make(distributeworld) > -CERTCTLDESTDIR=3D ${DESTDIR}/${DISTDIR} > -CERTCTLFLAGS+=3D -d /base > +CERTCTLDESTDIR=3D ${DESTDIR}/${DISTDIR}/base > .else > CERTCTLDESTDIR=3D ${DESTDIR} > .endif > @@ -1541,14 +1540,10 @@ distributeworld installworld stageworld: = _installcheck_world .PHONY > .endif # make(distributeworld) > ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \ > ${IMAKEENV} rm -rf ${INSTALLTMP} > -.if !make(packageworld) && ${MK_CAROOT} !=3D "no" > - @if which openssl>/dev/null; then \ > - PATH=3D${TMPPATH:Q}:${PATH:Q} \ > - LOCALBASE=3D${LOCALBASE:Q} \ > - sh ${SRCTOP}/usr.sbin/certctl/certctl.sh ${CERTCTLFLAGS} rehash; = \ > - else \ > - echo "No openssl on the host, not rehashing certificates target -- = /etc/ssl may not be populated."; \ > - fi > +.if !make(packageworld) && ${MK_CAROOT} !=3D "no" && ${MK_OPENSSL} !=3D= "no" > + PATH=3D${TMPPATH:Q}:${PATH:Q} \ > + LOCALBASE=3D${LOCALBASE:Q} \ > + certctl ${CERTCTLFLAGS} rehash > .endif > .if make(distributeworld) > .for dist in ${EXTRA_DISTRIBUTIONS} > @@ -2712,6 +2707,11 @@ _basic_bootstrap_tools+=3Dsbin/md5 > _basic_bootstrap_tools+=3Dusr.sbin/tzsetup > .endif >=20 > +# certctl is needed as an install tool > +.if ${MK_CAROOT} !=3D "no" && ${MK_OPENSSL} !=3D "no" > +_certctl=3Dusr.sbin/certctl > +.endif > + > .if defined(BOOTSTRAP_ALL_TOOLS) > _other_bootstrap_tools+=3D${_basic_bootstrap_tools} > .for _subdir _links in ${_basic_bootstrap_tools_multilink} > @@ -2775,6 +2775,7 @@ bootstrap-tools: ${_bt}-links .PHONY > ${_strfile} \ > usr.bin/dtc \ > ${_cat} \ > + ${_certctl} \ > ${_kbdcontrol} \ > ${_elftoolchain_libs} \ > ${_libkldelf} \ > diff --git a/usr.sbin/certctl/Makefile b/usr.sbin/certctl/Makefile > index 88c024daf7e6..5430dbf24853 100644 > --- a/usr.sbin/certctl/Makefile > +++ b/usr.sbin/certctl/Makefile > @@ -1,5 +1,10 @@ > +.include > + > PACKAGE=3D certctl > -SCRIPTS=3Dcertctl.sh > +PROG=3D certctl > MAN=3D certctl.8 > +LIBADD=3D crypto > +HAS_TESTS=3D > +SUBDIR.${MK_TESTS}=3D tests >=20 > .include > diff --git a/usr.sbin/certctl/certctl.8 b/usr.sbin/certctl/certctl.8 > index 7e49bb89e2ac..97bdc840c359 100644 > --- a/usr.sbin/certctl/certctl.8 > +++ b/usr.sbin/certctl/certctl.8 > @@ -24,7 +24,7 @@ > .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > .\" POSSIBILITY OF SUCH DAMAGE. > .\" > -.Dd July 17, 2025 > +.Dd August 11, 2025 > .Dt CERTCTL 8 > .Os > .Sh NAME > @@ -32,63 +32,83 @@ > .Nd "tool for managing trusted and untrusted TLS certificates" > .Sh SYNOPSIS > .Nm > -.Op Fl v > +.Op Fl lv > .Ic list > .Nm > -.Op Fl v > +.Op Fl lv > .Ic untrusted > .Nm > -.Op Fl cnUv > +.Op Fl BnUv > .Op Fl D Ar destdir > .Op Fl M Ar metalog > .Ic rehash > .Nm > -.Op Fl cnv > -.Ic untrust Ar file > +.Op Fl nv > +.Ic untrust Ar > .Nm > -.Op Fl cnv > -.Ic trust Ar file > +.Op Fl nv > +.Ic trust Ar > .Sh DESCRIPTION > The > .Nm > utility manages the list of TLS Certificate Authorities that are = trusted by > applications that use OpenSSL. > .Pp > -Flags: > +The following options are available: > .Bl -tag -width 4n > -.It Fl c > -Copy certificates instead of linking to them. > +.It Fl B > +Do not generate a bundle. > +This option is only valid in conjunction with the > +.Ic rehash > +command. > .It Fl D Ar destdir > Specify the DESTDIR (overriding values from the environment). > -.It Fl d Ar distbase > -Specify the DISTBASE (overriding values from the environment). > +.It Fl l > +When listing installed (trusted or untrusted) certificates, show the > +full path and distinguished name for each certificate. > .It Fl M Ar metalog > -Specify the path of the METALOG file (default: $DESTDIR/METALOG). > +Specify the path of the METALOG file > +.Po > +default: > +.Pa ${DESTDIR}/METALOG > +.Pc . > +This option is only valid in conjunction with the > +.Ic rehash > +command. > .It Fl n > -No-Op mode, do not actually perform any actions. > +Dry-run mode. > +Do not actually perform any actions except write the metalog. > .It Fl v > -Be verbose, print details about actions before performing them. > +Verbose mode. > +Print detailed information about each action taken. > .It Fl U > -Unprivileged mode, do not change the ownership of created links. > -Do record the ownership in the METALOG file. > +Unprivileged mode. > +Do not attempt to set the ownership of created files. > +This option is only valid in conjunction with the > +.Fl M > +option and the > +.Ic rehash > +command. > .El > .Pp > Primary command functions: > .Bl -tag -width untrusted > .It Ic list > -List all currently trusted certificate authorities. > +List all currently trusted certificates. > .It Ic untrusted > List all currently untrusted certificates. > .It Ic rehash > -Rebuild the list of trusted certificate authorities by scanning all = directories > +Rebuild the list of trusted certificates by scanning all directories > in > .Ev TRUSTPATH > and all untrusted certificates in > .Ev UNTRUSTPATH . > -A symbolic link to each trusted certificate is placed in > +A copy of each trusted certificate is placed in > .Ev CERTDESTDIR > and each untrusted certificate in > .Ev UNTRUSTDESTDIR . > +In addition, a bundle containing the trusted certificates is placed = in > +.Ev BUNDLEFILE . > .It Ic untrust > Add the specified file to the untrusted list. > .It Ic trust > @@ -98,8 +118,6 @@ Remove the specified file from the untrusted list. > .Bl -tag -width UNTRUSTDESTDIR > .It Ev DESTDIR > Alternate destination directory to operate on. > -.It Ev DISTBASE > -Additional path component to include when operating on certificate = directories. > .It Ev LOCALBASE > Location for local programs. > Defaults to the value of the user.localbase sysctl which is usually > @@ -107,32 +125,34 @@ Defaults to the value of the user.localbase = sysctl which is usually > .It Ev TRUSTPATH > List of paths to search for trusted certificates. > Default: > -.Pa /usr/share/certs/trusted > -.Pa /usr/local/share/certs > -.Pa /etc/ssl/certs > +.Pa ${DESTDIR}/usr/share/certs/trusted > +.Pa ${DESTDIR}${LOCALBASE}/share/certs/trusted > +.Pa ${DESTDIR}${LOCALBASE}/share/certs > .It Ev UNTRUSTPATH > List of paths to search for untrusted certificates. > Default: > -.Pa /usr/share/certs/untrusted > -.Pa /etc/ssl/untrusted > -.Pa /etc/ssl/blacklisted > -.It Ev CERTDESTDIR > +.Pa ${DESTDIR}/usr/share/certs/untrusted > +.Pa ${DESTDIR}${LOCALBASE}/share/certs/untrusted > +.It Ev TRUSTDESTDIR > Destination directory for symbolic links to trusted certificates. > Default: > -.Pa /etc/ssl/certs > +.Pa ${DESTDIR}/etc/ssl/certs > .It Ev UNTRUSTDESTDIR > Destination directory for symbolic links to untrusted certificates. > Default: > -.Pa /etc/ssl/untrusted > -.It Ev EXTENSIONS > -List of file extensions to read as certificate files. > -Default: *.pem *.crt *.cer *.crl *.0 > +.Pa ${DESTDIR}/etc/ssl/untrusted > +.It Ev BUNDLE > +File name of bundle to produce. > .El > .Sh SEE ALSO > .Xr openssl 1 > .Sh HISTORY > .Nm > first appeared in > -.Fx 12.2 > +.Fx 12.2 . > .Sh AUTHORS > -.An Allan Jude Aq Mt allanjude@freebsd.org > +.An -nosplit > +The original shell implementation was written by > +.An Allan Jude Aq Mt allanjude@FreeBSD.org . > +The current C implementation was written by > +.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . > diff --git a/usr.sbin/certctl/certctl.c b/usr.sbin/certctl/certctl.c > new file mode 100644 > index 000000000000..6687e56f23b4 > --- /dev/null > +++ b/usr.sbin/certctl/certctl.c > @@ -0,0 +1,1060 @@ > +/*- > + * Copyright (c) 2023-2025 Dag-Erling Sm=C3=B8rgrav > + * > + * SPDX-License-Identifier: BSD-2-Clause > + */ > + > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > + > +#define info(fmt, ...) \ > + do { \ > + if (verbose) \ > + fprintf(stderr, fmt "\n", ##__VA_ARGS__); \ > + } while (0) > + > +static char * > +xasprintf(const char *fmt, ...) > +{ > + va_list ap; > + char *str; > + int ret; > + > + va_start(ap, fmt); > + ret =3D vasprintf(&str, fmt, ap); > + va_end(ap); > + if (ret < 0 || str =3D=3D NULL) > + err(1, NULL); > + return (str); > +} > + > +static char * > +xstrdup(const char *str) > +{ > + char *dup; > + > + if ((dup =3D strdup(str)) =3D=3D NULL) > + err(1, NULL); > + return (dup); > +} > + > +static void usage(void); > + > +static bool dryrun; > +static bool longnames; > +static bool nobundle; > +static bool unprivileged; > +static bool verbose; > + > +static const char *localbase; > +static const char *destdir; > +static const char *metalog; > + > +static const char *uname =3D "root"; > +static const char *gname =3D "wheel"; > + > +static const char *const default_trusted_paths[] =3D { > + "/usr/share/certs/trusted", > + "%L/share/certs/trusted", > + "%L/share/certs", > + NULL > +}; > +static char **trusted_paths; > + > +static const char *const default_untrusted_paths[] =3D { > + "/usr/share/certs/untrusted", > + "%L/share/certs/untrusted", > + NULL > +}; > +static char **untrusted_paths; > + > +static char *trusted_dest; > +static char *untrusted_dest; > +static char *bundle_dest; > + > +#define SSL_PATH "/etc/ssl" > +#define TRUSTED_DIR "certs" > +#define TRUSTED_PATH SSL_PATH "/" TRUSTED_DIR > +#define UNTRUSTED_DIR "untrusted" > +#define UNTRUSTED_PATH SSL_PATH "/" UNTRUSTED_DIR > +#define LEGACY_DIR "blacklisted" > +#define LEGACY_PATH SSL_PATH "/" LEGACY_DIR > +#define BUNDLE_FILE "cert.pem" > +#define BUNDLE_PATH SSL_PATH "/" BUNDLE_FILE > + > +static FILE *mlf; > + > +/* > + * Split a colon-separated list into a NULL-terminated array. > + */ > +static char ** > +split_paths(const char *str) > +{ > + char **paths; > + const char *p, *q; > + unsigned int i, n; > + > + for (p =3D str, n =3D 1; *p; p++) { > + if (*p =3D=3D ':') > + n++; > + } > + if ((paths =3D calloc(n + 1, sizeof(*paths))) =3D=3D NULL) > + err(1, NULL); > + for (p =3D q =3D str, i =3D 0; i < n; i++, p =3D q + 1) { > + q =3D strchrnul(p, ':'); > + if ((paths[i] =3D strndup(p, q - p)) =3D=3D NULL) > + err(1, NULL); > + } > + return (paths); > +} > + > +/* > + * Expand %L into LOCALBASE and prefix DESTDIR. > + */ > +static char * > +expand_path(const char *template) > +{ > + if (template[0] =3D=3D '%' && template[1] =3D=3D 'L') > + return (xasprintf("%s%s%s", destdir, localbase, template + 2)); > + return (xasprintf("%s%s", destdir, template)); > +} > + > +/* > + * Expand an array of paths. > + */ > +static char ** > +expand_paths(const char *const *templates) > +{ > + char **paths; > + unsigned int i, n; > + > + for (n =3D 0; templates[n] !=3D NULL; n++) > + continue; > + if ((paths =3D calloc(n + 1, sizeof(*paths))) =3D=3D NULL) > + err(1, NULL); > + for (i =3D 0; i < n; i++) > + paths[i] =3D expand_path(templates[i]); > + return (paths); > +} > + > +/* > + * If destdir is a prefix of path, returns a pointer to the rest of = path, > + * otherwise returns path. > + */ > +static const char * > +unexpand_path(const char *path) > +{ > + const char *p =3D path; > + const char *q =3D destdir; > + > + while (*p && *p =3D=3D *q) { > + p++; > + q++; > + } > + return (*q =3D=3D '\0' && *p =3D=3D '/' ? p : path); > +} > + > +/* > + * X509 certificate in a rank-balanced tree. > + */ > +struct cert { > + RB_ENTRY(cert) entry; > + unsigned long hash; > + char *name; > + X509 *x509; > + char *path; > +}; > + > +static void > +free_cert(struct cert *cert) > +{ > + free(cert->name); > + X509_free(cert->x509); > + free(cert->path); > + free(cert); > +} > + > +static int > +certcmp(const struct cert *a, const struct cert *b) > +{ > + return (X509_cmp(a->x509, b->x509)); > +} > + > +RB_HEAD(cert_tree, cert); > +static struct cert_tree trusted =3D RB_INITIALIZER(&trusted); > +static struct cert_tree untrusted =3D RB_INITIALIZER(&untrusted); > +RB_GENERATE_STATIC(cert_tree, cert, entry, certcmp); > + > +static void > +free_certs(struct cert_tree *tree) > +{ > + struct cert *cert, *tmp; > + > + RB_FOREACH_SAFE(cert, cert_tree, tree, tmp) { > + RB_REMOVE(cert_tree, tree, cert); > + free_cert(cert); > + } > +} > + > +static struct cert * > +find_cert(struct cert_tree *haystack, X509 *x509) > +{ > + struct cert needle =3D { .x509 =3D x509 }; > + > + return (RB_FIND(cert_tree, haystack, &needle)); > +} > + > +/* > + * File containing a certificate in a rank-balanced tree sorted by > + * certificate hash and disambiguating counter. This is needed = because > + * the certificate hash function is prone to collisions, = necessitating a > + * counter to distinguish certificates that hash to the same value. > + */ > +struct file { > + RB_ENTRY(file) entry; > + const struct cert *cert; > + unsigned int c; > +}; > + > +static int > +filecmp(const struct file *a, const struct file *b) > +{ > + if (a->cert->hash > b->cert->hash) > + return (1); > + if (a->cert->hash < b->cert->hash) > + return (-1); > + return (a->c - b->c); > +} > + > +RB_HEAD(file_tree, file); > +RB_GENERATE_STATIC(file_tree, file, entry, filecmp); > + > +/* > + * Lexicographical sort for scandir(). > + */ > +static int > +lexisort(const struct dirent **d1, const struct dirent **d2) > +{ > + return (strcmp((*d1)->d_name, (*d2)->d_name)); > +} > + > +/* > + * Read certificate(s) from a single file and insert them into a = tree. > + * Ignore certificates that already exist in the tree. If exclude is = not > + * null, also ignore certificates that exist in exclude. > + * > + * Returns the number certificates added to the tree, or -1 on = failure. > + */ > +static int > +read_cert(const char *path, struct cert_tree *tree, struct cert_tree = *exclude) > +{ > + FILE *f; > + X509 *x509; > + X509_NAME *name; > + struct cert *cert; > + unsigned long hash; > + int ni, no; > + > + if ((f =3D fopen(path, "r")) =3D=3D NULL) { > + warn("%s", path); > + return (-1); > + } > + for (ni =3D no =3D 0; > + (x509 =3D PEM_read_X509(f, NULL, NULL, NULL)) !=3D NULL; > + ni++) { > + hash =3D X509_subject_name_hash(x509); > + if (exclude && find_cert(exclude, x509)) { > + info("%08lx: excluded", hash); > + X509_free(x509); > + continue; > + } > + if (find_cert(tree, x509)) { > + info("%08lx: duplicate", hash); > + X509_free(x509); > + continue; > + } > + if ((cert =3D calloc(1, sizeof(*cert))) =3D=3D NULL) > + err(1, NULL); > + cert->x509 =3D x509; > + name =3D X509_get_subject_name(x509); > + cert->hash =3D X509_NAME_hash_ex(name, NULL, NULL, NULL); > + cert->name =3D X509_NAME_oneline(name, NULL, 0); > + cert->path =3D xstrdup(unexpand_path(path)); > + if (RB_INSERT(cert_tree, tree, cert) !=3D NULL) > + errx(1, "unexpected duplicate"); > + info("%08lx: %s", cert->hash, strrchr(cert->name, '=3D') + 1); > + no++; > + } > + /* > + * ni is the number of certificates we found in the file. > + * no is the number of certificates that weren't already in our > + * tree or on the exclusion list. > + */ > + if (ni =3D=3D 0) > + warnx("%s: no valid certificates found", path); > + fclose(f); > + return (no); > +} > + > +/* > + * Load all certificates found in the specified path into a tree, > + * optionally excluding those that already exist in a different tree. > + * > + * Returns the number of certificates added to the tree, or -1 on = failure. > + */ > +static int > +read_certs(const char *path, struct cert_tree *tree, struct cert_tree = *exclude) > +{ > + struct stat sb; > + char *paths[] =3D { (char *)(uintptr_t)path, NULL }; > + FTS *fts; > + FTSENT *ent; > + int fts_options =3D FTS_LOGICAL | FTS_NOCHDIR; > + int ret, total =3D 0; > + > + if (stat(path, &sb) !=3D 0) { > + return (-1); > + } else if (!S_ISDIR(sb.st_mode)) { > + errno =3D ENOTDIR; > + return (-1); > + } > + if ((fts =3D fts_open(paths, fts_options, NULL)) =3D=3D NULL) > + err(1, "fts_open()"); > + while ((ent =3D fts_read(fts)) !=3D NULL) { > + if (ent->fts_info !=3D FTS_F) { > + if (ent->fts_info =3D=3D FTS_ERR) > + warnc(ent->fts_errno, "fts_read()"); > + continue; > + } > + info("found %s", ent->fts_path); > + ret =3D read_cert(ent->fts_path, tree, exclude); > + if (ret > 0) > + total +=3D ret; > + } > + fts_close(fts); > + return (total); > +} > + > +/* > + * Save the contents of a cert tree to disk. > + * > + * Returns 0 on success and -1 on failure. > + */ > +static int > +write_certs(const char *dir, struct cert_tree *tree) > +{ > + struct file_tree files =3D RB_INITIALIZER(&files); > + struct cert *cert; > + struct file *file, *tmp; > + struct dirent **dents, **ent; > + char *path, *tmppath =3D NULL; > + FILE *f; > + mode_t mode =3D 0444; > + int cmp, d, fd, ndents, ret =3D 0; > + > + /* > + * Start by generating unambiguous file names for each certificate > + * and storing them in lexicographical order > + */ > + RB_FOREACH(cert, cert_tree, tree) { > + if ((file =3D calloc(1, sizeof(*file))) =3D=3D NULL) > + err(1, NULL); > + file->cert =3D cert; > + for (file->c =3D 0; file->c < INT_MAX; file->c++) > + if (RB_INSERT(file_tree, &files, file) =3D=3D NULL) > + break; > + if (file->c =3D=3D INT_MAX) > + errx(1, "unable to disambiguate %08lx", cert->hash); > + free(cert->path); > + cert->path =3D xasprintf("%08lx.%d", cert->hash, file->c); > + } > + /* > + * Open and scan the directory. > + */ > + if ((d =3D open(dir, O_DIRECTORY | O_RDONLY)) < 0 || > + (ndents =3D fdscandir(d, &dents, NULL, lexisort)) < 0) > + err(1, "%s", dir); > + /* > + * Iterate over the directory listing and the certificate listing > + * in parallel. If the directory listing gets ahead of the > + * certificate listing, we need to write the current certificate > + * and advance the certificate listing. If the certificate > + * listing is ahead of the directory listing, we need to delete > + * the current file and advance the directory listing. If they > + * are neck and neck, we have a match and could in theory compare > + * the two, but in practice it's faster to just replace the > + * current file with the current certificate (and advance both). > + */ > + ent =3D dents; > + file =3D RB_MIN(file_tree, &files); > + for (;;) { > + if (ent < dents + ndents) { > + /* skip directories */ > + if ((*ent)->d_type =3D=3D DT_DIR) { > + free(*ent++); > + continue; > + } > + if (file !=3D NULL) { > + /* compare current dirent to current cert */ > + path =3D file->cert->path; > + cmp =3D strcmp((*ent)->d_name, path); > + } else { > + /* trailing files in directory */ > + path =3D NULL; > + cmp =3D -1; > + } > + } else { > + if (file !=3D NULL) { > + /* trailing certificates */ > + path =3D file->cert->path; > + cmp =3D 1; > + } else { > + /* end of both lists */ > + path =3D NULL; > + break; > + } > + } > + if (cmp < 0) { > + /* a file on disk with no matching certificate */ > + info("removing %s/%s", dir, (*ent)->d_name); > + if (!dryrun) > + (void)unlinkat(d, (*ent)->d_name, 0); > + free(*ent++); > + continue; > + } > + if (cmp =3D=3D 0) { > + /* a file on disk with a matching certificate */ > + info("replacing %s/%s", dir, (*ent)->d_name); > + if (dryrun) { > + fd =3D open(_PATH_DEVNULL, O_WRONLY); > + } else { > + tmppath =3D xasprintf(".%s", path); > + fd =3D openat(d, tmppath, > + O_CREAT | O_WRONLY | O_TRUNC, mode); > + if (!unprivileged && fd >=3D 0) > + (void)fchmod(fd, mode); > + } > + free(*ent++); > + } else { > + /* a certificate with no matching file */ > + info("writing %s/%s", dir, path); > + if (dryrun) { > + fd =3D open(_PATH_DEVNULL, O_WRONLY); > + } else { > + tmppath =3D xasprintf(".%s", path); > + fd =3D openat(d, tmppath, > + O_CREAT | O_WRONLY | O_EXCL, mode); > + } > + } > + /* write the certificate */ > + if (fd < 0 || > + (f =3D fdopen(fd, "w")) =3D=3D NULL || > + !PEM_write_X509(f, file->cert->x509)) { > + if (tmppath !=3D NULL && fd >=3D 0) { > + int serrno =3D errno; > + (void)unlinkat(d, tmppath, 0); > + errno =3D serrno; > + } > + err(1, "%s/%s", dir, tmppath ? tmppath : path); > + } > + /* rename temp file if applicable */ > + if (tmppath !=3D NULL) { > + if (ret =3D=3D 0 && renameat(d, tmppath, d, path) !=3D 0) { > + warn("%s/%s", dir, path); > + ret =3D -1; > + } > + if (ret !=3D 0) > + (void)unlinkat(d, tmppath, 0); > + free(tmppath); > + tmppath =3D NULL; > + } > + /* emit metalog */ > + if (mlf !=3D NULL) { > + fprintf(mlf, "%s/%s type=3Dfile " > + "uname=3D%s gname=3D%s mode=3D%#o size=3D%ld\n", > + unexpand_path(dir), path, > + uname, gname, mode, ftell(f)); > + } > + fclose(f); > + /* advance certificate listing */ > + tmp =3D RB_NEXT(file_tree, &files, file); > + RB_REMOVE(file_tree, &files, file); > + free(file); > + file =3D tmp; > + } > + free(dents); > + close(d); > + return (ret); > +} > + > +/* > + * Save all certs in a tree to a single file (bundle). > + * > + * Returns 0 on success and -1 on failure. > + */ > +static int > +write_bundle(const char *dir, const char *file, struct cert_tree = *tree) > +{ > + struct cert *cert; > + char *tmpfile =3D NULL; > + FILE *f; > + int d, fd, ret =3D 0; > + mode_t mode =3D 0444; > + > + if (dir !=3D NULL) { > + if ((d =3D open(dir, O_DIRECTORY | O_RDONLY)) < 0) > + err(1, "%s", dir); > + } else { > + dir =3D "."; > + d =3D AT_FDCWD; > + } > + info("writing %s/%s", dir, file); > + if (dryrun) { > + fd =3D open(_PATH_DEVNULL, O_WRONLY); > + } else { > + tmpfile =3D xasprintf(".%s", file); > + fd =3D openat(d, tmpfile, O_WRONLY | O_CREAT | O_EXCL, mode); > + } > + if (fd < 0 || (f =3D fdopen(fd, "w")) =3D=3D NULL) { > + if (tmpfile !=3D NULL && fd >=3D 0) { > + int serrno =3D errno; > + (void)unlinkat(d, tmpfile, 0); > + errno =3D serrno; > + } > + err(1, "%s/%s", dir, tmpfile ? tmpfile : file); > + } > + RB_FOREACH(cert, cert_tree, tree) { > + if (!PEM_write_X509(f, cert->x509)) { > + warn("%s/%s", dir, tmpfile ? tmpfile : file); > + ret =3D -1; > + break; > + } > + } > + if (tmpfile !=3D NULL) { > + if (ret =3D=3D 0 && renameat(d, tmpfile, d, file) !=3D 0) { > + warn("%s/%s", dir, file); > + ret =3D -1; > + } > + if (ret !=3D 0) > + (void)unlinkat(d, tmpfile, 0); > + free(tmpfile); > + } > + if (ret =3D=3D 0 && mlf !=3D NULL) { > + fprintf(mlf, > + "%s/%s type=3Dfile uname=3D%s gname=3D%s mode=3D%#o size=3D%ld\n", > + unexpand_path(dir), file, uname, gname, mode, ftell(f)); > + } > + fclose(f); > + if (d !=3D AT_FDCWD) > + close(d); > + return (ret); > +} > + > +/* > + * Load trusted certificates. > + * > + * Returns the number of certificates loaded. > + */ > +static unsigned int > +load_trusted(bool all, struct cert_tree *exclude) > +{ > + unsigned int i, n; > + int ret; > + > + /* load external trusted certs */ > + for (i =3D n =3D 0; all && trusted_paths[i] !=3D NULL; i++) { > + ret =3D read_certs(trusted_paths[i], &trusted, exclude); > + if (ret > 0) > + n +=3D ret; > + } > + > + /* load installed trusted certs */ > + ret =3D read_certs(trusted_dest, &trusted, exclude); > + if (ret > 0) > + n +=3D ret; > + > + info("%d trusted certificates found", n); > + return (n); > +} > + > +/* > + * Load untrusted certificates. > + * > + * Returns the number of certificates loaded. > + */ > +static unsigned int > +load_untrusted(bool all) > +{ > + char *path; > + unsigned int i, n; > + int ret; > + > + /* load external untrusted certs */ > + for (i =3D n =3D 0; all && untrusted_paths[i] !=3D NULL; i++) { > + ret =3D read_certs(untrusted_paths[i], &untrusted, NULL); > + if (ret > 0) > + n +=3D ret; > + } > + > + /* load installed untrusted certs */ > + ret =3D read_certs(untrusted_dest, &untrusted, NULL); > + if (ret > 0) > + n +=3D ret; > + > + /* load legacy untrusted certs */ > + path =3D expand_path(LEGACY_PATH); > + ret =3D read_certs(path, &untrusted, NULL); > + if (ret > 0) { > + warnx("certificates found in legacy directory %s", > + path); > + n +=3D ret; > + } else if (ret =3D=3D 0) { > + warnx("legacy directory %s can safely be deleted", > + path); > + } > + free(path); > + > + info("%d untrusted certificates found", n); > + return (n); > +} > + > +/* > + * Save trusted certificates. > + * > + * Returns 0 on success and -1 on failure. > + */ > +static int > +save_trusted(void) > +{ > + int ret; > + > + /* save untrusted certs */ > + ret =3D write_certs(trusted_dest, &trusted); > + return (ret); > +} > + > +/* > + * Save untrusted certificates. > + * > + * Returns 0 on success and -1 on failure. > + */ > +static int > +save_untrusted(void) > +{ > + int ret; > + > + ret =3D write_certs(untrusted_dest, &untrusted); > + return (ret); > +} > + > +/* > + * Save certificate bundle. > + * > + * Returns 0 on success and -1 on failure. > + */ > +static int > +save_bundle(void) > +{ > + char *dir, *file, *sep; > + int ret; > + > + if ((sep =3D strrchr(bundle_dest, '/')) =3D=3D NULL) { > + dir =3D NULL; > + file =3D bundle_dest; > + } else { > + dir =3D xasprintf("%.*s", (int)(sep - bundle_dest), bundle_dest); > + file =3D sep + 1; > + } > + ret =3D write_bundle(dir, file, &trusted); > + free(dir); > + return (ret); > +} > + > +/* > *** 1032 LINES SKIPPED *** From nobody Thu Aug 14 00:28:26 2025 X-Original-To: dev-commits-src-main@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 4c2R166MrBz64lMJ; Thu, 14 Aug 2025 00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2R165pYHz3q0k; Thu, 14 Aug 2025 00: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=1755131306; 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=Z+kaFKZCvvx27cSwPgadIceVeL3l5txwBmbBty2/pH0=; b=ADaXNsodw7XyPJsfx1rFNTuc0Foz1r3z0Kyu9rix2R+QZM55uoiEdbKrQWhIEqOEqbO1iJ GqG2OLkGehJ4EJHLXopnGwM63F1xZfn2e9mNgLZDctKTnq8ylSUFaOUyglc7LvBA+CrekL Dr58i2XlVaV3eIo1Swebay1eRITafeWSn/DST8wOdi4Nb8sindNcSiN94tAtLpsrHzuTE5 9YCIrVacA9BWbgCPqDs6VeDJinnrOm+3YiYuPMp6E7uQ1E7wX3/iahRA0v6bCfS/a8P3nt f5tQP6Rs2XACyvQU73u4LJnuqb2r0gkjFc4Qhn0oWuPy7mm5qbxTl55IVHbK7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755131306; 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=Z+kaFKZCvvx27cSwPgadIceVeL3l5txwBmbBty2/pH0=; b=T5wy/UX/57v/M8jNRkx4L0vKEfc+++w53WGbY1mfz8I0NfN0Xs2K1ly+Rh6cAc2o8AjX2w 6E0GdeW2esRX3gcnhJTNfOvHUmrJ1hEJ1l+LyDZgoOLc960kHsTRnuazUw99b7H1iKcwua Xz+ix1duPCASBbAGXAyCn7wcQTPAlVZD9u6uzAWAOFGivOpiOATQ8IrAYYJhLLD4eYDqFo qqJk6UPWDTC9LvGQhu58QonMURuGY1MTE7mSJj06+SCznzEk8jVNOMg065LJs45Zkf5nqu L/EQTlpeZSuELzNyGKXfrMkkaq2SSFPZGi3yfL+qRTrFK6DQawPC63lVMg3BIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755131306; a=rsa-sha256; cv=none; b=gVOIhxfRUfaMMp1CkuFhPHVvgxLFFjgG1dtfRErhieg/2rsAC+gbQpi7wQyYPT28xoye/p 4nSt2/6wTRTlsUJAO73BJhbVBAZSJ9pfMc+sA7GlHH7nH6gYZNiENBYRLz1wKSZsrsErNz FJfyzuF66xWPtTUp/4SiAyHX9KOk6kEmNYnyAjY7kHlxaNPtRxGiMVdFTzyN2kiLk4PeVv Q3PUtO5R9nN8z2Uic1f8VbUP4K1CWCXD53p85EushbLPOLvAI20rLFh7sqq2GR4up+udsE jAS8ImTJZONRHvWK+S4yQiLfWAY38MDUjVO7FnkJnqbkNNafiZGIv6F+DTxgbQ== 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 4c2R165MC1zTpS; Thu, 14 Aug 2025 00: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 57E0SQFx009121; Thu, 14 Aug 2025 00: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 57E0SQP0009118; Thu, 14 Aug 2025 00:28:26 GMT (envelope-from git) Date: Thu, 14 Aug 2025 00:28:26 GMT Message-Id: <202508140028.57E0SQP0009118@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: f75175725915 - main - etc: add missing mtree entry for certctl tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: f751757259158a8d3b81d4fb7576b3ebe226dece Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=f751757259158a8d3b81d4fb7576b3ebe226dece commit f751757259158a8d3b81d4fb7576b3ebe226dece Author: Kyle Evans AuthorDate: 2025-08-14 00:24:16 +0000 Commit: Kyle Evans CommitDate: 2025-08-14 00:27:30 +0000 etc: add missing mtree entry for certctl tests Otherwise we'll fail to create the appropriate hierarchy and blow up when we go to actually install the test. Reported by: np Fixes: 81d8827ad875 ("certctl: Reimplement in C") --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 2c25d9386032..e6a013f010de 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1255,6 +1255,8 @@ .. .. usr.sbin + certctl + .. chown .. ctladm From nobody Thu Aug 14 01:47:29 2025 X-Original-To: dev-commits-src-main@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 4c2SmK6fx1z64rrc; Thu, 14 Aug 2025 01:47: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2SmK60pKz42wt; Thu, 14 Aug 2025 01:47:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755136049; 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=lVAIdSSIKwEHkdcgakTep3Dz8HLUiiLqBr5FZO/xATQ=; b=yCWY0AbqkTPv4wOJXF4F5dZSIJWtBNMA5ENv3X348HbhjlKceU553E+0CehmSLCE1L/N/K dRC7tL26ECTK9SpdgJNHCqFryxd6kP8gaLySxDeM5DsvAM3AAaEFdFk1Y1ReIshjNlRPiB 7WR+GbwHL4ue78Q1iFhvE389D61dBjH+tWcaaj+L2J4PSwMe0ml5rnunOhaNeOwbriGIQh vZ9TMlhpO8kouyvbkwRNL7EO1X473+jpYWSlhp5H8Yy6/XSSZmoehQUG9UCf7EGgcuKfba Yu8kr3tXwHCI4MWDnIMdXYkrTg2FNyUV8grwB7R7aeB+Bul0hax0OsqI/peglg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755136049; 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=lVAIdSSIKwEHkdcgakTep3Dz8HLUiiLqBr5FZO/xATQ=; b=kaYBFb3a90YgV1zwt9CF/joq3WavegSLBsNm/z6imlEBSWVOIx1JbFBPSfsJajb7FAj0Ws 7lfSWZNYzf5NOwsBUjChBQTWO8pzaxE9id+aJm+Vtz7FvS3llEq6BV8LZcZ92X0MKFJ27M 3j0IjhTKWj/ArN95Z2OL/Ptme3AtNKJcW6YI78BbsP5cVR9DbBgX5giOsTAhvYjCiFcXEH EqD+urcwZmx/R4Rwy1DYgPALk1SEkrawMnrsJD19A/6wzxpfCzAmJAEC9uMw/vkNBJTc9P jhH9/9AaZ9dOQdxyspMSz8uQLEWD4d7PJN42Er3vVZ07senN+UpLKjg42MVtrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755136049; a=rsa-sha256; cv=none; b=MOAkkGeLbXJ5EeSflTR2Vo3yIblPITn/EQxpXygHd7hdAjjVVSZEU0DOW+OO9X+jkDp8K6 SqQeUJpB/1Eu/1yf+8xqJtIav8PB5btqfLhzKYlmLI+88KakE6w1JUIyQ0S5+gG1y8On3j AU5wAXpLhBTe8ROWBDO6x77+KY6KlOLHlqDHyf62q8bMwz78WSbAsb84svRKTCr2qZ27DB eDKOYKCVPJXyVz9xWUW9Alr7qUUENoUShf+Ber3dOh/lbbc9AUeS71t9Z9zPXNbGrHashY pyn5Yw+bsYLV6qVcGpg5MXy51JZ8Dt1Utb2SV4J+C7PEyew5tmuaG+K67HJhkw== 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 4c2SmK5bv2zYpY; Thu, 14 Aug 2025 01:47: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 57E1lTYL058824; Thu, 14 Aug 2025 01:47:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57E1lTVj058821; Thu, 14 Aug 2025 01:47:29 GMT (envelope-from git) Date: Thu, 14 Aug 2025 01:47:29 GMT Message-Id: <202508140147.57E1lTVj058821@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric van Gyzen Subject: git: 5c5bb958fc82 - main - mlx5: plug theoretical leak in vxlan rules List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c5bb958fc823215cfb5a71c1ac7b6d9d93c0701 Auto-Submitted: auto-generated The branch main has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=5c5bb958fc823215cfb5a71c1ac7b6d9d93c0701 commit 5c5bb958fc823215cfb5a71c1ac7b6d9d93c0701 Author: Eric van Gyzen AuthorDate: 2025-08-12 14:51:38 +0000 Commit: Eric van Gyzen CommitDate: 2025-08-14 01:47:14 +0000 mlx5: plug theoretical leak in vxlan rules Plug a theoretical memory/refcount leak when adding a vxlan rule. This is not currently an actual leak, but it could become one. PR: 287945 Reviewed by: kib Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D51883 --- sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c index 6e24395b5577..c45f02cdaf42 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c @@ -1783,8 +1783,8 @@ mlx5e_add_vxlan_rule(struct mlx5e_priv *priv, sa_family_t family, u_int port) el->refcount++; if (el->installed) return (0); - } - el = mlx5e_vxlan_alloc_db_el(priv, proto, port); + } else + el = mlx5e_vxlan_alloc_db_el(priv, proto, port); if ((if_getcapenable(priv->ifp) & IFCAP_VXLAN_HWCSUM) != 0) { err = mlx5e_add_vxlan_rule_from_db(priv, el); From nobody Thu Aug 14 06:55:33 2025 X-Original-To: dev-commits-src-main@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 4c2bbn64MXz65Br1; Thu, 14 Aug 2025 06:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2bbn5C1gz3XN7; Thu, 14 Aug 2025 06:55:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755154533; 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=YiSRO0/1mltCy/DNgBoOfzRqVxtzWafSCfqWpnrJ1as=; b=sBGm5Rops9zBrIlCAPpOTnGzRIflxKYjeGHlm9jB4CfMMfCqdH/4yBZ2cmZdK246J+Wyet eDR2KjIhR9hTmoGIRX1aa/X68raQE/TXV66wdQOkZ0rPx02nGZ0VpX8fMwaTkivm02yt99 6hAd9q+P5dBYoQZn7yKhnZ2B2y1wd7xMl/2kKnnl5mzUkEAq7QtjaxpOhbeN+J2Yicmhg+ NJVMRY3Ti9t+qjhAlx3ZYofeFKEKFdWMlm1mShdLsFOA5eK37p8hWLCWOALgnsTkXyZCQi h3qyXyFWA9melS+wcRMqtthnhoFipAsUt9eXn7DZRCVd59LBWtOAB1y2+MAbIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755154533; 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=YiSRO0/1mltCy/DNgBoOfzRqVxtzWafSCfqWpnrJ1as=; b=O5lAfLuFyTC+p+9fIyjfO5rbRTjWSQkGtapkvi6DaC5qBV/GHPapEsCb5wTvpDwFZDeGml rm6Wfr2gfdK11UbaHxUZbc710uSjzVvanJfRCGmY1iAyYTX3JsPCUw7wfoaXzW5UFysUgD ZKhubsFHpNYdOldDN660p1E2LBzofWo+saZJiKDZOz0FktEkILOF0sj6+bdSPjUC9bDIcJ Jiau+QhFRG/v6fEfGhBAHsjk9qItyt5is6OhNZHSXwa1x5kqeevQCNw7zaH6MESHcpX6vl bLvAtTCeAeGhnKUaBNo6R4f15vByxSRzlfEEjF5iNJGUhFStWIGBtkjLLJmlSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755154533; a=rsa-sha256; cv=none; b=o7FG40JWEFYSb15nm1c+1zwL8UrEgy06GBSbGD6AHBFvQt/J96uWhIyiSXTqLh3Qv/dK7n qN9JNhfjd134xWvMhBrS1xA8/QRYHtlN7jke4HLfNyGNOD9YwUswS4rdlFybolwajxqL6g SzGKKIAbMZLMoHFDHCdres1+CEu+0rRJX8njTfsjxuCA04ZSpz3tbovs3OnaqzITUuPOgN 4AUl0yt6XIHiZpAyXPVdav1aIQdl+AeccIiT5Bzsd8cFNZOESHBtd32nz9oZK7v9blHEju eDDl6/0Y2FORtoFhpFzKT6xjT/5BqHyfCIHFrYcT8X4P3UwhFIyrOLri2g/ZMA== 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 4c2bbn2bFvzk7C; Thu, 14 Aug 2025 06:55:33 +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 57E6tXBb043723; Thu, 14 Aug 2025 06:55:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57E6tXc4043720; Thu, 14 Aug 2025 06:55:33 GMT (envelope-from git) Date: Thu, 14 Aug 2025 06:55:33 GMT Message-Id: <202508140655.57E6tXc4043720@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Sergio Carlavilla Delgado Subject: git: e9bcf7cb96de - main - Modifications to committers-src.dot: hselasky and karels List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: carlavilla X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e9bcf7cb96de83a7c92a1c970bd6a296fce3fe13 Auto-Submitted: auto-generated The branch main has been updated by carlavilla: URL: https://cgit.FreeBSD.org/src/commit/?id=e9bcf7cb96de83a7c92a1c970bd6a296fce3fe13 commit e9bcf7cb96de83a7c92a1c970bd6a296fce3fe13 Author: Jim Brown AuthorDate: 2025-08-14 06:54:20 +0000 Commit: Sergio Carlavilla Delgado CommitDate: 2025-08-14 06:54:20 +0000 Modifications to committers-src.dot: hselasky and karels Approved by: imp@, cperciva@ Differential Revision: D49456 --- share/misc/committers-src.dot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index 0f9f8242c5c2..73d142b875f2 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -51,6 +51,7 @@ eik [label="Oliver Eikemeier\neik@FreeBSD.org\n2004/05/20\n2008/11/10"] furuta [label="Atsushi Furuta\nfuruta@FreeBSD.org\n2000/06/21\n2003/03/08"] gj [label="Gary L. Jennejohn\ngj@FreeBSD.org\n1994/??/??\n2006/04/28"] groudier [label="Gerard Roudier\ngroudier@FreeBSD.org\n1999/12/30\n2006/04/06"] +hselasky [label="Hans Petter Selasky\nhselasky@FreeBSD.org\n2023/06/23"] jake [label="Jake Burkholder\njake@FreeBSD.org\n2000/05/16\n2008/11/10"] jayanth [label="Jayanth Vijayaraghavan\njayanth@FreeBSD.org\n2000/05/08\n2008/11/10"] jb [label="John Birrell\njb@FreeBSD.org\n1997/03/27\n2009/12/15"] @@ -60,6 +61,7 @@ jkh [label="Jordan K. Hubbard\njkh@FreeBSD.org\n1993/06/12\n2008/06/13"] jlemon [label="Jonathan Lemon\njlemon@FreeBSD.org\n1997/08/14\n2008/11/10"] joe [label="Josef Karthauser\njoe@FreeBSD.org\n1999/10/22\n2008/08/10"] jtc [label="J.T. Conklin\njtc@FreeBSD.org\n1993/06/12\n????/??/??"] +karels [label="Mike Karels\nkarels@FreeBSD.org\n2016/06/09\n2024/06/02"] kargl [label="Steven G. Kargl\nkargl@FreeBSD.org\n2011/01/17\n2015/06/28"] kbyanc [label="Kelly Yancey\nkbyanc@FreeBSD.org\n2000/07/11\n2006/07/25"] keichii [label="Michael Wu\nkeichii@FreeBSD.org\n2001/03/07\n2006/04/28"] @@ -203,7 +205,6 @@ gshapiro [label="Gregory Shapiro\ngshapiro@FreeBSD.org\n2000/07/12"] harti [label="Hartmut Brandt\nharti@FreeBSD.org\n2003/01/29"] hiren [label="Hiren Panchasara\nhiren@FreeBSD.org\n2013/04/12"] hmp [label="Hiten Pandya\nhmp@FreeBSD.org\n2004/03/23"] -hselasky [label="Hans Petter Selasky\nhselasky@FreeBSD.org\n"] ian [label="Ian Lepore\nian@FreeBSD.org\n2013/01/07"] iedowse [label="Ian Dowse\niedowse@FreeBSD.org\n2000/12/01"] igoro [label="Igor Ostapenko\nigoro@FreeBSD.org\n2024/08/22"] @@ -245,7 +246,6 @@ jwd [label="John De Boskey\njwd@FreeBSD.org\n2000/05/19"] kaiw [label="Kai Wang\nkaiw@FreeBSD.org\n2007/09/26"] kaktus [label="Pawel Biernacki\nkaktus@FreeBSD.org\n2019/09/26"] kan [label="Alexander Kabaev\nkan@FreeBSD.org\n2002/07/21"] -karels [label="Mike Karels\nkarels@FreeBSD.org\n2016/06/09"] kbowling [label="Kevin Bowling\nkbowling@FreeBSD.org\n2024/10/15"] kd [label="Kornel Dulęba\nkd@FreeBSD.org\n2022/06/22"] ken [label="Ken Merry\nken@FreeBSD.org\n1998/09/08"] From nobody Thu Aug 14 09:59:52 2025 X-Original-To: dev-commits-src-main@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 4c2ghX38rmz64BW9; Thu, 14 Aug 2025 09:59:56 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2ghX23Fhz3rCl; Thu, 14 Aug 2025 09:59:56 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755165596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q0eS2NMyeVXIlWeAaMSv6kcJjEZeDKldpJGzxm9JlZ4=; b=HRWO7Lq1i4ZlaYlFH52FVjL2F3hoIRyGXVvwy+T/CTI/1ThATnbPH5ftBzQYL6NY3ghINX /qFaIPdolzpsHXz5AQUOhOpWQ0NLmNE7MYiqvvJ/EjOPKweZrYK8MxnTJ7dUfXw79VNfyU fpPS8vjwlddzBh+5zz1lxvjfsKjp34RkctCziISu8Om5loznfyfYlMWlfpoCNQOP6ZIOSx JSqRGZcXzdxT3LGOWkcpgpwBaN5fiLHw6by/iE4P8CZbQVMwV7hOHN6trYfxfci4yXiWSv k+Wjp3T82I4/TB3KClcNZQPrUVpseT87m1UkPhMmP8xAOD3q+GV8v7ZL3T1Ebg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755165596; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q0eS2NMyeVXIlWeAaMSv6kcJjEZeDKldpJGzxm9JlZ4=; b=g90eIt6KJMbIWKvFGF35621hffrrfzowqKCXOctivrJt1lt4aH4kkigdNm+9RKxI7Qq+pl 5UKPgYyp0GhPNsUA2XFHzOwboVpq4W7rn1dwgDcloeXL4I9CK72mBC1zMNh8TYOTioKSV9 3jD926sDhjcKY/5YBF6nHHUqvdyJ6AXhSU/U6ibInZasoW6V3T2nyGOx4EcbpqE4BdBBqH VlSHyDihafeKI70KPrqVHU5fJACU3HNzCr5Ww3K1hjrdq47o2aLySekuBCuoBAZdjV7R6a vx/sLsml6H1F8Mctcy07vzSjoqi2Rzo+DZJHHIcvvKpT+sdQZZ405Oz9/Ot9QQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755165596; a=rsa-sha256; cv=none; b=T6UE38w7hR4jURapqYp44BMuNhg0wcCXZ7/jCspJzH9h+Y6rkvZpoxL541LxdCN55PVpUj Aa1H9r7W+PrsuqXEtZ1eI9UGlFl9tL4UlwP3V6tH8fUa+zhStWAtLrny1aoHO2cbzpzjj6 N2wAaCnIt9g28yGvWi6BK/hNn89p7a+lr1IMxWjnBve6pAZlv04J61Vr6GTRwx89JmT1+S hBN+CN0b0v8GqPbJrczdJDU5SGLZ3AIZMJIE9mbimt5vIoExuyJ9e1twMBiz7MbqI58hiq ql1AXH3QEnNxtWVECSZldPaV77Yb5q+EHhMcna6U1shvR7f82P97BXSGHo65/w== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (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 (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R11" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4c2ghW6vxSzBNK; Thu, 14 Aug 2025 09:59:55 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 31DE6467D7; Thu, 14 Aug 2025 11:59:53 +0200 (CEST) From: Kristof Provost To: =?utf-8?q?Dag-Erling_Sm=C3=B8rgrav?= Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 81d8827ad875 - main - certctl: Reimplement in C Date: Thu, 14 Aug 2025 11:59:52 +0200 X-Mailer: MailMate (2.0r6272) Message-ID: <5331736E-B67F-4B3C-A04A-54E7A5F88B07@FreeBSD.org> In-Reply-To: <202508132225.57DMPlLZ083341@gitrepo.freebsd.org> References: <202508132225.57DMPlLZ083341@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_E13A9DC5-543A-4DAC-AEC3-456857F598E0_=" --=_MailMate_E13A9DC5-543A-4DAC-AEC3-456857F598E0_= Content-Type: text/plain; charset=UTF-8; format=flowed; markup=markdown Content-Transfer-Encoding: quoted-printable On 14 Aug 2025, at 0:25, Dag-Erling Sm=C3=B8rgrav wrote: > The branch main has been updated by des: > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3D81d8827ad8752e35411204541f1f0= 9df1481e417 > > commit 81d8827ad8752e35411204541f1f09df1481e417 > Author: Dag-Erling Sm=C3=B8rgrav > AuthorDate: 2025-08-13 22:25:27 +0000 > Commit: Dag-Erling Sm=C3=B8rgrav > CommitDate: 2025-08-13 22:25:27 +0000 > > certctl: Reimplement in C > > Notable changes include: > > * We no longer forget manually untrusted certificates when = > rehashing. > > * Rehash will now scan the existing directory and progressively = > replace > its contents with those of the new trust store. The trust store = > as a > whole is not replaced atomically, but each file within it is. > > * We no longer attempt to link to the original files, but we don't = > copy > them either. Instead, we write each certificate out in its = > minimal > form. > > * We now generate a trust bundle in addition to the hashed = > diretory. > This also contains only the minimal DER form of each = > certificate. > > * The C version is approximately two orders of magnitude faster = > than the > sh version, with rehash taking ~100 ms vs ~5-25 s depending on = > whether > ca_root_nss is installed. > > * The DISTBASE concept has been dropped; the same effect can be = > achieved > by adjusting DESTDIR. > > * We now also have rudimentary tests. > > Reviewed by: kevans > Differential Revision: https://reviews.freebsd.org/D42320 I=E2=80=99m seeing errors like this during bricoler test runs now: > /usr/home/kp/bricoler/freebsd-src-regression-suite-vm-image/image.amd64= =2Eamd64-METALOG.mtree:38358: = > error: word too long to fit buffer (max 10 characters) Those are all lines with absolute paths (e.g. /etc/ssl/cert.pem rather = than ./etc/ssl/cert.pem). This hack seems to fix things for me, but I=E2=80=99m nowhere near famili= ar = enough with the relevant build bits to say for sure if that=E2=80=99s rig= ht or = not: diff --git a/usr.sbin/certctl/certctl.c b/usr.sbin/certctl/certctl.c index 365870167aeb..336a49830a3d 100644 --- a/usr.sbin/certctl/certctl.c +++ b/usr.sbin/certctl/certctl.c @@ -490,7 +490,7 @@ write_certs(const char *dir, struct cert_tree = *tree) } /* emit metalog */ if (mlf !=3D NULL) { - fprintf(mlf, "%s/%s type=3Dfile " + fprintf(mlf, "./%s/%s type=3Dfile " "uname=3D%s gname=3D%s mode=3D%#o size=3D%ld= \n", unexpand_path(dir), path, uname, gname, mode, ftell(f)); @@ -561,7 +561,7 @@ write_bundle(const char *dir, const char *file, = struct cert_tree *tree) } if (ret =3D=3D 0 && mlf !=3D NULL) { fprintf(mlf, - "%s/%s type=3Dfile uname=3D%s gname=3D%s mode=3D%#o = size=3D%ld\n", + "./%s/%s type=3Dfile uname=3D%s gname=3D%s mode=3D%#= o = size=3D%ld\n", unexpand_path(dir), file, uname, gname, mode, = ftell(f)); } fclose(f); =E2=80=94 Kristof --=_MailMate_E13A9DC5-543A-4DAC-AEC3-456857F598E0_= Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On 14 Aug 2025, at 0:25, Dag-Erling Sm=C3=B8rgrav wrote:<= /p>

The branch main has been updated by des:

URL: https://cgit.FreeBSD.org/src/co= mmit/?id=3D81d8827ad8752e35411204541f1f09df1481e417

commit 81d8827ad8752e35411204541f1f09df1481e417
Author: Dag-Erling Sm=C3=B8rgrav d= es@FreeBSD.org
AuthorDate: 2025-08-13 22:25:27 +0000
Commit: Dag-Erling Sm=C3=B8rgrav d= es@FreeBSD.org
CommitDate: 2025-08-13 22:25:27 +0000

ce=
rtctl: Reimplement in C

Notable changes include:

* We no longer forget manually untrusted certificates when rehashing.

* Rehash will now scan the existing directory and progressively replace
  its contents with those of the new trust store.  The trust store as a
  whole is not replaced atomically, but each file within it is.

* We no longer attempt to link to the original files, but we don't copy
  them either.  Instead, we write each certificate out in its minimal
  form.

* We now generate a trust bundle in addition to the hashed diretory.
  This also contains only the minimal DER form of each certificate.

* The C version is approximately two orders of magnitude faster than the
  sh version, with rehash taking ~100 ms vs ~5-25 s depending on whether
  ca_root_nss is installed.

* The DISTBASE concept has been dropped; the same effect can be achieved
  by adjusting DESTDIR.

* We now also have rudimentary tests.

Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D42320

I=E2=80=99m seeing errors like this during bricoler test = runs now:

/usr/home/kp/bricoler/freebsd-src-regression-suite-vm-ima= ge/image.amd64.amd64-METALOG.mtree:38358: error: word too long to fit buf= fer (max 10 characters)

Those are all lines with absolute paths (e.g. /etc/ssl/ce= rt.pem rather than ./etc/ssl/cert.pem).
This hack seems to fix things for me, but I=E2=80=99m nowhere near famili= ar enough with the relevant build bits to say for sure if that=E2=80=99s = right or not:

di=
ff --git a/usr.sbin/certctl/certctl.c b/usr.sbin/certctl/certctl.c
index 365870167aeb..336a49830a3d 100644
--- a/usr.sbin/certctl/certctl.c
+++ b/usr.sbin/certctl/certctl.c
@@ -490,7 +490,7 @@ write_certs(const char *dir, struct cert_tree *tree)
                }
                /* emit metalog */
                if (mlf !=3D NULL) {
-                       fprintf(mlf, "%s/%s type=3Dfile "
+                       fprintf(mlf, "./%s/%s type=3Dfile "
                            "uname=3D%s gname=3D%s mode=3D%#o size=3D=
%ld\n",
                            unexpand_path(dir), path,
                            uname, gname, mode, ftell(f));
@@ -561,7 +561,7 @@ write_bundle(const char *dir, const char *file, struc=
t cert_tree *tree)
        }
        if (ret =3D=3D 0 && mlf !=3D NULL) {
                fprintf(mlf,
-                   "%s/%s type=3Dfile uname=3D%s gname=3D%s mode=3D=
%#o size=3D%ld\n",
+                   "./%s/%s type=3Dfile uname=3D%s gname=3D%s mode=3D=
%#o size=3D%ld\n",
                    unexpand_path(dir), file, uname, gname, mode, ftell(f=
));
        }
        fclose(f);

=E2=80=94
Kristof

--=_MailMate_E13A9DC5-543A-4DAC-AEC3-456857F598E0_=-- From nobody Thu Aug 14 14:47:16 2025 X-Original-To: dev-commits-src-main@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 4c2p4603PJz64Z23; Thu, 14 Aug 2025 14:47:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2p456SByz4P7t; Thu, 14 Aug 2025 14:47:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755182837; 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: in-reply-to:in-reply-to:references:references; bh=OayIB82Q1RX9nNAQwxejXTP6CU+cc6DDQsEvNCxGdYY=; b=drEeJ9ZJ0J76+OX1bQ2NhxUoIaLYh16GI5ajoX5oKu3Qit35FW/DxSfM1V92TvLvzkEaSV ezI3gVTCi3sCeKB/3vxcSosQayFltbtgRiY2wAo3IOtGf9G2NZWvof6MEzMQWVpyz4NAIC c/jlMVlGP1Wtoy12RmT0N5PR9utDMfN9u1s8kHUIv9KhfZbHulhZQj52Gxig1DLQp/t727 Wg8I9Cj+D3W7dB4RziM62oL8EZDqyWf9aYO5qX7xBRsKeWzOlDvgSwUuTQo+9AVR1yU3XC +jXhIyJew7Cx0pNEdiuUt7+z+FlnrJirKTw/BoON29/A6rMPVgSfUHEgEdbfTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755182837; 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: in-reply-to:in-reply-to:references:references; bh=OayIB82Q1RX9nNAQwxejXTP6CU+cc6DDQsEvNCxGdYY=; b=beHZeTTe+7Hd/b/EP+/MlgvM8udcWMFOEPK0KpPvwemnpYkqh3laCzLQVa2GaCJRYv+tqm dmSjQy34EGfkxIlSXuoRGRBkIz6weLM2qZn6z6HGlMhyDb38OtTWVU9ABtdDvN8UzjX6yG BgxaDV2gXF1wRCOq0A6MrTqQ4WMZlgNJGSCMNFe6ZUHceR9pslcb65pdDCLyi+0vgq5cGx LBXZxpxap11FXAp2ZqqCOMQULIs5klnWzcXoxux+iPWxObdmOQtc3HWs/+Cg0W6O7j8PT6 Cq5bCZBcXDSkTfSzHZvYqzM8Vc2lVVrNbN21Uq+05j1fwtCIgtVqdm+D7MVlEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755182837; a=rsa-sha256; cv=none; b=iSt37+Vrmxa2VCe1+X14pawmdvfQhkNFO4eWw12kXCRLTXqhzoXRki9AlECt0E0qkUkIdY b/uHnKJaBMz90j30dbRcFL2RJEYpYL31xh4E0XLXos+irGbqWM8Is2O7Rgd93WnSWk1UNL S1u1TYNhqt2JuiEQIJTQs1enyJQPjJtVN80oX53gMLfCmiPnc6iVToy2u55ATe95NGStD2 yE9OmffphlXVZWqs4d8mWfn83Q4GsWq0L1QsAN0y81huIcN7rXEzII+bLIE08PpDEpAP03 0K0I1MfTtisywT9BNWjpwN6TpqjOXtUJCcuJOFcM5E03GHTjRZ42OkmdHdtcQQ== Received: from [IPV6:2601:5c0:4202:5670:4f6:bb2a:27c9:4ef1] (unknown [IPv6:2601:5c0:4202:5670:4f6:bb2a:27c9:4ef1]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4c2p454VR4zHPc; Thu, 14 Aug 2025 14:47:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <0c11f981-73c9-4d44-b612-a75e93861057@FreeBSD.org> Date: Thu, 14 Aug 2025 10:47:16 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 9f4eb7679648 - main - man/man7: drop i386 from simd(7) Content-Language: en-US To: Robert Clausecker , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202508092014.579KECVR086230@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202508092014.579KECVR086230@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/9/25 16:14, Robert Clausecker wrote: > The branch main has been updated by fuz: > > URL: https://cgit.FreeBSD.org/src/commit/?id=9f4eb767964832efee583d966dd41212725e5413 > > commit 9f4eb767964832efee583d966dd41212725e5413 > Author: Robert Clausecker > AuthorDate: 2025-07-29 20:16:05 +0000 > Commit: Robert Clausecker > CommitDate: 2025-08-09 20:13:28 +0000 > > man/man7: drop i386 from simd(7) > > MFC: no Note that i386 libc will still live on for the foreseeable future due to lib32, so I'm not sure this is worth dropping? I kept most of the i386 entries in arch.7 for that reason. -- John Baldwin From nobody Thu Aug 14 16:04:53 2025 X-Original-To: dev-commits-src-main@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 4c2qnf5t9cz64g0F; Thu, 14 Aug 2025 16:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2qnf0GFjz3Nfl; Thu, 14 Aug 2025 16:04:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755187494; 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=c0QhZzID3q8hhAibKqwQ82dmILj/3lwwgdynXker4Rw=; b=V1nnPQiAwlrYdNW5AbOOJiLQEOv//h7pwo4y8PCfk5Qyi3Q49pPcS2kZfqsZFkmnXAHRyI W9zDEdH9Oo8Bi8VbaAV29RRf0mVytFXJgxikKqxRvHE3QztYddKkndR7E0E+wPcsvFZLJt HoSktr7L147aQPBKg7wyYbFNHTrXVo+PEx7wS6QArXZU/vLouLwjcTBsyAeR/xICAnPPVj dqQELX3RrTgcVKmn7+LGsCGeEHk7b+WdXEgFvvlmIvvGMKy8LWOKEnYN7FWmGP2VDDhPvg QMoLgnloNj1xRu2io5x5QMo9iujqu5ETVjS6g0wt3y4UlorUL+0o9oOC9AjECg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755187494; 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=c0QhZzID3q8hhAibKqwQ82dmILj/3lwwgdynXker4Rw=; b=vYyIRlff52l+UZ9MoD0FFlH00L37jLcZq2S7zpJ2pYfR4UAJR6saQABTTm/ZUQ68PbHQMF FZrZ8FEsb3gxu3y4SSCXHGKY2E7kobuK47gWWI3O1LjaOetJJ8n7U6SNqQ8hPtsxSCGaV8 RTgKeHNb38SVpaGcZXV1xNI299PthYq7ORY8hP8oiTL3Kga29jOmoA2NFU1qb4nTlX8CA1 jHwdLIAjO3FJJnmlVEnUFapnmpFIllLf/+pUEk4VjopfkSKW0P1aU5ePe+SlaifQzCLPny Gz7AcVC3cVjcTVRKUfLg9m7yFPvWXPIrZum/N251UvBkSemP5nuludCeRW/w1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755187494; a=rsa-sha256; cv=none; b=GDh4j5YaaCG0BBm4klCHw+xdPSKpFp3RfdzzA7TKy7m3Ku6MooyDvgkzA2hlV5S3rrjSCY IVapJrKKqUDAEawoSUJ0NzGmoC+78t5OHXjA1xiYzIsHlGqXsr1+PDsh5zq1xZMXy5LLmO 3MsAsk+XwoxzddMdgEuqJWR02rSZPXRJ8C2eXfot+6d1Jfc7lFTg9/LuEbD1jAWe+aWwwG oLSpNxYI656hLnbr+cMmq81UAmlFsA7Dh1oyuI3W6nI2ajccko39ruIgFakwgX/rE9QTZ7 IRPFwhZqO2K/JmtxhWiszVRHeLaXnl6Fmy2ifqw1Dw7KWDMW6IoD1CSr/m50Nw== 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 4c2qnd6z0hz10XS; Thu, 14 Aug 2025 16:04: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 57EG4rEf081032; Thu, 14 Aug 2025 16:04:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57EG4rKN081029; Thu, 14 Aug 2025 16:04:53 GMT (envelope-from git) Date: Thu, 14 Aug 2025 16:04:53 GMT Message-Id: <202508141604.57EG4rKN081029@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: e5a2e7735244 - main - inotify: Fix a namei path buffer leak List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: e5a2e77352440f23ef8988a934753fd2fba8b821 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e5a2e77352440f23ef8988a934753fd2fba8b821 commit e5a2e77352440f23ef8988a934753fd2fba8b821 Author: Mark Johnston AuthorDate: 2025-08-14 16:03:00 +0000 Commit: Mark Johnston CommitDate: 2025-08-14 16:03:00 +0000 inotify: Fix a namei path buffer leak Reviewed by: kib Fixes: f1f230439fa4 ("vfs: Initial revision of inotify") Differential Revision: https://reviews.freebsd.org/D51900 --- sys/kern/vfs_inotify.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/kern/vfs_inotify.c b/sys/kern/vfs_inotify.c index 746a5a39208e..b265a5ff3a62 100644 --- a/sys/kern/vfs_inotify.c +++ b/sys/kern/vfs_inotify.c @@ -801,6 +801,7 @@ vn_inotify_add_watch(struct vnode *vp, struct inotify_softc *sc, uint32_t mask, vn_lock(vp, LK_SHARED | LK_RETRY); if (error != 0) break; + NDFREE_PNBUF(&nd); vn_irflag_set_cond(nd.ni_vp, VIRF_INOTIFY_PARENT); vrele(nd.ni_vp); } From nobody Thu Aug 14 16:16:34 2025 X-Original-To: dev-commits-src-main@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 4c2r372sQtz64gyw; Thu, 14 Aug 2025 16:16: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2r372BDGz3R0F; Thu, 14 Aug 2025 16:16:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755188195; 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=vozdtUAFuVWGVrsTB0TCFlS5kSCJkfg82iSN3N0J0eg=; b=q2zv6L396DOvJpecOau6ii+NKeCGYREE0F9SqOqt/IBlQX3E6bnMganZVO0NxVdQlmSGqu dZ2BrNGmGFkDqu77qw4YeAcQqs2dcR5hDx49D1Wuo6sn+LQpwATrpz3Xp0YKj7QBODng5D NsxLDzkBoOuW8W2RgoEQgyCgSjMBion5zQBsSvyea65Oh0e0lOHXHeDAGPW5h5FfGM/aWW KA/tn9qNHznBx9r4YteW4Hk71f/CNv6WILD/PEX/zdnAOpqIZ23FLUwnQ25v2fXGa1z0m5 2ItqxfxfNBNTX2ZbQCjbB8XQpnz/pdzc8QRVG1tQXF0tCBYfp/NqfUK0uYEVWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755188195; 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=vozdtUAFuVWGVrsTB0TCFlS5kSCJkfg82iSN3N0J0eg=; b=BYzcWiQOmcsQycC//mAA6jgd8mbVXyXNlnH/wRlxr2VYLXTQiV/NxC/88hB9kLK7i9804c skjUA3CdHWhYNo//rxKPtK57XZIm0Zi4dMY/ax1+6849OHXSgfZw/IAYJUrh3ldfwBsei5 mAKxh41GKHe+k+BnmdEy9VJvXQo8XA4z5DyLyQMPIHsT8jGrWVFf/BzrC9GJkFKCx5PTyA 0MlqLwa3zHxwJNdR6wuNKbZNA9qw5Lkr5nMSq50HacDfQkWAyMiDwqf6WX7qKXRCUnGssm SYPX+QqhkKunt18W/V5uKwH+K2f97t/Px/q9RaysiF7mOVLwgmFHd6jhVDRPCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755188195; a=rsa-sha256; cv=none; b=fxqSoZeCBibZS2ZyTpVCzeWMa3gdELDalRa26kgR9eHOSeQdaDJsCEimME9R6cp/eAuvpk Xceni3u9GlMlhhb+VotpchOipiZUzO6jeltuXysQzxKwEWRAoZe3Leuw/hQa+LvdB/ymib 76VY7VD1RmuplMLAQBTrWj3XrNyv+JHaEMtDJutz3mE6r7r3Xca2+I9XOPlPwxK//QQkur oOlRZHPBOnEszbYniR3LTiewwUNTPHgoMQelGJ6yMkD8AGJ7mj7R7x4dPZlt8Sv5sjbHOl vncdQSjuHiPDfEc8vq8rpWd61Ms3RzdZudAQr2GqsGJ+jAkM3DgDZOg/lNXFVQ== 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 4c2r370rwGz10YD; Thu, 14 Aug 2025 16:16: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 57EGGYLs099711; Thu, 14 Aug 2025 16:16:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57EGGYkK099709; Thu, 14 Aug 2025 16:16:34 GMT (envelope-from git) Date: Thu, 14 Aug 2025 16:16:34 GMT Message-Id: <202508141616.57EGGYkK099709@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: b1afa460f84e - main - libutil++: Move to the utilities package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: b1afa460f84e2777c48f37b45344be2797fa1e62 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b1afa460f84e2777c48f37b45344be2797fa1e62 commit b1afa460f84e2777c48f37b45344be2797fa1e62 Author: Mark Johnston AuthorDate: 2025-08-14 16:15:43 +0000 Commit: Mark Johnston CommitDate: 2025-08-14 16:15:43 +0000 libutil++: Move to the utilities package We should keep the clibs package as small as possible. Currently it contains some "extra" libraries, but this isn't a good argument for adding more stuff. Move it to the utilities package (the default for bsd.lib.mk consumers), since libutil++ is an INTERNALLIB and thus only installs man pages, so therefore doesn't need to be in FreeBSD-runtime. Requested by: kib Reviewed by: ivy, des Fixes: f4fd2aa07cde ("libutil++: Move to clibs") Differential Revision: https://reviews.freebsd.org/D51898 --- lib/libutil++/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/libutil++/Makefile b/lib/libutil++/Makefile index 729a336ddb3a..56b64bbf358c 100644 --- a/lib/libutil++/Makefile +++ b/lib/libutil++/Makefile @@ -1,4 +1,3 @@ -PACKAGE= clibs LIB_CXX= util++ INTERNALLIB= true SHLIB_MAJOR= 1 From nobody Thu Aug 14 18:39:58 2025 X-Original-To: dev-commits-src-main@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 4c2vDZ4VPsz64rTf; Thu, 14 Aug 2025 18:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2vDZ3Qq7z3hKT; Thu, 14 Aug 2025 18:39:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755196798; 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=DWK4d6PHaHTTQQPYQvta0dRd04HY917n/JHnJaBdIXw=; b=oDzjbWJQP9zHzIv4eBSXU746t56SD49H2CongJ3EiucCltPZCrfFzXZdg1MnHg2Sn7CBK3 B7dLetOOloIxQuvPM+hVCuj7DneizEkEoti7iXeCpz6aOvn56lNViCsIi0ORX+qUck0lXY idcg9YHTn+S/d4ZzIDNCbCKxRZwqQw9pDzPcw03ApvEj3M/neGMpoUT38MF7Qwhxp+k6+S qzedPNf96jL5JNN2L39gt3zj1BoMdtKRs8ADPxTt+Tswz2sd03akIiFDjf4my3zqvTVuoi +3Xp/5OSrLcYsqdZY0mTiFZPkSBRf1KYHTdJBa5hTQ91XGy68IKcIMmFyzFBpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755196798; 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=DWK4d6PHaHTTQQPYQvta0dRd04HY917n/JHnJaBdIXw=; b=JBfCtdT1AIeKcPV334UGptTHR/DT7Iug9ijo8CxEzJ8HuXmdAbV4X79aykoRxxPbJaPSIM qwaDOomjtcfeOc9aP9rfW5eFiRQwO3LsnEX5oc4gfeLZsAjdLBXBwsAQGvRVJQGzuNJrIS ai6bPfZ1+9aqKkPiEbaHp6vjP86Xkm2W/3M018HcrT6N7uQdq1zkN2wg6SB9AmfRfr042r TNZULng837q08XUugVva2gjxWpaovBeVYIyIHBTL/EFmkPvn8xM/lAAFPwbuoYMCbaFidk neSXuDZMKjxh/w8zzkwgP4psysrAPkkxdS1DxK704KAxneEqEVab60LxiFti6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755196798; a=rsa-sha256; cv=none; b=EeoACZPwRF+ETizaJgMDVe7Kz6WpP/u9fBDl4ESZkRvglpDyDbtMZ6BIXVlNnH7veXBSVu HnnokPxnbpSPWxZJsx62kXJL+TJVfr3XOu9pvqKb6b3PM1B+14GwwjzM7RyNNFrliPD/HU jKHMCFLk4WKCcSRhr/gIbrKMr3lQPnd8ikvTfRnHdHDcMXrsjDBA+RDDB6/2xs9X1p89+G YofB/S9gBkyw80ILtFODM4RJi9TW8aOmIsh+DtejPZtJD7bjB568kYG71zJdn+pXZoqP7Q afjs/bazDeyY2fuJyoTnWlid/f3XA25kyP+bq5c8WteQRl778sHQ5io3ze7BGg== 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 4c2vDZ2rQ8z14SY; Thu, 14 Aug 2025 18:39: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 57EIdwNl062169; Thu, 14 Aug 2025 18:39:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57EIdwCF062166; Thu, 14 Aug 2025 18:39:58 GMT (envelope-from git) Date: Thu, 14 Aug 2025 18:39:58 GMT Message-Id: <202508141839.57EIdwCF062166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: c58c77246f88 - main - [libm] Avoid left shift of signed integer entities List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/heads/main X-Git-Reftype: branch X-Git-Commit: c58c77246f88da87f309e8c449e98195d43e2c76 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=c58c77246f88da87f309e8c449e98195d43e2c76 commit c58c77246f88da87f309e8c449e98195d43e2c76 Author: Steve Kargl AuthorDate: 2025-08-14 18:38:41 +0000 Commit: Dimitry Andric CommitDate: 2025-08-14 18:38:41 +0000 [libm] Avoid left shift of signed integer entities Follow-up commit d180086e6eae by fixing the left shift of signed integer entities through the use of a helper function. Specific per file changes are: * lib/msun/src/e_fmodf.c: * lib/msun/src/s_remquof.c: . Eliminate now unused variable 'i'. . Sort declaration statement. . Use subnormal_ilogbf() to avoid left shift of signed integer. * lib/msun/src/math_private.h b/lib/msun/src/math_private.h: . Implement subnormal_ilogbf() to extract an exponent of a subnormal float. This avoids left shifts of signed integers. . Update nearby comment. * lib/msun/src/s_ilogbf.c . Fix declaration of the function statement in accordance with style(9). . Use subnormal_ilogbf() to avoid left shift of signed integer. PR: 288850 MFC after: 1 week --- lib/msun/src/e_fmodf.c | 16 +++++++++------- lib/msun/src/math_private.h | 16 +++++++++++++++- lib/msun/src/s_ilogbf.c | 5 +++-- lib/msun/src/s_remquof.c | 16 +++++++++------- 4 files changed, 36 insertions(+), 17 deletions(-) diff --git a/lib/msun/src/e_fmodf.c b/lib/msun/src/e_fmodf.c index a7d1a0c22acd..ada969db44c7 100644 --- a/lib/msun/src/e_fmodf.c +++ b/lib/msun/src/e_fmodf.c @@ -27,7 +27,7 @@ static const float one = 1.0, Zero[] = {0.0, -0.0,}; float fmodf(float x, float y) { - int32_t n,hx,hy,hz,ix,iy,sx,i; + int32_t hx, hy, hz, ix, iy, n, sx; GET_FLOAT_WORD(hx,x); GET_FLOAT_WORD(hy,y); @@ -44,14 +44,16 @@ fmodf(float x, float y) return Zero[(u_int32_t)sx>>31]; /* |x|=|y| return x*0*/ /* determine ix = ilogb(x) */ - if(hx<0x00800000) { /* subnormal x */ - for (ix = -126,i=(hx<<8); i>0; i<<=1) ix -=1; - } else ix = (hx>>23)-127; + if(hx<0x00800000) + ix = subnormal_ilogbf(hx); + else + ix = (hx>>23)-127; /* determine iy = ilogb(y) */ - if(hy<0x00800000) { /* subnormal y */ - for (iy = -126,i=(hy<<8); i>=0; i<<=1) iy -=1; - } else iy = (hy>>23)-127; + if(hy<0x00800000) + iy = subnormal_ilogbf(hy); + else + iy = (hy>>23)-127; /* set up {hx,lx}, {hy,ly} and align y to x */ if(ix >= -126) diff --git a/lib/msun/src/math_private.h b/lib/msun/src/math_private.h index 0711f2f33c41..fbd84e246ca7 100644 --- a/lib/msun/src/math_private.h +++ b/lib/msun/src/math_private.h @@ -740,7 +740,7 @@ irintl(long double x) } while (0) /* - * For a double entity split into high and low parts, compute ilogb. + * For a subnormal double entity split into high and low parts, compute ilogb. */ static inline int32_t subnormal_ilogb(int32_t hi, int32_t lo) @@ -760,6 +760,20 @@ subnormal_ilogb(int32_t hi, int32_t lo) return (j); } +/* + * For a subnormal float entity represented as an int32_t, compute ilogb. + */ +static inline int32_t +subnormal_ilogbf(int32_t hx) +{ + int32_t j; + uint32_t i; + i = (uint32_t) hx << 8; + for (j = -126; i < 0x7fffffff; i <<= 1) j -=1; + + return (j); +} + #ifdef DEBUG #if defined(__amd64__) || defined(__i386__) #define breakpoint() asm("int $3") diff --git a/lib/msun/src/s_ilogbf.c b/lib/msun/src/s_ilogbf.c index e0f8fee26ac8..5195e2331af3 100644 --- a/lib/msun/src/s_ilogbf.c +++ b/lib/msun/src/s_ilogbf.c @@ -18,7 +18,8 @@ #include "math.h" #include "math_private.h" - int ilogbf(float x) +int +ilogbf(float x) { int32_t hx,ix; @@ -28,7 +29,7 @@ if(hx==0) return FP_ILOGB0; else /* subnormal x */ - for (ix = -126,hx<<=8; hx>0; hx<<=1) ix -=1; + ix = subnormal_ilogbf(hx); return ix; } else if (hx<0x7f800000) return (hx>>23)-127; diff --git a/lib/msun/src/s_remquof.c b/lib/msun/src/s_remquof.c index 9cd148586796..e4adb8321559 100644 --- a/lib/msun/src/s_remquof.c +++ b/lib/msun/src/s_remquof.c @@ -25,7 +25,7 @@ static const float Zero[] = {0.0, -0.0,}; float remquof(float x, float y, int *quo) { - int32_t n,hx,hy,hz,ix,iy,sx,i; + int32_t hx, hy, hz, ix, iy, n, sx; u_int32_t q,sxy; GET_FLOAT_WORD(hx,x); @@ -47,14 +47,16 @@ remquof(float x, float y, int *quo) } /* determine ix = ilogb(x) */ - if(hx<0x00800000) { /* subnormal x */ - for (ix = -126,i=(hx<<8); i>0; i<<=1) ix -=1; - } else ix = (hx>>23)-127; + if(hx<0x00800000) + ix = subnormal_ilogbf(hx); + else + ix = (hx>>23)-127; /* determine iy = ilogb(y) */ - if(hy<0x00800000) { /* subnormal y */ - for (iy = -126,i=(hy<<8); i>0; i<<=1) iy -=1; - } else iy = (hy>>23)-127; + if(hy<0x00800000) + iy = subnormal_ilogbf(hy); + else + iy = (hy>>23)-127; /* set up {hx,lx}, {hy,ly} and align y to x */ if(ix >= -126) From nobody Thu Aug 14 19:03:08 2025 X-Original-To: dev-commits-src-main@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 4c2vlJ5hWyz64sgD; Thu, 14 Aug 2025 19:03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2vlJ535Gz3m5L; Thu, 14 Aug 2025 19:03:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755198188; 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=rtb+EVfDgAokjZFpoLavMNWlbDr8XYN2eDl6vtgmsfY=; b=JBtSZRSxPHTRP0LYaE2EyRh1gjosgSxDkpf4FqWYTABSMt4JXoiCb/xDNX0DUMMDrULI4w FyZZKneMyXXXkDBO9l7Ny3rjVIcrtcJawS/jqLXxJx+uJMU/Dl1wmhslg/WNgJXaqKSdeJ 9Vgy3wXixWRkZ3YBnoroXx1YquJTl5MPp5+RC7eROkYO15zwAZ7D8CHLMk4uYU4bWMvWtE HhFB98CFvFCC0Jood66X29tBxypgBEjXmOeCEcfY2EGjE7a0twdSaSoOf3FBx2ZbZR04Ea +y/ZoIVdWu0dH7o865zWQ7BzPlRBxoWDHiQBHC4t/zbAPcKesXvSCSBjTXVBog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755198188; 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=rtb+EVfDgAokjZFpoLavMNWlbDr8XYN2eDl6vtgmsfY=; b=yDI6TEgUJnxN0lpZXRV5t1RJn9iPpoPXHSsRMNJUij75UUWZafUfErfRN3T0L8tjMX/MbW 9lNtbcutbNqsOWvK3fjZgQ5zeVEweKjOFHLZ1qvyl8ChaxRP4lCH9pBUVx7Ai9HxQlA4SV m8eVqeQHUP8rdf25hYM7Xbwcpi22tHWGg3IDq7S58qA5Clb+vNjklS63qT0p6JYZzm5wVo pJrQUEcq3NT9GpE1HeHuTcizQreeUkTalXVCJi6N4B1R1OBsSreFK5d2MxP3bRPkAoJgkX zBghzaplhnsgFCtSE2eV1E6lY6xMmVMq0by99NXeA1m8ZZ+aFWGEpiCR4WkWQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755198188; a=rsa-sha256; cv=none; b=SVzdjuez0RBt8nGF0an4N7peZjn+q0yTYmozyl7b6v9WHJCeJwb8hWGiRpLweIlIq4o2Cm gBdGXo91VT6MF9FptTth82AbrTvVcB7TvCMQV82uNgZArNBe95QDFDFUyeUfwFsdixlekj y0wZ/95LyrA8MlbT07GUic46dDQB1kSpnxhUxHX0Ouc9jrjX0eZBBtzQp7aV3duAG7lrVw SuTsBQ7iCYMVypbM5StmXO7FRsaRelkKYaK8P73EIoAOqNUYFj2qv7vBK77OmlbWZCpAgl 8H56cAzoP2q4C+tprenVEPL1SxEvHNOqqgqSjbA4yNf8b7Djsqz5m7qvYWPoCg== 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 4c2vlJ4fGJz14jb; Thu, 14 Aug 2025 19:03:08 +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 57EJ38dm018243; Thu, 14 Aug 2025 19:03:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57EJ38mH018240; Thu, 14 Aug 2025 19:03:08 GMT (envelope-from git) Date: Thu, 14 Aug 2025 19:03:08 GMT Message-Id: <202508141903.57EJ38mH018240@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 69f7d6912a24 - main - watchdog: Add a new "Control" ioctl List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 69f7d6912a24d3caab4957a33e07529275cf4d09 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=69f7d6912a24d3caab4957a33e07529275cf4d09 commit 69f7d6912a24d3caab4957a33e07529275cf4d09 Author: Justin Hibbits AuthorDate: 2025-02-26 20:17:24 +0000 Commit: Justin Hibbits CommitDate: 2025-08-14 19:02:46 +0000 watchdog: Add a new "Control" ioctl Summary: In preparation for a new watchdog timeout interface using sbintime_t, add a new control ioctl to arm, pat, and disarm the watchdog. Reviewed by: jhb, phk Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D49182 --- sys/dev/watchdog/watchdog.c | 20 ++++++++++++++++++++ sys/sys/watchdog.h | 8 ++++++++ usr.sbin/watchdogd/watchdogd.c | 13 +++++++++++-- 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/sys/dev/watchdog/watchdog.c b/sys/dev/watchdog/watchdog.c index e6b6dc1eac70..c0babef1b29b 100644 --- a/sys/dev/watchdog/watchdog.c +++ b/sys/dev/watchdog/watchdog.c @@ -117,6 +117,23 @@ seconds_to_pow2ns(int seconds) return (power); } +int +wdog_control(int ctrl) +{ + /* Disable takes precedence */ + if (ctrl == WD_CTRL_DISABLE) { + wdog_kern_pat(0); + } + + if ((ctrl & WD_CTRL_RESET) != 0) { + wdog_kern_pat(WD_ACTIVE | WD_LASTVAL); + } else if ((ctrl & WD_CTRL_ENABLE) != 0) { + wdog_kern_pat(WD_ACTIVE | WD_LASTVAL); + } + + return (0); +} + int wdog_kern_pat(u_int utim) { @@ -374,6 +391,9 @@ wd_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, case WDIOCPATPAT: error = wd_ioctl_patpat(data); break; + case WDIOC_CONTROL: + wdog_control(*(int *)data); + break; default: error = ENOIOCTL; break; diff --git a/sys/sys/watchdog.h b/sys/sys/watchdog.h index 4a16b18509f5..3c9d31eb577b 100644 --- a/sys/sys/watchdog.h +++ b/sys/sys/watchdog.h @@ -48,6 +48,8 @@ #define WDIOC_SETSOFT _IOW('W', 49, int) #define WDIOC_SETSOFTTIMEOUTACT _IOW('W', 50, int) +#define WDIOC_CONTROL _IOW('W', 51, int) /* configure watchdog */ + #define WD_ACTIVE 0x8000000 /* * Watchdog reset, timeout set to value in WD_INTERVAL field. @@ -93,6 +95,11 @@ #define WD_TO_64SEC 36 #define WD_TO_128SEC 37 +/* Control options for WDIOC_CONTROL */ +#define WD_CTRL_DISABLE 0x00000000 +#define WD_CTRL_ENABLE 0x00000001 +#define WD_CTRL_RESET 0x00000002 + /* action on pre-timeout trigger */ #define WD_SOFT_PANIC 0x01 /* panic */ #define WD_SOFT_DDB 0x02 /* enter debugger */ @@ -110,6 +117,7 @@ EVENTHANDLER_DECLARE(watchdog_list, watchdog_fn); u_int wdog_kern_last_timeout(void); int wdog_kern_pat(u_int utim); +int wdog_control(int ctrl); /* * The following function pointer is used to attach a software watchdog diff --git a/usr.sbin/watchdogd/watchdogd.c b/usr.sbin/watchdogd/watchdogd.c index 88b467486da1..228438955006 100644 --- a/usr.sbin/watchdogd/watchdogd.c +++ b/usr.sbin/watchdogd/watchdogd.c @@ -396,6 +396,15 @@ watchdog_patpat(u_int t) return ioctl(fd, WDIOCPATPAT, &t); } +static int +watchdog_control(u_int control) +{ + if (is_dry_run) + return (0); + + return ioctl(fd, WDIOC_CONTROL, &control); +} + /* * Toggle the kernel's watchdog. This routine is used to enable and * disable the watchdog. @@ -454,10 +463,10 @@ watchdog_onoff(int onoff) /* pat one more time for good measure */ return watchdog_patpat((timeout|WD_ACTIVE)); } else { - return watchdog_patpat(exit_timeout); + return watchdog_control(WD_CTRL_DISABLE); } failsafe: - watchdog_patpat(exit_timeout); + watchdog_control(WD_CTRL_DISABLE); return (error); } From nobody Thu Aug 14 19:03:09 2025 X-Original-To: dev-commits-src-main@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 4c2vlL19dQz64t0R; Thu, 14 Aug 2025 19:03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2vlK5grVz3m5M; Thu, 14 Aug 2025 19:03:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755198189; 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=97buEuoiFrTAODQ9nyKDblU403pwwKz1+1naNW/+feQ=; b=nBG3arskp4kVlx3Rs2gjmFb0C/ZiVLrfavH9mJuGK/RS90lPDXwjD8hyKG1dQqVqtanV5g KHHz1pv61WfAfphmSrkaE3sHtJ3fB/+oRlrxc1PTNnMIOVkfEke/bAN2GmlqmmyLNyQXdR +9tFcbshMX9gu5sfIs9whseR0X9yEIc5eUi+l879FxnfTJTxzq0Z/K/hiKMc5waZCzfnBt eZN1QHdk70vCb+PG6vDhQSyzUppBnx10fegw3CoF7PA7CQmBDz2RkRxnE8klEgHllBS8C6 nCFbx41FVNTDBhMQgncdYSTvvaWHrbKOa0Ps8ocRsRJyeAZqbFS5AWEfcKsSNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755198189; 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=97buEuoiFrTAODQ9nyKDblU403pwwKz1+1naNW/+feQ=; b=G4K6Lj0MYoZFMgE5xzUL0o8iaULXYanmxIsw149vd+mplitWh0OFYVjjjO00i0YnTXZMc0 1XvcBJG413DEI+0D8lW3UQfzWfTRgJzrRKmMbK9b5DzRtIFfLAvsfVlu4l2rVVKHOPZ1RP OHgwM3Y3ApgSaUSKurp6hup7WIXb1H9z/ZMu6JTSUjcGuMQqlwS9uVePPHtiaifas8IN6P YGu+HiVF8vsmA3axkCV5ErxHeZOH/EAnzJNg0YFFweuCNIa+SjtAbz1DidhNIoOF5mx4wi 9zdnXNebmUMaZb7Ve/znLlFdy48Qj//ZfMtm5PMUS0wRccxj5tvypqYoxZ03mQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755198189; a=rsa-sha256; cv=none; b=xbogmFA2HkUR9bnbLtPd90zDxwe40Su+Ds46ep7QeWCWKeVWcJA7hXYOjwIGfzJ7YNN5yQ i81DLxQz4GcsZzWQoe0Qd/qrz22OlUrXjgLDNdjtf49YT+y27Oc37i3Qi0g+BfgDr/hQss KUpPK8Os2GOhN4RY/LG/Izm1Qpj3RUG33K599XEMAO3RBEnd5oiYDFXDBSYJFpPpheTiBn n73B/DUQQj0uLlHD+xsoBgROu+4sMdlPJsJ1gcZ6OWQrOy5rpLQSXm5D8mtKBrpYd2ob3d KFDCgM215LTUv8Rgs29HQrIkPb0MtrZ2VJg5YV1onn0rxy2EXqnV60YJTb16Qg== 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 4c2vlK57dtz15Q5; Thu, 14 Aug 2025 19:03: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 57EJ39t1018275; Thu, 14 Aug 2025 19:03:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57EJ39C9018272; Thu, 14 Aug 2025 19:03:09 GMT (envelope-from git) Date: Thu, 14 Aug 2025 19:03:09 GMT Message-Id: <202508141903.57EJ39C9018272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 26d6617f3e54 - main - watchdog: Convert to using sbintime_t format List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26d6617f3e5406d9f92d87674f1667dd856828a3 Auto-Submitted: auto-generated The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=26d6617f3e5406d9f92d87674f1667dd856828a3 commit 26d6617f3e5406d9f92d87674f1667dd856828a3 Author: Justin Hibbits AuthorDate: 2025-02-26 20:25:36 +0000 Commit: Justin Hibbits CommitDate: 2025-08-14 19:02:46 +0000 watchdog: Convert to using sbintime_t format Summary: Some watchdogs are now based on a countdown timer instead of a bit check. To deal with these, convert the watchdog framework to use sbintime_t instead of power-of-2-nanoseconds. This allows more precision, and more variety of watchdog timeouts. Keep the old method as a compatibility layer, so that drivers can be migrated slowly, as needed. Reviewed by: jhb Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D49183 --- sys/dev/watchdog/watchdog.c | 202 ++++++++++++++++++++++------------------- sys/sys/watchdog.h | 17 ++-- usr.sbin/watchdogd/watchdogd.c | 99 +++++--------------- 3 files changed, 143 insertions(+), 175 deletions(-) diff --git a/sys/dev/watchdog/watchdog.c b/sys/dev/watchdog/watchdog.c index c0babef1b29b..e1b2e08c3f10 100644 --- a/sys/dev/watchdog/watchdog.c +++ b/sys/dev/watchdog/watchdog.c @@ -50,11 +50,20 @@ #include /* kern_clock_gettime() */ -static int wd_set_pretimeout(int newtimeout, int disableiftoolong); +#ifdef COMPAT_FREEBSD14 +#define WDIOCPATPAT_14 _IOW('W', 42, u_int) /* pat the watchdog */ +#define WDIOC_SETTIMEOUT_14 _IOW('W', 43, int) /* set/reset the timer */ +#define WDIOC_GETTIMEOUT_14 _IOR('W', 44, int) /* get total timeout */ +#define WDIOC_GETTIMELEFT_14 _IOR('W', 45, int) /* get time left */ +#define WDIOC_GETPRETIMEOUT_14 _IOR('W', 46, int) /* get the pre-timeout */ +#define WDIOC_SETPRETIMEOUT_14 _IOW('W', 47, int) /* set the pre-timeout */ +#endif + +static int wd_set_pretimeout(sbintime_t newtimeout, int disableiftoolong); static void wd_timeout_cb(void *arg); static struct callout wd_pretimeo_handle; -static int wd_pretimeout; +static sbintime_t wd_pretimeout; static int wd_pretimeout_act = WD_SOFT_LOG; static struct callout wd_softtimeo_handle; @@ -63,6 +72,8 @@ static int wd_softtimer; /* true = use softtimer instead of hardware static int wd_softtimeout_act = WD_SOFT_LOG; /* action for the software timeout */ static struct cdev *wd_dev; +static volatile sbintime_t wd_last_sbt; /* last timeout value (sbt) */ +static sbintime_t wd_last_sbt_sysctl; /* last timeout value (sbt) */ static volatile u_int wd_last_u; /* last timeout value set by kern_do_pat */ static u_int wd_last_u_sysctl; /* last timeout value set by kern_do_pat */ static u_int wd_last_u_sysctl_secs; /* wd_last_u in seconds */ @@ -73,6 +84,8 @@ SYSCTL_UINT(_hw_watchdog, OID_AUTO, wd_last_u, CTLFLAG_RD, &wd_last_u_sysctl, 0, "Watchdog last update time"); SYSCTL_UINT(_hw_watchdog, OID_AUTO, wd_last_u_secs, CTLFLAG_RD, &wd_last_u_sysctl_secs, 0, "Watchdog last update time"); +SYSCTL_SBINTIME_MSEC(_hw_watchdog, OID_AUTO, wd_last_msecs, CTLFLAG_RD, + &wd_last_sbt_sysctl, "Watchdog last update time (milliseconds)"); static int wd_lastpat_valid = 0; static time_t wd_lastpat = 0; /* when the watchdog was last patted */ @@ -80,41 +93,26 @@ static time_t wd_lastpat = 0; /* when the watchdog was last patted */ /* Hook for external software watchdog to register for use if needed */ void (*wdog_software_attach)(void); -static void -pow2ns_to_ts(int pow2ns, struct timespec *ts) +/* Legacy interface to watchdog. */ +int +wdog_kern_pat(u_int utim) { - uint64_t ns; + sbintime_t sbt; - ns = 1ULL << pow2ns; - ts->tv_sec = ns / 1000000000ULL; - ts->tv_nsec = ns % 1000000000ULL; -} + if ((utim & WD_LASTVAL) != 0 && (utim & WD_INTERVAL) > 0) + return (EINVAL); -static int -pow2ns_to_ticks(int pow2ns) -{ - struct timeval tv; - struct timespec ts; + if ((utim & WD_LASTVAL) != 0) { + return (wdog_control(WD_CTRL_RESET)); + } - pow2ns_to_ts(pow2ns, &ts); - TIMESPEC_TO_TIMEVAL(&tv, &ts); - return (tvtohz(&tv)); -} + utim &= WD_INTERVAL; + if (utim == WD_TO_NEVER) + sbt = 0; + else + sbt = nstosbt(1 << utim); -static int -seconds_to_pow2ns(int seconds) -{ - uint64_t power; - uint64_t ns; - uint64_t shifted; - - ns = ((uint64_t)seconds) * 1000000000ULL; - power = flsll(ns); - shifted = 1ULL << power; - if (shifted <= ns) { - power++; - } - return (power); + return (wdog_kern_pat_sbt(sbt)); } int @@ -126,76 +124,63 @@ wdog_control(int ctrl) } if ((ctrl & WD_CTRL_RESET) != 0) { - wdog_kern_pat(WD_ACTIVE | WD_LASTVAL); + wdog_kern_pat_sbt(wd_last_sbt); } else if ((ctrl & WD_CTRL_ENABLE) != 0) { - wdog_kern_pat(WD_ACTIVE | WD_LASTVAL); + wdog_kern_pat_sbt(wd_last_sbt); } return (0); } int -wdog_kern_pat(u_int utim) +wdog_kern_pat_sbt(sbintime_t sbt) { - int error; - static int first = 1; - - if ((utim & WD_LASTVAL) != 0 && (utim & WD_INTERVAL) > 0) - return (EINVAL); - - if ((utim & WD_LASTVAL) != 0) { - /* - * if WD_LASTVAL is set, fill in the bits for timeout - * from the saved value in wd_last_u. - */ - MPASS((wd_last_u & ~WD_INTERVAL) == 0); - utim &= ~WD_LASTVAL; - utim |= wd_last_u; - } else { - /* - * Otherwise save the new interval. - * This can be zero (to disable the watchdog) - */ - wd_last_u = (utim & WD_INTERVAL); + sbintime_t error_sbt = 0; + int pow2ns = 0; + int error = 0; + static bool first = true; + + /* legacy uses power-of-2-nanoseconds time. */ + if (sbt != 0) { + pow2ns = flsl(sbttons(sbt)); + } + if (wd_last_sbt != sbt) { + wd_last_u = pow2ns; wd_last_u_sysctl = wd_last_u; - wd_last_u_sysctl_secs = pow2ns_to_ticks(wd_last_u) / hz; + wd_last_u_sysctl_secs = sbt / SBT_1S; + + wd_last_sbt = sbt; } - if ((utim & WD_INTERVAL) == WD_TO_NEVER) { - utim = 0; - /* Assume all is well; watchdog signals failure. */ - error = 0; - } else { - /* Assume no watchdog available; watchdog flags success */ + if (sbt != 0) error = EOPNOTSUPP; - } + if (wd_softtimer) { - if (utim == 0) { + if (sbt == 0) { callout_stop(&wd_softtimeo_handle); } else { - (void) callout_reset(&wd_softtimeo_handle, - pow2ns_to_ticks(utim), wd_timeout_cb, "soft"); + (void) callout_reset_sbt(&wd_softtimeo_handle, + sbt, 0, wd_timeout_cb, "soft", 0); } error = 0; } else { - EVENTHANDLER_INVOKE(watchdog_list, utim, &error); + EVENTHANDLER_INVOKE(watchdog_sbt_list, sbt, &error_sbt, &error); + EVENTHANDLER_INVOKE(watchdog_list, pow2ns, &error); } /* - * If we no hardware watchdog responded, we have not tried to + * If no hardware watchdog responded, we have not tried to * attach an external software watchdog, and one is available, * attach it now and retry. */ - if (error == EOPNOTSUPP && first && *wdog_software_attach != NULL) { + if (error == EOPNOTSUPP && first && wdog_software_attach != NULL) { (*wdog_software_attach)(); - EVENTHANDLER_INVOKE(watchdog_list, utim, &error); + EVENTHANDLER_INVOKE(watchdog_sbt_list, sbt, &error_sbt, &error); + EVENTHANDLER_INVOKE(watchdog_list, pow2ns, &error); } - first = 0; + first = false; + /* TODO: Print a (rate limited?) warning if error_sbt is too far away */ wd_set_pretimeout(wd_pretimeout, true); - /* - * If we were able to arm/strobe the watchdog, then - * update the last time it was strobed for WDIOC_GETTIMELEFT - */ if (!error) { struct timespec ts; @@ -206,6 +191,7 @@ wdog_kern_pat(u_int utim) wd_lastpat_valid = 1; } } + return (error); } @@ -282,16 +268,14 @@ wd_timeout_cb(void *arg) * current actual watchdog timeout. */ static int -wd_set_pretimeout(int newtimeout, int disableiftoolong) +wd_set_pretimeout(sbintime_t newtimeout, int disableiftoolong) { - u_int utime; - struct timespec utime_ts; - int timeout_ticks; + sbintime_t utime; + sbintime_t timeout_left; - utime = wdog_kern_last_timeout(); - pow2ns_to_ts(utime, &utime_ts); + utime = wdog_kern_last_timeout_sbt(); /* do not permit a pre-timeout >= than the timeout. */ - if (newtimeout >= utime_ts.tv_sec) { + if (newtimeout >= utime) { /* * If 'disableiftoolong' then just fall through * so as to disable the pre-watchdog @@ -309,7 +293,7 @@ wd_set_pretimeout(int newtimeout, int disableiftoolong) return 0; } - timeout_ticks = pow2ns_to_ticks(utime) - (hz*newtimeout); + timeout_left = utime - newtimeout; #if 0 printf("wd_set_pretimeout: " "newtimeout: %d, " @@ -323,8 +307,8 @@ wd_set_pretimeout(int newtimeout, int disableiftoolong) #endif /* We determined the value is sane, so reset the callout */ - (void) callout_reset(&wd_pretimeo_handle, - timeout_ticks, wd_timeout_cb, "pre"); + (void) callout_reset_sbt(&wd_pretimeo_handle, + timeout_left, 0, wd_timeout_cb, "pre", 0); wd_pretimeout = newtimeout; return 0; } @@ -333,6 +317,7 @@ static int wd_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, int flags __unused, struct thread *td) { + sbintime_t sb; u_int u; time_t timeleft; int error; @@ -368,32 +353,55 @@ wd_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t data, error = EINVAL; } break; - case WDIOC_GETPRETIMEOUT: - *(int *)data = (int)wd_pretimeout; +#ifdef COMPAT_FREEBSD14 + case WDIOC_GETPRETIMEOUT_14: + *(int *)data = (int)(wd_pretimeout / SBT_1S); break; - case WDIOC_SETPRETIMEOUT: - error = wd_set_pretimeout(*(int *)data, false); + case WDIOC_SETPRETIMEOUT_14: + error = wd_set_pretimeout(*(int *)data * SBT_1S, false); break; - case WDIOC_GETTIMELEFT: + case WDIOC_GETTIMELEFT_14: error = wd_get_time_left(td, &timeleft); if (error) break; *(int *)data = (int)timeleft; break; - case WDIOC_SETTIMEOUT: + case WDIOC_SETTIMEOUT_14: u = *(u_int *)data; - error = wdog_kern_pat(seconds_to_pow2ns(u)); + error = wdog_kern_pat_sbt(mstosbt(u * 1000ULL)); break; - case WDIOC_GETTIMEOUT: + case WDIOC_GETTIMEOUT_14: u = wdog_kern_last_timeout(); *(u_int *)data = u; break; - case WDIOCPATPAT: + case WDIOCPATPAT_14: error = wd_ioctl_patpat(data); break; +#endif + + /* New API */ case WDIOC_CONTROL: wdog_control(*(int *)data); break; + case WDIOC_SETTIMEOUT: + sb = *(sbintime_t *)data; + error = wdog_kern_pat_sbt(sb); + break; + case WDIOC_GETTIMEOUT: + *(sbintime_t *)data = wdog_kern_last_timeout_sbt(); + break; + case WDIOC_GETTIMELEFT: + error = wd_get_time_left(td, &timeleft); + if (error) + break; + *(sbintime_t *)data = (sbintime_t)timeleft * SBT_1S; + break; + case WDIOC_GETPRETIMEOUT: + *(sbintime_t *)data = wd_pretimeout; + break; + case WDIOC_SETPRETIMEOUT: + error = wd_set_pretimeout(*(sbintime_t *)data, false); + break; default: error = ENOIOCTL; break; @@ -412,6 +420,12 @@ wdog_kern_last_timeout(void) return (wd_last_u); } +sbintime_t +wdog_kern_last_timeout_sbt(void) +{ + return (wd_last_sbt); +} + static struct cdevsw wd_cdevsw = { .d_version = D_VERSION, .d_ioctl = wd_ioctl, diff --git a/sys/sys/watchdog.h b/sys/sys/watchdog.h index 3c9d31eb577b..8401d343a6b7 100644 --- a/sys/sys/watchdog.h +++ b/sys/sys/watchdog.h @@ -32,15 +32,16 @@ #define _SYS_WATCHDOG_H #include +#include #define _PATH_WATCHDOG "fido" -#define WDIOCPATPAT _IOW('W', 42, u_int) /* pat the watchdog */ -#define WDIOC_SETTIMEOUT _IOW('W', 43, int) /* set/reset the timer */ -#define WDIOC_GETTIMEOUT _IOR('W', 44, int) /* get total timeout */ -#define WDIOC_GETTIMELEFT _IOR('W', 45, int) /* get time left */ -#define WDIOC_GETPRETIMEOUT _IOR('W', 46, int) /* get the pre-timeout */ -#define WDIOC_SETPRETIMEOUT _IOW('W', 47, int) /* set the pre-timeout */ +#define WDIOC_PATPAT _IOW('W', 52, sbintime_t) /* pat the watchdog */ +#define WDIOC_SETTIMEOUT _IOW('W', 53, sbintime_t) /* set/reset the timer */ +#define WDIOC_GETTIMEOUT _IOR('W', 54, sbintime_t) /* get total timeout */ +#define WDIOC_GETTIMELEFT _IOR('W', 55, sbintime_t) /* get time left */ +#define WDIOC_GETPRETIMEOUT _IOR('W', 56, sbintime_t) /* get the pre-timeout */ +#define WDIOC_SETPRETIMEOUT _IOW('W', 57, sbintime_t) /* set the pre-timeout */ /* set the action when a pre-timeout occurs see: WD_SOFT_* */ #define WDIOC_SETPRETIMEOUTACT _IOW('W', 48, int) @@ -112,11 +113,15 @@ #include typedef void (*watchdog_fn)(void *, u_int, int *); +typedef void (*watchdog_sbt_fn)(void *, sbintime_t, sbintime_t *, int *); EVENTHANDLER_DECLARE(watchdog_list, watchdog_fn); +EVENTHANDLER_DECLARE(watchdog_sbt_list, watchdog_sbt_fn); u_int wdog_kern_last_timeout(void); int wdog_kern_pat(u_int utim); +sbintime_t wdog_kern_last_timeout_sbt(void); +int wdog_kern_pat_sbt(sbintime_t utim); int wdog_control(int ctrl); /* diff --git a/usr.sbin/watchdogd/watchdogd.c b/usr.sbin/watchdogd/watchdogd.c index 228438955006..27123f2143d0 100644 --- a/usr.sbin/watchdogd/watchdogd.c +++ b/usr.sbin/watchdogd/watchdogd.c @@ -63,25 +63,25 @@ static long fetchtimeout(int opt, const char *longopt, const char *myoptarg, int zero_ok); static void parseargs(int, char *[]); -static int seconds_to_pow2ns(int); static void sighandler(int); static void watchdog_loop(void); static int watchdog_init(void); static int watchdog_onoff(int onoff); -static int watchdog_patpat(u_int timeout); +static int watchdog_patpat(sbintime_t); static void usage(void); -static int tstotv(struct timeval *tv, struct timespec *ts); static int tvtohz(struct timeval *tv); static int debugging = 0; static int end_program = 0; static const char *pidfile = _PATH_VARRUN "watchdogd.pid"; -static u_int timeout = WD_TO_128SEC; +static sbintime_t timeout = 128 * SBT_1S; static u_int exit_timeout = WD_TO_NEVER; static u_int pretimeout = 0; static u_int timeout_sec; static u_int nap = 10; +#ifdef notyet static int passive = 0; +#endif static int is_daemon = 0; static int is_dry_run = 0; /* do not arm the watchdog, only report on timing of the watch @@ -174,38 +174,23 @@ main(int argc, char *argv[]) pidfile_remove(pfh); return (EX_OK); } else { - if (passive) - timeout |= WD_PASSIVE; - else - timeout |= WD_ACTIVE; if (watchdog_patpat(timeout) < 0) err(EX_OSERR, "patting the dog"); return (EX_OK); } } -static void -pow2ns_to_ts(int pow2ns, struct timespec *ts) -{ - uint64_t ns; - - ns = 1ULL << pow2ns; - ts->tv_sec = ns / 1000000000ULL; - ts->tv_nsec = ns % 1000000000ULL; -} - /* * Convert a timeout in seconds to N where 2^N nanoseconds is close to * "seconds". * * The kernel expects the timeouts for watchdogs in "2^N nanosecond format". */ -static u_int -parse_timeout_to_pow2ns(char opt, const char *longopt, const char *myoptarg) +static sbintime_t +parse_timeout_to_sbt(char opt, const char *longopt, const char *myoptarg) { - double a; - u_int rv; - struct timespec ts; + long a; + sbintime_t rv; struct timeval tv; int ticks; char shortopt[] = "- "; @@ -216,19 +201,17 @@ parse_timeout_to_pow2ns(char opt, const char *longopt, const char *myoptarg) a = fetchtimeout(opt, longopt, myoptarg, 1); if (a == 0) - rv = WD_TO_NEVER; + rv = 0; else - rv = seconds_to_pow2ns(a); - pow2ns_to_ts(rv, &ts); - tstotv(&tv, &ts); + rv = a * SBT_1S; + tv = sbttotv(rv); ticks = tvtohz(&tv); if (debugging) { printf("Timeout for %s%s " - "is 2^%d nanoseconds " - "(in: %s sec -> out: %jd sec %ld ns -> %d ticks)\n", + "is " + "(in: %s sec -> out: %jd sec %ld us -> %d ticks)\n", longopt ? "-" : "", longopt ? longopt : shortopt, - rv, - myoptarg, (intmax_t)ts.tv_sec, ts.tv_nsec, ticks); + myoptarg, (intmax_t)tv.tv_sec, tv.tv_usec, ticks); } if (ticks <= 0) { errx(1, "Timeout for %s%s is too small, please choose a higher timeout.", longopt ? "-" : "", longopt ? longopt : shortopt); @@ -364,7 +347,7 @@ watchdog_loop(void) } if (failed == 0) - watchdog_patpat(timeout|WD_ACTIVE); + watchdog_patpat(timeout); waited = watchdog_check_dogfunction_time(&ts_start, &ts_end); if (nap - waited > 0) @@ -387,13 +370,13 @@ try_end: * to keep the watchdog from firing. */ static int -watchdog_patpat(u_int t) +watchdog_patpat(sbintime_t sbt) { if (is_dry_run) return 0; - return ioctl(fd, WDIOCPATPAT, &t); + return ioctl(fd, WDIOC_SETTIMEOUT, &sbt); } static int @@ -429,7 +412,7 @@ watchdog_onoff(int onoff) warn("setting WDIOC_SETSOFT %d", softtimeout_set); return (error); } - error = watchdog_patpat((timeout|WD_ACTIVE)); + error = watchdog_patpat(timeout); if (error) { warn("watchdog_patpat failed"); goto failsafe; @@ -461,7 +444,7 @@ watchdog_onoff(int onoff) } } /* pat one more time for good measure */ - return watchdog_patpat((timeout|WD_ACTIVE)); + return watchdog_patpat(timeout); } else { return watchdog_control(WD_CTRL_DISABLE); } @@ -576,15 +559,6 @@ timeout_act_str2int(const char *lopt, const char *acts) return rv; } -int -tstotv(struct timeval *tv, struct timespec *ts) -{ - - tv->tv_sec = ts->tv_sec; - tv->tv_usec = ts->tv_nsec / 1000; - return 0; -} - /* * Convert a timeval to a number of ticks. * Mostly copied from the kernel. @@ -656,30 +630,6 @@ tvtohz(struct timeval *tv) return ((int)ticks); } -static int -seconds_to_pow2ns(int seconds) -{ - uint64_t power; - uint64_t ns; - uint64_t shifted; - - if (seconds <= 0) - errx(1, "seconds %d < 0", seconds); - ns = ((uint64_t)seconds) * 1000000000ULL; - power = flsll(ns); - shifted = 1ULL << power; - if (shifted <= ns) { - power++; - } - if (debugging) { - printf("shifted %lld\n", (long long)shifted); - printf("seconds_to_pow2ns: seconds: %d, ns %lld, power %d\n", - seconds, (long long)ns, (int)power); - } - return (power); -} - - /* * Handle the few command line arguments supported. */ @@ -692,8 +642,7 @@ parseargs(int argc, char *argv[]) const char *lopt; /* Get the default value of timeout_sec from the default timeout. */ - pow2ns_to_ts(timeout, &ts); - timeout_sec = ts.tv_sec; + timeout_sec = sbintime_getsec(timeout); /* * if we end with a 'd' aka 'watchdogd' then we are the daemon program, @@ -736,10 +685,10 @@ parseargs(int argc, char *argv[]) break; case 't': timeout_sec = atoi(optarg); - timeout = parse_timeout_to_pow2ns(c, NULL, optarg); + timeout = parse_timeout_to_sbt(c, NULL, optarg); if (debugging) - printf("Timeout is 2^%d nanoseconds\n", - timeout); + printf("Timeout is %d\n", + (int)(timeout / SBT_1S)); break; case 'T': carp_thresh_seconds = @@ -749,7 +698,7 @@ parseargs(int argc, char *argv[]) do_timedog = 1; break; case 'x': - exit_timeout = parse_timeout_to_pow2ns(c, NULL, optarg); + exit_timeout = parse_timeout_to_sbt(c, NULL, optarg); if (exit_timeout != 0) exit_timeout |= WD_ACTIVE; break; From nobody Thu Aug 14 20:29:22 2025 X-Original-To: dev-commits-src-main@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 4c2xfp4rFMz64yCr; Thu, 14 Aug 2025 20:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2xfp40Lmz3xvX; Thu, 14 Aug 2025 20:29:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755203362; 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=XDKIm3X9wI8r2W2RmAqta6rIFuDWtD+mLPmOraqM6Tk=; b=KZHcqByUgAOvCHJhDlV76UQycXkKgcay+rhT+L0BAtM5eg93avomL8AAJiW3H4wBioDDFH JfFMgtm6p48TDDkKB3nZ/6jM+uH3ve30ijG/KsWFL2vTLsn826cGCe2itBFSOqd6pdU88q fo0i4nyHeNnQgiippMY+4GaVlSv5tzSNJFrpRp0sfCdoOGfpQug/5R87zvLeBB2T2Fpgt/ YClLkQ7ZzK03xSmAeA02nDq/ycvUiy/cbY2bM7j2xBltBNj7eKQntMi2H9vU0knNjZzQoQ vLnKxCWKCM/3A37Fph795sNIx9OQ0pQncUWH4tSRHadsFsNRLC41S5ZIIfCd+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755203362; 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=XDKIm3X9wI8r2W2RmAqta6rIFuDWtD+mLPmOraqM6Tk=; b=pTW4L9Xn8RZQ0g3BwprKpRM4Lm14/luY4FSC8R4ATXEsFNLL3debZLbkZ7l7JrmFfwCw0/ tuclcUR0oMOdCOTshv4t7jsg9JF0e0Gi6VHVYbuBL0KX9i4ZyMNjK1l8/UoqOWtoXmFs5j sbFqKjJwZ0MPxjklTYt2lgMDxH4YzqGvK6tgf1pyHcIswdByHbJBo34lT/AQguxqAdGCKv Uf4H4+6uZKrToHmbfLZoJvm87MlzGD/6VekXu5yJev+AdVQVYzFQ1JnX3CKaTrr8nU+yG0 ictpYHpf1vqb7UkruU3oQcgCUO0XwwLytHDHuioucFhGP+890CMXZcsd9Lc4Fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755203362; a=rsa-sha256; cv=none; b=aMdVXou8EtzK9PvSTU8zYtlcpOc1onlCLvZn9fY6EP13TwT+eaiQ2MZ7X4e0VUxyrlR21x 8JIaMSI7ge2q1y7eSdCpOT61ujN9kq4IjgabMdRAacCJrGgeC6OV3AahzCSH5a3jy1YoVP 3rxUcHeG34NZWoagTN99ybfJXukcPzFP6NGurf65cXWqFS/AHxjXqq7S/f8x0qYKo3al6s T3I8keJUZ5id/+i0Zz2gLwWQeRd+vgNjqakb+7OqbqBw7PROtSYyTyTj2J8tjm5gV61KVY Nec9nEe6AFYFKu9TI4K+R0kApbQWq6lr6R8hP1+SLZPERWBA7luHbsYOdGZaCQ== 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 4c2xfp3YTtz17V8; Thu, 14 Aug 2025 20:29: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 57EKTMKk069578; Thu, 14 Aug 2025 20:29:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57EKTMM0069575; Thu, 14 Aug 2025 20:29:22 GMT (envelope-from git) Date: Thu, 14 Aug 2025 20:29:22 GMT Message-Id: <202508142029.57EKTMM0069575@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 6cdc06285417 - main - src.opts.mk: Style nits, remove obsolete comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6cdc0628541718610124bd62c406342fff9ba28b Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=6cdc0628541718610124bd62c406342fff9ba28b commit 6cdc0628541718610124bd62c406342fff9ba28b Author: Dag-Erling Smørgrav AuthorDate: 2025-08-14 20:29:00 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-14 20:29:11 +0000 src.opts.mk: Style nits, remove obsolete comment Reviewed by: imp, markj, jhb Differential Revision: https://reviews.freebsd.org/D51902 --- share/mk/src.opts.mk | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 6000da865332..f146a4b24424 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -296,9 +296,9 @@ __DEFAULT_NO_OPTIONS+=LLVM_TARGET_BPF LLVM_TARGET_MIPS .include .if ${__T} == "i386" || ${__T} == "amd64" -__DEFAULT_NO_OPTIONS += FDT +__DEFAULT_NO_OPTIONS+=FDT .else -__DEFAULT_YES_OPTIONS += FDT +__DEFAULT_YES_OPTIONS+=FDT .endif .if ${__T:Marm*} == "" && ${__T:Mriscv64*} == "" @@ -519,8 +519,4 @@ MK_${vv:H}:= ${MK_${vv:T}} .endif .endfor -# -# Set defaults for the MK_*_SUPPORT variables. -# - .endif # !target(____) From nobody Thu Aug 14 20:46:09 2025 X-Original-To: dev-commits-src-main@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 4c2y2944NLz64yrl; Thu, 14 Aug 2025 20:46: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c2y293SVFz42pG; Thu, 14 Aug 2025 20:46:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755204369; 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=0ph7XnxYSrewO0e6tnnfb8aHXu8cpVSJTpZp7dSVVsk=; b=c3eFoCcWGrUc9vwSPL1N1ypXcZDKREp0wQh6BCWNWh+cIk4hHnyJvPqrzvh73Y46GAUOFx eDBbmITcYEnyDHGY1Y16Y8UnnW5awf96QiJVcrgn62n6oP8qu6aTkGHKz7Ak2Ya3OFQBUS 6KhDk1ft0VNGmzKltQhySfrgEqGH6U4nZ4VVa3B6wCG37V3A7aMF10L75mxSFn06e+O/9t lupcYtJRMs+pni3KSXi41rmHYQ2bd+kEEl6javSI5sW5pQoJWn4cMqBA1UvBzBdB+RY5Tl D0zsLej+TmQWFwJXLe+b5r4+hjtiNuuDEz82G3dDFg7fYg3HCi3XuuqfCBrxXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755204369; 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=0ph7XnxYSrewO0e6tnnfb8aHXu8cpVSJTpZp7dSVVsk=; b=pqxbg1kyg3jbvqFnlo5TxV1yDzybAL6UVezaBJPhRS4DTvoaW+gnFxHqNEybaYxW5uNcVY kzGStQvpDsba3I1o8zB9Zb1RifnBNOBRc9/iZwY44TV95FzzccJ3ofAjMTinNGN42OfSOj 3uD76TI/Ro27w7yjCGWwY91wwdr60bMs8vw5YW0zs86qFnqmj84fcX59pLaFbDGYqcWwEk H5RX8NkW7Y4FdfZU/sJM4tFsQ6rECzVNirWm2HGoF1G8Poxiz6WbJmdT1wR9v2cUO8EVxB ZKdDSrCoiz0aMp60UbdvghOa7q2UaiZPXCb+nVyHKD53C4AVjE5U7p8wcSignQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755204369; a=rsa-sha256; cv=none; b=szpJJuigKRFHEGJxQJjKbSpbmYOSM+liMTuyB96/kuKpIa+9WacHRWlhqaVbS61PFLqP6B NDuu0J8+S7Wy5lRXPUNi1/ElmFB17YCt3nqAFjQQAxc/p3XCjtetH4xIBd7OKNf/p24vk3 qB88MZlepwk1N2DCPcAKd9A8oT7FcGm029RMYAbEgTlZ6O203/RYQVsMRcH+VTH9c/3OOf v0P7Te7b8kOt0UuGTAOEGmG/scp3Cf1UdrC0Z3YZnhz/obwrr8ZA82+rZ2M2fkSHWMaart 7Ay8bhc6kAnVttMKf+M+yrdHkxxoB91BQaupcMbNGA8qoA1UsNRP+i3+bF5j1g== 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 4c2y292jxJz17Qf; Thu, 14 Aug 2025 20:46: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 57EKk9Oj006191; Thu, 14 Aug 2025 20:46:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57EKk9mC006188; Thu, 14 Aug 2025 20:46:09 GMT (envelope-from git) Date: Thu, 14 Aug 2025 20:46:09 GMT Message-Id: <202508142046.57EKk9mC006188@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: a66e5ce3d5c9 - main - depend-cleanup: Handle tcopy moving from C to C++ List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: a66e5ce3d5c9a38309ddc9e53c84dc7bab0f44bc Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a66e5ce3d5c9a38309ddc9e53c84dc7bab0f44bc commit a66e5ce3d5c9a38309ddc9e53c84dc7bab0f44bc Author: John Baldwin AuthorDate: 2025-08-14 20:45:21 +0000 Commit: John Baldwin CommitDate: 2025-08-14 20:46:01 +0000 depend-cleanup: Handle tcopy moving from C to C++ --- tools/build/depend-cleanup.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index 33ca8ecb709f..c2cb7877dd04 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -360,3 +360,6 @@ if [ -f "$OBJTOP"/lib/clang/liblldb/liblldb.a ]; then echo "Removing old static liblldb library" run rm -f "$OBJTOP"/lib/clang/liblldb/liblldb.a fi + +# 20250813 4f766afc1ca0 tcopy converted to C++ +clean_dep usr.bin/tcopy tcopy c From nobody Thu Aug 14 23:09:14 2025 X-Original-To: dev-commits-src-main@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 4c31CH0fMNz649pp; Thu, 14 Aug 2025 23:09:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c31CH0076z3LHK; Thu, 14 Aug 2025 23:09:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755212955; 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=Jh/EGNxpjUbBJ+7VyAz/0L/XqLtLqNbw7SGd1IDNuKw=; b=pM0J1iy/y+smZcx0pPKBpf/fgLfUyrEqAaLpxmXOVdQbI5dwmJaLO2j+l0CyE163FsGKKt HQHyya0iPKPa90IgIkvyfqHy+TI3XIPFeYzV+iygJnpFiTsV7+TX1jB2/0/L2T67jTP69g dm9PAY8X9MddMlhqW3+ulY/muKa082zaH/5Tvmg6ZA3/tOGnY9s69EPMmAocnU74NhdKKQ F9cxiGCNk391tRZI8seYMFSMFe2wj6Y3W4hObWy1RynPLjQPbLqCCDfnksElcSOM2cE/oQ XUcc3HrUqIkA2u8pyoVKPJJtEn0eG0828LxngqBeW4/yd59PM7mTP9n7TCFSUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755212955; 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=Jh/EGNxpjUbBJ+7VyAz/0L/XqLtLqNbw7SGd1IDNuKw=; b=oiK3bcK/q1QAvbxP7WUdXk1IhEgGKQjv8o5Cck73cRZRxd2Gst4l3i44wb8D4CITb1u+65 iq69Eq1VdEEdFr89H83KYJfGkutWGm3O9hKNeyY1pLscGTG8A1b+o29aVmruoAw9JyeYrm MLAfBO8p/l2euh/yujteEnUqULxLOF5l3yRxJETS/fjKId4yZcMBh3hH9c+5Z3ZTdrkv2+ Vvgmy0QBWu99YJvIyMdijkz8tnHYrV61gur/jYxPmvkFwNF4W8ziB2CpMUMyCkfeFSv+nG OU7aX8mIGGo2vFQkuGK8nHFuWv+31JW0oZUXsC4rYMMs9Su9LKfCgR+rHJPYWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755212955; a=rsa-sha256; cv=none; b=SL69s6k1GW03y0OFXSy06mSUkPom/zbx/kopgoCsr+xX+WSAu+wVVKaxA6/nJ3+tXOmuaP oPS/I+E3aJd4IPHUk9HFhfEnTPahJSRIyUv2BFHalYqGmpC+DPy7czGSmRp7O/M1fua2Xb lmvze0j7xFcQitaSnzGeiCfkMXT/J9MvOY7IPoxHxx+amfDJaU93Ddm/iW2OM3PRo7QDAn lt+I/a+bZKADmUXvWzq+iDl0MTEKoUJS2fkJUlUZ8RElqI/ib8TvNoxkyORqnaFO+nYdTw SdI74AeuXWG4mPzPFQ8+auv7kaC5WIcTvh/vfOPOeZ8aejg5oIWZC9WAb/JjhQ== 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 4c31CG5wTlz1CJX; Thu, 14 Aug 2025 23:09:14 +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 57EN9E0x068799; Thu, 14 Aug 2025 23:09:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57EN9EAu068796; Thu, 14 Aug 2025 23:09:14 GMT (envelope-from git) Date: Thu, 14 Aug 2025 23:09:14 GMT Message-Id: <202508142309.57EN9EAu068796@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 325e0b4c1a68 - main - zfs: install zhack(1) manual page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 325e0b4c1a682e879f5da0fd9801bcbb2ef8e7d0 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=325e0b4c1a682e879f5da0fd9801bcbb2ef8e7d0 commit 325e0b4c1a682e879f5da0fd9801bcbb2ef8e7d0 Author: Gleb Smirnoff AuthorDate: 2025-08-14 23:08:45 +0000 Commit: Gleb Smirnoff CommitDate: 2025-08-14 23:08:45 +0000 zfs: install zhack(1) manual page --- cddl/usr.sbin/zhack/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cddl/usr.sbin/zhack/Makefile b/cddl/usr.sbin/zhack/Makefile index c4fc25dcfb8f..69d561b3407b 100644 --- a/cddl/usr.sbin/zhack/Makefile +++ b/cddl/usr.sbin/zhack/Makefile @@ -1,8 +1,11 @@ -.PATH: ${SRCTOP}/sys/contrib/openzfs/cmd +ZFSTOP= ${SRCTOP}/sys/contrib/openzfs + +.PATH: ${ZFSTOP}/cmd +.PATH: ${ZFSTOP}/man/man1 PACKAGE= zfs PROG= zhack -MAN= +MAN= zhack.1 WARNS?= 0 CSTD= c99 From nobody Fri Aug 15 02:25:10 2025 X-Original-To: dev-commits-src-main@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 4c35YL65zfz64NXm; Fri, 15 Aug 2025 02:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c35YL5LMbz3cPS; Fri, 15 Aug 2025 02:25:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755224710; 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=uGggnycexsinOsvG66VIiXcjLLH4FwcDEK5U/C57sGE=; b=vhnETE6MKAD6oDRVxqyuuqlqutDK6KxxRuHqfuYX1rOAv+c5jWs9jr6sKBj3QZJMxGHIQh ZTKSOaQP6zzHAZregxmlyaythrdOZaonYJDNHJLTutmUb1GMQOqlQXKdj4nfyYk+Jq2N/Y /fzVSdBYht4Bsj/h1hFEswIqofPmNsuXRS59iRyijuqLHRTs8lv/JCzFbvYDzGf9YZ2qvj 0rpC8txQmcE5HUO+RvlqdqgULvqiP3WvB1VeOdT2/trWij3lzjr++a3ohoQEd7xc5o+uvv PBQ45+hk0PkKH7RAna5kYcVJ7JYmZ/fqqAhNPSs8Llqk10fiKOKI4ZzD7uwuVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755224710; 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=uGggnycexsinOsvG66VIiXcjLLH4FwcDEK5U/C57sGE=; b=lAuH4NY7kjE80iEcnP0D+33O821aIiAHUuE2beZXWDSfynB4h6pKRf4G1rJ6NantV/bPUc Tu5yxv8h+IicYdW5pntyIHHxNMGLVyfivFH4fS9W9VewiCk8I7C/u93UGaGDxtr4mjiUB3 PX5VHveVESaPhl9x8BwwovFz/3I8TGMYaZSCLLmcgMvjfojLvtrF1gLpabrwykNeBjyT+x a4G6ytEnGcuHICBOS6Au7tAtukDCo3OFsOyqPwLqm6knZyOjJ06/j0hBY+ikDFIZ9CN1f0 8anulTQxqTKwdW5g1MwOeStjjnek0JfauE9ZWGVqixs+0t+Uio56hBHEVx57Bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755224710; a=rsa-sha256; cv=none; b=nmRN9gD8Go1y203eeM+yDPofBGp/1bXSqtUtrlAjx64VuiBwxz/OilQJNjRwAjC+qXDWQl 6/EPiY3yqUriWk3JfWUz8Qk5Hf8ObyCgESFqJzxtubsMmJDBsh/AQY94PRogz0DY8LCDgn epNBC+aEJvdSLuRC2/tImRAnxPjPesTrYx6AIuGfJeZq1Q6Q5jXrWXZ1y8WFPObR+GzbaO ZEIYr8vrHB9h6FvavLMcey4rW+g0pBtGdkV4tOXtnFUVfYnCin0pQQvoIrFG0lpem7ejFl VsdSBVJ+Y/AH1yFOwqlxpaQ4SYmJMFyzyMXv+YEOi+dS5k0ZbdV1GC5FLi7hRw== 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 4c35YL4fV9z4c0; Fri, 15 Aug 2025 02:25: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 57F2PAgJ042760; Fri, 15 Aug 2025 02:25:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57F2PApc042757; Fri, 15 Aug 2025 02:25:10 GMT (envelope-from git) Date: Fri, 15 Aug 2025 02:25:10 GMT Message-Id: <202508150225.57F2PApc042757@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: c75550e49997 - main - syslogd.8: Remove incorrect .Aq List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c75550e499971549b31d514ab139b80297c14792 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=c75550e499971549b31d514ab139b80297c14792 commit c75550e499971549b31d514ab139b80297c14792 Author: Lexi Winter AuthorDate: 2025-08-15 02:24:23 +0000 Commit: Lexi Winter CommitDate: 2025-08-15 02:24:23 +0000 syslogd.8: Remove incorrect .Aq Using .Aq is wrong here, because the protocol says the prefix must use ASCII <>. MFC after: 3 days Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D51880 --- usr.sbin/syslogd/syslogd.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/syslogd/syslogd.8 b/usr.sbin/syslogd/syslogd.8 index fa61e78eaf3e..d39d9fdc8f5a 100644 --- a/usr.sbin/syslogd/syslogd.8 +++ b/usr.sbin/syslogd/syslogd.8 @@ -403,7 +403,7 @@ The message can contain a priority code, which should be a preceding decimal number in angle braces, for example, -.Sq Aq 5 . +.Sq <5> . This priority code should map into the priorities defined in the include file .In sys/syslog.h . From nobody Fri Aug 15 04:09:20 2025 X-Original-To: dev-commits-src-main@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 4c37sX41nwz64Tp7; Fri, 15 Aug 2025 04:09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c37sX3ZZ1z3mb1; Fri, 15 Aug 2025 04:09:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755230960; 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=1o028Cv3/4Oi772NCYGQfqvCLb0yUD2L/5y0b2DeNV0=; b=dv+TUC+SrtC/nalC3jdNlRTGpwCkrFUHbRKQtYeAVCqkC7ovbm1xt7nfiFKIOFuuf9kWGp f5zjRHQdDoEAMoxW2XVFJj0Y0NfPzENo2EZIjXlMKQnhE+dHyxDgSAdWyzx1jvnRE7DHnB XAuiKnv8qT1ak7dYIq0hvBYvHBhsWdMHpGrH9cT6D8Ypoc7jyO3hlXT6giDk8T8gWDYzBk IyT+1TORk79EWaCSoQZ7dYstQ5z9y5PUpLa6Anp4vfAHlaKZUTCqh8YrtOZ7LkM+VRvtU/ mu6PVnLdWsdNX2qflZv4xR0RR0LlMqba1Cmd7lAbmLJQ9ekPML9kNxtzxb5TJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755230960; 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=1o028Cv3/4Oi772NCYGQfqvCLb0yUD2L/5y0b2DeNV0=; b=vKMc47ixiGxqw4SA0crzP2n4h2ovXr0bUccFJfDaZ/QJ91cNVrsbG6a1cI0+HbV7xVrjup IflgKrfx9x6PbKZMNzTk4z3jJpdF29MPLwkr3Z5z8UiMKMwT3lzraMnOSdmuoekG4+BfBs 3ufznHsNGOiI+2RWMWyaovrCc3sbkVMBBEk0u/PhIvJZP16XwKwpNT6yElaY3w6DXyp4Rh GBGKo7KQH2Z1xd4B721T6rwpcP8KIa4K7/lmhJvNS+BtkMOQFkwcodvx6baPdtw+H9yWgc WQa2AtH5UnmqctPQcpb8YXTUOFfS8qTKEasi1ynfI2JXOwI4slU1JsQMgzGjeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755230960; a=rsa-sha256; cv=none; b=sfDFQ5/6G+8xqXkx1ViZJt01zbpBjpOlFfBA8NR+W9ijPX+spAkBMDE1FGSHCNvbVeRJUe uFeg25cIZc6+KFE4dkyTEOCxUOsoXiPuLXgXeIPJGtvpgE8kbMKy+67KQHxORexyPiBEtN faKzhrk/Px2ZrNYt32Us5w7v+0PzSlndThP0AXBPnu/VDOgW2FgD6gPtnHjpczJx0jh0YC YabMSNuvTwYOQ0AfwcCqgHwBWd9/kRxNgbQvhh22tIJRc2LTja6Gr2s0MLArgchLgkX0AP lCzKBj/p/9RXLH9pzToMU8JqltCMniPYLEnn1PZ4LkS9sbTp1iUBts1GnUNJ9A== 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 4c37sX2tK1z6cn; Fri, 15 Aug 2025 04:09: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 57F49Kbb033823; Fri, 15 Aug 2025 04:09:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57F49KOG033820; Fri, 15 Aug 2025 04:09:20 GMT (envelope-from git) Date: Fri, 15 Aug 2025 04:09:20 GMT Message-Id: <202508150409.57F49KOG033820@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: 9da2fe96ff2e - main - kern: fix setgroups(2) and getgroups(2) to match other platforms List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 9da2fe96ff2ea227e4d5f03ef92b55aabeabb7fc Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9da2fe96ff2ea227e4d5f03ef92b55aabeabb7fc commit 9da2fe96ff2ea227e4d5f03ef92b55aabeabb7fc Author: Kyle Evans AuthorDate: 2025-08-15 04:06:09 +0000 Commit: Kyle Evans CommitDate: 2025-08-15 04:06:09 +0000 kern: fix setgroups(2) and getgroups(2) to match other platforms On most other platforms observed, including OpenBSD, NetBSD, and Linux, these system calls have long since been converted to only touching the supplementary groups of the process. This poses both portability and security concerns in porting software to and from FreeBSD, as this subtle difference is a landmine waiting to happen. Bugs have been discovered even in FreeBSD-local sources, since this behavior is somewhat unintuitive (see, e.g., fix 48fd05999b0f for chroot(8)). Now that the egid is tracked outside of cr_groups in our ucred, convert the syscalls to deal with only supplementary groups. Some remaining stragglers in base that had baked in assumptions about these syscalls are fixed in the process to avoid heartburn in conversion. For relnotes: application developers should audit their use of both setgroups(2) and getgroups(2) for signs that they had assumed the previous FreeBSD behavior of using the first element for the egid. Any calls to setgroups() to clear groups that used a single array of the now or soon-to-be egid can be converted to setgroups(0, NULL) calls to clear the supplementary groups entirely on all FreeBSD versions. Co-authored-by: olce (but bugs are likely mine) Relnotes: yes (see last paragraph) Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D51648 --- lib/libc/include/compat.h | 3 ++ lib/libsys/Symbol.sys.map | 4 +- lib/libsys/getgroups.2 | 15 ++++-- lib/libsys/setgroups.2 | 36 ++++++------- sbin/hastd/subr.c | 9 ++-- sys/kern/kern_prot.c | 126 ++++++++++++++++++++++++++++------------------ sys/kern/syscalls.master | 16 +++++- usr.bin/newgrp/newgrp.c | 12 +++-- usr.bin/quota/quota.c | 11 ++-- usr.sbin/chroot/chroot.c | 9 +--- usr.sbin/lpr/lpc/lpc.c | 2 + 11 files changed, 145 insertions(+), 98 deletions(-) diff --git a/lib/libc/include/compat.h b/lib/libc/include/compat.h index 70fb8dcd97f3..97f22607ddd7 100644 --- a/lib/libc/include/compat.h +++ b/lib/libc/include/compat.h @@ -69,6 +69,9 @@ __sym_compat(kevent, freebsd11_kevent, FBSD_1.0); __sym_compat(swapoff, freebsd13_swapoff, FBSD_1.0); +__sym_compat(getgroups, freebsd14_getgroups, FBSD_1.0); +__sym_compat(setgroups, freebsd14_setgroups, FBSD_1.0); + #undef __sym_compat #define __weak_reference(sym,alias) \ diff --git a/lib/libsys/Symbol.sys.map b/lib/libsys/Symbol.sys.map index 45e0160100af..1a297f9df581 100644 --- a/lib/libsys/Symbol.sys.map +++ b/lib/libsys/Symbol.sys.map @@ -89,7 +89,6 @@ FBSD_1.0 { geteuid; getfh; getgid; - getgroups; getitimer; getpagesize; getpeername; @@ -204,7 +203,6 @@ FBSD_1.0 { setegid; seteuid; setgid; - setgroups; setitimer; setlogin; setpgid; @@ -380,11 +378,13 @@ FBSD_1.7 { FBSD_1.8 { exterrctl; fchroot; + getgroups; getrlimitusage; inotify_add_watch_at; inotify_rm_watch; kcmp; setcred; + setgroups; }; FBSDprivate_1.0 { diff --git a/lib/libsys/getgroups.2 b/lib/libsys/getgroups.2 index 91cca2748ec2..37c8fbad7215 100644 --- a/lib/libsys/getgroups.2 +++ b/lib/libsys/getgroups.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 21, 2011 +.Dd August 1, 2025 .Dt GETGROUPS 2 .Os .Sh NAME @@ -41,8 +41,8 @@ The .Fn getgroups system call -gets the current group access list of the user process -and stores it in the array +gets the current supplementary groups of the user process and stores it in the +array .Fa gidset . The .Fa gidsetlen @@ -54,7 +54,7 @@ The system call returns the actual number of groups returned in .Fa gidset . -At least one and as many as {NGROUPS_MAX}+1 values may be returned. +As many as {NGROUPS_MAX} values may be returned. If .Fa gidsetlen is zero, @@ -102,3 +102,10 @@ The .Fn getgroups system call appeared in .Bx 4.2 . +.Pp +Before +.Fx 15.0 , +the +.Fn getgroups +system call always returned the effective group ID for the process as the first +element of the array, before the supplementary groups. diff --git a/lib/libsys/setgroups.2 b/lib/libsys/setgroups.2 index a226aeafea96..451f63ba1266 100644 --- a/lib/libsys/setgroups.2 +++ b/lib/libsys/setgroups.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 19, 2018 +.Dd August 1, 2025 .Dt SETGROUPS 2 .Os .Sh NAME @@ -42,7 +42,7 @@ The .Fn setgroups system call -sets the group access list of the current user process +sets the supplementary group list of the current user process according to the array .Fa gidset . The @@ -50,26 +50,12 @@ The argument indicates the number of entries in the array and must be no more than -.Dv {NGROUPS_MAX}+1 . -.Pp -Only the super-user may set a new group list. +.Dv {NGROUPS_MAX} . +The +.Fa ngroups +argument may be set to 0 to clear the supplementary group list. .Pp -The first entry of the group array -.Pq Va gidset[0] -is used as the effective group-ID for the process. -This entry is over-written when a setgid program is run. -To avoid losing access to the privileges of the -.Va gidset[0] -entry, it should be duplicated later in the group array. -By convention, -this happens because the group value indicated -in the password file also appears in -.Pa /etc/group . -The group value in the password file is placed in -.Va gidset[0] -and that value then gets added a second time when the -.Pa /etc/group -file is scanned to create the group set. +Only the super-user may set a new supplementary group list. .Sh RETURN VALUES .Rv -std setgroups .Sh ERRORS @@ -99,3 +85,11 @@ The .Fn setgroups system call appeared in .Bx 4.2 . +.Pp +Before +.Fx 15.0 , +the +.Fn setgroups +system call would set the effective group ID for the process to the first +element of +.Fa gidset . diff --git a/sbin/hastd/subr.c b/sbin/hastd/subr.c index 2a26482b3727..284fb0d07647 100644 --- a/sbin/hastd/subr.c +++ b/sbin/hastd/subr.c @@ -207,10 +207,8 @@ drop_privs(const struct hast_resource *res) } } PJDLOG_VERIFY(chdir("/") == 0); - gidset[0] = pw->pw_gid; - if (setgroups(1, gidset) == -1) { - pjdlog_errno(LOG_ERR, "Unable to set groups to gid %u", - (unsigned int)pw->pw_gid); + if (setgroups(0, NULL) == -1) { + pjdlog_errno(LOG_ERR, "Unable to drop supplementary groups"); return (-1); } if (setgid(pw->pw_gid) == -1) { @@ -287,8 +285,7 @@ drop_privs(const struct hast_resource *res) PJDLOG_VERIFY(egid == pw->pw_gid); PJDLOG_VERIFY(sgid == pw->pw_gid); PJDLOG_VERIFY(getgroups(0, NULL) == 1); - PJDLOG_VERIFY(getgroups(1, gidset) == 1); - PJDLOG_VERIFY(gidset[0] == pw->pw_gid); + PJDLOG_VERIFY(getgroups(1, gidset) == 0); pjdlog_debug(1, "Privileges successfully dropped using %s%s+setgid+setuid.", diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 2cd5b7069023..beab30a9d157 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -310,6 +310,39 @@ sys_getegid(struct thread *td, struct getegid_args *uap) return (0); } +#ifdef COMPAT_FREEBSD14 +int +freebsd14_getgroups(struct thread *td, struct freebsd14_getgroups_args *uap) +{ + struct ucred *cred; + int ngrp, error; + + cred = td->td_ucred; + + /* + * For FreeBSD < 15.0, we account for the egid being placed at the + * beginning of the group list prior to all supplementary groups. + */ + ngrp = cred->cr_ngroups + 1; + if (uap->gidsetsize == 0) { + error = 0; + goto out; + } else if (uap->gidsetsize < ngrp) { + return (EINVAL); + } + + error = copyout(&cred->cr_gid, uap->gidset, sizeof(gid_t)); + if (error != 0) + error = copyout(cred->cr_groups, uap->gidset + 1, + (ngrp - 1) * sizeof(gid_t)); + +out: + td->td_retval[0] = ngrp; + return (error); + +} +#endif /* COMPAT_FREEBSD14 */ + #ifndef _SYS_SYSPROTO_H_ struct getgroups_args { int gidsetsize; @@ -320,18 +353,11 @@ int sys_getgroups(struct thread *td, struct getgroups_args *uap) { struct ucred *cred; - gid_t *ugidset; int ngrp, error; cred = td->td_ucred; - /* - * cr_gid has been moved out of cr_groups, but we'll continue exporting - * the egid as groups[0] for the time being until we audit userland for - * any surprises. - */ - ngrp = cred->cr_ngroups + 1; - + ngrp = cred->cr_ngroups; if (uap->gidsetsize == 0) { error = 0; goto out; @@ -339,14 +365,7 @@ sys_getgroups(struct thread *td, struct getgroups_args *uap) if (uap->gidsetsize < ngrp) return (EINVAL); - ugidset = uap->gidset; - error = copyout(&cred->cr_gid, ugidset, sizeof(*ugidset)); - if (error != 0) - goto out; - - if (ngrp > 1) - error = copyout(cred->cr_groups, ugidset + 1, - (ngrp - 1) * sizeof(*ugidset)); + error = copyout(cred->cr_groups, uap->gidset, ngrp * sizeof(gid_t)); out: td->td_retval[0] = ngrp; return (error); @@ -1186,6 +1205,44 @@ fail: return (error); } +#ifdef COMPAT_FREEBSD14 +int +freebsd14_setgroups(struct thread *td, struct freebsd14_setgroups_args *uap) +{ + gid_t smallgroups[CRED_SMALLGROUPS_NB]; + gid_t *groups; + int gidsetsize, error; + + /* + * Before FreeBSD 15.0, we allow one more group to be supplied to + * account for the egid appearing before the supplementary groups. This + * may technically allow one more supplementary group for systems that + * did use the default NGROUPS_MAX if we round it back up to 1024. + */ + gidsetsize = uap->gidsetsize; + if (gidsetsize > ngroups_max + 1 || gidsetsize < 0) + return (EINVAL); + + if (gidsetsize > CRED_SMALLGROUPS_NB) + groups = malloc(gidsetsize * sizeof(gid_t), M_TEMP, M_WAITOK); + else + groups = smallgroups; + + error = copyin(uap->gidset, groups, gidsetsize * sizeof(gid_t)); + if (error == 0) { + int ngroups = gidsetsize > 0 ? gidsetsize - 1 /* egid */ : 0; + + error = kern_setgroups(td, &ngroups, groups + 1); + if (error == 0 && gidsetsize > 0) + td->td_proc->p_ucred->cr_gid = groups[0]; + } + + if (groups != smallgroups) + free(groups, M_TEMP); + return (error); +} +#endif /* COMPAT_FREEBSD14 */ + #ifndef _SYS_SYSPROTO_H_ struct setgroups_args { int gidsetsize; @@ -1210,8 +1267,7 @@ sys_setgroups(struct thread *td, struct setgroups_args *uap) * setgroups() differ. */ gidsetsize = uap->gidsetsize; - /* XXXKE Limit to ngroups_max when we change the userland interface. */ - if (gidsetsize > ngroups_max + 1 || gidsetsize < 0) + if (gidsetsize > ngroups_max || gidsetsize < 0) return (EINVAL); if (gidsetsize > CRED_SMALLGROUPS_NB) @@ -1238,35 +1294,17 @@ kern_setgroups(struct thread *td, int *ngrpp, gid_t *groups) struct proc *p = td->td_proc; struct ucred *newcred, *oldcred; int ngrp, error; - gid_t egid; ngrp = *ngrpp; /* Sanity check size. */ - /* XXXKE Limit to ngroups_max when we change the userland interface. */ - if (ngrp < 0 || ngrp > ngroups_max + 1) + if (ngrp < 0 || ngrp > ngroups_max) return (EINVAL); AUDIT_ARG_GROUPSET(groups, ngrp); - /* - * setgroups(0, NULL) is a legitimate way of clearing the groups vector - * on non-BSD systems (which generally do not have the egid in the - * groups[0]). We risk security holes when running non-BSD software if - * we do not do the same. So we allow and treat 0 for 'ngrp' specially - * below (twice). - */ - if (ngrp != 0) { - /* - * To maintain userland compat for now, we use the first group - * as our egid and we'll use the rest as our supplemental - * groups. - */ - egid = groups[0]; - ngrp--; - groups++; - groups_normalize(&ngrp, groups); - *ngrpp = ngrp; - } + groups_normalize(&ngrp, groups); + *ngrpp = ngrp; + newcred = crget(); crextend(newcred, ngrp); PROC_LOCK(p); @@ -1289,15 +1327,7 @@ kern_setgroups(struct thread *td, int *ngrpp, gid_t *groups) if (error) goto fail; - /* - * If some groups were passed, the first one is currently the desired - * egid. This code is to be removed (along with some commented block - * above) when setgroups() is changed to take only supplementary groups. - */ - if (ngrp != 0) - newcred->cr_gid = egid; crsetgroups_internal(newcred, ngrp, groups); - setsugid(p); proc_set_cred(p, newcred); PROC_UNLOCK(p); diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 53b5d3cbbba9..fa64597d14a5 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -552,13 +552,13 @@ _Out_writes_bytes_(len/PAGE_SIZE) char *vec ); } -79 AUE_GETGROUPS STD|CAPENABLED { +79 AUE_GETGROUPS STD|CAPENABLED|COMPAT14 { int getgroups( int gidsetsize, _Out_writes_opt_(gidsetsize) gid_t *gidset ); } -80 AUE_SETGROUPS STD { +80 AUE_SETGROUPS STD|COMPAT14 { int setgroups( int gidsetsize, _In_reads_(gidsetsize) const gid_t *gidset @@ -3371,5 +3371,17 @@ int wd ); } +595 AUE_GETGROUPS STD|CAPENABLED { + int getgroups( + int gidsetsize, + _Out_writes_opt_(gidsetsize) gid_t *gidset + ); + } +596 AUE_SETGROUPS STD { + int setgroups( + int gidsetsize, + _In_reads_(gidsetsize) const gid_t *gidset + ); + } ; vim: syntax=off diff --git a/usr.bin/newgrp/newgrp.c b/usr.bin/newgrp/newgrp.c index f1da1c8cb1f5..0971f4d13b49 100644 --- a/usr.bin/newgrp/newgrp.c +++ b/usr.bin/newgrp/newgrp.c @@ -186,7 +186,7 @@ addgroup(const char *grpname) } } - ngrps_max = sysconf(_SC_NGROUPS_MAX) + 1; + ngrps_max = sysconf(_SC_NGROUPS_MAX); if ((grps = malloc(sizeof(gid_t) * ngrps_max)) == NULL) err(1, "malloc"); if ((ngrps = getgroups(ngrps_max, (gid_t *)grps)) < 0) { @@ -194,7 +194,12 @@ addgroup(const char *grpname) goto end; } - /* Remove requested gid from supp. list if it exists. */ + /* + * Remove requested gid from supp. list if it exists and doesn't match + * our prior egid -- this exception is to avoid providing the user a + * means to get rid of a group that could be used for, e.g., negative + * permissions. + */ if (grp->gr_gid != egid && inarray(grp->gr_gid, grps, ngrps)) { for (i = 0; i < ngrps; i++) if (grps[i] == grp->gr_gid) @@ -217,10 +222,9 @@ addgroup(const char *grpname) goto end; } PRIV_END; - grps[0] = grp->gr_gid; /* Add old effective gid to supp. list if it does not exist. */ - if (egid != grp->gr_gid && !inarray(egid, grps, ngrps)) { + if (!inarray(egid, grps, ngrps)) { if (ngrps == ngrps_max) warnx("too many groups"); else { diff --git a/usr.bin/quota/quota.c b/usr.bin/quota/quota.c index b5d28fd7c184..9ad4076cec40 100644 --- a/usr.bin/quota/quota.c +++ b/usr.bin/quota/quota.c @@ -100,8 +100,7 @@ static char *filename = NULL; int main(int argc, char *argv[]) { - int ngroups; - gid_t mygid, gidset[NGROUPS]; + int ngroups; int i, ch, gflag = 0, uflag = 0, errflag = 0; while ((ch = getopt(argc, argv, "f:ghlrquv")) != -1) { @@ -142,11 +141,15 @@ main(int argc, char *argv[]) if (uflag) errflag += showuid(getuid()); if (gflag) { + gid_t mygid, myegid, gidset[NGROUPS_MAX]; + mygid = getgid(); - ngroups = getgroups(NGROUPS, gidset); + errflag += showgid(mygid); + myegid = getegid(); + errflag += showgid(myegid); + ngroups = getgroups(NGROUPS_MAX, gidset); if (ngroups < 0) err(1, "getgroups"); - errflag += showgid(mygid); for (i = 0; i < ngroups; i++) if (gidset[i] != mygid) errflag += showgid(gidset[i]); diff --git a/usr.sbin/chroot/chroot.c b/usr.sbin/chroot/chroot.c index 7ec5a00b50f0..e1af0a4131d3 100644 --- a/usr.sbin/chroot/chroot.c +++ b/usr.sbin/chroot/chroot.c @@ -147,15 +147,10 @@ main(int argc, char *argv[]) gid = resolve_group(group); if (grouplist != NULL) { - ngroups_max = sysconf(_SC_NGROUPS_MAX) + 1; + ngroups_max = sysconf(_SC_NGROUPS_MAX); if ((gidlist = malloc(sizeof(gid_t) * ngroups_max)) == NULL) err(1, "malloc"); - /* Populate the egid slot in our groups to avoid accidents. */ - if (gid == 0) - gidlist[0] = getegid(); - else - gidlist[0] = gid; - for (gids = 1; (p = strsep(&grouplist, ",")) != NULL && + for (gids = 0; (p = strsep(&grouplist, ",")) != NULL && gids < ngroups_max; ) { if (*p == '\0') continue; diff --git a/usr.sbin/lpr/lpc/lpc.c b/usr.sbin/lpr/lpc/lpc.c index a3da852de46e..b4db5bb2e29f 100644 --- a/usr.sbin/lpr/lpc/lpc.c +++ b/usr.sbin/lpr/lpc/lpc.c @@ -358,6 +358,8 @@ ingroup(const char *grname) err(1, "getgroups"); } gid = gptr->gr_gid; + if (gid == getegid()) + return(1); for (i = 0; i < ngroups; i++) if (gid == groups[i]) return(1); From nobody Fri Aug 15 04:09:21 2025 X-Original-To: dev-commits-src-main@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 4c37sY56Wrz64V5Y; Fri, 15 Aug 2025 04:09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c37sY3qCZz3mVc; Fri, 15 Aug 2025 04:09:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755230961; 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=i2c/E6Z9NkW2ZrvXyGnZWKCF76+BqfO/FPisBLesCWY=; b=cW6OWL0270u5TB1Uk1l+uQHWh7XB2Et7ku009Bw/34KjeCx1bLDD/wBETQv04WJzgfedxv +oHzVuyGe8l6ytII3da53MIMEUu0CgH6YVl5tizUe5v/6JuGq20OvbW2dcovr2AZTjSCTU rgP2if6E4/42qQKoPvpHzvqpsQ/Bj8nXNsrYtdNF6scd9rc+4SS+BCTZ542/kDhwNAT8aU YtgKxMiB9iBiY3H1qjqsLw7YpUyjEUZfWIp501uLB/qs6Y0BlH1ItHpoR/Cbtg5SbroHXC d/QVZfWvlAEzXMErRXFCOOGc4Q0K9SHCmgdB3DlamXPvZBs28WBdBvr2afGo0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755230961; 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=i2c/E6Z9NkW2ZrvXyGnZWKCF76+BqfO/FPisBLesCWY=; b=f/M31hz+mGmEWAeDJPOfKIS7TF+1YLgQbjnFSnaiKbBrMSIe/wGmR8Mf332XoohR5kewpF oXzRsWR4DiXvtI3ykEraO+YAk+vOL4DmpVsDGXEXprfiYLMTRD5LIukwDIeSR/RpDGJZxZ avMIW5BefOHPHFmh4yx7vjeHjvsn/QgOsYLr5tX0NMaigjIU+IWxP2lcABrThYQnhR9Qhg wBy+pr0d0gT14wQT1KHozm4ltT9rj7n7ST/10ZYbIJnywytY4LgpI7qXxEZYJEZBs9ALmC HJXx2y8UeTW0Sza7ePf+WsaXdzsZAdt8ec0SMDpGUqvfZIi1uoDcWnf5oAVQCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755230961; a=rsa-sha256; cv=none; b=pmSU19k3VynpG7U/mL1GZF/qNNvFVmVN12mEYy0qxmw9zos6Jy1Z4Wp5UboJEx044zgzoc TsUUuNk6d5zPZUQqfpZjDV24LDFx62hZhUKs+QtiuzWpjNj87uanCbH3+A8XiqNVn8Ii9M wlNkMy8SX1a/dNFNZqjY/a+/sfVm12iuu/RxsqACb5hCvpA/gTMffQDnXaXEQtgsg/Jxbn +b/BMSfRObIKB4a+TQcxF576cNqOdDfb+wK467bojTCcf55aOlSgTN2iNJK2GdRQyfe//e RYE3lhhXciEf/JYC3MQw8A2aT59aJU3BoPTx9vAVcL41LJUUUEnUbPiaOGuYOw== 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 4c37sY3P63z7Mp; Fri, 15 Aug 2025 04:09: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 57F49LGL033857; Fri, 15 Aug 2025 04:09:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57F49LfQ033854; Fri, 15 Aug 2025 04:09:21 GMT (envelope-from git) Date: Fri, 15 Aug 2025 04:09:21 GMT Message-Id: <202508150409.57F49LfQ033854@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: 10708fdc0b4c - main - sysent: regenerate after bumping setgroups/getgroups List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 10708fdc0b4c0ed92b7e556a04f81b011fd7f8d7 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=10708fdc0b4c0ed92b7e556a04f81b011fd7f8d7 commit 10708fdc0b4c0ed92b7e556a04f81b011fd7f8d7 Author: Kyle Evans AuthorDate: 2025-08-15 04:06:10 +0000 Commit: Kyle Evans CommitDate: 2025-08-15 04:06:20 +0000 sysent: regenerate after bumping setgroups/getgroups --- lib/libsys/_libsys.h | 8 +- lib/libsys/syscalls.map | 8 +- sys/compat/freebsd32/freebsd32_syscall.h | 8 +- sys/compat/freebsd32/freebsd32_syscalls.c | 6 +- sys/compat/freebsd32/freebsd32_sysent.c | 6 +- sys/compat/freebsd32/freebsd32_systrace_args.c | 104 ++++++++++++------------- sys/kern/init_sysent.c | 6 +- sys/kern/syscalls.c | 6 +- sys/kern/systrace_args.c | 104 ++++++++++++------------- sys/sys/syscall.h | 8 +- sys/sys/syscall.mk | 8 +- sys/sys/sysproto.h | 36 ++++++--- 12 files changed, 167 insertions(+), 141 deletions(-) diff --git a/lib/libsys/_libsys.h b/lib/libsys/_libsys.h index 2f89e8fea92b..34eebc1aa67a 100644 --- a/lib/libsys/_libsys.h +++ b/lib/libsys/_libsys.h @@ -121,8 +121,6 @@ typedef int (__sys_munmap_t)(void *, size_t); typedef int (__sys_mprotect_t)(void *, size_t, int); typedef int (__sys_madvise_t)(void *, size_t, int); typedef int (__sys_mincore_t)(const void *, size_t, char *); -typedef int (__sys_getgroups_t)(int, gid_t *); -typedef int (__sys_setgroups_t)(int, const gid_t *); typedef int (__sys_getpgrp_t)(void); typedef int (__sys_setpgid_t)(int, int); typedef int (__sys_setitimer_t)(int, const struct itimerval *, struct itimerval *); @@ -468,6 +466,8 @@ typedef int (__sys_setcred_t)(u_int, const struct setcred *, size_t); typedef int (__sys_exterrctl_t)(u_int, u_int, void *); typedef int (__sys_inotify_add_watch_at_t)(int, int, const char *, uint32_t); typedef int (__sys_inotify_rm_watch_t)(int, int); +typedef int (__sys_getgroups_t)(int, gid_t *); +typedef int (__sys_setgroups_t)(int, const gid_t *); _Noreturn void __sys__exit(int rval); int __sys_fork(void); @@ -525,8 +525,6 @@ int __sys_munmap(void * addr, size_t len); int __sys_mprotect(void * addr, size_t len, int prot); int __sys_madvise(void * addr, size_t len, int behav); int __sys_mincore(const void * addr, size_t len, char * vec); -int __sys_getgroups(int gidsetsize, gid_t * gidset); -int __sys_setgroups(int gidsetsize, const gid_t * gidset); int __sys_getpgrp(void); int __sys_setpgid(int pid, int pgid); int __sys_setitimer(int which, const struct itimerval * itv, struct itimerval * oitv); @@ -872,6 +870,8 @@ int __sys_setcred(u_int flags, const struct setcred * wcred, size_t size); int __sys_exterrctl(u_int op, u_int flags, void * ptr); int __sys_inotify_add_watch_at(int fd, int dfd, const char * path, uint32_t mask); int __sys_inotify_rm_watch(int fd, int wd); +int __sys_getgroups(int gidsetsize, gid_t * gidset); +int __sys_setgroups(int gidsetsize, const gid_t * gidset); __END_DECLS #endif /* __LIBSYS_H_ */ diff --git a/lib/libsys/syscalls.map b/lib/libsys/syscalls.map index dbb011343c8f..4cf80a2ffc69 100644 --- a/lib/libsys/syscalls.map +++ b/lib/libsys/syscalls.map @@ -117,10 +117,6 @@ FBSDprivate_1.0 { __sys_madvise; _mincore; __sys_mincore; - _getgroups; - __sys_getgroups; - _setgroups; - __sys_setgroups; _getpgrp; __sys_getpgrp; _setpgid; @@ -813,4 +809,8 @@ FBSDprivate_1.0 { __sys_inotify_add_watch_at; _inotify_rm_watch; __sys_inotify_rm_watch; + _getgroups; + __sys_getgroups; + _setgroups; + __sys_setgroups; }; diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index 971510ebb6b6..90cd21a80923 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -83,8 +83,8 @@ /* 76 is obsolete vhangup */ /* 77 is obsolete vlimit */ #define FREEBSD32_SYS_mincore 78 -#define FREEBSD32_SYS_getgroups 79 -#define FREEBSD32_SYS_setgroups 80 +#define FREEBSD32_SYS_freebsd14_getgroups 79 +#define FREEBSD32_SYS_freebsd14_setgroups 80 #define FREEBSD32_SYS_getpgrp 81 #define FREEBSD32_SYS_setpgid 82 #define FREEBSD32_SYS_freebsd32_setitimer 83 @@ -513,4 +513,6 @@ #define FREEBSD32_SYS_exterrctl 592 #define FREEBSD32_SYS_inotify_add_watch_at 593 #define FREEBSD32_SYS_inotify_rm_watch 594 -#define FREEBSD32_SYS_MAXSYSCALL 595 +#define FREEBSD32_SYS_getgroups 595 +#define FREEBSD32_SYS_setgroups 596 +#define FREEBSD32_SYS_MAXSYSCALL 597 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 79c414b675b1..f0f8d26554b5 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -84,8 +84,8 @@ const char *freebsd32_syscallnames[] = { "obs_vhangup", /* 76 = obsolete vhangup */ "obs_vlimit", /* 77 = obsolete vlimit */ "mincore", /* 78 = mincore */ - "getgroups", /* 79 = getgroups */ - "setgroups", /* 80 = setgroups */ + "compat14.getgroups", /* 79 = freebsd14 getgroups */ + "compat14.setgroups", /* 80 = freebsd14 setgroups */ "getpgrp", /* 81 = getpgrp */ "setpgid", /* 82 = setpgid */ "freebsd32_setitimer", /* 83 = freebsd32_setitimer */ @@ -600,4 +600,6 @@ const char *freebsd32_syscallnames[] = { "exterrctl", /* 592 = exterrctl */ "inotify_add_watch_at", /* 593 = inotify_add_watch_at */ "inotify_rm_watch", /* 594 = inotify_rm_watch */ + "getgroups", /* 595 = getgroups */ + "setgroups", /* 596 = setgroups */ }; diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 1a4b0d87722c..12f1a346c3e9 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -146,8 +146,8 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 76 = obsolete vhangup */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 77 = obsolete vlimit */ { .sy_narg = AS(mincore_args), .sy_call = (sy_call_t *)sys_mincore, .sy_auevent = AUE_MINCORE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 78 = mincore */ - { .sy_narg = AS(getgroups_args), .sy_call = (sy_call_t *)sys_getgroups, .sy_auevent = AUE_GETGROUPS, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 79 = getgroups */ - { .sy_narg = AS(setgroups_args), .sy_call = (sy_call_t *)sys_setgroups, .sy_auevent = AUE_SETGROUPS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 80 = setgroups */ + { compat14(AS(freebsd14_getgroups_args),getgroups), .sy_auevent = AUE_GETGROUPS, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 79 = freebsd14 getgroups */ + { compat14(AS(freebsd14_setgroups_args),setgroups), .sy_auevent = AUE_SETGROUPS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 80 = freebsd14 setgroups */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_getpgrp, .sy_auevent = AUE_GETPGRP, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 81 = getpgrp */ { .sy_narg = AS(setpgid_args), .sy_call = (sy_call_t *)sys_setpgid, .sy_auevent = AUE_SETPGRP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 82 = setpgid */ { .sy_narg = AS(freebsd32_setitimer_args), .sy_call = (sy_call_t *)freebsd32_setitimer, .sy_auevent = AUE_SETITIMER, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 83 = freebsd32_setitimer */ @@ -662,4 +662,6 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(exterrctl_args), .sy_call = (sy_call_t *)sys_exterrctl, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 592 = exterrctl */ { .sy_narg = AS(inotify_add_watch_at_args), .sy_call = (sy_call_t *)sys_inotify_add_watch_at, .sy_auevent = AUE_INOTIFY, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 593 = inotify_add_watch_at */ { .sy_narg = AS(inotify_rm_watch_args), .sy_call = (sy_call_t *)sys_inotify_rm_watch, .sy_auevent = AUE_INOTIFY, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 594 = inotify_rm_watch */ + { .sy_narg = AS(getgroups_args), .sy_call = (sy_call_t *)sys_getgroups, .sy_auevent = AUE_GETGROUPS, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 595 = getgroups */ + { .sy_narg = AS(setgroups_args), .sy_call = (sy_call_t *)sys_setgroups, .sy_auevent = AUE_SETGROUPS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 596 = setgroups */ }; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index f9dc514bee7d..e471c5148021 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -457,22 +457,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 3; break; } - /* getgroups */ - case 79: { - struct getgroups_args *p = params; - iarg[a++] = p->gidsetsize; /* int */ - uarg[a++] = (intptr_t)p->gidset; /* gid_t * */ - *n_args = 2; - break; - } - /* setgroups */ - case 80: { - struct setgroups_args *p = params; - iarg[a++] = p->gidsetsize; /* int */ - uarg[a++] = (intptr_t)p->gidset; /* const gid_t * */ - *n_args = 2; - break; - } /* getpgrp */ case 81: { *n_args = 0; @@ -3413,6 +3397,22 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 2; break; } + /* getgroups */ + case 595: { + struct getgroups_args *p = params; + iarg[a++] = p->gidsetsize; /* int */ + uarg[a++] = (intptr_t)p->gidset; /* gid_t * */ + *n_args = 2; + break; + } + /* setgroups */ + case 596: { + struct setgroups_args *p = params; + iarg[a++] = p->gidsetsize; /* int */ + uarg[a++] = (intptr_t)p->gidset; /* const gid_t * */ + *n_args = 2; + break; + } default: *n_args = 0; break; @@ -4112,32 +4112,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* getgroups */ - case 79: - switch (ndx) { - case 0: - p = "int"; - break; - case 1: - p = "userland gid_t *"; - break; - default: - break; - }; - break; - /* setgroups */ - case 80: - switch (ndx) { - case 0: - p = "int"; - break; - case 1: - p = "userland const gid_t *"; - break; - default: - break; - }; - break; /* getpgrp */ case 81: break; @@ -9222,6 +9196,32 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* getgroups */ + case 595: + switch (ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland gid_t *"; + break; + default: + break; + }; + break; + /* setgroups */ + case 596: + switch (ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland const gid_t *"; + break; + default: + break; + }; + break; default: break; }; @@ -9488,16 +9488,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* getgroups */ - case 79: - if (ndx == 0 || ndx == 1) - p = "int"; - break; - /* setgroups */ - case 80: - if (ndx == 0 || ndx == 1) - p = "int"; - break; /* getpgrp */ case 81: /* setpgid */ @@ -11130,6 +11120,16 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* getgroups */ + case 595: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* setgroups */ + case 596: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index c0a5479c9634..fcd232cde21e 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -145,8 +145,8 @@ struct sysent sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 76 = obsolete vhangup */ { .sy_narg = 0, .sy_call = (sy_call_t *)nosys, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_ABSENT }, /* 77 = obsolete vlimit */ { .sy_narg = AS(mincore_args), .sy_call = (sy_call_t *)sys_mincore, .sy_auevent = AUE_MINCORE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 78 = mincore */ - { .sy_narg = AS(getgroups_args), .sy_call = (sy_call_t *)sys_getgroups, .sy_auevent = AUE_GETGROUPS, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 79 = getgroups */ - { .sy_narg = AS(setgroups_args), .sy_call = (sy_call_t *)sys_setgroups, .sy_auevent = AUE_SETGROUPS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 80 = setgroups */ + { compat14(AS(freebsd14_getgroups_args),getgroups), .sy_auevent = AUE_GETGROUPS, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 79 = freebsd14 getgroups */ + { compat14(AS(freebsd14_setgroups_args),setgroups), .sy_auevent = AUE_SETGROUPS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 80 = freebsd14 setgroups */ { .sy_narg = 0, .sy_call = (sy_call_t *)sys_getpgrp, .sy_auevent = AUE_GETPGRP, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 81 = getpgrp */ { .sy_narg = AS(setpgid_args), .sy_call = (sy_call_t *)sys_setpgid, .sy_auevent = AUE_SETPGRP, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 82 = setpgid */ { .sy_narg = AS(setitimer_args), .sy_call = (sy_call_t *)sys_setitimer, .sy_auevent = AUE_SETITIMER, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 83 = setitimer */ @@ -661,4 +661,6 @@ struct sysent sysent[] = { { .sy_narg = AS(exterrctl_args), .sy_call = (sy_call_t *)sys_exterrctl, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 592 = exterrctl */ { .sy_narg = AS(inotify_add_watch_at_args), .sy_call = (sy_call_t *)sys_inotify_add_watch_at, .sy_auevent = AUE_INOTIFY, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 593 = inotify_add_watch_at */ { .sy_narg = AS(inotify_rm_watch_args), .sy_call = (sy_call_t *)sys_inotify_rm_watch, .sy_auevent = AUE_INOTIFY, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 594 = inotify_rm_watch */ + { .sy_narg = AS(getgroups_args), .sy_call = (sy_call_t *)sys_getgroups, .sy_auevent = AUE_GETGROUPS, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 595 = getgroups */ + { .sy_narg = AS(setgroups_args), .sy_call = (sy_call_t *)sys_setgroups, .sy_auevent = AUE_SETGROUPS, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 596 = setgroups */ }; diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index 09bf4d519927..4122f9261871 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -84,8 +84,8 @@ const char *syscallnames[] = { "obs_vhangup", /* 76 = obsolete vhangup */ "obs_vlimit", /* 77 = obsolete vlimit */ "mincore", /* 78 = mincore */ - "getgroups", /* 79 = getgroups */ - "setgroups", /* 80 = setgroups */ + "compat14.getgroups", /* 79 = freebsd14 getgroups */ + "compat14.setgroups", /* 80 = freebsd14 setgroups */ "getpgrp", /* 81 = getpgrp */ "setpgid", /* 82 = setpgid */ "setitimer", /* 83 = setitimer */ @@ -600,4 +600,6 @@ const char *syscallnames[] = { "exterrctl", /* 592 = exterrctl */ "inotify_add_watch_at", /* 593 = inotify_add_watch_at */ "inotify_rm_watch", /* 594 = inotify_rm_watch */ + "getgroups", /* 595 = getgroups */ + "setgroups", /* 596 = setgroups */ }; diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index 4dfc63924da9..2b1ea9eed8d4 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -454,22 +454,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 3; break; } - /* getgroups */ - case 79: { - struct getgroups_args *p = params; - iarg[a++] = p->gidsetsize; /* int */ - uarg[a++] = (intptr_t)p->gidset; /* gid_t * */ - *n_args = 2; - break; - } - /* setgroups */ - case 80: { - struct setgroups_args *p = params; - iarg[a++] = p->gidsetsize; /* int */ - uarg[a++] = (intptr_t)p->gidset; /* const gid_t * */ - *n_args = 2; - break; - } /* getpgrp */ case 81: { *n_args = 0; @@ -3500,6 +3484,22 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 2; break; } + /* getgroups */ + case 595: { + struct getgroups_args *p = params; + iarg[a++] = p->gidsetsize; /* int */ + uarg[a++] = (intptr_t)p->gidset; /* gid_t * */ + *n_args = 2; + break; + } + /* setgroups */ + case 596: { + struct setgroups_args *p = params; + iarg[a++] = p->gidsetsize; /* int */ + uarg[a++] = (intptr_t)p->gidset; /* const gid_t * */ + *n_args = 2; + break; + } default: *n_args = 0; break; @@ -4199,32 +4199,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; - /* getgroups */ - case 79: - switch (ndx) { - case 0: - p = "int"; - break; - case 1: - p = "userland gid_t *"; - break; - default: - break; - }; - break; - /* setgroups */ - case 80: - switch (ndx) { - case 0: - p = "int"; - break; - case 1: - p = "userland const gid_t *"; - break; - default: - break; - }; - break; /* getpgrp */ case 81: break; @@ -9367,6 +9341,32 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* getgroups */ + case 595: + switch (ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland gid_t *"; + break; + default: + break; + }; + break; + /* setgroups */ + case 596: + switch (ndx) { + case 0: + p = "int"; + break; + case 1: + p = "userland const gid_t *"; + break; + default: + break; + }; + break; default: break; }; @@ -9633,16 +9633,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; - /* getgroups */ - case 79: - if (ndx == 0 || ndx == 1) - p = "int"; - break; - /* setgroups */ - case 80: - if (ndx == 0 || ndx == 1) - p = "int"; - break; /* getpgrp */ case 81: /* setpgid */ @@ -11365,6 +11355,16 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* getgroups */ + case 595: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* setgroups */ + case 596: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index d703a11fda01..2d6903967e15 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -85,8 +85,8 @@ /* 76 is obsolete vhangup */ /* 77 is obsolete vlimit */ #define SYS_mincore 78 -#define SYS_getgroups 79 -#define SYS_setgroups 80 +#define SYS_freebsd14_getgroups 79 +#define SYS_freebsd14_setgroups 80 #define SYS_getpgrp 81 #define SYS_setpgid 82 #define SYS_setitimer 83 @@ -533,4 +533,6 @@ #define SYS_exterrctl 592 #define SYS_inotify_add_watch_at 593 #define SYS_inotify_rm_watch 594 -#define SYS_MAXSYSCALL 595 +#define SYS_getgroups 595 +#define SYS_setgroups 596 +#define SYS_MAXSYSCALL 597 diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index b7ded62cacb4..d1172c2dc7bf 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -65,8 +65,8 @@ MIASM = \ mprotect.o \ madvise.o \ mincore.o \ - getgroups.o \ - setgroups.o \ + freebsd14_getgroups.o \ + freebsd14_setgroups.o \ getpgrp.o \ setpgid.o \ setitimer.o \ @@ -436,4 +436,6 @@ MIASM = \ setcred.o \ exterrctl.o \ inotify_add_watch_at.o \ - inotify_rm_watch.o + inotify_rm_watch.o \ + getgroups.o \ + setgroups.o diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 8d666f9c8ee9..98311a6dbf94 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -273,14 +273,6 @@ struct mincore_args { char len_l_[PADL_(size_t)]; size_t len; char len_r_[PADR_(size_t)]; char vec_l_[PADL_(char *)]; char * vec; char vec_r_[PADR_(char *)]; }; -struct getgroups_args { - char gidsetsize_l_[PADL_(int)]; int gidsetsize; char gidsetsize_r_[PADR_(int)]; - char gidset_l_[PADL_(gid_t *)]; gid_t * gidset; char gidset_r_[PADR_(gid_t *)]; -}; -struct setgroups_args { - char gidsetsize_l_[PADL_(int)]; int gidsetsize; char gidsetsize_r_[PADR_(int)]; - char gidset_l_[PADL_(const gid_t *)]; const gid_t * gidset; char gidset_r_[PADR_(const gid_t *)]; -}; struct getpgrp_args { syscallarg_t dummy; }; @@ -1901,6 +1893,14 @@ struct inotify_rm_watch_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char wd_l_[PADL_(int)]; int wd; char wd_r_[PADR_(int)]; }; +struct getgroups_args { + char gidsetsize_l_[PADL_(int)]; int gidsetsize; char gidsetsize_r_[PADR_(int)]; + char gidset_l_[PADL_(gid_t *)]; gid_t * gidset; char gidset_r_[PADR_(gid_t *)]; +}; +struct setgroups_args { + char gidsetsize_l_[PADL_(int)]; int gidsetsize; char gidsetsize_r_[PADR_(int)]; + char gidset_l_[PADL_(const gid_t *)]; const gid_t * gidset; char gidset_r_[PADR_(const gid_t *)]; +}; int sys__exit(struct thread *, struct _exit_args *); int sys_fork(struct thread *, struct fork_args *); int sys_read(struct thread *, struct read_args *); @@ -1957,8 +1957,6 @@ int sys_munmap(struct thread *, struct munmap_args *); int sys_mprotect(struct thread *, struct mprotect_args *); int sys_madvise(struct thread *, struct madvise_args *); int sys_mincore(struct thread *, struct mincore_args *); -int sys_getgroups(struct thread *, struct getgroups_args *); -int sys_setgroups(struct thread *, struct setgroups_args *); int sys_getpgrp(struct thread *, struct getpgrp_args *); int sys_setpgid(struct thread *, struct setpgid_args *); int sys_setitimer(struct thread *, struct setitimer_args *); @@ -2305,6 +2303,8 @@ int sys_setcred(struct thread *, struct setcred_args *); int sys_exterrctl(struct thread *, struct exterrctl_args *); int sys_inotify_add_watch_at(struct thread *, struct inotify_add_watch_at_args *); int sys_inotify_rm_watch(struct thread *, struct inotify_rm_watch_args *); +int sys_getgroups(struct thread *, struct getgroups_args *); +int sys_setgroups(struct thread *, struct setgroups_args *); #ifdef COMPAT_43 @@ -2799,6 +2799,16 @@ int freebsd13_swapoff(struct thread *, struct freebsd13_swapoff_args *); #ifdef COMPAT_FREEBSD14 +struct freebsd14_getgroups_args { + char gidsetsize_l_[PADL_(int)]; int gidsetsize; char gidsetsize_r_[PADR_(int)]; + char gidset_l_[PADL_(gid_t *)]; gid_t * gidset; char gidset_r_[PADR_(gid_t *)]; +}; +struct freebsd14_setgroups_args { + char gidsetsize_l_[PADL_(int)]; int gidsetsize; char gidsetsize_r_[PADR_(int)]; + char gidset_l_[PADL_(const gid_t *)]; const gid_t * gidset; char gidset_r_[PADR_(const gid_t *)]; +}; +int freebsd14_getgroups(struct thread *, struct freebsd14_getgroups_args *); +int freebsd14_setgroups(struct thread *, struct freebsd14_setgroups_args *); #endif /* COMPAT_FREEBSD14 */ @@ -2873,8 +2883,8 @@ int freebsd13_swapoff(struct thread *, struct freebsd13_swapoff_args *); #define SYS_AUE_mprotect AUE_MPROTECT #define SYS_AUE_madvise AUE_MADVISE #define SYS_AUE_mincore AUE_MINCORE -#define SYS_AUE_getgroups AUE_GETGROUPS -#define SYS_AUE_setgroups AUE_SETGROUPS +#define SYS_AUE_freebsd14_getgroups AUE_GETGROUPS +#define SYS_AUE_freebsd14_setgroups AUE_SETGROUPS #define SYS_AUE_getpgrp AUE_GETPGRP #define SYS_AUE_setpgid AUE_SETPGRP #define SYS_AUE_setitimer AUE_SETITIMER @@ -3289,6 +3299,8 @@ int freebsd13_swapoff(struct thread *, struct freebsd13_swapoff_args *); #define SYS_AUE_exterrctl AUE_NULL #define SYS_AUE_inotify_add_watch_at AUE_INOTIFY #define SYS_AUE_inotify_rm_watch AUE_INOTIFY +#define SYS_AUE_getgroups AUE_GETGROUPS +#define SYS_AUE_setgroups AUE_SETGROUPS #undef PAD_ #undef PADL_ From nobody Fri Aug 15 04:44:02 2025 X-Original-To: dev-commits-src-main@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 4c38db0lWQz64XKW; Fri, 15 Aug 2025 04:44:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c38dZ55Fcz3qHK; Fri, 15 Aug 2025 04:44:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755233042; 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=zPX2PLr17fP4ailneazAGqyEJkY3vRKKbfHbfBm1GIk=; b=DjgQAKbxnXruZeLT7E7OgwellHgLFMdlliigX5YcKSgfIirJA6f179EZMwVaUSy79HAbTK NgkOAI6p7ydCnWE1ALGFVibKDGFMd1r/hragEaVaBTjw6S2f4WaV0NWnsoZhULGNVVsc6k uf8E5kNZxjGg7YsmLAQK5YTgNKkOzASK3J1Fc2dvNnxy20UxuTr1SzTpOy65GFbDFpuDJD WxQipXt1X9WKwAY4KGkJFzKEnf2Kfd8oVY54pbj4HYYD5LJq2xDJ+0m7C5NfIPAGq7UOGB RJ6Ro2DKDba4KBeITH1vPlwgcR3Y0C2ckjzL2g75GRtuCztwNON3pzTQQ+Qr/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755233042; 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=zPX2PLr17fP4ailneazAGqyEJkY3vRKKbfHbfBm1GIk=; b=rw68Z6wOu7bJmrwoPB1sF7kkTv0X1Or1chLjNLtBQHPsfI6oWuEH4D6vvXwwhp8VD/jStP ya9TIqMlk6hmwpuL6NUyHxPRS/rsQDIZimFSyEcxlM3Qg/i5BTfGJm/+pXuloePh7aFDfc np2BidpE3BaQ4PvQS4KgT3SFG/RcQJW3wKQD1fwQYTC3nebbDSZP7Q7t97FtI86/Udejlv d97Z2xO2gl1XNLYpxO+Z9HRRfYgMPi1LDL3XOSW2YV8+lDU6Ojn6nI/E6q16CvfE2vpY5r yehRZzQH19mOFrRYp38KXU3uz9fOv4ZCUNrDFy4rNsAmHPo575BeAPqG9skoHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755233042; a=rsa-sha256; cv=none; b=P3Ut9gYR1VW0gJxzttDrxWND7seWig4k4LJ94TFHINHmv0PdyrrESOC5ld8AfSNH3LbTBA qVQL+wdW+ngy9qKVszzbWW5QRAMy7h8sCbrxmi83IClFTQALX0txWc3Md8ySSTkvUqUADq p6k8RTN6yNx8piaDwtAsz+gfkFHcwpGa2xbDse9zZLrzI7/gUcGXA3k3KcBjFYQfxPU3FG Bcwi+VOHmXFGd1OPWp9e9UeyC6JY3/H2R7r/8JR0irI0Jz125pCZh/jKJg/Fkn0OprzLZM vOMggqiWSmfwoQbfSiITnkLTRspl5kWWYgdNw359qZDKqA161CmjaR9qFPlWWg== 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 4c38dZ4Xdhz7xF; Fri, 15 Aug 2025 04:44:02 +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 57F4i2BY006881; Fri, 15 Aug 2025 04:44:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57F4i2fl006878; Fri, 15 Aug 2025 04:44:02 GMT (envelope-from git) Date: Fri, 15 Aug 2025 04:44:02 GMT Message-Id: <202508150444.57F4i2fl006878@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: 0090096e5273 - main - build: introduce the notion of a build epoch List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 0090096e52738383d6bf48ed5d27dffc850c8a01 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=0090096e52738383d6bf48ed5d27dffc850c8a01 commit 0090096e52738383d6bf48ed5d27dffc850c8a01 Author: Kyle Evans AuthorDate: 2025-08-15 04:43:42 +0000 Commit: Kyle Evans CommitDate: 2025-08-15 04:43:42 +0000 build: introduce the notion of a build epoch Idea and file format shamelessly stolen from CheriBSD, but reimplemented in terms of the standard FreeBSD build system. We'll use this in some events that call for a deeper cleansing, typically reserved for situations where the dependencies are too complicated to unwind. This notably does not preclude us from doing separate cleansing of world for specific src.conf(5) knob changes that would require a rebuild. In the FreeBSD version, we either stamp the OBJTOP we're cleaning (bootstrap or the full OBJDIR) with the current epoch and bail out for unstamped objdirs, or we compare and either `rm -rf` or `cleandir` as necessary. Reviewed by: brooks, des Differential Revision: https://reviews.freebsd.org/D51848 --- .clean_build_epoch | 7 ++++ Makefile.inc1 | 5 ++- tools/build/depend-cleanup.sh | 85 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 93 insertions(+), 4 deletions(-) diff --git a/.clean_build_epoch b/.clean_build_epoch new file mode 100644 index 000000000000..74cb650f0015 --- /dev/null +++ b/.clean_build_epoch @@ -0,0 +1,7 @@ +# Add a new line containing a larger number than the last (e.g. YYYYMMDD) for +# every change that breaks ABI or requires a full rebuild for some other reason. +# Only the last entry is required, but having the full list may be useful for +# looking at frequency of ABI breakage, etc. + +# 4757b351ea9: openssl: Import version 3.5.1 +20250807 # All OpenSSL-using bits need rebuilt diff --git a/Makefile.inc1 b/Makefile.inc1 index e67bc7f5d1b1..cf32248b6b9d 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1082,7 +1082,7 @@ _cleanobj_fast_depend_hack: .PHONY @echo ">>> Deleting stale dependencies..."; MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH} \ ALL_libcompats=${_ALL_libcompats:Q} \ - sh ${.CURDIR}/tools/build/depend-cleanup.sh ${OBJTOP} + sh ${.CURDIR}/tools/build/depend-cleanup.sh ${OBJTOP} ${SRCTOP} _cleanworldtmp: .PHONY .if ${MK_CLEAN} == "yes" @@ -1175,7 +1175,8 @@ _cleanobj: ${_+_}cd ${.CURDIR}; ${LIB${LIBCOMPAT}WMAKE} _NO_INCLUDE_COMPILERMK=t -f Makefile.inc1 ${CLEANDIR} .endfor .else - ${_+_}cd ${.CURDIR}; ${WMAKE} _NO_INCLUDE_COMPILERMK=t _cleanobj_fast_depend_hack + ${_+_}cd ${.CURDIR}; env CLEANMK="_NO_INCLUDE_COMPILERMK=t ${CLEANDIR}" \ + MAKE=${MAKE} ${WMAKE} _cleanobj_fast_depend_hack .endif # ${MK_CLEAN} == "yes" _obj: @echo diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh index c2cb7877dd04..cd51c59ff0e1 100755 --- a/tools/build/depend-cleanup.sh +++ b/tools/build/depend-cleanup.sh @@ -63,6 +63,10 @@ # if [ "$MACHINE_ARCH" = "amd64" ]; then # clean_dep lib/libc bcmp c # fi +# +# We also have a big hammer at the top of the tree, .clean_build_epoch, to be +# used in severe cases where we can't surgically remove just the parts that +# need rebuilt. This should be used sparingly. set -e set -u @@ -80,7 +84,7 @@ err() usage() { - echo "usage: $(basename $0) [-v] [-n] objtop" >&2 + echo "usage: $(basename $0) [-v] [-n] objtop srctop" >&2 } VERBOSE= @@ -101,17 +105,31 @@ while getopts vn o; do done shift $((OPTIND-1)) -if [ $# -ne 1 ]; then +if [ $# -ne 2 ]; then usage exit 1 fi OBJTOP=$1 shift +SRCTOP=$1 +shift + if [ ! -d "$OBJTOP" ]; then err "$OBJTOP: Not a directory" fi +if [ ! -d "$SRCTOP" -o ! -f "$SRCTOP/Makefile.inc1" ]; then + err "$SRCTOP: Not the root of a src tree" +fi + +: ${CLEANMK=""} +if [ -n "$CLEANMK" ]; then + if [ -z "${MAKE+set}" ]; then + err "MAKE not set" + fi +fi + if [ -z "${MACHINE+set}" ]; then err "MACHINE not set" fi @@ -151,6 +169,69 @@ clean_dep() done } +extract_epoch() +{ + [ -s "$1" ] || return 0 + + awk 'int($1) > 0 { epoch = $1 } END { print epoch }' "$1" +} + +clean_world() +{ + local buildepoch="$1" + + # The caller may set CLEANMK in the environment to make target(s) that + # should be invoked instead of just destroying everything. This is + # generally used after legacy/bootstrap tools to avoid over-cleansing + # since we're generally in the temporary tree's ancestor. + if [ -n "$CLEANMK" ]; then + echo "Cleaning up the object tree" + run $MAKE -C "$SRCTOP" -f "$SRCTOP"/Makefile.inc1 $CLEANMK + else + echo "Cleaning up the temporary build tree" + run rm -rf "$OBJTOP" + fi + + # We don't assume that all callers will have grabbed the build epoch, so + # we'll do it here as needed. This will be useful if we add other + # non-epoch reasons to force clean. + if [ -z "$buildepoch" ]; then + buildepoch=$(extract_epoch "$SRCTOP"/.clean_build_epoch) + fi + + mkdir -p "$OBJTOP" + echo "$buildepoch" > "$OBJTOP"/.clean_build_epoch + + exit 0 +} + +check_epoch() +{ + local srcepoch objepoch + + srcepoch=$(extract_epoch "$SRCTOP"/.clean_build_epoch) + if [ -z "$srcepoch" ]; then + err "Malformed .clean_build_epoch; please validate the last line" + fi + + # We don't discriminate between the varying degrees of difference + # between epochs. If it went backwards we could be bisecting across + # epochs, in which case the original need to clean likely still stands. + objepoch=$(extract_epoch "$OBJTOP"/.clean_build_epoch) + if [ -z "$objepoch" ] || [ "$srcepoch" -ne "$objepoch" ]; then + if [ "$VERBOSE" ]; then + echo "Cleaning - src epoch: $srcepoch, objdir epoch: ${objepoch:-unknown}" + fi + + clean_world "$srcepoch" + # NORETURN + fi +} + +check_epoch + +#### Typical dependency cleanup begins here. + # Date Rev Description # 20220326 fbc002cb72d2 move from bcmp.c to bcmp.S From nobody Fri Aug 15 04:50:08 2025 X-Original-To: dev-commits-src-main@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 4c38mw03fsz64XL3; Fri, 15 Aug 2025 04:50:24 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4c38mt2vCmz3rlC; Fri, 15 Aug 2025 04:50:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none) Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 57F4o8Tx007311; Fri, 15 Aug 2025 07:50:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 57F4o8Tx007311 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 57F4o8i9007310; Fri, 15 Aug 2025 07:50:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 15 Aug 2025 07:50:08 +0300 From: Konstantin Belousov To: Lexi Winter Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, srcmgr@freebsd.org Subject: Re: git: 7ac276298b72 - main - Remove Secure RPC DES authentication Message-ID: References: <202508101537.57AFbHrI067216@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202508101537.57AFbHrI067216@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; HAS_XAW(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4c38mt2vCmz3rlC X-Spamd-Bar: -- On Sun, Aug 10, 2025 at 03:37:17PM +0000, Lexi Winter wrote: > The branch main has been updated by ivy: > > URL: https://cgit.FreeBSD.org/src/commit/?id=7ac276298b72982189ac1a5b17461936dc00163e > > commit 7ac276298b72982189ac1a5b17461936dc00163e > Author: Lexi Winter > AuthorDate: 2025-08-10 12:57:36 +0000 > Commit: Lexi Winter > CommitDate: 2025-08-10 15:36:40 +0000 > > Remove Secure RPC DES authentication > > Following the earlier removal of keyserv, none of this functionality > works since it requires keyserv. > > Remove the relevant symbols from libc's Symbol.map. Leave compatibility > symbols for existing applications, but since the functions don't work > without keyserv, stub them out to return an error. > > Remove some private symbols that were only used by keyserv; these don't > get compatibility symbols. > > Remove the documentation for the old functions. > > Remove rpc.ypupdated since it requires DES authentication. > > Reviewed by: manu, des, emaste > Differential Revision: https://reviews.freebsd.org/D50442 > --- > ObsoleteFiles.inc | 4 + > include/rpc/auth_des.h | 79 +---- > lib/libc/rpc/Symbol.map | 19 -- > lib/libc/rpc/auth_des.c | 455 +---------------------------- > lib/libc/rpc/authdes_prot.c | 44 +-- > lib/libc/rpc/key_call.c | 424 +++------------------------ > lib/libc/rpc/publickey.5 | 40 --- > lib/libc/rpc/rpc_secure.3 | 177 +----------- > lib/libc/rpc/rpc_soc.3 | 13 +- > lib/libc/rpc/rpc_soc.c | 31 +- > lib/libc/rpc/svc_auth.c | 8 - > lib/libc/rpc/svc_auth_des.c | 460 +----------------------------- > lib/librpcsvc/Makefile | 2 +- > lib/librpcsvc/yp_update.c | 199 ------------- > libexec/rc/rc.conf | 1 - > libexec/rc/rc.d/Makefile | 1 - > libexec/rc/rc.d/ypupdated | 35 --- > share/man/man5/rc.conf.5 | 9 +- > sys/rpc/auth.h | 26 -- > tools/build/mk/OptionalObsoleteFiles.inc | 2 - > usr.sbin/Makefile | 1 - > usr.sbin/rpc.ypupdated/Makefile | 32 --- > usr.sbin/rpc.ypupdated/Makefile.depend | 18 -- > usr.sbin/rpc.ypupdated/update.c | 328 --------------------- > usr.sbin/rpc.ypupdated/yp_dbdelete.c | 68 ----- > usr.sbin/rpc.ypupdated/yp_dbupdate.c | 147 ---------- > usr.sbin/rpc.ypupdated/ypupdate | 32 --- > usr.sbin/rpc.ypupdated/ypupdated_extern.h | 32 --- > usr.sbin/rpc.ypupdated/ypupdated_main.c | 287 ------------------- > usr.sbin/rpc.ypupdated/ypupdated_server.c | 227 --------------- > 30 files changed, 83 insertions(+), 3118 deletions(-) > > diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc > index ec324e82f86d..a6662d31829f 100644 > --- a/ObsoleteFiles.inc > +++ b/ObsoleteFiles.inc > @@ -51,6 +51,10 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20250810: Removal of remaining Secure RPC (DES) bits > +OLD_FILES+=usr/sbin/rpc.ypupdated > +OLD_FILES+=etc/rc.d/ypupdated > + > # 20250808: nvmfd removed from base install > OLD_FILES+=usr/sbin/nvmfd > OLD_FILES+=usr/share/man/man8/nvmfd.8.gz > diff --git a/include/rpc/auth_des.h b/include/rpc/auth_des.h > index 0ff43c13139b..1b4943a74b8b 100644 > --- a/include/rpc/auth_des.h > +++ b/include/rpc/auth_des.h > @@ -33,91 +33,14 @@ > * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. > */ > > -/* > - * auth_des.h, Protocol for DES style authentication for RPC > - */ > +/* Note, RPC DES authentication was removed in FreeBSD 15.0. */ > > #ifndef _AUTH_DES_ > #define _AUTH_DES_ > > -/* > - * There are two kinds of "names": fullnames and nicknames > - */ > -enum authdes_namekind { > - ADN_FULLNAME, > - ADN_NICKNAME > -}; > - > -/* > - * A fullname contains the network name of the client, > - * a conversation key and the window > - */ > -struct authdes_fullname { > - char *name; /* network name of client, up to MAXNETNAMELEN */ > - des_block key; /* conversation key */ > - u_long window; /* associated window */ > -}; > - > - > -/* > - * A credential > - */ > -struct authdes_cred { > - enum authdes_namekind adc_namekind; > - struct authdes_fullname adc_fullname; > - u_long adc_nickname; > -}; > - > - > - > -/* > - * A des authentication verifier > - */ > -struct authdes_verf { > - union { > - struct timeval adv_ctime; /* clear time */ > - des_block adv_xtime; /* crypt time */ > - } adv_time_u; > - u_long adv_int_u; > -}; > - > -/* > - * des authentication verifier: client variety > - * > - * adv_timestamp is the current time. > - * adv_winverf is the credential window + 1. > - * Both are encrypted using the conversation key. > - */ > -#define adv_timestamp adv_time_u.adv_ctime > -#define adv_xtimestamp adv_time_u.adv_xtime > -#define adv_winverf adv_int_u > - > -/* > - * des authentication verifier: server variety > - * > - * adv_timeverf is the client's timestamp + client's window > - * adv_nickname is the server's nickname for the client. > - * adv_timeverf is encrypted using the conversation key. > - */ > -#define adv_timeverf adv_time_u.adv_ctime > -#define adv_xtimeverf adv_time_u.adv_xtime > -#define adv_nickname adv_int_u > - > -/* > - * Map a des credential into a unix cred. > - * > - */ > -__BEGIN_DECLS > -extern int authdes_getucred( struct authdes_cred *, uid_t *, gid_t *, int *, gid_t * ); > -__END_DECLS > - > __BEGIN_DECLS > -extern bool_t xdr_authdes_cred(XDR *, struct authdes_cred *); > -extern bool_t xdr_authdes_verf(XDR *, struct authdes_verf *); > extern int rtime(dev_t, struct netbuf *, int, struct timeval *, > struct timeval *); > -extern void kgetnetname(char *); > -extern enum auth_stat _svcauth_des(struct svc_req *, struct rpc_msg *); > __END_DECLS > > #endif /* ndef _AUTH_DES_ */ > diff --git a/lib/libc/rpc/Symbol.map b/lib/libc/rpc/Symbol.map > index 105d6fb6b54e..61e8e084b1e0 100644 > --- a/lib/libc/rpc/Symbol.map > +++ b/lib/libc/rpc/Symbol.map > @@ -8,13 +8,9 @@ FBSD_1.0 { > xdr_desargs; > xdr_desresp; > > - authdes_seccreate; > - authdes_pk_seccreate; > authnone_create; > authunix_create; > authunix_create_default; > - xdr_authdes_cred; > - xdr_authdes_verf; > xdr_authunix_parms; > bindresvport; > bindresvport_sa; The commit breaks libc ABI and must be reverted. This email is the formal request to do so. From nobody Fri Aug 15 04:56:03 2025 X-Original-To: dev-commits-src-main@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 4c38vc0dDJz64XMl; Fri, 15 Aug 2025 04:56:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4c38vb2MDFz3svR; Fri, 15 Aug 2025 04:56:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none) Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 57F4u3eX007486; Fri, 15 Aug 2025 07:56:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 57F4u3eX007486 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 57F4u3cB007485; Fri, 15 Aug 2025 07:56:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 15 Aug 2025 07:56:03 +0300 From: Konstantin Belousov To: Lexi Winter Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, srcmgr@freebsd.org Subject: Re: git: 7ac276298b72 - main - Remove Secure RPC DES authentication Message-ID: References: <202508101537.57AFbHrI067216@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Result: default: False [-3.00 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; HAS_XAW(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; R_SPF_SOFTFAIL(0.00)[~all:c]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4c38vb2MDFz3svR X-Spamd-Bar: -- On Fri, Aug 15, 2025 at 07:50:08AM +0300, Konstantin Belousov wrote: > On Sun, Aug 10, 2025 at 03:37:17PM +0000, Lexi Winter wrote: > > The branch main has been updated by ivy: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=7ac276298b72982189ac1a5b17461936dc00163e > > > > commit 7ac276298b72982189ac1a5b17461936dc00163e > > Author: Lexi Winter > > AuthorDate: 2025-08-10 12:57:36 +0000 > > Commit: Lexi Winter > > CommitDate: 2025-08-10 15:36:40 +0000 > > > > Remove Secure RPC DES authentication > > > > Following the earlier removal of keyserv, none of this functionality > > works since it requires keyserv. > > > > Remove the relevant symbols from libc's Symbol.map. Leave compatibility > > symbols for existing applications, but since the functions don't work > > without keyserv, stub them out to return an error. > > > > Remove some private symbols that were only used by keyserv; these don't > > get compatibility symbols. > > > > Remove the documentation for the old functions. > > > > Remove rpc.ypupdated since it requires DES authentication. > > > > Reviewed by: manu, des, emaste > > Differential Revision: https://reviews.freebsd.org/D50442 > > --- > > ObsoleteFiles.inc | 4 + > > include/rpc/auth_des.h | 79 +---- > > lib/libc/rpc/Symbol.map | 19 -- > > lib/libc/rpc/auth_des.c | 455 +---------------------------- > > lib/libc/rpc/authdes_prot.c | 44 +-- > > lib/libc/rpc/key_call.c | 424 +++------------------------ > > lib/libc/rpc/publickey.5 | 40 --- > > lib/libc/rpc/rpc_secure.3 | 177 +----------- > > lib/libc/rpc/rpc_soc.3 | 13 +- > > lib/libc/rpc/rpc_soc.c | 31 +- > > lib/libc/rpc/svc_auth.c | 8 - > > lib/libc/rpc/svc_auth_des.c | 460 +----------------------------- > > lib/librpcsvc/Makefile | 2 +- > > lib/librpcsvc/yp_update.c | 199 ------------- > > libexec/rc/rc.conf | 1 - > > libexec/rc/rc.d/Makefile | 1 - > > libexec/rc/rc.d/ypupdated | 35 --- > > share/man/man5/rc.conf.5 | 9 +- > > sys/rpc/auth.h | 26 -- > > tools/build/mk/OptionalObsoleteFiles.inc | 2 - > > usr.sbin/Makefile | 1 - > > usr.sbin/rpc.ypupdated/Makefile | 32 --- > > usr.sbin/rpc.ypupdated/Makefile.depend | 18 -- > > usr.sbin/rpc.ypupdated/update.c | 328 --------------------- > > usr.sbin/rpc.ypupdated/yp_dbdelete.c | 68 ----- > > usr.sbin/rpc.ypupdated/yp_dbupdate.c | 147 ---------- > > usr.sbin/rpc.ypupdated/ypupdate | 32 --- > > usr.sbin/rpc.ypupdated/ypupdated_extern.h | 32 --- > > usr.sbin/rpc.ypupdated/ypupdated_main.c | 287 ------------------- > > usr.sbin/rpc.ypupdated/ypupdated_server.c | 227 --------------- > > 30 files changed, 83 insertions(+), 3118 deletions(-) > > > > diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc > > index ec324e82f86d..a6662d31829f 100644 > > --- a/ObsoleteFiles.inc > > +++ b/ObsoleteFiles.inc > > @@ -51,6 +51,10 @@ > > # xargs -n1 | sort | uniq -d; > > # done > > > > +# 20250810: Removal of remaining Secure RPC (DES) bits > > +OLD_FILES+=usr/sbin/rpc.ypupdated > > +OLD_FILES+=etc/rc.d/ypupdated > > + > > # 20250808: nvmfd removed from base install > > OLD_FILES+=usr/sbin/nvmfd > > OLD_FILES+=usr/share/man/man8/nvmfd.8.gz > > diff --git a/include/rpc/auth_des.h b/include/rpc/auth_des.h > > index 0ff43c13139b..1b4943a74b8b 100644 > > --- a/include/rpc/auth_des.h > > +++ b/include/rpc/auth_des.h > > @@ -33,91 +33,14 @@ > > * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. > > */ > > > > -/* > > - * auth_des.h, Protocol for DES style authentication for RPC > > - */ > > +/* Note, RPC DES authentication was removed in FreeBSD 15.0. */ > > > > #ifndef _AUTH_DES_ > > #define _AUTH_DES_ > > > > -/* > > - * There are two kinds of "names": fullnames and nicknames > > - */ > > -enum authdes_namekind { > > - ADN_FULLNAME, > > - ADN_NICKNAME > > -}; > > - > > -/* > > - * A fullname contains the network name of the client, > > - * a conversation key and the window > > - */ > > -struct authdes_fullname { > > - char *name; /* network name of client, up to MAXNETNAMELEN */ > > - des_block key; /* conversation key */ > > - u_long window; /* associated window */ > > -}; > > - > > - > > -/* > > - * A credential > > - */ > > -struct authdes_cred { > > - enum authdes_namekind adc_namekind; > > - struct authdes_fullname adc_fullname; > > - u_long adc_nickname; > > -}; > > - > > - > > - > > -/* > > - * A des authentication verifier > > - */ > > -struct authdes_verf { > > - union { > > - struct timeval adv_ctime; /* clear time */ > > - des_block adv_xtime; /* crypt time */ > > - } adv_time_u; > > - u_long adv_int_u; > > -}; > > - > > -/* > > - * des authentication verifier: client variety > > - * > > - * adv_timestamp is the current time. > > - * adv_winverf is the credential window + 1. > > - * Both are encrypted using the conversation key. > > - */ > > -#define adv_timestamp adv_time_u.adv_ctime > > -#define adv_xtimestamp adv_time_u.adv_xtime > > -#define adv_winverf adv_int_u > > - > > -/* > > - * des authentication verifier: server variety > > - * > > - * adv_timeverf is the client's timestamp + client's window > > - * adv_nickname is the server's nickname for the client. > > - * adv_timeverf is encrypted using the conversation key. > > - */ > > -#define adv_timeverf adv_time_u.adv_ctime > > -#define adv_xtimeverf adv_time_u.adv_xtime > > -#define adv_nickname adv_int_u > > - > > -/* > > - * Map a des credential into a unix cred. > > - * > > - */ > > -__BEGIN_DECLS > > -extern int authdes_getucred( struct authdes_cred *, uid_t *, gid_t *, int *, gid_t * ); > > -__END_DECLS > > - > > __BEGIN_DECLS > > -extern bool_t xdr_authdes_cred(XDR *, struct authdes_cred *); > > -extern bool_t xdr_authdes_verf(XDR *, struct authdes_verf *); > > extern int rtime(dev_t, struct netbuf *, int, struct timeval *, > > struct timeval *); > > -extern void kgetnetname(char *); > > -extern enum auth_stat _svcauth_des(struct svc_req *, struct rpc_msg *); > > __END_DECLS > > > > #endif /* ndef _AUTH_DES_ */ > > diff --git a/lib/libc/rpc/Symbol.map b/lib/libc/rpc/Symbol.map > > index 105d6fb6b54e..61e8e084b1e0 100644 > > --- a/lib/libc/rpc/Symbol.map > > +++ b/lib/libc/rpc/Symbol.map > > @@ -8,13 +8,9 @@ FBSD_1.0 { > > xdr_desargs; > > xdr_desresp; > > > > - authdes_seccreate; > > - authdes_pk_seccreate; > > authnone_create; > > authunix_create; > > authunix_create_default; > > - xdr_authdes_cred; > > - xdr_authdes_verf; > > xdr_authunix_parms; > > bindresvport; > > bindresvport_sa; > > The commit breaks libc ABI and must be reverted. > This email is the formal request to do so. To make it clear: despite the presence of symcompat versions, there is no justification to remove the implementation. Default version for symbols might be removed, but the implementation shall be left alone. This is how we handle all other cases of obsoleted interfaces, gets() being the exemplary case. From nobody Fri Aug 15 05:01:56 2025 X-Original-To: dev-commits-src-main@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 4c392D4Mb1z64Y1s; Fri, 15 Aug 2025 05:01: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c392D359Kz3tXj; Fri, 15 Aug 2025 05:01:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755234116; 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=CrWcu+a4yYbvIoisAKPKbtz65VutLZqlFkuDPAuGJfo=; b=pExHRY3SWa+i8K+buMWeDXduq0M6zYv5SgvTKup660BY+TSRwLJysfXTCay497ewYoqNal 7QS05cOHlm0CwrArLTQEf+7A05YuB7KD2/VKOXZkzYyS8K+Rio65pish/UdDi8mcduoTMI 30V9LDZzcDIsUizgyd050hi0+FYa1OCT6m+MxwEfdol+5PfedDJTw1+47eINU7qpohe+j/ aQsojPkyqtDwMl+5T2Wpg0rf+tXtlDLbpmmCLK04XxOerXeWK4fwObed1CdfVUSCvSS6eE U8mYbe61zg3k4Ozy/M6B5pzElm0cYLTL/3wTtgroBgTz2scyO1IkQRrv/IUBzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755234116; 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=CrWcu+a4yYbvIoisAKPKbtz65VutLZqlFkuDPAuGJfo=; b=Od413u4sDNWh8M9WN4yADCuvQYuqlC5tm53LATh0n4Es2Ys7dVrmHEakKUcpXOfsW1OVSA oYCYK5Ad5pnWT+G9FLht7jsme+J7sIu1zHgNcJ3289pl4FoqfHX5U0rty+qLNRyWSyTzoJ MOjAyCpvJga6yDkj4CA7cQytIsEecJu3WxsYv3emoJpAavX23zNYNWu+s5cwtt5LgXX5gH PD4KPQCGTFxAJI5MsXrtohFnizHZJmhtp+bdjRZdsn83/77tX5tFLNxAaAoEbfnLNn8BHu AITUs+gOG7IVr83gH0cx/i/C2bk/46RWRkVTbkmn3Je+dUQtNoz7LY3gJw73ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755234116; a=rsa-sha256; cv=none; b=fz+2+dQxSNUTxu5JV2hPkpF81vUgSHHpT5AHB0L3PByAQDwMpTaB2KdiMkERIZhAWdppBJ I7PPPF4NcOspsTcYQ+r0GGkON9w51+xr7vYiAPAgNGvTV+w8Ve9PEThCAqp9KqgP37u68A voXJKgPCXGQSmkMEQCeOuR4+LqIbfGSDSwXyefcH0q9qZEjpOMSiSOxjTafbxOax4e9Dta sNZtmQfHUK6eHi8XaZw9aGiCZUDQKsH12pnzBGoCCOeFZISW9iR5kKfzko05sy96kb4rU3 4222G/gWJRwoQhSRvfLNAi9TRKfTRH/EaqR7pX6SDb78MlAYGO/Rpe6GufTiYA== 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 4c392D2g4Rz8j1; Fri, 15 Aug 2025 05:01: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 57F51uNm044762; Fri, 15 Aug 2025 05:01:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57F51usB044759; Fri, 15 Aug 2025 05:01:56 GMT (envelope-from git) Date: Fri, 15 Aug 2025 05:01:56 GMT Message-Id: <202508150501.57F51usB044759@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: ShengYi Hung Subject: git: c992ac621327 - main - ipheth(4): Add CDC-NCM support for RX List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c992ac6213276f54d868f317cc5092f8aed4ff54 Auto-Submitted: auto-generated The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=c992ac6213276f54d868f317cc5092f8aed4ff54 commit c992ac6213276f54d868f317cc5092f8aed4ff54 Author: ShengYi Hung AuthorDate: 2025-05-15 10:54:09 +0000 Commit: ShengYi Hung CommitDate: 2025-08-15 05:01:17 +0000 ipheth(4): Add CDC-NCM support for RX The CDC-NCM (USB Communications Device Class – Network Control Model) protocol allows multiple Ethernet frames to be encapsulated into a single USB transfer. On iOS, CDC-NCM is currently implemented for RX only and uses a fixed number of entries (16). To maintain compatibility with older iOS versions, we attempt to enable NCM on the USB device first; if this fails, we fall back to the original behavior. Approved by: lwhsu (mentor), markj (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation --- sys/dev/usb/net/if_ipheth.c | 218 ++++++++++++++++++++++++++++++++--------- sys/dev/usb/net/if_iphethvar.h | 21 ++++ 2 files changed, 191 insertions(+), 48 deletions(-) diff --git a/sys/dev/usb/net/if_ipheth.c b/sys/dev/usb/net/if_ipheth.c index f70113c53eb4..cfa800707391 100644 --- a/sys/dev/usb/net/if_ipheth.c +++ b/sys/dev/usb/net/if_ipheth.c @@ -55,6 +55,7 @@ #include #include +#include #include #include #include "usbdevs.h" @@ -81,6 +82,9 @@ static uether_fn_t ipheth_start; static uether_fn_t ipheth_setmulti; static uether_fn_t ipheth_setpromisc; +static ipheth_consumer_t ipheth_consume_read; +static ipheth_consumer_t ipheth_consume_read_ncm; + #ifdef USB_DEBUG static int ipheth_debug = 0; @@ -96,7 +100,31 @@ static const struct usb_config ipheth_config[IPHETH_N_TRANSFER] = { .direction = UE_DIR_RX, .frames = IPHETH_RX_FRAMES_MAX, .bufsize = (IPHETH_RX_FRAMES_MAX * MCLBYTES), - .flags = {.short_frames_ok = 1,.short_xfer_ok = 1,.ext_buffer = 1,}, + .flags = {.short_frames_ok = 1, .short_xfer_ok = 1, .ext_buffer = 1,}, + .callback = ipheth_bulk_read_callback, + .timeout = 0, /* no timeout */ + }, + + [IPHETH_BULK_TX] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_TX, + .frames = IPHETH_TX_FRAMES_MAX, + .bufsize = (IPHETH_TX_FRAMES_MAX * IPHETH_BUF_SIZE), + .flags = {.force_short_xfer = 1,}, + .callback = ipheth_bulk_write_callback, + .timeout = IPHETH_TX_TIMEOUT, + }, +}; + +static const struct usb_config ipheth_config_ncm[IPHETH_N_TRANSFER] = { + [IPHETH_BULK_RX] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_RX, + .frames = 1, + .bufsize = IPHETH_RX_NCM_BUF_SIZE, + .flags = {.short_frames_ok = 1, .short_xfer_ok = 1,}, .callback = ipheth_bulk_read_callback, .timeout = 0, /* no timeout */ }, @@ -204,6 +232,21 @@ ipheth_get_mac_addr(struct ipheth_softc *sc) return (0); } +static bool +ipheth_enable_ncm(struct ipheth_softc *sc) +{ + struct usb_device_request req; + + req.bmRequestType = UT_WRITE_VENDOR_INTERFACE; + req.bRequest = IPHETH_CMD_ENABLE_NCM; + USETW(req.wValue, 0); + req.wIndex[0] = sc->sc_iface_no; + req.wIndex[1] = 0; + USETW(req.wLength, 0); + + return (usbd_do_request(sc->sc_ue.ue_udev, NULL, &req, NULL) == 0); +} + static int ipheth_probe(device_t dev) { @@ -221,6 +264,7 @@ ipheth_attach(device_t dev) struct ipheth_softc *sc = device_get_softc(dev); struct usb_ether *ue = &sc->sc_ue; struct usb_attach_arg *uaa = device_get_ivars(dev); + const struct usb_config *config; int error; sc->sc_iface_no = uaa->info.bIfaceIndex; @@ -235,18 +279,29 @@ ipheth_attach(device_t dev) device_printf(dev, "Cannot set alternate setting\n"); goto detach; } - error = usbd_transfer_setup(uaa->device, &sc->sc_iface_no, - sc->sc_xfer, ipheth_config, IPHETH_N_TRANSFER, sc, &sc->sc_mtx); - if (error) { - device_printf(dev, "Cannot setup USB transfers\n"); - goto detach; - } + ue->ue_sc = sc; ue->ue_dev = dev; ue->ue_udev = uaa->device; ue->ue_mtx = &sc->sc_mtx; ue->ue_methods = &ipheth_ue_methods; + if (ipheth_enable_ncm(sc)) { + config = ipheth_config_ncm; + sc->is_ncm = true; + sc->consume = &ipheth_consume_read_ncm; + } else { + config = ipheth_config; + sc->consume = &ipheth_consume_read; + } + + error = usbd_transfer_setup(uaa->device, &sc->sc_iface_no, sc->sc_xfer, + config, IPHETH_N_TRANSFER, sc, &sc->sc_mtx); + if (error) { + device_printf(dev, "Cannot setup USB transfers\n"); + goto detach; + } + error = ipheth_get_mac_addr(sc); if (error) { device_printf(dev, "Cannot get MAC address\n"); @@ -389,12 +444,9 @@ ipheth_bulk_write_callback(struct usb_xfer *xfer, usb_error_t error) int actlen; int aframes; - usbd_xfer_status(xfer, &actlen, NULL, &aframes, NULL); - - DPRINTFN(1, "\n"); - switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: + usbd_xfer_status(xfer, &actlen, NULL, &aframes, NULL); DPRINTFN(11, "transfer complete: %u bytes in %u frames\n", actlen, aframes); @@ -471,53 +523,40 @@ ipheth_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) uint8_t x; int actlen; int aframes; - int len; - - usbd_xfer_status(xfer, &actlen, NULL, &aframes, NULL); switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - + usbd_xfer_status(xfer, &actlen, NULL, &aframes, NULL); DPRINTF("received %u bytes in %u frames\n", actlen, aframes); - for (x = 0; x != aframes; x++) { - m = sc->sc_rx_buf[x]; - sc->sc_rx_buf[x] = NULL; - len = usbd_xfer_frame_len(xfer, x); - - if (len < (int)(sizeof(struct ether_header) + - IPHETH_RX_ADJ)) { - m_freem(m); - continue; - } - - m_adj(m, IPHETH_RX_ADJ); - - /* queue up mbuf */ - uether_rxmbuf(&sc->sc_ue, m, len - IPHETH_RX_ADJ); - } + for (x = 0; x != aframes; x++) + sc->consume(xfer, x); /* FALLTHROUGH */ case USB_ST_SETUP: - - for (x = 0; x != IPHETH_RX_FRAMES_MAX; x++) { - if (sc->sc_rx_buf[x] == NULL) { - m = uether_newbuf(); - if (m == NULL) - goto tr_stall; - - /* cancel alignment for ethernet */ - m_adj(m, ETHER_ALIGN); - - sc->sc_rx_buf[x] = m; - } else { - m = sc->sc_rx_buf[x]; + if (!sc->is_ncm) { + for (x = 0; x != IPHETH_RX_FRAMES_MAX; x++) { + if (sc->sc_rx_buf[x] == NULL) { + m = uether_newbuf(); + if (m == NULL) + goto tr_stall; + + /* cancel alignment for ethernet */ + m_adj(m, ETHER_ALIGN); + + sc->sc_rx_buf[x] = m; + } else { + m = sc->sc_rx_buf[x]; + } + usbd_xfer_set_frame_data(xfer, x, m->m_data, m->m_len); } - - usbd_xfer_set_frame_data(xfer, x, m->m_data, m->m_len); + usbd_xfer_set_frames(xfer, x); + } else { + usbd_xfer_set_frame_len(xfer, 0, + IPHETH_RX_NCM_BUF_SIZE); + usbd_xfer_set_frames(xfer, 1); } - /* set number of frames and start hardware */ - usbd_xfer_set_frames(xfer, x); + usbd_transfer_submit(xfer); /* flush any received frames */ uether_rxflush(&sc->sc_ue); @@ -539,3 +578,86 @@ ipheth_bulk_read_callback(struct usb_xfer *xfer, usb_error_t error) break; } } + +static void +ipheth_consume_read(struct usb_xfer *xfer, int x) +{ + struct ipheth_softc *sc = usbd_xfer_softc(xfer); + struct mbuf *m = sc->sc_rx_buf[x]; + int len; + + sc->sc_rx_buf[x] = NULL; + len = usbd_xfer_frame_len(xfer, x); + + if (len < (int)(sizeof(struct ether_header) + IPHETH_RX_ADJ)) { + m_freem(m); + return; + } + + m_adj(m, IPHETH_RX_ADJ); + + /* queue up mbuf */ + uether_rxmbuf(&sc->sc_ue, m, len - IPHETH_RX_ADJ); +} + +static void +ipheth_consume_read_ncm(struct usb_xfer *xfer, int x) +{ + struct ipheth_softc *sc = usbd_xfer_softc(xfer); + struct usb_page_cache *pc = usbd_xfer_get_frame(xfer, 0); + struct ncm_data_cache ncm; + if_t ifp = uether_getifp(&sc->sc_ue); + struct mbuf *new_buf; + int i, actlen; + uint16_t dp_offset, dp_len; + + usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); + + if (actlen < IPHETH_NCM_HEADER_SIZE) + return; + + usbd_copy_out(pc, 0, &ncm.hdr, sizeof(ncm.hdr)); + + if (UGETDW(ncm.hdr.dwSignature) != 0x484D434E) + return; + + /* Dpt follows the hdr on iOS */ + if (UGETW(ncm.hdr.wDptIndex) != (int)(sizeof(struct usb_ncm16_hdr))) + return; + + usbd_copy_out(pc, UGETW(ncm.hdr.wDptIndex), &ncm.dpt, sizeof(ncm.dpt)); + + if (UGETDW(ncm.dpt.dwSignature) != 0x304D434E) + return; + + usbd_copy_out(pc, UGETW(ncm.hdr.wDptIndex) + sizeof(ncm.dpt), &ncm.dp, + sizeof(ncm.dp)); + + for (i = 0; i < IPHETH_NCM_DPT_DP_NUM; ++i) { + dp_offset = UGETW(ncm.dp[i].wFrameIndex); + dp_len = UGETW(ncm.dp[i].wFrameLength); + + /* (3.3.1 USB CDC NCM spec v1.0) */ + if (dp_offset == 0 && dp_len == 0) + break; + + if (dp_offset < IPHETH_NCM_HEADER_SIZE || dp_offset >= actlen || + actlen < (dp_len + dp_offset) || + dp_len < sizeof(struct ether_header)) { + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); + continue; + } + if (dp_len > (MCLBYTES - ETHER_ALIGN)) { + if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); + continue; + } + + new_buf = uether_newbuf(); + if (new_buf == NULL) { + if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); + continue; + } + usbd_copy_out(pc, dp_offset, new_buf->m_data, dp_len); + uether_rxmbuf(&sc->sc_ue, new_buf, dp_len); + } +} diff --git a/sys/dev/usb/net/if_iphethvar.h b/sys/dev/usb/net/if_iphethvar.h index 203bb96b6f22..d637e8f67d01 100644 --- a/sys/dev/usb/net/if_iphethvar.h +++ b/sys/dev/usb/net/if_iphethvar.h @@ -41,6 +41,7 @@ #define IPHETH_BUF_SIZE 1514 #define IPHETH_TX_TIMEOUT 5000 /* ms */ +#define IPHETH_RX_NCM_BUF_SIZE 65536 #define IPHETH_RX_FRAMES_MAX 1 #define IPHETH_TX_FRAMES_MAX 8 @@ -55,10 +56,20 @@ #define IPHETH_CTRL_TIMEOUT 5000 /* ms */ #define IPHETH_CMD_GET_MACADDR 0x00 +#define IPHETH_CMD_ENABLE_NCM 0x04 #define IPHETH_CMD_CARRIER_CHECK 0x45 #define IPHETH_CARRIER_ON 0x04 +#define IPHETH_NCM_DPT_DP_NUM 22 +#define IPHETH_NCM_DPT_HEADER_SIZE \ + (sizeof(struct usb_ncm16_dpt) + \ + IPHETH_NCM_DPT_DP_NUM * sizeof(struct usb_ncm16_dp)) +#define IPHETH_NCM_HEADER_SIZE \ + (sizeof(struct usb_ncm16_hdr) + IPHETH_NCM_DPT_HEADER_SIZE) + +typedef void (ipheth_consumer_t)(struct usb_xfer *xfer, int idx); + enum { IPHETH_BULK_TX, IPHETH_BULK_RX, @@ -76,6 +87,16 @@ struct ipheth_softc { uint8_t sc_data[IPHETH_CTRL_BUF_SIZE]; uint8_t sc_iface_no; uint8_t sc_carrier_on; + + bool is_ncm; + + ipheth_consumer_t *consume; +}; + +struct ncm_data_cache { + struct usb_ncm16_hdr hdr; + struct usb_ncm16_dpt dpt; + struct usb_ncm16_dp dp[IPHETH_NCM_DPT_DP_NUM]; }; #define IPHETH_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) From nobody Fri Aug 15 07:23:09 2025 X-Original-To: dev-commits-src-main@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 4c3D9B1ZPBz64hwb; Fri, 15 Aug 2025 07:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3D9B0Q1xz48jT; Fri, 15 Aug 2025 07:23:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755242590; 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=OP8LyjjHw0W79gNIVBkFfly3+CNvveOtX/t1oauklF0=; b=pNei/Ow7gCyyR5qe7lOsHPBS5+/fNdaZG0YkJIGaxbuJuHOYPemif23X4WoKZaUZO+VtP9 bt5XWyh7j65MFIs1hO0aGO5+qMmpXMoaRi4MwPx15E9WzRJcoGcAnl38zOYqTJPjtaNJFc dUwrwoePHuWUYt9S5GHfxooeaGeF5+0Gu8qKCE8uq+s+bUG4fPmHWWbasWDmxe3s6s24Xe 41m5rUuWGWDJ+h6PtuNIow+1Zztc/oZR9Kk7KMN/likpFWBEzqNB4nfPFYiVK2xxFYpUI6 /40q6hqcR0qC+Q9heRw/Rx45hbCbVJQDQECmQMNDGFKSy0gENpcw7MWVmebLSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755242590; 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=OP8LyjjHw0W79gNIVBkFfly3+CNvveOtX/t1oauklF0=; b=XZsq7RcprQ0NuMLbXvhHO+HPeFApTUsAoIJR6Rw2SGJBXwdRwHEX4vPCnibDZVx8/ZlU9Y adb5rrWbwIzCt1GZ6K5psr0pzaUOzCdQ9C/F5XeG05kmRswQe78ctRtNPB4aBUb+4w0Lu/ imnmgqrqdc1k+5Gf8CrV9I5LmO4OrX6gkbRPh+IS4monojTA8c/S9MrsXA9HK/6Tt2JYNV 3B5twrxKe1dseYnlHqXi5e9vwCHmSOvgWb1d3k+xkLjM6r9/FRMtOPufl8SLjlgnt91zZK dwdN5Km2V3TRzGkx9VdLRrdw5l9E0hGVpEorhpUhDaZiIh90MXMtZJh0Xa6TzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755242590; a=rsa-sha256; cv=none; b=H+JJ06aHPAfP1STeUC6mAC0+BtmhP9nA6VYORo7yOoXbDgXVp3hGhuK8ipbFeEInvSEvsg 8hPKEX+twSmN6xum/vvV+oXsrZn1r2rQAvOenYL5AFEevqExVx1+pq88Nrue8p+dcXuf9z uwMOqLcZhrAY29XCf6filke/YkyZXIqHll02NsqzxE2mvsW4TxhrbdOylLUDxLpexO2DC2 0Bw37pzc/n0XwoFqaDUDizkRZhJvA0uE48Qd4wU0KrFvtiQeDUufjcTVX3YCFHUQ/eoZhD bxx+8zOmx3PnbftGmVX8SFyRcH2jGyedFY5VmVrP3LRc8J9pUsPi7ahByVEIiQ== 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 4c3D996wkCzD94; Fri, 15 Aug 2025 07:23: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 57F7N9vx007861; Fri, 15 Aug 2025 07:23:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57F7N9e8007858; Fri, 15 Aug 2025 07:23:09 GMT (envelope-from git) Date: Fri, 15 Aug 2025 07:23:09 GMT Message-Id: <202508150723.57F7N9e8007858@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 5205b32de3fb - main - libc: Drop incorrect qsort optimization List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5205b32de3fb7702e96b3991f5b1a61eee406d8b Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5205b32de3fb7702e96b3991f5b1a61eee406d8b commit 5205b32de3fb7702e96b3991f5b1a61eee406d8b Author: Dag-Erling Smørgrav AuthorDate: 2025-08-15 07:22:33 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-15 07:23:03 +0000 libc: Drop incorrect qsort optimization As pointed out in the PR and the article linked below, the switch to insertion sort in the BSD qsort code is based on a misunderstanding of Knuth's TAOCP and is actually a pessimization. As demonstrated by the added test, it is trivially easy to construct pathological input which results in quadratic runtime. Without that misguided optimization, the same input runs in nearly linearithmic time. https://www.raygard.net/2022/02/26/Re-engineering-a-qsort-part-3 PR: 287089 MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D51907 --- lib/libc/stdlib/qsort.c | 13 ----- lib/libc/tests/stdlib/Makefile | 1 + lib/libc/tests/stdlib/qsort_bench.c | 113 ++++++++++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+), 13 deletions(-) diff --git a/lib/libc/stdlib/qsort.c b/lib/libc/stdlib/qsort.c index e0b06494cf98..400124593d07 100644 --- a/lib/libc/stdlib/qsort.c +++ b/lib/libc/stdlib/qsort.c @@ -106,13 +106,11 @@ local_qsort(void *a, size_t n, size_t es, cmp_t *cmp, void *thunk) char *pa, *pb, *pc, *pd, *pl, *pm, *pn; size_t d1, d2; int cmp_result; - int swap_cnt; /* if there are less than 2 elements, then sorting is not needed */ if (__predict_false(n < 2)) return; loop: - swap_cnt = 0; if (n < 7) { for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) for (pl = pm; @@ -141,7 +139,6 @@ loop: for (;;) { while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) { if (cmp_result == 0) { - swap_cnt = 1; swapfunc(pa, pb, es); pa += es; } @@ -149,7 +146,6 @@ loop: } while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) { if (cmp_result == 0) { - swap_cnt = 1; swapfunc(pc, pd, es); pd -= es; } @@ -158,18 +154,9 @@ loop: if (pb > pc) break; swapfunc(pb, pc, es); - swap_cnt = 1; pb += es; pc -= es; } - if (swap_cnt == 0) { /* Switch to insertion sort */ - for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) - for (pl = pm; - pl > (char *)a && CMP(thunk, pl - es, pl) > 0; - pl -= es) - swapfunc(pl, pl - es, es); - return; - } pn = (char *)a + n * es; d1 = MIN(pa - (char *)a, pb - pa); diff --git a/lib/libc/tests/stdlib/Makefile b/lib/libc/tests/stdlib/Makefile index 50726a5d8af6..9d84becfbd1f 100644 --- a/lib/libc/tests/stdlib/Makefile +++ b/lib/libc/tests/stdlib/Makefile @@ -14,6 +14,7 @@ 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+= qsort_bench 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/qsort_bench.c b/lib/libc/tests/stdlib/qsort_bench.c new file mode 100644 index 000000000000..5f2cfae40140 --- /dev/null +++ b/lib/libc/tests/stdlib/qsort_bench.c @@ -0,0 +1,113 @@ +/*- + * Copyright (c) 2025 Dag-Erling Smørgrav + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include +#include +#include +#include + +/*- + * Measures qsort(3) runtime with pathological input and verify that it + * stays close to N * log2(N). + * + * Thanks to Vivian Hussey for the proof of concept. + * + * The input we construct is similar to a sweep from 0 to N where each + * half, except for the first element, has been reversed; for instance, + * with N = 8, we get { 0, 3, 2, 1, 4, 8, 7, 6 }. This triggers a bug in + * the BSD qsort(3) where it will switch to insertion sort if the pivots + * are sorted. + * + * This article goes into more detail about the bug and its origin: + * + * https://www.raygard.net/2022/02/26/Re-engineering-a-qsort-part-3 + * + * With this optimization (the `if (swap_cnt == 0)` block), qsort(3) needs + * roughly N * N / 4 comparisons to sort our pathological input. Without + * it, it needs only a little more than N * log2(N) comparisons. + */ + +/* we stop testing once a single takes longer than this */ +#define MAXRUNSECS 10 + +static bool debugging; + +static uintmax_t ncmp; + +static int +intcmp(const void *a, const void *b) +{ + ncmp++; + return ((*(int *)a > *(int *)b) - (*(int *)a < *(int *)b)); +} + +static void +qsort_bench(int log2n) +{ + uintmax_t n = 1LLU << log2n; + int *buf; + + /* fill an array with a pathological pattern */ + ATF_REQUIRE(buf = malloc(n * sizeof(*buf))); + buf[0] = 0; + buf[n / 2] = n / 2; + for (unsigned int i = 1; i < n / 2; i++) { + buf[i] = n / 2 - i; + buf[n / 2 + i] = n - i; + } + + ncmp = 0; + qsort(buf, n, sizeof(*buf), intcmp); + + /* check result and free array */ + if (debugging) { + for (unsigned int i = 1; i < n; i++) { + ATF_REQUIRE_MSG(buf[i] > buf[i - 1], + "array is not sorted"); + } + } + free(buf); + + /* check that runtime does not exceed N² */ + ATF_CHECK_MSG(ncmp / n < n, + "runtime %ju exceeds N² for N = %ju", ncmp, n); + + /* check that runtime does not exceed N log N by much */ + ATF_CHECK_MSG(ncmp / n <= log2n + 1, + "runtime %ju exceeds N log N for N = %ju", ncmp, n); +} + +ATF_TC_WITHOUT_HEAD(qsort_bench); +ATF_TC_BODY(qsort_bench, tc) +{ + struct timespec t0, t1; + uintmax_t tus; + + for (int i = 10; i <= 30; i++) { + clock_gettime(CLOCK_UPTIME, &t0); + qsort_bench(i); + clock_gettime(CLOCK_UPTIME, &t1); + tus = t1.tv_sec * 1000000 + t1.tv_nsec / 1000; + tus -= t0.tv_sec * 1000000 + t0.tv_nsec / 1000; + if (debugging) { + fprintf(stderr, "N = 2^%d in %ju.%06jus\n", + i, tus / 1000000, tus % 1000000); + } + /* stop once an individual run exceeds our limit */ + if (tus / 1000000 >= MAXRUNSECS) + break; + } +} + +ATF_TP_ADD_TCS(tp) +{ + debugging = !getenv("__RUNNING_INSIDE_ATF_RUN") && + isatty(STDERR_FILENO); + ATF_TP_ADD_TC(tp, qsort_bench); + return (atf_no_error()); +} From nobody Fri Aug 15 08:29:37 2025 X-Original-To: dev-commits-src-main@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 4c3FfB4ZSmz64ldQ for ; Fri, 15 Aug 2025 08:29:54 +0000 (UTC) (envelope-from h3adwh5ck3r@gmail.com) Received: from mail-ua1-x929.google.com (mail-ua1-x929.google.com [IPv6:2607:f8b0:4864:20::929]) (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 4c3Ff96t9nz3FW2; Fri, 15 Aug 2025 08:29:53 +0000 (UTC) (envelope-from h3adwh5ck3r@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20230601 header.b=jQt5VLGw; spf=pass (mx1.freebsd.org: domain of h3adwh5ck3r@gmail.com designates 2607:f8b0:4864:20::929 as permitted sender) smtp.mailfrom=h3adwh5ck3r@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ua1-x929.google.com with SMTP id a1e0cc1a2514c-89018065338so1242476241.0; Fri, 15 Aug 2025 01:29:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755246588; x=1755851388; darn=freebsd.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=zFR0yasxwBaEf+j0tZa2VOINKafbCMGyF9F6XKAMktU=; b=jQt5VLGw8HVV2WM1urGnBrv2lGfcoDYCMWIkcuuATVSSMb5fdWNj0GoYGMYVXMhtjn GlN8fzFpKDj5GonDoY6KDHAdQvcV2pClYZcurcxc+6/fDZ5Rh+/OEm8RaL3IJzC4tf5R GdsruXsX6yDVcyFO0ZX6IuGPV4BilCjPBUouJ+7yuGya1s1Vspvgx/O+4GvoeKRb+TRP lujRzuMi2Yi4e8A4XNXzbdE22EQiTeflfrykZjzhE5MByeJ+yCFjV8yo1KyqzDc78ipt +NuKhWoP1NUhRQhXJKb4Ug8SEMh6SU5QH3CJiqI9026FZgnrcJxLVQuU7y4k50bNatfx IHeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755246588; x=1755851388; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=zFR0yasxwBaEf+j0tZa2VOINKafbCMGyF9F6XKAMktU=; b=Z6RN2MYO3kA+II7ngtdm5Y7JLePxp9w7EQ3M+LLTf5fy3UiZ/o414tiAjguDH3k6oT LqmU7EVgtIBuSfSZqALBSIz2rh81gCesNGEnF21gjWc+Sbn86OZTIJROKINP24Vrgels VYyAiIRziXL6EBbQl5cAr5mMeUcFfj4dNfHkf0dbckDWEnMkkj4WBv9RgnTcTlZoUBrO leZODQixTHSWzj1U5wIqzC83gjhYvgLZfSdm8Ybu2F2EwG57I6VH6hDfcYEUMx6aUkH7 PivL61f5OhcALIrcmJzqzFKIt1idnJ2fTRYuJuYEi4IfoYy+omhlvvIMsQhjKj+94pkW 5mQQ== X-Forwarded-Encrypted: i=1; AJvYcCUflQEChObLgYRS9+ynmkYcxfYv0MFFiV3QRQu5qtsj3AOmb9dhZU11Si10yRIRi7ol1YvBrMRtKA+MNkxjc14=@freebsd.org, AJvYcCWT+Sn9vvs7qDwZ9X5r4IOa/BndBdz3zn8zs+w8usJsrkLm0s7NiJFFt3sQ/jObAT9/QhrMGEHeT5I+b9bxwfQJiO4HJQ==@freebsd.org X-Gm-Message-State: AOJu0Yzi8Vnm6KOqMclyzOxC/krZJY9GIYR0DQIJIeCyDjeyKmC+nHXf GoE6XCRXw5L3b3Fuqbgxk+qmaIQZ3OHs0s+AHIz7qTrthgfAuGgRCk3+Qp82NJJaDdEfILBuDdC RjagN7rUbVUtM3gtND0jkIlfvYhzDj2ujY10iXN0= X-Gm-Gg: ASbGncswZItvkXTucittk2zHuQNDaH+nPOnWvpe0qs7Tft7udR1A+PCiExUKhMTSzkF RmpwPHZvihRWz4rUw+EzsrqphzMu7lMgzeOWj2ODLLBddlRBhF0TyA0JjSF1GfJUPjVbGwZDHec D/0a+7kb1vGG4Iyw/X+GXS+74KCajKvCuD5842OYXOGP7BDQvTVAt06MMacDNuOB7r0rS4vqkA0 BsVFOxhvA== X-Google-Smtp-Source: AGHT+IGzkj7McOb0ESKBcERMHqNEapR4fSEqLYivw6QxtPMFFJkC0RMJ4FLjzsI+Pi6Xg9cmsNxLqEKO4Dsp6uZycuc= X-Received: by 2002:a05:6102:948:b0:4e5:5c14:5937 with SMTP id ada2fe7eead31-5124ebca8dcmr372382137.1.1755246588119; Fri, 15 Aug 2025 01:29:48 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 From: Huckleberry Finn Date: Fri, 15 Aug 2025 16:29:37 +0800 X-Gm-Features: Ac12FXyiQoYbDDseh_rD5D_EFJrymrpQ8cBWuezhw7L-AK6SGFPlJfAHjKtOZJA Message-ID: Subject: unsubscribe To: dev-commits-src-all-request@freebsd.org, src-committers@freebsd.org, "dev-commits-src-main@freebsd.org" Content-Type: multipart/alternative; boundary="00000000000060cf12063c63319e" X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FREEMAIL_FROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[gmail.com]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_DN_EQ_ADDR_SOME(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::929:from]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+] X-Rspamd-Queue-Id: 4c3Ff96t9nz3FW2 X-Spamd-Bar: --- --00000000000060cf12063c63319e Content-Type: text/plain; charset="UTF-8" --00000000000060cf12063c63319e Content-Type: text/html; charset="UTF-8"

--00000000000060cf12063c63319e-- From nobody Fri Aug 15 12:09:05 2025 X-Original-To: dev-commits-src-main@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 4c3LW571Drz6500s; Fri, 15 Aug 2025 12:09:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3LW54gYVz3f8y; Fri, 15 Aug 2025 12:09:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755259745; 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=pXJbas65ked9Mfl8jjZ86TCUMs9Knj6N1rKQx3OgCV8=; b=UomxWVMZzjNG3G2kfGtO0aS+x8fS0y7vwi4jgld6iAGyLWWfDgiCOWNInz1cAI7ZLGhVkI XBix0UDZOQdGGytJ52irELi6WRctA2ZFrN0kzQhEeeVfi4C0MSNghkL+zs9Hc5ptSFm4Gm qJxupCmjEFgoMUa1Y/aMWrlwLIXI9BzLsLcY6D+WKHzsO1tv9mguPPh4ovnrPDxheS+34l vTN5sePMPP8mvOZyF1MODl11eF3rUeOIDn6RTozbolvXSM+FkBz/S8fi6OaKKJEENGFxkk 5oNW0MoKjgpKK4zIpxxohMr1edOSTaU8S3G1/caMOXE863grA+9LFyRZc7zy7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755259745; 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=pXJbas65ked9Mfl8jjZ86TCUMs9Knj6N1rKQx3OgCV8=; b=YGvs07Ee2H+MOF9iAMnDJpIHCjIh1naQb+5SZU1f9TjNJXiuKzsSOwExINqkDqBHF2JXj1 DmIu5dN24H2A6XCykRl9qJpLIBPXpx2nAMi1bAXzL0emwzwlPFm+NO20tO13Y1uuibMI1T hlsXbTK5XZcto9dA6stY+wWrxU8UkoAeNZfVIrxeN8kqHxpfziyr5HDaZycktOmlVJdqbV QGS4EwiyFobTRVGIqO1FNOnnNsWRekLdhbLZNyyhZmQqzyukvW2rH5jmkpaZkueNWeUDJH 4wCCBAZGVC+uCS3pda2tjY8bQHTmUisMWeQ3k6LA/WiEQQwv8H0YqdhutQldeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755259745; a=rsa-sha256; cv=none; b=aJCXHy0gETJUeyrpM5pZ3jMc2m/qkLZxuFyKsU7H2jJuclOpyHnz03W7Fijn/Xv2x6iH7Z FzwdR7JBhEWm4eku+LHjp+bWQlz8tIlWgC+217l+zZ6spL52W7bnL4ZQloRsxWWy9QtkpU J1OrXRZFGovxLk66qQkzv+SrtuV+Od5uyQ/Ln1bK+TUDWXGSYM2BGULmsA477qtEOI4une 8S+iNYZIpSKBaFdSAJogGyoTfNcUxzbbbFZLZTciiI5me3wN4uAhzZAGHmV285E6bh7aEi elnDsN1HSBp4NNmPGByDkQpSJaJuyGBObRy1BgIjKtBm4JjDYDvjofqrueZ/Qw== 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 4c3LW53hWbzdvj; Fri, 15 Aug 2025 12:09:05 +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 57FC95q7033631; Fri, 15 Aug 2025 12:09:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FC95jZ033628; Fri, 15 Aug 2025 12:09:05 GMT (envelope-from git) Date: Fri, 15 Aug 2025 12:09:05 GMT Message-Id: <202508151209.57FC95jZ033628@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Toomas Soome Subject: git: 6e25c4321cd5 - main - makefs: zfs uberblock location is calculated wrong List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tsoome X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6e25c4321cd5fcf54fa63f20cb787713245a87a8 Auto-Submitted: auto-generated The branch main has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=6e25c4321cd5fcf54fa63f20cb787713245a87a8 commit 6e25c4321cd5fcf54fa63f20cb787713245a87a8 Author: Toomas Soome AuthorDate: 2025-08-15 04:55:49 +0000 Commit: Toomas Soome CommitDate: 2025-08-15 04:55:49 +0000 makefs: zfs uberblock location is calculated wrong The shift used to calculate uberblock location depends both on minimum size (UBERBLOCK_SHIFT) and MAX_UBERBLOCK_SHIFT. Since makefs defaults to use ashift 12, it incidentally does get the correct size, but ashift 9 does not work with current code. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D51860 --- sys/cddl/boot/zfs/zfsimpl.h | 6 ++++++ usr.sbin/makefs/zfs.c | 2 +- usr.sbin/makefs/zfs/vdev.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/cddl/boot/zfs/zfsimpl.h b/sys/cddl/boot/zfs/zfsimpl.h index 83d964360343..915aeeda3c9e 100644 --- a/sys/cddl/boot/zfs/zfsimpl.h +++ b/sys/cddl/boot/zfs/zfsimpl.h @@ -536,6 +536,12 @@ typedef struct zio_gbh { offsetof(vdev_label_t, vl_uberblock[(n) << VDEV_UBERBLOCK_SHIFT(vd)]) #define VDEV_UBERBLOCK_SIZE(vd) (1ULL << VDEV_UBERBLOCK_SHIFT(vd)) +#define ASHIFT_UBERBLOCK_SHIFT(ashift) \ + MIN(MAX(ashift, UBERBLOCK_SHIFT), \ + MAX_UBERBLOCK_SHIFT) +#define ASHIFT_UBERBLOCK_SIZE(ashift) \ + (1ULL << ASHIFT_UBERBLOCK_SHIFT(ashift)) + typedef struct vdev_phys { char vp_nvlist[VDEV_PHYS_SIZE - sizeof (zio_eck_t)]; zio_eck_t vp_zbt; diff --git a/usr.sbin/makefs/zfs.c b/usr.sbin/makefs/zfs.c index 8d50c450541b..e33a182e5c8f 100644 --- a/usr.sbin/makefs/zfs.c +++ b/usr.sbin/makefs/zfs.c @@ -596,7 +596,7 @@ pool_labels_write(zfs_opt_t *zfs) * checksum is calculated in vdev_label_write(). */ for (size_t uoff = 0; uoff < sizeof(label->vl_uberblock); - uoff += (1 << zfs->ashift)) { + uoff += ASHIFT_UBERBLOCK_SIZE(zfs->ashift)) { ub = (uberblock_t *)(&label->vl_uberblock[0] + uoff); ub->ub_magic = UBERBLOCK_MAGIC; ub->ub_version = SPA_VERSION; diff --git a/usr.sbin/makefs/zfs/vdev.c b/usr.sbin/makefs/zfs/vdev.c index afcce402cb13..a2423e180ca3 100644 --- a/usr.sbin/makefs/zfs/vdev.c +++ b/usr.sbin/makefs/zfs/vdev.c @@ -200,7 +200,7 @@ vdev_label_write(zfs_opt_t *zfs, int ind, const vdev_label_t *labelp) * per sector; for example, with an ashift of 12 we end up with * 128KB/4KB=32 copies of the uberblock in the ring. */ - blksz = 1 << zfs->ashift; + blksz = ASHIFT_UBERBLOCK_SIZE(zfs->ashift); assert(sizeof(label->vl_uberblock) % blksz == 0); for (size_t roff = 0; roff < sizeof(label->vl_uberblock); roff += blksz) { From nobody Fri Aug 15 13:01:52 2025 X-Original-To: dev-commits-src-main@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 4c3Mh700Bfz652Zm; Fri, 15 Aug 2025 13:01:59 +0000 (UTC) (envelope-from aokblast@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3Mh66VDlz3mSn; Fri, 15 Aug 2025 13:01:58 +0000 (UTC) (envelope-from aokblast@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755262918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zDs6Eb06m+qnTLUqsRRdkW7SA4hFwFva9sImtIHH6Eg=; b=bA+dNYxgpPrO617SOsDMaXlMjXt6OBGU+r85gg9J0pRqqgBxNksf59jFwjljrdZm1LP/GV 2nYpwj/oux531NBfusbatBQbNabVFykYsMX41DlBPXy11pBX7P+2SRTKmvsjhzUItTi+BD 2yKXpv2MeEIfzEwmIrrEsgdNd9JUcyABO/0bZApLuAc6gYc7+Qb5KrNC8YJzOBUkv6fBYZ tvqeGQZ4D7+MZFgqJkENzdVkcsOqyminbIDbkVxYTq6xnnFPSw+nfUiiWDAviyCAyw95Jb YfSnJIsklpiqWuELF0aNesnUgLEk+otFT4srnRWQxcipq40P1uhzan6kayfGzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755262918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zDs6Eb06m+qnTLUqsRRdkW7SA4hFwFva9sImtIHH6Eg=; b=vNDUEj2N/aSk7+XMagUNw7VX/e8n+LMfaCtHL4jITySZL/CFb2l42n8IEqiSrUmEBrJf2w 8f+xqV6Nebo/IdbjStTVw4iK0nnG0Zw2SXbKDp2gZzmkpyMRmWQMkBA2ukAYutCFIMbJRg 9E7D0pY5rKLG2Q8VrNdp2F40jPDhN5PmLGbpeNgGiGguVic9Cv6OIMaxBd43mAgWfEW14M +vKNQ3fD+1jhZHjphd3yZAYrVyZ+obw1WwFmpJ08qBEs4mVwfVn/eX9N8vhRiZzpausisl 0IwW7JF8AV1KImvIC3w+Fxivh/ZG42vKHkfTuzXien+vGR5qufBUj/v3ix/7JA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755262918; a=rsa-sha256; cv=none; b=swoPk7q7zEa1sGYmC2j7uyO3hnap8mtPitG+XPa8AIWbYJ72X4YiqYMyxoH5nGXtsYnDN2 WudxwNDmF113xA/MBi5W4PLoNmukIPmF4bXeJXb4EtZNOCGuq00J59JoJnobPQq1/qPWOV WpIXjyG0wlGbeBEKwyVZKd+w/TTWt9CY/6loDoNGg+gnmvgaAqk1UXy7hXCLyO3XI9d0Os nVxNGupFyuIGMcu1Lx83E8c9K3zOcwTcSGW+uWhgeC0bxTtO0QzrOFEgz+veJ5Ggk+JCd8 TdykZEtjH8DTA/KII7SvRtZtJkttTAnL9sUSKUKD3CvlzTp9s6+y+H+pUiKuXg== Received: from aokblastdeMacBook-Pro.local (2001-b011-3808-134d-09b0-75ff-8527-aebd.dynamic-ip6.hinet.net [IPv6:2001:b011:3808:134d:9b0:75ff:8527:aebd]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: aokblast) by smtp.freebsd.org (Postfix) with ESMTPSA id 4c3Mh532dJz12Kl; Fri, 15 Aug 2025 13:01:57 +0000 (UTC) (envelope-from aokblast@freebsd.org) From: ShengYi Hung To: src-committers@FreeBSD.org Cc: dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: c992ac621327 - main - ipheth(4): Add CDC-NCM support for RX In-Reply-To: <202508150501.57F51usB044759@gitrepo.freebsd.org> (ShengYi Hung's message of "Fri, 15 Aug 2025 05:01:56 GMT") References: <202508150501.57F51usB044759@gitrepo.freebsd.org> User-Agent: mu4e 1.12.12; emacs 30.1 Date: Fri, 15 Aug 2025 21:01:52 +0800 Message-ID: List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Oops, The Differential Revision entry missed in the commit mesasge. The link is over here: https://reviews.freebsd.org/D49431. Sorry! ShengYi Hung writes: > The branch main has been updated by aokblast: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc992ac6213276f54d868f317cc= 5092f8aed4ff54 > > commit c992ac6213276f54d868f317cc5092f8aed4ff54 > Author: ShengYi Hung > AuthorDate: 2025-05-15 10:54:09 +0000 > Commit: ShengYi Hung > CommitDate: 2025-08-15 05:01:17 +0000 > > ipheth(4): Add CDC-NCM support for RX >=20=20=20=20=20 > The CDC-NCM (USB Communications Device Class =E2=80=93 Network Contro= l Model) > protocol allows multiple Ethernet frames to be encapsulated into a si= ngle > USB transfer. >=20=20=20=20=20 > On iOS, CDC-NCM is currently implemented for RX only and uses a fixed= number > of entries (16). To maintain compatibility with older iOS versions, w= e attempt > to enable NCM on the USB device first; if this fails, we fall back to= the > original behavior. >=20=20=20=20=20 > Approved by: lwhsu (mentor), markj (mentor) > MFC after: 2 weeks > Sponsored by: The FreeBSD Foundation > --- > sys/dev/usb/net/if_ipheth.c | 218 ++++++++++++++++++++++++++++++++---= ------ > sys/dev/usb/net/if_iphethvar.h | 21 ++++ > 2 files changed, 191 insertions(+), 48 deletions(-) > > diff --git a/sys/dev/usb/net/if_ipheth.c b/sys/dev/usb/net/if_ipheth.c > index f70113c53eb4..cfa800707391 100644 > --- a/sys/dev/usb/net/if_ipheth.c > +++ b/sys/dev/usb/net/if_ipheth.c > @@ -55,6 +55,7 @@ > #include >=20=20 > #include > +#include > #include > #include > #include "usbdevs.h" > @@ -81,6 +82,9 @@ static uether_fn_t ipheth_start; > static uether_fn_t ipheth_setmulti; > static uether_fn_t ipheth_setpromisc; >=20=20 > +static ipheth_consumer_t ipheth_consume_read; > +static ipheth_consumer_t ipheth_consume_read_ncm; > + > #ifdef USB_DEBUG > static int ipheth_debug =3D 0; >=20=20 > @@ -96,7 +100,31 @@ static const struct usb_config ipheth_config[IPHETH_N= _TRANSFER] =3D { > .direction =3D UE_DIR_RX, > .frames =3D IPHETH_RX_FRAMES_MAX, > .bufsize =3D (IPHETH_RX_FRAMES_MAX * MCLBYTES), > - .flags =3D {.short_frames_ok =3D 1,.short_xfer_ok =3D 1,.ext_buffer = =3D 1,}, > + .flags =3D {.short_frames_ok =3D 1, .short_xfer_ok =3D 1, .ext_buffer = =3D 1,}, > + .callback =3D ipheth_bulk_read_callback, > + .timeout =3D 0, /* no timeout */ > + }, > + > + [IPHETH_BULK_TX] =3D { > + .type =3D UE_BULK, > + .endpoint =3D UE_ADDR_ANY, > + .direction =3D UE_DIR_TX, > + .frames =3D IPHETH_TX_FRAMES_MAX, > + .bufsize =3D (IPHETH_TX_FRAMES_MAX * IPHETH_BUF_SIZE), > + .flags =3D {.force_short_xfer =3D 1,}, > + .callback =3D ipheth_bulk_write_callback, > + .timeout =3D IPHETH_TX_TIMEOUT, > + }, > +}; > + > +static const struct usb_config ipheth_config_ncm[IPHETH_N_TRANSFER] =3D { > + [IPHETH_BULK_RX] =3D { > + .type =3D UE_BULK, > + .endpoint =3D UE_ADDR_ANY, > + .direction =3D UE_DIR_RX, > + .frames =3D 1, > + .bufsize =3D IPHETH_RX_NCM_BUF_SIZE, > + .flags =3D {.short_frames_ok =3D 1, .short_xfer_ok =3D 1,}, > .callback =3D ipheth_bulk_read_callback, > .timeout =3D 0, /* no timeout */ > }, > @@ -204,6 +232,21 @@ ipheth_get_mac_addr(struct ipheth_softc *sc) > return (0); > } >=20=20 > +static bool > +ipheth_enable_ncm(struct ipheth_softc *sc) > +{ > + struct usb_device_request req; > + > + req.bmRequestType =3D UT_WRITE_VENDOR_INTERFACE; > + req.bRequest =3D IPHETH_CMD_ENABLE_NCM; > + USETW(req.wValue, 0); > + req.wIndex[0] =3D sc->sc_iface_no; > + req.wIndex[1] =3D 0; > + USETW(req.wLength, 0); > + > + return (usbd_do_request(sc->sc_ue.ue_udev, NULL, &req, NULL) =3D=3D 0); > +} > + > static int > ipheth_probe(device_t dev) > { > @@ -221,6 +264,7 @@ ipheth_attach(device_t dev) > struct ipheth_softc *sc =3D device_get_softc(dev); > struct usb_ether *ue =3D &sc->sc_ue; > struct usb_attach_arg *uaa =3D device_get_ivars(dev); > + const struct usb_config *config; > int error; >=20=20 > sc->sc_iface_no =3D uaa->info.bIfaceIndex; > @@ -235,18 +279,29 @@ ipheth_attach(device_t dev) > device_printf(dev, "Cannot set alternate setting\n"); > goto detach; > } > - error =3D usbd_transfer_setup(uaa->device, &sc->sc_iface_no, > - sc->sc_xfer, ipheth_config, IPHETH_N_TRANSFER, sc, &sc->sc_mtx); > - if (error) { > - device_printf(dev, "Cannot setup USB transfers\n"); > - goto detach; > - } > + > ue->ue_sc =3D sc; > ue->ue_dev =3D dev; > ue->ue_udev =3D uaa->device; > ue->ue_mtx =3D &sc->sc_mtx; > ue->ue_methods =3D &ipheth_ue_methods; >=20=20 > + if (ipheth_enable_ncm(sc)) { > + config =3D ipheth_config_ncm; > + sc->is_ncm =3D true; > + sc->consume =3D &ipheth_consume_read_ncm; > + } else { > + config =3D ipheth_config; > + sc->consume =3D &ipheth_consume_read; > + } > + > + error =3D usbd_transfer_setup(uaa->device, &sc->sc_iface_no, sc->sc_xfe= r, > + config, IPHETH_N_TRANSFER, sc, &sc->sc_mtx); > + if (error) { > + device_printf(dev, "Cannot setup USB transfers\n"); > + goto detach; > + } > + > error =3D ipheth_get_mac_addr(sc); > if (error) { > device_printf(dev, "Cannot get MAC address\n"); > @@ -389,12 +444,9 @@ ipheth_bulk_write_callback(struct usb_xfer *xfer, us= b_error_t error) > int actlen; > int aframes; >=20=20 > - usbd_xfer_status(xfer, &actlen, NULL, &aframes, NULL); > - > - DPRINTFN(1, "\n"); > - > switch (USB_GET_STATE(xfer)) { > case USB_ST_TRANSFERRED: > + usbd_xfer_status(xfer, &actlen, NULL, &aframes, NULL); > DPRINTFN(11, "transfer complete: %u bytes in %u frames\n", > actlen, aframes); >=20=20 > @@ -471,53 +523,40 @@ ipheth_bulk_read_callback(struct usb_xfer *xfer, us= b_error_t error) > uint8_t x; > int actlen; > int aframes; > - int len; > - > - usbd_xfer_status(xfer, &actlen, NULL, &aframes, NULL); >=20=20 > switch (USB_GET_STATE(xfer)) { > case USB_ST_TRANSFERRED: > - > + usbd_xfer_status(xfer, &actlen, NULL, &aframes, NULL); > DPRINTF("received %u bytes in %u frames\n", actlen, aframes); >=20=20 > - for (x =3D 0; x !=3D aframes; x++) { > - m =3D sc->sc_rx_buf[x]; > - sc->sc_rx_buf[x] =3D NULL; > - len =3D usbd_xfer_frame_len(xfer, x); > - > - if (len < (int)(sizeof(struct ether_header) + > - IPHETH_RX_ADJ)) { > - m_freem(m); > - continue; > - } > - > - m_adj(m, IPHETH_RX_ADJ); > - > - /* queue up mbuf */ > - uether_rxmbuf(&sc->sc_ue, m, len - IPHETH_RX_ADJ); > - } > + for (x =3D 0; x !=3D aframes; x++) > + sc->consume(xfer, x); >=20=20 > /* FALLTHROUGH */ > case USB_ST_SETUP: > - > - for (x =3D 0; x !=3D IPHETH_RX_FRAMES_MAX; x++) { > - if (sc->sc_rx_buf[x] =3D=3D NULL) { > - m =3D uether_newbuf(); > - if (m =3D=3D NULL) > - goto tr_stall; > - > - /* cancel alignment for ethernet */ > - m_adj(m, ETHER_ALIGN); > - > - sc->sc_rx_buf[x] =3D m; > - } else { > - m =3D sc->sc_rx_buf[x]; > + if (!sc->is_ncm) { > + for (x =3D 0; x !=3D IPHETH_RX_FRAMES_MAX; x++) { > + if (sc->sc_rx_buf[x] =3D=3D NULL) { > + m =3D uether_newbuf(); > + if (m =3D=3D NULL) > + goto tr_stall; > + > + /* cancel alignment for ethernet */ > + m_adj(m, ETHER_ALIGN); > + > + sc->sc_rx_buf[x] =3D m; > + } else { > + m =3D sc->sc_rx_buf[x]; > + } > + usbd_xfer_set_frame_data(xfer, x, m->m_data, m->m_len); > } > - > - usbd_xfer_set_frame_data(xfer, x, m->m_data, m->m_len); > + usbd_xfer_set_frames(xfer, x); > + } else { > + usbd_xfer_set_frame_len(xfer, 0, > + IPHETH_RX_NCM_BUF_SIZE); > + usbd_xfer_set_frames(xfer, 1); > } > - /* set number of frames and start hardware */ > - usbd_xfer_set_frames(xfer, x); > + > usbd_transfer_submit(xfer); > /* flush any received frames */ > uether_rxflush(&sc->sc_ue); > @@ -539,3 +578,86 @@ ipheth_bulk_read_callback(struct usb_xfer *xfer, usb= _error_t error) > break; > } > } > + > +static void > +ipheth_consume_read(struct usb_xfer *xfer, int x) > +{ > + struct ipheth_softc *sc =3D usbd_xfer_softc(xfer); > + struct mbuf *m =3D sc->sc_rx_buf[x]; > + int len; > + > + sc->sc_rx_buf[x] =3D NULL; > + len =3D usbd_xfer_frame_len(xfer, x); > + > + if (len < (int)(sizeof(struct ether_header) + IPHETH_RX_ADJ)) { > + m_freem(m); > + return; > + } > + > + m_adj(m, IPHETH_RX_ADJ); > + > + /* queue up mbuf */ > + uether_rxmbuf(&sc->sc_ue, m, len - IPHETH_RX_ADJ); > +} > + > +static void > +ipheth_consume_read_ncm(struct usb_xfer *xfer, int x) > +{ > + struct ipheth_softc *sc =3D usbd_xfer_softc(xfer); > + struct usb_page_cache *pc =3D usbd_xfer_get_frame(xfer, 0); > + struct ncm_data_cache ncm; > + if_t ifp =3D uether_getifp(&sc->sc_ue); > + struct mbuf *new_buf; > + int i, actlen; > + uint16_t dp_offset, dp_len; > + > + usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); > + > + if (actlen < IPHETH_NCM_HEADER_SIZE) > + return; > + > + usbd_copy_out(pc, 0, &ncm.hdr, sizeof(ncm.hdr)); > + > + if (UGETDW(ncm.hdr.dwSignature) !=3D 0x484D434E) > + return; > + > + /* Dpt follows the hdr on iOS */ > + if (UGETW(ncm.hdr.wDptIndex) !=3D (int)(sizeof(struct usb_ncm16_hdr))) > + return; > + > + usbd_copy_out(pc, UGETW(ncm.hdr.wDptIndex), &ncm.dpt, sizeof(ncm.dpt)); > + > + if (UGETDW(ncm.dpt.dwSignature) !=3D 0x304D434E) > + return; > + > + usbd_copy_out(pc, UGETW(ncm.hdr.wDptIndex) + sizeof(ncm.dpt), &ncm.dp, > + sizeof(ncm.dp)); > + > + for (i =3D 0; i < IPHETH_NCM_DPT_DP_NUM; ++i) { > + dp_offset =3D UGETW(ncm.dp[i].wFrameIndex); > + dp_len =3D UGETW(ncm.dp[i].wFrameLength); > + > + /* (3.3.1 USB CDC NCM spec v1.0) */ > + if (dp_offset =3D=3D 0 && dp_len =3D=3D 0) > + break; > + > + if (dp_offset < IPHETH_NCM_HEADER_SIZE || dp_offset >=3D actlen || > + actlen < (dp_len + dp_offset) || > + dp_len < sizeof(struct ether_header)) { > + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); > + continue; > + } > + if (dp_len > (MCLBYTES - ETHER_ALIGN)) { > + if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); > + continue; > + } > + > + new_buf =3D uether_newbuf(); > + if (new_buf =3D=3D NULL) { > + if_inc_counter(ifp, IFCOUNTER_IQDROPS, 1); > + continue; > + } > + usbd_copy_out(pc, dp_offset, new_buf->m_data, dp_len); > + uether_rxmbuf(&sc->sc_ue, new_buf, dp_len); > + } > +} > diff --git a/sys/dev/usb/net/if_iphethvar.h b/sys/dev/usb/net/if_iphethva= r.h > index 203bb96b6f22..d637e8f67d01 100644 > --- a/sys/dev/usb/net/if_iphethvar.h > +++ b/sys/dev/usb/net/if_iphethvar.h > @@ -41,6 +41,7 @@ > #define IPHETH_BUF_SIZE 1514 > #define IPHETH_TX_TIMEOUT 5000 /* ms */ >=20=20 > +#define IPHETH_RX_NCM_BUF_SIZE 65536 > #define IPHETH_RX_FRAMES_MAX 1 > #define IPHETH_TX_FRAMES_MAX 8 >=20=20 > @@ -55,10 +56,20 @@ > #define IPHETH_CTRL_TIMEOUT 5000 /* ms */ >=20=20 > #define IPHETH_CMD_GET_MACADDR 0x00 > +#define IPHETH_CMD_ENABLE_NCM 0x04 > #define IPHETH_CMD_CARRIER_CHECK 0x45 >=20=20 > #define IPHETH_CARRIER_ON 0x04 >=20=20 > +#define IPHETH_NCM_DPT_DP_NUM 22 > +#define IPHETH_NCM_DPT_HEADER_SIZE \ > + (sizeof(struct usb_ncm16_dpt) + \ > + IPHETH_NCM_DPT_DP_NUM * sizeof(struct usb_ncm16_dp)) > +#define IPHETH_NCM_HEADER_SIZE \ > + (sizeof(struct usb_ncm16_hdr) + IPHETH_NCM_DPT_HEADER_SIZE) > + > +typedef void (ipheth_consumer_t)(struct usb_xfer *xfer, int idx); > + > enum { > IPHETH_BULK_TX, > IPHETH_BULK_RX, > @@ -76,6 +87,16 @@ struct ipheth_softc { > uint8_t sc_data[IPHETH_CTRL_BUF_SIZE]; > uint8_t sc_iface_no; > uint8_t sc_carrier_on; > + > + bool is_ncm; > + > + ipheth_consumer_t *consume; > +}; > + > +struct ncm_data_cache { > + struct usb_ncm16_hdr hdr; > + struct usb_ncm16_dpt dpt; > + struct usb_ncm16_dp dp[IPHETH_NCM_DPT_DP_NUM]; > }; >=20=20 > #define IPHETH_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) --=20 Best Regards. ShengYi Hung. From nobody Fri Aug 15 13:18:32 2025 X-Original-To: dev-commits-src-main@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 4c3N3F0C8rz653WM; Fri, 15 Aug 2025 13:18:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3N3D6hmwz3qQ7; Fri, 15 Aug 2025 13:18:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755263913; 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=JajUyrd5yDehMP/CxQ2vph4y1VqKV/auFA8voSh580g=; b=n/YFPMzeW5U62JmSrTEFJFOcycG7DzdPQGSl2G7eVOXQ1g/BJkJz6RNdKqZPLx2Pi/mW2R 23a25M1nf4x4jwVTEfcHVY/X3+ZBj7oLfSqwCWYNg0fTFeNyyL8fZEx9S1Ed4psEvqguoe 34n9ZnRqCvV2AqYD4PVQbqBP+Bl8gLtcjEPtmuMngpKQLPuNjoH3zwCbiSHHHkkMt3fyUf IvsfN4SHoWoDl+jCL+gQOg5n/v9pJmTgovg7HWpqwR9hlZoIeshCrz/i3BFopZdAe9t55p s9neEbgphzQPsXIU+a0ZzbddDRSP0C55neU8LKNLrttD6xn3VOLFrV5jeLQjoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755263913; 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=JajUyrd5yDehMP/CxQ2vph4y1VqKV/auFA8voSh580g=; b=xM7Hg01CzZt0qEGQllkkDqfrXqrGjdj27vnjnRb39heP3iBxH2KjvFgKuzVcU4neFmDBwq J/n3defoL0+xfvBV9MYCtFRTltEgPjfSku4XaGEJH/p8JAY6evraqgTnmHwbiX4j7/Hu5D Ere6rleyQ14C7kaebli/Ra2lBeOrcsXfxKlf+3fH17HZwYcBJtLHKeXxzpkJSOSOlvg1ba 7JzeLD8OEIDeEs/9BrUCwvQfpNriYy0mL9FT2gFCW7spwZ5aorXMv0rqMyWAWf/9DXLcip yqaaHMuuLctitYIMTbUfJy7NDhmMpBrVLhguWGBvFHj5M9tmHunLCYaoHivQqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755263913; a=rsa-sha256; cv=none; b=lWHzwB6OrbunSTiWT5GfICE/7hSENNE6ZmMgJcGQc3JoWiADFEYHoXeK3gUJEQyU1fAwXW +E1Ihvs7d5lrnKZP8ND0cwSIiSkKC/IB2XbGkgnMxYZfw5BDd7KvrH7kpLxiDBnKkvWqeN 91OViH45cMQAIZGpnBVIm63ioDDd9TCuBmFq2JQTTFNICVrVvxhUkAvuuvhODseGR1+Tr5 5SWaZLHIQK2O1lw6lDNi7I1onzrkiR/c/WAT4fiWbfY9BtcdTrDh51G+5cHZCYhoG87cAA aX6B70KIn1ebtGIwS44wqIfeZdTtZfk+SiciYpmH4aZJnZuCfdaiqBJjb1ofqg== 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 4c3N3D5rLczgJD; Fri, 15 Aug 2025 13:18: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 57FDIWul064631; Fri, 15 Aug 2025 13:18:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FDIWfx064628; Fri, 15 Aug 2025 13:18:32 GMT (envelope-from git) Date: Fri, 15 Aug 2025 13:18:32 GMT Message-Id: <202508151318.57FDIWfx064628@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: 207cf8773aa7 - main - Revert "ssh: sshd-session: properly save off the privileged gid" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 207cf8773aa7600b340cf673d973add10d9031e5 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=207cf8773aa7600b340cf673d973add10d9031e5 commit 207cf8773aa7600b340cf673d973add10d9031e5 Author: Kyle Evans AuthorDate: 2025-08-15 13:17:58 +0000 Commit: Kyle Evans CommitDate: 2025-08-15 13:17:58 +0000 Revert "ssh: sshd-session: properly save off the privileged gid" This reverts commit 239e8c98636a7578cc67a6f9d54d14c71b095e36. Fixes: 9da2fe96ff ("kern: fix setgroups(2) and getgroups(2) [...]") --- crypto/openssh/uidswap.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/crypto/openssh/uidswap.c b/crypto/openssh/uidswap.c index 0143f4994611..6ed3024d0180 100644 --- a/crypto/openssh/uidswap.c +++ b/crypto/openssh/uidswap.c @@ -14,9 +14,6 @@ #include "includes.h" -#ifdef __FreeBSD__ -#include -#endif #include #include #include @@ -124,20 +121,8 @@ temporarily_use_uid(struct passwd *pw) fatal("setgroups: %.100s", strerror(errno)); #ifndef SAVED_IDS_WORK_WITH_SETEUID /* Propagate the privileged gid to all of our gids. */ -#ifdef __FreeBSD__ - /* - * FreeBSD traditionally includes the egid as the first element. If we - * use getegid() here then we effectively propagate user_groups[0], - * which is probably pw->pw_gid. Fix it to work as intended by using - * the egid we already have stashed off. - */ - assert(saved_egroupslen > 0); - if (setgid(saved_egroups[0]) == -1) - debug("setgid %u: %.100s", (u_int) saved_egroups[0], strerror(errno)); -#else if (setgid(getegid()) == -1) debug("setgid %u: %.100s", (u_int) getegid(), strerror(errno)); -#endif /* Propagate the privileged uid to all of our uids. */ if (setuid(geteuid()) == -1) debug("setuid %u: %.100s", (u_int) geteuid(), strerror(errno)); From nobody Fri Aug 15 14:20:41 2025 X-Original-To: dev-commits-src-main@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 4c3PQx6vPVz656Yt; Fri, 15 Aug 2025 14:20: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3PQx5fppz3wkY; Fri, 15 Aug 2025 14:20:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755267641; 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=DSc8INmZNYkXA8lbCaivkAOPAROzxrL++/dTG6Q1HaM=; b=OHO64dkjknU3BS7cGf8IQANc1UomETV78FVKucAWQAWHa0TC2ZQu8EmFBhfPFgR9nJ7Yly IkbFxqRxadkL3EpTlUNBfxwVT+ZIvxd5sfkj2f0eNVY3dcw20HOmw1IVLO6ZJ1V5PVMmPx QuknD/3haZGwuVuY+UrFadj0eVXFnljdGs8y2Xmm4CBL721hHeVo0/jvn37y79vyhMTuEB so2YNMZGjpTie8L9BHfppb0CW3mlDMz3o5e15Kdf7Q32l9ddG5UT8bL2s1DAH1B57Ois8j h1NebfHStHM0GVL9NxUb6b2+cH6MEwGw1t5IziaFzsplVVDyhko7LJ2C0LG5cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755267641; 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=DSc8INmZNYkXA8lbCaivkAOPAROzxrL++/dTG6Q1HaM=; b=FpynU+M+Ahj7NfS19+bICOWSa4cBLF9d8VZezB5PXrFNEOvFhvxdkeRhS2A2WXMVRNUBlQ 9UZhllnd3m4wcw8fBiArgUm3fTf2nGB1ZXXY5n6TG9l4kz89/EiZtH3BAKrPa+ZcQ5MhvJ wF1FnEJCx0p8ey9bFuSQCfFU3geqT+ZGCYkJsad4+MnzzfJtyniN6TufPyUX2dmoCcM1gX tuvYZ3/4y7zcdfIRdwhBYRAaCE84Rgd7uPZuf2HFCDAh4NeuxOGcOWhwvkae4/ELZfy/Kg UIc6UwrWZr/msKvVNVu6g/NjaX4x4vGuOEGxekT38u6txJLrSPquFkXeNL51rQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755267641; a=rsa-sha256; cv=none; b=JzSg2aGYekWLK+HQoZxdV/MQOBPHn2M+yRSahqTfBZs4ylJmcKtoAk4+uRagxpLjtYNMQU 07gVKPOamuo90b6NaPEMiGJ84BfhIh4+3hA7VjD+9dAewrKFV1P3SRVn2RWfZRJRPkGZzA lpUa7e8T3ey/pqjOCzp+HCD8VsgsjCp+7L0Fcjd6Hi4NISwCIq4EFBxlyXttQWOgxQ8M1N C28T5OGIxbSngYdAEzT2sxZEcZhGJueu/VjFHeUdGWS1nCfDHG/lLOPlbCVl9uekGsAvwF stZtrO0uJBi2cnSQZDnAsDHtgVQyWN64/J/PxymBBtaoDkSq6rMK+WHqhSlWTw== 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 4c3PQx4zYLzjTj; Fri, 15 Aug 2025 14:20: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 57FEKfwo086885; Fri, 15 Aug 2025 14:20:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FEKfEH086882; Fri, 15 Aug 2025 14:20:41 GMT (envelope-from git) Date: Fri, 15 Aug 2025 14:20:41 GMT Message-Id: <202508151420.57FEKfEH086882@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Popov Subject: git: e7a766f9d0b1 - main - release: Enable nuageinit for BASIC-CI images List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arrowd X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e7a766f9d0b1f975864553d7d27bcbe808f04f91 Auto-Submitted: auto-generated The branch main has been updated by arrowd: URL: https://cgit.FreeBSD.org/src/commit/?id=e7a766f9d0b1f975864553d7d27bcbe808f04f91 commit e7a766f9d0b1f975864553d7d27bcbe808f04f91 Author: Gleb Popov AuthorDate: 2025-08-15 13:15:43 +0000 Commit: Gleb Popov CommitDate: 2025-08-15 14:20:27 +0000 release: Enable nuageinit for BASIC-CI images Approved by: manu Differential Revision: https://reviews.freebsd.org/D51917 --- release/tools/basic-ci.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/tools/basic-ci.conf b/release/tools/basic-ci.conf index 12c9abb15fb1..4bcb87aec791 100644 --- a/release/tools/basic-ci.conf +++ b/release/tools/basic-ci.conf @@ -6,7 +6,7 @@ export VMSIZE=5g # Set to a list of third-party software to enable in rc.conf(5). -export VM_RC_LIST="sshd growfs" +export VM_RC_LIST="sshd growfs nuageinit" vm_extra_pre_umount() { cat << EOF >> ${DESTDIR}/etc/rc.conf From nobody Fri Aug 15 15:09:11 2025 X-Original-To: dev-commits-src-main@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 4c3QVw1dpYz658kK; Fri, 15 Aug 2025 15:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3QVw0sVWz479Y; Fri, 15 Aug 2025 15:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755270552; 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=ZCo4grEINFMWGK1jwVcyjyc3pIiCD52jeXr5co1qkac=; b=vv/z+Eec8bw06EctNbt73QvcLaRJ7wyeNyw+Yaf+KjF4RCv3TVow2Ura5LPw+aL4N+V0md Cf3fC/pZaHtZBfapUUSRidYMlwxkqNQzcLPe6zrPdK3GYfZzvc7tDvgb3K9TxJMEFaYnhg 1oRrUaAj/m/NjBS0IRzoCL/o4RQVsgwEOpmcAkoybTnNNxQ89tRenjKxRAh8PDIWFLS1uD bryyT3hUwuXzFxCP9/ucKyE+wHQEosBLFRd4kYx7/LWnsP0I4q25Krc4x/naG/75/v0vrF fEHTrDMmHULKSt8UOcDc4VuFzadsKo8S4e80hOqosTS/OfTl4ms/ODW7F9LpXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755270552; 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=ZCo4grEINFMWGK1jwVcyjyc3pIiCD52jeXr5co1qkac=; b=PPKjfX9to7prRn7T0tR6nqt1RNnArt5KNtDqFMuFyeYNelNZdlrYMVFeCCgjqECguaRxAG AqvZYWZvT8pbNWjJlY+5J/RAE0aDv+1/W4jF79KQgMZxTQ2PqzwRAumlbfF2LLYJx/fL/T RP/GFG95XyNTlxhddMzX7RZWo8WF2+1GbLzqdUz0cJFuThTH+yeDLmu3beMXrnG03OW3NW KMn6Ow1lwsi5I5R7kwulycPZnWk9RaPMru7E13jArQFYl6MWbU22hp2wSB51GjXaBrJ9SB O+V+lQq/rmpWIgkclCoCE/f4NewAp3u9tu+/ifAEXuVjBSO5Imj9lrvHnq4KQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755270552; a=rsa-sha256; cv=none; b=eUY4RtzT0e44AL2GC15DQiFJCX4tSzjyope+xnP8Wn5o6gqG3crONb3P/g5nvpRXD73qQo mlzVTTVNyCAnSSX+WNapIabibpiI7dsYYXl1CCIvSa6fsBnSGtIfvz5ywN0UHdycN8niUC GbNsRCgoZ1mqMYZXNLYQbEkavPFcs3Q/P0xnOYIs6vpSxl0J27eYgE/oBP5Yx43364cT7C Z6kXtGBQbFaX3s2R728vbJ784ESYZ1UK27543w9yHEqQ4QRnfsSuMowXQlWRB5VxyyGsta kKaPUPWaUEy2MmUw8f79OJ6MoHo6V/1XmHI514eADYwqis9DiM6FAIfCiN184w== 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 4c3QVw0BVNzk6n; Fri, 15 Aug 2025 15:09:12 +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 57FF9BBM072403; Fri, 15 Aug 2025 15:09:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FF9B0c072400; Fri, 15 Aug 2025 15:09:11 GMT (envelope-from git) Date: Fri, 15 Aug 2025 15:09:11 GMT Message-Id: <202508151509.57FF9B0c072400@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: 08f5e06c5e33 - main - kern: fix freebsd14 getgroups(2) compat List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 08f5e06c5e3332de231a664ffd6f7856e9fead07 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=08f5e06c5e3332de231a664ffd6f7856e9fead07 commit 08f5e06c5e3332de231a664ffd6f7856e9fead07 Author: Kyle Evans AuthorDate: 2025-08-15 15:08:18 +0000 Commit: Kyle Evans CommitDate: 2025-08-15 15:08:18 +0000 kern: fix freebsd14 getgroups(2) compat We need to actually copyout the remainder of the groups if the egid succeeded, not failed. My test that was designed to catch this along with the previously-found syzkaller panic did not zero out the groups array prior to re-fetching, so it did not catch that entries beyond the first were not actually populated. Pointy hat: kevans Fixes: 9da2fe96ff ("kern: fix setgroups(2) and getgroups(2) [...]") --- sys/kern/kern_prot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index beab30a9d157..dac0e40b0599 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -332,7 +332,7 @@ freebsd14_getgroups(struct thread *td, struct freebsd14_getgroups_args *uap) } error = copyout(&cred->cr_gid, uap->gidset, sizeof(gid_t)); - if (error != 0) + if (error == 0) error = copyout(cred->cr_groups, uap->gidset + 1, (ngrp - 1) * sizeof(gid_t)); From nobody Fri Aug 15 16:58:52 2025 X-Original-To: dev-commits-src-main@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 4c3SxS3h7Wz642Dl; Fri, 15 Aug 2025 16:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3SxS2vlGz4JJj; Fri, 15 Aug 2025 16:58:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755277132; 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=EoivqL/cvYa36/9UON3xlg0r5xstD0aGz50zd4Kwj3Q=; b=QHiWGvThvGyDSgDNZZUf7OcykmaaO8OEMkY9aBbXpmZPafdP5BLBe4H2P3h61rx2Or22ve bRrSRVvyD/zI2RrNbsrtiruiFqopTYXEs/8amE6JJwCN4L6ZWjqTkGn8rus8h9TMTugDK6 fIhHHElYAu/WU29mzMth/YhscJdPQH4/GcSCl/AoIRDdJvyF1MM6csVPP+5KA0B5FDHoOE 2AqR0OkV7yZGZbnuvT+fP2JLTVgBubnL292UMAHLVfydYmVt09LtPMq41WNRChXrB3JpPn kQq2Kt0EdWhV0c0nCr/z4zTOSwp9Pp2/kCHkjwDiOKhHE3hTctCkilAipZXO7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755277132; 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=EoivqL/cvYa36/9UON3xlg0r5xstD0aGz50zd4Kwj3Q=; b=cRK+W5ikqVMWKqGYQ7eqeSmKlgnosARCz4YELztOr+HmjSXa9Js8He79D+fFmjKYOaqsli gJ9YaGd5XZC6GOJyqeUE1/iJ+Q+g5ksRFjfx26k79zeyVY9YFdtovACF6AfszwcnBjYO+R 7ZqCJhLOmK6YDQHpUGRsrpjZAPSN8354hwO3xTefyxAcUV9AYYTNjulgYPihb+LddqHlFQ ixCvzGD4syf5jMa+4FSJsI06kgDwIjf+Yxy+H1FD2RqGgSYwyllMTwo7JKF6VIXrPf7eYD Pks0S28GFiZw8ENfsiNuuG9EmUv17j/ZO4ti30FwBqD10WjQ+Hy6NMIcgvGmoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755277132; a=rsa-sha256; cv=none; b=HCsYhYibxg8jXoLAyGdGbgFBnXfi9y57qIWZ6eb/l+zp+kPU92v4xfG8mcOx+6tWwz9wd+ J8rU39p5FTJWr9pj9DcoS43vmXCuUSBL4vY38Vd4rbfav43db3T89Mc9KbwgoeZbNVdNh6 fj8uVoB4F8JOIU9xabFmQJC/tcDEYTi4DIBDyiTitiMNJ53qIR8YZs2Fgzwa6BRVm6grc4 Wso8nECZj7WRuRlpKT64V/mx7Rqs18rEQSFHE55KMZ5+nWEF6s3spp1fayJ3aQiKDtEGII 8Ck2dKHzdvLidKdr8mcUHFTjsJuBY3LWRxSA/KjPakVTEWvm0qDqDSnNgDj8eg== 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 4c3SxS28HrznTh; Fri, 15 Aug 2025 16:58: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 57FGwq1H078530; Fri, 15 Aug 2025 16:58:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FGwqgO078527; Fri, 15 Aug 2025 16:58:52 GMT (envelope-from git) Date: Fri, 15 Aug 2025 16:58:52 GMT Message-Id: <202508151658.57FGwqgO078527@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 429152cb04e4 - main - hv_netvsc.4: Fix hn(4) mlink typo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 429152cb04e4efdb37437fb2b76fbcfd1ad043ab Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=429152cb04e4efdb37437fb2b76fbcfd1ad043ab commit 429152cb04e4efdb37437fb2b76fbcfd1ad043ab Author: Alexander Ziaee AuthorDate: 2025-08-15 16:40:30 +0000 Commit: Alexander Ziaee CommitDate: 2025-08-15 16:56:48 +0000 hv_netvsc.4: Fix hn(4) mlink typo MFC after: 3 days Fixes: e47939b3b1106 (hn: fix build on !x86) --- share/man/man4/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 1ba1fe46523e..f93610631bb3 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -846,7 +846,7 @@ _cpuctl.4= cpuctl.4 _dpms.4= dpms.4 _ftgpio.4= ftgpio.4 _ftwd.4= ftwd.4 -_hn.4= _hn.4 +_hn.4= hn.4 _hpt27xx.4= hpt27xx.4 _hptiop.4= hptiop.4 _hptmv.4= hptmv.4 From nobody Fri Aug 15 16:59:31 2025 X-Original-To: dev-commits-src-main@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 4c3SyD0wD6z642Nv; Fri, 15 Aug 2025 16:59: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3SyD0VPlz4Jbj; Fri, 15 Aug 2025 16:59:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755277172; 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=vPqtKnVYhBLCet1PwY/yvp9GaBgAPf043Pj93+GC7Pw=; b=YHR3+5mRsPjF8sbMslntqNM4baZh5ozIl8NQUjo6GoEEESBx6mQReIaMZ1jN0Z0aP6/aqV S6Uhw6G7MBgUcuChSPhRi04GKrDH2w1Hmq4roc0vYPkDhEwGm58vLNXRhQm/wDR+r33TSk BJ4yy21bSAIJ69SfyCo73vUCe+KgDBrKSmUGGzXvEvfQ5wEdT09IHoT+9z2RoFhV83Ck39 Qt/TfNLdPKZXMYtcLlXUGtyvmoF1jK2q6oQr6XA/50OT11Q0oR7hoiz6IjeoQumOWUPkxp 7bNo0Gdfaq6ZYPjF2E+3JGB3ZsEgdugqtdJrRETU+uuL2QYDdk+vGYy9uEi34A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755277172; 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=vPqtKnVYhBLCet1PwY/yvp9GaBgAPf043Pj93+GC7Pw=; b=uaX6HW3HaLPSmjFlpitDlYJZUX+NrCEYGzc9F9stR44Su44gCOQ/mVev+uJdRtL5d4DCGW 2y412lMNFMp5j1J3cUj4zcd0dRGNAv/aeFD/JDA1uC6UOFEMOk+foSER4asFttw55l4iBH VLLN5KN9hOPnDIXpy8OXD7Mci2GFH9Hv7Q128yOENrJs+qHnzwo75rKuPM09LYQI9r4/Ls QFTQD0TRd3TywK0l8Gvcxaq0xMTy74XtUlITYLXA1T1079y7t2FbQFsl5xj3OnzMuqsz1V 5dc42HxGCboAowhle0e2pRRNMCtmYJ3Ssxu1G2UXQ0F8yriyc5LfmOXgBGTCBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755277172; a=rsa-sha256; cv=none; b=su7LuHfMZGnGRKyreU5Q+dKF9KwxQ6kG7PN4O/o3RiAzw6BVlpP/1ydPgjOs6QJEUTD2VX rq6fOihggpqxl1tOQoBikGk0KZwdnUnk5FAHbb0IIy2icE9lSY54Xu4ETRq9+bDdU8LfvB BpeUGyN/jlz2+5WC9z4aN0GYLFs1dLhIH9nRBuS4Jko8uGFXi2vmZ3pEL35lQ5UbkRyAZV CS1vw/Y+N8azLRpFBjxcjK0/aydie4dpQsk0eq/uY4fLZ3ULyuFT5d95W/VBUxUlT0Bysd cqPYzCghAkH6YU/AKTHzYk0glGF1vOT4pMyDuHhMBJfKulmDuN/3vezT+PHolQ== 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 4c3SyC6xgHznMV; Fri, 15 Aug 2025 16:59: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 57FGxVWT078835; Fri, 15 Aug 2025 16:59:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FGxVeP078832; Fri, 15 Aug 2025 16:59:31 GMT (envelope-from git) Date: Fri, 15 Aug 2025 16:59:31 GMT Message-Id: <202508151659.57FGxVeP078832@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 837b13af68bd - main - Revert "Remove Secure RPC DES authentication" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 837b13af68bde317414f6c0ce295df66308cc31b Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=837b13af68bde317414f6c0ce295df66308cc31b commit 837b13af68bde317414f6c0ce295df66308cc31b Author: Lexi Winter AuthorDate: 2025-08-15 15:56:46 +0000 Commit: Lexi Winter CommitDate: 2025-08-15 16:59:18 +0000 Revert "Remove Secure RPC DES authentication" This reverts commit 7ac276298b72982189ac1a5b17461936dc00163e. Requested by: kib --- ObsoleteFiles.inc | 4 - RELNOTES | 6 - UPDATING | 4 + include/rpc/auth_des.h | 79 ++++- lib/libc/rpc/Symbol.map | 19 ++ lib/libc/rpc/auth_des.c | 455 ++++++++++++++++++++++++++++- lib/libc/rpc/authdes_prot.c | 44 ++- lib/libc/rpc/key_call.c | 424 ++++++++++++++++++++++++--- lib/libc/rpc/publickey.5 | 40 +++ lib/libc/rpc/rpc_secure.3 | 177 +++++++++++- lib/libc/rpc/rpc_soc.3 | 13 +- lib/libc/rpc/rpc_soc.c | 31 +- lib/libc/rpc/svc_auth.c | 8 + lib/libc/rpc/svc_auth_des.c | 460 +++++++++++++++++++++++++++++- lib/librpcsvc/Makefile | 2 +- lib/librpcsvc/yp_update.c | 199 +++++++++++++ libexec/rc/rc.conf | 1 + libexec/rc/rc.d/Makefile | 1 + libexec/rc/rc.d/ypupdated | 35 +++ share/man/man5/rc.conf.5 | 9 +- sys/rpc/auth.h | 26 ++ tools/build/mk/OptionalObsoleteFiles.inc | 2 + usr.sbin/Makefile | 1 + usr.sbin/rpc.ypupdated/Makefile | 32 +++ usr.sbin/rpc.ypupdated/Makefile.depend | 18 ++ usr.sbin/rpc.ypupdated/update.c | 328 +++++++++++++++++++++ usr.sbin/rpc.ypupdated/yp_dbdelete.c | 68 +++++ usr.sbin/rpc.ypupdated/yp_dbupdate.c | 147 ++++++++++ usr.sbin/rpc.ypupdated/ypupdate | 32 +++ usr.sbin/rpc.ypupdated/ypupdated_extern.h | 32 +++ usr.sbin/rpc.ypupdated/ypupdated_main.c | 287 +++++++++++++++++++ usr.sbin/rpc.ypupdated/ypupdated_server.c | 227 +++++++++++++++ 32 files changed, 3122 insertions(+), 89 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 4db0704d88ef..aaec7ace84fc 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -54,10 +54,6 @@ # 20250812: Remove a bogus manlink OLD_FILES+=usr/share/man/man3/quota_statfs.3.gz -# 20250810: Removal of remaining Secure RPC (DES) bits -OLD_FILES+=usr/sbin/rpc.ypupdated -OLD_FILES+=etc/rc.d/ypupdated - # 20250808: nvmfd removed from base install OLD_FILES+=usr/sbin/nvmfd OLD_FILES+=usr/share/man/man8/nvmfd.8.gz diff --git a/RELNOTES b/RELNOTES index c11e8543746c..040c33b7b89c 100644 --- a/RELNOTES +++ b/RELNOTES @@ -16,12 +16,6 @@ cce64f2e6851: This only works for exported ZFS file systems that have block cloning enabled, at this time. -7ac276298b72, 7b8c9de17448, 1271b1d747a7, 9dcb984251b3: - Support for Secure RPC DES authentication has been removed. This - includes publickey(5), keyserv(8) and the rpc_secure(3) routines which - rely on keyserv. The libc symbols are still present for backward - compatibility, but all functions will unconditionally return an error. - 37b2cb5ecb0f: Add support to VOP_COPY_FILE_RANGE() for block cloning. At this time, ZFS is the only local file system that supports diff --git a/UPDATING b/UPDATING index 82399310d299..587ad2f93cf2 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250815: + The removal of Secure RPC DES authentication notced in 20250810 + has been reverted. (However, it is still non-functional.) + 20250813: Commit cce64f2e6851 changed the internal KAPI between the NFS modules. As such, all of them need to be rebuilt from sources. diff --git a/include/rpc/auth_des.h b/include/rpc/auth_des.h index 1b4943a74b8b..0ff43c13139b 100644 --- a/include/rpc/auth_des.h +++ b/include/rpc/auth_des.h @@ -33,14 +33,91 @@ * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. */ -/* Note, RPC DES authentication was removed in FreeBSD 15.0. */ +/* + * auth_des.h, Protocol for DES style authentication for RPC + */ #ifndef _AUTH_DES_ #define _AUTH_DES_ +/* + * There are two kinds of "names": fullnames and nicknames + */ +enum authdes_namekind { + ADN_FULLNAME, + ADN_NICKNAME +}; + +/* + * A fullname contains the network name of the client, + * a conversation key and the window + */ +struct authdes_fullname { + char *name; /* network name of client, up to MAXNETNAMELEN */ + des_block key; /* conversation key */ + u_long window; /* associated window */ +}; + + +/* + * A credential + */ +struct authdes_cred { + enum authdes_namekind adc_namekind; + struct authdes_fullname adc_fullname; + u_long adc_nickname; +}; + + + +/* + * A des authentication verifier + */ +struct authdes_verf { + union { + struct timeval adv_ctime; /* clear time */ + des_block adv_xtime; /* crypt time */ + } adv_time_u; + u_long adv_int_u; +}; + +/* + * des authentication verifier: client variety + * + * adv_timestamp is the current time. + * adv_winverf is the credential window + 1. + * Both are encrypted using the conversation key. + */ +#define adv_timestamp adv_time_u.adv_ctime +#define adv_xtimestamp adv_time_u.adv_xtime +#define adv_winverf adv_int_u + +/* + * des authentication verifier: server variety + * + * adv_timeverf is the client's timestamp + client's window + * adv_nickname is the server's nickname for the client. + * adv_timeverf is encrypted using the conversation key. + */ +#define adv_timeverf adv_time_u.adv_ctime +#define adv_xtimeverf adv_time_u.adv_xtime +#define adv_nickname adv_int_u + +/* + * Map a des credential into a unix cred. + * + */ +__BEGIN_DECLS +extern int authdes_getucred( struct authdes_cred *, uid_t *, gid_t *, int *, gid_t * ); +__END_DECLS + __BEGIN_DECLS +extern bool_t xdr_authdes_cred(XDR *, struct authdes_cred *); +extern bool_t xdr_authdes_verf(XDR *, struct authdes_verf *); extern int rtime(dev_t, struct netbuf *, int, struct timeval *, struct timeval *); +extern void kgetnetname(char *); +extern enum auth_stat _svcauth_des(struct svc_req *, struct rpc_msg *); __END_DECLS #endif /* ndef _AUTH_DES_ */ diff --git a/lib/libc/rpc/Symbol.map b/lib/libc/rpc/Symbol.map index 61e8e084b1e0..105d6fb6b54e 100644 --- a/lib/libc/rpc/Symbol.map +++ b/lib/libc/rpc/Symbol.map @@ -8,9 +8,13 @@ FBSD_1.0 { xdr_desargs; xdr_desresp; + authdes_seccreate; + authdes_pk_seccreate; authnone_create; authunix_create; authunix_create_default; + xdr_authdes_cred; + xdr_authdes_verf; xdr_authunix_parms; bindresvport; bindresvport_sa; @@ -54,6 +58,15 @@ FBSD_1.0 { endrpcent; getrpcent; getrpcport; + key_setsecret; + key_secretkey_is_set; + key_encryptsession_pk; + key_decryptsession_pk; + key_encryptsession; + key_decryptsession; + key_gendes; + key_setnet; + key_get_conv; xdr_keystatus; xdr_keybuf; xdr_netnamestr; @@ -117,6 +130,7 @@ FBSD_1.0 { callrpc; registerrpc; clnt_broadcast; + authdes_create; clntunix_create; svcunix_create; svcunixfd_create; @@ -166,6 +180,8 @@ FBSD_1.0 { _authenticate; _svcauth_null; svc_auth_reg; + _svcauth_des; + authdes_getucred; _svcauth_unix; _svcauth_short; svc_dg_create; @@ -189,6 +205,9 @@ FBSD_1.8 { FBSDprivate_1.0 { __des_crypt_LOCAL; + __key_encryptsession_pk_LOCAL; + __key_decryptsession_pk_LOCAL; + __key_gendes_LOCAL; __svc_clean_idle; __rpc_gss_unwrap; __rpc_gss_unwrap_stub; diff --git a/lib/libc/rpc/auth_des.c b/lib/libc/rpc/auth_des.c index 754d55cbed3e..c9b20de25cda 100644 --- a/lib/libc/rpc/auth_des.c +++ b/lib/libc/rpc/auth_des.c @@ -30,34 +30,463 @@ /* * Copyright (c) 1988 by Sun Microsystems, Inc. */ - /* - * Secure RPC DES authentication was removed in FreeBSD 15.0. - * These symbols are provided for backward compatibility, but provide no - * functionality and will always return an error. + * auth_des.c, client-side implementation of DES authentication */ #include "namespace.h" #include "reentrant.h" +#include +#include +#include +#include +#include +#include +#include #include #include #include +#include +#include +#include +#undef NIS #include #include "un-namespace.h" +#include "mt_misc.h" + +#define USEC_PER_SEC 1000000 +#define RTIME_TIMEOUT 5 /* seconds to wait for sync */ + +#define AUTH_PRIVATE(auth) (struct ad_private *) auth->ah_private +#define ALLOC(object_type) (object_type *) mem_alloc(sizeof(object_type)) +#define FREE(ptr, size) mem_free((char *)(ptr), (int) size) +#define ATTEMPT(xdr_op) if (!(xdr_op)) return (FALSE) + +extern bool_t xdr_authdes_cred( XDR *, struct authdes_cred *); +extern bool_t xdr_authdes_verf( XDR *, struct authdes_verf *); +extern int key_encryptsession_pk(char *, netobj *, des_block *); + +extern bool_t __rpc_get_time_offset(struct timeval *, nis_server *, char *, + char **, char **); -static AUTH * -__authdes_seccreate(const char *servername, const u_int win, +/* + * DES authenticator operations vector + */ +static void authdes_nextverf(AUTH *); +static bool_t authdes_marshal(AUTH *, XDR *); +static bool_t authdes_validate(AUTH *, struct opaque_auth *); +static bool_t authdes_refresh(AUTH *, void *); +static void authdes_destroy(AUTH *); + +static struct auth_ops *authdes_ops(void); + +/* + * This struct is pointed to by the ah_private field of an "AUTH *" + */ +struct ad_private { + char *ad_fullname; /* client's full name */ + u_int ad_fullnamelen; /* length of name, rounded up */ + char *ad_servername; /* server's full name */ + u_int ad_servernamelen; /* length of name, rounded up */ + u_int ad_window; /* client specified window */ + bool_t ad_dosync; /* synchronize? */ + struct netbuf ad_syncaddr; /* remote host to synch with */ + char *ad_timehost; /* remote host to synch with */ + struct timeval ad_timediff; /* server's time - client's time */ + u_int ad_nickname; /* server's nickname for client */ + struct authdes_cred ad_cred; /* storage for credential */ + struct authdes_verf ad_verf; /* storage for verifier */ + struct timeval ad_timestamp; /* timestamp sent */ + des_block ad_xkey; /* encrypted conversation key */ + u_char ad_pkey[1024]; /* Server's actual public key */ + char *ad_netid; /* Timehost netid */ + char *ad_uaddr; /* Timehost uaddr */ + nis_server *ad_nis_srvr; /* NIS+ server struct */ +}; + +AUTH *authdes_pk_seccreate(const char *, netobj *, u_int, const char *, + const des_block *, nis_server *); + +/* + * documented version of authdes_seccreate + */ +/* + servername: network name of server + win: time to live + timehost: optional hostname to sync with + ckey: optional conversation key to use +*/ + +AUTH * +authdes_seccreate(const char *servername, const u_int win, const char *timehost, const des_block *ckey) { - return (NULL); + u_char pkey_data[1024]; + netobj pkey; + AUTH *dummy; + + if (! getpublickey(servername, (char *) pkey_data)) { + syslog(LOG_ERR, + "authdes_seccreate: no public key found for %s", + servername); + return (NULL); + } + + pkey.n_bytes = (char *) pkey_data; + pkey.n_len = (u_int)strlen((char *)pkey_data) + 1; + dummy = authdes_pk_seccreate(servername, &pkey, win, timehost, + ckey, NULL); + return (dummy); } -__sym_compat(authdes_seccreate, __authdes_seccreate, FBSD_1.0); -static AUTH * -__authdes_pk_seccreate(const char *servername __unused, netobj *pkey __unused, - u_int window __unused, const char *timehost __unused, - const des_block *ckey __unused, nis_server *srvr __unused) +/* + * Slightly modified version of authdessec_create which takes the public key + * of the server principal as an argument. This spares us a call to + * getpublickey() which in the nameserver context can cause a deadlock. + */ +AUTH * +authdes_pk_seccreate(const char *servername, netobj *pkey, u_int window, + const char *timehost, const des_block *ckey, nis_server *srvr) { + AUTH *auth; + struct ad_private *ad; + char namebuf[MAXNETNAMELEN+1]; + + /* + * Allocate everything now + */ + auth = ALLOC(AUTH); + if (auth == NULL) { + syslog(LOG_ERR, "authdes_pk_seccreate: out of memory"); + return (NULL); + } + ad = ALLOC(struct ad_private); + if (ad == NULL) { + syslog(LOG_ERR, "authdes_pk_seccreate: out of memory"); + goto failed; + } + ad->ad_fullname = ad->ad_servername = NULL; /* Sanity reasons */ + ad->ad_timehost = NULL; + ad->ad_netid = NULL; + ad->ad_uaddr = NULL; + ad->ad_nis_srvr = NULL; + ad->ad_timediff.tv_sec = 0; + ad->ad_timediff.tv_usec = 0; + memcpy(ad->ad_pkey, pkey->n_bytes, pkey->n_len); + if (!getnetname(namebuf)) + goto failed; + ad->ad_fullnamelen = RNDUP((u_int) strlen(namebuf)); + ad->ad_fullname = (char *)mem_alloc(ad->ad_fullnamelen + 1); + ad->ad_servernamelen = strlen(servername); + ad->ad_servername = (char *)mem_alloc(ad->ad_servernamelen + 1); + + if (ad->ad_fullname == NULL || ad->ad_servername == NULL) { + syslog(LOG_ERR, "authdes_seccreate: out of memory"); + goto failed; + } + if (timehost != NULL) { + ad->ad_timehost = (char *)mem_alloc(strlen(timehost) + 1); + if (ad->ad_timehost == NULL) { + syslog(LOG_ERR, "authdes_seccreate: out of memory"); + goto failed; + } + memcpy(ad->ad_timehost, timehost, strlen(timehost) + 1); + ad->ad_dosync = TRUE; + } else if (srvr != NULL) { + ad->ad_nis_srvr = srvr; /* transient */ + ad->ad_dosync = TRUE; + } else { + ad->ad_dosync = FALSE; + } + memcpy(ad->ad_fullname, namebuf, ad->ad_fullnamelen + 1); + memcpy(ad->ad_servername, servername, ad->ad_servernamelen + 1); + ad->ad_window = window; + if (ckey == NULL) { + if (key_gendes(&auth->ah_key) < 0) { + syslog(LOG_ERR, + "authdes_seccreate: keyserv(1m) is unable to generate session key"); + goto failed; + } + } else { + auth->ah_key = *ckey; + } + + /* + * Set up auth handle + */ + auth->ah_cred.oa_flavor = AUTH_DES; + auth->ah_verf.oa_flavor = AUTH_DES; + auth->ah_ops = authdes_ops(); + auth->ah_private = (caddr_t)ad; + + if (!authdes_refresh(auth, NULL)) { + goto failed; + } + ad->ad_nis_srvr = NULL; /* not needed any longer */ + return (auth); + +failed: + if (auth) + FREE(auth, sizeof (AUTH)); + if (ad) { + if (ad->ad_fullname) + FREE(ad->ad_fullname, ad->ad_fullnamelen + 1); + if (ad->ad_servername) + FREE(ad->ad_servername, ad->ad_servernamelen + 1); + if (ad->ad_timehost) + FREE(ad->ad_timehost, strlen(ad->ad_timehost) + 1); + if (ad->ad_netid) + FREE(ad->ad_netid, strlen(ad->ad_netid) + 1); + if (ad->ad_uaddr) + FREE(ad->ad_uaddr, strlen(ad->ad_uaddr) + 1); + FREE(ad, sizeof (struct ad_private)); + } return (NULL); } -__sym_compat(authdes_pk_seccreate, __authdes_pk_seccreate, FBSD_1.0); + +/* + * Implement the five authentication operations + */ + + +/* + * 1. Next Verifier + */ +/*ARGSUSED*/ +static void +authdes_nextverf(AUTH *auth __unused) +{ + /* what the heck am I supposed to do??? */ +} + + +/* + * 2. Marshal + */ +static bool_t +authdes_marshal(AUTH *auth, XDR *xdrs) +{ +/* LINTED pointer alignment */ + struct ad_private *ad = AUTH_PRIVATE(auth); + struct authdes_cred *cred = &ad->ad_cred; + struct authdes_verf *verf = &ad->ad_verf; + des_block cryptbuf[2]; + des_block ivec; + int status; + int len; + rpc_inline_t *ixdr; + + /* + * Figure out the "time", accounting for any time difference + * with the server if necessary. + */ + (void)gettimeofday(&ad->ad_timestamp, NULL); + ad->ad_timestamp.tv_sec += ad->ad_timediff.tv_sec; + ad->ad_timestamp.tv_usec += ad->ad_timediff.tv_usec; + while (ad->ad_timestamp.tv_usec >= USEC_PER_SEC) { + ad->ad_timestamp.tv_usec -= USEC_PER_SEC; + ad->ad_timestamp.tv_sec++; + } + + /* + * XDR the timestamp and possibly some other things, then + * encrypt them. + */ + ixdr = (rpc_inline_t *)cryptbuf; + IXDR_PUT_INT32(ixdr, ad->ad_timestamp.tv_sec); + IXDR_PUT_INT32(ixdr, ad->ad_timestamp.tv_usec); + if (ad->ad_cred.adc_namekind == ADN_FULLNAME) { + IXDR_PUT_U_INT32(ixdr, ad->ad_window); + IXDR_PUT_U_INT32(ixdr, ad->ad_window - 1); + ivec.key.high = ivec.key.low = 0; + status = cbc_crypt((char *)&auth->ah_key, (char *)cryptbuf, + (u_int) 2 * sizeof (des_block), + DES_ENCRYPT | DES_HW, (char *)&ivec); + } else { + status = ecb_crypt((char *)&auth->ah_key, (char *)cryptbuf, + (u_int) sizeof (des_block), + DES_ENCRYPT | DES_HW); + } + if (DES_FAILED(status)) { + syslog(LOG_ERR, "authdes_marshal: DES encryption failure"); + return (FALSE); + } + ad->ad_verf.adv_xtimestamp = cryptbuf[0]; + if (ad->ad_cred.adc_namekind == ADN_FULLNAME) { + ad->ad_cred.adc_fullname.window = cryptbuf[1].key.high; + ad->ad_verf.adv_winverf = cryptbuf[1].key.low; + } else { + ad->ad_cred.adc_nickname = ad->ad_nickname; + ad->ad_verf.adv_winverf = 0; + } + + /* + * Serialize the credential and verifier into opaque + * authentication data. + */ + if (ad->ad_cred.adc_namekind == ADN_FULLNAME) { + len = ((1 + 1 + 2 + 1)*BYTES_PER_XDR_UNIT + ad->ad_fullnamelen); + } else { + len = (1 + 1)*BYTES_PER_XDR_UNIT; + } + + if ((ixdr = xdr_inline(xdrs, 2*BYTES_PER_XDR_UNIT))) { + IXDR_PUT_INT32(ixdr, AUTH_DES); + IXDR_PUT_INT32(ixdr, len); + } else { + ATTEMPT(xdr_putint32(xdrs, (int *)&auth->ah_cred.oa_flavor)); + ATTEMPT(xdr_putint32(xdrs, &len)); + } + ATTEMPT(xdr_authdes_cred(xdrs, cred)); + + len = (2 + 1)*BYTES_PER_XDR_UNIT; + if ((ixdr = xdr_inline(xdrs, 2*BYTES_PER_XDR_UNIT))) { + IXDR_PUT_INT32(ixdr, AUTH_DES); + IXDR_PUT_INT32(ixdr, len); + } else { + ATTEMPT(xdr_putint32(xdrs, (int *)&auth->ah_verf.oa_flavor)); + ATTEMPT(xdr_putint32(xdrs, &len)); + } + ATTEMPT(xdr_authdes_verf(xdrs, verf)); + return (TRUE); +} + + +/* + * 3. Validate + */ +static bool_t +authdes_validate(AUTH *auth, struct opaque_auth *rverf) +{ +/* LINTED pointer alignment */ + struct ad_private *ad = AUTH_PRIVATE(auth); + struct authdes_verf verf; + int status; + uint32_t *ixdr; + des_block buf; + + if (rverf->oa_length != (2 + 1) * BYTES_PER_XDR_UNIT) { + return (FALSE); + } +/* LINTED pointer alignment */ + ixdr = (uint32_t *)rverf->oa_base; + buf.key.high = (uint32_t)*ixdr++; + buf.key.low = (uint32_t)*ixdr++; + verf.adv_int_u = (uint32_t)*ixdr++; + + /* + * Decrypt the timestamp + */ + status = ecb_crypt((char *)&auth->ah_key, (char *)&buf, + (u_int)sizeof (des_block), DES_DECRYPT | DES_HW); + + if (DES_FAILED(status)) { + syslog(LOG_ERR, "authdes_validate: DES decryption failure"); + return (FALSE); + } + + /* + * xdr the decrypted timestamp + */ +/* LINTED pointer alignment */ + ixdr = (uint32_t *)buf.c; + verf.adv_timestamp.tv_sec = IXDR_GET_INT32(ixdr) + 1; + verf.adv_timestamp.tv_usec = IXDR_GET_INT32(ixdr); + + /* + * validate + */ + if (bcmp((char *)&ad->ad_timestamp, (char *)&verf.adv_timestamp, + sizeof(struct timeval)) != 0) { + syslog(LOG_DEBUG, "authdes_validate: verifier mismatch"); + return (FALSE); + } + + /* + * We have a nickname now, let's use it + */ + ad->ad_nickname = verf.adv_nickname; + ad->ad_cred.adc_namekind = ADN_NICKNAME; + return (TRUE); +} + +/* + * 4. Refresh + */ +/*ARGSUSED*/ +static bool_t +authdes_refresh(AUTH *auth, void *dummy __unused) +{ +/* LINTED pointer alignment */ + struct ad_private *ad = AUTH_PRIVATE(auth); + struct authdes_cred *cred = &ad->ad_cred; + int ok; + netobj pkey; + + if (ad->ad_dosync) { + ok = __rpc_get_time_offset(&ad->ad_timediff, ad->ad_nis_srvr, + ad->ad_timehost, &(ad->ad_uaddr), + &(ad->ad_netid)); + if (! ok) { + /* + * Hope the clocks are synced! + */ + ad->ad_dosync = 0; + syslog(LOG_DEBUG, + "authdes_refresh: unable to synchronize clock"); + } + } + ad->ad_xkey = auth->ah_key; + pkey.n_bytes = (char *)(ad->ad_pkey); + pkey.n_len = (u_int)strlen((char *)ad->ad_pkey) + 1; + if (key_encryptsession_pk(ad->ad_servername, &pkey, &ad->ad_xkey) < 0) { + syslog(LOG_INFO, + "authdes_refresh: keyserv(1m) is unable to encrypt session key"); + return (FALSE); + } + cred->adc_fullname.key = ad->ad_xkey; + cred->adc_namekind = ADN_FULLNAME; + cred->adc_fullname.name = ad->ad_fullname; + return (TRUE); +} + + +/* + * 5. Destroy + */ +static void +authdes_destroy(AUTH *auth) +{ +/* LINTED pointer alignment */ + struct ad_private *ad = AUTH_PRIVATE(auth); + + FREE(ad->ad_fullname, ad->ad_fullnamelen + 1); + FREE(ad->ad_servername, ad->ad_servernamelen + 1); + if (ad->ad_timehost) + FREE(ad->ad_timehost, strlen(ad->ad_timehost) + 1); + if (ad->ad_netid) + FREE(ad->ad_netid, strlen(ad->ad_netid) + 1); + if (ad->ad_uaddr) + FREE(ad->ad_uaddr, strlen(ad->ad_uaddr) + 1); + FREE(ad, sizeof (struct ad_private)); + FREE(auth, sizeof(AUTH)); +} + +static struct auth_ops * +authdes_ops(void) +{ + static struct auth_ops ops; + + /* VARIABLES PROTECTED BY ops_lock: ops */ + + mutex_lock(&authdes_ops_lock); + if (ops.ah_nextverf == NULL) { + ops.ah_nextverf = authdes_nextverf; + ops.ah_marshal = authdes_marshal; + ops.ah_validate = authdes_validate; + ops.ah_refresh = authdes_refresh; + ops.ah_destroy = authdes_destroy; + } + mutex_unlock(&authdes_ops_lock); + return (&ops); +} diff --git a/lib/libc/rpc/authdes_prot.c b/lib/libc/rpc/authdes_prot.c index 56b44daafe41..79a0e5baa084 100644 --- a/lib/libc/rpc/authdes_prot.c +++ b/lib/libc/rpc/authdes_prot.c @@ -42,16 +42,44 @@ #include #include "un-namespace.h" -static bool_t -__xdr_authdes_cred(XDR *xdrs, void *cred) +#define ATTEMPT(xdr_op) if (!(xdr_op)) return (FALSE) + +bool_t +xdr_authdes_cred(XDR *xdrs, struct authdes_cred *cred) { - return (FALSE); + enum authdes_namekind *padc_namekind = &cred->adc_namekind; + /* + * Unrolled xdr + */ + ATTEMPT(xdr_enum(xdrs, (enum_t *) padc_namekind)); + switch (cred->adc_namekind) { + case ADN_FULLNAME: + ATTEMPT(xdr_string(xdrs, &cred->adc_fullname.name, + MAXNETNAMELEN)); + ATTEMPT(xdr_opaque(xdrs, (caddr_t)&cred->adc_fullname.key, + sizeof(des_block))); + ATTEMPT(xdr_opaque(xdrs, (caddr_t)&cred->adc_fullname.window, + sizeof(cred->adc_fullname.window))); + return (TRUE); + case ADN_NICKNAME: + ATTEMPT(xdr_opaque(xdrs, (caddr_t)&cred->adc_nickname, + sizeof(cred->adc_nickname))); + return (TRUE); + default: + return (FALSE); + } } -__sym_compat(xdr_authdes_cred, __xdr_authdes_cred, FBSD_1.0); -static bool_t -__xdr_authdes_verf(XDR *xdrs, void *verf) + +bool_t +xdr_authdes_verf(XDR *xdrs, struct authdes_verf *verf) { - return (FALSE); + /* + * Unrolled xdr + */ + ATTEMPT(xdr_opaque(xdrs, (caddr_t)&verf->adv_xtimestamp, + sizeof(des_block))); + ATTEMPT(xdr_opaque(xdrs, (caddr_t)&verf->adv_int_u, + sizeof(verf->adv_int_u))); + return (TRUE); } -__sym_compat(xdr_authdes_verf, __xdr_authdes_verf, FBSD_1.0); diff --git a/lib/libc/rpc/key_call.c b/lib/libc/rpc/key_call.c index eb274fcfff36..5c87881c815c 100644 --- a/lib/libc/rpc/key_call.c +++ b/lib/libc/rpc/key_call.c @@ -32,78 +32,426 @@ */ /* - * Secure RPC keyserver support was removed in FreeBSD 15.0. - * These symbols are provided for backward compatibility, but provide no - * functionality and will always return an error. + * key_call.c, Interface to keyserver + * + * setsecretkey(key) - set your secret key + * encryptsessionkey(agent, deskey) - encrypt a session key to talk to agent + * decryptsessionkey(agent, deskey) - decrypt ditto + * gendeskey(deskey) - generate a secure des key */ #include "namespace.h" #include "reentrant.h" +#include +#include +#include +#include #include -#include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "un-namespace.h" #include "mt_misc.h" -static int -__key_setsecret(const char *secretkey) + +#define KEY_TIMEOUT 5 /* per-try timeout in seconds */ +#define KEY_NRETRY 12 /* number of retries */ + +#ifdef DEBUG +#define debug(msg) (void) fprintf(stderr, "%s\n", msg); +#else +#define debug(msg) +#endif /* DEBUG */ + +/* + * Hack to allow the keyserver to use AUTH_DES (for authenticated + * NIS+ calls, for example). The only functions that get called + * are key_encryptsession_pk, key_decryptsession_pk, and key_gendes. + * + * The approach is to have the keyserver fill in pointers to local + * implementations of these functions, and to call those in key_call(). + */ + +cryptkeyres *(*__key_encryptsession_pk_LOCAL)(uid_t, void *arg) = 0; +cryptkeyres *(*__key_decryptsession_pk_LOCAL)(uid_t, void *arg) = 0; +des_block *(*__key_gendes_LOCAL)(uid_t, void *) = 0; + +static int key_call( u_long, xdrproc_t, void *, xdrproc_t, void *); + +int +key_setsecret(const char *secretkey) { - return (-1); + keystatus status; + + if (!key_call((u_long) KEY_SET, (xdrproc_t)xdr_keybuf, + (void *)secretkey, + (xdrproc_t)xdr_keystatus, &status)) { + return (-1); + } + if (status != KEY_SUCCESS) { + debug("set status is nonzero"); + return (-1); + } + return (0); } -__sym_compat(key_setsecret, __key_setsecret, FBSD_1.0); -static int -__key_secretkey_is_set(void) + +/* key_secretkey_is_set() returns 1 if the keyserver has a secret key + * stored for the caller's effective uid; it returns 0 otherwise + * + * N.B.: The KEY_NET_GET key call is undocumented. Applications shouldn't + * be using it, because it allows them to get the user's secret key. + */ + +int +key_secretkey_is_set(void) { + struct key_netstres kres; + + memset((void*)&kres, 0, sizeof (kres)); + if (key_call((u_long) KEY_NET_GET, (xdrproc_t)xdr_void, NULL, + (xdrproc_t)xdr_key_netstres, &kres) && + (kres.status == KEY_SUCCESS) && + (kres.key_netstres_u.knet.st_priv_key[0] != 0)) { + /* avoid leaving secret key in memory */ + memset(kres.key_netstres_u.knet.st_priv_key, 0, HEXKEYBYTES); + return (1); + } return (0); } -__sym_compat(key_secretkey_is_set, __key_secretkey_is_set, FBSD_1.0); -static int -__key_encryptsession_pk(char *remotename, netobj *remotekey, des_block *deskey) +int +key_encryptsession_pk(char *remotename, netobj *remotekey, des_block *deskey) { - return (-1); + cryptkeyarg2 arg; + cryptkeyres res; + + arg.remotename = remotename; + arg.remotekey = *remotekey; + arg.deskey = *deskey; + if (!key_call((u_long)KEY_ENCRYPT_PK, (xdrproc_t)xdr_cryptkeyarg2, &arg, + (xdrproc_t)xdr_cryptkeyres, &res)) { + return (-1); + } + if (res.status != KEY_SUCCESS) { + debug("encrypt status is nonzero"); + return (-1); + } + *deskey = res.cryptkeyres_u.deskey; + return (0); } -__sym_compat(key_encryptsession_pk, __key_encryptsession_pk, FBSD_1.0); -static int -__key_decryptsession_pk(char *remotename, netobj *remotekey, des_block *deskey) +int +key_decryptsession_pk(char *remotename, netobj *remotekey, des_block *deskey) { - return (-1); + cryptkeyarg2 arg; + cryptkeyres res; + + arg.remotename = remotename; + arg.remotekey = *remotekey; + arg.deskey = *deskey; + if (!key_call((u_long)KEY_DECRYPT_PK, (xdrproc_t)xdr_cryptkeyarg2, &arg, + (xdrproc_t)xdr_cryptkeyres, &res)) { + return (-1); + } + if (res.status != KEY_SUCCESS) { + debug("decrypt status is nonzero"); + return (-1); + } + *deskey = res.cryptkeyres_u.deskey; + return (0); } -__sym_compat(key_decryptsession_pk, __key_decryptsession_pk, FBSD_1.0); -static int -__key_encryptsession(const char *remotename, des_block *deskey) +int +key_encryptsession(const char *remotename, des_block *deskey) { - return (-1); + cryptkeyarg arg; + cryptkeyres res; + + arg.remotename = (char *) remotename; + arg.deskey = *deskey; + if (!key_call((u_long)KEY_ENCRYPT, (xdrproc_t)xdr_cryptkeyarg, &arg, + (xdrproc_t)xdr_cryptkeyres, &res)) { + return (-1); + } + if (res.status != KEY_SUCCESS) { + debug("encrypt status is nonzero"); + return (-1); + } + *deskey = res.cryptkeyres_u.deskey; + return (0); } -__sym_compat(key_encryptsession, __key_encryptsession, FBSD_1.0); -static int -__key_decryptsession(const char *remotename, des_block *deskey) +int +key_decryptsession(const char *remotename, des_block *deskey) { *** 2748 LINES SKIPPED *** From nobody Fri Aug 15 17:02:39 2025 X-Original-To: dev-commits-src-main@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 4c3T1r0Djnz642mh; Fri, 15 Aug 2025 17:02:40 +0000 (UTC) (envelope-from ivy@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (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 "freefall.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3T1q6lX8z4KFd; Fri, 15 Aug 2025 17:02:39 +0000 (UTC) (envelope-from ivy@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755277359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lbsqf3Zo/OzCjn4heUnCYhRfWZu8kh/nW9bU6ZXtoyA=; b=df/ypnKEt+G0TBHgvwujHnmLC7Dr5LjShZBTuRS/ZAClzfnBf4sy8V2kJHPOAu+lEZt8so QeuVJT/fX5z+TGPXMcVs6nWz3lRVe4YkA4FOvEtYK6oXR/6xwt1g2NO6aFAkrRSWskKblv /B8Wlaf9Gy2wRjrKDsO2k2Ru/JmilEIGzN2xM1/Y3RLiVYY9frTmvG6VdkoNbOiBKvFTOn P7Qdz5TejozplTjq6EWNVDQZOU1GEt+sn5XsYlKizKaDeO8PtYEgBD/RaNey7TnAhElPnh HU25NZMAqOJ9BeaiwIXKvahblj1RnFmTwtJjcA1u4WHYBZNlXgrIO0DEB9lSAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755277359; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lbsqf3Zo/OzCjn4heUnCYhRfWZu8kh/nW9bU6ZXtoyA=; b=vtrM3JfxwErls3lmSljK+i9m507GbeKvbI9PWQ5+jIqfI66aUtSuWBvhHSJZ06ELsSD+EZ AQQqssufto+i4LiZ4QueXXF6Requ5KagxJ308drQ6iLpdianT71CjBfhsfZEvWQtRkzm4L 5XJSLiwt7Weke8QSvcuRJFkDknAZH500iPJqv3sXTSd2QKLdVC11vPoTSQUWIEs6l3Nuby dGIds9oQWZfqJpnePYLteT8vwci1B4bIQU/qGGB/Seja9GcSBBqJARlDm94btRDet1cFv+ vmBZZyDnpCgir6g33zLkp9OMyNv7hplPvnMTyPuSXmxqALEinURFSinMgMHd/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755277359; a=rsa-sha256; cv=none; b=du79h+Gqkkj/ZlA77ZS0DHAgpgT/T/p+pVXtnEy+wQhDiSdp9T2NOFwWqwLP4JXfrxnm0q OL6yrCZClWXdXiP79Q3qbb9XX0Eoo4k2jtMfZX4rkKdyP4mGIFAk33OVypmd0JRpz14Sa3 DzfkldhNwbR1+cwfntOKHyALV6Xy764lr0I7+aLVH37tLpJ4YMZd9mX0bTsydUElEgETe+ dfHCBdCwOs5oBh+hyUcJBQYIFFWFwFGyMa5+k92gXAnJyYJl+I24hy9pcLCE/bbR6UPIHt +WTFUEHno9V9IYNNyT+rCf3ZGVCqWUMyKMUIPVKYxGL0gtei/TlfpJEUePmJNg== Received: by freefall.freebsd.org (Postfix, from userid 1532) id D2D4711A3D; Fri, 15 Aug 2025 17:02:39 +0000 (UTC) Date: Fri, 15 Aug 2025 18:02:39 +0100 From: Lexi Winter To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, srcmgr@freebsd.org Subject: Re: git: 7ac276298b72 - main - Remove Secure RPC DES authentication Message-ID: Mail-Followup-To: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, srcmgr@freebsd.org References: <202508101537.57AFbHrI067216@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AJ86DyxtW+7bzpFM" Content-Disposition: inline In-Reply-To: --AJ86DyxtW+7bzpFM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Konstantin Belousov: > The commit breaks libc ABI and must be reverted. > This email is the formal request to do so. =20 > To make it clear: despite the presence of symcompat versions, there is > no justification to remove the implementation. Default version for > symbols might be removed, but the implementation shall be left alone. =20 okay, done. however, unless i removed more than i intended, none of this code works since it relies on keyserv (which was removed months ago), so it's basically dead code. > This is how we handle all other cases of obsoleted interfaces, gets() > being the exemplary case. this is a little different from gets, since gets still worked even after the public interface was removed.=20 --AJ86DyxtW+7bzpFM Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaJ9oLAAKCRD1nT63mIK/ YDyoAQCeL+pTuz0grm/H27f7hZMAhtThgINITni305oG79rKvQD/aWjj/iiEXfTU csUROPbKAZ8TZUWDUF3Ny5st2VmhKw8= =RoIt -----END PGP SIGNATURE----- --AJ86DyxtW+7bzpFM-- From nobody Fri Aug 15 17:06:11 2025 X-Original-To: dev-commits-src-main@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 4c3T5w2DwNz642gG; Fri, 15 Aug 2025 17:06:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3T5w0pCfz4KVb; Fri, 15 Aug 2025 17:06:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755277572; 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=xjXxmO4gHQC3kKOj89hVwdxbJpG6+9qT+KvbyBZ0TwE=; b=UWZbNPQEcFLpdXtNG5c0ohVJl9nTRymY8cw5MNKOyNgUAPW0cCFSchNLAJAsiSFbCdN0jk mVfKyDruS1z1zgxoe/z6XU1IrNWVHEWeBAZuzBAfFv3ZgeT4MOfuHYb4PjdKAy06x2Q3xC QVJMhz4fOvRKe+f7m1A7xZCbRwyaXtn++L98juIPudrAOKBpdVmSAq7egLjBkaAbyP5g27 mGpztqCw/1+mw2xLUiRdkCzaqhPsdpDbP9KKVYS4zNu2aYeGgYAESppxvBfjia94rjD4Td 8qftx9i4mpItDTP4ebb9Qrw4rkFViePOAYbv1yNVRV+HK6LISC4Da5mDo1dD5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755277572; 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=xjXxmO4gHQC3kKOj89hVwdxbJpG6+9qT+KvbyBZ0TwE=; b=WfOWfEVdYxd1crSUlLeJ1s3TlC5tjp5CDFM+U6rt12Z7sE9Qd5e46y/D9Z5cmOBP1TFDs+ rCUruxofKoEDrc5xFvs1LKvf9FlvtASIC90BNoDsowSnAK9kFFsd8YNLPOlYL02dUeRQuQ GvptTni03HhHZVZtWHjaOOIUjmfhUtohUPxLXEIHdv/+rQ0vNliTtfPkrUusgjb723ONqt P3Ea6c/yK0VGnk0LqUGSFNTSy6v3aOVvU1R5Clf4aFMfBd5teB1+mau6O5PGKaQfdQ0gK9 TxkoQ5i8nq73pF+DT8CFj+5YoO/ktyB/tBaDLxMWNyZAse/utNUGYGKtPRWRKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755277572; a=rsa-sha256; cv=none; b=YrULMT0y4hT6StuORpfWnCNcz/D1U+0J4KLxC+NYnXpaUo/K9ygLRyW9KAw6ducQLpV9J/ lKMqxo35el6s8QwcmoIf8HNs0yJMcjzUnQnx6t5E6PDNYt1mG2sT1lBfYatvoGtLFzLt7N LsxCRQ/94DrPSXdTdl7aDQS3sYLja+qQnLKslKM/JkWvkUggz+Uv70MrAyxm4jhgWrI2Lz fqCJ0IXOQd/CTD+81TJEkwLMqE9bBdKYIdmrEr2kRdgYZoTO3OYnAj4kZ/fYZzYtBcls+d HO9PwXKyfSnKNowg2XQMMjVhi/5giGaT1cYAgVvQ3GIuPsJgkHzAZtN/ZzCLSQ== 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 4c3T5w06vBznV3; Fri, 15 Aug 2025 17:06:12 +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 57FH6BuQ097292; Fri, 15 Aug 2025 17:06:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FH6Bme097289; Fri, 15 Aug 2025 17:06:11 GMT (envelope-from git) Date: Fri, 15 Aug 2025 17:06:11 GMT Message-Id: <202508151706.57FH6Bme097289@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: a95b1744f610 - main - iflib: Only define lro_enabled if either INET or INET6 is defined List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: a95b1744f6108236977294318ae265642e4dcdae Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a95b1744f6108236977294318ae265642e4dcdae commit a95b1744f6108236977294318ae265642e4dcdae Author: John Baldwin AuthorDate: 2025-08-15 16:59:18 +0000 Commit: John Baldwin CommitDate: 2025-08-15 17:06:03 +0000 iflib: Only define lro_enabled if either INET or INET6 is defined Fixes: e69573bc2bee ("iflib: simplify lro & use tcp_lro_queue_mbuf()") --- sys/net/iflib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 6638c90882aa..2b43f6f19051 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2910,7 +2910,9 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) struct if_rxd_info ri; int err, budget_left, rx_bytes, rx_pkts; iflib_fl_t fl; +#if defined(INET6) || defined(INET) int lro_enabled; +#endif uint8_t retval = 0; /* @@ -2936,7 +2938,9 @@ iflib_rxeof(iflib_rxq_t rxq, qidx_t budget) return (retval); } +#if defined(INET6) || defined(INET) lro_enabled = (if_getcapenable(ifp) & IFCAP_LRO); +#endif /* pfil needs the vnet to be set */ CURVNET_SET_QUIET(if_getvnet(ifp)); From nobody Fri Aug 15 17:06:13 2025 X-Original-To: dev-commits-src-main@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 4c3T5x31Qdz642gH; Fri, 15 Aug 2025 17:06: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3T5x1Czjz4KZw; Fri, 15 Aug 2025 17:06:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755277573; 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=xZBw8L1ESVUxO7N3AS1jRVDoqWeixBuulZfyS949C0U=; b=qooVq69oAfTRkvfyd5cD+/XOtTudMDWe98fhzGglABtinkQB+q57p+TUpOOzeAAzJCBR5I XLAXxE2xywaU0abL5/x+yt1PwB1mgq0VJW7mhvxl6QNLJejgwAT+UiUJt8VziyCFdKoaL7 CuUvFtQjhlKVmddRh9Q+rdF9+iJwg1PPE+njXHjjlIxuPjoerk4JLsfABbeZZvkWXuZNIs kcZYbJZ+8jdwgXHOaSyjOGConVbBijA+rXW6Zk1CDTpCbax5+tOFgaRe8IPkyMCWPbUhKk 0cZWhx/EKKsd93o/1l1PB91D5PHyx17A0wO+zc67lGXYAQR8bvjh4XcPRgkjQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755277573; 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=xZBw8L1ESVUxO7N3AS1jRVDoqWeixBuulZfyS949C0U=; b=qjE0HnSHgckeHsh62qjVbpia7kPLJtNZ+3CDMt6SPrhJenuUywFuwMp+FOuZuoHs7Ut5HU 60GYAH3ZvsspVBIkfixJ75Km6HXT7CT9gkowqAdOT6eMh8fOKeQ/J/+/KmuLfSi7fct5Gz hNMVFqQ7CmdhfEuREq9LMV/yht4XUM2iZUPw9u1DsQuoiWoEvt9fcjFppFtCG9VtclMpg1 Mea1sVLHcDa53N71vXJhfhE89JTlfPqG908Wyh//143LoDhLEaX0Ipi72HBfB1jvBSRenl lyb9v0EVi1spOlcNnm7si0jZf4a24qtRG8GfaAdq3mPGLFGrzP6MJLUJjsXIgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755277573; a=rsa-sha256; cv=none; b=iQ9pkuMGB6hh6SnCLrYBaOHkPjIQhwYyZELgG98Rw+qZhibMw/mvQQDfLKI2ttzUucWube PDxVUhKUd2W1NIwxWY31PB2p4X2YkQe1sUdJbnFCtK7BC99KWAAF+ktmx91LOTSRcb1SGk J4mrDgh/5/kVxkAvZyYfublMeBDKNlPFbN5dnmJLV1//VPgVkRw/uV/JPzV+a9jCJ1yjMe CVQixhVvnCGUnvwODvouSe1tLaiXM7mPZpgP574PRbNPR/L8w4xoidvzS/QmdwrDUCsSOZ reZwY/ILKn1sip6rocmip60pBvdwfXNlCOLi/PRj3xTRQC6hDRpacoDarW9b7Q== 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 4c3T5x0mSRznV4; Fri, 15 Aug 2025 17:06: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 57FH6Du3097325; Fri, 15 Aug 2025 17:06:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FH6DnV097322; Fri, 15 Aug 2025 17:06:13 GMT (envelope-from git) Date: Fri, 15 Aug 2025 17:06:13 GMT Message-Id: <202508151706.57FH6DnV097322@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: 9630e68f94a4 - main - ossl: Add chacha-armv8-sve.S on aarch64 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 9630e68f94a45b64087b18cc21be07ba3d3c3e8e Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9630e68f94a45b64087b18cc21be07ba3d3c3e8e commit 9630e68f94a45b64087b18cc21be07ba3d3c3e8e Author: John Baldwin AuthorDate: 2025-08-15 17:04:05 +0000 Commit: John Baldwin CommitDate: 2025-08-15 17:06:03 +0000 ossl: Add chacha-armv8-sve.S on aarch64 Fixes: 4757b351ea9d ("openssl: Import version 3.5.1") --- sys/conf/files.arm64 | 2 ++ sys/modules/ossl/Makefile | 1 + 2 files changed, 3 insertions(+) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 641001efab5e..45966fea8041 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -178,6 +178,8 @@ crypto/des/des_enc.c optional netsmb crypto/openssl/ossl_aarch64.c optional ossl crypto/openssl/aarch64/chacha-armv8.S optional ossl \ compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} -I$S/crypto/openssl ${WERROR} ${.IMPSRC}" +crypto/openssl/aarch64/chacha-armv8-sve.S optional ossl \ + compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} -I$S/crypto/openssl ${WERROR} ${.IMPSRC}" crypto/openssl/aarch64/poly1305-armv8.S optional ossl \ compile-with "${CC} -c ${CFLAGS:N-mgeneral-regs-only} -I$S/crypto/openssl ${WERROR} ${.IMPSRC}" crypto/openssl/aarch64/sha1-armv8.S optional ossl \ diff --git a/sys/modules/ossl/Makefile b/sys/modules/ossl/Makefile index 7a92742d6b36..ac2c752e922e 100644 --- a/sys/modules/ossl/Makefile +++ b/sys/modules/ossl/Makefile @@ -29,6 +29,7 @@ SRCS.arm= \ SRCS.aarch64= \ chacha-armv8.S \ + chacha-armv8-sve.S \ poly1305-armv8.S \ sha1-armv8.S \ sha256-armv8.S \ From nobody Fri Aug 15 18:04:34 2025 X-Original-To: dev-commits-src-main@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 4c3VPY3B1wz6467P; Fri, 15 Aug 2025 18:04:49 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) (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 4c3VPX6gnBz4NgF; Fri, 15 Aug 2025 18:04:48 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-b4717563599so1908394a12.3; Fri, 15 Aug 2025 11:04:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755281086; x=1755885886; darn=freebsd.org; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=SDl1G8Ygu0gyePkFJsSSahCH34Xzvn3fMCKiZ8Daong=; b=gKes+b0m4qGJZecuah/gMAB1me8zsvAX9WiBszTMLEPqbgDV6nPA9bOhF/RyA3RWKz 68rW/genL4Z6SRH4UKQzrPQMafP23klZy0G5DzpwFTUUlTxbbrQKXekk7mg4PNcTXFiA RR9YsxnsucUscw1V+D+nzdvhJ+oa1UzvBhhhnTp6vqoyKU2P3CbYEYuTh6eGbd3TICWG 6tE/wJSkSY7JN7O3qtwX/zE4f1+AEig61h4ksqXAjEZpoa48TJOFpSyNA9M46fq99uW2 MWasFfHKI31oold3hCKXP9OUqK3fBTnl3ab16xLbG0ZZcvHpmvqKC2379hlTU1Hos7J+ MMWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755281086; x=1755885886; h=to:references:message-id:cc:date:in-reply-to:from:subject :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SDl1G8Ygu0gyePkFJsSSahCH34Xzvn3fMCKiZ8Daong=; b=twyyY0+Qs6FsKeOy6+CVnS+5V1hsxXbKk8xpHY+m4pO07cVsQnQv6DIYm7qpgrVecS loLiTJIzBJ7CjkfmWwmgJU/VWKaNSOYjeFjW2VnQ6JYregomT4WN4WD7TA9zQDld3wPv LaK8y9xb/0EXTS1Wjo7ki3S1In8YX1To+el4Rq9+o54D1UveWII7Q1lJlyHqrWEtbTwU jIiNcFdGkYQN/wo3mN9+4+1XbFma9K2I7ttBHE8U1fS9HrBAaHdfxaQzcl75QHKYg8pl rnyqX0tzasRAqYGGlbZDPoFg+84Lv6XvSoIsy/EqPVBXs4UPKEZUxHtTYMgb4W21g3EM 3DRw== X-Forwarded-Encrypted: i=1; AJvYcCVEPsU8wYmfpV2npoa8K8nshpxpYpbsTkQNJ6Z7pkyPJO3RYGvvlR7yFbDUSbdiKl1e9rn0psJO15COj+5+ZUvw/M5+@freebsd.org, AJvYcCWekrjNSVdYR1EI16muVDMzPD4F5mM/wNUDugb8UqKbD6dxigQGDspP7NTu1RMd/iIFBV+8P+zAhyvrBmwTe9Rjgq35V5s=@freebsd.org X-Gm-Message-State: AOJu0YxhTt2eLEz756a3ZzVQFwNKI7pW6jVu+sg9AL74O4xWJYq77kc9 98/cd7qBvLG5oy/pFKOXw4hF+1UX1bshA7f4DGjD1WOXkFvY6z8J8dhT5+ByQWYe X-Gm-Gg: ASbGnctpf8Wbzi7jKr8ddl08dNxN0WQWw7iFVzDINU61b9SI+0V/O2bI6mI9Hk3GlHY OVJ9+BMl9/d1uUaCc8lGgK2QBJqX/mgKL+upIAAo1Ba25JB6nyW3kz+OmPQQ7j1+iJdeLSdRcd0 W1+W29NI6Ilx0XIo7y00+x8IGb7yBdUrzGEIfvd+ntSIglDlHEOzrLMSn96FVoSOO72zUB2LMP+ y3mMzT6Kq82MXWW2YVF0qvqv5nLB9GJQe0dxCvWNBnc2oqbiq0rUIq11K4Trd7DJV8fIo0b9X/6 QRu2/ciZQD+CC7AxTN3rGARXhsYbr5yjvEEWleYDioHBO/4MPtCeOupyQhD9wdscUJyv0Q2W3ho X7TtoxHBp98uwucuDXwMLjfbxOFnpnFHtfAMRT+ypUZSGwFs7DSZZ X-Google-Smtp-Source: AGHT+IHf06zucWqeZc/sUBJ/SIUlMcsCtTiXLXFmrigrm8iHpsYfjsgRJGKSYVvKCvQrwV9knwcM4g== X-Received: by 2002:a17:902:f550:b0:240:50c9:7f26 with SMTP id d9443c01a7336-2446d710a82mr44395535ad.13.1755281086385; Fri, 15 Aug 2025 11:04:46 -0700 (PDT) Received: from smtpclient.apple ([176.100.43.107]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2446d50f6dfsm18816325ad.78.2025.08.15.11.04.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Aug 2025 11:04:45 -0700 (PDT) Content-Type: multipart/signed; boundary="Apple-Mail=_DD42A076-B481-4513-9ACD-E1A760430BC6"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: git: 9630e68f94a4 - main - ossl: Add chacha-armv8-sve.S on aarch64 From: "Enji Cooper (yaneurabeya)" In-Reply-To: <202508151706.57FH6DnV097322@gitrepo.freebsd.org> Date: Fri, 15 Aug 2025 11:04:34 -0700 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Message-Id: References: <202508151706.57FH6DnV097322@gitrepo.freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.3826.700.81) X-Rspamd-Queue-Id: 4c3VPX6gnBz4NgF 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:2607:f8b0::/32, country:US] --Apple-Mail=_DD42A076-B481-4513-9ACD-E1A760430BC6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Aug 15, 2025, at 10:06=E2=80=AFAM, John Baldwin = wrote: >=20 > The branch main has been updated by jhb: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D9630e68f94a45b64087b18cc21be07ba= 3d3c3e8e >=20 > commit 9630e68f94a45b64087b18cc21be07ba3d3c3e8e > Author: John Baldwin > AuthorDate: 2025-08-15 17:04:05 +0000 > Commit: John Baldwin > CommitDate: 2025-08-15 17:06:03 +0000 >=20 > ossl: Add chacha-armv8-sve.S on aarch64 >=20 > Fixes: 4757b351ea9d ("openssl: Import version 3.5.1") Thank you =E2=80=94 this was on my TODO list. I suspect other architectures still need fixing, but it=E2=80=99s = nice having arm64 compiling again. Cheers, -Enji --Apple-Mail=_DD42A076-B481-4513-9ACD-E1A760430BC6 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEkHfexGRJ3gYRdA2gGpE5DjPsNJgFAmifdrIACgkQGpE5DjPs NJjBkg//WpCEYOA+yj7kCiSarulSM+L62m85q7EIWtqqU03bU6td9/cd/gTGOZpF RmhdO/SG+P43prPMbxWXFVn0huXtovlMGVNcg+8od6ndDrtvxwjAakZsCibXp4gn KYfyLGdPZEEuXiwRuVWPQVXwrLMFCYOv2ymrX1tNPLxgLgAo66Zp9xmZdSrGANKX xY4whpfamxRyFT/eTSEHdP1Apz0YdJo0h3EvUKy8i4oDJH2P2kZMjqrwJlG0vIy7 1Aas3UxD0PZVljtJFIW/VnoVJmQboTwuWj1UU+MjObG1F8riRqlz6vTDAs35qtX8 ylDw+NhfLh5cTDdJlIXWUS8dUqrrrLcFc8+LMyEhTfPqmpkLwXoS3Ns/WegfAkWO hruY0919eTvcuI27oBR7mO165edOPYNL1hHiS7Td2wJb7vnfgGOMC2DlEo2a+1ow y34g1yk0XMeop07pkYThBVagGpkuszONXHlpaMwvGlreZqlyqqnSmK9pzEtTuq4g 1KYZ/mE57F3sabX/gPGLm/xbFsFbLrX2fHaAavs9H9fDemLBRR3MutPD57NE+RNr IVwyN7sHSy9wOuOHbNt5FKZ3jrmcPkPf/019cXhGYUrLKUbr0x3o5bEf3wFuwIsV wNWUSfzXtUG/jC5HiF5X8f08xv5cwiuzx0p+EYdjIF85afkdbRs= =voCo -----END PGP SIGNATURE----- --Apple-Mail=_DD42A076-B481-4513-9ACD-E1A760430BC6-- From nobody Fri Aug 15 19:06:15 2025 X-Original-To: dev-commits-src-main@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 4c3Wmc0Jd6z649ky; Fri, 15 Aug 2025 19:06: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3Wmb6sn1z3Hvg; Fri, 15 Aug 2025 19:06:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755284783; 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=BrYLWQAldDrxz/OKiuIB77hoNRP8c/wZi+utzOlfIzk=; b=ehQYZSj+QpNr5FxdNtRTOA3sl0qrRnyesz5FVEGOj+5I9tKhcKlC9jmF2TaUzsYdpUZePU M2jWXgpWass3vPDN8uio5yct08wdA0wMmZcHNT/JIBtmES0BiwURundsUki+JeFvhHcA8r E9ujYmYgsn+4Jx94NliwE9l9qrCnBhS3ZXqKfdsXPKFcvJbd5DgdlmjJPJcij6p/jYv4V6 a9/aJm0eNUCmpyr2W5ya1Ns5gFdWSFdG0/m+6LY/j2axBCeQBYVpHI8QXCIERcHvWxCg3E MEI7twt14Elt5WbINmV/+pJAMRx/LvrIiWBUh89kj03Ajqa+lOVDuwTirqZZbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755284783; 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=BrYLWQAldDrxz/OKiuIB77hoNRP8c/wZi+utzOlfIzk=; b=eso808c8UAl6WjW1/BZhOwLR2Jn1AqBhAPFSXlC8k6yKsFBXdEZOobZUINUtHb1uYKdwHR 3hxUnc4O63muVw5iaPGLVZn9UwJhMjCtNzRmLVhn+tPYEhbBpkcedA+QuZ/rpuoQ7+A2Vb i84Je2m739tMcYdJEu0D5L3EuVABt/y4YM6ofjOZWbIk0DKUYMWCJkwfoeSWi8XIPwgUBK A/Qwse0F4mBz2p+/IQvntAtJAwdaO7LQ08POGSl5Sf1qp3pV2Fdt+7lEXJ1gIqTVerGNPz Yb2xlUWF//QK/uevS4Lsl/Ere24CvVO9OXgHlB4gb9LF41/1KyJ5mQMzFz1W1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755284783; a=rsa-sha256; cv=none; b=jI/499Y80dQuPmFpamQS2z0e2gEIDMiekATJs7H/JztcJ7vpZoxqvZKYbKBHPhITocO+Si u4nN9mLk1k2qCHlXYv6dtn0G+Gg238gC6IZIjBMlUaIQ/+U/135XTfuN6xUTWNj4gCOj6E +zSv7juLbZ661foClbVFY66ParGI3PdPtDR0wEWyd2VqLTjA+bS8VELPDlKN4WyeL8CJyd nR7OzTwjlTGtTCR+dXHAwvd9FX7UT1aHm9uMDQAn4A3sB+PmLy23KdGUahSJxsJ40F9/S/ iXan4jpnrZNYH7gwWglOsTOdzuRaiS+YeGtvjmqpmJmMs/zBmYCWnnA09PZmCQ== 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 4c3Wmb6LTHzrPl; Fri, 15 Aug 2025 19:06: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 57FJ6NeO023713; Fri, 15 Aug 2025 19:06:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FJ6Fxg023685; Fri, 15 Aug 2025 19:06:15 GMT (envelope-from git) Date: Fri, 15 Aug 2025 19:06:15 GMT Message-Id: <202508151906.57FJ6Fxg023685@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 06410c1b5163 - main - mandoc: Vendor import of upstream at 2025-07-27 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06410c1b51637e5e1f392d553b5008948af58014 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=06410c1b51637e5e1f392d553b5008948af58014 commit 06410c1b51637e5e1f392d553b5008948af58014 Merge: 9630e68f94a4 b6f25b918f97 Author: Alexander Ziaee AuthorDate: 2025-08-15 19:03:22 +0000 Commit: Alexander Ziaee CommitDate: 2025-08-15 19:03:22 +0000 mandoc: Vendor import of upstream at 2025-07-27 Groff Compat Edition -- Interesting changes: + italics in section/subsection headers are now also bold, like groff + display "LOCAL" in response to invalid section numbers, like groff + tbl(7) rendering has been tweaked to be more like groff + scaling has been improved to better render poorly generated manuals + display "UNTITLED" in response to invalid man(7) titles, like groff + improve mandocd error handling of broken pipes + manual footers now always show NAME(SECTION) on the right, like groff MFC after: 3 days contrib/mandoc/Makefile | 2 +- contrib/mandoc/TODO | 11 +- contrib/mandoc/catman.8 | 238 ++++++++++++++++++++++++++++++---- contrib/mandoc/catman.c | 231 +++++++++++++++++++++++++++++---- contrib/mandoc/gmdiff | 4 +- contrib/mandoc/man.7 | 151 +++++++++++++--------- contrib/mandoc/man.options.1 | 9 +- contrib/mandoc/man_html.c | 19 ++- contrib/mandoc/man_term.c | 133 +++++++++---------- contrib/mandoc/man_validate.c | 18 ++- contrib/mandoc/mandoc.1 | 31 ++--- contrib/mandoc/mandoc.css | 4 +- contrib/mandoc/mandocd.8 | 26 +++- contrib/mandoc/mandocd.c | 34 ++++- contrib/mandoc/manpath.c | 11 +- contrib/mandoc/mdoc_html.c | 15 ++- contrib/mandoc/mdoc_man.c | 5 +- contrib/mandoc/mdoc_markdown.c | 10 +- contrib/mandoc/mdoc_term.c | 122 ++++++++++-------- contrib/mandoc/mdoc_validate.c | 10 +- contrib/mandoc/out.c | 63 ++++++--- contrib/mandoc/out.h | 24 ++-- contrib/mandoc/roff.7 | 195 +++++++++++++++++++++------- contrib/mandoc/roff_term.c | 31 +++-- contrib/mandoc/tbl.h | 16 +-- contrib/mandoc/tbl_html.c | 34 +---- contrib/mandoc/tbl_layout.c | 10 +- contrib/mandoc/tbl_term.c | 287 +++++++++++++++++++++++------------------ contrib/mandoc/term.c | 201 ++++++++++++++++------------- contrib/mandoc/term.h | 38 +++--- contrib/mandoc/term_ascii.c | 91 +++++++------ contrib/mandoc/term_ps.c | 18 +-- contrib/mandoc/term_tab.c | 27 +--- 33 files changed, 1365 insertions(+), 754 deletions(-) diff --cc contrib/mandoc/Makefile index 7ec34a560504,000000000000..0830c9f289a3 mode 100644,000000..100644 --- a/contrib/mandoc/Makefile +++ b/contrib/mandoc/Makefile @@@ -1,618 -1,0 +1,618 @@@ +# $Id: Makefile,v 1.543 2023/10/19 11:45:42 schwarze Exp $ +# +# Copyright (c) 2011, 2013-2022 Ingo Schwarze +# Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + - VERSION = 1.14.6s20250613 ++VERSION = 1.14.6s20250727 + +# === LIST OF FILES ==================================================== + +TESTSRCS = test-attribute.c \ + test-be32toh.c \ + test-cmsg.c \ + test-dirent-namlen.c \ + test-EFTYPE.c \ + test-err.c \ + test-fts.c \ + test-getline.c \ + test-getsubopt.c \ + test-isblank.c \ + test-mkdtemp.c \ + test-mkstemps.c \ + test-nanosleep.c \ + test-noop.c \ + test-ntohl.c \ + test-O_DIRECTORY.c \ + test-ohash.c \ + test-PATH_MAX.c \ + test-pledge.c \ + test-progname.c \ + test-reallocarray.c \ + test-recallocarray.c \ + test-recvmsg.c \ + test-rewb-bsd.c \ + test-rewb-sysv.c \ + test-sandbox_init.c \ + test-strcasestr.c \ + test-stringlist.c \ + test-strlcat.c \ + test-strlcpy.c \ + test-strndup.c \ + test-strptime.c \ + test-strsep.c \ + test-strtonum.c \ + test-vasprintf.c \ + test-wchar.c + +SRCS = arch.c \ + att.c \ + catman.c \ + cgi.c \ + chars.c \ + compat_err.c \ + compat_fts.c \ + compat_getline.c \ + compat_getsubopt.c \ + compat_isblank.c \ + compat_mkdtemp.c \ + compat_mkstemps.c \ + compat_ohash.c \ + compat_progname.c \ + compat_reallocarray.c \ + compat_recallocarray.c \ + compat_strcasestr.c \ + compat_stringlist.c \ + compat_strlcat.c \ + compat_strlcpy.c \ + compat_strndup.c \ + compat_strsep.c \ + compat_strtonum.c \ + compat_vasprintf.c \ + dba.c \ + dba_array.c \ + dba_read.c \ + dba_write.c \ + dbm.c \ + dbm_map.c \ + demandoc.c \ + eqn.c \ + eqn_html.c \ + eqn_term.c \ + html.c \ + lib.c \ + main.c \ + man.c \ + man_html.c \ + man_macro.c \ + man_term.c \ + man_validate.c \ + mandoc.c \ + mandoc_aux.c \ + mandoc_dbg.c \ + mandoc_msg.c \ + mandoc_ohash.c \ + mandoc_xr.c \ + mandocd.c \ + mandocdb.c \ + manpath.c \ + mansearch.c \ + mdoc.c \ + mdoc_argv.c \ + mdoc_html.c \ + mdoc_macro.c \ + mdoc_man.c \ + mdoc_markdown.c \ + mdoc_state.c \ + mdoc_term.c \ + mdoc_validate.c \ + msec.c \ + out.c \ + preconv.c \ + read.c \ + roff.c \ + roff_escape.c \ + roff_html.c \ + roff_term.c \ + roff_validate.c \ + soelim.c \ + st.c \ + tag.c \ + tbl.c \ + tbl_data.c \ + tbl_html.c \ + tbl_layout.c \ + tbl_opts.c \ + tbl_term.c \ + term.c \ + term_ascii.c \ + term_ps.c \ + term_tab.c \ + term_tag.c \ + tree.c + +DISTFILES = INSTALL \ + LICENSE \ + Makefile \ + Makefile.depend \ + NEWS \ + TODO \ + apropos.1 \ + catman.8 \ + cgi.h.example \ + compat_fts.h \ + compat_ohash.h \ + compat_stringlist.h \ + configure \ + configure.local.example \ + dba.h \ + dba_array.h \ + dba_write.h \ + dbm.h \ + dbm_map.h \ + demandoc.1 \ + eqn.7 \ + eqn.h \ + eqn_parse.h \ + gmdiff \ + html.h \ + lib.in \ + libman.h \ + libmandoc.h \ + libmdoc.h \ + main.h \ + makewhatis.8 \ + man.1 \ + man.7 \ + man.cgi.3 \ + man.cgi.8 \ + man.conf.5 \ + man.h \ + man.options.1 \ + manconf.h \ + mandoc.1 \ + mandoc.3 \ + mandoc.css \ + mandoc.db.5 \ + mandoc.h \ + mandoc_aux.h \ + mandoc_char.7 \ + mandoc_dbg.h \ + mandoc_dbg_init.3 \ + mandoc_escape.3 \ + mandoc_headers.3 \ + mandoc_html.3 \ + mandoc_malloc.3 \ + mandoc_ohash.h \ + mandoc_parse.h \ + mandoc_xr.h \ + mandocd.8 \ + mansearch.3 \ + mansearch.h \ + mchars_alloc.3 \ + mdoc.7 \ + mdoc.h \ + msec.in \ + out.h \ + predefs.in \ + roff.7 \ + roff.h \ + roff_int.h \ + soelim.1 \ + tag.h \ + tbl.3 \ + tbl.7 \ + tbl.h \ + tbl_int.h \ + tbl_parse.h \ + term.h \ + term_tag.h \ + $(SRCS) \ + $(TESTSRCS) + +LIBMAN_OBJS = man.o \ + man_macro.o \ + man_validate.o + +LIBMDOC_OBJS = att.o \ + lib.o \ + mdoc.o \ + mdoc_argv.o \ + mdoc_macro.o \ + mdoc_state.o \ + mdoc_validate.o \ + st.o + +LIBROFF_OBJS = eqn.o \ + roff.o \ + roff_escape.o \ + roff_validate.o \ + tbl.o \ + tbl_data.o \ + tbl_layout.o \ + tbl_opts.o + +LIBMANDOC_OBJS = $(LIBMAN_OBJS) \ + $(LIBMDOC_OBJS) \ + $(LIBROFF_OBJS) \ + $(DEBUG_OBJS) \ + arch.o \ + chars.o \ + mandoc.o \ + mandoc_aux.o \ + mandoc_msg.o \ + mandoc_ohash.o \ + mandoc_xr.o \ + msec.o \ + preconv.o \ + read.o \ + tag.o + +ALL_COBJS = compat_err.o \ + compat_fts.o \ + compat_getline.o \ + compat_getsubopt.o \ + compat_isblank.o \ + compat_mkdtemp.o \ + compat_mkstemps.o \ + compat_ohash.o \ + compat_progname.o \ + compat_reallocarray.o \ + compat_recallocarray.o \ + compat_strcasestr.o \ + compat_stringlist.o \ + compat_strlcat.o \ + compat_strlcpy.o \ + compat_strndup.o \ + compat_strsep.o \ + compat_strtonum.o \ + compat_vasprintf.o + +MANDOC_HTML_OBJS = eqn_html.o \ + html.o \ + man_html.o \ + mdoc_html.o \ + roff_html.o \ + tbl_html.o + +MANDOC_TERM_OBJS = eqn_term.o \ + man_term.o \ + mdoc_term.o \ + roff_term.o \ + term.o \ + term_ascii.o \ + term_ps.o \ + term_tab.o \ + term_tag.o \ + tbl_term.o + +DBM_OBJS = dbm.o \ + dbm_map.o \ + mansearch.o + +DBA_OBJS = dba.o \ + dba_array.o \ + dba_read.o \ + dba_write.o \ + mandocdb.o + +MAIN_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_MAN_OBJS) \ + $(MANDOC_TERM_OBJS) \ + $(DBM_OBJS) \ + $(DBA_OBJS) \ + main.o \ + manpath.o \ + mdoc_man.o \ + mdoc_markdown.o \ + out.o \ + tree.o + +CGI_OBJS = $(MANDOC_HTML_OBJS) \ + $(DBM_OBJS) \ + cgi.o \ + out.o + +MANDOCD_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_TERM_OBJS) \ + mandocd.o \ + out.o + +DEMANDOC_OBJS = demandoc.o + +WWW_MANS = apropos.1.html \ + demandoc.1.html \ + man.1.html \ + man.options.1.html \ + mandoc.1.html \ + soelim.1.html \ + man.cgi.3.html \ + mandoc.3.html \ + mandoc_dbg_init.3.html \ + mandoc_escape.3.html \ + mandoc_headers.3.html \ + mandoc_html.3.html \ + mandoc_malloc.3.html \ + mansearch.3.html \ + mchars_alloc.3.html \ + tbl.3.html \ + man.conf.5.html \ + mandoc.db.5.html \ + eqn.7.html \ + man.7.html \ + mandoc_char.7.html \ + mdoc.7.html \ + roff.7.html \ + tbl.7.html \ + catman.8.html \ + makewhatis.8.html \ + man.cgi.8.html \ + mandocd.8.html + +WWW_INCS = eqn.h.html \ + html.h.html \ + man.h.html \ + manconf.h.html \ + mandoc.h.html \ + mandoc_aux.h.html \ + mandoc_parse.h.html \ + mansearch.h.html \ + mdoc.h.html \ + roff.h.html \ + tbl.h.html \ + tbl_int.h.html \ + tbl_parse.h.html + +# === USER CONFIGURATION =============================================== + +include Makefile.local + +# === DEPENDENCY HANDLING ============================================== + +all: mandoc man demandoc soelim $(BUILD_TARGETS) Makefile.local + +install: base-install $(INSTALL_TARGETS) + +www: $(WWW_MANS) $(WWW_INCS) + +$(WWW_MANS) $(WWW_INCS): mandoc + +.PHONY: base-install cgi-install install www-install +.PHONY: clean distclean depend + +include Makefile.depend + +# === TARGETS CONTAINING SHELL COMMANDS ================================ + +distclean: clean + rm -f Makefile.local config.h config.h.old config.log config.log.old + +clean: + rm -f libmandoc.a $(LIBMANDOC_OBJS) $(ALL_COBJS) + rm -f mandoc man $(MAIN_OBJS) + rm -f man.cgi $(CGI_OBJS) + rm -f mandocd catman catman.o $(MANDOCD_OBJS) + rm -f demandoc $(DEMANDOC_OBJS) + rm -f soelim soelim.o + rm -f $(WWW_MANS) $(WWW_INCS) mandoc*.tar.gz mandoc*.sha256 + rm -f Makefile.tmp1 Makefile.tmp2 + rm -rf *.dSYM + +base-install: mandoc demandoc soelim + mkdir -p $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man1 + mkdir -p $(DESTDIR)$(MANDIR)/man5 + mkdir -p $(DESTDIR)$(MANDIR)/man7 + mkdir -p $(DESTDIR)$(MANDIR)/man8 + mkdir -p $(DESTDIR)$(MISCDIR) + $(INSTALL_PROGRAM) mandoc demandoc $(DESTDIR)$(BINDIR) + $(INSTALL_PROGRAM) soelim $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_MAN) + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_APROPOS) + cd $(DESTDIR)$(BINDIR) && $(LN) mandoc $(BINM_WHATIS) + cd $(DESTDIR)$(SBINDIR) && \ + $(LN) ${BIN_FROM_SBIN}/mandoc $(BINM_MAKEWHATIS) + $(INSTALL_MAN) mandoc.1 demandoc.1 $(DESTDIR)$(MANDIR)/man1 + $(INSTALL_MAN) soelim.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 + $(INSTALL_MAN) man.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + $(INSTALL_MAN) apropos.1 $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + cd $(DESTDIR)$(MANDIR)/man1 && $(LN) $(BINM_APROPOS).1 $(BINM_WHATIS).1 + $(INSTALL_MAN) man.conf.5 $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 + $(INSTALL_MAN) mandoc.db.5 $(DESTDIR)$(MANDIR)/man5 + $(INSTALL_MAN) man.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 + $(INSTALL_MAN) mdoc.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 + $(INSTALL_MAN) roff.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 + $(INSTALL_MAN) eqn.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 + $(INSTALL_MAN) tbl.7 $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 + $(INSTALL_MAN) mandoc_char.7 $(DESTDIR)$(MANDIR)/man7 + $(INSTALL_MAN) makewhatis.8 \ + $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 + $(INSTALL_DATA) mandoc.css $(DESTDIR)$(MISCDIR) + +lib-install: libmandoc.a + mkdir -p $(DESTDIR)$(LIBDIR) + mkdir -p $(DESTDIR)$(INCLUDEDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man3 + $(INSTALL_LIB) libmandoc.a $(DESTDIR)$(LIBDIR) + $(INSTALL_LIB) eqn.h man.h mandoc.h mandoc_aux.h mandoc_parse.h \ + mdoc.h roff.h tbl.h $(DESTDIR)$(INCLUDEDIR) + $(INSTALL_MAN) mandoc.3 mandoc_escape.3 mandoc_malloc.3 \ + mansearch.3 mchars_alloc.3 tbl.3 $(DESTDIR)$(MANDIR)/man3 + +cgi-install: man.cgi + mkdir -p $(DESTDIR)$(CGIBINDIR) + mkdir -p $(DESTDIR)$(HTDOCDIR) + $(INSTALL_PROGRAM) man.cgi $(DESTDIR)$(CGIBINDIR) + $(INSTALL_DATA) mandoc.css $(DESTDIR)$(HTDOCDIR) + +catman-install: mandocd catman + mkdir -p $(DESTDIR)$(SBINDIR) + mkdir -p $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_PROGRAM) mandocd $(DESTDIR)$(SBINDIR) + $(INSTALL_PROGRAM) catman $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) + $(INSTALL_MAN) mandocd.8 $(DESTDIR)$(MANDIR)/man8 + $(INSTALL_MAN) catman.8 $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 + +uninstall: + rm -f $(DESTDIR)$(BINDIR)/mandoc + rm -f $(DESTDIR)$(BINDIR)/demandoc + rm -f $(DESTDIR)$(BINDIR)/$(BINM_SOELIM) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_MAN) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_APROPOS) + rm -f $(DESTDIR)$(BINDIR)/$(BINM_WHATIS) + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_MAKEWHATIS) + rm -f $(DESTDIR)$(MANDIR)/man1/mandoc.1 + rm -f $(DESTDIR)$(MANDIR)/man1/demandoc.1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_SOELIM).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_MAN).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_APROPOS).1 + rm -f $(DESTDIR)$(MANDIR)/man1/$(BINM_WHATIS).1 + rm -f $(DESTDIR)$(MANDIR)/man5/$(MANM_MANCONF).5 + rm -f $(DESTDIR)$(MANDIR)/man5/mandoc.db.5 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MAN).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_MDOC).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_ROFF).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_EQN).7 + rm -f $(DESTDIR)$(MANDIR)/man7/$(MANM_TBL).7 + rm -f $(DESTDIR)$(MANDIR)/man7/mandoc_char.7 + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_MAKEWHATIS).8 + rm -f $(DESTDIR)$(CGIBINDIR)/man.cgi + rm -f $(DESTDIR)$(HTDOCDIR)/mandoc.css + rm -f $(DESTDIR)$(SBINDIR)/mandocd + rm -f $(DESTDIR)$(SBINDIR)/$(BINM_CATMAN) + rm -f $(DESTDIR)$(MANDIR)/man8/mandocd.8 + rm -f $(DESTDIR)$(MANDIR)/man8/$(BINM_CATMAN).8 + rm -f $(DESTDIR)$(LIBDIR)/libmandoc.a + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_escape.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mandoc_malloc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mansearch.3 + rm -f $(DESTDIR)$(MANDIR)/man3/mchars_alloc.3 + rm -f $(DESTDIR)$(MANDIR)/man3/tbl.3 + rm -f $(DESTDIR)$(INCLUDEDIR)/eqn.h + rm -f $(DESTDIR)$(INCLUDEDIR)/man.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_aux.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mandoc_parse.h + rm -f $(DESTDIR)$(INCLUDEDIR)/mdoc.h + rm -f $(DESTDIR)$(INCLUDEDIR)/roff.h + rm -f $(DESTDIR)$(INCLUDEDIR)/tbl.h + [ ! -e $(DESTDIR)$(INCLUDEDIR) ] || rmdir $(DESTDIR)$(INCLUDEDIR) + +regress: all + cd regress && ./regress.pl + +regress-clean: + cd regress && ./regress.pl . clean + +Makefile.local config.h: configure $(TESTSRCS) + @echo "$@ is out of date; please run ./configure" + @exit 1 + +libmandoc.a: $(MANDOC_COBJS) $(LIBMANDOC_OBJS) + $(AR) rs $@ $(MANDOC_COBJS) $(LIBMANDOC_OBJS) + +mandoc: $(MAIN_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MAIN_OBJS) libmandoc.a $(LDADD) + +man: mandoc + $(LN) mandoc man + +man.cgi: $(CGI_OBJS) libmandoc.a + $(CC) $(STATIC) -o $@ $(LDFLAGS) $(CGI_OBJS) libmandoc.a $(LDADD) + +mandocd: $(MANDOCD_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(MANDOCD_OBJS) libmandoc.a $(LDADD) + +catman: catman.o libmandoc.a + $(CC) -o $@ $(LDFLAGS) catman.o libmandoc.a $(LDADD) + +demandoc: $(DEMANDOC_OBJS) libmandoc.a + $(CC) -o $@ $(LDFLAGS) $(DEMANDOC_OBJS) libmandoc.a $(LDADD) + +soelim: $(SOELIM_COBJS) soelim.o + $(CC) -o $@ $(LDFLAGS) $(SOELIM_COBJS) soelim.o + +# --- maintainer targets --- + +www-install: www + $(INSTALL_DATA) mandoc.css $(HTDOCDIR) + $(INSTALL_DATA) $(WWW_MANS) $(HTDOCDIR)/man + $(INSTALL_DATA) $(WWW_INCS) $(HTDOCDIR)/includes + +depend: config.h + ./configure -depend + mkdep -f Makefile.tmp1 $(CFLAGS) $(SRCS) + perl -e 'undef $$/; $$_ = <>; s|/usr/include/\S+||g; \ + s|\\\n||g; s| +| |g; s| $$||mg; print;' \ + Makefile.tmp1 > Makefile.tmp2 + rm Makefile.tmp1 + mv Makefile.tmp2 Makefile.depend + +regress-distclean: + @find regress \ + -name '.#*' -o \ + -name '*.orig' -o \ + -name '*.rej' -o \ + -name '*.core' \ + -exec rm -i {} \; + +regress-distcheck: + @find regress ! -type d ! -type f + @find regress -type f \ + ! -path '*/CVS/*' \ + ! -name Makefile \ + ! -name Makefile.inc \ + ! -name '*.in' \ + ! -name '*.out_ascii' \ + ! -name '*.out_utf8' \ + ! -name '*.out_html' \ + ! -name '*.out_markdown' \ + ! -name '*.out_lint' \ + ! -path regress/regress.pl \ + ! -path regress/regress.pl.1 + +dist: mandoc-$(VERSION).sha256 + +mandoc-$(VERSION).sha256: mandoc-$(VERSION).tar.gz + sha256 mandoc-$(VERSION).tar.gz > $@ + +mandoc-$(VERSION).tar.gz: $(DISTFILES) + ls regress/*/*/*.mandoc_* && exit 1 || true + mkdir -p .dist/mandoc-$(VERSION)/ + $(INSTALL) -m 0644 $(DISTFILES) .dist/mandoc-$(VERSION) + cp -pR regress .dist/mandoc-$(VERSION) + find .dist/mandoc-$(VERSION)/regress \ + -type d -name CVS -print0 | xargs -0 rm -rf + chmod 755 .dist/mandoc-$(VERSION)/configure + ( cd .dist/ && tar zcf ../$@ mandoc-$(VERSION) ) + rm -rf .dist/ + +dist-install: dist + $(INSTALL_DATA) mandoc-$(VERSION).tar.gz mandoc-$(VERSION).sha256 \ + $(HTDOCDIR)/snapshots + +# === SUFFIX RULES ===================================================== + +.SUFFIXES: .1 .3 .5 .7 .8 .h +.SUFFIXES: .1.html .3.html .5.html .7.html .8.html .h.html + +.h.h.html: + highlight -I $< > $@ + +.1.1.html .3.3.html .5.5.html .7.7.html .8.8.html: + ./mandoc -Thtml -Wwarning,stop \ + -O 'style=/mandoc.css,man=/man/%N.%S.html;https://man.openbsd.org/%N.%S,includes=/includes/%I.html' \ + $< > $@ From nobody Fri Aug 15 19:13:54 2025 X-Original-To: dev-commits-src-main@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 4c3WxG6yS1z64B6J; Fri, 15 Aug 2025 19:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3WxG4n0vz3JJr; Fri, 15 Aug 2025 19:13:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755285234; 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=xPNKA3cV/vhJrCjVs1VkINqWbWWL4cX8sIxonFIwdrg=; b=XtHN2OEPWi06OnLM0NuM5y+UwwlHFet9sMz1PPf4LvfaI2ZHPdn/768fhfzFiynhjJ9lbj nDo3dzjmbVT4emEQlQcsw0s/WmkCBajgcZyZx6+NjTAE/hjie8h2WyHK9hxCqNWXL7Jw7a skRAVl4wMbRoGAXrko4KBX5SOozlHTzcePc6uEvzFVpcWtM9DqTCZIm5ezaG6LruySWIHb WlcBX0NrhwUW909VUoUhDBnnOCIY2tFYg3nT2oIC2wiQU8uY4sAvxSbwCaLWdg8u9QT1le rAkx9SmOwvXH1Cfg+RuX1esst0+38xPSsEYKOn43bEG8yLYcYEmXrb4ce8vWAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755285234; 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=xPNKA3cV/vhJrCjVs1VkINqWbWWL4cX8sIxonFIwdrg=; b=rDE1UdCRNGmKxMGIZqYHTrYc5dOfQx2Z5QydAS00oF1vsFt/gdGbqoUnHQCzlQp/cnm9iU yQmZy/ppQgCCmdmsvUiJb+R70czIvc+4igT7RPOJQln8IOa7oh5+6YKwb63mU0inZYuVAL V+FOseVaFC3zihwn/xc05APE+JvTQxxvDSIlSpkvQ3krsY/DjbrXlchAR+LYW46tvPl15v uRU08Wyn368ZdtUEWNg3S7FAHvJj6W6zQJb37gQRqh5Cy7y8lrScN0EMDR5wAboh+znM0A lI1bkbg31foAaRuvmt6HW/AOyAgqt04c9jBusQremapnR3FbLTDiZsTiBHBg/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755285234; a=rsa-sha256; cv=none; b=p1rkzR9Bkke8tr88X3unPnwRYyp5f9W1t/bHlTdxJ0pSbENljLzFcA2Qe1KurhqUJrPKnf 1NWuZQcv59OmsvE0LMwESRcZbV1yzKpuxxvPMmexd6KNOPC8+gD62HIWiMidf2JKrN5boH JWhQ8+PTAJcCh5sITRhVzgV8Cq49/wht58rMcBBG42rHLycSPwWOESsnJRu8KI4cna9OVz cxXPmL+t95oW48GNfcgRb2qm4bt6cLgwF1YgFvSFWmUfhiWxPoWXwrzt5EbFK5Gj6lFZAw 5s+/aIrF/grQxtzXyTVdH3e46Oc17o0eYTFhcJTEGRbpfoVdbWNiIteG2roBVQ== 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 4c3WxG4HWCzrfR; Fri, 15 Aug 2025 19:13: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 57FJDs2o042196; Fri, 15 Aug 2025 19:13:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FJDstA042193; Fri, 15 Aug 2025 19:13:54 GMT (envelope-from git) Date: Fri, 15 Aug 2025 19:13:54 GMT Message-Id: <202508151913.57FJDstA042193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 9cd3860c10b6 - main - nfsd: Fix slow leaks of NAMEI buffers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9cd3860c10b6afaaaeb118dafc166ab168bc9083 Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=9cd3860c10b6afaaaeb118dafc166ab168bc9083 commit 9cd3860c10b6afaaaeb118dafc166ab168bc9083 Author: Rick Macklem AuthorDate: 2025-08-15 19:11:08 +0000 Commit: Rick Macklem CommitDate: 2025-08-15 19:11:08 +0000 nfsd: Fix slow leaks of NAMEI buffers Commit 5b5b7e2ca2fa changed namei()s behaviour such that it does not free the NAMEI buffer unless returning an error. The nfsd was not fixed for this. Fortunately, the only leak would be one NAMEI buffer each time mountd(8) reloads the exports. (There were also leaks in the pNFS server configuration, but almost no one uses it.) This patch fixes the leaks by adding NDFREE_PNBUF() macros in the appropriate places. MFC after: 2 weeks Discussed with: kib Fixes: 5b5b7e2ca2fa ("vfs: always retain path buffer after lookup") --- sys/fs/nfsserver/nfs_nfsdport.c | 1 + sys/fs/nfsserver/nfs_nfsdstate.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 496cac263fa0..b2966934f9b7 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -3751,6 +3751,7 @@ nfsrv_v4rootexport(void *argp, struct ucred *cred, struct thread *p) NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, nfsexargp->fspec); if ((error = namei(&nd)) != 0) goto out; + NDFREE_PNBUF(&nd); error = nfsvno_getfh(nd.ni_vp, &fh, p); vrele(nd.ni_vp); if (!error) { diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index 36e3ce7b7142..111b0f26d0b5 100644 --- a/sys/fs/nfsserver/nfs_nfsdstate.c +++ b/sys/fs/nfsserver/nfs_nfsdstate.c @@ -7731,6 +7731,7 @@ nfsrv_setdsserver(char *dspathp, char *mdspathp, NFSPROC_T *p, NFSD_DEBUG(4, "lookup=%d\n", error); if (error != 0) return (error); + NDFREE_PNBUF(&nd); if (nd.ni_vp->v_type != VDIR) { vput(nd.ni_vp); NFSD_DEBUG(4, "dspath not dir\n"); @@ -7767,6 +7768,7 @@ nfsrv_setdsserver(char *dspathp, char *mdspathp, NFSPROC_T *p, NFSD_DEBUG(4, "dsdirpath=%s lookup=%d\n", dsdirpath, error); if (error != 0) break; + NDFREE_PNBUF(&nd); if (nd.ni_vp->v_type != VDIR) { vput(nd.ni_vp); error = ENOTDIR; @@ -7795,6 +7797,7 @@ nfsrv_setdsserver(char *dspathp, char *mdspathp, NFSPROC_T *p, NFSD_DEBUG(4, "mds lookup=%d\n", error); if (error != 0) goto out; + NDFREE_PNBUF(&nd); if (nd.ni_vp->v_type != VDIR) { vput(nd.ni_vp); error = ENOTDIR; @@ -8654,6 +8657,7 @@ nfsrv_mdscopymr(char *mdspathp, char *dspathp, char *curdspathp, char *buf, NFSD_DEBUG(4, "lookup=%d\n", error); if (error != 0) return (error); + NDFREE_PNBUF(&nd); if (nd.ni_vp->v_type != VREG) { vput(nd.ni_vp); NFSD_DEBUG(4, "mdspath not reg\n"); @@ -8675,6 +8679,7 @@ nfsrv_mdscopymr(char *mdspathp, char *dspathp, char *curdspathp, char *buf, vput(vp); return (error); } + NDFREE_PNBUF(&nd); if (nd.ni_vp->v_type != VDIR) { vput(nd.ni_vp); vput(vp); @@ -8717,6 +8722,7 @@ nfsrv_mdscopymr(char *mdspathp, char *dspathp, char *curdspathp, char *buf, vput(curvp); return (error); } + NDFREE_PNBUF(&nd); if (nd.ni_vp->v_type != VDIR || nd.ni_vp == curvp) { vput(nd.ni_vp); vput(vp); From nobody Fri Aug 15 20:36:20 2025 X-Original-To: dev-commits-src-main@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 4c3YmN2rZTz64Gwj; Fri, 15 Aug 2025 20:36: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3YmN1v0tz3TQ5; Fri, 15 Aug 2025 20:36:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755290180; 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=hkZvqCDhJwK4IdmuYxU7CtcBEmVOHswNLMezFl8AHZQ=; b=FFUssK1qf5d3gKOILUYMcEkaeaY5mLSvwiLyDKNrYKpyxn8ZcqNu4B5VBP54hPyPGG77Kb Jbc0gcz1yklQ3Y6mu8Ua2OuNqZho/WMF8wSmArmBJhA9Nk+6OS/FKGpWG1ekWS3pBIgr42 LHZtpo461pBq+cJgizjthMLoUCltB1B7roJG0Uu4dJ++Y862BxS6DTp7AsI6lqm2vTDDX0 MwFcv82XJpkbhjXvwz44m1mR3w9CTCMnlNAfKSsiIpeRzViTLO4Ea6OYA6FzvrsU3bGfX/ Drb/vutiYhpQX7OLNGt5cX2y46qwUcFQAbA+Ujmu76/MOSMUdSWrmMsCsLZZ1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755290180; 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=hkZvqCDhJwK4IdmuYxU7CtcBEmVOHswNLMezFl8AHZQ=; b=hcjYO9uNlhnYzTSyxkdGchtWuAw+IB5orl5HRIW1zP1Yy1K5luU0R8FR4DClqPkL68n5lW zrJlaIqDVakjgbsSOYqvAmeukzL+jXbT2BAbvPd6Y8qumIr4ES8U8ZiNXazQrQtuOighIs 8IBwGAEdsih6wyO/uLwnmZ6uXoZVnoKEzWIFeqzIVCIRQPv6N6JMkcAIctt3c2M4JJFVgA 8H5USP4tGbZFIjS0VJQgjGPBSkmndXUrvyu7t9NqMRuUCZvDrnjZlSUufjuJSUGQ8dox3H CVWGeMV7k3oiGyBpjTSNDLqaQmFt5q25DXy5u8j2E1mlGgPJAiYKuXeW8ZwcRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755290180; a=rsa-sha256; cv=none; b=QWrmmbv8dfi7DHuaqvkhQADWuR1kiHL5t9ZzxdO808A07pBA+bQLU2h26BDYCHLtUvXLTX w4rZUl3M8k9iGZ0avcrRazgkBCSRmNGIIandrYE64QnAc7SHf5yEQSC7UMjd3E+V4n+OUd F7aMxIoMyftBZlag7dfEIdKOA4RXnFcWMxXPC6A7FDEt5EYmIszHuqqyMu+esWPMRh7b2T UT/SBaK24bU5vJJ6C2zMVZw/Bc53PV1NzNLSBFfK5hhGqZXU+8/NQtXvv6LsoonLJilLbY 4YAOHLTYaV61qi9WFqeTBj285K2VmHMc/Ivb9lclgpAbjvgS6qsds+vzgGTKvw== 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 4c3YmN1HjLzt55; Fri, 15 Aug 2025 20:36: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 57FKaKa0092225; Fri, 15 Aug 2025 20:36:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FKaKA0092222; Fri, 15 Aug 2025 20:36:20 GMT (envelope-from git) Date: Fri, 15 Aug 2025 20:36:20 GMT Message-Id: <202508152036.57FKaKA0092222@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric van Gyzen Subject: git: 9a7c512a6149 - main - ucred groups: restore a useful comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: vangyzen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9a7c512a614993333beec4e2d509290b0c00dde6 Auto-Submitted: auto-generated The branch main has been updated by vangyzen: URL: https://cgit.FreeBSD.org/src/commit/?id=9a7c512a614993333beec4e2d509290b0c00dde6 commit 9a7c512a614993333beec4e2d509290b0c00dde6 Author: Eric van Gyzen AuthorDate: 2025-08-15 13:16:58 +0000 Commit: Eric van Gyzen CommitDate: 2025-08-15 13:29:18 +0000 ucred groups: restore a useful comment The most useful comments are those that explain _why_. Restore such an explanation dropped by commit 6d2efbb34fd. Reviewed by: kevans Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D51918 --- sys/kern/kern_prot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index dac0e40b0599..0ca42d640767 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -2921,7 +2921,8 @@ crextend(struct ucred *cr, int n) * Normalizes a set of groups to be applied to a 'struct ucred'. * * Normalization ensures that the supplementary groups are sorted in ascending - * order and do not contain duplicates. + * order and do not contain duplicates. This allows group_is_supplementary + * to do a binary search. */ static void groups_normalize(int *ngrp, gid_t *groups) From nobody Fri Aug 15 21:27:32 2025 X-Original-To: dev-commits-src-main@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 4c3ZvT1608z64KPh; Fri, 15 Aug 2025 21:27:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3ZvT0nmLz3Xqf; Fri, 15 Aug 2025 21:27:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755293253; 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=V9vo35oLG6eNRG2FmXR6M7nxrleoQcdx4QC36Hb0vJE=; b=mj5+pdOVwipoU2XVw4gsPTaJNT3zD0aSmd8mno8NWQ57w3C2MVpFbR5vE5QZx9d4i8LErD zncGLjXyvSxwvgMtgkLrxaEF200VP5cpp3cymxvpJK4IEWaOZDkypGYAY2dkH3V08RG7J5 1DO/Z50BplkVYXwrQaZft7HDHOe998mR7rfLD+BpG8zv4P/K3lVg+nU0Um/385vWZud6Zt 6fnh8R8nAl/ohCnlkypHaWACwYKt5UaTYbVlcWFLVmcXwVvDENWqc6Z0PaYhUP1iPkZKc8 DkSTndF/iwrqfzAqSUhRbuqwkIheRoVQNgU5PjknvF+I8D75YkwifGhdozO1VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755293253; 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=V9vo35oLG6eNRG2FmXR6M7nxrleoQcdx4QC36Hb0vJE=; b=dXy3xy1aaY1w8HxZekRvJ67BFTDbF1unaTq/nt2jWhHV6RcOBXFLMYbx/WnQoBXSfkWr9o /pDUyCNZj19vGOxO5moLwCk9noDwt7GVaPakiC3j8C6ugQ7rERZXhN/UxEHmzXdiARBBTt 8yEOKc50FMOOcRb+kEmuNBGIzAVlag/1AxB14HNSaWWFdKBRMQpED8T2co35jmPDpuVzyl Y3UDAZZqyxOpmR0TX5vEh++6fJXEdEZ7CeHKknP0b9hrYF0rG0orWyIOvPR9vbon3FckW+ iI67P/APuNjm0mCAK+zr1r9hgDWdkRtVqxdtgyxRGp0qi81FzZ5LeMuNp19FkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755293253; a=rsa-sha256; cv=none; b=tvFtJEE3eEYN9AJPdXL7vYcO++RSB9tb+qdvppWOyxcZ6D+NfXb0Zg13J6FcO7OTMUSSlv AfrciL+qIiAqzAEx8/oSI4Np5K5ieHVQOZLl1fRLFhPJvXgPX7jjDFNvL9WpjDqlJClVww W67u/Z8GVMMWSiwPHD02E20T7Yzn066nu2yxBGnnbi8Zo6CzjDf50K+0TNYVmGDnuSXvYl NNC9stwupTG8HG5owVRijUB72FQw0UsgyBg7ATtNF/IPGqHyE6WYnVmyBzTlT3Onpv9Id2 kjUu5YXjLglGr5W1Akvk8VpWCXbf2noKw9UK7MDTtpj8Te9siqFJYi9S+wMs5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c3ZvT0MxYzv22; Fri, 15 Aug 2025 21:27:33 +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 57FLRWgg086341; Fri, 15 Aug 2025 21: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 57FLRWsZ086338; Fri, 15 Aug 2025 21:27:32 GMT (envelope-from git) Date: Fri, 15 Aug 2025 21:27:32 GMT Message-Id: <202508152127.57FLRWsZ086338@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: bf6039f09a30 - main - jemalloc: Unthin contrib/jemalloc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: bf6039f09a30484c0749a3e3047d6a47b116b466 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bf6039f09a30484c0749a3e3047d6a47b116b466 commit bf6039f09a30484c0749a3e3047d6a47b116b466 Author: Warner Losh AuthorDate: 2025-08-15 21:23:20 +0000 Commit: Warner Losh CommitDate: 2025-08-15 21:24:18 +0000 jemalloc: Unthin contrib/jemalloc Add back more of the release for jemalloc for easier imports that can be audited for stray changes simply. However, trim out tests and msvc project files since they are easy and account for over half the size of the distro. No functional change. Sponsored by: Netflix --- contrib/jemalloc/INSTALL.md | 421 ++ contrib/jemalloc/Makefile.in | 623 +++ contrib/jemalloc/README | 20 + contrib/jemalloc/TUNING.md | 129 + contrib/jemalloc/autogen.sh | 17 + contrib/jemalloc/bin/jemalloc-config.in | 83 + contrib/jemalloc/bin/jemalloc.sh.in | 9 + contrib/jemalloc/bin/jeprof.in | 5625 ++++++++++++++++++++ contrib/jemalloc/build-aux/config.guess | 1462 +++++ contrib/jemalloc/build-aux/config.sub | 1825 +++++++ contrib/jemalloc/build-aux/install-sh | 250 + contrib/jemalloc/config.stamp.in | 0 contrib/jemalloc/configure.ac | 2406 +++++++++ contrib/jemalloc/doc/html.xsl.in | 5 + contrib/jemalloc/doc/jemalloc.xml.in | 3513 ++++++++++++ contrib/jemalloc/doc/manpages.xsl.in | 4 + contrib/jemalloc/doc/stylesheet.xsl | 10 + .../include/jemalloc/internal/atomic_msvc.h | 158 + .../jemalloc/internal/jemalloc_internal_defs.h.in | 366 ++ .../jemalloc/internal/jemalloc_preamble.h.in | 213 + .../include/jemalloc/internal/private_namespace.sh | 5 + .../include/jemalloc/internal/private_symbols.sh | 51 + .../include/jemalloc/internal/public_namespace.sh | 6 + .../jemalloc/internal/public_unnamespace.sh | 6 + .../include/jemalloc/internal/smoothstep.sh | 101 + .../jemalloc/include/jemalloc/internal/tsd_win.h | 139 + contrib/jemalloc/include/jemalloc/jemalloc.sh | 27 + .../jemalloc/include/jemalloc/jemalloc_defs.h.in | 48 + .../jemalloc/include/jemalloc/jemalloc_macros.h.in | 129 + .../jemalloc/include/jemalloc/jemalloc_mangle.sh | 45 + .../jemalloc/include/jemalloc/jemalloc_protos.h.in | 66 + .../jemalloc/include/jemalloc/jemalloc_rename.sh | 22 + .../include/jemalloc/jemalloc_typedefs.h.in | 77 + contrib/jemalloc/include/msvc_compat/C99/stdbool.h | 20 + contrib/jemalloc/include/msvc_compat/C99/stdint.h | 247 + contrib/jemalloc/include/msvc_compat/strings.h | 58 + .../jemalloc/include/msvc_compat/windows_extra.h | 6 + contrib/jemalloc/jemalloc.pc.in | 12 + contrib/jemalloc/m4/ax_cxx_compile_stdcxx.m4 | 562 ++ contrib/jemalloc/run_tests.sh | 1 + contrib/jemalloc/scripts/gen_run_tests.py | 126 + contrib/jemalloc/scripts/gen_travis.py | 149 + contrib/jemalloc/src/jemalloc_cpp.cpp | 141 + contrib/jemalloc/src/zone.c | 469 ++ 44 files changed, 19652 insertions(+) diff --git a/contrib/jemalloc/INSTALL.md b/contrib/jemalloc/INSTALL.md new file mode 100644 index 000000000000..b8f729b0d790 --- /dev/null +++ b/contrib/jemalloc/INSTALL.md @@ -0,0 +1,421 @@ +Building and installing a packaged release of jemalloc can be as simple as +typing the following while in the root directory of the source tree: + + ./configure + make + make install + +If building from unpackaged developer sources, the simplest command sequence +that might work is: + + ./autogen.sh + make dist + make + make install + +Note that documentation is not built by the default target because doing so +would create a dependency on xsltproc in packaged releases, hence the +requirement to either run 'make dist' or avoid installing docs via the various +install_* targets documented below. + + +## Advanced configuration + +The 'configure' script supports numerous options that allow control of which +functionality is enabled, where jemalloc is installed, etc. Optionally, pass +any of the following arguments (not a definitive list) to 'configure': + +* `--help` + + Print a definitive list of options. + +* `--prefix=` + + Set the base directory in which to install. For example: + + ./configure --prefix=/usr/local + + will cause files to be installed into /usr/local/include, /usr/local/lib, + and /usr/local/man. + +* `--with-version=(..--g|VERSION)` + + The VERSION file is mandatory for successful configuration, and the + following steps are taken to assure its presence: + 1) If --with-version=..--g is specified, + generate VERSION using the specified value. + 2) If --with-version is not specified in either form and the source + directory is inside a git repository, try to generate VERSION via 'git + describe' invocations that pattern-match release tags. + 3) If VERSION is missing, generate it with a bogus version: + 0.0.0-0-g0000000000000000000000000000000000000000 + + Note that --with-version=VERSION bypasses (1) and (2), which simplifies + VERSION configuration when embedding a jemalloc release into another + project's git repository. + +* `--with-rpath=` + + Embed one or more library paths, so that libjemalloc can find the libraries + it is linked to. This works only on ELF-based systems. + +* `--with-mangling=` + + Mangle public symbols specified in which is a comma-separated list of + name:mangled pairs. + + For example, to use ld's --wrap option as an alternative method for + overriding libc's malloc implementation, specify something like: + + --with-mangling=malloc:__wrap_malloc,free:__wrap_free[...] + + Note that mangling happens prior to application of the prefix specified by + --with-jemalloc-prefix, and mangled symbols are then ignored when applying + the prefix. + +* `--with-jemalloc-prefix=` + + Prefix all public APIs with . For example, if is + "prefix_", API changes like the following occur: + + malloc() --> prefix_malloc() + malloc_conf --> prefix_malloc_conf + /etc/malloc.conf --> /etc/prefix_malloc.conf + MALLOC_CONF --> PREFIX_MALLOC_CONF + + This makes it possible to use jemalloc at the same time as the system + allocator, or even to use multiple copies of jemalloc simultaneously. + + By default, the prefix is "", except on OS X, where it is "je_". On OS X, + jemalloc overlays the default malloc zone, but makes no attempt to actually + replace the "malloc", "calloc", etc. symbols. + +* `--without-export` + + Don't export public APIs. This can be useful when building jemalloc as a + static library, or to avoid exporting public APIs when using the zone + allocator on OSX. + +* `--with-private-namespace=` + + Prefix all library-private APIs with je_. For shared libraries, + symbol visibility mechanisms prevent these symbols from being exported, but + for static libraries, naming collisions are a real possibility. By + default, is empty, which results in a symbol prefix of je_ . + +* `--with-install-suffix=` + + Append to the base name of all installed files, such that multiple + versions of jemalloc can coexist in the same installation directory. For + example, libjemalloc.so.0 becomes libjemalloc.so.0. + +* `--with-malloc-conf=` + + Embed `` as a run-time options string that is processed prior to + the malloc_conf global variable, the /etc/malloc.conf symlink, and the + MALLOC_CONF environment variable. For example, to change the default decay + time to 30 seconds: + + --with-malloc-conf=decay_ms:30000 + +* `--enable-debug` + + Enable assertions and validation code. This incurs a substantial + performance hit, but is very useful during application development. + +* `--disable-stats` + + Disable statistics gathering functionality. See the "opt.stats_print" + option documentation for usage details. + +* `--enable-prof` + + Enable heap profiling and leak detection functionality. See the "opt.prof" + option documentation for usage details. When enabled, there are several + approaches to backtracing, and the configure script chooses the first one + in the following list that appears to function correctly: + + + libunwind (requires --enable-prof-libunwind) + + libgcc (unless --disable-prof-libgcc) + + gcc intrinsics (unless --disable-prof-gcc) + +* `--enable-prof-libunwind` + + Use the libunwind library (http://www.nongnu.org/libunwind/) for stack + backtracing. + +* `--disable-prof-libgcc` + + Disable the use of libgcc's backtracing functionality. + +* `--disable-prof-gcc` + + Disable the use of gcc intrinsics for backtracing. + +* `--with-static-libunwind=` + + Statically link against the specified libunwind.a rather than dynamically + linking with -lunwind. + +* `--disable-fill` + + Disable support for junk/zero filling of memory. See the "opt.junk" and + "opt.zero" option documentation for usage details. + +* `--disable-zone-allocator` + + Disable zone allocator for Darwin. This means jemalloc won't be hooked as + the default allocator on OSX/iOS. + +* `--enable-utrace` + + Enable utrace(2)-based allocation tracing. This feature is not broadly + portable (FreeBSD has it, but Linux and OS X do not). + +* `--enable-xmalloc` + + Enable support for optional immediate termination due to out-of-memory + errors, as is commonly implemented by "xmalloc" wrapper function for malloc. + See the "opt.xmalloc" option documentation for usage details. + +* `--enable-lazy-lock` + + Enable code that wraps pthread_create() to detect when an application + switches from single-threaded to multi-threaded mode, so that it can avoid + mutex locking/unlocking operations while in single-threaded mode. In + practice, this feature usually has little impact on performance unless + thread-specific caching is disabled. + +* `--disable-cache-oblivious` + + Disable cache-oblivious large allocation alignment for large allocation + requests with no alignment constraints. If this feature is disabled, all + large allocations are page-aligned as an implementation artifact, which can + severely harm CPU cache utilization. However, the cache-oblivious layout + comes at the cost of one extra page per large allocation, which in the + most extreme case increases physical memory usage for the 16 KiB size class + to 20 KiB. + +* `--disable-syscall` + + Disable use of syscall(2) rather than {open,read,write,close}(2). This is + intended as a workaround for systems that place security limitations on + syscall(2). + +* `--disable-cxx` + + Disable C++ integration. This will cause new and delete operator + implementations to be omitted. + +* `--with-xslroot=` + + Specify where to find DocBook XSL stylesheets when building the + documentation. + +* `--with-lg-page=` + + Specify the base 2 log of the allocator page size, which must in turn be at + least as large as the system page size. By default the configure script + determines the host's page size and sets the allocator page size equal to + the system page size, so this option need not be specified unless the + system page size may change between configuration and execution, e.g. when + cross compiling. + +* `--with-lg-hugepage=` + + Specify the base 2 log of the system huge page size. This option is useful + when cross compiling, or when overriding the default for systems that do + not explicitly support huge pages. + +* `--with-lg-quantum=` + + Specify the base 2 log of the minimum allocation alignment. jemalloc needs + to know the minimum alignment that meets the following C standard + requirement (quoted from the April 12, 2011 draft of the C11 standard): + + > The pointer returned if the allocation succeeds is suitably aligned so + that it may be assigned to a pointer to any type of object with a + fundamental alignment requirement and then used to access such an object + or an array of such objects in the space allocated [...] + + This setting is architecture-specific, and although jemalloc includes known + safe values for the most commonly used modern architectures, there is a + wrinkle related to GNU libc (glibc) that may impact your choice of + . On most modern architectures, this mandates 16-byte + alignment (=4), but the glibc developers chose not to meet this + requirement for performance reasons. An old discussion can be found at + . Unlike glibc, + jemalloc does follow the C standard by default (caveat: jemalloc + technically cheats for size classes smaller than the quantum), but the fact + that Linux systems already work around this allocator noncompliance means + that it is generally safe in practice to let jemalloc's minimum alignment + follow glibc's lead. If you specify `--with-lg-quantum=3` during + configuration, jemalloc will provide additional size classes that are not + 16-byte-aligned (24, 40, and 56). + +* `--with-lg-vaddr=` + + Specify the number of significant virtual address bits. By default, the + configure script attempts to detect virtual address size on those platforms + where it knows how, and picks a default otherwise. This option may be + useful when cross-compiling. + +* `--disable-initial-exec-tls` + + Disable the initial-exec TLS model for jemalloc's internal thread-local + storage (on those platforms that support explicit settings). This can allow + jemalloc to be dynamically loaded after program startup (e.g. using dlopen). + Note that in this case, there will be two malloc implementations operating + in the same process, which will almost certainly result in confusing runtime + crashes if pointers leak from one implementation to the other. + +* `--disable-libdl` + + Disable the usage of libdl, namely dlsym(3) which is required by the lazy + lock option. This can allow building static binaries. + +The following environment variables (not a definitive list) impact configure's +behavior: + +* `CFLAGS="?"` +* `CXXFLAGS="?"` + + Pass these flags to the C/C++ compiler. Any flags set by the configure + script are prepended, which means explicitly set flags generally take + precedence. Take care when specifying flags such as -Werror, because + configure tests may be affected in undesirable ways. + +* `EXTRA_CFLAGS="?"` +* `EXTRA_CXXFLAGS="?"` + + Append these flags to CFLAGS/CXXFLAGS, without passing them to the + compiler(s) during configuration. This makes it possible to add flags such + as -Werror, while allowing the configure script to determine what other + flags are appropriate for the specified configuration. + +* `CPPFLAGS="?"` + + Pass these flags to the C preprocessor. Note that CFLAGS is not passed to + 'cpp' when 'configure' is looking for include files, so you must use + CPPFLAGS instead if you need to help 'configure' find header files. + +* `LD_LIBRARY_PATH="?"` + + 'ld' uses this colon-separated list to find libraries. + +* `LDFLAGS="?"` + + Pass these flags when linking. + +* `PATH="?"` + + 'configure' uses this to find programs. + +In some cases it may be necessary to work around configuration results that do +not match reality. For example, Linux 4.5 added support for the MADV_FREE flag +to madvise(2), which can cause problems if building on a host with MADV_FREE +support and deploying to a target without. To work around this, use a cache +file to override the relevant configuration variable defined in configure.ac, +e.g.: + + echo "je_cv_madv_free=no" > config.cache && ./configure -C + + +## Advanced compilation + +To build only parts of jemalloc, use the following targets: + + build_lib_shared + build_lib_static + build_lib + build_doc_html + build_doc_man + build_doc + +To install only parts of jemalloc, use the following targets: + + install_bin + install_include + install_lib_shared + install_lib_static + install_lib_pc + install_lib + install_doc_html + install_doc_man + install_doc + +To clean up build results to varying degrees, use the following make targets: + + clean + distclean + relclean + + +## Advanced installation + +Optionally, define make variables when invoking make, including (not +exclusively): + +* `INCLUDEDIR="?"` + + Use this as the installation prefix for header files. + +* `LIBDIR="?"` + + Use this as the installation prefix for libraries. + +* `MANDIR="?"` + + Use this as the installation prefix for man pages. + +* `DESTDIR="?"` + + Prepend DESTDIR to INCLUDEDIR, LIBDIR, DATADIR, and MANDIR. This is useful + when installing to a different path than was specified via --prefix. + +* `CC="?"` + + Use this to invoke the C compiler. + +* `CFLAGS="?"` + + Pass these flags to the compiler. + +* `CPPFLAGS="?"` + + Pass these flags to the C preprocessor. + +* `LDFLAGS="?"` + + Pass these flags when linking. + +* `PATH="?"` + + Use this to search for programs used during configuration and building. + + +## Development + +If you intend to make non-trivial changes to jemalloc, use the 'autogen.sh' +script rather than 'configure'. This re-generates 'configure', enables +configuration dependency rules, and enables re-generation of automatically +generated source files. + +The build system supports using an object directory separate from the source +tree. For example, you can create an 'obj' directory, and from within that +directory, issue configuration and build commands: + + autoconf + mkdir obj + cd obj + ../configure --enable-autogen + make + + +## Documentation + +The manual page is generated in both html and roff formats. Any web browser +can be used to view the html manual. The roff manual page can be formatted +prior to installation via the following command: + + nroff -man -t doc/jemalloc.3 diff --git a/contrib/jemalloc/Makefile.in b/contrib/jemalloc/Makefile.in new file mode 100644 index 000000000000..7128b007ec05 --- /dev/null +++ b/contrib/jemalloc/Makefile.in @@ -0,0 +1,623 @@ +# Clear out all vpaths, then set just one (default vpath) for the main build +# directory. +vpath +vpath % . + +# Clear the default suffixes, so that built-in rules are not used. +.SUFFIXES : + +SHELL := /bin/sh + +CC := @CC@ +CXX := @CXX@ + +# Configuration parameters. +DESTDIR = +BINDIR := $(DESTDIR)@BINDIR@ +INCLUDEDIR := $(DESTDIR)@INCLUDEDIR@ +LIBDIR := $(DESTDIR)@LIBDIR@ +DATADIR := $(DESTDIR)@DATADIR@ +MANDIR := $(DESTDIR)@MANDIR@ +srcroot := @srcroot@ +objroot := @objroot@ +abs_srcroot := @abs_srcroot@ +abs_objroot := @abs_objroot@ + +# Build parameters. +CPPFLAGS := @CPPFLAGS@ -I$(objroot)include -I$(srcroot)include +CONFIGURE_CFLAGS := @CONFIGURE_CFLAGS@ +SPECIFIED_CFLAGS := @SPECIFIED_CFLAGS@ +EXTRA_CFLAGS := @EXTRA_CFLAGS@ +CFLAGS := $(strip $(CONFIGURE_CFLAGS) $(SPECIFIED_CFLAGS) $(EXTRA_CFLAGS)) +CONFIGURE_CXXFLAGS := @CONFIGURE_CXXFLAGS@ +SPECIFIED_CXXFLAGS := @SPECIFIED_CXXFLAGS@ +EXTRA_CXXFLAGS := @EXTRA_CXXFLAGS@ +CXXFLAGS := $(strip $(CONFIGURE_CXXFLAGS) $(SPECIFIED_CXXFLAGS) $(EXTRA_CXXFLAGS)) +LDFLAGS := @LDFLAGS@ +EXTRA_LDFLAGS := @EXTRA_LDFLAGS@ +LIBS := @LIBS@ +RPATH_EXTRA := @RPATH_EXTRA@ +SO := @so@ +IMPORTLIB := @importlib@ +O := @o@ +A := @a@ +EXE := @exe@ +LIBPREFIX := @libprefix@ +REV := @rev@ +install_suffix := @install_suffix@ +ABI := @abi@ +XSLTPROC := @XSLTPROC@ +XSLROOT := @XSLROOT@ +AUTOCONF := @AUTOCONF@ +_RPATH = @RPATH@ +RPATH = $(if $(1),$(call _RPATH,$(1))) +cfghdrs_in := $(addprefix $(srcroot),@cfghdrs_in@) +cfghdrs_out := @cfghdrs_out@ +cfgoutputs_in := $(addprefix $(srcroot),@cfgoutputs_in@) +cfgoutputs_out := @cfgoutputs_out@ +enable_autogen := @enable_autogen@ +enable_doc := @enable_doc@ +enable_shared := @enable_shared@ +enable_static := @enable_static@ +enable_prof := @enable_prof@ +enable_zone_allocator := @enable_zone_allocator@ +enable_experimental_smallocx := @enable_experimental_smallocx@ +MALLOC_CONF := @JEMALLOC_CPREFIX@MALLOC_CONF +link_whole_archive := @link_whole_archive@ +DSO_LDFLAGS = @DSO_LDFLAGS@ +SOREV = @SOREV@ +PIC_CFLAGS = @PIC_CFLAGS@ +CTARGET = @CTARGET@ +LDTARGET = @LDTARGET@ +TEST_LD_MODE = @TEST_LD_MODE@ +MKLIB = @MKLIB@ +AR = @AR@ +ARFLAGS = @ARFLAGS@ +DUMP_SYMS = @DUMP_SYMS@ +AWK := @AWK@ +CC_MM = @CC_MM@ +LM := @LM@ +INSTALL = @INSTALL@ + +ifeq (macho, $(ABI)) +TEST_LIBRARY_PATH := DYLD_FALLBACK_LIBRARY_PATH="$(objroot)lib" +else +ifeq (pecoff, $(ABI)) +TEST_LIBRARY_PATH := PATH="$(PATH):$(objroot)lib" +else +TEST_LIBRARY_PATH := +endif +endif + +LIBJEMALLOC := $(LIBPREFIX)jemalloc$(install_suffix) + +# Lists of files. +BINS := $(objroot)bin/jemalloc-config $(objroot)bin/jemalloc.sh $(objroot)bin/jeprof +C_HDRS := $(objroot)include/jemalloc/jemalloc$(install_suffix).h +C_SRCS := $(srcroot)src/jemalloc.c \ + $(srcroot)src/arena.c \ + $(srcroot)src/background_thread.c \ + $(srcroot)src/base.c \ + $(srcroot)src/bin.c \ + $(srcroot)src/bitmap.c \ + $(srcroot)src/ckh.c \ + $(srcroot)src/ctl.c \ + $(srcroot)src/div.c \ + $(srcroot)src/extent.c \ + $(srcroot)src/extent_dss.c \ + $(srcroot)src/extent_mmap.c \ + $(srcroot)src/hash.c \ + $(srcroot)src/hook.c \ + $(srcroot)src/large.c \ + $(srcroot)src/log.c \ + $(srcroot)src/malloc_io.c \ + $(srcroot)src/mutex.c \ + $(srcroot)src/mutex_pool.c \ + $(srcroot)src/nstime.c \ + $(srcroot)src/pages.c \ + $(srcroot)src/prng.c \ + $(srcroot)src/prof.c \ + $(srcroot)src/rtree.c \ + $(srcroot)src/safety_check.c \ + $(srcroot)src/stats.c \ + $(srcroot)src/sc.c \ + $(srcroot)src/sz.c \ + $(srcroot)src/tcache.c \ + $(srcroot)src/test_hooks.c \ + $(srcroot)src/ticker.c \ + $(srcroot)src/tsd.c \ + $(srcroot)src/witness.c +ifeq ($(enable_zone_allocator), 1) +C_SRCS += $(srcroot)src/zone.c +endif +ifeq ($(IMPORTLIB),$(SO)) +STATIC_LIBS := $(objroot)lib/$(LIBJEMALLOC).$(A) +endif +ifdef PIC_CFLAGS +STATIC_LIBS += $(objroot)lib/$(LIBJEMALLOC)_pic.$(A) +else +STATIC_LIBS += $(objroot)lib/$(LIBJEMALLOC)_s.$(A) +endif +DSOS := $(objroot)lib/$(LIBJEMALLOC).$(SOREV) +ifneq ($(SOREV),$(SO)) +DSOS += $(objroot)lib/$(LIBJEMALLOC).$(SO) +endif +ifeq (1, $(link_whole_archive)) +LJEMALLOC := -Wl,--whole-archive -L$(objroot)lib -l$(LIBJEMALLOC) -Wl,--no-whole-archive +else +LJEMALLOC := $(objroot)lib/$(LIBJEMALLOC).$(IMPORTLIB) +endif +PC := $(objroot)jemalloc.pc +MAN3 := $(objroot)doc/jemalloc$(install_suffix).3 +DOCS_XML := $(objroot)doc/jemalloc$(install_suffix).xml +DOCS_HTML := $(DOCS_XML:$(objroot)%.xml=$(objroot)%.html) +DOCS_MAN3 := $(DOCS_XML:$(objroot)%.xml=$(objroot)%.3) +DOCS := $(DOCS_HTML) $(DOCS_MAN3) +C_TESTLIB_SRCS := $(srcroot)test/src/btalloc.c $(srcroot)test/src/btalloc_0.c \ + $(srcroot)test/src/btalloc_1.c $(srcroot)test/src/math.c \ + $(srcroot)test/src/mtx.c $(srcroot)test/src/mq.c \ + $(srcroot)test/src/SFMT.c $(srcroot)test/src/test.c \ + $(srcroot)test/src/thd.c $(srcroot)test/src/timer.c +ifeq (1, $(link_whole_archive)) +C_UTIL_INTEGRATION_SRCS := +C_UTIL_CPP_SRCS := +else +C_UTIL_INTEGRATION_SRCS := $(srcroot)src/nstime.c $(srcroot)src/malloc_io.c +C_UTIL_CPP_SRCS := $(srcroot)src/nstime.c $(srcroot)src/malloc_io.c +endif +TESTS_UNIT := \ + $(srcroot)test/unit/a0.c \ + $(srcroot)test/unit/arena_reset.c \ + $(srcroot)test/unit/atomic.c \ + $(srcroot)test/unit/background_thread.c \ + $(srcroot)test/unit/background_thread_enable.c \ + $(srcroot)test/unit/base.c \ + $(srcroot)test/unit/bitmap.c \ + $(srcroot)test/unit/bit_util.c \ + $(srcroot)test/unit/binshard.c \ + $(srcroot)test/unit/ckh.c \ + $(srcroot)test/unit/decay.c \ + $(srcroot)test/unit/div.c \ + $(srcroot)test/unit/emitter.c \ + $(srcroot)test/unit/extent_quantize.c \ + $(srcroot)test/unit/extent_util.c \ + $(srcroot)test/unit/fork.c \ + $(srcroot)test/unit/hash.c \ + $(srcroot)test/unit/hook.c \ + $(srcroot)test/unit/huge.c \ + $(srcroot)test/unit/junk.c \ + $(srcroot)test/unit/junk_alloc.c \ + $(srcroot)test/unit/junk_free.c \ + $(srcroot)test/unit/log.c \ + $(srcroot)test/unit/mallctl.c \ + $(srcroot)test/unit/malloc_io.c \ + $(srcroot)test/unit/math.c \ + $(srcroot)test/unit/mq.c \ + $(srcroot)test/unit/mtx.c \ + $(srcroot)test/unit/pack.c \ + $(srcroot)test/unit/pages.c \ + $(srcroot)test/unit/ph.c \ + $(srcroot)test/unit/prng.c \ + $(srcroot)test/unit/prof_accum.c \ + $(srcroot)test/unit/prof_active.c \ + $(srcroot)test/unit/prof_gdump.c \ + $(srcroot)test/unit/prof_idump.c \ + $(srcroot)test/unit/prof_log.c \ + $(srcroot)test/unit/prof_reset.c \ + $(srcroot)test/unit/prof_tctx.c \ + $(srcroot)test/unit/prof_thread_name.c \ + $(srcroot)test/unit/ql.c \ + $(srcroot)test/unit/qr.c \ + $(srcroot)test/unit/rb.c \ + $(srcroot)test/unit/retained.c \ + $(srcroot)test/unit/rtree.c \ + $(srcroot)test/unit/safety_check.c \ + $(srcroot)test/unit/seq.c \ + $(srcroot)test/unit/SFMT.c \ + $(srcroot)test/unit/sc.c \ + $(srcroot)test/unit/size_classes.c \ + $(srcroot)test/unit/slab.c \ + $(srcroot)test/unit/smoothstep.c \ + $(srcroot)test/unit/spin.c \ + $(srcroot)test/unit/stats.c \ + $(srcroot)test/unit/stats_print.c \ + $(srcroot)test/unit/test_hooks.c \ + $(srcroot)test/unit/ticker.c \ + $(srcroot)test/unit/nstime.c \ + $(srcroot)test/unit/tsd.c \ + $(srcroot)test/unit/witness.c \ + $(srcroot)test/unit/zero.c +ifeq (@enable_prof@, 1) +TESTS_UNIT += \ + $(srcroot)test/unit/arena_reset_prof.c +endif +TESTS_INTEGRATION := $(srcroot)test/integration/aligned_alloc.c \ + $(srcroot)test/integration/allocated.c \ + $(srcroot)test/integration/extent.c \ + $(srcroot)test/integration/malloc.c \ + $(srcroot)test/integration/mallocx.c \ + $(srcroot)test/integration/MALLOCX_ARENA.c \ + $(srcroot)test/integration/overflow.c \ + $(srcroot)test/integration/posix_memalign.c \ + $(srcroot)test/integration/rallocx.c \ + $(srcroot)test/integration/sdallocx.c \ + $(srcroot)test/integration/slab_sizes.c \ + $(srcroot)test/integration/thread_arena.c \ + $(srcroot)test/integration/thread_tcache_enabled.c \ + $(srcroot)test/integration/xallocx.c +ifeq (@enable_experimental_smallocx@, 1) +TESTS_INTEGRATION += \ + $(srcroot)test/integration/smallocx.c +endif +ifeq (@enable_cxx@, 1) +CPP_SRCS := $(srcroot)src/jemalloc_cpp.cpp +TESTS_INTEGRATION_CPP := $(srcroot)test/integration/cpp/basic.cpp +else +CPP_SRCS := +TESTS_INTEGRATION_CPP := +endif +TESTS_STRESS := $(srcroot)test/stress/microbench.c \ + $(srcroot)test/stress/hookbench.c + + +TESTS := $(TESTS_UNIT) $(TESTS_INTEGRATION) $(TESTS_INTEGRATION_CPP) $(TESTS_STRESS) + +PRIVATE_NAMESPACE_HDRS := $(objroot)include/jemalloc/internal/private_namespace.h $(objroot)include/jemalloc/internal/private_namespace_jet.h +PRIVATE_NAMESPACE_GEN_HDRS := $(PRIVATE_NAMESPACE_HDRS:%.h=%.gen.h) +C_SYM_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.sym.$(O)) +C_SYMS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.sym) +C_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.$(O)) +CPP_OBJS := $(CPP_SRCS:$(srcroot)%.cpp=$(objroot)%.$(O)) +C_PIC_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.pic.$(O)) +CPP_PIC_OBJS := $(CPP_SRCS:$(srcroot)%.cpp=$(objroot)%.pic.$(O)) +C_JET_SYM_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.jet.sym.$(O)) +C_JET_SYMS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.jet.sym) +C_JET_OBJS := $(C_SRCS:$(srcroot)%.c=$(objroot)%.jet.$(O)) +C_TESTLIB_UNIT_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.unit.$(O)) +C_TESTLIB_INTEGRATION_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.integration.$(O)) +C_UTIL_INTEGRATION_OBJS := $(C_UTIL_INTEGRATION_SRCS:$(srcroot)%.c=$(objroot)%.integration.$(O)) +C_TESTLIB_STRESS_OBJS := $(C_TESTLIB_SRCS:$(srcroot)%.c=$(objroot)%.stress.$(O)) +C_TESTLIB_OBJS := $(C_TESTLIB_UNIT_OBJS) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(C_TESTLIB_STRESS_OBJS) + +TESTS_UNIT_OBJS := $(TESTS_UNIT:$(srcroot)%.c=$(objroot)%.$(O)) +TESTS_INTEGRATION_OBJS := $(TESTS_INTEGRATION:$(srcroot)%.c=$(objroot)%.$(O)) +TESTS_INTEGRATION_CPP_OBJS := $(TESTS_INTEGRATION_CPP:$(srcroot)%.cpp=$(objroot)%.$(O)) +TESTS_STRESS_OBJS := $(TESTS_STRESS:$(srcroot)%.c=$(objroot)%.$(O)) +TESTS_OBJS := $(TESTS_UNIT_OBJS) $(TESTS_INTEGRATION_OBJS) $(TESTS_STRESS_OBJS) +TESTS_CPP_OBJS := $(TESTS_INTEGRATION_CPP_OBJS) + +.PHONY: all dist build_doc_html build_doc_man build_doc +.PHONY: install_bin install_include install_lib +.PHONY: install_doc_html install_doc_man install_doc install +.PHONY: tests check clean distclean relclean + +.SECONDARY : $(PRIVATE_NAMESPACE_GEN_HDRS) $(TESTS_OBJS) $(TESTS_CPP_OBJS) + +# Default target. +all: build_lib + +dist: build_doc + +$(objroot)doc/%.html : $(objroot)doc/%.xml $(srcroot)doc/stylesheet.xsl $(objroot)doc/html.xsl +ifneq ($(XSLROOT),) + $(XSLTPROC) -o $@ $(objroot)doc/html.xsl $< +else +ifeq ($(wildcard $(DOCS_HTML)),) + @echo "

Missing xsltproc. Doc not built.

" > $@ +endif + @echo "Missing xsltproc. "$@" not (re)built." +endif + +$(objroot)doc/%.3 : $(objroot)doc/%.xml $(srcroot)doc/stylesheet.xsl $(objroot)doc/manpages.xsl +ifneq ($(XSLROOT),) + $(XSLTPROC) -o $@ $(objroot)doc/manpages.xsl $< +else +ifeq ($(wildcard $(DOCS_MAN3)),) + @echo "Missing xsltproc. Doc not built." > $@ +endif + @echo "Missing xsltproc. "$@" not (re)built." +endif + +build_doc_html: $(DOCS_HTML) +build_doc_man: $(DOCS_MAN3) +build_doc: $(DOCS) + +# +# Include generated dependency files. +# +ifdef CC_MM +-include $(C_SYM_OBJS:%.$(O)=%.d) +-include $(C_OBJS:%.$(O)=%.d) +-include $(CPP_OBJS:%.$(O)=%.d) +-include $(C_PIC_OBJS:%.$(O)=%.d) +-include $(CPP_PIC_OBJS:%.$(O)=%.d) +-include $(C_JET_SYM_OBJS:%.$(O)=%.d) +-include $(C_JET_OBJS:%.$(O)=%.d) +-include $(C_TESTLIB_OBJS:%.$(O)=%.d) +-include $(TESTS_OBJS:%.$(O)=%.d) +-include $(TESTS_CPP_OBJS:%.$(O)=%.d) +endif + +$(C_SYM_OBJS): $(objroot)src/%.sym.$(O): $(srcroot)src/%.c +$(C_SYM_OBJS): CPPFLAGS += -DJEMALLOC_NO_PRIVATE_NAMESPACE +$(C_SYMS): $(objroot)src/%.sym: $(objroot)src/%.sym.$(O) +$(C_OBJS): $(objroot)src/%.$(O): $(srcroot)src/%.c +$(CPP_OBJS): $(objroot)src/%.$(O): $(srcroot)src/%.cpp +$(C_PIC_OBJS): $(objroot)src/%.pic.$(O): $(srcroot)src/%.c +$(C_PIC_OBJS): CFLAGS += $(PIC_CFLAGS) +$(CPP_PIC_OBJS): $(objroot)src/%.pic.$(O): $(srcroot)src/%.cpp +$(CPP_PIC_OBJS): CXXFLAGS += $(PIC_CFLAGS) +$(C_JET_SYM_OBJS): $(objroot)src/%.jet.sym.$(O): $(srcroot)src/%.c +$(C_JET_SYM_OBJS): CPPFLAGS += -DJEMALLOC_JET -DJEMALLOC_NO_PRIVATE_NAMESPACE +$(C_JET_SYMS): $(objroot)src/%.jet.sym: $(objroot)src/%.jet.sym.$(O) +$(C_JET_OBJS): $(objroot)src/%.jet.$(O): $(srcroot)src/%.c +$(C_JET_OBJS): CPPFLAGS += -DJEMALLOC_JET +$(C_TESTLIB_UNIT_OBJS): $(objroot)test/src/%.unit.$(O): $(srcroot)test/src/%.c +$(C_TESTLIB_UNIT_OBJS): CPPFLAGS += -DJEMALLOC_UNIT_TEST +$(C_TESTLIB_INTEGRATION_OBJS): $(objroot)test/src/%.integration.$(O): $(srcroot)test/src/%.c +$(C_TESTLIB_INTEGRATION_OBJS): CPPFLAGS += -DJEMALLOC_INTEGRATION_TEST +$(C_UTIL_INTEGRATION_OBJS): $(objroot)src/%.integration.$(O): $(srcroot)src/%.c +$(C_TESTLIB_STRESS_OBJS): $(objroot)test/src/%.stress.$(O): $(srcroot)test/src/%.c +$(C_TESTLIB_STRESS_OBJS): CPPFLAGS += -DJEMALLOC_STRESS_TEST -DJEMALLOC_STRESS_TESTLIB +$(C_TESTLIB_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include +$(TESTS_UNIT_OBJS): CPPFLAGS += -DJEMALLOC_UNIT_TEST +$(TESTS_INTEGRATION_OBJS): CPPFLAGS += -DJEMALLOC_INTEGRATION_TEST +$(TESTS_INTEGRATION_CPP_OBJS): CPPFLAGS += -DJEMALLOC_INTEGRATION_CPP_TEST +$(TESTS_STRESS_OBJS): CPPFLAGS += -DJEMALLOC_STRESS_TEST +$(TESTS_OBJS): $(objroot)test/%.$(O): $(srcroot)test/%.c +$(TESTS_CPP_OBJS): $(objroot)test/%.$(O): $(srcroot)test/%.cpp +$(TESTS_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include +$(TESTS_CPP_OBJS): CPPFLAGS += -I$(srcroot)test/include -I$(objroot)test/include +ifneq ($(IMPORTLIB),$(SO)) +$(CPP_OBJS) $(C_SYM_OBJS) $(C_OBJS) $(C_JET_SYM_OBJS) $(C_JET_OBJS): CPPFLAGS += -DDLLEXPORT +endif + +# Dependencies. +ifndef CC_MM +HEADER_DIRS = $(srcroot)include/jemalloc/internal \ + $(objroot)include/jemalloc $(objroot)include/jemalloc/internal +HEADERS = $(filter-out $(PRIVATE_NAMESPACE_HDRS),$(wildcard $(foreach dir,$(HEADER_DIRS),$(dir)/*.h))) +$(C_SYM_OBJS) $(C_OBJS) $(CPP_OBJS) $(C_PIC_OBJS) $(CPP_PIC_OBJS) $(C_JET_SYM_OBJS) $(C_JET_OBJS) $(C_TESTLIB_OBJS) $(TESTS_OBJS) $(TESTS_CPP_OBJS): $(HEADERS) +$(TESTS_OBJS) $(TESTS_CPP_OBJS): $(objroot)test/include/test/jemalloc_test.h +endif + +$(C_OBJS) $(CPP_OBJS) $(C_PIC_OBJS) $(CPP_PIC_OBJS) $(C_TESTLIB_INTEGRATION_OBJS) $(C_UTIL_INTEGRATION_OBJS) $(TESTS_INTEGRATION_OBJS) $(TESTS_INTEGRATION_CPP_OBJS): $(objroot)include/jemalloc/internal/private_namespace.h +$(C_JET_OBJS) $(C_TESTLIB_UNIT_OBJS) $(C_TESTLIB_STRESS_OBJS) $(TESTS_UNIT_OBJS) $(TESTS_STRESS_OBJS): $(objroot)include/jemalloc/internal/private_namespace_jet.h + +$(C_SYM_OBJS) $(C_OBJS) $(C_PIC_OBJS) $(C_JET_SYM_OBJS) $(C_JET_OBJS) $(C_TESTLIB_OBJS) $(TESTS_OBJS): %.$(O): + @mkdir -p $(@D) + $(CC) $(CFLAGS) -c $(CPPFLAGS) $(CTARGET) $< +ifdef CC_MM + @$(CC) -MM $(CPPFLAGS) -MT $@ -o $(@:%.$(O)=%.d) $< +endif + +$(C_SYMS): %.sym: + @mkdir -p $(@D) + $(DUMP_SYMS) $< | $(AWK) -f $(objroot)include/jemalloc/internal/private_symbols.awk > $@ + +$(C_JET_SYMS): %.sym: + @mkdir -p $(@D) + $(DUMP_SYMS) $< | $(AWK) -f $(objroot)include/jemalloc/internal/private_symbols_jet.awk > $@ + +$(objroot)include/jemalloc/internal/private_namespace.gen.h: $(C_SYMS) + $(SHELL) $(srcroot)include/jemalloc/internal/private_namespace.sh $^ > $@ + +$(objroot)include/jemalloc/internal/private_namespace_jet.gen.h: $(C_JET_SYMS) + $(SHELL) $(srcroot)include/jemalloc/internal/private_namespace.sh $^ > $@ + +%.h: %.gen.h + @if ! `cmp -s $< $@` ; then echo "cp $< $<"; cp $< $@ ; fi + +$(CPP_OBJS) $(CPP_PIC_OBJS) $(TESTS_CPP_OBJS): %.$(O): + @mkdir -p $(@D) + $(CXX) $(CXXFLAGS) -c $(CPPFLAGS) $(CTARGET) $< +ifdef CC_MM + @$(CXX) -MM $(CPPFLAGS) -MT $@ -o $(@:%.$(O)=%.d) $< +endif + +ifneq ($(SOREV),$(SO)) +%.$(SO) : %.$(SOREV) + @mkdir -p $(@D) + ln -sf $( To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: a0dfba697132 - main - jemalloc: Update jemalloc.xml.in per FreeBSD-diffs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: a0dfba69713276b987174db66d8934f7fdd95027 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a0dfba69713276b987174db66d8934f7fdd95027 commit a0dfba69713276b987174db66d8934f7fdd95027 Author: Warner Losh AuthorDate: 2025-08-15 21:23:27 +0000 Commit: Warner Losh CommitDate: 2025-08-15 21:24:26 +0000 jemalloc: Update jemalloc.xml.in per FreeBSD-diffs Add the xml source to the FreeBSD changes to the jemalloc.3. No functional change. Sponsored by: Netflix --- contrib/jemalloc/doc/jemalloc.xml.in | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/contrib/jemalloc/doc/jemalloc.xml.in b/contrib/jemalloc/doc/jemalloc.xml.in index 7fecda7cb040..e3a111ad165b 100644 --- a/contrib/jemalloc/doc/jemalloc.xml.in +++ b/contrib/jemalloc/doc/jemalloc.xml.in @@ -53,11 +53,22 @@ This manual describes jemalloc @jemalloc_version@. More information can be found at the jemalloc website. + + The following configuration options are enabled in libc's built-in + jemalloc: , + , , + , , and + . + Additionally, is enabled in development + versions of FreeBSD (controlled by the + MK_MALLOC_PRODUCTION make variable). + SYNOPSIS - #include <jemalloc/jemalloc.h> + #include <stdlib.h> +#include <malloc_np.h> Standard API @@ -3510,4 +3521,18 @@ malloc_conf = "narenas:1";]]> The posix_memalign() function conforms to IEEE Std 1003.1-2001 (POSIX.1). + + HISTORY + The malloc_usable_size() and + posix_memalign() functions first appeared in FreeBSD + 7.0. + + The aligned_alloc(), + malloc_stats_print(), and + mallctl*() functions first appeared in FreeBSD + 10.0. + + The *allocx() functions first appeared in FreeBSD + 11.0. + From nobody Fri Aug 15 21:27:35 2025 X-Original-To: dev-commits-src-main@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 4c3ZvW6Lkkz64KBb; Fri, 15 Aug 2025 21:27: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3ZvW4S4tz3Xqg; Fri, 15 Aug 2025 21:27:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755293255; 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=QyDB9xMfwCxICYFr7MBq5WAFvrh7L9QTqOBVM84HZVw=; b=SeF+sUZr7hpPd96OFJZ/5YkhsvIL6nUfa0XDeUomPq28tHUtUr9O01DT1FTahZ/UbZwu/U gltXtWVMdB+WNVgabw0VM2xs8nACQ/KoAnK5rX1UWsH8zFobxGEHQAL8QCYBsMt7UPf3hP trG7Acv38PeYI6qzuQLRHiQpKL5RVTSu/zwduImjmzukgdEPe/6Jix1863CgPRjItWbRSK y6YpWg1yFfSHpRrS7MhAURRVQqcxSIgKZntDsUMkUwoMgogCQOrEtfxW1N9dJDsxndNysQ fu+x1wOY47Y17vBfVgPA3HHxHMxBUwgXaKAF3eJORhrxQ4KnjblSSTgNGaJOCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755293255; 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=QyDB9xMfwCxICYFr7MBq5WAFvrh7L9QTqOBVM84HZVw=; b=RTcxFZVs8u5uX99AxNsmaP7Kx1q1sx7vsv+jYrBmE3bv4zjg/QAFWsb53tsssBY9YqRs7M XXQsEicyfspnMV1E3gU+r0ATYvyM2ymvPrz+bTM9bVKjp8c8O9vZwf8rdbARjvC4YfPXKq dsCwqoqvNDwVbIX7Llm3cZHE4N3f4pIN9QTsIFn+rUunxlcxkQIZUJcHAWfENjxzV7+idY QWPqVdvQSB/nESYzhrLXmmaVbvgfwiERsBy1tT4HJmRUhY1KGYJ6bZdvARdCuke7ewSWDn 2+Qb5OHJIhRxvscmenveakDsnPA9FGTgcX3/Hy34gdZG23VCIsa32TBEvnCCmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755293255; a=rsa-sha256; cv=none; b=eYYUbbOCkETthIns0qDO8/5xnSsaAPxYI/+I9Jhzet52JZpvbiKTEwIEwQL+kUK5jMFZkW ITKWzMukYXznJBwdLb5wnp9AEVnHyVWVo5B6pS+otepkyT1cYDQ9y4Od84Ox4+c9tQb2b/ DP33ugcxFC6Xymylr+l2+TXF/EGK2y9bgB7gnBEVe2ivGYAdntmm3YOK3/yRJfOlbx9GB6 foqmMdcuf53s/YJzQKpgS/AO3drpSJF6yWg3A+iL6xELMgPHz0FrQ0lwgyqfLeSml09tws 8XnLNgNODb8ICrWn1gtj32R31bAzP85cv9J64VXyANETIMJ41t9NuM+MY2SqhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c3ZvW2Fx4zvX5; Fri, 15 Aug 2025 21:27: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 57FLRZEi086413; Fri, 15 Aug 2025 21:27:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FLRZ8U086410; Fri, 15 Aug 2025 21:27:35 GMT (envelope-from git) Date: Fri, 15 Aug 2025 21:27:35 GMT Message-Id: <202508152127.57FLRZ8U086410@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: 718b13ba6c5d - main - jemalloc: Add FreeBSD's updates to jemalloc_preamble.h.in List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 718b13ba6c5dad72fa7964b05038b3d462b993b8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=718b13ba6c5dad72fa7964b05038b3d462b993b8 commit 718b13ba6c5dad72fa7964b05038b3d462b993b8 Author: Warner Losh AuthorDate: 2025-08-15 21:23:30 +0000 Commit: Warner Losh CommitDate: 2025-08-15 21:24:32 +0000 jemalloc: Add FreeBSD's updates to jemalloc_preamble.h.in jemalloc_preample.h is generated, and FreeBSD has made some changes which we update using configure, etc on version updates. No functional change. Sponsored by: Netflix --- .../jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/contrib/jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in b/contrib/jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in index 3418cbfa2609..53e30dc4b59b 100644 --- a/contrib/jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in +++ b/contrib/jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in @@ -8,6 +8,9 @@ #include #endif +#include "un-namespace.h" +#include "libc_private.h" + #define JEMALLOC_NO_DEMANGLE #ifdef JEMALLOC_JET # undef JEMALLOC_IS_MALLOC @@ -79,13 +82,7 @@ static const bool config_fill = false #endif ; -static const bool config_lazy_lock = -#ifdef JEMALLOC_LAZY_LOCK - true -#else - false -#endif - ; +static const bool config_lazy_lock = true; static const char * const config_malloc_conf = JEMALLOC_CONFIG_MALLOC_CONF; static const bool config_prof = #ifdef JEMALLOC_PROF From nobody Fri Aug 15 21:27:36 2025 X-Original-To: dev-commits-src-main@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 4c3ZvZ2TGGz64KY6; Fri, 15 Aug 2025 21:27: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3ZvX3KZSz3Xqk; Fri, 15 Aug 2025 21:27:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755293258; 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=MyurFsyxNMBQriDGG2y74yHW0Kc4ogBgkAz6oMjf/lk=; b=c3PzIZfVjmvf6FHdy6qtv2VsZm8PKyyouLjdM9BJKMPWFGwDlclbFF2D5//Npi4U02ZyBq bQFSmw4T0M+kw6V0eE3CXdiTyF3BSvs9BTjzKSRgzvGy2l2F2r97iIoeMs7EDVrZ2zo13H KivP2U5YUZe7IznA92JciwD6ErbfP9/nrixAzCZLmYuFh61KcAX8LRn+WnbiyeY7MqD+ZQ fa20/Z+AeLwo7T1vZC9YlxgHH9n0S4chwLdu2YnFhUKMt7wOAK6qU+K6NNeQ58pgJque0x IH3MatOx1hy7ZMrncOuESZPEO1x61+eKqZUFKO1NIqxyZ+YptIdKzycGYeOeMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755293258; 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=MyurFsyxNMBQriDGG2y74yHW0Kc4ogBgkAz6oMjf/lk=; b=fEgR4wKNhJKV/OJVhp54Es7nxETulOfKnI5Yp0U5hmWlunU5G7fS/iE6y5082w0zIzHd1R 85/LKwZpMcmNNKdq81dCc4CJXy/Efaz611cu1/b2clTZiSeRn/Z74yqpN17xk1g5evbSjz MBtF2s7XTnQljvgGrKAJeju1CqyZ8uC9iw0Jad1QCgCIlyzi9ovmE9gRdjUXL7/ovo363b MI3vAPLMHrzXNGiLjctBU/8DZs1F1Md+sTxyKyyxIsSNMuQLonVuFqrowVHAXqpd2xavAb u7SAfclRWf/trhmvhj4g6Ewxhmgp3Mv0TIvBicVlI3xJlcnEP+mOsTfwsu0Gsw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755293258; a=rsa-sha256; cv=none; b=SHCX5FHBfhzts7aNoVBXaCsYWXR5BCn4dMFiEICdxe4lIa+iQcuhwNuZPGvOW1JidTGCXI VStNNXEVSBzvX3kfV4UJP2OEOh3Px8Ga9+WVQp3lnU4cpsAn5ij57/OHuPv9RmruamlM3V 1gdvngxjvt0jWa+cCPs+Xl2pB1XtTGwszBnIel4ASd5CIeMPGDH8DMKAMiBleoz0/WN8EO /CEHsonnXC6ts6RUDiPuG1P8fFxTYNA/GCuOnT6eBRqjnWrSIGpR6JDLOz4euEYibK8uXr GWU0IhfBN87QgQ6mbo6yoZonv1b8lzVbD7OSm8CnJE3kyesuh/RY/z2ClRy31Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c3ZvX2thrzvX6; Fri, 15 Aug 2025 21:27: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 57FLRa1C086453; Fri, 15 Aug 2025 21:27:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FLRa0k086450; Fri, 15 Aug 2025 21:27:36 GMT (envelope-from git) Date: Fri, 15 Aug 2025 21:27:36 GMT Message-Id: <202508152127.57FLRa0k086450@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: 6371645df7b0 - main - jemalloc: Add JEMALLOC_PRIVATE_NAMESPACE for the libc namespace List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 6371645df7b098e3125cce92b3e46f55291ed71c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6371645df7b098e3125cce92b3e46f55291ed71c commit 6371645df7b098e3125cce92b3e46f55291ed71c Author: Warner Losh AuthorDate: 2025-08-15 21:23:33 +0000 Commit: Warner Losh CommitDate: 2025-08-15 21:24:39 +0000 jemalloc: Add JEMALLOC_PRIVATE_NAMESPACE for the libc namespace Gate the namespace dance on this define. This allows us to bootstrap new versions of jemalloc more easily. One of the steps of import is building to find what symbols need to be private. When we do that, we don't want to do this dance. No functional change. Sponsored by: Netflix --- contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h | 2 ++ contrib/jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in | 2 ++ 2 files changed, 4 insertions(+) diff --git a/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h b/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h index a0e4f5af0124..163efbf44248 100644 --- a/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h +++ b/contrib/jemalloc/include/jemalloc/internal/jemalloc_internal_decls.h @@ -1,8 +1,10 @@ #ifndef JEMALLOC_INTERNAL_DECLS_H #define JEMALLOC_INTERNAL_DECLS_H +#ifndef JEMALLOC_NO_PRIVATE_NAMESPACE #include "libc_private.h" #include "namespace.h" +#endif #include #ifdef _WIN32 diff --git a/contrib/jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in b/contrib/jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in index 53e30dc4b59b..f821c19746b8 100644 --- a/contrib/jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in +++ b/contrib/jemalloc/include/jemalloc/internal/jemalloc_preamble.h.in @@ -8,8 +8,10 @@ #include #endif +#ifndef JEMALLOC_PRIVATE_NAMESPACE #include "un-namespace.h" #include "libc_private.h" +#endif #define JEMALLOC_NO_DEMANGLE #ifdef JEMALLOC_JET From nobody Fri Aug 15 21:27:37 2025 X-Original-To: dev-commits-src-main@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 4c3Zvb6pRYz64KPp; Fri, 15 Aug 2025 21:27: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3ZvZ2pV0z3XlM; Fri, 15 Aug 2025 21:27:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755293259; 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=aSdd2gjPYm4nsSH5jZmYe+9tBUtKsNZwXZU+gWezwh4=; b=JMDX2vapYbZJHhZ/Nif65zzqXjlHhfUReOoeErmOzBKAI9H4Mq0+r8QZmjmhK0pRuxZlRE YgIU0bkInsmJwlPAq94v1wE2Yh0r5pTf8hX5lvCAXsagXPC01MTcQjbvgPwqBKWrmRvW5X X+CfYDYE83Tr54dHw2lEHFb+nnDYyy0a35lBXkoLx98oR5itbehwLjBsfXxWO6sttJG6v1 VhdqPw9pUBYmVK2bVNNrxTvKhjA75+l50ZoK25SlrqBguuiT4x96P1gYeQ1Rd38uA8J4eG fFf+PCZcDBuRXgd188dJGa2QvHIuNvznaFpj1yC22XyHUH5U68DzowVL8+p7tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755293259; 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=aSdd2gjPYm4nsSH5jZmYe+9tBUtKsNZwXZU+gWezwh4=; b=HgO+7YT4YZE+wVpULGPsRz6it8KcAYlh/ZgYlYG5ohO80kcjEur+S9LacScZemOHMRIbpv 3ig8hi29yyxG4R8grh0vjr8jBgz3D30YHJ1OTQVquL3/APVukrnui2v02jBkM4cXveh1/F qZmCuP81Nf7ODSTtUkJ/rnjZiUMd9OpKsbRZk8xgIy3FKm1ZnFHDxTac4EuQfv7Q/hO5Hp r7s/WavCYIPPp1Twkb5ASGJuA8mr5TPhTd0P+ZjJmKsxrDujVoigP5SlyTJeWYePnjUIRq 50uKvUUUQ+06u/zQB9qcCENXylHIq7X7/rhai5GnusfdqllqCjAQDHKH33F8nQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755293259; a=rsa-sha256; cv=none; b=bvFGPZm2Ml+TRXyIAfuTsLiKJs3amQZSEH2+m4XOsp7bryhURCMLAMrE8w5ufC+8aBXKSJ i0tLfoLDM43oWGRktDwSO4ua4sr4c7RxYFKnH8w8DLz8MdHBFrx5RACP3ZsbWMCf2P/2Aq tLd9XpCGpbOrQwVTsTqeKC8fqnXwotQ70XoKTtdqmakzRAQPHL0sUfoiQC19tYvm7d9e3t f8ximN4J2P9Gugk176xq9phhVVtzx4CLM34nON6h0n0FbRvsV6HaCs8tKwCiNINt3/DbNm FzsWw7TQK2PEEgHRixWsx74CAXwpSu9crAha1/wvQzj33H0KyZHJpiNo/3H7BA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c3ZvY3qhKzv24; Fri, 15 Aug 2025 21:27:37 +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 57FLRblH086487; Fri, 15 Aug 2025 21:27:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FLRbYT086484; Fri, 15 Aug 2025 21:27:37 GMT (envelope-from git) Date: Fri, 15 Aug 2025 21:27:37 GMT Message-Id: <202508152127.57FLRbYT086484@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: da260ab23f26 - main - jemalloc: Only replace _pthread_mutex_init_calloc_cb in private namespace List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: da260ab23f26cea5569ff8ecd83eeb49411af233 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=da260ab23f26cea5569ff8ecd83eeb49411af233 commit da260ab23f26cea5569ff8ecd83eeb49411af233 Author: Warner Losh AuthorDate: 2025-08-15 21:23:36 +0000 Commit: Warner Losh CommitDate: 2025-08-15 21:24:46 +0000 jemalloc: Only replace _pthread_mutex_init_calloc_cb in private namespace When we're not doing the private namespace remap, we don't need to do this pragma. This is needed for the bootstrapping path when we import a new version of jemalloc. No functional change. Sponsored by: Netflix --- contrib/jemalloc/src/mutex.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/jemalloc/src/mutex.c b/contrib/jemalloc/src/mutex.c index 88a7730c64c1..6e2989aa4d9f 100644 --- a/contrib/jemalloc/src/mutex.c +++ b/contrib/jemalloc/src/mutex.c @@ -42,6 +42,7 @@ pthread_create(pthread_t *__restrict thread, JEMALLOC_EXPORT int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex, void *(calloc_cb)(size_t, size_t)); +#ifndef JEMALLOC_NO_PRIVATE_NAMESPACE #pragma weak _pthread_mutex_init_calloc_cb int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex, @@ -53,6 +54,7 @@ _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex, calloc_cb)); } #endif +#endif void malloc_mutex_lock_slow(malloc_mutex_t *mutex) { From nobody Fri Aug 15 21:48:47 2025 X-Original-To: dev-commits-src-main@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 4c3bN00KzTz64Lmj; Fri, 15 Aug 2025 21: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3bN002D3z3fXJ; Fri, 15 Aug 2025 21: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=1755294528; 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=4i/vrgjl10S6jlmiU2PXJRfjqoPUwioJgeNMTDzVYUA=; b=eRvooTopevudKzj0Bd76NBa0RaK+oKrNvsUdt6duDu1RbcwiEAEAbY9FaMy318ZLa/vL52 gEFNlxBxCzwzTtwWSkoYM+a3orPzoa+JYhRTVgbpeViW2iHSZwpY1AUpCg0FPxLNrUROO0 LmlMh1QxcFNfru8WkfDh1Pwk1+0N6SNGU/ImRnwkGQPrYgD0WCxyyMRR6XPNbSBYpNLnts InoTP0fXlsFGHVR8wN03od4REYlilWt2jXpxQOUTJ4tcWLJQwl8MNpUTie5QKPo72a9rKM sldplQ1fvnUSi5GPKvIfrzi8jebO0D42CKMbZNbonygrvcBA9Cl9Ui9UzmOzwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755294528; 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=4i/vrgjl10S6jlmiU2PXJRfjqoPUwioJgeNMTDzVYUA=; b=p81ydutUtG0gFSnaMxeJOdtlfjSYRwdTdX4M0DfqxznioKtjba8Dyz+H1/F8IhIyGJK8bI EGJGTtrP11gswkWxVwlD5sV9P+IL0KKw65sOBd+eI/ARa61QRXZbtPbHfR+d+mc8Y7qraW teMdhrvKpGvWgwwt0ficCLXRiZ2SgUFskqDpLW3JUf/P+S66HBOZYDDhgWaXOa1RrapLik 6Zam5KtJ1DNcfigPoedye5pZYjjxqFyFRoqOMkMeXdDlgg4KpipIAw4JrCS4WDYg5GjMVi 8JEwTf3j0/dg2oYd4/Ej364IpeMjAnYhUZQBoNcCbBBgWWvx+3RU13z0ik9geQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755294528; a=rsa-sha256; cv=none; b=DgO5BrJwbGUUY7zlkVgVR9HzpBzzj3wJE0QjEndY+AFFLHvGeBtLo9QOVYc1AA9MnV8mOe wKCpNlvVL/MyO6g4iL45ZO0oODN+RHMEsBYS8vq072rV55z71b0wzpkxNwK6K+/qeChCA4 vUoqXOeOG5b/kFLthY7AuOw4df3kdYh12q/dmmWe1Wr7JM9RUz5tlODobuO+nUq20byw6+ tq+HYXLQO6ny3tcI6mzRghg0IT7E+IJrAhfzZ7yv0IxcxfgBu6fS7VrHbYkvFVB3Ck52Je CfZkbr16X0DsqfhVDtPWEA+hfPYH3rcQqZVid+FOIoMjH74JAenrH/ed0jmbcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c3bMz65wnzwGT; Fri, 15 Aug 2025 21:48: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 57FLmlcf025034; Fri, 15 Aug 2025 21:48:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FLmlYC025027; Fri, 15 Aug 2025 21:48:47 GMT (envelope-from git) Date: Fri, 15 Aug 2025 21:48:47 GMT Message-Id: <202508152148.57FLmlYC025027@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: c43cad871720 - main - jemalloc: Merge from jemalloc 5.3.0 vendor branch List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: c43cad87172039ccf38172129c79755ea79e6102 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c43cad87172039ccf38172129c79755ea79e6102 commit c43cad87172039ccf38172129c79755ea79e6102 Merge: da260ab23f26 48ec896efb0b Author: Warner Losh AuthorDate: 2025-08-11 23:38:36 +0000 Commit: Warner Losh CommitDate: 2025-08-15 21:48:34 +0000 jemalloc: Merge from jemalloc 5.3.0 vendor branch This brings in a merge from jemalloc 5.3.0. It's almost fully scripted, except: Three conflicts resolved by hand: include/jemalloc/internal/test_hooks.h Use the new name src/extent.c Use the new code src/jemalloc.c Use the new code since je_realloc has moved The script is recorded in FREEBSD-upgrade. The old script did svn commands that were basically a rebase of our changes. This update has a series of diff reduction changes before this. Note: I'd planned on fixing the above three conflicts with commits, but ran out of time when I did this work in January. I got discouraged when jemalloc was EOL'd and didn't pick this back up. I did the above by hand to get this into FreeBSD 15.0 This work is a repeat of the work by Minsoo Choo who did all these changes and created a pull request. Given the importance of jemalloc, I audited these changes by redoing them in this series of commits (and with the script that was checked in). I did this to confince myself and anybody else in doubt that there was no supply chain attack. The diffs between this series of commits and Minsoo's work are minor (though the version skew makes adds some noise). Interested parties can independent audit each step, I hope. I've listed Minsoo as a co-author since without his pull request to test again, this wouldn't have been possible. Thanks to brooks@ for help with getting the jemalloc 3 ABI compat symbols right. Co-authored-by: Minsoo Choo Pull Request: https://github.com/freebsd/freebsd-src/pull/1337 Sponsored by: Netflix contrib/jemalloc/ChangeLog | 100 + contrib/jemalloc/FREEBSD-upgrade | 254 +- contrib/jemalloc/INSTALL.md | 428 ++ contrib/jemalloc/Makefile.in | 766 +++ contrib/jemalloc/TUNING.md | 133 + contrib/jemalloc/VERSION | 2 +- contrib/jemalloc/bin/jeprof.in | 5727 ++++++++++++++++++++ contrib/jemalloc/build-aux/config.guess | 1705 ++++++ contrib/jemalloc/build-aux/config.sub | 1859 +++++++ contrib/jemalloc/configure.ac | 2673 +++++++++ contrib/jemalloc/doc/jemalloc.xml.in | 3792 +++++++++++++ .../jemalloc/doc_internal/PROFILING_INTERNALS.md | 127 + contrib/jemalloc/doc_internal/jemalloc.svg | 1 + .../include/jemalloc/internal/activity_callback.h | 23 + .../include/jemalloc/internal/arena_externs.h | 77 +- .../include/jemalloc/internal/arena_inlines_a.h | 35 +- .../include/jemalloc/internal/arena_inlines_b.h | 489 +- .../include/jemalloc/internal/arena_stats.h | 227 +- .../include/jemalloc/internal/arena_structs.h | 101 + .../include/jemalloc/internal/arena_structs_a.h | 11 - .../include/jemalloc/internal/arena_structs_b.h | 232 - .../include/jemalloc/internal/arena_types.h | 23 +- .../jemalloc/include/jemalloc/internal/atomic.h | 33 +- .../jemalloc/internal/background_thread_externs.h | 7 +- .../jemalloc/internal/background_thread_inlines.h | 14 - .../jemalloc/internal/background_thread_structs.h | 12 + contrib/jemalloc/include/jemalloc/internal/base.h | 110 + .../include/jemalloc/internal/base_externs.h | 22 - .../include/jemalloc/internal/base_inlines.h | 13 - .../include/jemalloc/internal/base_structs.h | 59 - .../include/jemalloc/internal/base_types.h | 33 - contrib/jemalloc/include/jemalloc/internal/bin.h | 85 +- .../jemalloc/include/jemalloc/internal/bin_info.h | 50 + .../jemalloc/include/jemalloc/internal/bin_stats.h | 5 +- .../jemalloc/include/jemalloc/internal/bin_types.h | 2 +- .../jemalloc/include/jemalloc/internal/bit_util.h | 457 +- .../jemalloc/include/jemalloc/internal/bitmap.h | 21 +- .../include/jemalloc/internal/buf_writer.h | 32 + .../jemalloc/include/jemalloc/internal/cache_bin.h | 625 ++- .../jemalloc/include/jemalloc/internal/counter.h | 34 + contrib/jemalloc/include/jemalloc/internal/ctl.h | 31 +- contrib/jemalloc/include/jemalloc/internal/decay.h | 186 + .../jemalloc/include/jemalloc/internal/ecache.h | 55 + contrib/jemalloc/include/jemalloc/internal/edata.h | 698 +++ .../include/jemalloc/internal/edata_cache.h | 49 + .../jemalloc/include/jemalloc/internal/ehooks.h | 412 ++ contrib/jemalloc/include/jemalloc/internal/emap.h | 357 ++ .../jemalloc/include/jemalloc/internal/emitter.h | 74 +- contrib/jemalloc/include/jemalloc/internal/eset.h | 77 + .../jemalloc/include/jemalloc/internal/exp_grow.h | 50 + .../jemalloc/include/jemalloc/internal/extent.h | 137 + .../include/jemalloc/internal/extent_externs.h | 83 - .../include/jemalloc/internal/extent_inlines.h | 501 -- .../include/jemalloc/internal/extent_structs.h | 256 - .../include/jemalloc/internal/extent_types.h | 23 - contrib/jemalloc/include/jemalloc/internal/fb.h | 373 ++ contrib/jemalloc/include/jemalloc/internal/fxp.h | 126 + contrib/jemalloc/include/jemalloc/internal/hash.h | 63 +- contrib/jemalloc/include/jemalloc/internal/hpa.h | 182 + .../jemalloc/include/jemalloc/internal/hpa_hooks.h | 17 + .../jemalloc/include/jemalloc/internal/hpa_opts.h | 74 + .../jemalloc/include/jemalloc/internal/hpdata.h | 413 ++ .../jemalloc/include/jemalloc/internal/inspect.h | 40 + .../jemalloc/internal/jemalloc_internal_decls.h | 16 +- .../jemalloc/internal/jemalloc_internal_defs.h.in | 431 ++ .../jemalloc/internal/jemalloc_internal_externs.h | 28 +- .../jemalloc/internal/jemalloc_internal_includes.h | 16 +- .../internal/jemalloc_internal_inlines_a.h | 82 +- .../internal/jemalloc_internal_inlines_b.h | 52 +- .../internal/jemalloc_internal_inlines_c.h | 124 +- .../jemalloc/internal/jemalloc_internal_macros.h | 13 +- .../jemalloc/internal/jemalloc_internal_types.h | 28 +- .../jemalloc/internal/jemalloc_preamble.h.in | 266 + .../include/jemalloc/internal/large_externs.h | 26 +- .../jemalloc/include/jemalloc/internal/lockedint.h | 204 + .../jemalloc/include/jemalloc/internal/malloc_io.h | 11 +- .../include/jemalloc/internal/mpsc_queue.h | 134 + contrib/jemalloc/include/jemalloc/internal/mutex.h | 63 +- .../include/jemalloc/internal/mutex_pool.h | 94 - .../include/jemalloc/internal/mutex_prof.h | 13 +- .../jemalloc/include/jemalloc/internal/nstime.h | 43 +- contrib/jemalloc/include/jemalloc/internal/pa.h | 243 + contrib/jemalloc/include/jemalloc/internal/pac.h | 179 + contrib/jemalloc/include/jemalloc/internal/pages.h | 31 + contrib/jemalloc/include/jemalloc/internal/pai.h | 95 + contrib/jemalloc/include/jemalloc/internal/peak.h | 37 + .../include/jemalloc/internal/peak_event.h | 24 + contrib/jemalloc/include/jemalloc/internal/ph.h | 817 +-- contrib/jemalloc/include/jemalloc/internal/prng.h | 93 +- .../jemalloc/include/jemalloc/internal/prof_data.h | 37 + .../include/jemalloc/internal/prof_externs.h | 116 +- .../jemalloc/include/jemalloc/internal/prof_hook.h | 21 + .../include/jemalloc/internal/prof_inlines.h | 261 + .../include/jemalloc/internal/prof_inlines_a.h | 85 - .../include/jemalloc/internal/prof_inlines_b.h | 250 - .../jemalloc/include/jemalloc/internal/prof_log.h | 22 + .../include/jemalloc/internal/prof_recent.h | 23 + .../include/jemalloc/internal/prof_stats.h | 17 + .../include/jemalloc/internal/prof_structs.h | 47 +- .../jemalloc/include/jemalloc/internal/prof_sys.h | 30 + .../include/jemalloc/internal/prof_types.h | 37 +- contrib/jemalloc/include/jemalloc/internal/psset.h | 131 + contrib/jemalloc/include/jemalloc/internal/ql.h | 129 +- contrib/jemalloc/include/jemalloc/internal/qr.h | 130 +- .../jemalloc/include/jemalloc/internal/quantum.h | 12 +- contrib/jemalloc/include/jemalloc/internal/rb.h | 920 +++- contrib/jemalloc/include/jemalloc/internal/rtree.h | 520 +- .../jemalloc/include/jemalloc/internal/rtree_tsd.h | 24 +- .../include/jemalloc/internal/safety_check.h | 7 +- contrib/jemalloc/include/jemalloc/internal/san.h | 191 + .../jemalloc/include/jemalloc/internal/san_bump.h | 52 + contrib/jemalloc/include/jemalloc/internal/sc.h | 78 +- contrib/jemalloc/include/jemalloc/internal/sec.h | 120 + .../jemalloc/include/jemalloc/internal/sec_opts.h | 59 + .../jemalloc/include/jemalloc/internal/slab_data.h | 12 + contrib/jemalloc/include/jemalloc/internal/stats.h | 29 +- contrib/jemalloc/include/jemalloc/internal/sz.h | 97 +- .../include/jemalloc/internal/tcache_externs.h | 60 +- .../include/jemalloc/internal/tcache_inlines.h | 156 +- .../include/jemalloc/internal/tcache_structs.h | 62 +- .../include/jemalloc/internal/tcache_types.h | 40 +- .../include/jemalloc/internal/test_hooks.h | 16 +- .../include/jemalloc/internal/thread_event.h | 301 + .../jemalloc/include/jemalloc/internal/ticker.h | 92 +- contrib/jemalloc/include/jemalloc/internal/tsd.h | 243 +- .../include/jemalloc/internal/tsd_generic.h | 23 +- .../jemalloc/internal/tsd_malloc_thread_cleanup.h | 2 +- .../jemalloc/include/jemalloc/internal/tsd_types.h | 2 +- .../jemalloc/include/jemalloc/internal/tsd_win.h | 143 + .../include/jemalloc/internal/typed_list.h | 55 + contrib/jemalloc/include/jemalloc/internal/util.h | 56 + .../jemalloc/include/jemalloc/internal/witness.h | 183 +- .../jemalloc/include/jemalloc/jemalloc_defs.h.in | 58 + .../jemalloc/include/jemalloc/jemalloc_macros.h.in | 153 + .../jemalloc/include/jemalloc/jemalloc_protos.h.in | 75 + contrib/jemalloc/m4/ax_cxx_compile_stdcxx.m4 | 955 ++++ contrib/jemalloc/scripts/check-formatting.sh | 28 + contrib/jemalloc/scripts/freebsd/before_install.sh | 3 + contrib/jemalloc/scripts/freebsd/before_script.sh | 10 + contrib/jemalloc/scripts/freebsd/script.sh | 3 + contrib/jemalloc/scripts/gen_run_tests.py | 134 + contrib/jemalloc/scripts/gen_travis.py | 331 ++ contrib/jemalloc/scripts/linux/before_install.sh | 13 + contrib/jemalloc/scripts/windows/before_install.sh | 83 + contrib/jemalloc/scripts/windows/before_script.sh | 20 + contrib/jemalloc/scripts/windows/script.sh | 10 + contrib/jemalloc/src/arena.c | 2063 +++---- contrib/jemalloc/src/background_thread.c | 335 +- contrib/jemalloc/src/base.c | 193 +- contrib/jemalloc/src/bin.c | 30 +- contrib/jemalloc/src/bin_info.c | 30 + contrib/jemalloc/src/bitmap.c | 1 - contrib/jemalloc/src/buf_writer.c | 144 + contrib/jemalloc/src/cache_bin.c | 99 + contrib/jemalloc/src/ckh.c | 7 +- contrib/jemalloc/src/counter.c | 30 + contrib/jemalloc/src/ctl.c | 1691 ++++-- contrib/jemalloc/src/decay.c | 295 + contrib/jemalloc/src/ecache.c | 35 + contrib/jemalloc/src/edata.c | 6 + contrib/jemalloc/src/edata_cache.c | 154 + contrib/jemalloc/src/ehooks.c | 275 + contrib/jemalloc/src/emap.c | 386 ++ contrib/jemalloc/src/eset.c | 282 + contrib/jemalloc/src/exp_grow.c | 8 + contrib/jemalloc/src/extent.c | 2488 +++------ contrib/jemalloc/src/extent_dss.c | 42 +- contrib/jemalloc/src/extent_mmap.c | 1 - contrib/jemalloc/src/fxp.c | 124 + contrib/jemalloc/src/hash.c | 3 - contrib/jemalloc/src/hook.c | 6 +- contrib/jemalloc/src/hpa.c | 1044 ++++ contrib/jemalloc/src/hpa_hooks.c | 63 + contrib/jemalloc/src/hpdata.c | 325 ++ contrib/jemalloc/src/inspect.c | 77 + contrib/jemalloc/src/jemalloc.c | 2155 +++++--- contrib/jemalloc/src/jemalloc_cpp.cpp | 258 + contrib/jemalloc/src/large.c | 299 +- contrib/jemalloc/src/malloc_io.c | 46 +- contrib/jemalloc/src/mutex.c | 19 +- contrib/jemalloc/src/mutex_pool.c | 18 - contrib/jemalloc/src/nstime.c | 127 +- contrib/jemalloc/src/pa.c | 277 + contrib/jemalloc/src/pa_extra.c | 191 + contrib/jemalloc/src/pac.c | 587 ++ contrib/jemalloc/src/pages.c | 209 +- contrib/jemalloc/src/pai.c | 31 + contrib/jemalloc/src/peak_event.c | 82 + contrib/jemalloc/src/prng.c | 3 - contrib/jemalloc/src/prof.c | 3189 ++--------- contrib/jemalloc/src/prof_data.c | 1447 +++++ contrib/jemalloc/src/prof_log.c | 717 +++ contrib/jemalloc/src/prof_recent.c | 600 ++ contrib/jemalloc/src/prof_stats.c | 57 + contrib/jemalloc/src/prof_sys.c | 669 +++ contrib/jemalloc/src/psset.c | 385 ++ contrib/jemalloc/src/rtree.c | 75 +- contrib/jemalloc/src/safety_check.c | 16 +- contrib/jemalloc/src/san.c | 208 + contrib/jemalloc/src/san_bump.c | 104 + contrib/jemalloc/src/sc.c | 17 +- contrib/jemalloc/src/sec.c | 422 ++ contrib/jemalloc/src/stats.c | 794 ++- contrib/jemalloc/src/sz.c | 52 +- contrib/jemalloc/src/tcache.c | 1137 ++-- contrib/jemalloc/src/thread_event.c | 343 ++ contrib/jemalloc/src/ticker.c | 31 +- contrib/jemalloc/src/ticker.py | 15 + contrib/jemalloc/src/tsd.c | 75 +- contrib/jemalloc/src/witness.c | 44 +- lib/libc/stdlib/malloc/jemalloc/Makefile.inc | 12 +- .../jemalloc/internal/jemalloc_internal_defs.h | 91 +- .../include/jemalloc/internal/jemalloc_preamble.h | 54 +- .../include/jemalloc/internal/private_namespace.h | 481 +- .../include/jemalloc/internal/public_namespace.h | 4 +- .../malloc/jemalloc/include/jemalloc/jemalloc.h | 69 +- .../jemalloc/include/jemalloc/jemalloc_FreeBSD.h | 10 +- .../jemalloc/include/jemalloc/jemalloc_defs.h | 55 + 218 files changed, 47956 insertions(+), 12362 deletions(-) diff --cc contrib/jemalloc/FREEBSD-upgrade index d3173b9d1f36,000000000000..fcb66ea71786 mode 100755,000000..100755 --- a/contrib/jemalloc/FREEBSD-upgrade +++ b/contrib/jemalloc/FREEBSD-upgrade @@@ -1,189 -1,0 +1,91 @@@ +#!/bin/sh - # - # Usage: cd /usr/src/contrib/jemalloc - # ./FREEBSD-upgrade [args] - # - # At least the following ports are required when importing jemalloc: - # - devel/autoconf - # - devel/git - # - devel/gmake - # - textproc/docbook-xsl - # - textproc/libxslt - # - # The normal workflow for importing a new release is: - # - # cd /usr/src/contrib/jemalloc - # - # Merge local changes that were made since the previous import: - # - # ./FREEBSD-upgrade merge-changes - # ./FREEBSD-upgrade rediff - # - # Extract latest jemalloc release. - # - # ./FREEBSD-upgrade extract - # - # Fix patch conflicts as necessary, then regenerate diffs to update line - # offsets: - # - # ./FREEBSD-upgrade rediff - # ./FREEBSD-upgrade extract - # - # Do multiple buildworld/installworld rounds. If problems arise and patches - # are needed, edit the code in ${work} as necessary, then: - # - # ./FREEBSD-upgrade rediff - # ./FREEBSD-upgrade extract - # - # The rediff/extract order is important because rediff saves the local - # changes, then extract blows away the work tree and re-creates it with the - # diffs applied. - # - # Finally, to clean up: - # - # ./FREEBSD-upgrade clean + - set -e - set -x ++# Note: you need docbook installed, as well as gmake (we need it to ++# make private_namespace.h) + - if [ ! -x "FREEBSD-upgrade" ] ; then - echo "Run from within src/contrib/jemalloc/" >&2 - exit 1 - fi ++# git subtree merge -- not committed at this time. ++ git subtree merge -P contrib/jemalloc vendor/jemalloc ++cd contrib/jemalloc + - if [ "x${JEMALLOC_REPO}" = "x" ] ; then - JEMALLOC_REPO=https://github.com/jemalloc/jemalloc.git - fi ++# Gut the tests, since they take up too much space. ++# Everything else can stay, but if not, add more to trim (there's ++# always a trade off between time and saved size. ++git rm -rf test msvc ++git commit --amend + - src=`pwd` ++# kill the tests with empty files so we don't have to hack configure.ac ++mkdir -p test/include/test ++touch test/include/test/jemalloc_test_defs.h.in ++touch test/include/test/jemalloc_test.h.in ++echo 'exit 0' > test/test.sh.in + - jemalloc_tmp="jemalloc.tmp" - tmpdir="${src}/../${jemalloc_tmp}" - bare_repo="${tmpdir}/jemalloc_bare.git" - work="jemalloc_work.git" - work_repo="${tmpdir}/${work}" - namespace_repo="${tmpdir}/jemalloc_namespace.git" - changes="${src}/FREEBSD-changes" - - do_fetch() { - local rev=$1 - if [ ! -d "${bare_repo}" ] ; then - mkdir -p "${bare_repo}" - git clone --bare ${JEMALLOC_REPO} ${bare_repo} - fi - ( - cd ${bare_repo} - git fetch origin ${rev} - ) - } ++# Reconfigure -- needed only to regenerate the .h files... We don't ++# use all the files generated. ++# ++# Also note: 5.2 lacks --with-lg-page-sizes, but 5.3 has it. ++# Also, there's got to be a way to not hard-wire version / hash. ++./autogen.sh --enable-xmalloc --enable-fill --enable-lazy-lock --enable-stats \ ++ --enable-utrace --with-malloc-conf=abort_conf:false \ ++ --with-xslroot=/usr/local/share/xsl/docbook --with-private-namespace=__ \ ++ --with-lg-page-sizes=12,13,14,15,16 \ ++ --with-version=5.3.0-0-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c + - do_extract_helper() { - local rev=$1 - local repo=$2 - do_fetch ${rev} - rm -rf ${repo} - git clone ${bare_repo} ${repo} - ( - cd ${repo} - if [ "x${rev}" != "x" ] ; then - # Use optional rev argument to check out a revision other than HEAD on - # master. - git checkout ${rev} - fi - ) - } ++# Copy over the important generated .h files in configure ++cp ./include/jemalloc/jemalloc.h ../../lib/libc/stdlib/malloc/jemalloc/include/jemalloc ++git add ../../lib/libc/stdlib/malloc/jemalloc/include/jemalloc/jemalloc.h ++cp ./include/jemalloc/jemalloc_defs.h ../../lib/libc/stdlib/malloc/jemalloc/include/jemalloc ++git add ../../lib/libc/stdlib/malloc/jemalloc/include/jemalloc/jemalloc_defs.h + - do_autogen() { - ./autogen.sh --enable-xmalloc --enable-utrace \ - --with-malloc-conf=abort_conf:false \ - --with-xslroot=/usr/local/share/xsl/docbook --with-private-namespace=__ \ - --with-lg-page-sizes=12,13,14,16 - } ++# need to make the namespace .h files, and copy a small subset into the tree ++# These are super-awkward to generate at buildworld time. Also, we assume we ++# only have to make one of these (currently true due to current unlikely to ++# change dependencies. ++gmake include/jemalloc/internal/private_namespace.h ++for i in private_namespace.h jemalloc_internal_defs.h public_namespace.h jemalloc_preamble.h; do ++ cp include/jemalloc/internal/$i ../../lib/libc/stdlib/malloc/jemalloc/include/jemalloc/internal/ ++ git add ../../lib/libc/stdlib/malloc/jemalloc/include/jemalloc/internal/$i ++ rm include/jemalloc/internal/$i ++done ++# OK, commit all the generated files ++git add VERSION ++git commit --amend + - do_extract_diff() { - local rev=$1 - local repo=$2 - do_extract_helper ${rev} ${repo} - ( - cd ${repo} - # Apply diffs before generating files. - patch -p1 < "${src}/FREEBSD-diffs" - find . -name '*.orig' -delete - # Generate files. - do_autogen - gmake dist - ) - } ++# Clean up the mess ++git clean -f . + - do_extract_namespace() { - local rev=$1 - local repo=$2 - do_extract_helper ${rev} ${repo} - ( - cd ${repo} - # Generate files. - do_autogen - gmake include/jemalloc/internal/private_namespace.h - ) - } ++# Save the cheat sheet ++cp ~/jemalloc-upd FREEBSD-upgrade ++git add FREEBSD-upgrade ++git commit --amend + - do_extract() { - local rev=$1 - do_fetch ${rev} - do_extract_diff ${rev} ${work_repo} - do_extract_namespace ${rev} ${namespace_repo} - } ++# Remove hash.c from lib/libc/stdlib/malloc/jemalloc/Makefile.inc ++# mutex_pool.c prng.c ++# Add ++# bin_info.c san.c san_bump.c counter.c prof_data.c prof_log.c prof_recent.c prof_stats.c prof_sys.c ++# emap.c edata.c edata_cache.c pa.c pa_extra.c pac.c decay.c hpa.c hpa_hooks.c fxp.c hpdata.c pai.c ++# ecache.c ehooks.c eset.c sec.c cache_bin.c peak_event.c psset.c inspect.c exp_grow.c thread_event.c ++# + - do_diff() { - ( - cd ${work_repo} - find . -name '*.orig' -delete - find . -name '*.rej' -delete - git add -A - git diff --cached - ) > FREEBSD-diffs - } ++# Manually comment out the following in lib/libc/stdlib/malloc/jemalloc/include/jemalloc/jemalloc.h ++# /* #define JEMALLOC_HAVE_ATTR_FORMAT_GNU_PRINTF */ ++# Add ++# #define JEMALLOC_OVERRIDE_VALLOC ++# and #include "jemalloc_FreeBSD.h" ++# With some adjustments to the old jemalloc_FreeBSD.h, but git can help + - command=$1 - shift - case "${command}" in - merge-changes) # Merge local changes that were made since the previous import. - rev=`cat VERSION |tr 'g' ' ' |awk '{print $2}'` - # Extract code corresponding to most recent import. - do_extract ${rev} - # Compute local differences to the upstream+patches and apply them. - ( - cd ${tmpdir} - diff -ru -X ${src}/FREEBSD-Xlist ${work} ../jemalloc > ${changes} || true - ) - ( - cd ${work_repo} - patch -p1 < ${changes} || true - find . -name '*.orig' -delete - ) - # Update diff. - do_diff - ;; - extract) # Extract upstream sources, apply patches, copy to contrib/jemalloc. - rev=$1 - do_extract ${rev} - # Delete existing files so that cruft doesn't silently remain. - rm -rf ChangeLog COPYING VERSION doc include src - # Copy files over. - tar cf - -C ${work_repo} -X FREEBSD-Xlist . |tar xvf - - internal_dir="include/jemalloc/internal" - grep -v ' isthreaded ' \ - "${namespace_repo}/${internal_dir}/private_namespace.h" \ - > "${internal_dir}/private_namespace.h" - ;; - rediff) # Regenerate diffs based on working tree. - do_diff - ;; - clean) # Remove working tree and temporary files. - rm -rf ${tmpdir} ${changes} - ;; - *) - echo "Unsupported command: \"${command}\"" >&2 - exit 1 - ;; - esac ++# Had to manually remove ++# -#define __malloc_options_1_0 JEMALLOC_N(__malloc_options_1_0) ++# -#define _malloc_first_thread JEMALLOC_N(_malloc_first_thread) ++# -#define __malloc_message_1_0 JEMALLOC_N(__malloc_message_1_0) ++# -#define isthreaded JEMALLOC_N(isthreaded) ++# ++# Also had to remove the following to fix jemalloc 3 ABI compat ++# -#define je_allocm JEMALLOC_N(je_allocm) ++# -#define je_dallocm JEMALLOC_N(je_dallocm) ++# -#define je_nallocm JEMALLOC_N(je_nallocm) ++# -#define je_rallocm JEMALLOC_N(je_rallocm) ++# -#define je_sallocm JEMALLOC_N(je_sallocm) ++# Without the diff you end up with non-exported _je_je*allocm symbols. With you get symbols of the form: ++# 365: 000000000018e2a0 406 FUNC WEAK DEFAULT 14 rallocm@FBSD_1.3 (5) ++# 657: 000000000018e2a0 406 FUNC GLOBAL DEFAULT 14 __rallocm@FBSD_1.3 (5) ++# diff --cc contrib/jemalloc/INSTALL.md index b8f729b0d790,000000000000..9701364041c8 mode 100644,000000..100644 --- a/contrib/jemalloc/INSTALL.md +++ b/contrib/jemalloc/INSTALL.md @@@ -1,421 -1,0 +1,849 @@@ ++<<<<<<< HEAD ++Building and installing a packaged release of jemalloc can be as simple as ++typing the following while in the root directory of the source tree: ++ ++ ./configure ++ make ++ make install ++ ++If building from unpackaged developer sources, the simplest command sequence ++that might work is: ++ ++ ./autogen.sh ++ make ++ make install ++ ++You can uninstall the installed build artifacts like this: ++ ++ make uninstall ++ ++Notes: ++ - "autoconf" needs to be installed ++ - Documentation is built by the default target only when xsltproc is ++available. Build will warn but not stop if the dependency is missing. ++ ++ ++## Advanced configuration ++ ++The 'configure' script supports numerous options that allow control of which ++functionality is enabled, where jemalloc is installed, etc. Optionally, pass ++any of the following arguments (not a definitive list) to 'configure': ++ ++* `--help` ++ ++ Print a definitive list of options. ++ ++* `--prefix=` ++ ++ Set the base directory in which to install. For example: ++ ++ ./configure --prefix=/usr/local ++ ++ will cause files to be installed into /usr/local/include, /usr/local/lib, ++ and /usr/local/man. ++ ++* `--with-version=(..--g|VERSION)` ++ ++ The VERSION file is mandatory for successful configuration, and the ++ following steps are taken to assure its presence: ++ 1) If --with-version=..--g is specified, ++ generate VERSION using the specified value. ++ 2) If --with-version is not specified in either form and the source ++ directory is inside a git repository, try to generate VERSION via 'git ++ describe' invocations that pattern-match release tags. ++ 3) If VERSION is missing, generate it with a bogus version: ++ 0.0.0-0-g0000000000000000000000000000000000000000 ++ ++ Note that --with-version=VERSION bypasses (1) and (2), which simplifies ++ VERSION configuration when embedding a jemalloc release into another ++ project's git repository. ++ ++* `--with-rpath=` ++ ++ Embed one or more library paths, so that libjemalloc can find the libraries ++ it is linked to. This works only on ELF-based systems. ++ ++* `--with-mangling=` ++ ++ Mangle public symbols specified in which is a comma-separated list of ++ name:mangled pairs. ++ ++ For example, to use ld's --wrap option as an alternative method for ++ overriding libc's malloc implementation, specify something like: ++ ++ --with-mangling=malloc:__wrap_malloc,free:__wrap_free[...] ++ ++ Note that mangling happens prior to application of the prefix specified by ++ --with-jemalloc-prefix, and mangled symbols are then ignored when applying ++ the prefix. ++ ++* `--with-jemalloc-prefix=` ++ ++ Prefix all public APIs with . For example, if is ++ "prefix_", API changes like the following occur: ++ ++ malloc() --> prefix_malloc() ++ malloc_conf --> prefix_malloc_conf ++ /etc/malloc.conf --> /etc/prefix_malloc.conf ++ MALLOC_CONF --> PREFIX_MALLOC_CONF ++ ++ This makes it possible to use jemalloc at the same time as the system ++ allocator, or even to use multiple copies of jemalloc simultaneously. ++ ++ By default, the prefix is "", except on OS X, where it is "je_". On OS X, ++ jemalloc overlays the default malloc zone, but makes no attempt to actually ++ replace the "malloc", "calloc", etc. symbols. ++ ++* `--without-export` ++ ++ Don't export public APIs. This can be useful when building jemalloc as a ++ static library, or to avoid exporting public APIs when using the zone ++ allocator on OSX. ++ ++* `--with-private-namespace=` ++ ++ Prefix all library-private APIs with je_. For shared libraries, ++ symbol visibility mechanisms prevent these symbols from being exported, but ++ for static libraries, naming collisions are a real possibility. By ++ default, is empty, which results in a symbol prefix of je_ . ++ ++* `--with-install-suffix=` ++ ++ Append to the base name of all installed files, such that multiple ++ versions of jemalloc can coexist in the same installation directory. For ++ example, libjemalloc.so.0 becomes libjemalloc.so.0. ++ ++* `--with-malloc-conf=` ++ ++ Embed `` as a run-time options string that is processed prior to ++ the malloc_conf global variable, the /etc/malloc.conf symlink, and the ++ MALLOC_CONF environment variable. For example, to change the default decay ++ time to 30 seconds: ++ ++ --with-malloc-conf=decay_ms:30000 ++ ++* `--enable-debug` ++ ++ Enable assertions and validation code. This incurs a substantial ++ performance hit, but is very useful during application development. ++ ++* `--disable-stats` ++ ++ Disable statistics gathering functionality. See the "opt.stats_print" ++ option documentation for usage details. ++ ++* `--enable-prof` ++ ++ Enable heap profiling and leak detection functionality. See the "opt.prof" ++ option documentation for usage details. When enabled, there are several ++ approaches to backtracing, and the configure script chooses the first one ++ in the following list that appears to function correctly: ++ ++ + libunwind (requires --enable-prof-libunwind) ++ + libgcc (unless --disable-prof-libgcc) ++ + gcc intrinsics (unless --disable-prof-gcc) ++ ++* `--enable-prof-libunwind` ++ ++ Use the libunwind library (http://www.nongnu.org/libunwind/) for stack ++ backtracing. ++ ++* `--disable-prof-libgcc` ++ ++ Disable the use of libgcc's backtracing functionality. ++ ++* `--disable-prof-gcc` ++ ++ Disable the use of gcc intrinsics for backtracing. ++ ++* `--with-static-libunwind=` ++ ++ Statically link against the specified libunwind.a rather than dynamically ++ linking with -lunwind. ++ ++* `--disable-fill` ++ ++ Disable support for junk/zero filling of memory. See the "opt.junk" and ++ "opt.zero" option documentation for usage details. ++ ++* `--disable-zone-allocator` ++ ++ Disable zone allocator for Darwin. This means jemalloc won't be hooked as ++ the default allocator on OSX/iOS. ++ ++* `--enable-utrace` ++ ++ Enable utrace(2)-based allocation tracing. This feature is not broadly ++ portable (FreeBSD has it, but Linux and OS X do not). ++ ++* `--enable-xmalloc` ++ ++ Enable support for optional immediate termination due to out-of-memory ++ errors, as is commonly implemented by "xmalloc" wrapper function for malloc. ++ See the "opt.xmalloc" option documentation for usage details. ++ ++* `--enable-lazy-lock` ++ ++ Enable code that wraps pthread_create() to detect when an application ++ switches from single-threaded to multi-threaded mode, so that it can avoid ++ mutex locking/unlocking operations while in single-threaded mode. In ++ practice, this feature usually has little impact on performance unless ++ thread-specific caching is disabled. ++ ++* `--disable-cache-oblivious` ++ ++ Disable cache-oblivious large allocation alignment by default, for large ++ allocation requests with no alignment constraints. If this feature is ++ disabled, all large allocations are page-aligned as an implementation ++ artifact, which can severely harm CPU cache utilization. However, the ++ cache-oblivious layout comes at the cost of one extra page per large ++ allocation, which in the most extreme case increases physical memory usage ++ for the 16 KiB size class to 20 KiB. ++ ++* `--disable-syscall` ++ ++ Disable use of syscall(2) rather than {open,read,write,close}(2). This is ++ intended as a workaround for systems that place security limitations on ++ syscall(2). ++ ++* `--disable-cxx` ++ ++ Disable C++ integration. This will cause new and delete operator ++ implementations to be omitted. ++ ++* `--with-xslroot=` ++ ++ Specify where to find DocBook XSL stylesheets when building the ++ documentation. ++ ++* `--with-lg-page=` ++ ++ Specify the base 2 log of the allocator page size, which must in turn be at ++ least as large as the system page size. By default the configure script ++ determines the host's page size and sets the allocator page size equal to ++ the system page size, so this option need not be specified unless the ++ system page size may change between configuration and execution, e.g. when ++ cross compiling. ++ ++* `--with-lg-hugepage=` ++ ++ Specify the base 2 log of the system huge page size. This option is useful ++ when cross compiling, or when overriding the default for systems that do ++ not explicitly support huge pages. ++ ++* `--with-lg-quantum=` ++ ++ Specify the base 2 log of the minimum allocation alignment. jemalloc needs ++ to know the minimum alignment that meets the following C standard ++ requirement (quoted from the April 12, 2011 draft of the C11 standard): ++ ++ > The pointer returned if the allocation succeeds is suitably aligned so ++ that it may be assigned to a pointer to any type of object with a ++ fundamental alignment requirement and then used to access such an object ++ or an array of such objects in the space allocated [...] ++ ++ This setting is architecture-specific, and although jemalloc includes known ++ safe values for the most commonly used modern architectures, there is a ++ wrinkle related to GNU libc (glibc) that may impact your choice of ++ . On most modern architectures, this mandates 16-byte ++ alignment (=4), but the glibc developers chose not to meet this ++ requirement for performance reasons. An old discussion can be found at ++ . Unlike glibc, ++ jemalloc does follow the C standard by default (caveat: jemalloc ++ technically cheats for size classes smaller than the quantum), but the fact ++ that Linux systems already work around this allocator noncompliance means ++ that it is generally safe in practice to let jemalloc's minimum alignment ++ follow glibc's lead. If you specify `--with-lg-quantum=3` during ++ configuration, jemalloc will provide additional size classes that are not ++ 16-byte-aligned (24, 40, and 56). ++ ++* `--with-lg-vaddr=` ++ ++ Specify the number of significant virtual address bits. By default, the ++ configure script attempts to detect virtual address size on those platforms ++ where it knows how, and picks a default otherwise. This option may be ++ useful when cross-compiling. ++ ++* `--disable-initial-exec-tls` ++ ++ Disable the initial-exec TLS model for jemalloc's internal thread-local ++ storage (on those platforms that support explicit settings). This can allow ++ jemalloc to be dynamically loaded after program startup (e.g. using dlopen). ++ Note that in this case, there will be two malloc implementations operating ++ in the same process, which will almost certainly result in confusing runtime ++ crashes if pointers leak from one implementation to the other. ++ ++* `--disable-libdl` ++ ++ Disable the usage of libdl, namely dlsym(3) which is required by the lazy ++ lock option. This can allow building static binaries. ++ ++The following environment variables (not a definitive list) impact configure's ++behavior: ++ ++* `CFLAGS="?"` ++* `CXXFLAGS="?"` ++ ++ Pass these flags to the C/C++ compiler. Any flags set by the configure ++ script are prepended, which means explicitly set flags generally take ++ precedence. Take care when specifying flags such as -Werror, because ++ configure tests may be affected in undesirable ways. ++ ++* `EXTRA_CFLAGS="?"` ++* `EXTRA_CXXFLAGS="?"` ++ ++ Append these flags to CFLAGS/CXXFLAGS, without passing them to the ++ compiler(s) during configuration. This makes it possible to add flags such ++ as -Werror, while allowing the configure script to determine what other ++ flags are appropriate for the specified configuration. ++ ++* `CPPFLAGS="?"` ++ ++ Pass these flags to the C preprocessor. Note that CFLAGS is not passed to ++ 'cpp' when 'configure' is looking for include files, so you must use ++ CPPFLAGS instead if you need to help 'configure' find header files. ++ ++* `LD_LIBRARY_PATH="?"` ++ ++ 'ld' uses this colon-separated list to find libraries. ++ ++* `LDFLAGS="?"` ++ ++ Pass these flags when linking. ++ ++* `PATH="?"` ++ ++ 'configure' uses this to find programs. ++ ++In some cases it may be necessary to work around configuration results that do ++not match reality. For example, Linux 4.5 added support for the MADV_FREE flag ++to madvise(2), which can cause problems if building on a host with MADV_FREE ++support and deploying to a target without. To work around this, use a cache ++file to override the relevant configuration variable defined in configure.ac, ++e.g.: ++ ++ echo "je_cv_madv_free=no" > config.cache && ./configure -C ++ ++ ++## Advanced compilation ++ ++To build only parts of jemalloc, use the following targets: ++ ++ build_lib_shared ++ build_lib_static ++ build_lib ++ build_doc_html ++ build_doc_man ++ build_doc ++ ++To install only parts of jemalloc, use the following targets: ++ ++ install_bin ++ install_include ++ install_lib_shared ++ install_lib_static ++ install_lib_pc ++ install_lib ++ install_doc_html ++ install_doc_man ++ install_doc ++ ++To clean up build results to varying degrees, use the following make targets: ++ ++ clean ++ distclean ++ relclean ++ ++ ++## Advanced installation ++ ++Optionally, define make variables when invoking make, including (not ++exclusively): ++ ++* `INCLUDEDIR="?"` ++ ++ Use this as the installation prefix for header files. ++ ++* `LIBDIR="?"` ++ ++ Use this as the installation prefix for libraries. ++ ++* `MANDIR="?"` ++ ++ Use this as the installation prefix for man pages. ++ ++* `DESTDIR="?"` ++ ++ Prepend DESTDIR to INCLUDEDIR, LIBDIR, DATADIR, and MANDIR. This is useful ++ when installing to a different path than was specified via --prefix. ++ ++* `CC="?"` ++ ++ Use this to invoke the C compiler. ++ ++* `CFLAGS="?"` ++ ++ Pass these flags to the compiler. ++ ++* `CPPFLAGS="?"` ++ ++ Pass these flags to the C preprocessor. ++ ++* `LDFLAGS="?"` ++ ++ Pass these flags when linking. ++ ++* `PATH="?"` ++ ++ Use this to search for programs used during configuration and building. ++ ++ ++## Development ++ ++If you intend to make non-trivial changes to jemalloc, use the 'autogen.sh' ++script rather than 'configure'. This re-generates 'configure', enables ++configuration dependency rules, and enables re-generation of automatically ++generated source files. ++ ++The build system supports using an object directory separate from the source ++tree. For example, you can create an 'obj' directory, and from within that ++directory, issue configuration and build commands: ++ ++ autoconf ++ mkdir obj ++ cd obj ++ ../configure --enable-autogen ++ make ++ ++ ++## Documentation ++ ++The manual page is generated in both html and roff formats. Any web browser ++can be used to view the html manual. The roff manual page can be formatted ++prior to installation via the following command: ++ ++ nroff -man -t doc/jemalloc.3 ++||||||| dec341af7695 ++======= +Building and installing a packaged release of jemalloc can be as simple as +typing the following while in the root directory of the source tree: + + ./configure + make + make install + +If building from unpackaged developer sources, the simplest command sequence +that might work is: + + ./autogen.sh + make dist + make + make install + *** 43131 LINES SKIPPED *** From nobody Fri Aug 15 21:58:32 2025 X-Original-To: dev-commits-src-main@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 4c3bbD3nMdz64MZG; Fri, 15 Aug 2025 21:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3bbD1Mbhz3hB0; Fri, 15 Aug 2025 21:58:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755295112; 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=t91K1VJGFqcPDLrdO6E6u0Ol/LUuFUvvmQSOwBAWSpU=; b=DNet/oY6cw+3faJ0x5NTs2S1W+FrnoZrLvIR1k2iGpNKc1Gyyw05FCROCAMprVMaV8JSfo GrfuxMamxaw2yX4+G02JixmOL59c1Cjpmr0uF5zfrDqiLZ/0mSHCh2OfC1gdE8MqCYjZyD qQE2hZDgvkBn63Ao/q7UVyaZTlcv5nTRbI04naqCmT55ooVh35lmH3Q0ML6KmCKhW+Lowo oeEp/vdRuujY5yhxfeYUvBJ5nerflb4BgazbtMZNHtnq+1GxPPHj9SZrQWOcwV1Fs6FmMP fZizzPV2IMhAC0Fhe63la3cBTzobJkdPvsddvr31alOr/he1O6+uqFihyh1vmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755295112; 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=t91K1VJGFqcPDLrdO6E6u0Ol/LUuFUvvmQSOwBAWSpU=; b=Sgs46Gfm6NRtLbqfTBUrQyXoe4NBSQaF5r2MWz3lWsLVzpYhvuOJR5OjTpdq+anDxwAja8 wVyXovlobFaZFgwVHtiGNDZ8nmdcyV51NXuYbCPXxygzGz3pB91aXOxk7HL2W2cHcQj6RU /LVVEDK00mx7Uwc39C8abSpA5X1ek2R/rx2h9F2XxSRzYvp0ov/GxqKCUpPiGW0TqVvTWK CL+VlqIWk6SQFNIQiLxe68NhMnFPlemQuv0m6XliWA4fCq5ibmj48nzMXmqgSiyOo3e4SU MRK7H9wG+4DuK7+avfrgjE4ckA3pyNvCgxWkpDEMprOddMn2M0OoRmFoWI58hQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755295112; a=rsa-sha256; cv=none; b=hT3NCh2E+wY891lpve1VC8siyl/aUJLY2fUbNkIgD/02FT+OK5DRsM9vbme0BKSc8xoua8 TJkAEE+R0FGA1tclRXq0FvGkMmg7zEDsxHgrhzwy4QU0BrchrUbEY9lWBrQHqYvcQLhDh+ c5o24WIJemtya4onpQ2x2XsFEPcIq7zPYweBAqJcrdoD8WBkyKxDINBZ50bJN/dsTuTueC dUaxbPaXypr0nuteA9ZfsWCe/7imnLnMKzgn71i4xyzuwttT4MzLSZdwOgW58AZ+RelkDy ZcpEqbDqZVs9lMR58hgz9cejt7u4i73XQHhRo0TSiOYIp7XTjUkJVM3tqcbeog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c3bbD0tnNzwFt; Fri, 15 Aug 2025 21:58: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 57FLwWY5043459; Fri, 15 Aug 2025 21:58:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FLwW5X043456; Fri, 15 Aug 2025 21:58:32 GMT (envelope-from git) Date: Fri, 15 Aug 2025 21:58:32 GMT Message-Id: <202508152158.57FLwW5X043456@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: 69af14a57c9e - main - jemalloc: Note update in UPDATING and RELNOTES List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 69af14a57c9ea201904e9ef0e7521af5ae0e06ef Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=69af14a57c9ea201904e9ef0e7521af5ae0e06ef commit 69af14a57c9ea201904e9ef0e7521af5ae0e06ef Author: Warner Losh AuthorDate: 2025-08-15 21:57:59 +0000 Commit: Warner Losh CommitDate: 2025-08-15 21:57:59 +0000 jemalloc: Note update in UPDATING and RELNOTES Sponsored by: Netflix --- RELNOTES | 4 ++++ UPDATING | 3 +++ 2 files changed, 7 insertions(+) diff --git a/RELNOTES b/RELNOTES index 040c33b7b89c..6e962d2df910 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,10 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +c43cad871720: + jemalloc 5.3.0 has landed. See contrib/jemalloc/ChangeLog + for the long list of changes. + cce64f2e6851: Add support for the NFSv4.2 Clone operation, which uses block cloning to "copy on write" files on an NFS server. diff --git a/UPDATING b/UPDATING index 587ad2f93cf2..43d9835e2af5 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250815: + jemalloc 5.3.0 has been committed to the tree. + 20250815: The removal of Secure RPC DES authentication notced in 20250810 has been reverted. (However, it is still non-functional.) From nobody Fri Aug 15 22:07:22 2025 X-Original-To: dev-commits-src-main@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 4c3bnh1LCZz64Mdh; Fri, 15 Aug 2025 22:07:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4c3bnf70cbz3lFB; Fri, 15 Aug 2025 22:07:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="No valid SPF, No valid DKIM" header.from=gmail.com (policy=none); spf=softfail (mx1.freebsd.org: 2001:470:d5e7:1::1 is neither permitted nor denied by domain of kostikbel@gmail.com) smtp.mailfrom=kostikbel@gmail.com Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 57FM7M9U036711; Sat, 16 Aug 2025 01:07:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 57FM7M9U036711 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 57FM7MoU036710; Sat, 16 Aug 2025 01:07:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 16 Aug 2025 01:07:22 +0300 From: Konstantin Belousov To: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, srcmgr@freebsd.org Subject: Re: git: 7ac276298b72 - main - Remove Secure RPC DES authentication Message-ID: References: <202508101537.57AFbHrI067216@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.90 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.90)[-0.896]; DMARC_POLICY_SOFTFAIL(0.10)[gmail.com : No valid SPF, No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; ARC_NA(0.00)[]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; R_SPF_SOFTFAIL(0.00)[~all]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4c3bnf70cbz3lFB On Fri, Aug 15, 2025 at 06:02:39PM +0100, Lexi Winter wrote: > Konstantin Belousov: > > The commit breaks libc ABI and must be reverted. > > This email is the formal request to do so. > > > To make it clear: despite the presence of symcompat versions, there is > > no justification to remove the implementation. Default version for > > symbols might be removed, but the implementation shall be left alone. > > okay, done. Thank you. > however, unless i removed more than i intended, none of > this code works since it relies on keyserv (which was removed months > ago), so it's basically dead code. It depends on what user might do with its system. Also, unless I mis-remember, the removal caused issues for linking xserver, am I right? > > > This is how we handle all other cases of obsoleted interfaces, gets() > > being the exemplary case. > > this is a little different from gets, since gets still worked even after > the public interface was removed. The definition of 'worked' might vary. From nobody Fri Aug 15 22:21:51 2025 X-Original-To: dev-commits-src-main@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 4c3c673Vxkz64NWl; Fri, 15 Aug 2025 22:21: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3c6725jXz3ntL; Fri, 15 Aug 2025 22:21:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755296511; 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=uShPUvsFIq6PVQ94BpvH3nUPuyfmPbL40Ee06Z8Qw4w=; b=WHZotnMiphU4Fh8VPjSdtNb3eP5lVQr/zbZNiOgCPFeP/hZwSbrOjkEfekiOk3W+U8WZwP +mjWQduRQapd7MpKFEre9pX06KxEjHBwpjObYuT6aRA9pJd6RGV5RjhQIVetaUp3OCSesb FrMmhNdsjza870q73M251kZqdXdaXzLQXqGRsolygB5aWjRp+/l6bkwoh0Nt3lPTlU9VkN Wbqu21P8fdl9sgekLIn0PNciwZtAx3X6/L0IwFQkBR/g3Xb3cxHXdbSGmZlU+IC70LLOhn T8UKR2SWKAbRBMxlrLvjYkLsdTXzDa0apxxbqqmzAW21gTpz6e49HJw5hrYtcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755296511; 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=uShPUvsFIq6PVQ94BpvH3nUPuyfmPbL40Ee06Z8Qw4w=; b=xgfkEGMI4NJaDWqaHj11lukwTWE/P/XAbStJyQ6kr7H+u2qMck3BxPNpUlRIwanGJgq58L A5F1UpyKniBw8xU6XiLQWuxbNK6lfTMWtyF5VuRJSyIwiRrqjthxz0QXban4BCSlSjep7o QA0cCJWKszzF50vnW6Qzoqyz5vkPcIAKfVweQ7M+DEgagTG7s4s1cfY3mfw/FbizRzmcdz d8Q7loakJ5tDw/R47rVaPJ/Kn/8x3cTR01VLYAFWUhT2Ldv0nBFMqWUR1M5e0q89FRzHWz rRgDf4qicxQiZXyrmOtaCI7vSa2kxE+ea6sIG+X55U67+uL2/nEvae0P/BJBpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755296511; a=rsa-sha256; cv=none; b=GpZp1rYw5n1nz/4MK3EK3h2KJY+t+0g2b4NlmstiAJtQDtvMsNr5GnLn+05KhrfVOtuDZA 0sZGMhU1kHp5t1aHHmsYynxt90tVyXP5MebDek1/c5cc+aD9/8Ww4/AyPzzyP+MLafEWEz huZPSdw3N61qZ2A+s7TBjBzZ1Fg3OAJZEJfg9ZzcQH7/Ot8URwxgeSYdMQtTJIiBpw8/2L OvE/6Lt5mGu4QnCuGfyGNSKryRkHrHVA+Z1SKsXcZyKxRcxyo6k52713XFLwMuJdPHlRNF AIuxfzYLluGonfEWG429adyEMpvg7PBZjrRzKmCmVcmZbgRlPlctiNftfCZFDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c3c671Wy4zxC0; Fri, 15 Aug 2025 22:21: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 57FMLp86096169; Fri, 15 Aug 2025 22:21:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FMLpPL096166; Fri, 15 Aug 2025 22:21:51 GMT (envelope-from git) Date: Fri, 15 Aug 2025 22:21:51 GMT Message-Id: <202508152221.57FMLpPL096166@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 6118587172ba - main - rtld-elf: Fix VDSO Obj_Entry mapsize and report in utrace(2) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6118587172babee538fb8e461b9a607ea987e342 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=6118587172babee538fb8e461b9a607ea987e342 commit 6118587172babee538fb8e461b9a607ea987e342 Author: Jessica Clarke AuthorDate: 2025-08-15 22:21:35 +0000 Commit: Jessica Clarke CommitDate: 2025-08-15 22:21:35 +0000 rtld-elf: Fix VDSO Obj_Entry mapsize and report in utrace(2) Subtracing addr is only appropriate for position-dependent objects, where vaddrbase would also be the same value. For position-independent objects, like the VDSO (which we already assume due to setting vaddrbase to 0), the segments start at 0, not addr. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D51924 --- libexec/rtld-elf/rtld.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index 17196f55c271..8977d5947010 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -3031,7 +3031,7 @@ load_kpreload(const void *addr) } obj->mapbase = __DECONST(caddr_t, addr); - obj->mapsize = segn->p_vaddr + segn->p_memsz - (Elf_Addr)addr; + obj->mapsize = segn->p_vaddr + segn->p_memsz; obj->vaddrbase = 0; obj->relocbase = obj->mapbase; @@ -3060,7 +3060,8 @@ load_kpreload(const void *addr) linkmap_add(obj); /* for GDB & dlinfo() */ max_stack_flags |= obj->stack_flags; - LD_UTRACE(UTRACE_LOAD_OBJECT, obj, obj->mapbase, 0, 0, obj->path); + LD_UTRACE(UTRACE_LOAD_OBJECT, obj, obj->mapbase, obj->mapsize, 0, + obj->path); return (0); } From nobody Fri Aug 15 22:30:28 2025 X-Original-To: dev-commits-src-main@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 4c3cJB0mkDz64PR5; Fri, 15 Aug 2025 22:30:34 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3cJ95GVGz3q7c; Fri, 15 Aug 2025 22:30:33 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755297033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=4nRCe7KoqJcZkqjeSp69z/YEJw+V0aeSTxAUR8atBbQ=; b=V7O9cm6PNfo5P1sbM5ERZ+OVsGDbV4u0TRyFIv421eDiNNhIuMTHnRjwRGAkX0IYt8NZWa XgOSkBBRHwPF9gtA8ATGfgVjU1uz/NpSLKs2/e5s+2Ggw90auQ5y/PSEUvm+5I/lbXG2MU H09SYt8YaFirOjgGMrab9kPJqyKnWsL8zbZGpWIM/yzgMJE+0HuaY5+7rGQM1KSFaciBxr HUxgEpMIsudwGv+vWaxBiqKNgaNhnw4UNSDtck9/8sw6ojYDuR4jvOhYsDNkbOm4Rw/C5l hUFA2mty7aDUV/PXgpF569EBNqcQLs/h5O3swPJvZiw1PtNcyu8NRNFfMR2pAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755297033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=4nRCe7KoqJcZkqjeSp69z/YEJw+V0aeSTxAUR8atBbQ=; b=Tbyd5QB2Apf5yEIuE+UMA6CmC8j1A502WbV2gsC7U4UK7LXQgflDEKcX1udMUV3tgE16ZJ +SzYdqqF4CFP4s/sbyqqQtKTofTcj1FVnbu4hF1ZLRa4e+6ZWFYf/zscMpLkd6rx+Fac8T X8sScnIh/D55OjzkUmstQ99xXCuN24YWPNKPIU0jyfdnDrUb1TqDWoCbZTxQj2tYfFe7Xs L02fXKr8svRY2shu0D/yY04sUpiDHtl3vzH0cZtV6WIFNs7jZU4JSz0zJUQz/tW4GjRb/W OYvav7ORqKYIgM2MXRJmujjajy1Edx65vZ7FUUcuRdwL7UckizsKOMdJaN/O+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755297033; a=rsa-sha256; cv=none; b=IdMAH+HHn7vlRBzAlwGfQCVrn4yS3xdZlJzrErYUGUcg4kvaxm5ETXyhcaYwZ3hobhks/x xouF3gQ15r6S3cddOUnO+9mV3S/Nqhgty4V2DqYVFQF+ByB+ehfEQaKkN1eooFUEQMU7xk YM7jJ+sFds/kGQN6TYLJGAsT4HVcp51w0T8CmDhwIa5ZkF4p7C7Ko5SEIZ/Q43LCkuvgzn JBnVX7XH+Y7AzBnxuiO4hCSkbcvYgow7iApnQPRrnvGYaXS7GDCGUycsdX0hhoqPgVZhtq gN8JJuW03yhpIu66aBLoQHNNEANuiL4I7pc9MKkqrQ5R/AYnSrqlawSwGEhBxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [10.192.0.6] (unknown [159.65.93.242]) (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 did not present a certificate) (Authenticated sender: fluffy) by smtp.freebsd.org (Postfix) with ESMTPSA id 4c3cJ82rb0zgG; Fri, 15 Aug 2025 22:30:32 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Message-ID: <64973a60-3419-48f0-8827-96a6be01337f@FreeBSD.org> Date: Sat, 16 Aug 2025 01:30:28 +0300 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 7ac276298b72 - main - Remove Secure RPC DES authentication To: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, srcmgr@freebsd.org References: <202508101537.57AFbHrI067216@gitrepo.freebsd.org> Content-Language: ru, en-GB From: Dima Panov Autocrypt: addr=fluffy@FreeBSD.org; keydata= xsFNBEp+xiUBEAD01RkOYcyzU/Fnam2FI7PPwYqW00SwVmfUHihvVniiaMwzaYzchb+mzSha NsqRgjIN/i59OBpnS25OXMLEpQP7jDJnY2xKyJN2H4qn1HPHkF9cYuqvqkm+r5459g+2ZoGY 9Sr1PA0XSzXJMSQ1nRK3cFfqlN/L2//P36U5VuOWXGZUTwr/n2B/N0HAsYsqDOdjofLg7x9z 8p8elqwJbT/O4ltg8JBVAnof+FzqefYW4CzqkHRjq/9ORiGYh14ST9ECsCaVpfdDUTor0wgp JqzCN1HsQcHqgdMmOqigWIgN7Eg4MRQU3LDCISrNJ/45zvcKUXR0RHOjnSuflYba74q58XhZ 4eCTqHeMHjA8st4IWRzy9l0V4RunnZxjOTb806jyIhdxcb2m8o5tXwsqjf0TQ7vYowDHrQ6g XlhPg4Jvvwf+BwlB2p+w7Cs/Y9QA0YHnIOIVZAwU1wv66YSI9IDL2AbnY2gQGx+dkHiC3S5L G8HcPrMcjayyThKKIi5KQsWa3snFeK5ky+cRpVEOPQfUXFOas++91v90Xe9j+lsmRofsyvuy gzoaZE2fud0kCsOgYEg+kiLPlQicNAx5IToOs8BrVFLcxmbPKuVBfbLdWsYLjXGzbXEmzV9f NDZ1r1uNmVema8YYCiNjUDZhxIfKt8nbp6cx8UgVLGRVDEfXeQARAQABzTdEaW1hIFBhbm92 IChGcmVlQlNELk9SRyBDb21taXR0ZXIpIDxmbHVmZnlARnJlZUJTRC5PUkc+wsF2BBMBAgAg BQJKfsYlAhsDBgsJCAcDAgQVAggDBBYCAwECHgECF4AACgkQ+4ugndU5jyk6dhAArHclTYjw VRjDnoRfO3Zfj9Ssab9Vrbo7DNFWeAqPE3OTCmiq9Q0fzRHzmhVyedYMm9qNA3i0J1De3KTn LanXOrBIqsmmZpSqmrp/xXdZngDLW5H6hpE0f2PeAPwxrb9uBQax8WMR7Z4STSHAP4GRjve3 0wNNS0MlawGllcs9VKRxG5PsDA8k3ACTSjdpQ76RWldORN4LA8M40yHRX377SGMzO+XsCeOw ad65GKyLrx+6Gnd3PMOjVCJCrqd04Jgqg9G0xKNImchwIZ5ulx9jAt+ixfNbY6hwslleqimr 2t5+MMqo6dRrvJ+BsR8NHt9vGi2Jy4+4smg05fR18fck0Sk4vCYyVvtvnOk3qZf0F8zJu06G cjWWC2ZbDPbmksWXFIMxoJbyVxK55xOqcFs0t12sR6gbVJb8Nb88WrQub3MgePyMF6R3Tkfa OqkjvQur1xC2AXESTxtJw1FkdGSb3UopNKgvSPHSLFW8B0LbyDxdYRTRWPGGEUhFP6tdXi5R vb1210ks2EQAqF4Cm3iRIhYgtZvQqQgMSiO9fVyeJ0U6dYGDtg2Boi+NtXKRdmtL7pRSnI3n fAbVJ05Hhd7PBnJeob6R08nHRo9DdAG7o8ToM+egUAuEsEvoRV+v4f6k3mShdxE7gG/anwVy eh3n6LGwg9KHDr1X2FODsLLxgUjOwU0ESn7GJQEQAMBTMHQgb0vcPMAiRvb357ihlh/YYA22 FXj4p3XTrDlBlRL0QCRq1I8XDeQmL3mG3s3NBtDXSefnNM06jZ3XCAfHIDBdxJJvQZZCXfvL p/JK7nnEuqoeqT6/oKs1MeZVdUnvh1nZhphs+Z6dl01GIE8YDpzT1JMD2f3G9PHChGi3Ddzq m3VdXt/87khYJkPbaf6EN5+vDthKgMjba8jwbQ+7IUPqkfnNFIZS6irZ2LYb79BLNI5JSl9l ReSfEX2d8ByQlLzuf0TS4voy3nWGeCyj6BIOMiRSxg+hZmJLYxhNkyK4GQVCt/rLT7dIfBQM syBbX0Qw2NOcfba9VgdPZBgdrawwB4/xF9SA3NB0J0lUjhjpH9iG8NxlpleEg8OSUApyFZEJ q2A/flns4kKzNH7AGYDOFORytDzA3qkgCJrZ7nzQSsdtZ2qbyAoze0tl+YrShJhOcmQBtFem omhWVeJ8T/Bw1KH8M1ihrENBTSzYzLvN18YjNP6P0Dh/7Zda5yYI8fNqd84K3Uq5xBiI0S6+ qxViw84z2tJj8TxiNqFAk7Tbeo2Ximtq7uQ9UnFRSK3jw96yi19KU9rQQZs0xUjN5gn/tF5l BZWKjwuZCkcOiI0EWHAR+ATAEsFNXcuoC9CAGK5HFW4nI4WtE3pv1KYvivlGtF1wzf0Qrhye RrmxABEBAAHCwV8EGAECAAkFAkp+xiUCGwwACgkQ+4ugndU5jymgKg//RvnI7zEDKv6nQUqK RyLawPTrCKCtQ2vSoWyTNgRB6byNS1w5wNSAMnqaESx2bdhauaxe167VEJYqgQy241yFslpC 6v/xlH25Ppos+Jg6AKaQG/JABHO6Co4tHtBbNmM+14HESxAodA4NJuEU19iIPjRhUKC8F8R9 xBmW1uLpPiljU9Km0P3EIKjAdtdZNeMLhwsbSHBwJROFrxFGiTzWNREWZoZpQxgSbHYhwYbx HEbJi1cybl9IQvSGHrysctZsxD04Jxh6ogaziiT8aV6ear6BNh008yRf61FvrinfG3USLR3i JO8aHap4QGCPjZ3cyT+DEq8/zVfDdeidTeNEhSgRKk856RcA+yAE79KYdKkvmDUiC8poAJ7F GEYHMB+g/1+LczCr2g9GYkiB/53boYfU9esYYlarxCgedCrwXv6T48FZ3xxoH3XJ2KV8K6M8 CUb04jj3kEeCwq+R6Bk2ZXrnMzyQmmn223X+Zp89B/gchH32JY8y3j7BICcoZmgMu62XNMgW I/hRgfi3JlVCne6XPj3/w00JYG7vo+eTJOflqYr3WRTPYh7DxzYtshZswHmmkZtwizUQUZzF 9dX2CM8nY7cKucEmtcnUpjGwXMOufa/DmCTlk8ggRZ0ukCUZOlIA4ILxp95sS2oqyucARv+p wMWvrqJ/LfbZexSsIjI= Organization: FreeBSD.org In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------UHgYh8Uf7xnFWkkY3jO50Oeg" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------UHgYh8Uf7xnFWkkY3jO50Oeg Content-Type: multipart/mixed; boundary="------------AIARtt0jEYPZglYIoaZhPJm4"; protected-headers="v1" From: Dima Panov To: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, srcmgr@freebsd.org Message-ID: <64973a60-3419-48f0-8827-96a6be01337f@FreeBSD.org> Subject: Re: git: 7ac276298b72 - main - Remove Secure RPC DES authentication References: <202508101537.57AFbHrI067216@gitrepo.freebsd.org> In-Reply-To: --------------AIARtt0jEYPZglYIoaZhPJm4 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 DQoNCk9uIDE2LjA4LjIwMjUgMDE6MDcsIEtvbnN0YW50aW4gQmVsb3Vzb3Ygd3JvdGU6DQo+ IE9uIEZyaSwgQXVnIDE1LCAyMDI1IGF0IDA2OjAyOjM5UE0gKzAxMDAsIExleGkgV2ludGVy IHdyb3RlOg0KPj4gS29uc3RhbnRpbiBCZWxvdXNvdjoNCj4+PiBUaGUgY29tbWl0IGJyZWFr cyBsaWJjIEFCSSBhbmQgbXVzdCBiZSByZXZlcnRlZC4NCj4+PiBUaGlzIGVtYWlsIGlzIHRo ZSBmb3JtYWwgcmVxdWVzdCB0byBkbyBzby4NCj4+ICAgDQo+Pj4gVG8gbWFrZSBpdCBjbGVh cjogZGVzcGl0ZSB0aGUgcHJlc2VuY2Ugb2Ygc3ltY29tcGF0IHZlcnNpb25zLCB0aGVyZSBp cw0KPj4+IG5vIGp1c3RpZmljYXRpb24gdG8gcmVtb3ZlIHRoZSBpbXBsZW1lbnRhdGlvbi4g ICBEZWZhdWx0IHZlcnNpb24gZm9yDQo+Pj4gc3ltYm9scyBtaWdodCBiZSByZW1vdmVkLCBi dXQgdGhlIGltcGxlbWVudGF0aW9uIHNoYWxsIGJlIGxlZnQgYWxvbmUuDQo+PiAgIA0KPj4g b2theSwgZG9uZS4NCj4gVGhhbmsgeW91Lg0KPiANCj4+IGhvd2V2ZXIsIHVubGVzcyBpIHJl bW92ZWQgbW9yZSB0aGFuIGkgaW50ZW5kZWQsIG5vbmUgb2YNCj4+IHRoaXMgY29kZSB3b3Jr cyBzaW5jZSBpdCByZWxpZXMgb24ga2V5c2VydiAod2hpY2ggd2FzIHJlbW92ZWQgbW9udGhz DQo+PiBhZ28pLCBzbyBpdCdzIGJhc2ljYWxseSBkZWFkIGNvZGUuDQo+IEl0IGRlcGVuZHMg b24gd2hhdCB1c2VyIG1pZ2h0IGRvIHdpdGggaXRzIHN5c3RlbS4NCj4gQWxzbywgdW5sZXNz IEkgbWlzLXJlbWVtYmVyLCB0aGUgcmVtb3ZhbCBjYXVzZWQgaXNzdWVzIGZvciBsaW5raW5n IHhzZXJ2ZXIsDQo+IGFtIEkgcmlnaHQ/DQoNClllcCwgYnV0IGEpIHVwc3RyZWFtIGRyb3Ag dGhpcyBjb2RlIGluIHhzZXJ2ZXJzIG1vcmUgdGhhbiBhIHllYXIgYWdvIGJ1dCBpdCBzdGls bCBub3QgcGFja2VkIGFzIG5ldyByZWxlYXNlIGIpIEkndmUgYWxyZWFkeSBkaXNhYmxlIHNl Y3VyZS1ycGMgb3B0aW9uIGluIHBvcnRzIHdoaWNoIGhhbmRsZXMgdGhpcyBkZWFkIGNvZGUu DQoNCj4gDQo+Pg0KPj4+IFRoaXMgaXMgaG93IHdlIGhhbmRsZSBhbGwgb3RoZXIgY2FzZXMg b2Ygb2Jzb2xldGVkIGludGVyZmFjZXMsIGdldHMoKQ0KPj4+IGJlaW5nIHRoZSBleGVtcGxh cnkgY2FzZS4NCj4+DQo+PiB0aGlzIGlzIGEgbGl0dGxlIGRpZmZlcmVudCBmcm9tIGdldHMs IHNpbmNlIGdldHMgc3RpbGwgd29ya2VkIGV2ZW4gYWZ0ZXINCj4+IHRoZSBwdWJsaWMgaW50 ZXJmYWNlIHdhcyByZW1vdmVkLg0KPiANCj4gVGhlIGRlZmluaXRpb24gb2YgJ3dvcmtlZCcg bWlnaHQgdmFyeS4NCj4gDQoNCi0tIA0KU2luY2VyZWx5LA0KRGltYSAoZmx1ZmZ5QEZyZWVC U0Qub3JnLCBodHRwczovL3QubWUvRmx1ZmZ5QlNELCBAZmx1ZmZ5Om1hdHJpeC1kZXYuZnJl ZWJzZC5vcmcpDQooZGVza3RvcCwga2RlLCB4MTEsIG9mZmljZSwgcG9ydHMtc2VjdGVhbSlA RnJlZUJTRCB0ZWFtDQoNCg== --------------AIARtt0jEYPZglYIoaZhPJm4-- --------------UHgYh8Uf7xnFWkkY3jO50Oeg Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEELTAsy5mEEwxvh7r8+4ugndU5jykFAmiftQQFAwAAAAAACgkQ+4ugndU5jylS 4hAAt0f3bQhBHtRb4ac55uOwluYGPMh84DKRo+qxY743Pi3+ntOimTSS85AJ65LC2y2trx91pucc EJI3U0Gd1zFldLR+wmR4kZW2xNBs2JQvVL3Y8jPwdsGZxIdEyaBMNh+FwOIvgkG5M/ZOQJWdOr2a y7VbN9oiRMN87BsaUKHwxFrO+dYYsryyGwAhVswrcIFp0wZk+tQbvmE0bJjaJxu9FqjJz1ETh/0e Op1XoosQQAvSQDOFyLbl1lOwb/JWnMW1DRv0XyuSgwvphh6687nMa0DS2K+biq7QuoZ02SBAAutC 97GVL/YEZ3fK+pi5suYmnnS/CARSb/o4r9XdSWI2HN4F06FSW+bUztiYA/aHkkr2amRtpbwSy3di W4Pq4aSU07Udvj9M7w9/nJjaCOfSVPU50ixVxY6D+Z4TJ0gLplaLttxYMpcSsc0yIyW0Q6lnT88P +Z1zYwm0i2PhpO87UDd4/iCmZu2OHdy+KFIBLjUmANXAAioL5R5bBvQ4ynzLG3hQuHgCxmB5nNWI OSi289JUeJV0pmdKWbKTrSLG3zSFByOAeb0IjWxHaWrp72VQrT3sWUCDFouEyN2rXe2tJSIoDP1j RahNgd1msNhwjl+tl+UCEUd1vh5nghJHn4CBXXLFW6wFy53cKYf7BxpPxCddFEVCXZFhNX/cvMBB B54= =mrTd -----END PGP SIGNATURE----- --------------UHgYh8Uf7xnFWkkY3jO50Oeg-- From nobody Fri Aug 15 23:24:58 2025 X-Original-To: dev-commits-src-main@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 4c3dVz0mJCz64SGR; Fri, 15 Aug 2025 23:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3dVz02N6z3yH4; Fri, 15 Aug 2025 23:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755300299; 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=737cYciDxXvOBvXKP509mT1EhOVgetq+tn7oMb2WioQ=; b=ajWHqdg9cmzXwGUExhqZZ35WzdXU30mdH5Jg0MNdLCidOpqKT7qDL2s6ZmwABfJDf9i0FM IvRixDv8aiiaHIufyKqao4tnXwGKuOdQ+y0UrcjGuNhScAWA5uSDTAG5PNmggnbIGJBK1z osze+uI/cI5bdBnIPXtXerBMsICSglK1eNivJhyK80eShj1lF5cbgigS9E3wqfBLh/JK+H ZuQNh7sh9oMLr0hLItKWF+Ix7QMDDD42Q/eWNkjQ8RVOKD8l9n8pt0vjTJhmPFyyrQR1wL F1VF0vhFBK/ddAzfBwBve4EW7LNsXTr0AJIDHn0eLoM18zZJfTQ+fpawYiBxIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755300299; 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=737cYciDxXvOBvXKP509mT1EhOVgetq+tn7oMb2WioQ=; b=WQqOtawZ9F3WT+xhOcBuKOaEYv5EB9hJHArJoR2lh87FqkZmT4yeXHFSSVV10jxO0KrvvA rJV2MI6xU3N+UZysGSbu4AOCEAVOnAQFM2EUNWlpTCw1jL1uF8cCao5qnK8CpnCINlbcld 0apQ9SGAVWEVL3sqedJHWg2ke3Cto5TTOA05Fpx20oTDTIxr/vgdJe2EDt6z+IGyaNOwPI M1ge4CfkMKaPZnfjeVaXrvjGcd47IYCLbqL3U/pKpUybAOXNVvKKFlRCp/FH0Ub4+f80F8 1y74gdr7ShP+l9oyBNBlwVgzLIRHT91N+2d+HGJkzIZh432frqmWs7tsNXZ7Sg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755300299; a=rsa-sha256; cv=none; b=P08qJvQOZarcnTW0Ykt0rQZGXm+bHKnL4QlvBCSYIwEkE+v48PjeXlLk2To2CIi5xFsmKQ axYKAPlxVrAO/eEdASDf5tenLWc/WmXX4FkWNwK9vgyCehq4971544RbCkLJEsdVqzFGe1 eq32OrIHdCo4o7v2UbksmcBVoOT4yrFjfJG2GmkDIkIQFuFVr7cPgWDEIc95N6Mi2iSHHC 7qp2Dk4TOsb/ACYWFaXM+UTzl84A2Dm4B+BdOu7mfU+dxGrPCbNu0xMCgXREIyp6TUQt1D IqJgjLSwDCJ9CIGpP3AJaQsutSwU2nIXLhmN5+TzNaUVok/yx2I8Ta2Jy7J0gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c3dVy6Ys6zxvg; Fri, 15 Aug 2025 23:24: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 57FNOwx8012242; Fri, 15 Aug 2025 23:24:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FNOwGV012239; Fri, 15 Aug 2025 23:24:58 GMT (envelope-from git) Date: Fri, 15 Aug 2025 23:24:58 GMT Message-Id: <202508152324.57FNOwGV012239@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: ef8f3e913156 - main - libkern: Drop incorrect qsort optimization List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef8f3e913156aa268e07ae1daa68e3bc3f1c4d29 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ef8f3e913156aa268e07ae1daa68e3bc3f1c4d29 commit ef8f3e913156aa268e07ae1daa68e3bc3f1c4d29 Author: Dag-Erling Smørgrav AuthorDate: 2025-08-15 18:01:02 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-15 23:23:35 +0000 libkern: Drop incorrect qsort optimization See 5205b32de3fb for details. PR: 287089 MFC after: 1 week Reviewed by: jlduran Differential Revision: https://reviews.freebsd.org/D51919 --- sys/libkern/qsort.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/sys/libkern/qsort.c b/sys/libkern/qsort.c index 0255a3d64d76..342b1525dd8a 100644 --- a/sys/libkern/qsort.c +++ b/sys/libkern/qsort.c @@ -114,11 +114,10 @@ qsort(void *a, size_t n, size_t es, cmp_t *cmp) char *pa, *pb, *pc, *pd, *pl, *pm, *pn; size_t d1, d2; int cmp_result; - int swaptype_long, swaptype_int, swap_cnt; + int swaptype_long, swaptype_int; loop: SWAPINIT(long, a, es); SWAPINIT(int, a, es); - swap_cnt = 0; if (n < 7) { for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) for (pl = pm; @@ -147,7 +146,6 @@ loop: SWAPINIT(long, a, es); for (;;) { while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) { if (cmp_result == 0) { - swap_cnt = 1; swap(pa, pb); pa += es; } @@ -155,7 +153,6 @@ loop: SWAPINIT(long, a, es); } while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) { if (cmp_result == 0) { - swap_cnt = 1; swap(pc, pd); pd -= es; } @@ -164,18 +161,9 @@ loop: SWAPINIT(long, a, es); if (pb > pc) break; swap(pb, pc); - swap_cnt = 1; pb += es; pc -= es; } - if (swap_cnt == 0) { /* Switch to insertion sort */ - for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es) - for (pl = pm; - pl > (char *)a && CMP(thunk, pl - es, pl) > 0; - pl -= es) - swap(pl, pl - es); - return; - } pn = (char *)a + n * es; d1 = MIN(pa - (char *)a, pb - pa); From nobody Fri Aug 15 23:24:59 2025 X-Original-To: dev-commits-src-main@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 4c3dW01P4rz64SRB; Fri, 15 Aug 2025 23:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3dW00mwPz3xk8; Fri, 15 Aug 2025 23:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755300300; 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=81JVyM0o8Zqz1/tpZ1kM+MLAdOLa1/i0iAS2exb++l0=; b=M/3w+TYionYWGVMLekIGCtFvN6FCOcdqpHnCEJF8ceiRtto8XDwCxG5nc9IMP+ZvoHByx0 27tJkdCXKQzcxZnJqq43gu4kmsDKcqJbPu7bTkp1s+rTTBwzPE09ns6F0RVimW0DaudUR/ jaWuD7nD7wAokN5pAvX3LXw2WDukuBFiQKUY/qvkUFtjKnBV6pJpgGjoxyGhpCVKlG4CpE Qa0f02w5QDafsPUWF8bgDVOj5Nsy9ldR5S2e3nmYDTT05zlC86N48gayEA3EEbRCEozkY9 MjCFNkhMmw7conGnwhG3+tPeaIumLi92N9VpKNj1kWCk6CKvGThbWVpWBGdrPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755300300; 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=81JVyM0o8Zqz1/tpZ1kM+MLAdOLa1/i0iAS2exb++l0=; b=QhkrBHBPutTbm4SyMX4PlRVNY2MWDVzEZsIbdyt86M/nGBSgIUcgWGzYtY89TfAedTINwL vDGgQqoXz3Cs5RrgPyje3cT7G0a0aRi1MlErzn1VjSVsjnGmW41vjW9DQvyn/cfCjtwI08 HEMrMbc6PKqMJswI6djyIVgE5hIAMxivK5fJm2IDySr7hVrQRIFBpbyx0NJLu4PSXQMxJm COX5vTHfMYGC6zYD82CbU474H+bjDSukZ7XUjIT/2u6G0FuXweEWZti0WO7MqmfPsXU3F3 YHYWpgrURR04hYh5J+CgjsioUA5BR69FAtxHuLgaPKpjBrBmQ4yMy3fZpqcsTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755300300; a=rsa-sha256; cv=none; b=ISJKyZRrb0w4p/sIFGTH5zuA1NEE9IWlH5FfV06KYLw6v9tqKQVIQEC1IjsFk1qA+qCeWU 6aec+YZ93wicktiHvPpSeYMH9pD2NPxIU9l7t9ghOD6L3eH1w85OArMTtJsd6se4HDn6sd yGf8xoXVzqrm5hPzhwV+HCB3JtAWK5uWz5u3Ex2VCyosIkifVZDP0iYNWhqyV4uV3qzgiK ykO4HPlyFti89jeSO2Jx0oy/mY/YAFFsvsszm7KEkejfMA2oMwCWNWXNyyb0nonopSTCE2 7m6iEP2ppy/ZgY7CQK+dSYxak7apiAh9doIPiwRe1V17ECt1Tv6Vv8YWD8YD9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c3dW00NKHzyJv; Fri, 15 Aug 2025 23:25: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 57FNOxJE012280; Fri, 15 Aug 2025 23:24:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57FNOxOn012277; Fri, 15 Aug 2025 23:24:59 GMT (envelope-from git) Date: Fri, 15 Aug 2025 23:24:59 GMT Message-Id: <202508152324.57FNOxOn012277@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 20f0996700a8 - main - freebsd-update: Do not fsync List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 20f0996700a8e60780931e7fde65899040465f4e Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=20f0996700a8e60780931e7fde65899040465f4e commit 20f0996700a8e60780931e7fde65899040465f4e Author: Dag-Erling Smørgrav AuthorDate: 2025-08-15 18:04:15 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-15 23:23:36 +0000 freebsd-update: Do not fsync Fsyncing each file we install slows us down significantly and adds little to no safety. MFC after: 1 week PR: 287897 --- usr.sbin/freebsd-update/freebsd-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index c388e76644dc..81040431ea79 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -3000,7 +3000,7 @@ install_from_index () { if [ -z "${LINK}" ]; then # Create a file, without setting flags. gunzip < files/${HASH}.gz > ${HASH} - install -S -o ${OWNER} -g ${GROUP} \ + install -o ${OWNER} -g ${GROUP} \ -m ${PERM} ${HASH} ${BASEDIR}/${FPATH} rm ${HASH} else From nobody Sat Aug 16 08:34:07 2025 X-Original-To: dev-commits-src-main@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 4c3shp0CCsz643xw; Sat, 16 Aug 2025 08:34:18 +0000 (UTC) (envelope-from flo@smeets.xyz) Received: from mail-out.smeets.xyz (mail-out.smeets.xyz [88.99.165.53]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4c3shm53JJz43Zr; Sat, 16 Aug 2025 08:34:16 +0000 (UTC) (envelope-from flo@smeets.xyz) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=reject) header.from=smeets.xyz; spf=pass (mx1.freebsd.org: domain of flo@smeets.xyz designates 88.99.165.53 as permitted sender) smtp.mailfrom=flo@smeets.xyz Received: from mail.smeets.xyz (mail.smeets.xyz [IPv6:2a01:4f8:10a:3543::25:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client did not present a certificate) by mail-out.smeets.xyz (Postfix) with ESMTPS id DDCC4B87CE; Sat, 16 Aug 2025 10:34:08 +0200 (CEST) Received: from localhost (amavis.smeets.xyz [IPv6:2a01:4f8:10a:3543::aa:4]) by mail.smeets.xyz (Postfix) with ESMTP id CAC314867B; Sat, 16 Aug 2025 10:34:08 +0200 (CEST) X-Virus-Scanned: amavis at smeets.xyz Received: from mail.smeets.xyz ([IPv6:2a01:4f8:10a:3543::25:3]) by localhost (amavis.smeets.xyz [IPv6:2a01:4f8:10a:3543::aa:4]) (amavis, port 10025) with ESMTP id qr2OCqUAC80u; Sat, 16 Aug 2025 10:34:08 +0200 (CEST) Received: from [192.168.43.50] (unknown [145.224.74.233]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (Client did not present a certificate) by mail.smeets.xyz (Postfix) with ESMTPSA id 1B2E64867A; Sat, 16 Aug 2025 10:34:08 +0200 (CEST) Message-ID: <06c00743-d1a6-4e94-8ccb-6adaeea0e2a9@smeets.xyz> Date: Sat, 16 Aug 2025 10:34:07 +0200 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: bad279e12deb - main - pf: convert DIOCRDELADDRS to netlink Content-Language: en-US To: Kristof Provost , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202508052228.575MS8j8014325@gitrepo.freebsd.org> From: Florian Smeets Autocrypt: addr=flo@smeets.xyz; keydata= xsFNBFpyBwsBEADLq0c46orEtbMn4SptX+VJxR1wB4YwaErZme1bqF4nZHIhlRNET22HsHdQ doagaB4uACq0Rj5kHcu614ZnnNkLPyCxWQATx+cbdiFO4/hfT8tAvKnBtiy3awKJ5uGCNO2E zJwXW6KwdDA8XPRySqN8m1yPl+dW0Cls+/vO/QL/6+YLMupmEpSvFxRzAZTQuKyX4+xl+dYI d24JiPd1yfCuDNOY3+OZ3QBMT00u/699N8lUWRtiTwaQMwAOww8r/26YM6/SgcgFuLH2E/CV plY0sDvfoISlAj8agxdomNXfPjCMQ6w5yGZmA+huFpPCVBTi3on/SWgbQO7dLVpN4BNPuScP osCb/dsOg0S74zCClsIU3gdUGh9rwJY00/Ebid6V0R3c1Czwbg8LQedzlGDuXYXmzp6W2ujg r1cqbUD6lUWikUv2IMdCbb8MxYhHLi3GYUs5Xpi+W7vM6T45KbuMr7O/1SjtcGOlNeDvGNgj cDk20fOgPPZ+M6i9vX5Q2oI9HoYaeTiYNwILkBLVP/L40kTo5EkiQOt4OW6BMbylqXPOaQMW uGVbmhCJQpbx8Vo80s2yiBBVWkLkWQIcIm3KZlLldJqKEFpQBWLBE1eFFqboYgAWzFn73CaV 5tihobijMmmOV3a8cI1fI4kREyl3g+8bW+O0u3m3tuzVOpDpjwARAQABzR9GbG9yaWFuIFNt ZWV0cyA8ZmxvQHNtZWV0cy54eXo+wsGXBBMBCgBBAhsDBQsJCAcDBRUKCQgLBRYDAgEAAh4B AheAAhkBFiEE7LNouHkIv7aRTXJp71uk3NWp88AFAmWarWAFCQ7rjOUACgkQ71uk3NWp88AY fQ/+MJWYN95HXWcWKw9mOffW6WJvq5POE2RpoBXj2AJvzjF4bPt/mclA0+wlyAs6ayvCSRwE dgB0vF31DRPgsz/76PC3f1ADYbLdrGusCcPYMhvkgkXY6/p793YzI2ELjicHgn2pB9iy0Y+B nemAY8qXGqTX4d/qPllFcEOVZCDHez0JEFNCZC780pEzOHP9mMzXT/Pl4RBUBHOLv9j96enM Ir8VXoMkfNJ5GqdF577Aa/C46pUoOeSc2KvS/5g3axSFLho/ni70M4tjGXMYDdbnNHOg/UjG iKKuZgzI9CXrvVAZfX663ERps/GXu1IiaJdadnQaLgPvjCjz0qM14hy/n67fCSqmYdKgwblU GvKC912vGsMN1ibS+7xoAsCiM4w+Ct2plOLO3rJ26xaZZlE137GpLh4RnnvrnDFUBEG47tZJ O8wbedt2KwRKTPle136WedzjVlcuKoH1T9Dem6E1P9TUfNHqOYtD7iUouWYkftSoRAhkY4IS bDRlz2dqRagbHR1T0DXhraQyswQucoVQPTsy9PoXAZLY73Jep71nl3zQCTRXn7aSj2RO2ob0 RvnBwueXdFpb1SfCeJwJhadmOuYF/i8RIskAzG0aapYT8VUe8tqjmsKM/MWTcngjWf/7u/7+ xmtdpGqI7oY3SGbyu0rw+xICXrD28N1H8kyazJ/OwU0EWnIHCwEQANHrOm5vydK/ij1zkDyL Zzbogk5zjMh6oAr3cH4oGbJHPLlyFZTCVBYUwD4kh6NV1sKuZOeX/aygyVg1RyLulnzsc6Yj XOIxlqhqQwGI8k8ssAIpMSf029781CNF2HC42CrJeHtXNONDNOjsMuoxzga9zLQCh4jLTlE/ TUJo6KVABWBVRtTVh2Z77pKtN7j2NPFBHvp7K0WHfV+TYnlsgjhUA0ACZnUdHS2YRzBhCzzQ eludxBz54S9xbUq1mfZfVx8AbAGXF2zxo68nvvAAJn48HiBS3dMhCGYJDdZdja6QdUFPiemi nOxwkUzCqmKxm+Aj7USue1SbZZqJxmMI1eF4Ork/BJJI74Z/FnJgYR4UkEiD3J/KUocQCIH3 daB1+/CXlh99Ib7AP+QGuKk3vnNHh7VBq3E+VAiM5LU0BmgW+cdRPHkiwM7sDa2VnV3VqvV7 QmoMKnHFzUB6Nn8uE+iakp5J81Pr68kDOq7kLW3UnGmg1PUqbsnCaTimJb3JAYWzOW/9CYcP lbAdIqi+wH7MOoeL+PA99A3kW/881rGmeOYFzzrsNVLtea+AJfXtp4LN5gOVIPIpovCNSVXX EKgl7a4vjUGzVBzrH7PzT+k4XUEQwNCACfGZxEExtny19bjvumZ0rv+AEAHvsWSKXHUVJzIN jqd9UioaEbKGAPlPABEBAAHCwXwEGAEKACYCGwwWIQTss2i4eQi/tpFNcmnvW6Tc1anzwAUC ZZqtYAUJDuuM5QAKCRDvW6Tc1anzwCBsEAC0eYv6YNJHMdgGAb22Ej1wOvszzq6+2sDPXGMT yCUMTOq779cc1yDcrKgiMPO6Kmg+um3veUu/6Trux8tjxhxoKrRZ8/kF8lc5lx2krPFDJooj mHlENCyMTOlIRJ0M7ZgJDKkD0pEwm0j9UgmrFmCU6n9WHhpoXW3kGLY0M3IAwezyROg1Gfnp bnXvYun2wmH3OukDoOEkuFJYJz22XNRZBQh2/RjtnlTl6l9G5ZONgZJJziSa97Z5UEsg35Ey tEeTJVciiP0BXBWgYwE+0cRh6MEiY51X+hqdbUQ3RU1tAMC5HGGCtR9lHgpBj0ZTtBxXnOfX NWHDQkswgSrEUH1DROcx7BNJdvjzYMztwvojeJgOgSM+RA6hg/e31jpt8X2HTYuNUrnE1nao naso3EaNXYE2TQ0t9EGdxWRfoElZ5DUoFMTKZ3/ysPS9Cmsb1TOrO2Hvuxmhbr/3zfLXIyWy 56trqqp0ffubfXT8avdNBMJwZjcPxPbsxRwtle3D4ytty0qDzF7gKMd484OtBGtW4C4QhseU 5yyJBXD1SuJjZKodiwqBtWUgN1JkfeptGukulB+NwmVC9YrhvYjXBDr0EM6Ot43kg5jGFdHO AhfzqetncKKiJUVUHDg+goxejamNsNq88xdnx1QDsDquZA8UdDdLgd8iDGyHTTlgokPZlw== In-Reply-To: <202508052228.575MS8j8014325@gitrepo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------8Ou8JWE8wmT6lp7gqcsZhB9Y" X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.07 / 15.00]; SIGNED_PGP(-2.00)[]; MIME_BASE64_TEXT_BOGUS(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[smeets.xyz,reject]; NEURAL_HAM_SHORT(-0.37)[-0.365]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; MIME_UNKNOWN(0.10)[application/pgp-keys]; MIME_BASE64_TEXT(0.10)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; RECEIVED_HELO_LOCALHOST(0.00)[]; ARC_NA(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; HAS_ATTACHMENT(0.00)[]; FREEFALL_USER(0.00)[flo]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:+,4:~,5:~]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_DKIM_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:24940, ipnet:88.99.0.0/16, country:DE]; TO_DN_SOME(0.00)[] X-Rspamd-Queue-Id: 4c3shm53JJz43Zr This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --------------8Ou8JWE8wmT6lp7gqcsZhB9Y Content-Type: multipart/mixed; boundary="------------bWZDKLk0ix0WmjgRhzrS3fEY"; protected-headers="v1" From: Florian Smeets To: Kristof Provost , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Message-ID: <06c00743-d1a6-4e94-8ccb-6adaeea0e2a9@smeets.xyz> Subject: Re: git: bad279e12deb - main - pf: convert DIOCRDELADDRS to netlink References: <202508052228.575MS8j8014325@gitrepo.freebsd.org> In-Reply-To: <202508052228.575MS8j8014325@gitrepo.freebsd.org> --------------bWZDKLk0ix0WmjgRhzrS3fEY Content-Type: multipart/mixed; boundary="------------eLWus4301fLmwcHK0KgfmR0N" --------------eLWus4301fLmwcHK0KgfmR0N Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: base64 T24gMDYuMDguMjUgMDA6MjgsIEtyaXN0b2YgUHJvdm9zdCB3cm90ZToNCj4gVGhlIGJyYW5j aCBtYWluIGhhcyBiZWVuIHVwZGF0ZWQgYnkga3A6DQo+IA0KPiBVUkw6IGh0dHBzOi8vY2dp dC5GcmVlQlNELm9yZy9zcmMvY29tbWl0Lz9pZD1iYWQyNzllMTJkZWIzZTRlNDUyOGRiYzZi MDZmNTZhZWZiMTY1YjE1DQo+IA0KPiBjb21taXQgYmFkMjc5ZTEyZGViM2U0ZTQ1MjhkYmM2 YjA2ZjU2YWVmYjE2NWIxNQ0KPiBBdXRob3I6ICAgICBLcmlzdG9mIFByb3Zvc3QgPGtwQEZy ZWVCU0Qub3JnPg0KPiBBdXRob3JEYXRlOiAyMDI1LTA4LTAxIDE0OjE4OjUyICswMDAwDQo+ IENvbW1pdDogICAgIEtyaXN0b2YgUHJvdm9zdCA8a3BARnJlZUJTRC5vcmc+DQo+IENvbW1p dERhdGU6IDIwMjUtMDgtMDUgMjI6Mjc6MTQgKzAwMDANCj4gDQo+ICAgICAgcGY6IGNvbnZl cnQgRElPQ1JERUxBRERSUyB0byBuZXRsaW5rDQo+ICAgICAgDQpIaSBLcmlzdG9mLA0KDQp0 aGlzIGlzIGNhdXNpbmcgaXNzdWVzIHdpdGggY3Jvd2RzZWMuIFRoZSBwZmN0bCBwcm9jZXNz IGlzIHVzaW5nIHVwIGFsbCANCm1lbW9yeSBhbmQgZ2V0cyBraWxsZWQgYnkgdGhlIE9PTSBr aWxsZXIuDQoNClRoZSBpc3N1ZSBhcHBlYXJzIHRvIGJlIHRyeWluZyB0byBkZWxldGUgSVBz IHRoYXQgYXJlIG5vdCBwYXJ0IG9mIGEgDQp0YWJsZSwgd2hpY2ggY2FuIGFwcGFyZW50bHkg aGFwcGVuIHdpdGggY3Jvd2RzZWMuDQoNCnJvb3RAZnc6fiAjIC9zYmluL3BmY3RsIC10IGNy b3dkc2VjLWJsYWNrbGlzdHMgLVQgc2hvd3x0YWlsIC0xDQogICAgMjIzLjI0Ny4yMTguMTEy DQpyb290QGZ3On4gIyAvc2Jpbi9wZmN0bCAtdCBjcm93ZHNlYy1ibGFja2xpc3RzIC1UIGRl bGV0ZSAyMjMuMjQ3LjIxOC4xMTINCjEvMSBhZGRyZXNzZXMgZGVsZXRlZC4NCnJvb3RAZnc6 fiAjIC9zYmluL3BmY3RsIC10IGNyb3dkc2VjLWJsYWNrbGlzdHMgLVQgc2hvd3xncmVwIDIy My4yNDcuMjE4LjExMw0Kcm9vdEBmdzp+ICMgL3NiaW4vcGZjdGwgLXQgY3Jvd2RzZWMtYmxh Y2tsaXN0cyAtVCBkZWxldGUgMjIzLjI0Ny4yMTguMTEzDQpsb2FkOiAwLjY1ICBjbWQ6IHBm Y3RsIDI2NTE1IFtydW5uYWJsZV0gMTAuMTlyIDAuNzV1IDQuODZzIDMyJSA4MDIxMjhrDQps b2FkOiAwLjc4ICBjbWQ6IHBmY3RsIDI2NTE1IFtydW5uYWJsZV0gMTcuNjdyIDEuNDF1IDgu MTlzIDQwJSAxNDUyNTc2aw0KbG9hZDogMC44OSAgY21kOiBwZmN0bCAyNjUxNSBbcnVubmlu Z10gMjkuMTRyIDIuNDR1IDEzLjE2cyA0NiUgMjUwNjI4NGsNCg0KRmxvcmlhbg0K --------------eLWus4301fLmwcHK0KgfmR0N Content-Type: application/pgp-keys; name="OpenPGP_0xEF5BA4DCD5A9F3C0.asc" Content-Disposition: attachment; filename="OpenPGP_0xEF5BA4DCD5A9F3C0.asc" Content-Description: OpenPGP public key Content-Transfer-Encoding: quoted-printable -----BEGIN PGP PUBLIC KEY BLOCK----- xsFNBFpyBwsBEADLq0c46orEtbMn4SptX+VJxR1wB4YwaErZme1bqF4nZHIhlRNE T22HsHdQdoagaB4uACq0Rj5kHcu614ZnnNkLPyCxWQATx+cbdiFO4/hfT8tAvKnB tiy3awKJ5uGCNO2EzJwXW6KwdDA8XPRySqN8m1yPl+dW0Cls+/vO/QL/6+YLMupm EpSvFxRzAZTQuKyX4+xl+dYId24JiPd1yfCuDNOY3+OZ3QBMT00u/699N8lUWRti TwaQMwAOww8r/26YM6/SgcgFuLH2E/CVplY0sDvfoISlAj8agxdomNXfPjCMQ6w5 yGZmA+huFpPCVBTi3on/SWgbQO7dLVpN4BNPuScPosCb/dsOg0S74zCClsIU3gdU Gh9rwJY00/Ebid6V0R3c1Czwbg8LQedzlGDuXYXmzp6W2ujgr1cqbUD6lUWikUv2 IMdCbb8MxYhHLi3GYUs5Xpi+W7vM6T45KbuMr7O/1SjtcGOlNeDvGNgjcDk20fOg PPZ+M6i9vX5Q2oI9HoYaeTiYNwILkBLVP/L40kTo5EkiQOt4OW6BMbylqXPOaQMW uGVbmhCJQpbx8Vo80s2yiBBVWkLkWQIcIm3KZlLldJqKEFpQBWLBE1eFFqboYgAW zFn73CaV5tihobijMmmOV3a8cI1fI4kREyl3g+8bW+O0u3m3tuzVOpDpjwARAQAB zR9GbG9yaWFuIFNtZWV0cyA8ZmxvQHNtZWV0cy54eXo+wsGXBBMBCgBBAhsDBQsJ CAcDBRUKCQgLBRYDAgEAAh4BAheAAhkBFiEE7LNouHkIv7aRTXJp71uk3NWp88AF AmWarWAFCQ7rjOUACgkQ71uk3NWp88AYfQ/+MJWYN95HXWcWKw9mOffW6WJvq5PO E2RpoBXj2AJvzjF4bPt/mclA0+wlyAs6ayvCSRwEdgB0vF31DRPgsz/76PC3f1AD YbLdrGusCcPYMhvkgkXY6/p793YzI2ELjicHgn2pB9iy0Y+BnemAY8qXGqTX4d/q PllFcEOVZCDHez0JEFNCZC780pEzOHP9mMzXT/Pl4RBUBHOLv9j96enMIr8VXoMk fNJ5GqdF577Aa/C46pUoOeSc2KvS/5g3axSFLho/ni70M4tjGXMYDdbnNHOg/UjG iKKuZgzI9CXrvVAZfX663ERps/GXu1IiaJdadnQaLgPvjCjz0qM14hy/n67fCSqm YdKgwblUGvKC912vGsMN1ibS+7xoAsCiM4w+Ct2plOLO3rJ26xaZZlE137GpLh4R nnvrnDFUBEG47tZJO8wbedt2KwRKTPle136WedzjVlcuKoH1T9Dem6E1P9TUfNHq OYtD7iUouWYkftSoRAhkY4ISbDRlz2dqRagbHR1T0DXhraQyswQucoVQPTsy9PoX AZLY73Jep71nl3zQCTRXn7aSj2RO2ob0RvnBwueXdFpb1SfCeJwJhadmOuYF/i8R IskAzG0aapYT8VUe8tqjmsKM/MWTcngjWf/7u/7+xmtdpGqI7oY3SGbyu0rw+xIC XrD28N1H8kyazJ/CwZcEEwEKAEECGwMFCQeGH4AFCwkIBwMFFQoJCAsFFgMCAQAC HgECF4AWIQTss2i4eQi/tpFNcmnvW6Tc1anzwAUCWnIHWAIZAQAKCRDvW6Tc1anz wMHxEAC7Bd/rmRO1XAMAkQWddCZHHyr9t9XlZYxVVkwz3Mw6YszTTo+UmWez28MT B9eRSxM4qkL0YRER0JXGypD9apis7Q7zIthExjQhDrDYHlxXO9/UPBjoWhzvM6kS C8C3mYJH0GgnV4d/3QqsdhTF/wBpaMn8ITgR03jAO8Rjbe1DWi/RF6I1miQp8opE XytFsGGnBFxHLNXh5qHda8orI7I8gYqq5cbQZaGC3Let822KifwCiYWhCUrSUKrn uiRCPQctLe8tPNd7G99awtz6ctdPx6jztyUxBpjPuHkSOozSvgU9GYYnXydDnACu 3m85/mhG/3RFIfdAktrFV2+3QEIOvazUnm1MbuBk/+srLP0Gs+1W8HCIcRbyOHDi UNtXfEhQRWSPhQSwz1eQesep3wmIU1lk48TblWS4B6h7IHeP2SZ9lzMX9/jVwenm /lHJNq+1r1BYDpDTsBE+7YkIEww36Un0b86TwmVSBIY7Adn7dHuOO8MwQWHgMmEX YHvsN0vGktUlLSHlxLxYzpr+ObVKToMCLhuCSx6293IT83/LFCYeiR0phbYsYOB3 tzB0zZfrrRq8VF7iiBnQ94tGKY9vIm5I3b6FkL9/LmMS/k+9n7qym7BgxgMKV59G m8EOqYILG18zUs0VGJeN1i9R0e9Dd9pwPM2k6Q8unRV7GMknYcLBlwQTAQoAQQIb AwULCQgHAwUVCgkICwUWAwIBAAIeAQIXgAIZARYhBOyzaLh5CL+2kU1yae9bpNzV qfPABQJh8FPUBQkLSJbfAAoJEO9bpNzVqfPA+nQP/2DYXGFQ0UqSwzTCxPa6idAx yRWiEWn6RMRsUIRx4kCqHl8I/O1QikT/vrG3sEuN4NIcOtzYf7/y9lmwMBeELxdz DgIaIohmjWaB6Tytl8GlnKmvJ4dkCtvBudT8y6KAMe/LWoCAWMj92aEZYbttmHt7 TZzdH9XJBCTEaCQDzu4QxsxRNN5HGhbzrvQDjiTbmmcXVbKZ4urPAeJ/cax1VzTi JcDKKtlE/Iq7TCW/mVrAW/zo/2VNPqJ4vFViTBDFsFYBDpcMHgMPDyvgtuBdrwI/ rWNw1EPWUAep1+D2XrEZ2ofeSCqwxSYzhoZnUpbNLhkUJJmP1NxErg/twJERl512 e5M+ga01aqJ3oJhsxuiH9wbpby6r/23cBN9iTnvFCGOnCzYYKEXzJcefD6PQ2Qpx uLsD6+c1abkTuErzgt0c9UPbVFda261mv0FrA5Q28MyF/dnl3lbNZ60KJDvVRORY N9u/ZLclSRnXEned4ecVwrztEilSJH7zbUzsaHYYRc4YHwYA2uHmKSX0pYEjBAzm m/70YIwI6lhW6o2Pn2tjgLxl7j4QjvGqHyrYJ0MQivcgEmsqbZ/tyijctNOf0OSr odQvPXLI0cYWUsOnQfoC3cmYILQ/Jr9dvmmhSHqdxSEziipgOB/wlHChg6M11b4S 9K/dKPgX846KZiB5+leywsGXBBMBCgBBAhsDBQkLM37BBQsJCAcDBRUKCQgLBRYD AgEAAh4BAheAFiEE7LNouHkIv7aRTXJp71uk3NWp88AFAmHwTcwCGQEACgkQ71uk 3NWp88BpTRAAybyHhteWLV4VDlzl7NPxbN8c9cDDv1r0HlaUVxfrSw+1rzycEdhq A8o75Wh5II4KAFTbX2igGckskcoOdqm68MU8+zAtVxVZaqX+EGNXSLWZgAzlf9rA HDm/O1ZBShZhn9EJyarYPaSRNBevVaR9bY6LEFmDacb6qnRVOH4Z/6O6fq/IxoXQ qyV1NDmmObxtCcxwx71v+7mJoBMTximtdrPmcpGesCQquiWKa6DyYjZIEZ9gQPtt LQ+iYmwWJp6q68VULqY9X0zG7byc3Xe7W/5oEoTA/gSWG0EbPOdfTS77TTNxhgBz FB6VY81PVAYzH419Q0b055XLTupo+JTQUb6bbluH6UJIBtIp1iJlGN42qvkMwqTo gIdat/3aA+EWEfG7iWlx8Z1hFU3r7GMJ5o8QLsloVNWAda+iHaidIJvU1fJa0U9v 2r1d/KwYHj2qlMaQMZHjldULp7LPP/pITeQEnma3mZ6IX7cp6mUd8MOiVTPE42fP s8qBHKfuEcg7L07NcdRzzgS0LGQfv6fbnvNnvsDGAt4zGQ/Hj72Z5/eL1sDnoJQU HNHMJlNJieGplbLm3LacNQZa9979BjwK+mUr1nPaaP4YR3czfVwTMrxPKT9kFBDZ L4YQ8LbsH5JJC3As3EJdptIkANSm+hU54sG8QPz6TDsm7754d1n12M3NIEZsb3Jp YW4gU21lZXRzIDxmbG9ARnJlZUJTRC5vcmc+wsGUBBMBCgA+AhsDBQsJCAcDBRUK CQgLBRYDAgEAAh4BAheAFiEE7LNouHkIv7aRTXJp71uk3NWp88AFAmWarWAFCQ7r jOUACgkQ71uk3NWp88BTdhAAuK3YBk7cwMeMobupP/jeFI6c3cGjFGBEXPrc35sV H60mVMTuTRIDyJ6mHL3tQpt/nnB9AHi/TuruSnVVyS4m+iuxTTKAIDYCeM09GcYb dXJF9okoGnbawYgIOIxV79z9K8LL/zvsD+0VVmNnavFNY2VPqLcifdgVp7jw7EIv wV9QUX7fu0abCPk9aLeUik4p65ktbQod5tcoKqnMhFyeMc4TuahAgusWxe+ZrL0l VhyU2sM0hp49a5WUU2AVgywX36LGfd/uVOCmsjKWNLYXV/GlwEhH8qMkWyNeXvcj Jmvc/EIGryakKLq6QP/nxQUK8H1VFdSQCqbyTR6gF7rVGVGhetmVKYirypPQr3u2 oUukVVHKUedkSyOHEjoOujH73XQvIX2sBkNLUaAOnIB3aoTsCCKNykWOl5gHjzRk aCdG0Sne/wxsY2Gd7s6DTuFPXIH0NSiIz2AvFqktK6OnZfpBZE41ou+/QrPsG4I4 dsxqiXhimMAF3/jeLmOcCxMGQGbqOyYQ+Err1XGyuSqzsTs5k4GdV0JHkcZk2ro2 yz51FcUfEZPKT73wAMtaXoy1DFkTyNjLE/OjDnA2CQ6gaulOBCnSUN58j2lCFkVb vsdloFttp98EB8hJdY42a63sZWNvSg3GFb84D+hBKJZgg/tzgk5Zn5qkBlC2o3Fg JZvCwZQEEwEKAD4WIQTss2i4eQi/tpFNcmnvW6Tc1anzwAUCWnIHVwIbAwUJB4Yf gAULCQgHAwUVCgkICwUWAwIBAAIeAQIXgAAKCRDvW6Tc1anzwLtjD/49zLwXSOq7 X62ks6VB3zyexw8v2DdRw/qKqivVUz9NCYERKDEKT5gt2NZrYIFITg3bXl0toS6q tKW7K9lfNaeUcm48+iHAM7b7TxhbUjYpYYz+Yw7mJWsS+diWBGHZI4ON86sxkLSb Urjcb2VgnLiXT2x6s0Dn5TAuyhrgBfmnAQySKnecVfp0ULToB2kVDPYTEUv/+t8F 2VcIDDMHcU1u6x7k1iKH8GS2DVkKToavUce+vMrSNUHwyXZm9TbHxzE6pgkx0Y/n PsBDC6fLr6HMwUBXiTOIh4h0svamqs2RrzWFjH5PhLHlnMNt9AHJ9i1faONXhcEI jK9Yf7MYiN8FogmmZljcQrbm4Ocu+aViXn+Q2hWBAIMsM6TQHRFx0zbqknwbZ80E OWQnx1pdNHzCihUMI1YLbRLet/wanotoVSaKpS87imczCDoPrAulr+GXGAYQ7g0Q rKjr/X6+vXPxL+GuqueU5VAIIY3J3AHJwhDr+gVWjw6jtqsgyqEcssd8ew39RwDl 8nO6/6igj07uchngPUVYRzrOd0MlpN66g3dD6Ih3pD8Z0qfEWdvVFGjKuKMc7aaR 5RA10S3o+p9bphW4VLtG6Ubq7m4mi7M162q3JAnULtEfe3eY8Gb74yseE4li+6B4 hLN02DWQMfMZjFmYgTmazus+b6tZqAn/vsLBlAQTAQoAPgIbAwULCQgHAwUVCgkI CwUWAwIBAAIeAQIXgBYhBOyzaLh5CL+2kU1yae9bpNzVqfPABQJh8FPVBQkLSJbf AAoJEO9bpNzVqfPAT7QQAIjDUhOPs13Va+KA3p4knO6bMa5Qm41UL1+iKU4lAdDu 6R3IZuccMhpdoQJ2DZWRSiqfmi6/xM6qwV0V1wx7TsIECoQ3YxwncPlvogZLOgA7 lmt8OV4TyfZStEdqz1mI4mqZ56jlYZ6nkjOU4l6Cz1Hf39lUXHZnSqEq9yW+zkyy yQgYTd0Lwwr2rDlLFGF1DQTDtIfA5bLOzNSFw079wizUbSZIqDMyGcFgap2otvCM 07QCSsBLDtWvr1Qxinl995oWkftKMwyb9Ozkws9aKHL5akndyUShz9P524ssyUYp OQQxeDAgdI1Sz48ifbWFvvJzn0MHkkfZeGqOYJ0uvl+SJ8ofEC4w+unTYojWfKp4 dPjZ2VQG+kzEN0P/GkIXsu55qQ7rU2ed8ySOXNWEO4XI8wA807jJB6DGTPaB0dR2 qMGZTK1qlUDr/2eefRTHk6LGnLwWrz86O1vQPfLJgobo2ycOVrqwrZDOkaO34rdY 3DwqOBlFzX09edihh3g5IVbx2rAWwJC2wSWcMfpexzvU6rxN7bmCac66CvyrzPuQ Az5YiYZx3mujeZZNU61pixlIcjPGp9hCVk3UV4fXbqmdmvM64e8JFNh59B6TaiMH Uvsph4H3F5a6tFMq9NOn8tn+QKZpDWGrpX3g43ZyEyx5B4l7rJPTPTMK/mv8ed+6 wsGUBBMBCgA+FiEE7LNouHkIv7aRTXJp71uk3NWp88AFAmHwTcwCGwMFCQszfsEF CwkIBwMFFQoJCAsFFgMCAQACHgECF4AACgkQ71uk3NWp88A6NA//UV2AdO6DubU4 Y/eTPnE4gPpy5INRnVB4U28Y5T+DSq3LUF1r391xEmM51u0iSk9c9Rs5mJlYUsAE GjzaXG5+OyjW7PCW8Jmr+oxgy2lPKzwtlRU6ttV5Qzwoose0urYMvj0S3wOrAQ1z Fo9rrThETGx++sEAzA5YXqQfwMLhxsKL7YHffk1QIWgz+pgLc+HRsKta7SWyIR3Q bdYnxbPw6ISAP6a6hC1oQwqSDoH3tNoK9wt/bmPpU7RtOLJIzd7VHA09pPK70ZKH kvs9OE8Trse4Dbs1eiH6gcNVt0zjvk4YhDwgBa+4/IQnpH3UiOlAVHeqLJZ6mlHU CDlegHUOlC/x8q7ZtDObuVBYLTt2Oe3D5JzFwPGK6Pv48vUKUoqN7NNKa+MkQDob fAHXsy1KcjxMxWc9HU0axKFNjkWXmKHJDDXCDZ4ktcmDStgu5uE+EmLKiIY4iTUF HfjQBt6fWoMLfdX1CjkIoWVeLO8XKB3LeH9ogl6r2ba5C9Ck+QwzgiN7a2a+Ur5D ccmSLQ6dt4Z/i8lr90FV2eMCnuJ1hpXIqFXgPd1ofXM5NbDEutIc6/mLGlH5kKYb qeYCkQoTarmWb9vHlkBc/1JLDIt1XbY9Ru6I0Znl4nH/2WG5fXqdVncXbElmcm6p BXuRbEB53HBo3k/lTwpM8U+AtEAP1TTOwU0EWnIHCwEQANHrOm5vydK/ij1zkDyL Zzbogk5zjMh6oAr3cH4oGbJHPLlyFZTCVBYUwD4kh6NV1sKuZOeX/aygyVg1RyLu lnzsc6YjXOIxlqhqQwGI8k8ssAIpMSf029781CNF2HC42CrJeHtXNONDNOjsMuox zga9zLQCh4jLTlE/TUJo6KVABWBVRtTVh2Z77pKtN7j2NPFBHvp7K0WHfV+TYnls gjhUA0ACZnUdHS2YRzBhCzzQeludxBz54S9xbUq1mfZfVx8AbAGXF2zxo68nvvAA Jn48HiBS3dMhCGYJDdZdja6QdUFPieminOxwkUzCqmKxm+Aj7USue1SbZZqJxmMI 1eF4Ork/BJJI74Z/FnJgYR4UkEiD3J/KUocQCIH3daB1+/CXlh99Ib7AP+QGuKk3 vnNHh7VBq3E+VAiM5LU0BmgW+cdRPHkiwM7sDa2VnV3VqvV7QmoMKnHFzUB6Nn8u E+iakp5J81Pr68kDOq7kLW3UnGmg1PUqbsnCaTimJb3JAYWzOW/9CYcPlbAdIqi+ wH7MOoeL+PA99A3kW/881rGmeOYFzzrsNVLtea+AJfXtp4LN5gOVIPIpovCNSVXX EKgl7a4vjUGzVBzrH7PzT+k4XUEQwNCACfGZxEExtny19bjvumZ0rv+AEAHvsWSK XHUVJzINjqd9UioaEbKGAPlPABEBAAHCwXwEGAEKACYCGwwWIQTss2i4eQi/tpFN cmnvW6Tc1anzwAUCZZqtYAUJDuuM5QAKCRDvW6Tc1anzwCBsEAC0eYv6YNJHMdgG Ab22Ej1wOvszzq6+2sDPXGMTyCUMTOq779cc1yDcrKgiMPO6Kmg+um3veUu/6Tru x8tjxhxoKrRZ8/kF8lc5lx2krPFDJoojmHlENCyMTOlIRJ0M7ZgJDKkD0pEwm0j9 UgmrFmCU6n9WHhpoXW3kGLY0M3IAwezyROg1GfnpbnXvYun2wmH3OukDoOEkuFJY Jz22XNRZBQh2/RjtnlTl6l9G5ZONgZJJziSa97Z5UEsg35EytEeTJVciiP0BXBWg YwE+0cRh6MEiY51X+hqdbUQ3RU1tAMC5HGGCtR9lHgpBj0ZTtBxXnOfXNWHDQksw gSrEUH1DROcx7BNJdvjzYMztwvojeJgOgSM+RA6hg/e31jpt8X2HTYuNUrnE1nao naso3EaNXYE2TQ0t9EGdxWRfoElZ5DUoFMTKZ3/ysPS9Cmsb1TOrO2Hvuxmhbr/3 zfLXIyWy56trqqp0ffubfXT8avdNBMJwZjcPxPbsxRwtle3D4ytty0qDzF7gKMd4 84OtBGtW4C4QhseU5yyJBXD1SuJjZKodiwqBtWUgN1JkfeptGukulB+NwmVC9Yrh vYjXBDr0EM6Ot43kg5jGFdHOAhfzqetncKKiJUVUHDg+goxejamNsNq88xdnx1QD sDquZA8UdDdLgd8iDGyHTTlgokPZl8LBfAQYAQoAJhYhBOyzaLh5CL+2kU1yae9b pNzVqfPABQJacgcLAhsMBQkHhh+AAAoJEO9bpNzVqfPAz/wP/0hsPMy+zPg74ZzP WhTHggzFtAPD32qAl7FHlyNbbTsaRGcpUnTOrHtdz5TcDK2eK7CocRd5Xioio/qH XikS4Kp1En59KbrmsHj5l14zZjlhi9QEHI4zvwxuzpJnLaTlfQQvkVeM1Ugw6/Yi ZuXJ5FaFYrqAJ9z+XuRXURhXH0tXe6axzsr5x5mV8TVTyFZuJ7yvu2XdX2CAXaDV zJz2u7SpbeyDwPi81NLW7B2p5xwpFzeiytXDhatbWcbFOZNMKpVgYeMXawA0X2jU kH3eGhfPyXJ2YN2En/rb9cdql5PUUHybuC6WKczfdV44IKM351SAtCTm0AaD6IdB aELhD+jibQ6p91xJh2EInuHYjgbA6gZrHOheoQvjsa7HP7MTiiwAU/kkvEJNuLbH mx24K/HHdZs73mRkkqnsPQEgqlspx+TJax7ndgEj3BKuQiKX4ieeq9IPNT2cy8jI pKO/i6LC9mLUdju0+KKv8/adplqJDVIAzQos/eDXbdZyeFEqj75lEeFrLn/vRIoZ 3ESYp/eeV3zE0Kz0QhY5OlFqpz37M5wPXNVNnCfCAGuc+rN89b353sXAA/Ux0lut E64LZt/M1nKhHi4cCcM7I1bAZKZKG/uGF16207x0luWd5Njy+HPGjfqlaaiMR2CC Fc3D0mLuTIicCZar2TBXlWi7dk0XwsF8BBgBCgAmAhsMFiEE7LNouHkIv7aRTXJp 71uk3NWp88AFAmHwU/4FCQtIluAACgkQ71uk3NWp88ByqQ//c50WjTdLufk8CcUg 922ngNjqnnmzuoI6bHH6E9c9SzkyYhv6TzM+0weStm6PtCcM0VdvZ34knjRkKgcd Ux2d2NKYebRQfK3xeGhHXY4bcMT/NEOEs8U6EmQBjAZJ3TV5RKTHsh6FaXBqEe6p CgLa6+zPYPaHH/JEzt4c7w8wElSMIgElcJeEARgL+LJUoW8SfOg24bVIL7/upEnt aputoTE64vHA/9JlQQBMJgH+pOJfacGFtqAHZdL40ubM9NLqgfJ7k9tjbogd1wY0 geQhW3ioctxGZHKRtbWjJrl7cIQIEE5ppJ67jL/Trz/I6EitZ60skQcM3DG2FuD0 uaceHP0UrHVSHMoUC0NPOHNWpPXAyJoslPaWYR57zSHafOKnxFlzq17VklH1MhI9 J6SvbwIyh+Fa32pMPlrUa5XhQv5rk0rtRX7JHgaYbbPYJNH6MdVWfqVjC7McLCpa YAqoQhc6TeXsvobGsI2zgPF9iiY5di6+32Lr5sbvxToEcT4YjtPFDJBQCJR1p/rF 4rxk28WcWoBqLMzq+jGZik99SHFNVqmNxCIwP2aHQ5Ac/3E/LHuIb4ecIa6EbhlB n3KeSplVCYZAr0sZ1cDGM+Lg6a/CPk2FlPi5yWyAWXB7PMLzbmkjC3fQi0v+DItm yQ0bwHZkXjsIiMc88XYq16uypGjCwYYEGAEKACYWIQTss2i4eQi/tpFNcmnvW6Tc 1anzwAUCYfBNzQIbDAUJCzN+wQAUCRDvW6Tc1anzwAkQ71uk3NWp88D35A/+Mhe/ G/j0j5g4gLDn3zHflOdzIU9UXpvj1sQobJ+FajLSwK3K/r8amHE62TbW+W7GEIAz M+O2ZS9Teuz1n3tdvW7ck5DkswOeqNHkn5eJoRoZxkEWHM8QB8NmzeCbQsGVu5MI anBht54JVlRvTvRj3q0peHNTweRGBlIzQi+Zp+/5E8EsaDTIzoRLEEvh4Iy6ER4u /ozULlVuYWOd8K5Ex+4rQGaIR8WHfs4nz3IkMlEMOD9IVntF0lXMCTfsc/NTYQOV 9C+o5bMvRvMUJsfJN+wTkygKmrTyHrEpZOJc0zblV5p26yBhrL82DuOrDGYk/hD5 5nH92AKupjDYnZpVqFcjgSp3JS85hI/4BXHiFaxgjxrRvaRHVwG6Z0p2GXHrfvhw ktW0R2DJ6z8QexPtV8uhlb8pX2oSHLFzLdZqSNBSs7iXB/DuALL/kLCmOkOLXI0l 9AkThxJxjvZSGjTgO52Fz+YbLsiIx5D0Wf1YK8A/v8/T1CrM6sgwSKcH+EZPQpoP M9vkz8Z6KCzAZ0wEDzWCIiPXzMljh7Xz5CyIhlLRgR2+ywEGez8bIuX0d+vnK4cC YkIaTG67YZuFRNqcCpzJaIS158ULaDDH08PY8wqU48LhBBWCCBLXvF+RslyLXwJu G/c+++Tw0tCWW1HB2dbL+uTj+ffSGmIH968yZyM=3D =3DUt5Y -----END PGP PUBLIC KEY BLOCK----- --------------eLWus4301fLmwcHK0KgfmR0N-- --------------bWZDKLk0ix0WmjgRhzrS3fEY-- --------------8Ou8JWE8wmT6lp7gqcsZhB9Y Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature.asc" -----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEE7LNouHkIv7aRTXJp71uk3NWp88AFAmigQn8FAwAAAAAACgkQ71uk3NWp88Bj qBAAwbUW0Qr/cdzEBnkV7fGF6vOp6EfqpgR2xzsRrNB4yiBWd1jF3Z3DnEXrc8i1bnu7Fs9Lh1Yr yw1MQF6WgJRI7NIcwEBqsCZRubwam8XdljJ9iFEhCIE20lVDpZ9snPV7/iBkXO5oRZ55Vaf9pGWn rUtAKbDud1kxX2emB9r+i+LjiXUxkGc0ddLM2JkCirEAbW1toklrC6O/IgGvGsz+Bw04YZZ4dO/H G+7symJL8aj+9Esix/YQ2y1RbNLZlp+p5effuK3Bz9Qj9S3FqPG6ZfdxGD9lOvJrbatMKZKUuFMc GP053By4qG0EoZQiOM2BqtTzIpj5Uy6d6w8F3amw/0lMCLFT/ZB4fc/eeazypJnvok2UeLSyQihT OEUAM4PY0APSqz+fWhSvg9LF8mhu3Q1p1DSnzGRvF+V0/1azYvE41UBLmzxsGLynNc8BjffcE9E6 YInWC6nSiFx3Xsr56OujeU0wblsfBup1T5Hqe0+He5meQlII9/9vd3/CbhupmnmLVp2f5SnE+3uM Rb9dV9m6f4aviorm7njtEytvX4mzhx6/76XIGAQmrCyrhkCApj8q7MkaMjnMC1idHfGQ+gA99y/G hY6LeAv439EUU2TNRPZrSZOcVD54EXOzirbBsTYhRPHhrXB0FN4a6G9Og3+uCF8Ze4MNQq180PlC PTQ= =/SPH -----END PGP SIGNATURE----- --------------8Ou8JWE8wmT6lp7gqcsZhB9Y-- From nobody Sat Aug 16 09:16:19 2025 X-Original-To: dev-commits-src-main@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 4c3tdf6TGMz646C4; Sat, 16 Aug 2025 09:16:38 +0000 (UTC) (envelope-from kp@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c3tdd5Ypcz47Ms; Sat, 16 Aug 2025 09:16:37 +0000 (UTC) (envelope-from kp@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755335798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=szmoZft5vgECOzF1LNjuvUFxLGxiT1XdLvWg9u6dLzM=; b=pqtRJX81F1ySln2sDtIJCnst0at31JQiUYu7KqBjcZmlVsfQYorWPdlYmsVIYtOWGd2E3i pW3CECA4SoSIznTt5SNb9XT7QXlFBSAk0uqVCg7VvNtPRVfLofLTiTl5fZEUnC2kWpG8vB t1lkFo48xtap/cKA2aaEyX1jEWZqOTAfVtmEJ3880dhM32czEkxUEC+4RJ6hGaZGeaYuvS aZZSP0ve/2yGLFQ2Dn93MUdT+rvqQFgthZVxpQJ+AkkAaifKXqkiRiliOHgkHVTwn8l0sJ oFtrpT1RdUlBPAUGB1ZQ43g7/9iSeODe/wA/SayiPMQfd/4yXeLqbW7QWwpuZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755335797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=szmoZft5vgECOzF1LNjuvUFxLGxiT1XdLvWg9u6dLzM=; b=uFhf1kV3umaHwLoU2IG5/eoZyopdgtEva0jcN9/F5z9q/00STA60ZichCtWwfrphYl+/mB a8192Ai/t1p2AG4FZwq8nxegp/X2SHegt4YxR/5P0QGoHtZAI1jqSzQnFfQDohmG1wRDh6 Iit8NVj5xgPXQdcStFiZmgn0RnYK1t5dQgx0kHn15FqftLKZDQz59ro9Ny7htC8a59Ga4c NbkBeb2KHo1uCduXAq6Yq6EkHAcCwEbDAVBmUi+cAMlLEAibS7xljE+mNhQCnzjGnKoeV3 N7kHueHPAAFl0YqAdLZezGRxMMf/ckCXcnuqslgj7RE1+jmIAOlzZPczJv3aaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755335797; a=rsa-sha256; cv=none; b=Hjhcjie68AdELvG0tIb9rwhQx7DiikPVJSNs3MGVdYrEIqGN1ePiWeKnp8mMIQObglE5FZ NrGDTQNmlPYO0uQwMK+SXBZ3tV6s2AkUR9WY7ZTz1VFie3xczARre6SNnHNX/6q0WPgjKH 1hI0beYPqfNtOkCMntqm4+qqGLSGWwqV5vmqGBTXhXyQFbr5Dv4MtoQu3rja8Xst9/u6Cc z+jrNN8CurmykiPDLuCWpGd0jzk3Q3E9jtRtW3A1pMIY+rz38n2XtZv/iiKejfkaQOmWIP xt7sRBv5XOuHwEbwsZ2kxzlgDAcNfh+w98PD4/SfztVBLpPhW16e2usBf6z3kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (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 (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R11" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4c3tdd4GQ4zCZt; Sat, 16 Aug 2025 09:16:37 +0000 (UTC) (envelope-from kp@freebsd.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id E26DC4A80D; Sat, 16 Aug 2025 11:16:34 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Kristof Provost List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org Mime-Version: 1.0 (1.0) Subject: Re: git: bad279e12deb - main - pf: convert DIOCRDELADDRS to netlink Date: Sat, 16 Aug 2025 11:16:19 +0200 Message-Id: <36A8F5DC-AEA6-483F-A082-417E8C89EC9F@freebsd.org> References: <06c00743-d1a6-4e94-8ccb-6adaeea0e2a9@smeets.xyz> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org In-Reply-To: <06c00743-d1a6-4e94-8ccb-6adaeea0e2a9@smeets.xyz> To: Florian Smeets X-Mailer: iPhone Mail (22G86) > On 16 Aug 2025, at 10:34, Florian Smeets wrote: >=20 > =EF=BB=BFOn 06.08.25 00:28, Kristof Provost wrote: >> The branch main has been updated by kp: >> URL: https://cgit.FreeBSD.org/src/commit/?id=3Dbad279e12deb3e4e4528dbc6b0= 6f56aefb165b15 >> commit bad279e12deb3e4e4528dbc6b06f56aefb165b15 >> Author: Kristof Provost >> AuthorDate: 2025-08-01 14:18:52 +0000 >> Commit: Kristof Provost >> CommitDate: 2025-08-05 22:27:14 +0000 >> pf: convert DIOCRDELADDRS to netlink >> =20 > Hi Kristof, >=20 > this is causing issues with crowdsec. The pfctl process is using up all me= mory and gets killed by the OOM killer. >=20 > The issue appears to be trying to delete IPs that are not part of a table,= which can apparently happen with crowdsec. >=20 > root@fw:~ # /sbin/pfctl -t crowdsec-blacklists -T show|tail -1 > 223.247.218.112 > root@fw:~ # /sbin/pfctl -t crowdsec-blacklists -T delete 223.247.218.112 > 1/1 addresses deleted. > root@fw:~ # /sbin/pfctl -t crowdsec-blacklists -T show|grep 223.247.218.11= 3 > root@fw:~ # /sbin/pfctl -t crowdsec-blacklists -T delete 223.247.218.113 > load: 0.65 cmd: pfctl 26515 [runnable] 10.19r 0.75u 4.86s 32% 802128k > load: 0.78 cmd: pfctl 26515 [runnable] 17.67r 1.41u 8.19s 40% 1452576k > load: 0.89 cmd: pfctl 26515 [running] 29.14r 2.44u 13.16s 46% 2506284k >=20 Yeah, I=E2=80=99ve had other reports. Both add and delete have issues. I kno= w what the problem is. I just need to finish the test case before I can comm= it.=20 Expect it early next week.=20 =E2=80=94=20 Kristof From nobody Sat Aug 16 17:40:19 2025 X-Original-To: dev-commits-src-main@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 4c45pr2zHGz64hxV; Sat, 16 Aug 2025 17:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c45pr11qWz3sQZ; Sat, 16 Aug 2025 17:40:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755366020; 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=uvV2P9kCZ1N/RELBcy/g/Ija5s71oKILvuDAREG4cHs=; b=vy3O7OM6OqdDJhCfZJhurmZBYxwJ7x3gFkIoHjCvGIx1+9L7I2Q4D87ALWjM+Pb7+dd/Oq Kao02l25DCj/RflXZw9yGsu+s4A41nXe8RGaBUldQqypjykcmZ7mVQCy+QKw5cnofZ/+5i 6Wz/wAirsaegRMftrAlt0gg+lQOsHpkbOyd2EYqaUzrHtyxOOObG0u2kreKNecBcKvxX2o 0Vh6PirlI79IFbLx8lVv58JMcamv/t6D4WMN29Cab+5HsPqqaU316D+eFiD0CR/k+fwXNR Z0guRNdPDWhiU6jSCadJ5/qTJ2xFCUiyV9a4lm07UwCuAU3ZqgSK4Ood1hDoeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755366020; 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=uvV2P9kCZ1N/RELBcy/g/Ija5s71oKILvuDAREG4cHs=; b=pSwgCAhtZG5FDKgx9OVc0C2EL/j/oD+4PYwCoeNqBzQ79ZUJA1op59+l9E6i0DMUzsrB8G yjcHZBvkPZ85HOrIQ+ny/Up7TB4I4KTWMF9CdUviKWK8U47w0B6qUBpGWzeGV/Gae6Y6Js jfqh00unwn6oj9pa0JGGP36sql8OQ2HPJGorwV1UxQU1A3s/BBKV5AO4vbZ320tMyFxnTK FhkwyBfxWhVI1NxM6/vmMZ5Yu8NAD5j756uH9FE/MDM5gt/j+e+h2Y3d5ZZTqHnvWVAr4l Z0WjxbZUjptEqeob68ToR+ACU1avcFFJ6SpChb5v64dw7j3BMuTFPNzNw9BYrg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755366020; a=rsa-sha256; cv=none; b=wEA9pej3N7TeCWSVc7zSX05JeJvD8836h7j4ACsDX6fpTwsrZPSSwmWydrxMChPzNGMZbW /0OsMYpOlHAfJKi/DiiVs14sPJDt+qYlPyRPWyxuOzDSa0ooXcCM2W5zF1eJRFdCpgrO6S g/iWO3bqMTL9bslD5pZChuKohLV4EgGEs8V2KKks42C4q1em8b3jdjBFrmUTbGO6oGsohg bFVejQxZon105vRFGmP7BZ6tOcRMzSXjFDPjcKuu2VCEr/HnsBjKFG07gvFG52h34Rl8qu q0yYcebbjZZ11mEAjTY9iE/HhDx+ePH90fxCHoJ9iojKQQrYvH6YRRw6zRMtSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c45pr00C5zYnr; Sat, 16 Aug 2025 17:40:19 +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 57GHeJdP082378; Sat, 16 Aug 2025 17:40:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57GHeJw8082375; Sat, 16 Aug 2025 17:40:19 GMT (envelope-from git) Date: Sat, 16 Aug 2025 17:40:19 GMT Message-Id: <202508161740.57GHeJw8082375@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: b81fd3fc8b20 - main - jail: fix backfilling the "name" for jid-named jails List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: b81fd3fc8b20eaad64b5c41826432124fd92d6a7 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=b81fd3fc8b20eaad64b5c41826432124fd92d6a7 commit b81fd3fc8b20eaad64b5c41826432124fd92d6a7 Author: Kyle Evans AuthorDate: 2025-08-16 17:39:47 +0000 Commit: Kyle Evans CommitDate: 2025-08-16 17:39:59 +0000 jail: fix backfilling the "name" for jid-named jails Using the cfparam variant of add_param() will actually copy the name and flags from the passed-in param, which I hadn't considered. We actually want the name/flags from the "name" param so that we can do variable expansion against it right after that -- otherwise it cannot be found, since variable expansion actually searches by name. While we're here, `jls -e` was the intermediate name for `jls -c` that never saw the light of the day. Fix our existence test. Reviewed by: jamie Fixes: 02944d8c49 ("jail: consistently populate the KP_JID [...]") Differential Revision: https://reviews.freebsd.org/D51831 --- usr.sbin/jail/config.c | 2 +- usr.sbin/jail/tests/jail_basic_test.sh | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/usr.sbin/jail/config.c b/usr.sbin/jail/config.c index 70de82e662e7..1bad04ccde68 100644 --- a/usr.sbin/jail/config.c +++ b/usr.sbin/jail/config.c @@ -189,7 +189,7 @@ load_config(const char *cfname) * jail is created or found. */ if (j->intparams[KP_NAME] == NULL) - add_param(j, j->intparams[KP_JID], KP_NAME, NULL); + add_param(j, NULL, KP_NAME, j->name); /* Resolve any variable substitutions. */ pgen = 0; diff --git a/usr.sbin/jail/tests/jail_basic_test.sh b/usr.sbin/jail/tests/jail_basic_test.sh index 509900e8569c..6802da7b049a 100755 --- a/usr.sbin/jail/tests/jail_basic_test.sh +++ b/usr.sbin/jail/tests/jail_basic_test.sh @@ -198,7 +198,7 @@ clean_jails() fi while read jail; do - if jls -e -j "$jail"; then + if jls -c -j "$jail"; then jail -r "$jail" fi done < jails.lst @@ -211,10 +211,23 @@ jid_name_set_body() echo "basejail" >> jails.lst echo "$jid { name = basejail; persist; }" > jail.conf atf_check -o match:"$jid: created" jail -f jail.conf -c "$jid" + # Confirm that we didn't override the explicitly-set name with the jid + # as the name. + atf_check -o match:"basejail" jls -j "$jid" name + atf_check -o match:"$jid: removed" jail -f jail.conf -r "$jid" + + echo "$jid { host.hostname = \"\${name}\"; persist; }" > jail.conf + atf_check -o match:"$jid: created" jail -f jail.conf -c "$jid" + # Confirm that ${name} expanded and expanded correctly to the + # jid-implied name. + atf_check -o match:"$jid" jls -j "$jid" host.hostname atf_check -o match:"$jid: removed" jail -f jail.conf -r "$jid" echo "basejail { jid = $jid; persist; }" > jail.conf atf_check -o match:"basejail: created" jail -f jail.conf -c basejail + # Confirm that our jid assigment in the definition worked out and we + # did in-fact create the jail there. + atf_check -o match:"$jid" jls -j "basejail" jid atf_check -o match:"basejail: removed" jail -f jail.conf -r basejail } From nobody Sat Aug 16 18:08:08 2025 X-Original-To: dev-commits-src-main@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 4c46Qw4sKLz64kBc; Sat, 16 Aug 2025 18:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c46Qw3rTmz3vPF; Sat, 16 Aug 2025 18:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755367688; 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=itTHvTlJRbxjMXaXNxVvETgYxVynW+Ls2iGkzL+L7mI=; b=ZnVruJKXe9GHEk457+iZqNMAsE4MpJKkgoUj1bDYtI9oKzvV2HemfEfjozWzWZL5+GPYrC 97E64EYh+6nHv6EEsq/CZfuwz1Y8mph++TaIoTWwrOETrVi6DpsuKJOt7JTqxNtq6P8iLy /9H55e2rTBGry0iy8sCzfSm37Ig0i+ZSzAEzmysmhLiq50JS5P3AerQPCWs51lbtgaz0ZF FxnckeR3UdmeIXWr4I97l3zevRmopV8F8YGnI+ISsGlJFDw9LLnN6DqwWWBbHSkg/q5vD4 hkiksHeGjdrrt0Yg2huKwn/F09r7bkS7zpXjRfkZSI1DmK1wXS6Ax+sLsPESUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755367688; 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=itTHvTlJRbxjMXaXNxVvETgYxVynW+Ls2iGkzL+L7mI=; b=huYBSLRB31eSTEJ9xji08FyaNYnhzOfUgGe72keDd1bZkdKjx7DIqr+4sXDOGYrUXtb3Dg +7wlI2tez4XghE2ABdFLy6rPbEdnd59/AeoXLDGH//R6Cp8bvommgva2TaAQisCPRm9EYa 28GRf1j46qT2wZ8IIjIfKjF0gDfAqFz8HzKzngAwLaNVU0O7OQfpqjXRT7srLDYihLfoEQ 0NeeUEu3E70JHWXS5RVbgOFwdG2cF7uYGGMpdm9inwWxXr3QFll9IUOwhQsEJH8c/w0CY5 e4WBk4HjKvI2gu3rkhGDY8O2dOZFcu5rFLI822D+EwU/otuP8M13jduNn1k3QQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755367688; a=rsa-sha256; cv=none; b=aCFOKzB0mUYM/0hR05rFi1Sw6hDnTMTWxpscYtzwgdXvr7NAXWf4WXttr2KEoG7l5eoERX uQ6Pm9Ufjv2lPfkcAeRmscqK7ts9szfV5kgXdKr1vZ4QvLzY1sxZ/YwZWBp1oUuMsmRPC3 b9CzNhoOidkBhdYqf/8HelUCWcsMD7M31E2FOqXz6Z0NjD1gO4bn9GGDKm23LghgWTIX8i UEOAjr7BrZXjIBHMFIoxYWsPM1eCALFebKCpiMZiL/VjSK6l9AGgC8yDTd0qjCfWn9/YCf 03solefhT3PTe9HTeocwc6F94AJvw8YkI9h1Ami6cC0yeb53cmnIYm9hrJuuwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c46Qw3RXjzZsH; Sat, 16 Aug 2025 18:08:08 +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 57GI88PS030761; Sat, 16 Aug 2025 18:08:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57GI88LS030758; Sat, 16 Aug 2025 18:08:08 GMT (envelope-from git) Date: Sat, 16 Aug 2025 18:08:08 GMT Message-Id: <202508161808.57GI88LS030758@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: dd22a6853d92 - main - Belatedly bump __FreeBSD_version for setgroups/getgroups revisions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: dd22a6853d92e4b94431988cb1d7a5fa498d24ab Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=dd22a6853d92e4b94431988cb1d7a5fa498d24ab commit dd22a6853d92e4b94431988cb1d7a5fa498d24ab Author: Kyle Evans AuthorDate: 2025-08-16 18:05:28 +0000 Commit: Kyle Evans CommitDate: 2025-08-16 18:05:28 +0000 Belatedly bump __FreeBSD_version for setgroups/getgroups revisions 9da2fe96ff ("kern: fix setgroups(2) and getgroups(2) [...]") added new versions of the getgroups(2)/setgroups(2) syscalls. Requested by: cperciva --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index c410a6ee666f..89ab2b2b0ea8 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -74,7 +74,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500060 +#define __FreeBSD_version 1500061 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Sat Aug 16 18:09:23 2025 X-Original-To: dev-commits-src-main@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 4c46SN0yf5z64kNP; Sat, 16 Aug 2025 18:09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c46SN07zVz3vnn; Sat, 16 Aug 2025 18:09:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755367764; 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=jtB8sRnqnVrtVmTz9ETacDfKBtdwMu/byUjvlBYBRC0=; b=N6fGUKuR1VdMNBpnxIOZUmX5Jl8j6V5eQK9thttR7aMTlZ6IfezS1KvCbcjut1MVzTfIyP t2vF+pTroOHmGX2jkFMhYthVSGi9XdLKgGMUqJcbkojxmEJIL1dC/eyt1x916b52/INNG4 4KqezkGBPTFPyRLRzx/glAzQ+63iw9A5faEwh5olPcE5FrOuuKpvmoAUoZOzUCJbjMacy8 6CvtfmMA6fvuxIjXNYISkM+xYG4LDc56wwfQ+EokyM27BF0QCl2KIpSehVnlUR2zXaZdBu bGFKNIYpBQEs6Fi0i3crmlsY9ZGFaYjMFQFHLZXm5zOQTrkycT6/z/GiQw+cCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755367764; 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=jtB8sRnqnVrtVmTz9ETacDfKBtdwMu/byUjvlBYBRC0=; b=d/QstxUa3iaW1DiOWRF1rX6Bzu4mtIoib+zTxaNMtN2y4r0o60T+0lLn6jE8YW6PyoEdz7 JvlBuB6WECpnibwsHryBseR9ihXtKs0wTROtI0YKGq+48tJeAueCRKwAvyttag1AYWqQao 6D6emK7ylCB0NxAegZcBRSPmk62u6nQA47uC5l4Kl7rHX0LK+pNKF0V8Svtmc95y63pOsU 1kgBjK2VrxX+scqhNOGqEJdd+alg2YAJP6NMxhKhhjLQv6OQuLY3BFGKlP70osZqGtkL1D vSPw8ke8ZtmpdbaWH/n/ALWcLnwRRtS5EivlgB5tr1C/fNOG3I4+CFjOIXIOWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755367764; a=rsa-sha256; cv=none; b=AWLf/EMTdvwBD5py6mM3fb3POeF1i6WKM2DgulN9Fkv0yuG/xLFGVssPvlwVDgsAlrQAAE WYmnFXazQRbzesgHHuIj21eCt1TBMu+ZSbNwPYfPsJt8GqvZL2Auv1Skgq6UoGazHo8tlB FYqrhmZOQ1Oi1axdP0tFmCN/dbi7X8zDfJSIHhqO4oNJ5AHSSg0SiVlJiMbnHQz6wAMgdM 1LUzLEOQO5j+hquCI5+Q5WI1nZyFM4ekKpDyRS55GGEZD+7P7SPLgOUl5mXhM3mDgM2ym6 kmqb6zkWH4qepNIUYb9F0OGKH8t52+Fr4VTKhFt2rGlNJKFTpOXSKZB/FwuqMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c46SM6lPmzbb1; Sat, 16 Aug 2025 18:09: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 57GI9NMY031228; Sat, 16 Aug 2025 18:09:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57GI9NXv031225; Sat, 16 Aug 2025 18:09:23 GMT (envelope-from git) Date: Sat, 16 Aug 2025 18:09:23 GMT Message-Id: <202508161809.57GI9NXv031225@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: 2be8ce8405ed - main - ufshci: Add functions for UTP Task Management List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 2be8ce8405ed8e9a9417ca5c3198bbc9a67a825b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2be8ce8405ed8e9a9417ca5c3198bbc9a67a825b commit 2be8ce8405ed8e9a9417ca5c3198bbc9a67a825b Author: Jaeyoon Choi AuthorDate: 2025-08-16 17:40:30 +0000 Commit: Warner Losh CommitDate: 2025-08-16 18:09:15 +0000 ufshci: Add functions for UTP Task Management This commit adds UTP Task Management Request functions and revisits the UTR/UTRM construction logic. It also introduces ufshci_ctrlr_cmd_send_task_mgmt_request(), which will be used for timeout handling in a follow-up commit. Test: I temporarily added the code below to the ufshci_ctrlr_start() function to test it on a Galaxy Book S. ``` static void ufshci_ctrlr_start(struct ufshci_controller *ctrlr) { ... /* Test: Task Mangement Request */ ufshci_printf(ctrlr, "Test: Task Mangement Request\n"); struct ufshci_completion_poll_status status; status.done = 0; ufshci_ctrlr_cmd_send_task_mgmt_request(ctrlr, ufshci_completion_poll_cb, &status, UFSHCI_TASK_MGMT_FUNCTION_QUERY_TASK, 0, 0, 0); ufshci_completion_poll(&status); if (status.error) { ufshci_printf(ctrlr, "ufshci_ctrlr_cmd_send_task_mgmt_request failed!\n"); return; } uint32_t service_response; service_response = status.cpl.response_upiu.task_mgmt_response_upiu.output_param1; ufshci_printf(ctrlr, "Task Management Service Response = 0x%x\n", service_response); ... } ``` Sponsored by: Samsung Electronics Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D51506 --- sys/dev/ufshci/ufshci.h | 104 +++++++++++++++++++++++++---- sys/dev/ufshci/ufshci_ctrlr.c | 33 ++++++---- sys/dev/ufshci/ufshci_ctrlr_cmd.c | 26 ++++++++ sys/dev/ufshci/ufshci_private.h | 36 ++++++++--- sys/dev/ufshci/ufshci_req_queue.c | 123 +++++++++++++++++++++++------------ sys/dev/ufshci/ufshci_req_sdb.c | 133 +++++++++++++++++++++++++------------- 6 files changed, 337 insertions(+), 118 deletions(-) diff --git a/sys/dev/ufshci/ufshci.h b/sys/dev/ufshci/ufshci.h index 9f0faaadeb57..b96d82ff836e 100644 --- a/sys/dev/ufshci/ufshci.h +++ b/sys/dev/ufshci/ufshci.h @@ -160,19 +160,19 @@ enum ufshci_data_direction { UFSHCI_DATA_DIRECTION_RESERVED = 0b11, }; -enum ufshci_overall_command_status { - UFSHCI_OCS_SUCCESS = 0x0, - UFSHCI_OCS_INVALID_COMMAND_TABLE_ATTRIBUTES = 0x01, - UFSHCI_OCS_INVALID_PRDT_ATTRIBUTES = 0x02, - UFSHCI_OCS_MISMATCH_DATA_BUFFER_SIZE = 0x03, - UFSHCI_OCS_MISMATCH_RESPONSE_UPIU_SIZE = 0x04, - UFSHCI_OCS_COMMUNICATION_FAILURE_WITHIN_UIC_LAYERS = 0x05, - UFSHCI_OCS_ABORTED = 0x06, - UFSHCI_OCS_HOST_CONTROLLER_FATAL_ERROR = 0x07, - UFSHCI_OCS_DEVICE_FATAL_ERROR = 0x08, - UFSHCI_OCS_INVALID_CRYPTO_CONFIGURATION = 0x09, - UFSHCI_OCS_GENERAL_CRYPTO_ERROR = 0x0A, - UFSHCI_OCS_INVALID = 0xF, +enum ufshci_utr_overall_command_status { + UFSHCI_UTR_OCS_SUCCESS = 0x0, + UFSHCI_UTR_OCS_INVALID_COMMAND_TABLE_ATTRIBUTES = 0x01, + UFSHCI_UTR_OCS_INVALID_PRDT_ATTRIBUTES = 0x02, + UFSHCI_UTR_OCS_MISMATCH_DATA_BUFFER_SIZE = 0x03, + UFSHCI_UTR_OCS_MISMATCH_RESPONSE_UPIU_SIZE = 0x04, + UFSHCI_UTR_OCS_COMMUNICATION_FAILURE_WITHIN_UIC_LAYERS = 0x05, + UFSHCI_UTR_OCS_ABORTED = 0x06, + UFSHCI_UTR_OCS_HOST_CONTROLLER_FATAL_ERROR = 0x07, + UFSHCI_UTR_OCS_DEVICE_FATAL_ERROR = 0x08, + UFSHCI_UTR_OCS_INVALID_CRYPTO_CONFIGURATION = 0x09, + UFSHCI_UTR_OCS_GENERAL_CRYPTO_ERROR = 0x0A, + UFSHCI_UTR_OCS_INVALID = 0xF, }; struct ufshci_utp_xfer_req_desc { @@ -271,6 +271,18 @@ _Static_assert(sizeof(struct ufshci_utp_cmd_desc) == #define UFSHCI_UTP_TASK_MGMT_REQ_SIZE 32 #define UFSHCI_UTP_TASK_MGMT_RESP_SIZE 32 +enum ufshci_utmr_overall_command_status { + UFSHCI_UTMR_OCS_SUCCESS = 0x0, + UFSHCI_UTMR_OCS_INVALID_TASK_MANAGEMENT_FUNCTION_ATTRIBUTES = 0x01, + UFSHCI_UTMR_OCS_MISMATCH_TASK_MANAGEMENT_REQUEST_SIZE = 0x02, + UFSHCI_UTMR_OCS_MISMATCH_TASK_MANAGEMENT_RESPONSE_SIZE = 0x03, + UFSHCI_UTMR_OCS_PEER_COMMUNICATION_FAILURE = 0x04, + UFSHCI_UTMR_OCS_ABORTED = 0x05, + UFSHCI_UTMR_OCS_FATAL_ERROR = 0x06, + UFSHCI_UTMR_OCS_DEVICE_FATAL_ERROR = 0x07, + UFSHCI_UTMR_OCS_INVALID = 0xF, +}; + /* UFSHCI spec 4.1, section 6.3.1 "UTP Task Management Request Descriptor" */ struct ufshci_utp_task_mgmt_req_desc { /* dword 0 */ @@ -356,6 +368,7 @@ struct ufshci_upiu { _Static_assert(sizeof(struct ufshci_upiu) == 512, "ufshci_upiu must be 512 bytes"); +/* UFS Spec 4.1, section 10.7.1 "COMMAND UPIU" */ struct ufshci_cmd_command_upiu { /* dword 0-2 */ struct ufshci_upiu_header header; @@ -376,6 +389,7 @@ _Static_assert(sizeof(struct ufshci_cmd_command_upiu) % UFSHCI_UPIU_ALIGNMENT == 0, "UPIU requires 64-bit alignment"); +/* UFS Spec 4.1, section 10.7.2 "RESPONSE UPIU" */ struct ufshci_cmd_response_upiu { /* dword 0-2 */ struct ufshci_upiu_header header; @@ -403,6 +417,69 @@ _Static_assert(sizeof(struct ufshci_cmd_response_upiu) % 0, "UPIU requires 64-bit alignment"); +enum task_management_function { + UFSHCI_TASK_MGMT_FUNCTION_ABORT_TASK = 0x01, + UFSHCI_TASK_MGMT_FUNCTION_ABORT_TASK_SET = 0x02, + UFSHCI_TASK_MGMT_FUNCTION_CLEAR_TASK_SET = 0x04, + UFSHCI_TASK_MGMT_FUNCTION_LOGICAL_UNIT_RESET = 0x08, + UFSHCI_TASK_MGMT_FUNCTION_QUERY_TASK = 0x80, + UFSHCI_TASK_MGMT_FUNCTION_QUERY_TASKSET = 0x81, +}; + +/* UFS Spec 4.1, section 10.7.6 "TASK MANAGEMENT REQUEST UPIU" */ +struct ufshci_task_mgmt_request_upiu { + /* dword 0-2 */ + struct ufshci_upiu_header header; + /* dword 3 */ + uint32_t input_param1; /* (Big-endian) */ + /* dword 4 */ + uint32_t input_param2; /* (Big-endian) */ + /* dword 5 */ + uint32_t input_param3; /* (Big-endian) */ + /* dword 6-7 */ + uint8_t reserved[8]; +} __packed __aligned(4); + +_Static_assert(sizeof(struct ufshci_task_mgmt_request_upiu) == 32, + "bad size for ufshci_task_mgmt_request_upiu"); +_Static_assert(sizeof(struct ufshci_task_mgmt_request_upiu) <= + UFSHCI_UTP_XFER_RESP_SIZE, + "bad size for ufshci_task_mgmt_request_upiu"); +_Static_assert(sizeof(struct ufshci_task_mgmt_request_upiu) % + UFSHCI_UPIU_ALIGNMENT == + 0, + "UPIU requires 64-bit alignment"); + +enum task_management_service_response { + UFSHCI_TASK_MGMT_SERVICE_RESPONSE_FUNCTION_COMPLETE = 0x00, + UFSHCI_TASK_MGMT_SERVICE_RESPONSE_FUNCTION_NOT_SUPPORTED = 0x04, + UFSHCI_TASK_MGMT_SERVICE_RESPONSE_FUNCTION_FAILED = 0x05, + UFSHCI_TASK_MGMT_SERVICE_RESPONSE_FUNCTION_SUCCEEDED = 0x08, + UFSHCI_TASK_MGMT_SERVICE_RESPONSE_INCORRECT_LUN = 0x09, +}; + +/* UFS Spec 4.1, section 10.7.7 "TASK MANAGEMENT RESPONSE UPIU" */ +struct ufshci_task_mgmt_response_upiu { + /* dword 0-2 */ + struct ufshci_upiu_header header; + /* dword 3 */ + uint32_t output_param1; /* (Big-endian) */ + /* dword 4 */ + uint32_t output_param2; /* (Big-endian) */ + /* dword 5-7 */ + uint8_t reserved[12]; +} __packed __aligned(4); + +_Static_assert(sizeof(struct ufshci_task_mgmt_response_upiu) == 32, + "bad size for ufshci_task_mgmt_response_upiu"); +_Static_assert(sizeof(struct ufshci_task_mgmt_response_upiu) <= + UFSHCI_UTP_XFER_RESP_SIZE, + "bad size for ufshci_task_mgmt_response_upiu"); +_Static_assert(sizeof(struct ufshci_task_mgmt_response_upiu) % + UFSHCI_UPIU_ALIGNMENT == + 0, + "UPIU requires 64-bit alignment"); + /* UFS Spec 4.1, section 10.7.8 "QUERY REQUEST UPIU" */ enum ufshci_query_function { UFSHCI_QUERY_FUNC_STANDARD_READ_REQUEST = 0x01, @@ -554,6 +631,7 @@ union ufshci_reponse_upiu { struct ufshci_upiu_header header; struct ufshci_cmd_response_upiu cmd_response_upiu; struct ufshci_query_response_upiu query_response_upiu; + struct ufshci_task_mgmt_response_upiu task_mgmt_response_upiu; struct ufshci_nop_in_upiu nop_in_upiu; }; diff --git a/sys/dev/ufshci/ufshci_ctrlr.c b/sys/dev/ufshci/ufshci_ctrlr.c index 55d8363d3287..37bd32665b2b 100644 --- a/sys/dev/ufshci/ufshci_ctrlr.c +++ b/sys/dev/ufshci/ufshci_ctrlr.c @@ -154,12 +154,12 @@ ufshci_ctrlr_construct(struct ufshci_controller *ctrlr, device_t dev) /* TODO: Initialize interrupt Aggregation Control Register (UTRIACR) */ /* Allocate and initialize UTP Task Management Request List. */ - error = ufshci_utm_req_queue_construct(ctrlr); + error = ufshci_utmr_req_queue_construct(ctrlr); if (error) return (error); /* Allocate and initialize UTP Transfer Request List or SQ/CQ. */ - error = ufshci_ut_req_queue_construct(ctrlr); + error = ufshci_utr_req_queue_construct(ctrlr); if (error) return (error); @@ -179,8 +179,8 @@ ufshci_ctrlr_destruct(struct ufshci_controller *ctrlr, device_t dev) /* TODO: Flush In-flight IOs */ /* Release resources */ - ufshci_utm_req_queue_destroy(ctrlr); - ufshci_ut_req_queue_destroy(ctrlr); + ufshci_utmr_req_queue_destroy(ctrlr); + ufshci_utr_req_queue_destroy(ctrlr); if (ctrlr->tag) bus_teardown_intr(ctrlr->dev, ctrlr->res, ctrlr->tag); @@ -215,8 +215,8 @@ ufshci_ctrlr_reset(struct ufshci_controller *ctrlr) ufshci_mmio_write_4(ctrlr, ie, 0); /* Release resources */ - ufshci_utm_req_queue_destroy(ctrlr); - ufshci_ut_req_queue_destroy(ctrlr); + ufshci_utmr_req_queue_destroy(ctrlr); + ufshci_utr_req_queue_destroy(ctrlr); /* Reset Host Controller */ error = ufshci_ctrlr_enable_host_ctrlr(ctrlr); @@ -232,18 +232,27 @@ ufshci_ctrlr_reset(struct ufshci_controller *ctrlr) ufshci_mmio_write_4(ctrlr, ie, ie); /* Allocate and initialize UTP Task Management Request List. */ - error = ufshci_utm_req_queue_construct(ctrlr); + error = ufshci_utmr_req_queue_construct(ctrlr); if (error) return (error); /* Allocate and initialize UTP Transfer Request List or SQ/CQ. */ - error = ufshci_ut_req_queue_construct(ctrlr); + error = ufshci_utr_req_queue_construct(ctrlr); if (error) return (error); return (0); } +int +ufshci_ctrlr_submit_task_mgmt_request(struct ufshci_controller *ctrlr, + struct ufshci_request *req) +{ + return ( + ufshci_req_queue_submit_request(&ctrlr->task_mgmt_req_queue, req, + /*is_admin*/ false)); +} + int ufshci_ctrlr_submit_admin_request(struct ufshci_controller *ctrlr, struct ufshci_request *req) @@ -360,8 +369,8 @@ ufshci_ctrlr_start_config_hook(void *arg) TSENTER(); - if (ufshci_utm_req_queue_enable(ctrlr) == 0 && - ufshci_ut_req_queue_enable(ctrlr) == 0) + if (ufshci_utmr_req_queue_enable(ctrlr) == 0 && + ufshci_utr_req_queue_enable(ctrlr) == 0) ufshci_ctrlr_start(ctrlr); else ufshci_ctrlr_fail(ctrlr, false); @@ -445,9 +454,9 @@ ufshci_ctrlr_poll(struct ufshci_controller *ctrlr) } /* UTP Task Management Request Completion Status */ if (is & UFSHCIM(UFSHCI_IS_REG_UTMRCS)) { - ufshci_printf(ctrlr, "TODO: Implement UTMR completion\n"); ufshci_mmio_write_4(ctrlr, is, UFSHCIM(UFSHCI_IS_REG_UTMRCS)); - /* TODO: Implement UTMR completion */ + ufshci_req_queue_process_completions( + &ctrlr->task_mgmt_req_queue); } /* UTP Transfer Request Completion Status */ if (is & UFSHCIM(UFSHCI_IS_REG_UTRCS)) { diff --git a/sys/dev/ufshci/ufshci_ctrlr_cmd.c b/sys/dev/ufshci/ufshci_ctrlr_cmd.c index ddf28c58fa88..71d163d998af 100644 --- a/sys/dev/ufshci/ufshci_ctrlr_cmd.c +++ b/sys/dev/ufshci/ufshci_ctrlr_cmd.c @@ -7,6 +7,32 @@ #include "ufshci_private.h" +void +ufshci_ctrlr_cmd_send_task_mgmt_request(struct ufshci_controller *ctrlr, + ufshci_cb_fn_t cb_fn, void *cb_arg, uint8_t function, uint8_t lun, + uint8_t task_tag, uint8_t iid) +{ + struct ufshci_request *req; + struct ufshci_task_mgmt_request_upiu *upiu; + + req = ufshci_allocate_request_vaddr(NULL, 0, M_WAITOK, cb_fn, cb_arg); + + req->request_size = sizeof(struct ufshci_task_mgmt_request_upiu); + req->response_size = sizeof(struct ufshci_task_mgmt_response_upiu); + + upiu = (struct ufshci_task_mgmt_request_upiu *)&req->request_upiu; + memset(upiu, 0, req->request_size); + upiu->header.trans_type = + UFSHCI_UPIU_TRANSACTION_CODE_TASK_MANAGEMENT_REQUEST; + upiu->header.lun = lun; + upiu->header.ext_iid_or_function = function; + upiu->input_param1 = lun; + upiu->input_param2 = task_tag; + upiu->input_param3 = iid; + + ufshci_ctrlr_submit_task_mgmt_request(ctrlr, req); +} + void ufshci_ctrlr_cmd_send_nop(struct ufshci_controller *ctrlr, ufshci_cb_fn_t cb_fn, void *cb_arg) diff --git a/sys/dev/ufshci/ufshci_private.h b/sys/dev/ufshci/ufshci_private.h index ac58d44102a0..1a2742ae2e80 100644 --- a/sys/dev/ufshci/ufshci_private.h +++ b/sys/dev/ufshci/ufshci_private.h @@ -125,6 +125,8 @@ struct ufshci_qops { struct ufshci_tracker **tr); void (*ring_doorbell)(struct ufshci_controller *ctrlr, struct ufshci_tracker *tr); + bool (*is_doorbell_cleared)(struct ufshci_controller *ctrlr, + uint8_t slot); void (*clear_cpl_ntf)(struct ufshci_controller *ctrlr, struct ufshci_tracker *tr); bool (*process_cpl)(struct ufshci_req_queue *req_queue); @@ -143,7 +145,10 @@ struct ufshci_hw_queue { int domain; int cpu; - struct ufshci_utp_xfer_req_desc *utrd; + union { + struct ufshci_utp_xfer_req_desc *utrd; + struct ufshci_utp_task_mgmt_req_desc *utmrd; + }; bus_dma_tag_t dma_tag_queue; bus_dmamap_t queuemem_map; @@ -333,6 +338,8 @@ int ufshci_ctrlr_reset(struct ufshci_controller *ctrlr); void ufshci_ctrlr_start_config_hook(void *arg); void ufshci_ctrlr_poll(struct ufshci_controller *ctrlr); +int ufshci_ctrlr_submit_task_mgmt_request(struct ufshci_controller *ctrlr, + struct ufshci_request *req); int ufshci_ctrlr_submit_admin_request(struct ufshci_controller *ctrlr, struct ufshci_request *req); int ufshci_ctrlr_submit_io_request(struct ufshci_controller *ctrlr, @@ -351,6 +358,9 @@ int ufshci_dev_init_ufs_power_mode(struct ufshci_controller *ctrlr); int ufshci_dev_get_descriptor(struct ufshci_controller *ctrlr); /* Controller Command */ +void ufshci_ctrlr_cmd_send_task_mgmt_request(struct ufshci_controller *ctrlr, + ufshci_cb_fn_t cb_fn, void *cb_arg, uint8_t function, uint8_t lun, + uint8_t task_tag, uint8_t iid); void ufshci_ctrlr_cmd_send_nop(struct ufshci_controller *ctrlr, ufshci_cb_fn_t cb_fn, void *cb_arg); void ufshci_ctrlr_cmd_send_query_request(struct ufshci_controller *ctrlr, @@ -361,12 +371,12 @@ void ufshci_ctrlr_cmd_send_scsi_command(struct ufshci_controller *ctrlr, /* Request Queue */ bool ufshci_req_queue_process_completions(struct ufshci_req_queue *req_queue); -int ufshci_utm_req_queue_construct(struct ufshci_controller *ctrlr); -int ufshci_ut_req_queue_construct(struct ufshci_controller *ctrlr); -void ufshci_utm_req_queue_destroy(struct ufshci_controller *ctrlr); -void ufshci_ut_req_queue_destroy(struct ufshci_controller *ctrlr); -int ufshci_utm_req_queue_enable(struct ufshci_controller *ctrlr); -int ufshci_ut_req_queue_enable(struct ufshci_controller *ctrlr); +int ufshci_utmr_req_queue_construct(struct ufshci_controller *ctrlr); +int ufshci_utr_req_queue_construct(struct ufshci_controller *ctrlr); +void ufshci_utmr_req_queue_destroy(struct ufshci_controller *ctrlr); +void ufshci_utr_req_queue_destroy(struct ufshci_controller *ctrlr); +int ufshci_utmr_req_queue_enable(struct ufshci_controller *ctrlr); +int ufshci_utr_req_queue_enable(struct ufshci_controller *ctrlr); void ufshci_req_queue_fail(struct ufshci_controller *ctrlr, struct ufshci_hw_queue *hwq); int ufshci_req_queue_submit_request(struct ufshci_req_queue *req_queue, @@ -385,9 +395,17 @@ int ufshci_req_sdb_enable(struct ufshci_controller *ctrlr, struct ufshci_req_queue *req_queue); int ufshci_req_sdb_reserve_slot(struct ufshci_req_queue *req_queue, struct ufshci_tracker **tr); -void ufshci_req_sdb_ring_doorbell(struct ufshci_controller *ctrlr, +void ufshci_req_sdb_utmr_ring_doorbell(struct ufshci_controller *ctrlr, + struct ufshci_tracker *tr); +void ufshci_req_sdb_utr_ring_doorbell(struct ufshci_controller *ctrlr, + struct ufshci_tracker *tr); +bool ufshci_req_sdb_utmr_is_doorbell_cleared(struct ufshci_controller *ctrlr, + uint8_t slot); +bool ufshci_req_sdb_utr_is_doorbell_cleared(struct ufshci_controller *ctrlr, + uint8_t slot); +void ufshci_req_sdb_utmr_clear_cpl_ntf(struct ufshci_controller *ctrlr, struct ufshci_tracker *tr); -void ufshci_req_sdb_clear_cpl_ntf(struct ufshci_controller *ctrlr, +void ufshci_req_sdb_utr_clear_cpl_ntf(struct ufshci_controller *ctrlr, struct ufshci_tracker *tr); bool ufshci_req_sdb_process_cpl(struct ufshci_req_queue *req_queue); int ufshci_req_sdb_get_inflight_io(struct ufshci_controller *ctrlr); diff --git a/sys/dev/ufshci/ufshci_req_queue.c b/sys/dev/ufshci/ufshci_req_queue.c index cc9a2ddae768..bb6efa6d2ccc 100644 --- a/sys/dev/ufshci/ufshci_req_queue.c +++ b/sys/dev/ufshci/ufshci_req_queue.c @@ -19,21 +19,36 @@ static void ufshci_req_queue_submit_tracker(struct ufshci_req_queue *req_queue, struct ufshci_tracker *tr, enum ufshci_data_direction data_direction); -static const struct ufshci_qops sdb_qops = { +static const struct ufshci_qops sdb_utmr_qops = { .construct = ufshci_req_sdb_construct, .destroy = ufshci_req_sdb_destroy, .get_hw_queue = ufshci_req_sdb_get_hw_queue, .enable = ufshci_req_sdb_enable, .reserve_slot = ufshci_req_sdb_reserve_slot, .reserve_admin_slot = ufshci_req_sdb_reserve_slot, - .ring_doorbell = ufshci_req_sdb_ring_doorbell, - .clear_cpl_ntf = ufshci_req_sdb_clear_cpl_ntf, + .ring_doorbell = ufshci_req_sdb_utmr_ring_doorbell, + .is_doorbell_cleared = ufshci_req_sdb_utmr_is_doorbell_cleared, + .clear_cpl_ntf = ufshci_req_sdb_utmr_clear_cpl_ntf, + .process_cpl = ufshci_req_sdb_process_cpl, + .get_inflight_io = ufshci_req_sdb_get_inflight_io, +}; + +static const struct ufshci_qops sdb_utr_qops = { + .construct = ufshci_req_sdb_construct, + .destroy = ufshci_req_sdb_destroy, + .get_hw_queue = ufshci_req_sdb_get_hw_queue, + .enable = ufshci_req_sdb_enable, + .reserve_slot = ufshci_req_sdb_reserve_slot, + .reserve_admin_slot = ufshci_req_sdb_reserve_slot, + .ring_doorbell = ufshci_req_sdb_utr_ring_doorbell, + .is_doorbell_cleared = ufshci_req_sdb_utr_is_doorbell_cleared, + .clear_cpl_ntf = ufshci_req_sdb_utr_clear_cpl_ntf, .process_cpl = ufshci_req_sdb_process_cpl, .get_inflight_io = ufshci_req_sdb_get_inflight_io, }; int -ufshci_utm_req_queue_construct(struct ufshci_controller *ctrlr) +ufshci_utmr_req_queue_construct(struct ufshci_controller *ctrlr) { struct ufshci_req_queue *req_queue; int error; @@ -44,7 +59,7 @@ ufshci_utm_req_queue_construct(struct ufshci_controller *ctrlr) */ req_queue = &ctrlr->task_mgmt_req_queue; req_queue->queue_mode = UFSHCI_Q_MODE_SDB; - req_queue->qops = sdb_qops; + req_queue->qops = sdb_utmr_qops; error = req_queue->qops.construct(ctrlr, req_queue, UFSHCI_UTRM_ENTRIES, /*is_task_mgmt*/ true); @@ -53,21 +68,21 @@ ufshci_utm_req_queue_construct(struct ufshci_controller *ctrlr) } void -ufshci_utm_req_queue_destroy(struct ufshci_controller *ctrlr) +ufshci_utmr_req_queue_destroy(struct ufshci_controller *ctrlr) { ctrlr->task_mgmt_req_queue.qops.destroy(ctrlr, &ctrlr->task_mgmt_req_queue); } int -ufshci_utm_req_queue_enable(struct ufshci_controller *ctrlr) +ufshci_utmr_req_queue_enable(struct ufshci_controller *ctrlr) { return (ctrlr->task_mgmt_req_queue.qops.enable(ctrlr, &ctrlr->task_mgmt_req_queue)); } int -ufshci_ut_req_queue_construct(struct ufshci_controller *ctrlr) +ufshci_utr_req_queue_construct(struct ufshci_controller *ctrlr) { struct ufshci_req_queue *req_queue; int error; @@ -79,7 +94,7 @@ ufshci_ut_req_queue_construct(struct ufshci_controller *ctrlr) */ req_queue = &ctrlr->transfer_req_queue; req_queue->queue_mode = UFSHCI_Q_MODE_SDB; - req_queue->qops = sdb_qops; + req_queue->qops = sdb_utr_qops; error = req_queue->qops.construct(ctrlr, req_queue, UFSHCI_UTR_ENTRIES, /*is_task_mgmt*/ false); @@ -88,14 +103,14 @@ ufshci_ut_req_queue_construct(struct ufshci_controller *ctrlr) } void -ufshci_ut_req_queue_destroy(struct ufshci_controller *ctrlr) +ufshci_utr_req_queue_destroy(struct ufshci_controller *ctrlr) { ctrlr->transfer_req_queue.qops.destroy(ctrlr, &ctrlr->transfer_req_queue); } int -ufshci_ut_req_queue_enable(struct ufshci_controller *ctrlr) +ufshci_utr_req_queue_enable(struct ufshci_controller *ctrlr) { return (ctrlr->transfer_req_queue.qops.enable(ctrlr, &ctrlr->transfer_req_queue)); @@ -213,20 +228,30 @@ ufshci_req_queue_complete_tracker(struct ufshci_tracker *tr) struct ufshci_req_queue *req_queue = tr->req_queue; struct ufshci_request *req = tr->req; struct ufshci_completion cpl; - struct ufshci_utp_xfer_req_desc *desc; uint8_t ocs; bool retry, error, retriable; mtx_assert(&tr->hwq->qlock, MA_NOTOWNED); - bus_dmamap_sync(req_queue->dma_tag_ucd, req_queue->ucdmem_map, - BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + /* Copy the response from the Request Descriptor or UTP Command + * Descriptor. */ + if (req_queue->is_task_mgmt) { + cpl.size = tr->response_size; + memcpy(&cpl.response_upiu, + (void *)tr->hwq->utmrd[tr->slot_num].response_upiu, + cpl.size); - cpl.size = tr->response_size; - memcpy(&cpl.response_upiu, (void *)tr->ucd->response_upiu, cpl.size); + ocs = tr->hwq->utmrd[tr->slot_num].overall_command_status; + } else { + bus_dmamap_sync(req_queue->dma_tag_ucd, req_queue->ucdmem_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - desc = &tr->hwq->utrd[tr->slot_num]; - ocs = desc->overall_command_status; + cpl.size = tr->response_size; + memcpy(&cpl.response_upiu, (void *)tr->ucd->response_upiu, + cpl.size); + + ocs = tr->hwq->utrd[tr->slot_num].overall_command_status; + } error = ufshci_req_queue_response_is_error(req_queue, ocs, &cpl.response_upiu); @@ -358,7 +383,19 @@ ufshci_req_queue_prepare_prdt(struct ufshci_tracker *tr) } static void -ufshci_req_queue_fill_descriptor(struct ufshci_utp_xfer_req_desc *desc, +ufshci_req_queue_fill_utmr_descriptor( + struct ufshci_utp_task_mgmt_req_desc *desc, struct ufshci_request *req) +{ + memset(desc, 0, sizeof(struct ufshci_utp_task_mgmt_req_desc)); + desc->interrupt = true; + /* Set the initial value to Invalid. */ + desc->overall_command_status = UFSHCI_UTMR_OCS_INVALID; + + memcpy(desc->request_upiu, &req->request_upiu, req->request_size); +} + +static void +ufshci_req_queue_fill_utr_descriptor(struct ufshci_utp_xfer_req_desc *desc, uint8_t data_direction, const uint64_t paddr, const uint16_t response_off, const uint16_t response_len, const uint16_t prdt_off, const uint16_t prdt_entry_cnt) @@ -378,7 +415,7 @@ ufshci_req_queue_fill_descriptor(struct ufshci_utp_xfer_req_desc *desc, desc->data_direction = data_direction; desc->interrupt = true; /* Set the initial value to Invalid. */ - desc->overall_command_status = UFSHCI_OCS_INVALID; + desc->overall_command_status = UFSHCI_UTR_OCS_INVALID; desc->utp_command_descriptor_base_address = (uint32_t)(paddr & 0xffffffff); desc->utp_command_descriptor_base_address_upper = (uint32_t)(paddr >> @@ -407,26 +444,32 @@ ufshci_req_queue_submit_tracker(struct ufshci_req_queue *req_queue, /* TODO: Check timeout */ - request_len = req->request_size; - response_off = UFSHCI_UTP_XFER_REQ_SIZE; - response_len = req->response_size; - - /* Prepare UTP Command Descriptor */ - memcpy(tr->ucd, &req->request_upiu, request_len); - memset((uint8_t *)tr->ucd + response_off, 0, response_len); - - /* Prepare PRDT */ - if (req->payload_valid) - ufshci_req_queue_prepare_prdt(tr); - - bus_dmamap_sync(req_queue->dma_tag_ucd, req_queue->ucdmem_map, - BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); - - /* Prepare UTP Transfer Request Descriptor. */ - ucd_paddr = tr->ucd_bus_addr; - ufshci_req_queue_fill_descriptor(&tr->hwq->utrd[slot_num], - data_direction, ucd_paddr, response_off, response_len, tr->prdt_off, - tr->prdt_entry_cnt); + if (req_queue->is_task_mgmt) { + /* Prepare UTP Task Management Request Descriptor. */ + ufshci_req_queue_fill_utmr_descriptor(&tr->hwq->utmrd[slot_num], + req); + } else { + request_len = req->request_size; + response_off = UFSHCI_UTP_XFER_REQ_SIZE; + response_len = req->response_size; + + /* Prepare UTP Command Descriptor */ + memcpy(tr->ucd, &req->request_upiu, request_len); + memset((uint8_t *)tr->ucd + response_off, 0, response_len); + + /* Prepare PRDT */ + if (req->payload_valid) + ufshci_req_queue_prepare_prdt(tr); + + /* Prepare UTP Transfer Request Descriptor. */ + ucd_paddr = tr->ucd_bus_addr; + ufshci_req_queue_fill_utr_descriptor(&tr->hwq->utrd[slot_num], + data_direction, ucd_paddr, response_off, response_len, + tr->prdt_off, tr->prdt_entry_cnt); + + bus_dmamap_sync(req_queue->dma_tag_ucd, req_queue->ucdmem_map, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); + } bus_dmamap_sync(tr->hwq->dma_tag_queue, tr->hwq->queuemem_map, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); diff --git a/sys/dev/ufshci/ufshci_req_sdb.c b/sys/dev/ufshci/ufshci_req_sdb.c index b1f303afaef5..834a459d48e3 100644 --- a/sys/dev/ufshci/ufshci_req_sdb.c +++ b/sys/dev/ufshci/ufshci_req_sdb.c @@ -26,12 +26,6 @@ ufshci_req_sdb_cmd_desc_destroy(struct ufshci_req_queue *req_queue) tr = hwq->act_tr[i]; bus_dmamap_destroy(req_queue->dma_tag_payload, tr->payload_dma_map); - free(tr, M_UFSHCI); - } - - if (hwq->act_tr) { - free(hwq->act_tr, M_UFSHCI); - hwq->act_tr = NULL; } if (req_queue->ucd) { @@ -76,7 +70,6 @@ ufshci_req_sdb_cmd_desc_construct(struct ufshci_req_queue *req_queue, uint32_t num_entries, struct ufshci_controller *ctrlr) { struct ufshci_hw_queue *hwq = &req_queue->hwq[UFSHCI_SDB_Q]; - struct ufshci_tracker *tr; size_t ucd_allocsz, payload_allocsz; uint8_t *ucdmem; int i, error; @@ -134,27 +127,14 @@ ufshci_req_sdb_cmd_desc_construct(struct ufshci_req_queue *req_queue, goto out; } - hwq->act_tr = malloc_domainset(sizeof(struct ufshci_tracker *) * - req_queue->num_entries, - M_UFSHCI, DOMAINSET_PREF(req_queue->domain), M_ZERO | M_WAITOK); - for (i = 0; i < req_queue->num_trackers; i++) { - tr = malloc_domainset(sizeof(struct ufshci_tracker), M_UFSHCI, - DOMAINSET_PREF(req_queue->domain), M_ZERO | M_WAITOK); - bus_dmamap_create(req_queue->dma_tag_payload, 0, - &tr->payload_dma_map); + &hwq->act_tr[i]->payload_dma_map); - tr->req_queue = req_queue; - tr->slot_num = i; - tr->slot_state = UFSHCI_SLOT_STATE_FREE; - - tr->ucd = (struct ufshci_utp_cmd_desc *)ucdmem; - tr->ucd_bus_addr = hwq->ucd_bus_addr[i]; + hwq->act_tr[i]->ucd = (struct ufshci_utp_cmd_desc *)ucdmem; + hwq->act_tr[i]->ucd_bus_addr = hwq->ucd_bus_addr[i]; ucdmem += sizeof(struct ufshci_utp_cmd_desc); - - hwq->act_tr[i] = tr; } return (0); @@ -163,25 +143,16 @@ out: return (ENOMEM); } -static bool -ufshci_req_sdb_is_doorbell_cleared(struct ufshci_controller *ctrlr, - uint8_t slot) -{ - uint32_t utrldbr; - - utrldbr = ufshci_mmio_read_4(ctrlr, utrldbr); - return (!(utrldbr & (1 << slot))); -} - int ufshci_req_sdb_construct(struct ufshci_controller *ctrlr, struct ufshci_req_queue *req_queue, uint32_t num_entries, bool is_task_mgmt) { struct ufshci_hw_queue *hwq; - size_t allocsz; + size_t desc_size, alloc_size; uint64_t queuemem_phys; uint8_t *queuemem; - int error; + struct ufshci_tracker *tr; + int i, error; req_queue->ctrlr = ctrlr; req_queue->is_task_mgmt = is_task_mgmt; @@ -209,10 +180,13 @@ ufshci_req_sdb_construct(struct ufshci_controller *ctrlr, * Descriptor (UTRD) or UTP Task Management Request Descriptor (UTMRD)) * Note: UTRD/UTMRD format is restricted to 1024-byte alignment. */ - allocsz = num_entries * sizeof(struct ufshci_utp_xfer_req_desc); + desc_size = is_task_mgmt ? + sizeof(struct ufshci_utp_task_mgmt_req_desc) : + sizeof(struct ufshci_utp_xfer_req_desc); + alloc_size = num_entries * desc_size; error = bus_dma_tag_create(bus_get_dma_tag(ctrlr->dev), 1024, ctrlr->page_size, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, - allocsz, 1, allocsz, 0, NULL, NULL, &hwq->dma_tag_queue); + alloc_size, 1, alloc_size, 0, NULL, NULL, &hwq->dma_tag_queue); if (error != 0) { ufshci_printf(ctrlr, "request queue tag create failed %d\n", error); @@ -227,7 +201,7 @@ ufshci_req_sdb_construct(struct ufshci_controller *ctrlr, } if (bus_dmamap_load(hwq->dma_tag_queue, hwq->queuemem_map, queuemem, - allocsz, ufshci_single_map, &queuemem_phys, 0) != 0) { + alloc_size, ufshci_single_map, &queuemem_phys, 0) != 0) { ufshci_printf(ctrlr, "failed to load request queue memory\n"); bus_dmamem_free(hwq->dma_tag_queue, hwq->utrd, hwq->queuemem_map); @@ -238,13 +212,30 @@ ufshci_req_sdb_construct(struct ufshci_controller *ctrlr, hwq->num_intr_handler_calls = 0; hwq->num_retries = 0; hwq->num_failures = 0; - hwq->utrd = (struct ufshci_utp_xfer_req_desc *)queuemem; hwq->req_queue_addr = queuemem_phys; + /* Allocate trackers */ + hwq->act_tr = malloc_domainset(sizeof(struct ufshci_tracker *) * + req_queue->num_entries, + M_UFSHCI, DOMAINSET_PREF(req_queue->domain), M_ZERO | M_WAITOK); + + for (i = 0; i < req_queue->num_trackers; i++) { + tr = malloc_domainset(sizeof(struct ufshci_tracker), M_UFSHCI, + DOMAINSET_PREF(req_queue->domain), M_ZERO | M_WAITOK); + + tr->req_queue = req_queue; + tr->slot_num = i; + tr->slot_state = UFSHCI_SLOT_STATE_FREE; + + hwq->act_tr[i] = tr; + } + if (is_task_mgmt) { /* UTP Task Management Request (UTMR) */ uint32_t utmrlba, utmrlbau; + hwq->utmrd = (struct ufshci_utp_task_mgmt_req_desc *)queuemem; + utmrlba = hwq->req_queue_addr & 0xffffffff; utmrlbau = hwq->req_queue_addr >> 32; ufshci_mmio_write_4(ctrlr, utmrlba, utmrlba); @@ -253,6 +244,8 @@ ufshci_req_sdb_construct(struct ufshci_controller *ctrlr, /* UTP Transfer Request (UTR) */ uint32_t utrlba, utrlbau; + hwq->utrd = (struct ufshci_utp_xfer_req_desc *)queuemem; + /* * Allocate physical memory for the command descriptor. * UTP Transfer Request (UTR) requires memory for a separate @@ -284,10 +277,22 @@ ufshci_req_sdb_destroy(struct ufshci_controller *ctrlr, struct ufshci_req_queue *req_queue) { struct ufshci_hw_queue *hwq = &req_queue->hwq[UFSHCI_SDB_Q]; + struct ufshci_tracker *tr; + int i; if (!req_queue->is_task_mgmt) ufshci_req_sdb_cmd_desc_destroy(&ctrlr->transfer_req_queue); + for (i = 0; i < req_queue->num_trackers; i++) { + tr = hwq->act_tr[i]; + free(tr, M_UFSHCI); + } + + if (hwq->act_tr) { + free(hwq->act_tr, M_UFSHCI); + hwq->act_tr = NULL; + } + if (hwq->utrd != NULL) { bus_dmamap_unload(hwq->dma_tag_queue, hwq->queuemem_map); bus_dmamem_free(hwq->dma_tag_queue, hwq->utrd, @@ -389,7 +394,18 @@ ufshci_req_sdb_reserve_slot(struct ufshci_req_queue *req_queue, } void -ufshci_req_sdb_clear_cpl_ntf(struct ufshci_controller *ctrlr, +ufshci_req_sdb_utmr_clear_cpl_ntf(struct ufshci_controller *ctrlr, + struct ufshci_tracker *tr) +{ + /* + * NOP + * UTP Task Management does not have a Completion Notification + * Register. + */ +} + +void +ufshci_req_sdb_utr_clear_cpl_ntf(struct ufshci_controller *ctrlr, struct ufshci_tracker *tr) { uint32_t utrlcnr; @@ -399,7 +415,19 @@ ufshci_req_sdb_clear_cpl_ntf(struct ufshci_controller *ctrlr, } void -ufshci_req_sdb_ring_doorbell(struct ufshci_controller *ctrlr, +ufshci_req_sdb_utmr_ring_doorbell(struct ufshci_controller *ctrlr, + struct ufshci_tracker *tr) +{ + uint32_t utmrldbr = 0; + + utmrldbr |= 1 << tr->slot_num; + ufshci_mmio_write_4(ctrlr, utmrldbr, utmrldbr); + + tr->req_queue->hwq[UFSHCI_SDB_Q].num_cmds++; +} + +void +ufshci_req_sdb_utr_ring_doorbell(struct ufshci_controller *ctrlr, struct ufshci_tracker *tr) { uint32_t utrldbr = 0; @@ -408,9 +436,26 @@ ufshci_req_sdb_ring_doorbell(struct ufshci_controller *ctrlr, ufshci_mmio_write_4(ctrlr, utrldbr, utrldbr); tr->req_queue->hwq[UFSHCI_SDB_Q].num_cmds++; +} + +bool +ufshci_req_sdb_utmr_is_doorbell_cleared(struct ufshci_controller *ctrlr, + uint8_t slot) +{ + uint32_t utmrldbr; + + utmrldbr = ufshci_mmio_read_4(ctrlr, utmrldbr); + return (!(utmrldbr & (1 << slot))); +} - // utrldbr = ufshci_mmio_read_4(ctrlr, utrldbr); - // printf("DB=0x%08x\n", utrldbr); +bool +ufshci_req_sdb_utr_is_doorbell_cleared(struct ufshci_controller *ctrlr, + uint8_t slot) +{ + uint32_t utrldbr; + + utrldbr = ufshci_mmio_read_4(ctrlr, utrldbr); + return (!(utrldbr & (1 << slot))); } bool @@ -435,7 +480,7 @@ ufshci_req_sdb_process_cpl(struct ufshci_req_queue *req_queue) * is cleared. */ if (tr->slot_state == UFSHCI_SLOT_STATE_SCHEDULED && - ufshci_req_sdb_is_doorbell_cleared(req_queue->ctrlr, + req_queue->qops.is_doorbell_cleared(req_queue->ctrlr, slot)) { ufshci_req_queue_complete_tracker(tr); done = true; From nobody Sat Aug 16 18:09:24 2025 X-Original-To: dev-commits-src-main@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 4c46SP2N5gz64kk7; Sat, 16 Aug 2025 18:09: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c46SP1KTLz3vlf; Sat, 16 Aug 2025 18:09:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755367765; 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=UWFF+QDUTcxpDsK+J1AdKfwHtSTpavjEJFk2tCPdYXE=; b=pmp87tu7MWVIkcehhzryNpx7rzKkigtGhemi6XWkH0E8afj0dU6w81BrIvGpdFhr4/IjIB mNi9SDoWgZtvTrLYjwedHHm1oWQ2vFu9ehuHD6XTAP+OSjKrdjRhdFhN5lH1aKCbLv3Xvk h64/nzjqMfBb7a3K/BkNMv2k6pZRnsjfnNsWyPrHkPqApK4Mq+aRt6HMg78s3dSrcKZkMi vbmACxcXRheiLR8wWYsG5FfnUVrw/c+nvtg5Lc2nATOku3LVw4d3goXunIcb5PVIuYX1rd 2wAQPe7KJO8ihfFMlzLQuoZ6T1+pe9Hmf3g9xmfetfUTAIPLCGV76Y+iwCH2IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755367765; 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=UWFF+QDUTcxpDsK+J1AdKfwHtSTpavjEJFk2tCPdYXE=; b=BPTh+1y/tguiVvPF563dUZkvjT1Tp2hqCvvUt/dZ9UGkDugRCJVi1+5Qax1FjZtENo3bp5 903d/DMYrMnj5xoQxOxDljpzRxW2xsTBaSt7ng99GmNjXIm5LoKYJkyL6xLahIy6E5D2QF JlNspSuNz3MNQ/O2t5vUgPY5xr0RuKibQbyNcQmd7seRdYnkpf5BnPB/Ocg+NYqGyItMCh G5mQZQpAYkv9wkfAhWwVEVT4HhisWmH72+RSYXAP1WpGwyAy+hbLKIfXw9I8CfDwSMcvb+ 7VDJVrzPuD/ybw4S1ZzS4Semz1iS89jlU7hRLJWGxMAnIlwPyCzwx+F4P2eHqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755367765; a=rsa-sha256; cv=none; b=I2GDF2scMEKvSi8Utt3AamyrR7an0kPmRkZgAVZN+PzfupWcQ/riHBP1U2LHYCgo13hB1p 6dtXLDVQxyvEFYa0ky3/hfMgNdvV6mwafAEe+kZlJ/9bnzEr5MqLkMKY78EM6NVm5eR9AE zswGrbgzhiwNu+absriPTAm0dnb3RmB8GQyN6oF8wenxF8h+qZ5zB1e1NBZW+vBM1QnaR8 RXm3J5oeRngyAIlX+cJDuh9KvJ4vaORuXeKBUf/Ehd6NANqPp/glVku4odJiR4+jYA0d3G Lb3b8pnq648PFIXMbTvdJ5k2sE9s/OrwpWDv9KzoUOU38E4/KMp94994Mw3WqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c46SP0JNFzb79; Sat, 16 Aug 2025 18:09: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 57GI9OMZ031261; Sat, 16 Aug 2025 18:09:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57GI9OAO031258; Sat, 16 Aug 2025 18:09:24 GMT (envelope-from git) Date: Sat, 16 Aug 2025 18:09:24 GMT Message-Id: <202508161809.57GI9OAO031258@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: 3f94fb8d6a76 - main - amd64 GENERIC: Add ufshci List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 3f94fb8d6a76c7aab76ef716eff757b5710de456 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3f94fb8d6a76c7aab76ef716eff757b5710de456 commit 3f94fb8d6a76c7aab76ef716eff757b5710de456 Author: Jaeyoon Choi AuthorDate: 2025-08-16 17:40:36 +0000 Commit: Warner Losh CommitDate: 2025-08-16 18:09:15 +0000 amd64 GENERIC: Add ufshci Sponsored by: Samsung Electronics Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D51507 --- sys/amd64/conf/GENERIC | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 385eb9667652..33f1630d4baa 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -184,6 +184,9 @@ device mrsas # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s device nvme # base NVMe driver device nvd # expose NVMe namespaces as disks, depends on nvme +# Universal Flash Storage Host Controller Interface support +device ufshci # UFS host controller + # Intel Volume Management Device (VMD) support device vmd From nobody Sat Aug 16 19:16:29 2025 X-Original-To: dev-commits-src-main@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 4c47xp3G8Fz64ntV; Sat, 16 Aug 2025 19:16:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c47xp1zVmz44D1; Sat, 16 Aug 2025 19:16:30 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755371790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v6wdfnyI5tKPRHjbKC0ghepw9YUuUamnGja+ZTGtPJc=; b=v4jyHntgcGkcyBFNGWfTkTl3j0jDYy/azgT4sA9ongNGcn7bUbApUh9umCl526HS68puJd SHsCJnMsSMVJjiZ62MYv9KdfEhSrGr7oKljqiHSia0bhki+RJvFq/NixcU85+aT9ufCMGF gmNSqtPeI5J/lptMBurpjVsopONc8kM7DhY/s4yfBIKHJX5/07repV376yPJBGa7E4Veep s6F93tOIXh0c1TfPm9yR5sqp5cFtP03hqg2GBqZPSvpBf2WAAx7uGO6dBagUYEhjDJ+aYp v/+jhbrejoGkVxHbOEcYSzAv3BYNibV2qm0EZIbIgaRizQXdUEBPi4ahvm1Pwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755371790; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v6wdfnyI5tKPRHjbKC0ghepw9YUuUamnGja+ZTGtPJc=; b=Pe0Or7CRZaKFaecRtZvOLse1xxjs3yq/x8EmP5Cucb9iLkARwe5FXXF208uLyReJkijXdX qdj0LkRuE80ER1CAJ5rMcI7yGlQ75aeetd1Cg/YU8pdFwU8GjSOYqM4fQ/IQmdY0Wjt5d2 rtddPDipz+TuyI0qGBMlmIDhp24qWAB2IU7lIn6nZZ7/Zy2UGzjtrJyjtx3+msbrp7RLwz EXpChKD1YXHXfFdI5Ku+93uLkUoSt+V2UyC7vBe6hi1iGvJWLHfqLFEj5lFkr84pU/NXCh QJ/GnKvXqwvXnrP8in+fiGLDc9Kov3V6G4hUF4yXUPGRWq356rdpD0MC/tgpAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755371790; a=rsa-sha256; cv=none; b=bBx+/udOW2ofHUeCK4521ysNdzwOkn64OJl3RoyI9SioElUmzioQw22nD2+y5dcZ7XMVDc WKQMX4SBHoy9snqAt6z4mT6nw1lccp91S+didMgjmK/+hCcLWK+PlVIqIOmlZqANw4Zp12 QL1Q6afLUArgH7FrU8wY4rtRWQfy05N0DmMr4CN61dVl6NyU0fqf9sMCsdCqwwEurbKYEG G/D2cG7U/LVkeMPLT0/937kdkW6e+aV1PeqCn4VvJeVB7JbPWhbp4avvmLN17VqD5kezxb q0Ah0nfxYn6YDG+NATcD/azUa0ssFcT6GUqazptzqsPcM9LeE3tYkdIwoXrE7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from [IPV6:2601:5c0:4202:5670:fcf9:cc75:7536:d022] (unknown [IPv6:2601:5c0:4202:5670:fcf9:cc75:7536:d022]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4c47xp0LlrzZPd; Sat, 16 Aug 2025 19:16:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <77ff46ea-fcae-4007-8de4-c2d60bb1a54f@FreeBSD.org> Date: Sat, 16 Aug 2025 15:16:29 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 9630e68f94a4 - main - ossl: Add chacha-armv8-sve.S on aarch64 Content-Language: en-US To: "Enji Cooper (yaneurabeya)" Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" References: <202508151706.57FH6DnV097322@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 8/15/25 14:04, Enji Cooper (yaneurabeya) wrote: > >> On Aug 15, 2025, at 10:06 AM, John Baldwin wrote: >> >> The branch main has been updated by jhb: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=9630e68f94a45b64087b18cc21be07ba3d3c3e8e >> >> commit 9630e68f94a45b64087b18cc21be07ba3d3c3e8e >> Author: John Baldwin >> AuthorDate: 2025-08-15 17:04:05 +0000 >> Commit: John Baldwin >> CommitDate: 2025-08-15 17:06:03 +0000 >> >> ossl: Add chacha-armv8-sve.S on aarch64 >> >> Fixes: 4757b351ea9d ("openssl: Import version 3.5.1") > > Thank you — this was on my TODO list. > I suspect other architectures still need fixing, but it’s nice having arm64 compiling again. This was all that was needed to fix `make tinderbox` for me, so I think that's the only change that was needed. -- John Baldwin From nobody Sat Aug 16 20:08:08 2025 X-Original-To: dev-commits-src-main@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 4c495N4CLGz64sW5; Sat, 16 Aug 2025 20:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c495N3VRTz4CS2; Sat, 16 Aug 2025 20:08:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755374888; 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=dDIEYruEeUvmK1YqnadwJXptrf4Cg+L1sBZs1gb57Tk=; b=NjjcBtcokNK26aOhog8NycdtGgezVQNSK3apGvnQRBIes9SfYcKx7h1EuOH7nsx48PBqwm /m8BOQmVRfeBBjFy6jKV1Am5y+fFXY+7GkrB+AoTYZmcx38+SN88U6kV8ZBqj4g8pG3ebR GkreKOlqayiO5Mlm99vv0j4Eary2HOlg6eUjvNKtqm7dPVCLnwsoPRB6Td4CGalu46XYIV /xeStuDASLBMKzRRMgL2EXILjJ5uUOj4qsbE/JosN3dYVxMx/fIWKRjrkuyv91W34SL7qc 7fNgqPRnS8gtnPLy0WUVKwI5keJGjDkDKwH3kC7BQnQsic1XjPBKcggaMfNP5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755374888; 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=dDIEYruEeUvmK1YqnadwJXptrf4Cg+L1sBZs1gb57Tk=; b=ZQU5wxh++hWBT0YmXINZKLJc6ErmbR/q+JPKFIQBhSRLwsDfgZKZSVXEczTBlL+YprxTk+ +6bhOLvtFT5fF+lLLQMLcYj1GDr+XwqXwKQ2xdXw6voa2XQOSLcMi5OKVYfXziCyZJixzP 7nMXNZh3vr7LiVZyKnJjbGiAFliRttbPNTxMg+Im1qlcQkFlmvEVdxdOp7mtt6z/1pIpTz yaajlLZzKfF/HfsUYgmUI+aIw2w8QoG27MzrNaLDo9Kk6kYPftEz5dbJ3sOeky765WWDgh 4RbRXntENgJ6cwSkFAK24vRriJW9Xnj7cplnLiAojUIpftLgLNOslSDAD8Y8eA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755374888; a=rsa-sha256; cv=none; b=gK93eVdH7bvvgl93Z3A7T+7H1ulXEv5Q5Ozi0rAfVaEXiZ+Mo+/makEoz8jjt8WILjCKaD HhW0VLtl8E3ucNPOzqKzi1cavtIt2mBVsYT4FPRoJ/UpDm6kPL+V7ZExXepG8ey744Ah72 KNlu6nbZWy5jRmlOvPPA67lJ4+mthmtr6uR//1AzW018Y/6/Wb8xNIYRrp7vpym6cZn3aL kq/4c7gGO5ieorlC+gjj0qt2O5YCKHQ7W30Vu5MUp0Zss/4pj//dIeVyMvUaWQaVOwNOpW /vNNDl/Yv27Mq6TLwJiCarwF2qJHVKPzkZIwh2O3SG9pQpCHwGEb/SKpa7JSQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c495N2zVRzdwG; Sat, 16 Aug 2025 20:08:08 +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 57GK88o2056396; Sat, 16 Aug 2025 20:08:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57GK88YE056393; Sat, 16 Aug 2025 20:08:08 GMT (envelope-from git) Date: Sat, 16 Aug 2025 20:08:08 GMT Message-Id: <202508162008.57GK88YE056393@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: fb13ae28b2e8 - main - Makefile.libcompat: Add krb5/util List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb13ae28b2e816d35b229c0d8ebadb4e322fb4eb Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=fb13ae28b2e816d35b229c0d8ebadb4e322fb4eb commit fb13ae28b2e816d35b229c0d8ebadb4e322fb4eb Author: Lexi Winter AuthorDate: 2025-08-16 19:58:18 +0000 Commit: Lexi Winter CommitDate: 2025-08-16 20:07:57 +0000 Makefile.libcompat: Add krb5/util This fixes missing libraries (libcom_err, libkrb5profile, ...) for the 32-bit build, since these libraries live in krb5/util. Reviewed by: ngie, des Differential Revision: https://reviews.freebsd.org/D51926 --- Makefile.libcompat | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile.libcompat b/Makefile.libcompat index 82ef4e9df0ac..2fdc1439b916 100644 --- a/Makefile.libcompat +++ b/Makefile.libcompat @@ -93,6 +93,7 @@ _LC_LIBDIRS.${MK_CDDL:tl}+= cddl/lib _LC_LIBDIRS.${MK_CRYPT:tl}+= secure/lib .if ${MK_MITKRB5} != "no" _LC_LIBDIRS.${MK_KERBEROS:tl}+= krb5/lib +_LC_LIBDIRS.${MK_KERBEROS:tl}+= krb5/util .else _LC_LIBDIRS.${MK_KERBEROS:tl}+= kerberos5/lib .endif From nobody Sat Aug 16 20:08:09 2025 X-Original-To: dev-commits-src-main@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 4c495P5D0Lz64s0x; Sat, 16 Aug 2025 20:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c495P4KZPz4Cd3; Sat, 16 Aug 2025 20:08:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755374889; 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=Of59Q2bN2Zg4i9EfJfX7LcSSIEEJFWwqhzs9z7qxeds=; b=eom4bYoaDqfVoHoF9zXSZdO3sTBfSmzgkjtbab2T2Q/Y3jW7bX54rb4kYYPb8yk18IvAum Yo9bkBDxYyVQwhFgSQGE88RLLwfLsGi9a7VJsvSboUzNH6MDIU9lHsJz04Pi190w4cfpj4 8XFW+hIQv0oCpb9uZlhi4l/98KlITzb3ghLN8IJBnn5Ik2XVlDdwYmiGFzQ3CfboSz9/bm qTbaB8z4JnFO/JBUTOLEWXIBe3LESHLT9mbQDmnu1Y+oxp+MjIunG7XnH6ginvJQL3dliO xSIAngpPplzghtMXlmc4jtoJqyqxoqDlK65RZV0w7i39xtIBfpKlJXiA576zJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755374889; 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=Of59Q2bN2Zg4i9EfJfX7LcSSIEEJFWwqhzs9z7qxeds=; b=J3v2eQwGtsFBICMF0S1//7dHQ0fn3xhvqtx01Ik/jhLcuRrmGfvHLVt7DFUO1RIzseS13d 4+tMdBo8PzuaG/nFHQbEmRYk66/TOMyZkCVRNEpnyYS4mt/AwzubJNC8LctHZQyZ9WKrUT YZMaQ0Wr++F2yMX3ByBPQ4Ovt/lDEYTwVSEmRtYHTZbCBI250k0SjVVQWPM0DcXK0yzlDq lZXaYRKS/1xIi1jXQTIsU+A1x/4royqGchjptsmOwtm9/ir1l/S3Hnt6nvVjjhzbHS22mB C9bKrc0oOcBXkF0iRhSPh/niGnfarccmcg7etawOAnSpfywxlnBf8VTG5WsSUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755374889; a=rsa-sha256; cv=none; b=Jmqnb6Ym+W/e5h4tH8JjeLUnnaiV2PFKZXGEqbWdYXxhv2Ha8rDptPV8iEl3lQ7CkjuYC1 SVMwiarE6fbf83cWN8sxUY/Ecvjl7KH8k8vlz67jCD0v5Pe1nDCI/HskRc3gUE5JKYGFme gOkV3/hEhvFV5f/QoHD8kY+I0uBbNBtTKwMt7+TFphJ/4OQJmhMI5gB8iZKLxwWPKz9ShY /ZYMJMyp0zFH2Zmpy96Wl25QO1NDBqCOuvOvAr3PGTXvi242nMPiV2VNVM6zG6t1FH2/Ro rgwJs9jOlS951aoGcIEfOSq0aZsgtRXo+WRw4UZ1XSR5efN5uK++9j3mLFgwyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c495P3v7NzfTk; Sat, 16 Aug 2025 20:08: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 57GK89ph056428; Sat, 16 Aug 2025 20:08:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57GK892a056425; Sat, 16 Aug 2025 20:08:09 GMT (envelope-from git) Date: Sat, 16 Aug 2025 20:08:09 GMT Message-Id: <202508162008.57GK892a056425@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 9b48774c57f4 - main - sendmail: Move libmilter to its own package List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b48774c57f4df58bdae28cd1faa77e870a760df Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=9b48774c57f4df58bdae28cd1faa77e870a760df commit 9b48774c57f4df58bdae28cd1faa77e870a760df Author: Lexi Winter AuthorDate: 2025-08-16 19:59:03 +0000 Commit: Lexi Winter CommitDate: 2025-08-16 20:07:57 +0000 sendmail: Move libmilter to its own package Many things other than sendmail itself use the milter API, for example mail/opendkim from ports. Putting the library in its own package means those applications don't need to depend on FreeBSD-sendmail. Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D51914 --- lib/libmilter/Makefile | 2 +- release/packages/ucl/libmilter-all.ucl | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/libmilter/Makefile b/lib/libmilter/Makefile index dd6a481d1a15..ff16b4d00297 100644 --- a/lib/libmilter/Makefile +++ b/lib/libmilter/Makefile @@ -1,6 +1,6 @@ .include -PACKAGE=sendmail +PACKAGE=lib${LIB} SENDMAIL_DIR=${SRCTOP}/contrib/sendmail .PATH: ${SENDMAIL_DIR}/libmilter ${SENDMAIL_DIR}/libsm diff --git a/release/packages/ucl/libmilter-all.ucl b/release/packages/ucl/libmilter-all.ucl new file mode 100644 index 000000000000..70764a3f0f8b --- /dev/null +++ b/release/packages/ucl/libmilter-all.ucl @@ -0,0 +1,6 @@ +comment = "Sendmail mail filter (milter) library" +desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 14b4a3f3efe7 - main - UPDATING: Add an entry for the libmilter package move List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 14b4a3f3efe717c16b4b7d930130bdad7f48d81f Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=14b4a3f3efe717c16b4b7d930130bdad7f48d81f commit 14b4a3f3efe717c16b4b7d930130bdad7f48d81f Author: Lexi Winter AuthorDate: 2025-08-16 20:18:28 +0000 Commit: Lexi Winter CommitDate: 2025-08-16 20:18:28 +0000 UPDATING: Add an entry for the libmilter package move --- UPDATING | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/UPDATING b/UPDATING index 43d9835e2af5..f90036c1a3ad 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250816: + Sendmail's libmilter has been moved to its own package. If you want + to compile applications that use libmilter, you should install the + FreeBSD-libmilter* packages. + + If you only have FreeBSD-sendmail installed for applications that + require libmilter, you can now remove it. + 20250815: jemalloc 5.3.0 has been committed to the tree. From nobody Sat Aug 16 23:22:25 2025 X-Original-To: dev-commits-src-main@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 4c4FPY52syz653qb; Sat, 16 Aug 2025 23:22: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4FPY1Qnpz3FMY; Sat, 16 Aug 2025 23:22:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755386545; 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=hIF3IzDJ3FDvKW5OOLjEx62U+u1U5iuZ2xKvztazXqU=; b=tBdutanH9kdULlvbfOJ47LxaopruyWiTC5c1LwWvpEh8U0MtZARc39q8X4C/mnrXjGKlRA wYdv9+vZP1gZpdrPGwE5x9mtptc3+xpoNpY8ZqdhXWo0XhIOhsd/ped5XHEOiHJYzC4tJy lvSgPnpCAolhWeR5zpzRLCQeRl5+0oL7eClJ8IJWMnyB0WhVv2JaVV42kxSlPfU0KGrdbG KZkHNrk7TLvcAPj9IBs7IoOgnNCXylB+SfAO24+fYldlejmR4I1Bc5It6E8XqNKlm7R/ca B+a9lxO1PZ7dBsZFj70503iCMenA3sk6IO2k+ZFFNCCmn4mbJU+nS7tb+nx0BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755386545; 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=hIF3IzDJ3FDvKW5OOLjEx62U+u1U5iuZ2xKvztazXqU=; b=PwvD2f6WvN4z9WwC45mSEBwSXH5f7zeLtalSCDPNCI8XFv/BzLEgrdXdIih7ha6yOnx3eY mpJYXIcWygOmraRNYLnrSqq+ogLdeRPG+hgDm1W1DxVUjTxuK1x1jyAfCJdcxpXAJcT+2b jntY/KGAJhV37ycxBIXhXX4zo7G7auZQ78WwytTHIVx4tZNZ3Vdd7703+QZBVxdzFuDqhw uFCJFMDyrmXwesXL3+dp2hPzc/7S/Jx7ZqWiNk0Lg8tNlt0XZAXpOoHNge5l96JcnVIl+C BCJqALePLQZTQNl5kdeIOIGnPGS5Ufisi6whpX4BQhXwmt2wszlXXiV7x3lGDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755386545; a=rsa-sha256; cv=none; b=o0UAnNRwyTbzdtBdBw+1oZC/2Qs4TIdQkCtlJ3ATJU813HUQ588A+BWy6j8DunmsY6MPl9 0ckI2XLMC+fB8JpevlEMVQSE8Nh9B68jHUaW70ylPAyUMYkt0+oLfyNH08+CDfaFsiXIwC 46+mArYNVGScKJTfSyx/jjfyexEdSsUTHdvAHUpu0TlCDCbDSis5frygj/EGFzx1mKVTv0 kq/1fFz/RjISSVQ/Pu+Tq3P34BZn1HTkQFr5lpTBk6CwMyJ5d7Uzt+XlNjAoa3BjiQJFKP Ugj4EfrYx70oy86dLzLfQ33QCdWjkj0ajaCKfzUXgoqjIIY83ETVzKhWM5SNCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4FPY12GvzlrG; Sat, 16 Aug 2025 23:22: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 57GNMPOq029612; Sat, 16 Aug 2025 23:22:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57GNMPpJ029609; Sat, 16 Aug 2025 23:22:25 GMT (envelope-from git) Date: Sat, 16 Aug 2025 23:22:25 GMT Message-Id: <202508162322.57GNMPpJ029609@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Igor Ostapenko Subject: git: 939fec44a793 - main - kyua: Improve required_kmods metadata List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: igoro X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 939fec44a79323ba06cf0ad60d4b69300a8abbc6 Auto-Submitted: auto-generated The branch main has been updated by igoro: URL: https://cgit.FreeBSD.org/src/commit/?id=939fec44a79323ba06cf0ad60d4b69300a8abbc6 commit 939fec44a79323ba06cf0ad60d4b69300a8abbc6 Author: Igor Ostapenko AuthorDate: 2025-08-16 23:04:15 +0000 Commit: Igor Ostapenko CommitDate: 2025-08-16 23:19:43 +0000 kyua: Improve required_kmods metadata - Make it platform agnostic - Separate FreeBSD related code - Fix tests - Make it report all non-loaded modules instead of the first occurrence only - Update kyuafile.5 man page Reviewed by: ngie MFC after: 2 weeks Pull Request: https://github.com/freebsd/kyua/pull/270 --- contrib/kyua/doc/kyuafile.5.in | 10 ++++ contrib/kyua/drivers/report_junit_test.cpp | 3 ++ contrib/kyua/engine/atf_list.cpp | 2 - contrib/kyua/engine/requirements.cpp | 57 +++++++++++------------ contrib/kyua/engine/requirements.hpp | 26 +++++++++++ contrib/kyua/integration/cmd_report_junit_test.sh | 4 ++ contrib/kyua/integration/cmd_report_test.sh | 1 + contrib/kyua/model/metadata.cpp | 16 +++---- contrib/kyua/model/metadata.hpp | 4 -- contrib/kyua/model/metadata_test.cpp | 6 ++- contrib/kyua/model/test_case_test.cpp | 2 +- contrib/kyua/model/test_program_test.cpp | 8 ++-- contrib/kyua/os/freebsd/main.cpp | 11 +++++ contrib/kyua/os/freebsd/reqs_checker_kmods.cpp | 50 ++++++++++++++++++++ contrib/kyua/os/freebsd/reqs_checker_kmods.hpp | 54 +++++++++++++++++++++ usr.bin/kyua/Makefile | 3 +- 16 files changed, 203 insertions(+), 54 deletions(-) diff --git a/contrib/kyua/doc/kyuafile.5.in b/contrib/kyua/doc/kyuafile.5.in index ae1e4fe40e32..43f00816d407 100644 --- a/contrib/kyua/doc/kyuafile.5.in +++ b/contrib/kyua/doc/kyuafile.5.in @@ -290,6 +290,16 @@ it can run. .Pp ATF: .Va require.files +.It Va required_kmods +Whitespace-separated list of kernel module names that the test requires to +be loaded before it can run. +This requirement checking is platform-dependent. +It is ignored for a non-supported platform. +Supported platforms: +.Fx . +.Pp +ATF: +.Va require.kmods .It Va required_memory Amount of physical memory that the test needs to run successfully. .Pp diff --git a/contrib/kyua/drivers/report_junit_test.cpp b/contrib/kyua/drivers/report_junit_test.cpp index 0f009c6befd3..1c0929c0fef2 100644 --- a/contrib/kyua/drivers/report_junit_test.cpp +++ b/contrib/kyua/drivers/report_junit_test.cpp @@ -70,6 +70,7 @@ static const char* const default_metadata = "required_configs is empty\n" "required_disk_space = 0\n" "required_files is empty\n" + "required_kmods is empty\n" "required_memory = 0\n" "required_programs is empty\n" "required_user is empty\n" @@ -89,6 +90,7 @@ static const char* const overriden_metadata = "required_configs is empty\n" "required_disk_space = 0\n" "required_files is empty\n" + "required_kmods is empty\n" "required_memory = 0\n" "required_programs is empty\n" "required_user is empty\n" @@ -228,6 +230,7 @@ ATF_TEST_CASE_BODY(junit_metadata__overrides) + "required_configs = config1\n" + "required_disk_space = 456\n" + "required_files = file1\n" + + "required_kmods is empty\n" + "required_memory = 123\n" + "required_programs = prog1\n" + "required_user = root\n" diff --git a/contrib/kyua/engine/atf_list.cpp b/contrib/kyua/engine/atf_list.cpp index e0c4170605d1..5c74a80be913 100644 --- a/contrib/kyua/engine/atf_list.cpp +++ b/contrib/kyua/engine/atf_list.cpp @@ -133,10 +133,8 @@ engine::parse_atf_metadata(const model::properties_map& props) mdbuilder.set_string("required_disk_space", value); } else if (name == "require.files") { mdbuilder.set_string("required_files", value); -#ifdef __FreeBSD__ } else if (name == "require.kmods") { mdbuilder.set_string("required_kmods", value); -#endif } else if (name == "require.machine") { mdbuilder.set_string("allowed_platforms", value); } else if (name == "require.memory") { diff --git a/contrib/kyua/engine/requirements.cpp b/contrib/kyua/engine/requirements.cpp index dff43e531a57..d5838b83f33a 100644 --- a/contrib/kyua/engine/requirements.cpp +++ b/contrib/kyua/engine/requirements.cpp @@ -41,10 +41,6 @@ #include "utils/sanity.hpp" #include "utils/units.hpp" -#ifdef __FreeBSD__ -#include -#endif - namespace config = utils::config; namespace fs = utils::fs; namespace passwd = utils::passwd; @@ -224,26 +220,6 @@ check_required_programs(const model::paths_set& required_programs) } -#ifdef __FreeBSD__ -/// Checks if all required kmods are loaded. -/// -/// \param required_programs Set of kmods. -/// -/// \return Empty if the required kmods are all loaded or an error -/// message otherwise. -static std::string -check_required_kmods(const model::strings_set& required_kmods) -{ - for (model::strings_set::const_iterator iter = required_kmods.begin(); - iter != required_kmods.end(); iter++) { - if (!kld_isloaded((*iter).c_str())) - return F("Required kmod '%s' not loaded") % *iter; - } - return ""; -} -#endif - - /// Checks if the current system has the specified amount of memory. /// /// \param required_memory Amount of required physical memory, or zero if not @@ -289,9 +265,29 @@ check_required_disk_space(const units::bytes& required_disk_space, } +/// List of registered extra requirement checkers. +/// +/// Use register_reqs_checker() to add an entry to this global list. +static std::vector< std::shared_ptr< engine::reqs_checker > > _reqs_checkers; + + } // anonymous namespace +const std::vector< std::shared_ptr< engine::reqs_checker > > +engine::reqs_checkers() +{ + return _reqs_checkers; +} + +void +engine::register_reqs_checker( + const std::shared_ptr< engine::reqs_checker > checker) +{ + _reqs_checkers.push_back(checker); +} + + /// Checks if all the requirements specified by the test case are met. /// /// \param md The test metadata. @@ -336,12 +332,6 @@ engine::check_reqs(const model::metadata& md, const config::tree& cfg, if (!reason.empty()) return reason; -#ifdef __FreeBSD__ - reason = check_required_kmods(md.required_kmods()); - if (!reason.empty()) - return reason; -#endif - reason = check_required_memory(md.required_memory()); if (!reason.empty()) return reason; @@ -351,6 +341,13 @@ engine::check_reqs(const model::metadata& md, const config::tree& cfg, if (!reason.empty()) return reason; + // Iterate over extra checkers registered. + for (auto& checker : engine::reqs_checkers()) { + reason = checker->exec(md, cfg, test_suite, work_directory); + if (!reason.empty()) + return reason; + } + INV(reason.empty()); return reason; } diff --git a/contrib/kyua/engine/requirements.hpp b/contrib/kyua/engine/requirements.hpp index a36a938b3034..92e80c5122aa 100644 --- a/contrib/kyua/engine/requirements.hpp +++ b/contrib/kyua/engine/requirements.hpp @@ -44,6 +44,32 @@ namespace engine { std::string check_reqs(const model::metadata&, const utils::config::tree&, const std::string&, const utils::fs::path&); +/// Abstract interface of a requirement checker. +class reqs_checker { +public: + /// Constructor. + reqs_checker() {} + + /// Destructor. + virtual ~reqs_checker() {} + + /// Run the checker. + virtual std::string exec(const model::metadata&, + const utils::config::tree&, + const std::string&, + const utils::fs::path&) const = 0; +}; + +/// Register an extra requirement checker. +/// +/// \param checker A requirement checker. +void register_reqs_checker(const std::shared_ptr< reqs_checker > checker); + +/// Returns the list of registered extra requirement checkers. +/// +/// \return A vector of pointers to extra requirement checkers. +const std::vector< std::shared_ptr< reqs_checker > > reqs_checkers(); + } // namespace engine diff --git a/contrib/kyua/integration/cmd_report_junit_test.sh b/contrib/kyua/integration/cmd_report_junit_test.sh index d86228acf7e5..49b8c5790167 100644 --- a/contrib/kyua/integration/cmd_report_junit_test.sh +++ b/contrib/kyua/integration/cmd_report_junit_test.sh @@ -104,6 +104,7 @@ is_exclusive = false required_configs is empty required_disk_space = 0 required_files is empty +required_kmods is empty required_memory = 0 required_programs is empty required_user is empty @@ -144,6 +145,7 @@ is_exclusive = false required_configs is empty required_disk_space = 0 required_files is empty +required_kmods is empty required_memory = 0 required_programs is empty required_user is empty @@ -222,6 +224,7 @@ is_exclusive = false required_configs is empty required_disk_space = 0 required_files is empty +required_kmods is empty required_memory = 0 required_programs is empty required_user is empty @@ -262,6 +265,7 @@ is_exclusive = false required_configs is empty required_disk_space = 0 required_files is empty +required_kmods is empty required_memory = 0 required_programs is empty required_user is empty diff --git a/contrib/kyua/integration/cmd_report_test.sh b/contrib/kyua/integration/cmd_report_test.sh index 8b2b97f9cb4a..1fc1932d3c47 100644 --- a/contrib/kyua/integration/cmd_report_test.sh +++ b/contrib/kyua/integration/cmd_report_test.sh @@ -258,6 +258,7 @@ Metadata: required_configs is empty required_disk_space = 0 required_files is empty + required_kmods is empty required_memory = 0 required_programs is empty required_user is empty diff --git a/contrib/kyua/model/metadata.cpp b/contrib/kyua/model/metadata.cpp index a5a9a1315964..afb31435a238 100644 --- a/contrib/kyua/model/metadata.cpp +++ b/contrib/kyua/model/metadata.cpp @@ -256,9 +256,7 @@ init_tree(config::tree& tree) tree.define< bytes_node >("required_disk_space"); tree.define< paths_set_node >("required_files"); tree.define< bytes_node >("required_memory"); -#ifdef __FreeBSD__ tree.define< config::strings_set_node >("required_kmods"); -#endif tree.define< paths_set_node >("required_programs"); tree.define< user_node >("required_user"); tree.define< delta_node >("timeout"); @@ -285,9 +283,7 @@ set_defaults(config::tree& tree) tree.set< bytes_node >("required_disk_space", units::bytes(0)); tree.set< paths_set_node >("required_files", model::paths_set()); tree.set< bytes_node >("required_memory", units::bytes(0)); -#ifdef __FreeBSD__ tree.set< config::strings_set_node >("required_kmods", model::strings_set()); -#endif tree.set< paths_set_node >("required_programs", model::paths_set()); tree.set< user_node >("required_user", ""); // TODO(jmmv): We shouldn't be setting a default timeout like this. See @@ -603,20 +599,20 @@ model::metadata::required_memory(void) const } -#ifdef __FreeBSD__ -/// Returns the list of kmods needed by the test. +/// Returns the list of kernel modules needed by the test. /// -/// \return Set of strings. +/// \return Set of kernel module names. const model::strings_set& model::metadata::required_kmods(void) const { if (_pimpl->props.is_set("required_kmods")) { - return _pimpl->props.lookup< config::strings_set_node >("required_kmods"); + return _pimpl->props.lookup< config::strings_set_node >( + "required_kmods"); } else { - return get_defaults().lookup< config::strings_set_node >("required_kmods"); + return get_defaults().lookup< config::strings_set_node >( + "required_kmods"); } } -#endif /// Returns the list of programs needed by the test. diff --git a/contrib/kyua/model/metadata.hpp b/contrib/kyua/model/metadata.hpp index 8af6c7c161af..eee7eaf0f7c4 100644 --- a/contrib/kyua/model/metadata.hpp +++ b/contrib/kyua/model/metadata.hpp @@ -76,9 +76,7 @@ public: const utils::units::bytes& required_disk_space(void) const; const paths_set& required_files(void) const; const utils::units::bytes& required_memory(void) const; -#ifdef __FreeBSD__ const strings_set& required_kmods(void) const; -#endif const paths_set& required_programs(void) const; const std::string& required_user(void) const; const utils::datetime::delta& timeout(void) const; @@ -124,9 +122,7 @@ public: metadata_builder& set_required_disk_space(const utils::units::bytes&); metadata_builder& set_required_files(const paths_set&); metadata_builder& set_required_memory(const utils::units::bytes&); -#ifdef __FreeBSD__ metadata_builder& set_required_kmods(const strings_set&); -#endif metadata_builder& set_required_programs(const paths_set&); metadata_builder& set_required_user(const std::string&); metadata_builder& set_string(const std::string&, const std::string&); diff --git a/contrib/kyua/model/metadata_test.cpp b/contrib/kyua/model/metadata_test.cpp index b4c3dff5b029..bdb1d3655c33 100644 --- a/contrib/kyua/model/metadata_test.cpp +++ b/contrib/kyua/model/metadata_test.cpp @@ -57,6 +57,7 @@ ATF_TEST_CASE_BODY(defaults) ATF_REQUIRE(md.required_configs().empty()); ATF_REQUIRE_EQ(units::bytes(0), md.required_disk_space()); ATF_REQUIRE(md.required_files().empty()); + ATF_REQUIRE(md.required_kmods().empty()); ATF_REQUIRE_EQ(units::bytes(0), md.required_memory()); ATF_REQUIRE(md.required_programs().empty()); ATF_REQUIRE(md.required_user().empty()); @@ -322,6 +323,7 @@ ATF_TEST_CASE_BODY(to_properties) props["required_configs"] = ""; props["required_disk_space"] = "0"; props["required_files"] = "bar foo"; + props["required_kmods"] = ""; props["required_memory"] = "1.00K"; props["required_programs"] = ""; props["required_user"] = ""; @@ -412,7 +414,7 @@ ATF_TEST_CASE_BODY(output__defaults) "has_cleanup='false', is_exclusive='false', " "required_configs='', " "required_disk_space='0', required_files='', " - "required_memory='0', " + "required_kmods='', required_memory='0', " "required_programs='', required_user='', timeout='300'}", str.str()); } @@ -435,7 +437,7 @@ ATF_TEST_CASE_BODY(output__some_values) "has_cleanup='false', is_exclusive='true', " "required_configs='', " "required_disk_space='0', required_files='bar foo', " - "required_memory='1.00K', " + "required_kmods='', required_memory='1.00K', " "required_programs='', required_user='', timeout='300'}", str.str()); } diff --git a/contrib/kyua/model/test_case_test.cpp b/contrib/kyua/model/test_case_test.cpp index 1e2597d1501e..29df7ee35863 100644 --- a/contrib/kyua/model/test_case_test.cpp +++ b/contrib/kyua/model/test_case_test.cpp @@ -204,7 +204,7 @@ ATF_TEST_CASE_BODY(test_case__output) "has_cleanup='false', " "is_exclusive='false', " "required_configs='', required_disk_space='0', required_files='', " - "required_memory='0', " + "required_kmods='', required_memory='0', " "required_programs='', required_user='', timeout='300'}}", str.str()); } diff --git a/contrib/kyua/model/test_program_test.cpp b/contrib/kyua/model/test_program_test.cpp index ddfbc430387c..f7a84d770fc0 100644 --- a/contrib/kyua/model/test_program_test.cpp +++ b/contrib/kyua/model/test_program_test.cpp @@ -547,7 +547,7 @@ check_output__no_test_cases(void) "description='', execenv='', execenv_jail_params='', " "has_cleanup='false', is_exclusive='false', " "required_configs='', required_disk_space='0', required_files='', " - "required_memory='0', " + "required_kmods='', required_memory='0', " "required_programs='', required_user='', timeout='300'}, " "test_cases=map()}", str.str()); @@ -597,7 +597,7 @@ check_output__some_test_cases(void) "description='', execenv='', execenv_jail_params='', " "has_cleanup='false', is_exclusive='false', " "required_configs='', required_disk_space='0', required_files='', " - "required_memory='0', " + "required_kmods='', required_memory='0', " "required_programs='', required_user='', timeout='300'}, " "test_cases=map(" "another-name=test_case{name='another-name', " @@ -605,14 +605,14 @@ check_output__some_test_cases(void) "description='', execenv='', execenv_jail_params='', " "has_cleanup='false', is_exclusive='false', " "required_configs='', required_disk_space='0', required_files='', " - "required_memory='0', " + "required_kmods='', required_memory='0', " "required_programs='', required_user='', timeout='300'}}, " "the-name=test_case{name='the-name', " "metadata=metadata{allowed_architectures='a', allowed_platforms='foo', " "custom.bar='baz', description='', execenv='', execenv_jail_params='', " "has_cleanup='false', is_exclusive='false', " "required_configs='', required_disk_space='0', required_files='', " - "required_memory='0', " + "required_kmods='', required_memory='0', " "required_programs='', required_user='', timeout='300'}})}", str.str()); } diff --git a/contrib/kyua/os/freebsd/main.cpp b/contrib/kyua/os/freebsd/main.cpp index 13e5dcf0e023..700284b64b78 100644 --- a/contrib/kyua/os/freebsd/main.cpp +++ b/contrib/kyua/os/freebsd/main.cpp @@ -31,6 +31,9 @@ #include "engine/execenv/execenv.hpp" #include "os/freebsd/execenv_jail_manager.hpp" +#include "engine/requirements.hpp" +#include "os/freebsd/reqs_checker_kmods.hpp" + namespace execenv = engine::execenv; /// FreeBSD related features initialization. @@ -50,5 +53,13 @@ freebsd::main(const int, const char* const* const) std::shared_ptr< execenv::manager >(new freebsd::execenv_jail_manager()) ); +#ifdef __FreeBSD__ + engine::register_reqs_checker( + std::shared_ptr< engine::reqs_checker >( + new freebsd::reqs_checker_kmods() + ) + ); +#endif + return 0; } diff --git a/contrib/kyua/os/freebsd/reqs_checker_kmods.cpp b/contrib/kyua/os/freebsd/reqs_checker_kmods.cpp new file mode 100644 index 000000000000..3ae3446a7815 --- /dev/null +++ b/contrib/kyua/os/freebsd/reqs_checker_kmods.cpp @@ -0,0 +1,50 @@ +// Copyright 2025 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * 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. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT +// OWNER 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 "os/freebsd/reqs_checker_kmods.hpp" + +#include "model/metadata.hpp" + +extern "C" { +#include "libutil.h" +} + +std::string +freebsd::reqs_checker_kmods::exec(const model::metadata& md, + const utils::config::tree&, + const std::string&, + const utils::fs::path&) const +{ + std::string reason = ""; + for (auto& kmod : md.required_kmods()) + if (!::kld_isloaded((kmod).c_str())) + reason += " " + kmod; + if (!reason.empty()) + reason = "Required kmods are not loaded:" + reason + "."; + return reason; +} diff --git a/contrib/kyua/os/freebsd/reqs_checker_kmods.hpp b/contrib/kyua/os/freebsd/reqs_checker_kmods.hpp new file mode 100644 index 000000000000..8c7c69e35d07 --- /dev/null +++ b/contrib/kyua/os/freebsd/reqs_checker_kmods.hpp @@ -0,0 +1,54 @@ +// Copyright 2025 The Kyua Authors. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * 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. +// * Neither the name of Google Inc. nor the names of its contributors +// may be used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT +// OWNER 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. + +/// \file os/freebsd/reqs_checker_kmods.hpp +/// FreeBSD kernel module requirement checker. + +#if !defined(FREEBSD_REQS_CHECKER_KMODS) +#define FREEBSD_REQS_CHECKER_KMODS + +#include "engine/requirements.hpp" +#include "model/metadata_fwd.hpp" +#include "utils/config/tree_fwd.hpp" +#include "utils/fs/path_fwd.hpp" + +namespace freebsd { + + +class reqs_checker_kmods : public engine::reqs_checker { +public: + std::string exec(const model::metadata&, + const utils::config::tree&, + const std::string&, + const utils::fs::path&) const; +}; + + +} // namespace freebsd + +#endif // !defined(FREEBSD_REQS_CHECKER_KMODS) diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile index a4f95f1106d9..daefedbf8bca 100644 --- a/usr.bin/kyua/Makefile +++ b/usr.bin/kyua/Makefile @@ -129,7 +129,8 @@ SRCS+= engine/atf.cpp \ engine/execenv/execenv_host.cpp SRCS+= os/freebsd/execenv_jail_manager.cpp \ - os/freebsd/main.cpp + os/freebsd/main.cpp \ + os/freebsd/reqs_checker_kmods.cpp SRCS+= store/dbtypes.cpp \ store/exceptions.cpp \ From nobody Sun Aug 17 00:26:54 2025 X-Original-To: dev-commits-src-main@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 4c4Gqy5Dx6z657J7; Sun, 17 Aug 2025 00:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4Gqy3ydqz3M8B; Sun, 17 Aug 2025 00:26:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755390414; 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=jm/92QJB2fHKhWeq2ixVCE0AJw0HYNYBtbLEbv9g2R0=; b=Rjm7jZ+i+sRSmCZ1GgaFx3POQ0X49z8l3UeZ7+GwBOUx/+9cLoNO1jbMlQ5rAnozv6weFo TkDjQPNWvg3SK39n9APhBa5uAREp45dIgJxElt8005pMzklzxIwrodFuqgJVa2dk0gdNsJ mDB0Ozg3iUieVjQLZW77XdvR+8VHdrYXBUqC5pg+MjqjxQ6gaamwVplHn88l5NnDkP9jr6 bPRZp5+NIvKX/Oq6kdgwSbTHFTRls7svbXLxaeUvPXyChsInlFbjFoKF4NnByGqB/29RqA 5FQ42kE2hCaf0k6A1uHh01EE7pML5YZGmHG+dXz5Oehs7uA12sz+R+V4O7TvYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755390414; 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=jm/92QJB2fHKhWeq2ixVCE0AJw0HYNYBtbLEbv9g2R0=; b=LjxU9suHWsuq0OZCyZkZU0i4pgb3KSP8g7RhrulUEFFaaIyjKunFxJvYYoHm/NgKXmzrip hw/x3H9wLaUcTMo3XhIZw/rqSKKP1MOZgdiIuquJecxL8XDCccOKiQwULennQwzsGRoK2D uB2B9dwR1ELdGLOpD7RHr74OOwJyOFeKvZgC7uEbXc/MM13EdnjJxT1YLZgJW9rcQCjMbj ujZxd2WjgBEMec5NcrHutOQNuhF2eaA/g4Tbf8UozcW+PwRWHtfH4hMTuIEyfEa5hoRFgJ J97jNMUe1rwTAfvRTXPDjphj8tp+ZgP1zmZ2NupmiusEysqWU1g4dNiXtAKwXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755390414; a=rsa-sha256; cv=none; b=hlg+6V/jCF0NIAw5AuUiXcPP8Q/B8SK/3O30oUEEZl6JQC0H9oW1MVa+TbDsw6n9Z4OZtr Y9vy+DQo7j1pkQJTXHc+aM7BHNda6aVRE9jzawkIb/dfHI92LLltskYsmHlYY0yiwcmtwq f/tHNTEWwxFs/XIUbVsYHs3OwaPKQ1g/FbJJcA0xAB3edqBI6C4mwNVqHnqXlqUFyIWCna EZyQJ5UY139XHXErDvZjeBaCvK+rbSBN92WNCorpytCI+GWqRA3OWFfw1E2Jxj0dlE+z2V PMmji6JSgdyNbI48+DXXP7n4o9V2uXNEjllck7MIHWjtEtTVbKAsvxYOiQKhgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4Gqy39Rtzn6y; Sun, 17 Aug 2025 00:26: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 57H0QsJT043676; Sun, 17 Aug 2025 00:26:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57H0QseT043673; Sun, 17 Aug 2025 00:26:54 GMT (envelope-from git) Date: Sun, 17 Aug 2025 00:26:54 GMT Message-Id: <202508170026.57H0QseT043673@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 31ac42b486eb - main - Revert certctl reimplementation and follow-ups List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31ac42b486ebb5609c94cfd8a9bec86e457f9b53 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=31ac42b486ebb5609c94cfd8a9bec86e457f9b53 commit 31ac42b486ebb5609c94cfd8a9bec86e457f9b53 Author: Colin Percival AuthorDate: 2025-08-17 00:17:03 +0000 Commit: Colin Percival CommitDate: 2025-08-17 00:25:49 +0000 Revert certctl reimplementation and follow-ups The reimplementation of certctl, while much needed, broke the release build and 72 hours later corrections are still under review (D51896). This revert should be reverted once that is ready to land; I just need this out of the tree temporarily because breakage is interfering with release engineering for the upcoming 15.0-RELEASE. Unsquashed reversions: Revert "etc: add missing mtree entry for certctl tests" This reverts commit f751757259158a8d3b81d4fb7576b3ebe226dece. Revert "certctl: Fix bootstrap build" This reverts commit c989e3cc3da1bfd8ac3ec5a05d1e86ab8ff719f7. Revert "certctl: Reimplement in C" This reverts commit 81d8827ad8752e35411204541f1f09df1481e417. With hat: re@ --- Makefile.inc1 | 21 +- etc/mtree/BSD.tests.dist | 2 - usr.sbin/certctl/Makefile | 11 +- usr.sbin/certctl/certctl.8 | 94 ++- usr.sbin/certctl/certctl.c | 1065 -------------------------------- usr.sbin/certctl/certctl.sh | 366 +++++++++++ usr.sbin/certctl/tests/Makefile | 5 - usr.sbin/certctl/tests/certctl.subr | 44 -- usr.sbin/certctl/tests/certctl_test.sh | 221 ------- 9 files changed, 414 insertions(+), 1415 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index cf32248b6b9d..d8853fef321b 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1021,7 +1021,8 @@ IMAKE_MTREE= MTREE_CMD="${MTREE_CMD} ${MTREEFLAGS}" .endif .if make(distributeworld) -CERTCTLDESTDIR= ${DESTDIR}/${DISTDIR}/base +CERTCTLDESTDIR= ${DESTDIR}/${DISTDIR} +CERTCTLFLAGS+= -d /base .else CERTCTLDESTDIR= ${DESTDIR} .endif @@ -1541,10 +1542,14 @@ distributeworld installworld stageworld: _installcheck_world .PHONY .endif # make(distributeworld) ${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \ ${IMAKEENV} rm -rf ${INSTALLTMP} -.if !make(packageworld) && ${MK_CAROOT} != "no" && ${MK_OPENSSL} != "no" - PATH=${TMPPATH:Q}:${PATH:Q} \ - LOCALBASE=${LOCALBASE:Q} \ - certctl ${CERTCTLFLAGS} rehash +.if !make(packageworld) && ${MK_CAROOT} != "no" + @if which openssl>/dev/null; then \ + PATH=${TMPPATH:Q}:${PATH:Q} \ + LOCALBASE=${LOCALBASE:Q} \ + sh ${SRCTOP}/usr.sbin/certctl/certctl.sh ${CERTCTLFLAGS} rehash; \ + else \ + echo "No openssl on the host, not rehashing certificates target -- /etc/ssl may not be populated."; \ + fi .endif .if make(distributeworld) .for dist in ${EXTRA_DISTRIBUTIONS} @@ -2708,11 +2713,6 @@ _basic_bootstrap_tools+=sbin/md5 _basic_bootstrap_tools+=usr.sbin/tzsetup .endif -# certctl is needed as an install tool -.if ${MK_CAROOT} != "no" && ${MK_OPENSSL} != "no" -_certctl=usr.sbin/certctl -.endif - .if defined(BOOTSTRAP_ALL_TOOLS) _other_bootstrap_tools+=${_basic_bootstrap_tools} .for _subdir _links in ${_basic_bootstrap_tools_multilink} @@ -2776,7 +2776,6 @@ bootstrap-tools: ${_bt}-links .PHONY ${_strfile} \ usr.bin/dtc \ ${_cat} \ - ${_certctl} \ ${_kbdcontrol} \ ${_elftoolchain_libs} \ ${_libkldelf} \ diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index e6a013f010de..2c25d9386032 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1255,8 +1255,6 @@ .. .. usr.sbin - certctl - .. chown .. ctladm diff --git a/usr.sbin/certctl/Makefile b/usr.sbin/certctl/Makefile index 6900f0ce3b65..88c024daf7e6 100644 --- a/usr.sbin/certctl/Makefile +++ b/usr.sbin/certctl/Makefile @@ -1,14 +1,5 @@ -.include - PACKAGE= certctl -PROG= certctl +SCRIPTS=certctl.sh MAN= certctl.8 -LIBADD= crypto -HAS_TESTS= -SUBDIR.${MK_TESTS}= tests - -.ifdef BOOTSTRAPPING -CFLAGS+=-DBOOTSTRAPPING -.endif .include diff --git a/usr.sbin/certctl/certctl.8 b/usr.sbin/certctl/certctl.8 index 97bdc840c359..7e49bb89e2ac 100644 --- a/usr.sbin/certctl/certctl.8 +++ b/usr.sbin/certctl/certctl.8 @@ -24,7 +24,7 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 11, 2025 +.Dd July 17, 2025 .Dt CERTCTL 8 .Os .Sh NAME @@ -32,83 +32,63 @@ .Nd "tool for managing trusted and untrusted TLS certificates" .Sh SYNOPSIS .Nm -.Op Fl lv +.Op Fl v .Ic list .Nm -.Op Fl lv +.Op Fl v .Ic untrusted .Nm -.Op Fl BnUv +.Op Fl cnUv .Op Fl D Ar destdir .Op Fl M Ar metalog .Ic rehash .Nm -.Op Fl nv -.Ic untrust Ar +.Op Fl cnv +.Ic untrust Ar file .Nm -.Op Fl nv -.Ic trust Ar +.Op Fl cnv +.Ic trust Ar file .Sh DESCRIPTION The .Nm utility manages the list of TLS Certificate Authorities that are trusted by applications that use OpenSSL. .Pp -The following options are available: +Flags: .Bl -tag -width 4n -.It Fl B -Do not generate a bundle. -This option is only valid in conjunction with the -.Ic rehash -command. +.It Fl c +Copy certificates instead of linking to them. .It Fl D Ar destdir Specify the DESTDIR (overriding values from the environment). -.It Fl l -When listing installed (trusted or untrusted) certificates, show the -full path and distinguished name for each certificate. +.It Fl d Ar distbase +Specify the DISTBASE (overriding values from the environment). .It Fl M Ar metalog -Specify the path of the METALOG file -.Po -default: -.Pa ${DESTDIR}/METALOG -.Pc . -This option is only valid in conjunction with the -.Ic rehash -command. +Specify the path of the METALOG file (default: $DESTDIR/METALOG). .It Fl n -Dry-run mode. -Do not actually perform any actions except write the metalog. +No-Op mode, do not actually perform any actions. .It Fl v -Verbose mode. -Print detailed information about each action taken. +Be verbose, print details about actions before performing them. .It Fl U -Unprivileged mode. -Do not attempt to set the ownership of created files. -This option is only valid in conjunction with the -.Fl M -option and the -.Ic rehash -command. +Unprivileged mode, do not change the ownership of created links. +Do record the ownership in the METALOG file. .El .Pp Primary command functions: .Bl -tag -width untrusted .It Ic list -List all currently trusted certificates. +List all currently trusted certificate authorities. .It Ic untrusted List all currently untrusted certificates. .It Ic rehash -Rebuild the list of trusted certificates by scanning all directories +Rebuild the list of trusted certificate authorities by scanning all directories in .Ev TRUSTPATH and all untrusted certificates in .Ev UNTRUSTPATH . -A copy of each trusted certificate is placed in +A symbolic link to each trusted certificate is placed in .Ev CERTDESTDIR and each untrusted certificate in .Ev UNTRUSTDESTDIR . -In addition, a bundle containing the trusted certificates is placed in -.Ev BUNDLEFILE . .It Ic untrust Add the specified file to the untrusted list. .It Ic trust @@ -118,6 +98,8 @@ Remove the specified file from the untrusted list. .Bl -tag -width UNTRUSTDESTDIR .It Ev DESTDIR Alternate destination directory to operate on. +.It Ev DISTBASE +Additional path component to include when operating on certificate directories. .It Ev LOCALBASE Location for local programs. Defaults to the value of the user.localbase sysctl which is usually @@ -125,34 +107,32 @@ Defaults to the value of the user.localbase sysctl which is usually .It Ev TRUSTPATH List of paths to search for trusted certificates. Default: -.Pa ${DESTDIR}/usr/share/certs/trusted -.Pa ${DESTDIR}${LOCALBASE}/share/certs/trusted -.Pa ${DESTDIR}${LOCALBASE}/share/certs +.Pa /usr/share/certs/trusted +.Pa /usr/local/share/certs +.Pa /etc/ssl/certs .It Ev UNTRUSTPATH List of paths to search for untrusted certificates. Default: -.Pa ${DESTDIR}/usr/share/certs/untrusted -.Pa ${DESTDIR}${LOCALBASE}/share/certs/untrusted -.It Ev TRUSTDESTDIR +.Pa /usr/share/certs/untrusted +.Pa /etc/ssl/untrusted +.Pa /etc/ssl/blacklisted +.It Ev CERTDESTDIR Destination directory for symbolic links to trusted certificates. Default: -.Pa ${DESTDIR}/etc/ssl/certs +.Pa /etc/ssl/certs .It Ev UNTRUSTDESTDIR Destination directory for symbolic links to untrusted certificates. Default: -.Pa ${DESTDIR}/etc/ssl/untrusted -.It Ev BUNDLE -File name of bundle to produce. +.Pa /etc/ssl/untrusted +.It Ev EXTENSIONS +List of file extensions to read as certificate files. +Default: *.pem *.crt *.cer *.crl *.0 .El .Sh SEE ALSO .Xr openssl 1 .Sh HISTORY .Nm first appeared in -.Fx 12.2 . +.Fx 12.2 .Sh AUTHORS -.An -nosplit -The original shell implementation was written by -.An Allan Jude Aq Mt allanjude@FreeBSD.org . -The current C implementation was written by -.An Dag-Erling Sm\(/orgrav Aq Mt des@FreeBSD.org . +.An Allan Jude Aq Mt allanjude@freebsd.org diff --git a/usr.sbin/certctl/certctl.c b/usr.sbin/certctl/certctl.c deleted file mode 100644 index 365870167aeb..000000000000 --- a/usr.sbin/certctl/certctl.c +++ /dev/null @@ -1,1065 +0,0 @@ -/*- - * Copyright (c) 2023-2025 Dag-Erling Smørgrav - * - * SPDX-License-Identifier: BSD-2-Clause - */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#define info(fmt, ...) \ - do { \ - if (verbose) \ - fprintf(stderr, fmt "\n", ##__VA_ARGS__); \ - } while (0) - -static char * -xasprintf(const char *fmt, ...) -{ - va_list ap; - char *str; - int ret; - - va_start(ap, fmt); - ret = vasprintf(&str, fmt, ap); - va_end(ap); - if (ret < 0 || str == NULL) - err(1, NULL); - return (str); -} - -static char * -xstrdup(const char *str) -{ - char *dup; - - if ((dup = strdup(str)) == NULL) - err(1, NULL); - return (dup); -} - -static void usage(void); - -static bool dryrun; -static bool longnames; -static bool nobundle; -static bool unprivileged; -static bool verbose; - -static const char *localbase; -static const char *destdir; -static const char *metalog; - -static const char *uname = "root"; -static const char *gname = "wheel"; - -static const char *const default_trusted_paths[] = { - "/usr/share/certs/trusted", - "%L/share/certs/trusted", - "%L/share/certs", - NULL -}; -static char **trusted_paths; - -static const char *const default_untrusted_paths[] = { - "/usr/share/certs/untrusted", - "%L/share/certs/untrusted", - NULL -}; -static char **untrusted_paths; - -static char *trusted_dest; -static char *untrusted_dest; -static char *bundle_dest; - -#define SSL_PATH "/etc/ssl" -#define TRUSTED_DIR "certs" -#define TRUSTED_PATH SSL_PATH "/" TRUSTED_DIR -#define UNTRUSTED_DIR "untrusted" -#define UNTRUSTED_PATH SSL_PATH "/" UNTRUSTED_DIR -#define LEGACY_DIR "blacklisted" -#define LEGACY_PATH SSL_PATH "/" LEGACY_DIR -#define BUNDLE_FILE "cert.pem" -#define BUNDLE_PATH SSL_PATH "/" BUNDLE_FILE - -static FILE *mlf; - -/* - * Split a colon-separated list into a NULL-terminated array. - */ -static char ** -split_paths(const char *str) -{ - char **paths; - const char *p, *q; - unsigned int i, n; - - for (p = str, n = 1; *p; p++) { - if (*p == ':') - n++; - } - if ((paths = calloc(n + 1, sizeof(*paths))) == NULL) - err(1, NULL); - for (p = q = str, i = 0; i < n; i++, p = q + 1) { - q = strchrnul(p, ':'); - if ((paths[i] = strndup(p, q - p)) == NULL) - err(1, NULL); - } - return (paths); -} - -/* - * Expand %L into LOCALBASE and prefix DESTDIR. - */ -static char * -expand_path(const char *template) -{ - if (template[0] == '%' && template[1] == 'L') - return (xasprintf("%s%s%s", destdir, localbase, template + 2)); - return (xasprintf("%s%s", destdir, template)); -} - -/* - * Expand an array of paths. - */ -static char ** -expand_paths(const char *const *templates) -{ - char **paths; - unsigned int i, n; - - for (n = 0; templates[n] != NULL; n++) - continue; - if ((paths = calloc(n + 1, sizeof(*paths))) == NULL) - err(1, NULL); - for (i = 0; i < n; i++) - paths[i] = expand_path(templates[i]); - return (paths); -} - -/* - * If destdir is a prefix of path, returns a pointer to the rest of path, - * otherwise returns path. - */ -static const char * -unexpand_path(const char *path) -{ - const char *p = path; - const char *q = destdir; - - while (*p && *p == *q) { - p++; - q++; - } - return (*q == '\0' && *p == '/' ? p : path); -} - -/* - * X509 certificate in a rank-balanced tree. - */ -struct cert { - RB_ENTRY(cert) entry; - unsigned long hash; - char *name; - X509 *x509; - char *path; -}; - -static void -free_cert(struct cert *cert) -{ - free(cert->name); - X509_free(cert->x509); - free(cert->path); - free(cert); -} - -static int -certcmp(const struct cert *a, const struct cert *b) -{ - return (X509_cmp(a->x509, b->x509)); -} - -RB_HEAD(cert_tree, cert); -static struct cert_tree trusted = RB_INITIALIZER(&trusted); -static struct cert_tree untrusted = RB_INITIALIZER(&untrusted); -RB_GENERATE_STATIC(cert_tree, cert, entry, certcmp); - -static void -free_certs(struct cert_tree *tree) -{ - struct cert *cert, *tmp; - - RB_FOREACH_SAFE(cert, cert_tree, tree, tmp) { - RB_REMOVE(cert_tree, tree, cert); - free_cert(cert); - } -} - -static struct cert * -find_cert(struct cert_tree *haystack, X509 *x509) -{ - struct cert needle = { .x509 = x509 }; - - return (RB_FIND(cert_tree, haystack, &needle)); -} - -/* - * File containing a certificate in a rank-balanced tree sorted by - * certificate hash and disambiguating counter. This is needed because - * the certificate hash function is prone to collisions, necessitating a - * counter to distinguish certificates that hash to the same value. - */ -struct file { - RB_ENTRY(file) entry; - const struct cert *cert; - unsigned int c; -}; - -static int -filecmp(const struct file *a, const struct file *b) -{ - if (a->cert->hash > b->cert->hash) - return (1); - if (a->cert->hash < b->cert->hash) - return (-1); - return (a->c - b->c); -} - -RB_HEAD(file_tree, file); -RB_GENERATE_STATIC(file_tree, file, entry, filecmp); - -/* - * Lexicographical sort for scandir(). - */ -static int -lexisort(const struct dirent **d1, const struct dirent **d2) -{ - return (strcmp((*d1)->d_name, (*d2)->d_name)); -} - -/* - * Read certificate(s) from a single file and insert them into a tree. - * Ignore certificates that already exist in the tree. If exclude is not - * null, also ignore certificates that exist in exclude. - * - * Returns the number certificates added to the tree, or -1 on failure. - */ -static int -read_cert(const char *path, struct cert_tree *tree, struct cert_tree *exclude) -{ - FILE *f; - X509 *x509; - X509_NAME *name; - struct cert *cert; - unsigned long hash; - int ni, no; - - if ((f = fopen(path, "r")) == NULL) { - warn("%s", path); - return (-1); - } - for (ni = no = 0; - (x509 = PEM_read_X509(f, NULL, NULL, NULL)) != NULL; - ni++) { - hash = X509_subject_name_hash(x509); - if (exclude && find_cert(exclude, x509)) { - info("%08lx: excluded", hash); - X509_free(x509); - continue; - } - if (find_cert(tree, x509)) { - info("%08lx: duplicate", hash); - X509_free(x509); - continue; - } - if ((cert = calloc(1, sizeof(*cert))) == NULL) - err(1, NULL); - cert->x509 = x509; - name = X509_get_subject_name(x509); - cert->hash = X509_NAME_hash_ex(name, NULL, NULL, NULL); - cert->name = X509_NAME_oneline(name, NULL, 0); - cert->path = xstrdup(unexpand_path(path)); - if (RB_INSERT(cert_tree, tree, cert) != NULL) - errx(1, "unexpected duplicate"); - info("%08lx: %s", cert->hash, strrchr(cert->name, '=') + 1); - no++; - } - /* - * ni is the number of certificates we found in the file. - * no is the number of certificates that weren't already in our - * tree or on the exclusion list. - */ - if (ni == 0) - warnx("%s: no valid certificates found", path); - fclose(f); - return (no); -} - -/* - * Load all certificates found in the specified path into a tree, - * optionally excluding those that already exist in a different tree. - * - * Returns the number of certificates added to the tree, or -1 on failure. - */ -static int -read_certs(const char *path, struct cert_tree *tree, struct cert_tree *exclude) -{ - struct stat sb; - char *paths[] = { (char *)(uintptr_t)path, NULL }; - FTS *fts; - FTSENT *ent; - int fts_options = FTS_LOGICAL | FTS_NOCHDIR; - int ret, total = 0; - - if (stat(path, &sb) != 0) { - return (-1); - } else if (!S_ISDIR(sb.st_mode)) { - errno = ENOTDIR; - return (-1); - } - if ((fts = fts_open(paths, fts_options, NULL)) == NULL) - err(1, "fts_open()"); - while ((ent = fts_read(fts)) != NULL) { - if (ent->fts_info != FTS_F) { - if (ent->fts_info == FTS_ERR) - warnc(ent->fts_errno, "fts_read()"); - continue; - } - info("found %s", ent->fts_path); - ret = read_cert(ent->fts_path, tree, exclude); - if (ret > 0) - total += ret; - } - fts_close(fts); - return (total); -} - -/* - * Save the contents of a cert tree to disk. - * - * Returns 0 on success and -1 on failure. - */ -static int -write_certs(const char *dir, struct cert_tree *tree) -{ - struct file_tree files = RB_INITIALIZER(&files); - struct cert *cert; - struct file *file, *tmp; - struct dirent **dents, **ent; - char *path, *tmppath = NULL; - FILE *f; - mode_t mode = 0444; - int cmp, d, fd, ndents, ret = 0; - - /* - * Start by generating unambiguous file names for each certificate - * and storing them in lexicographical order - */ - RB_FOREACH(cert, cert_tree, tree) { - if ((file = calloc(1, sizeof(*file))) == NULL) - err(1, NULL); - file->cert = cert; - for (file->c = 0; file->c < INT_MAX; file->c++) - if (RB_INSERT(file_tree, &files, file) == NULL) - break; - if (file->c == INT_MAX) - errx(1, "unable to disambiguate %08lx", cert->hash); - free(cert->path); - cert->path = xasprintf("%08lx.%d", cert->hash, file->c); - } - /* - * Open and scan the directory. - */ - if ((d = open(dir, O_DIRECTORY | O_RDONLY)) < 0 || -#ifdef BOOTSTRAPPING - (ndents = scandir(dir, &dents, NULL, lexisort)) -#else - (ndents = fdscandir(d, &dents, NULL, lexisort)) -#endif - < 0) - err(1, "%s", dir); - /* - * Iterate over the directory listing and the certificate listing - * in parallel. If the directory listing gets ahead of the - * certificate listing, we need to write the current certificate - * and advance the certificate listing. If the certificate - * listing is ahead of the directory listing, we need to delete - * the current file and advance the directory listing. If they - * are neck and neck, we have a match and could in theory compare - * the two, but in practice it's faster to just replace the - * current file with the current certificate (and advance both). - */ - ent = dents; - file = RB_MIN(file_tree, &files); - for (;;) { - if (ent < dents + ndents) { - /* skip directories */ - if ((*ent)->d_type == DT_DIR) { - free(*ent++); - continue; - } - if (file != NULL) { - /* compare current dirent to current cert */ - path = file->cert->path; - cmp = strcmp((*ent)->d_name, path); - } else { - /* trailing files in directory */ - path = NULL; - cmp = -1; - } - } else { - if (file != NULL) { - /* trailing certificates */ - path = file->cert->path; - cmp = 1; - } else { - /* end of both lists */ - path = NULL; - break; - } - } - if (cmp < 0) { - /* a file on disk with no matching certificate */ - info("removing %s/%s", dir, (*ent)->d_name); - if (!dryrun) - (void)unlinkat(d, (*ent)->d_name, 0); - free(*ent++); - continue; - } - if (cmp == 0) { - /* a file on disk with a matching certificate */ - info("replacing %s/%s", dir, (*ent)->d_name); - if (dryrun) { - fd = open(_PATH_DEVNULL, O_WRONLY); - } else { - tmppath = xasprintf(".%s", path); - fd = openat(d, tmppath, - O_CREAT | O_WRONLY | O_TRUNC, mode); - if (!unprivileged && fd >= 0) - (void)fchmod(fd, mode); - } - free(*ent++); - } else { - /* a certificate with no matching file */ - info("writing %s/%s", dir, path); - if (dryrun) { - fd = open(_PATH_DEVNULL, O_WRONLY); - } else { - tmppath = xasprintf(".%s", path); - fd = openat(d, tmppath, - O_CREAT | O_WRONLY | O_EXCL, mode); - } - } - /* write the certificate */ - if (fd < 0 || - (f = fdopen(fd, "w")) == NULL || - !PEM_write_X509(f, file->cert->x509)) { - if (tmppath != NULL && fd >= 0) { - int serrno = errno; - (void)unlinkat(d, tmppath, 0); - errno = serrno; - } - err(1, "%s/%s", dir, tmppath ? tmppath : path); - } - /* rename temp file if applicable */ - if (tmppath != NULL) { - if (ret == 0 && renameat(d, tmppath, d, path) != 0) { - warn("%s/%s", dir, path); - ret = -1; - } - if (ret != 0) - (void)unlinkat(d, tmppath, 0); - free(tmppath); - tmppath = NULL; - } - /* emit metalog */ - if (mlf != NULL) { - fprintf(mlf, "%s/%s type=file " - "uname=%s gname=%s mode=%#o size=%ld\n", - unexpand_path(dir), path, - uname, gname, mode, ftell(f)); - } - fclose(f); - /* advance certificate listing */ - tmp = RB_NEXT(file_tree, &files, file); - RB_REMOVE(file_tree, &files, file); - free(file); - file = tmp; - } - free(dents); - close(d); - return (ret); -} - -/* - * Save all certs in a tree to a single file (bundle). - * - * Returns 0 on success and -1 on failure. - */ -static int -write_bundle(const char *dir, const char *file, struct cert_tree *tree) -{ - struct cert *cert; - char *tmpfile = NULL; - FILE *f; - int d, fd, ret = 0; - mode_t mode = 0444; - - if (dir != NULL) { - if ((d = open(dir, O_DIRECTORY | O_RDONLY)) < 0) - err(1, "%s", dir); - } else { - dir = "."; - d = AT_FDCWD; - } - info("writing %s/%s", dir, file); - if (dryrun) { - fd = open(_PATH_DEVNULL, O_WRONLY); - } else { - tmpfile = xasprintf(".%s", file); - fd = openat(d, tmpfile, O_WRONLY | O_CREAT | O_EXCL, mode); - } - if (fd < 0 || (f = fdopen(fd, "w")) == NULL) { - if (tmpfile != NULL && fd >= 0) { - int serrno = errno; - (void)unlinkat(d, tmpfile, 0); - errno = serrno; - } - err(1, "%s/%s", dir, tmpfile ? tmpfile : file); - } - RB_FOREACH(cert, cert_tree, tree) { - if (!PEM_write_X509(f, cert->x509)) { - warn("%s/%s", dir, tmpfile ? tmpfile : file); - ret = -1; - break; - } - } - if (tmpfile != NULL) { - if (ret == 0 && renameat(d, tmpfile, d, file) != 0) { - warn("%s/%s", dir, file); - ret = -1; - } - if (ret != 0) - (void)unlinkat(d, tmpfile, 0); - free(tmpfile); - } - if (ret == 0 && mlf != NULL) { - fprintf(mlf, - "%s/%s type=file uname=%s gname=%s mode=%#o size=%ld\n", - unexpand_path(dir), file, uname, gname, mode, ftell(f)); - } - fclose(f); - if (d != AT_FDCWD) - close(d); - return (ret); -} - -/* - * Load trusted certificates. - * - * Returns the number of certificates loaded. - */ -static unsigned int -load_trusted(bool all, struct cert_tree *exclude) -{ - unsigned int i, n; - int ret; - - /* load external trusted certs */ - for (i = n = 0; all && trusted_paths[i] != NULL; i++) { - ret = read_certs(trusted_paths[i], &trusted, exclude); - if (ret > 0) - n += ret; - } - - /* load installed trusted certs */ - ret = read_certs(trusted_dest, &trusted, exclude); - if (ret > 0) - n += ret; - - info("%d trusted certificates found", n); - return (n); -} - -/* - * Load untrusted certificates. - * - * Returns the number of certificates loaded. - */ -static unsigned int -load_untrusted(bool all) -{ - char *path; - unsigned int i, n; - int ret; - - /* load external untrusted certs */ - for (i = n = 0; all && untrusted_paths[i] != NULL; i++) { - ret = read_certs(untrusted_paths[i], &untrusted, NULL); - if (ret > 0) - n += ret; - } - - /* load installed untrusted certs */ - ret = read_certs(untrusted_dest, &untrusted, NULL); - if (ret > 0) - n += ret; - - /* load legacy untrusted certs */ - path = expand_path(LEGACY_PATH); - ret = read_certs(path, &untrusted, NULL); - if (ret > 0) { - warnx("certificates found in legacy directory %s", - path); - n += ret; - } else if (ret == 0) { - warnx("legacy directory %s can safely be deleted", - path); - } - free(path); - - info("%d untrusted certificates found", n); - return (n); -} - -/* - * Save trusted certificates. - * - * Returns 0 on success and -1 on failure. - */ -static int -save_trusted(void) -{ - int ret; - - /* save untrusted certs */ - ret = write_certs(trusted_dest, &trusted); - return (ret); -} - -/* - * Save untrusted certificates. - * - * Returns 0 on success and -1 on failure. - */ -static int -save_untrusted(void) -{ - int ret; - - ret = write_certs(untrusted_dest, &untrusted); - return (ret); -} - -/* - * Save certificate bundle. - * - * Returns 0 on success and -1 on failure. - */ -static int -save_bundle(void) -{ - char *dir, *file, *sep; - int ret; *** 1046 LINES SKIPPED *** From nobody Sun Aug 17 02:27:08 2025 X-Original-To: dev-commits-src-main@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 4c4KVj0L19z641sc; Sun, 17 Aug 2025 02:27: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4KVh6jXCz3Wlq; Sun, 17 Aug 2025 02:27:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755397628; 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=FxKj/Bve0sG4/rNNpllkYQhUf9BN+L5HIQQazonIG08=; b=hcs80P9BDNGKiNr/vB8vH33GameXXO3kLnXHamNFFfc61LymaBGQ/1r9wLCaUtZAaB6KTW AR8bIsq/+OF1BwhaFXuPBXVcY2irfa8hvgJJAFGgCiYF+Y0BHS8pEFRYkREnk68NbQekh3 nHYhrbv5yL/EhmyREXjG5znzLIgCDuXd5+eMummRyKjNE4Hv69McoA8KJ82tLFFcJbVOVy H+SFuOXNcRZ2XgOip4bIn//8O6bvik+tN/5QVuXzXcotiH9YP6rXD+34Q5punT0iywdB2X KjdwhBTrDcLkGTozrgAJEgc0NcRut2XnM/9PTyaX7aPDHCCOo4MGqrxan6fNWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755397628; 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=FxKj/Bve0sG4/rNNpllkYQhUf9BN+L5HIQQazonIG08=; b=BTdY3QC8I7qElkZPIBdBpkSREnUnVJRDvD58sjmbHqOPgq9Wxb8+IP7x75u5IEvRO725tO hT1TeyHkJ5/btNNBe4A8Isdjjw9cvKp5Iif9TuVEmfdR3lxSwxxuSZ0hkMbXDrOHlI/SBV at/yPRxF71rkUg5PbBg3sR4HgQjw32TKE6KMBIOLnb/TdW2CmKqBHi54se7XLkoil3xPRl 4XHmPHtWOk12Tf9fG7YRzz94zdir4DJMBC2mWP4vafnEAlYucb/OgBPbBPguVSEHNwzzyX TE+343L0tnrnMJLV1t2Refz9nCT2mOBaRLgqGe7DFpv7DV8wrFInYNMUR+VQIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755397628; a=rsa-sha256; cv=none; b=ZsaIC7ldrtMol7zTjR1Q6CNeEAzFllhqv0M/XbZXw/+badukP3YtAFlbetjoIRpbtUHpnd AVP3elwaSrcrcKp6oGa3431oHW5XRGXOPrhZZJLc791mA8Z4mR/OTWcPq8cu2B9MJOT0Tm kWlhe1nm5RZFGfWll4TPHBm6E5jC4A0MTJtX1+dIioo/VHamXk9s9MrykmMxUtjTqvcC5a xtHioRrWBX7Bl8qHo0Mox1Ky+AVdEHBh/TJ/yFfgsgUB/JZZBncVo5OhTagOmfhrbvYCqw KbRWqBE32Wwln2fdEbRrPuAQ2lLFt56QYGTXjOpDDDELqF69FLZqDf1rvvjwxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4KVh6JrkzrHN; Sun, 17 Aug 2025 02:27:08 +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 57H2R8xA074956; Sun, 17 Aug 2025 02:27:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57H2R862074953; Sun, 17 Aug 2025 02:27:08 GMT (envelope-from git) Date: Sun, 17 Aug 2025 02:27:08 GMT Message-Id: <202508170227.57H2R862074953@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: c6778f3a4423 - main - Makefile.libcompat: Tweak krb5 compat dirs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c6778f3a4423743a3f30d8d09bc4e4a086863928 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=c6778f3a4423743a3f30d8d09bc4e4a086863928 commit c6778f3a4423743a3f30d8d09bc4e4a086863928 Author: Lexi Winter AuthorDate: 2025-08-17 01:19:21 +0000 Commit: Lexi Winter CommitDate: 2025-08-17 01:19:21 +0000 Makefile.libcompat: Tweak krb5 compat dirs krb5/util contains both programs and libraries; trying to build that for compat confuses bsd.prog.mk and results in unwanted files being created in the source tree. Remove krb5/util and instead list only the directories underneath krb5/util which contain libraries. The libdata change from the diff isn't included; that will be fixed in a different way. Fixes: fb13ae28b2e8 ("Makefile.libcompat: Add krb5/util") Reviewed by: ngie (previous version) Differential Revision: https://reviews.freebsd.org/D51937 --- Makefile.libcompat | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.libcompat b/Makefile.libcompat index 2fdc1439b916..d165bba341c8 100644 --- a/Makefile.libcompat +++ b/Makefile.libcompat @@ -93,7 +93,11 @@ _LC_LIBDIRS.${MK_CDDL:tl}+= cddl/lib _LC_LIBDIRS.${MK_CRYPT:tl}+= secure/lib .if ${MK_MITKRB5} != "no" _LC_LIBDIRS.${MK_KERBEROS:tl}+= krb5/lib -_LC_LIBDIRS.${MK_KERBEROS:tl}+= krb5/util +# Only include the parts of krb5/util that build libraries, not executables. +_LC_LIBDIRS.${MK_KERBEROS:tl}+= krb5/util/et +_LC_LIBDIRS.${MK_KERBEROS:tl}+= krb5/util/profile +_LC_LIBDIRS.${MK_KERBEROS:tl}+= krb5/util/support +_LC_LIBDIRS.${MK_KERBEROS:tl}+= krb5/util/verto .else _LC_LIBDIRS.${MK_KERBEROS:tl}+= kerberos5/lib .endif From nobody Sun Aug 17 07:03:11 2025 X-Original-To: dev-commits-src-main@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 4c4RdC2G6nz64LZg; Sun, 17 Aug 2025 07:03:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4RdC1Qpxz3wRc; Sun, 17 Aug 2025 07:03:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755414191; 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=+l7rZuPSt3WJBUsRRYHmQNCGDirk33PhLDzmYje4KUM=; b=VjuuL+HJXkUwjGS4c69Yf/GLkwix6IHqseg4695kHCOP6w0/MiiP4E5e0j6DWdEm15rWar YoGEe9aszHa4p/ZAjiKTKgSHmX2LHCsMZ93ppeBOxcIY4jrqcuuVgzhjSLWw1ViQYn0TP/ HmPA1PNoIT1VZLvsu1sp8ECDt02/MIDYJlNGLtqKgyIRAgLxSER8uIu5pKo6DPK/zFJvk+ ST8KpktFrY6X6gs3oi2vlG5HvzZHSr1DprmaswGJq6/SyAg2s5o3juwWmIB+jNBLkMrnj1 rTnI3HQO+EBAlVed2HEbqPAyGq4quvCjHkaV4EiCxAW9d1I1P8NvmVEgMc1pkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755414191; 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=+l7rZuPSt3WJBUsRRYHmQNCGDirk33PhLDzmYje4KUM=; b=OucG6nG0v7l0P0F8bMFPax3Z48PI5t+fHZmWa7qB1WGE0tbpzzq7yBhoDWuxXfx/3L8QL0 a2iife34+XwjNRX3EKmYjX/kqfo7dr/9tk3aoG2lQ10mJKZLErgH2imaZCcI+5aK0KRHoo 0RIGKsz8GZh4vYfdTDaROfYMrYaaAYtcB3Acxw1jJLgLlb6yH/T4Y3gZxtON2opqqUCN+1 iihogJpYe3duxM2Qs3BJQapmo0uLUNs8PFvK9tfCh/2k5jfPmxhmeuHCZvs3DmlJeyDtK/ 37RNVv2lNssoUymP69LJ7tqcjy5vuJCnunfcCDh1la1BxOw5OGeqgbl+3FmUfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755414191; a=rsa-sha256; cv=none; b=mwVYHaQSro5kmDYtcx7U+09k0+vmWr9lFY4q6T8ywBGQZ1dGV7NtS15v38y2Qn8+qmBxxo 7f6mw78hIf8SOlsVslp46EvgoKPgWRlob+qosYC7i0R0uZNDNgH60YxzttO+jLBCbonnkt /4ZXWMvIEw+QOt4qhLUmQ31Wv9VbmtTi8n/D24UibZmYGyNVpXcE5RBSQH1NJCJyLGVuI3 vkC3b6+PRd4bA9wTghKawWcpMNGA61zPL62WF5XfVQ7kW26XqFBd5YIpvx8wfvwnyEHcXn h6t5Euzi3Kjvg41DtUjtx5FCKKnnf0q9EdTxrik0PlQMr9rlkMCR2W8G8c6T0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4RdC12Mxz10Fk; Sun, 17 Aug 2025 07:03: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 57H73Bow001266; Sun, 17 Aug 2025 07:03:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57H73BY8001263; Sun, 17 Aug 2025 07:03:11 GMT (envelope-from git) Date: Sun, 17 Aug 2025 07:03:11 GMT Message-Id: <202508170703.57H73BY8001263@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 9c7a9b3ff1ee - main - arm: Fix two typos in kernel messages of pmu_fdt.c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c7a9b3ff1eebbc15ef26bbdaae4f9448450523f Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=9c7a9b3ff1eebbc15ef26bbdaae4f9448450523f commit 9c7a9b3ff1eebbc15ef26bbdaae4f9448450523f Author: Gordon Bergling AuthorDate: 2025-08-17 07:01:13 +0000 Commit: Gordon Bergling CommitDate: 2025-08-17 07:01:13 +0000 arm: Fix two typos in kernel messages of pmu_fdt.c - s/interupt/interrupt/ MFC after: 5 days --- sys/arm/arm/pmu_fdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm/arm/pmu_fdt.c b/sys/arm/arm/pmu_fdt.c index 3e733f3e1b18..dd6087652e38 100644 --- a/sys/arm/arm/pmu_fdt.c +++ b/sys/arm/arm/pmu_fdt.c @@ -152,7 +152,7 @@ pmu_parse_intr(device_t dev, struct pmu_softc *sc) if (intr_is_per_cpu(sc->irq[0].res)) { if (has_affinity) { device_printf(dev, - "Per CPU interupt have declared affinity\n"); + "Per CPU interrupt have declared affinity\n"); err = ENXIO; goto done; } @@ -179,7 +179,7 @@ pmu_parse_intr(device_t dev, struct pmu_softc *sc) if (intr_is_per_cpu(sc->irq[i].res)) { - device_printf(dev, "Unexpected per CPU interupt\n"); + device_printf(dev, "Unexpected per CPU interrupt\n"); err = ENXIO; goto done; } From nobody Sun Aug 17 07:06:30 2025 X-Original-To: dev-commits-src-main@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 4c4Rj25cSTz64LJy; Sun, 17 Aug 2025 07:06: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4Rj257s7z3xV0; Sun, 17 Aug 2025 07:06:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755414390; 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=KIIf7a9ck7aAz45Giun2g5vh+Z77aBaUBY0yujDd1vM=; b=wJfTvZ2gjGcQsRsICyGzyHh3UAnGixIduboBehGSg0Gh7dZuif9gEVXND1C/zM75grMvQm C6wmxXDAbH2N6mMG3/H0oV/VXkjVZI7fQYJ0ka1fde+YlrQ+hniSOaTwCucBvImiv8ouGo OJsbHKUU07LbagdOTceFJzZk0FSdhZQtz8tRsGo8FUuMMWMqbn7U8EG4b/U4MiLZTKhXoq igQdRIibegFMoxjcmF4+TjIaBDKNeQK9oYI6fasqXz47RN6/3PSYwv45a/oPhIvkYPLyza QzYf7GsXD15vUf3VxXGyS6WjIXerJHSqqXPv+me+nHSzdL+fupkuH8XB9JLy7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755414390; 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=KIIf7a9ck7aAz45Giun2g5vh+Z77aBaUBY0yujDd1vM=; b=xqL7oKQd2PiBZDftQN/uwyRb/znXewK6oh4nF/7PID5GGU4HaTN+QYk8TlgTvwFiWLSfOZ ojsB/ZfsUUqL7rZTz+57b8V6OXbjq/7nh9V1vSErhBxSkPQkP3vHSAnZ9JPcRRY/+Uxfx+ Y8A/fcqi+PyWpJPno6X820vKPScT3lAcPMOkKnwiuzfiSmYHPhXgt8opN5J7Ac1T46+XJ+ rm+7fS/t90bmNiIvhJ6xmfU3+lXODo1kGULuz3VIac4kv1rlTLeaQ09Tbx6dddlXmLTCNx qLrNi3qBIhDX14urHUTHQyN6YI+QwShFD9Rk2QJxiKnCM2U2UkVAyjL89qdqBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755414390; a=rsa-sha256; cv=none; b=g6ILb3qvN6PvjDUgpPzdG8WwfvBthYiwQtkGBP61w2BMusk9bbBwRnBtt3dAorTB27AbEH uOJ259WmYqpWz7fygMjcSyWoi8d2G2O0mALK5hTwMY4ePu+QV6yp0VLi7LJ+yNNPr2lHY3 EbwZmYy1Rl1e+rdKIvIrqUUu1O/zCGtCyGoVllSKbXfQTOgrYHbNOemZ7uz/aagv4ebPjH F7tjtkO1UG/66EiJlC33UvBuijgRlbAwIJN7c9q5f5lbxrOkXdFofSY5bMJZcJr8He+aZE 3KFh1+yCzTcyUtMC98nERAg9h3CqKL0Plb2AnUDU3ojnVBOT8wpTgN6cHM+U8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4Rj24cP6z101V; Sun, 17 Aug 2025 07:06: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 57H76U9e002362; Sun, 17 Aug 2025 07:06:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57H76U8d002359; Sun, 17 Aug 2025 07:06:30 GMT (envelope-from git) Date: Sun, 17 Aug 2025 07:06:30 GMT Message-Id: <202508170706.57H76U8d002359@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 74eb496c1019 - main - bnxt(4): Fix typos in a comment and a kernel message List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 74eb496c1019f702a28b4fa757f1139fbcf44895 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=74eb496c1019f702a28b4fa757f1139fbcf44895 commit 74eb496c1019f702a28b4fa757f1139fbcf44895 Author: Gordon Bergling AuthorDate: 2025-08-17 07:04:49 +0000 Commit: Gordon Bergling CommitDate: 2025-08-17 07:04:49 +0000 bnxt(4): Fix typos in a comment and a kernel message - s/priviledged/privileged/ MFC after: 5 days --- sys/dev/bnxt/bnxt_re/qplib_res.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/bnxt/bnxt_re/qplib_res.c b/sys/dev/bnxt/bnxt_re/qplib_res.c index 69661c67708c..f527af031176 100644 --- a/sys/dev/bnxt/bnxt_re/qplib_res.c +++ b/sys/dev/bnxt/bnxt_re/qplib_res.c @@ -875,7 +875,7 @@ int bnxt_qplib_alloc_dpi(struct bnxt_qplib_res *res, dpi->umdbr = umaddr; switch (type) { case BNXT_QPLIB_DPI_TYPE_KERNEL: - /* priviledged dbr was already mapped just initialize it. */ + /* privileged dbr was already mapped just initialize it. */ dpi->umdbr = dpit->ucreg.bar_base + dpit->ucreg.offset + bit_num * PAGE_SIZE; dpi->dbr = dpit->priv_db; @@ -1150,7 +1150,7 @@ int bnxt_qplib_map_db_bar(struct bnxt_qplib_res *res) } ucreg->bar_reg = ioremap(ucreg->bar_base, ucreg->len); if (!ucreg->bar_reg) { - dev_err(&res->pdev->dev, "priviledged dpi map failed!\n"); + dev_err(&res->pdev->dev, "privileged dpi map failed!\n"); return -ENOMEM; } From nobody Sun Aug 17 07:28:33 2025 X-Original-To: dev-commits-src-main@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 4c4SBT5Tzcz64MQ0; Sun, 17 Aug 2025 07:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4SBT4kFbz40Ll; Sun, 17 Aug 2025 07:28:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755415713; 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=/H1URIC06cS3LX4PiVr7bZ2uagkQQm/gRppJQK+cI50=; b=EMFO5Ahbpq3GgSmx0uOALbhmsQjP2iBEbLeZCaNvuK6/+W2X6MM9ka2iHExdFisR+4HNqR 0Gi8lpMqmN05d1KfuVH+foCj2S7TrKK+3Z8Ogbap88M8evssDz5tM/BTPJ1xncQojLPM+m fjMoOxWb5vDxZmy0EYQJiYnUFSi+VTrY6ya9BE1N99mMqU6EUqXQOHSvwgIxyrHVfG1omY CfbUECd5KzVm4OkXkdoYJfvEI4ONGwXVpBEIdDP4afOGiCdDITkphCWL/yLjioyBFw+cYq 3vtwVz+dl9KMecmR9XLhQ33IFPJCcSRsjgFXKE2pdyBtrIbu4ZXVQmBV3Au3fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755415713; 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=/H1URIC06cS3LX4PiVr7bZ2uagkQQm/gRppJQK+cI50=; b=iZRyiwJGwEPaxnydeyjNZYydimj8ScBQz9D7ZIjtpEPFXU5cyYv4uaynqqJxThtwkjrMRh dEdebaJXITcyKV26ZlWxmXABMMbdNRe9C9cSXcSVUDckvpbj24v3XfPOgAkxzC5ku8kra9 ulOuvb6cIgXqhXv81Qpod2ZfWz5nJ+lGbNIQfPkgv1a7ihYvpkrHa7Rf1GOq5yx89YMdVA RR54DQJqLZbcFz0OvQHuWCGmyJrQWYZ3I1S56+nv00eZR1uVtqDyLJqSZD51b8Dzn8dbTJ tjbWSoPPGxhaDSVLRpwLzdkD697g2D/14t+LXBzEgOd5ki5Ib8dVx9FlTkg5iQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755415713; a=rsa-sha256; cv=none; b=awVoYuxpNwYEts7+IpHTvv3jGtFGeIaytpt1tnRXJgR3ZUCwEvalvOJktsAKJcj72oHvSQ tqqznFE/CHdTHW5DD82Te3mT61SeXlvevz27LGEov7wEP/vBtkDiV1+i580t246byfuEKr PZ6b1k6VcM5UiKBa4Z9tV56LHR6SEGRVI4Be6aLonafuWn/XzSQJjjbl1pI6roXAdC3RlJ fRmgiIlH+DoKkyaRHdvAvd4pBpMCBPtw/jI1D+TigXVZtYn30xCs13AN6ZpBeyJOB/INSS Bb9GkWJWZwT0PeWyHyg2Y1VRej7kM1wl1U668klCbzftahp+/k0xI+sTU0lkxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4SBT4DpXz1148; Sun, 17 Aug 2025 07:28:33 +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 57H7SXq7040569; Sun, 17 Aug 2025 07:28:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57H7SXZ0040566; Sun, 17 Aug 2025 07:28:33 GMT (envelope-from git) Date: Sun, 17 Aug 2025 07:28:33 GMT Message-Id: <202508170728.57H7SXZ0040566@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 333b0490e313 - main - libc: Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 333b0490e3132bf8f1a0d974d8b2597caf765970 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=333b0490e3132bf8f1a0d974d8b2597caf765970 commit 333b0490e3132bf8f1a0d974d8b2597caf765970 Author: Gordon Bergling AuthorDate: 2025-08-17 07:24:59 +0000 Commit: Gordon Bergling CommitDate: 2025-08-17 07:24:59 +0000 libc: Fix a typo in a source code comment - s/aguments/arguments/ MFC after: 3 days --- lib/libc/i386/gen/makecontext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/i386/gen/makecontext.c b/lib/libc/i386/gen/makecontext.c index 7b4845ac6bee..9fedd8b99c47 100644 --- a/lib/libc/i386/gen/makecontext.c +++ b/lib/libc/i386/gen/makecontext.c @@ -124,7 +124,7 @@ __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...) /* * Setup the top of the stack with the user start routine - * followed by all of its aguments and the pointer to the + * followed by all of its arguments and the pointer to the * ucontext. We need to leave a spare spot at the top of * the stack because setcontext will move eip to the top * of the stack before returning. From nobody Sun Aug 17 07:28:34 2025 X-Original-To: dev-commits-src-main@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 4c4SBV6MpHz64MVL; Sun, 17 Aug 2025 07:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4SBV5LWKz40FF; Sun, 17 Aug 2025 07:28:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755415714; 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=my3N7MVTAcCEhwSmzHCXV6e08DB4ubY2/HImrXCu/S4=; b=vy69n2RgXSC/zhiRn9PuGDtlbFMTFFbMlWsGkwpaJtsHR4Ef81CqFAlhwG1xUW9w5rLcLq CUFjWVFvkn5k2tT/46UM/CgfJujBO0VM/LIs1hxyfUENDcIDp/vhKt0PPq6nWuTqc8t5vF fQHWNjP/3ccS42rO38ulEz0U+xTzqD3NXT1FHn+wPUCEYMOx5PrUF5QdBRKpN2YUEczY5i ItkY3WAC8OwfMZNQiuPEhKWcaoIkATqBKX8ZM6w6+8zF4HhkaeJeD8e6UKQGPyqtRIwym9 4K7zcWuoFB/c9NZit2m6pspK5VdqPm1WW+tHjaBIYasp0JDihsXlPbQEc2hHgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755415714; 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=my3N7MVTAcCEhwSmzHCXV6e08DB4ubY2/HImrXCu/S4=; b=mPvwaojOXc12wIs5btw+NNAFM1bqJV7b7APt6rI/u0Ha45kuu40OeYZRbsNPB+apj1TgPO 2/nIgRDBb7YmH+oWGijnHoALFjiTnnUam4PcEomeKOMovqKjUBg7xGVvnsbebloed8KGTZ Z7IC2f6+Y/LmfwtnyF345UPAbsBP8TbYOh/5YogtTMaRgk6nwJ3ZReXGRIWzlMw6W7nCvM vP+XY4SFbh5qdJOBtersp6+gld4imc9ALUUNhkzYmb/oPeth8n8U6runM1F89XXfYzHOlo iEqTWQkzVWDMEEEHL6sf6tcJlwNUnpIP/znR+o1ww8EdLGGZVULV6cw8aJAlYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755415714; a=rsa-sha256; cv=none; b=l42AP+Ed2W+Lkj10jGtlwGVCdRiQBWXR5rCakyDw+sDvpbukiX5AglQMm30KLpd+ywM+/7 AhjPG7dUo7vef4GCmWmFRoEw/0Mo5x95AaipU1nVw43lh/+o2ArSNxlaexx0PEDxNQOn8j AVyFTGA9wIMBgAdaUanFRH8aUU7enn+uyhnpfyMdN6KXZe+3voBdRteObakCnWoW06Vz+K i/Wrna4OKYTDhNShxHJmelWcMIbJX0HgAtdYNiouKZ1rn4qJAaXlYADFkSTzWI3CVJH+Hu LoNzKYTb3O3iw+RvyVqZkZQVAZl6zVJDWPI2CgUhs9J6mC1LvwpEyAgaQNnVPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4SBV4dZFz1149; Sun, 17 Aug 2025 07:28: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 57H7SY3T040603; Sun, 17 Aug 2025 07:28:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57H7SYFM040600; Sun, 17 Aug 2025 07:28:34 GMT (envelope-from git) Date: Sun, 17 Aug 2025 07:28:34 GMT Message-Id: <202508170728.57H7SYFM040600@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: fbf0efd02608 - main - services_mkdb(8): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fbf0efd02608473021692d377dd567f247a1a85c Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=fbf0efd02608473021692d377dd567f247a1a85c commit fbf0efd02608473021692d377dd567f247a1a85c Author: Gordon Bergling AuthorDate: 2025-08-17 07:26:53 +0000 Commit: Gordon Bergling CommitDate: 2025-08-17 07:26:53 +0000 services_mkdb(8): Fix a typo in a source code comment - s/priviledged/privileged/ MFC after: 3 days --- usr.sbin/services_mkdb/services | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/services_mkdb/services b/usr.sbin/services_mkdb/services index 4a5b6863d92d..c5f950831767 100644 --- a/usr.sbin/services_mkdb/services +++ b/usr.sbin/services_mkdb/services @@ -893,7 +893,7 @@ biff 512/udp comsat #used by mail system to notify users # processes on the same machine login 513/tcp #remote login a la telnet; # automatic authentication performed -# based on priviledged port numbers +# based on privileged port numbers # and distributed data bases which # identify "authentication domains" who 513/udp whod #maintains data bases showing who's From nobody Sun Aug 17 07:30:39 2025 X-Original-To: dev-commits-src-main@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 4c4SDv6BCmz64MlF; Sun, 17 Aug 2025 07:30: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4SDv5c30z41FW; Sun, 17 Aug 2025 07:30:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755415839; 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=jvakqMR/FUnhf+Hhn8f2CP90Qeodz6q+gVsA0ONQlqY=; b=DBIrB0L6iZOspIRtn9wf3lrZyB+B5ZmOOZqcBsjNhIv5Cr3l/ENAEsbB8XDWtvPGEkmFqs +uugoZ0CKtowY5yq4lyzb/LJNlpqISv7SUxqSHwDc7tpgUhVZbewEN3j0ypEBCH3GAA6Y/ M49VMe5o+dbDUl5QteCHsxd8seakYyiEca6CSKFhJ/4MrHvN0IE+VT3mrr91Ely7fRyi6r fWQ3jllCNteFGmlGXz61Ah/BaU923RJ5BU38qWQ45qnFWIfAs/PSthB/YsV/wQ1A/lugbY Um5tgtJsZ8nYP89kCR5LKMMahYrDTYrTmy1XVZrYwSep1Ztiby5CcVuZSltGzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755415839; 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=jvakqMR/FUnhf+Hhn8f2CP90Qeodz6q+gVsA0ONQlqY=; b=HVOrX1Vyh5P7dW91RfM590TmQtG8Ord7B/GiIAAgBOOyfIgieuEYUTyZa3wbTocPTPCc6+ voM6Cfg8mLn0FKm64sDj5rlJTOb+iDleUUuTsPFQW5g0UUWhGh88Qlnb1ms16Pj9YF9eo7 NCP7KZymgNq7AdfShzW+79Cw+MPt8o/tr8gGQmw7nREIIvO9VLsVOT8yG2nUx8m1k6e9mX B2fzdAtLv6aPUd9/AlFat0BfKPoH9JuPBVRL60zszr6XeP9buvQL1lknvgwE5IMU5x8SVl E6msu5bucg7z3TO76zs92B90efvs0o6MK/2XrExxpVyH1l4Okrg/NsOPzrFT/A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755415839; a=rsa-sha256; cv=none; b=sMZPxD53rgfSegjuzwbAXWq5ykM8bi1b7bTPdLKZuWjTV8Ourq1m1aW451Y9nKqKDNs2ML +bFtiw1Cv2y8jH2anXNqhEf7E6B9ncRxbqh9NfhQy69UHQxC8LLadgi7sYcaJRNUPBdhy4 xjIvu9X9SfcLtg5dKKAy9qiu0Zdb6+RjockRKIbKKRGJZ6ICVFap7hoPETFEa4NW3CdUt4 ROjkmop2bi024B8H5FShhzXjHTa9sBa8Q8Z270Hbt6vqhqdHJ/HA/c6bMKbRTxIlCCkVSb B2A8X5I8AmyQvKAZe4NFN9hhFSyVJD7iKsnqKILkIO/9ypZYiyS6sbjIbJ5MBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4SDv4zbrz103v; Sun, 17 Aug 2025 07:30: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 57H7Ud6f049979; Sun, 17 Aug 2025 07:30:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57H7UdC4049976; Sun, 17 Aug 2025 07:30:39 GMT (envelope-from git) Date: Sun, 17 Aug 2025 07:30:39 GMT Message-Id: <202508170730.57H7UdC4049976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: c0367c654a33 - main - localedef.1: Fix a typo in the manual page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0367c654a3340c5aa194a3137489f760d556139 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=c0367c654a3340c5aa194a3137489f760d556139 commit c0367c654a3340c5aa194a3137489f760d556139 Author: Gordon Bergling AuthorDate: 2025-08-17 07:29:04 +0000 Commit: Gordon Bergling CommitDate: 2025-08-17 07:29:04 +0000 localedef.1: Fix a typo in the manual page - s/contants/content/ MFC after: 3 days --- usr.bin/localedef/localedef.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/localedef/localedef.1 b/usr.bin/localedef/localedef.1 index be37715f490d..918b57961c6c 100644 --- a/usr.bin/localedef/localedef.1 +++ b/usr.bin/localedef/localedef.1 @@ -164,7 +164,7 @@ unless instructed otherwise by the .Fl D ( BSD output) option. -The contants of this directory should generally be copied into the +The content of this directory should generally be copied into the appropriate subdirectory of .Pa /usr/share/locale in order the definitions to be visible to programs linked with libc. From nobody Sun Aug 17 07:35:20 2025 X-Original-To: dev-commits-src-main@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 4c4SLJ6xFgz64MmJ; Sun, 17 Aug 2025 07:35: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4SLJ5jvqz41qs; Sun, 17 Aug 2025 07:35:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755416120; 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=lT3IFS8iy2I1dqmZtUG9dAEOWIwH0wo0e4bfO2jLRVU=; b=IRsnU6Ap56J+o+eMeUNUrXkmKGkIJ1GOHQkQrfZzNs3riNRzek/TYwTBrGD5YyYkWDeoaf XlLLiJfYlrR6QMtTZP/phH9WJWz9Y2D8QadO8bz+7wuL2LQFcmjgccM/ftOAME2gIyB+o4 uPvyQutcKixgANyS4N9JfpX8VYkYmtU9eIutaANtCyf5kheSaee3GtVYSsO/C/wIXQXw8h MY5v0TaPr3PlpOhMt3UPOcWHxNlSUuNXhpg1u6ivgQ66NEdDW1BQABHsbBmRajVYLYN87R E5ViPTw5f0SRGmZNkCeoeZwuhuWjfwYkb1Dx+07pxwRH/u8QvXfiM95WKQzIXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755416120; 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=lT3IFS8iy2I1dqmZtUG9dAEOWIwH0wo0e4bfO2jLRVU=; b=g0MhR6SwIO8ROQq5W83dMXSepYuxvRVJ7xZ6mI+fO48D9DSTGzLLKupfV8cdogwLB2mX53 fm3hsiHBzJBMJvOEef9FUN2lX2RgiLiSsytWp5+zrSHLEMMqj4/NGojL70eoH98e6DXKyI nLQh6ptpVNwzNf46axlxH+FmhEPXvp64wMPJxcIsFAGQ9kZMLuEQ35Y75utW2MVN3Q8QqT ptvxnp9qNOMLaxFEWRwhpF8OdkcKISz4DsLTmo7joR5i73lUa0pLCPsMk4nOlPl0fulImw 0HyOncTEiIOsJex0dUmHYegzgClAljvIEh0ewCQ7u6yrKnwfX4qj+Xv9NvXfmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755416120; a=rsa-sha256; cv=none; b=CQmmZmyTdIHOD/jPRxjEmeTzYejNoWKNOcUi6Pl04+XzlvMMMNGo2rhY6HA5giNFPUKTL9 uGeOaoSYkkxhiyKUvpvJO5lQEczCdnvBNSyBFXjXbKL7JGBfELeelOwiyy0qOgHd9LFpxr qwei9WiQwRta65w1c4aNDp71BDQp6oeV2pjc/cjnl1b27wgIdotStIa3Ouh71InMDDJ4Nw GqWlgueP0ipHDnXYnYxD4fSnOwwnbN3LnxdfmKa5AdrARCnu4lnXhKY2KNaRb1IdH7yFmb CDWRf5smCslEd8BownTs0xjAGXED21iEYlsQ5/qNGfgpfAVdnuqRHgKohI3geA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4SLJ5KYcz11Rn; Sun, 17 Aug 2025 07:35: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 57H7ZKOI058538; Sun, 17 Aug 2025 07:35:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57H7ZKEL058535; Sun, 17 Aug 2025 07:35:20 GMT (envelope-from git) Date: Sun, 17 Aug 2025 07:35:20 GMT Message-Id: <202508170735.57H7ZKEL058535@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: f066a425059e - main - test/netfibs: Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f066a425059e6ce80997f8ed850b74cc168c4d5e Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=f066a425059e6ce80997f8ed850b74cc168c4d5e commit f066a425059e6ce80997f8ed850b74cc168c4d5e Author: Gordon Bergling AuthorDate: 2025-08-17 07:32:10 +0000 Commit: Gordon Bergling CommitDate: 2025-08-17 07:32:10 +0000 test/netfibs: Fix a typo in a source code comment - s/aguments/arguments/ MFC after: 3 days --- tools/test/netfibs/reflector.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test/netfibs/reflector.sh b/tools/test/netfibs/reflector.sh index b9500689a321..a68019532010 100755 --- a/tools/test/netfibs/reflector.sh +++ b/tools/test/netfibs/reflector.sh @@ -897,7 +897,7 @@ testrx_run_test() *) _opts="-d" ;; esac - # Convert netcat options to reflect aguments. + # Convert netcat options to reflect arguments. case "${_o}" in -i) _opts="${_opts} -T TCP6" ;; # Use TCP for START/DONE. -u) _opts="${_opts} -T UDP6" ;; From nobody Sun Aug 17 07:35:21 2025 X-Original-To: dev-commits-src-main@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 4c4SLL2b00z64N4B; Sun, 17 Aug 2025 07:35: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4SLK6lkMz41d7; Sun, 17 Aug 2025 07:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755416122; 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=DDN8ywYkIVVP3TEAQHR/sfO046xe1eM50WoHXhk1Bd0=; b=bjox5/PUaD6ShMAb4Iiu7qNiEzKmNDkAMcmq2kMfpag6yx1Ue9rSMeNkkfpJrAFqefuKeV iN4vR/D24IffjsvkZtcLzWy1eKmOJqwowdhyklBdwny6Ah9jINLhEQ1fpntEGje1WMsJr8 5p12lT327vk5W2TERr4lTITVOXHCRaEtcxUdfyXNhItDpwMahTKFl4C8OYSrep5IgMBISs YmZTaH3SsxPuBMNrdV+jFkKv318i+kph4EZJhVtUb0/Lcj9+dRqRMfTeuNZTNSEA5iaLUa 6cCxCQXsbhmahlWlauivivVZBto+/Qu3pE01NpIBDX8O7Syamz0Bd7etzgXzBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755416122; 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=DDN8ywYkIVVP3TEAQHR/sfO046xe1eM50WoHXhk1Bd0=; b=Sk0XfehOlKkc92umFo+nbyJbITiPqhdPrbDQkA/AFFlHg1dFhmerblhSa14DYSvaDURMCi JTf83Dlx9C4xaGB43gSD0jaFXaKoqBNUyKnSEmmqkYmTCeVOaudzRENe/cL+wL969G4z/3 1Ya0AQMI4uJbg1lqbRCT0yyCiY+9thJr372adkhBn4ji8nC3JwKy7t9908DSYrpG8CXQq2 o72ktgUK5wbNTPBKrRz1eOfFbYvh7zn1sMrAwaF5M8x6TQn1Li/iuHDXQQQFQ3RC1OoT/g Eib/aYtlP4Fz/XW0KMJJdjPReEvYs1iv+T6FEF5mRogsu6UCfaMyi01Dm+mYdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755416122; a=rsa-sha256; cv=none; b=nmJKK9pOnf072vjbIR0tp9osebwTqTy1ehgkwoObswLDNGrqusKtIZy+Weq6VBgaClpg40 TVWimBSyxPle4nPFGDqw0l3l0J18fU8HwTpFOUicjzYdOVYTf8Bj0TPR4jP4D+0wLHC0tx xGGK8EwKp8PkKtWX96JtMxbNeAKkTBfWWYhZzC3px8FAFNKWABS2akNQkISfym3j5cS1TB 7zcQg0M5rubIc9Rgu+zEpHaUVSGOKEknw+JtGmv5qx3E1CTbkbcHcSz1H+lzuKxs4Lg5jD aVChKAbgH/lsW5oZEQ0Hfhmoww4S7BtEpadDcPXVx6G6Vp6QGFWlff+N6xEonw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4SLK6J5Kz1155; Sun, 17 Aug 2025 07:35: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 57H7ZLF8058571; Sun, 17 Aug 2025 07:35:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57H7ZLdk058568; Sun, 17 Aug 2025 07:35:21 GMT (envelope-from git) Date: Sun, 17 Aug 2025 07:35:21 GMT Message-Id: <202508170735.57H7ZLdk058568@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 663061da205e - main - isci(4): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 663061da205e4112fa25bc628f35a56f0e31a39a Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=663061da205e4112fa25bc628f35a56f0e31a39a commit 663061da205e4112fa25bc628f35a56f0e31a39a Author: Gordon Bergling AuthorDate: 2025-08-17 07:33:50 +0000 Commit: Gordon Bergling CommitDate: 2025-08-17 07:33:50 +0000 isci(4): Fix a typo in a source code comment - s/contants/constants/ MFC after: 3 days --- sys/dev/isci/scil/intel_sata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/isci/scil/intel_sata.h b/sys/dev/isci/scil/intel_sata.h index 4cf4adf03e07..fdad5be9b083 100644 --- a/sys/dev/isci/scil/intel_sata.h +++ b/sys/dev/isci/scil/intel_sata.h @@ -61,7 +61,7 @@ * * @brief This file defines all of the SATA releated constants, enumerations, * and types. Please note that this file does not necessarily contain - * an exhaustive list of all contants and commands. + * an exhaustive list of all constants and commands. */ /** From nobody Sun Aug 17 08:23:16 2025 X-Original-To: dev-commits-src-main@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 4c4TPd16Hdz64QkP; Sun, 17 Aug 2025 08:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4TPd0bGlz46cw; Sun, 17 Aug 2025 08:23:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755418997; 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=QlLv1RpSHo/jCx4rkDOW6FIw79wTFk2eE1/Kztf3MnY=; b=fe7zjVDUULr2p20OjgDztSUiHK0EDgfFH3EGJ1Z4ymzFmT7iApppPiDkWOsFd737xd9LKu x4KCd8Tvnt13I5DUAgnaBUATzKkdCKFlxBJ0ml90U6AJ56PJjiUVCT/aJ/olkETq09PDox 2sesnNnCnALzFQS1bxh2nRx2R8/2T7iiAXCc2Yk8CAkT9/LtcAsNeEb5UYTpHD0XXZ/aPS n82Q38HSdEM9mmrkK/T/I7BQThadu9Ak2w/7EryBF2TIGd8G50nK3/8ziF/064qcwdBDhN 0c5imkbtfPBTvxh61VJZXq4lmX3DTnhNwqQm7wuuNw4XZumXuGylsp6y3+/WAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755418997; 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=QlLv1RpSHo/jCx4rkDOW6FIw79wTFk2eE1/Kztf3MnY=; b=hxuBie+7Onv76q8HoqXEjO0QIfLks/yVqlWkrt6zWD85xc+px47L6mRbHV1Kh8x1dEiUdf 4tIz8Okbd7WcvL+9U5zJ4g1o2WeZVERX4EkU6CYAZMkENZ8aqsPKwCDb/BH7YQGL1gTMK1 1EVbz9CAAMn7WOTjkrDqW0q3ojaYuRJz47ShQr0Xt5fBskQK0sB5AmDnmFOCPleqX4Zxrd S/PheMnT3kkThz/esmbVmqc/lmWYhVA98pTXYSBl1K0EPAUQAzfcvpiv5wf/Z1kSXhrK+8 1/JM3moBQ3E/3WT9CwS3iBSoQeGZ7Xz3vOXOOzL5AcOfkLi7HZ+X1inaZfCsKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755418997; a=rsa-sha256; cv=none; b=pParNtPgTmdWlA2HVFdPcK8esV8P5ah06Ke4bXnytaJe32AqylNuH+ryXab3I2t37DPuSi HpURG/TcK1XyMzkPNuGyu8Bz+pbozc0z1VkgnhlQVX+sXU+o8ezOZn8XCozhVP4UByF2Zk qhtassInd5OqzIYvKwXP73JX/Yzi8bM1BcYv84XYuZqWk4drWGJ6kX5htnZf/If4M1qZEj SnNtfqD/Ex1esSfZju6amKSahgkykNdCAlGnrFGJM0dcPZx7OHjpdx0GFgeia0svtFmQBw jMvn1Rbb7jy6dOlzXBc/ojf3P/yc3hscQ9TW+a85P2KuhdYzyn4DNkAIGqh4rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4TPd091nz12Jr; Sun, 17 Aug 2025 08:23: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 57H8NGtY051338; Sun, 17 Aug 2025 08:23:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57H8NGbb051335; Sun, 17 Aug 2025 08:23:16 GMT (envelope-from git) Date: Sun, 17 Aug 2025 08:23:16 GMT Message-Id: <202508170823.57H8NGbb051335@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: 2abf24b3698c - main - amd64: re-enable la57 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 2abf24b3698c08c9fc906580fd5be67be65c9feb Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2abf24b3698c08c9fc906580fd5be67be65c9feb commit 2abf24b3698c08c9fc906580fd5be67be65c9feb Author: Konstantin Belousov AuthorDate: 2025-08-16 00:37:18 +0000 Commit: Konstantin Belousov CommitDate: 2025-08-17 08:09:24 +0000 amd64: re-enable la57 It benefits KVA. For userspace la57 is disabled by default for quite some time, to avoid compat issues. Reviewed by: alc, imp, olce Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D51929 --- sys/amd64/amd64/pmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 243a6625bece..9867bb7fdbac 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -424,7 +424,7 @@ static int __read_frequently pg_ps_enabled = 1; SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &pg_ps_enabled, 0, "Are large page mappings enabled?"); -int __read_frequently la57 = 0; +int __read_frequently la57 = 1; SYSCTL_INT(_vm_pmap, OID_AUTO, la57, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &la57, 0, "5-level paging for host is enabled"); From nobody Sun Aug 17 08:33:56 2025 X-Original-To: dev-commits-src-main@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 4c4Tdx1DTQz64RRM; Sun, 17 Aug 2025 08:33: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4Tdx0Y0pz47QK; Sun, 17 Aug 2025 08:33:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755419637; 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=Fjf14xOlMMC24UwRevJiHfbI6znHayljTA8MIxtTXGw=; b=ax8VN0VChE6PBegSfzdbeZ5cj3j3c6WC+1De0eFJZrvAibAX644CrtvtNSxygOjHBAiwM5 kso1LevyM1FScXp11DQDj+uWDNH4LiBAT4JEetq+7Wuw2g0qbpqhmjyFpw7LA6G3UNpqeZ Y9fgw/PA5LkR6uXFcmVNas2nKChMvQgYqymIJW3TUbIopWYKOvzC51c+l/knL9AjoaMPdz scQasxcU0yfOa0mxoFxSKq0R4x5N3vfHMV8aq1QktGDrUkYKyNx5fNIGzQ6S39JqMQ3H33 gwgxpwrHSq8D5WQr6R4GBUrY2Az+vhEoRLsg9z9GC8H3276emFHGcod6mTorvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755419637; 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=Fjf14xOlMMC24UwRevJiHfbI6znHayljTA8MIxtTXGw=; b=plAXN+EicC+tQjMeMc1HpDo7EntCgCOasySL992/WybQ4JbhgE6CR0rHWwHoovjv8yxB9I wru+ujtURwlox2doV3/xfYBS+9qEkBpvva+7bWYVYtBExfEkEYOsoYDB+LHtQgg8L2V8b2 zKWlqHQmfLPWsABcabcJp5H8ZaICfSQenQ+ZOuqLe47sDUQ/sAXtsAh1hcR/2RT6N3xspb XVZoYkR1XTgevu0h8OqvPnuHJFn0aR/+1rl9HxHhWVAbpl5WN9GpmO1BikdNR9Qnw4lSp4 +DVNB1cQBRguWGyDRyrg9f+AK4TZCx76KDvKUNJ966KzOn16p84ultNFVD7PrQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755419637; a=rsa-sha256; cv=none; b=beL14woyULnmxh1466a3Jt8VP5DwhciB8Ts43CKNd0uATt+8+u6n8mQuWRlS0i93wRb3wl fX4pmGKMHJmaUgEnsvB8d7FZLqwyM/Rg42hXB1iZIw1ZXodScYW3LQGtcNs9+BQ4GjrXbn sV+ycktYDBxrjFsAFqyLncCx93BE2kBZkZ0CKNBhrwpqNVka/8RAzufs1lXtR2zuQ2fp/E ZbeRO47vAiYHd/6ob7tDVrT4wc+Y8sWY5q3GndIlwUCQNAkIe3zxGPDmiHIweGjr/BOxlk DLPQ1Fx+Fhpu4Pv6vfB1DTGGq7pUyea40FTB9AY2iESqii0FcSEHDqaZhQIO+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4Tdx03mcz1279; Sun, 17 Aug 2025 08:33: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 57H8Xukk070733; Sun, 17 Aug 2025 08:33:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57H8Xu5H070730; Sun, 17 Aug 2025 08:33:56 GMT (envelope-from git) Date: Sun, 17 Aug 2025 08:33:56 GMT Message-Id: <202508170833.57H8Xu5H070730@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 9113e9d68705 - main - ice(4): Fix a few typos in source code comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9113e9d687058877009c8f3a871fbe845db6a592 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=9113e9d687058877009c8f3a871fbe845db6a592 commit 9113e9d687058877009c8f3a871fbe845db6a592 Author: Gordon Bergling AuthorDate: 2025-08-17 08:32:24 +0000 Commit: Gordon Bergling CommitDate: 2025-08-17 08:32:24 +0000 ice(4): Fix a few typos in source code comments - s/wit/with/ - s/Recceive/Receive/ - s/convenction/convention/ - s/metaddata/metadata/ Obtained from: OpenBSD MFC after: 3 days --- sys/dev/ice/ice_bitops.h | 4 ++-- sys/dev/ice/ice_lan_tx_rx.h | 2 +- sys/dev/ice/ice_lib.h | 2 +- sys/dev/ice/ice_protocol_type.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/ice/ice_bitops.h b/sys/dev/ice/ice_bitops.h index c480900596f4..a623f810c101 100644 --- a/sys/dev/ice/ice_bitops.h +++ b/sys/dev/ice/ice_bitops.h @@ -198,7 +198,7 @@ static inline void ice_zero_bitmap(ice_bitmap_t *bmp, u16 size) * ice_and_bitmap - bitwise AND 2 bitmaps and store result in dst bitmap * @dst: Destination bitmap that receive the result of the operation * @bmp1: The first bitmap to intersect - * @bmp2: The second bitmap to intersect wit the first + * @bmp2: The second bitmap to intersect with the first * @size: Size of the bitmaps in bits * * This function performs a bitwise AND on two "source" bitmaps of the same size @@ -237,7 +237,7 @@ ice_and_bitmap(ice_bitmap_t *dst, const ice_bitmap_t *bmp1, * ice_or_bitmap - bitwise OR 2 bitmaps and store result in dst bitmap * @dst: Destination bitmap that receive the result of the operation * @bmp1: The first bitmap to intersect - * @bmp2: The second bitmap to intersect wit the first + * @bmp2: The second bitmap to intersect with the first * @size: Size of the bitmaps in bits * * This function performs a bitwise OR on two "source" bitmaps of the same size diff --git a/sys/dev/ice/ice_lan_tx_rx.h b/sys/dev/ice/ice_lan_tx_rx.h index 693e0ca5efc6..eedacdab0216 100644 --- a/sys/dev/ice/ice_lan_tx_rx.h +++ b/sys/dev/ice/ice_lan_tx_rx.h @@ -630,7 +630,7 @@ enum ice_rxdid { ICE_RXDID_LAST = 63, }; -/* Recceive Flex descriptor Dword Index */ +/* Receive Flex descriptor Dword Index */ enum ice_flex_word { ICE_RX_FLEX_DWORD_0 = 0, ICE_RX_FLEX_DWORD_1, diff --git a/sys/dev/ice/ice_lib.h b/sys/dev/ice/ice_lib.h index 308b2bda2790..640bdf8fed7b 100644 --- a/sys/dev/ice/ice_lib.h +++ b/sys/dev/ice/ice_lib.h @@ -313,7 +313,7 @@ enum ice_dyn_idx_t { ICE_ITR_NONE = 3 /* ITR_NONE must not be used as an index */ }; -/* By convenction ITR0 is used for RX, and ITR1 is used for TX */ +/* By convention ITR0 is used for RX, and ITR1 is used for TX */ #define ICE_RX_ITR ICE_IDX_ITR0 #define ICE_TX_ITR ICE_IDX_ITR1 diff --git a/sys/dev/ice/ice_protocol_type.h b/sys/dev/ice/ice_protocol_type.h index 300d61bfb5d9..b90c25e6c427 100644 --- a/sys/dev/ice/ice_protocol_type.h +++ b/sys/dev/ice/ice_protocol_type.h @@ -143,7 +143,7 @@ enum ice_prot_id { ICE_PROT_LLDP_OF = 117, ICE_PROT_ARP_OF = 118, ICE_PROT_EAPOL_OF = 120, - ICE_PROT_META_ID = 255, /* when offset == metaddata */ + ICE_PROT_META_ID = 255, /* when offset == metadata */ ICE_PROT_INVALID = 255 /* when offset == ICE_FV_OFFSET_INVAL */ }; From nobody Sun Aug 17 09:25:17 2025 X-Original-To: dev-commits-src-main@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 4c4Vn92t8Dz64Vhj; Sun, 17 Aug 2025 09:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4Vn927Kcz3D06; Sun, 17 Aug 2025 09:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755422717; 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=jDKtvKrcFByMu6Sr9qmKe6YVzvpa7lNeVB2gG8gL894=; b=d9YFlwF9GLdRAn+XVobAp6UVhK0LObsac9LncpaROKEIPOwuWhrbmrTlL0jMjo7lkbSsbM nSDFSrIDKeUV4Wlsqc00Iry/Gi8VQ9W87K2Ys/su/fXTZUXQFdvxNZw0ITNOjWZOrYWhVx YVDx/4O7wWq2emN/jw6POPY7tMtopbni+Pye7dMjnkKj/iKFZ+eQf3QdmCqsebedssRSvh /iEIjS2RaGRinbw6itFc0lGjFpBvZUojEnotq7Pzi2iIj9wpSaIgaKzsG9Wf7IYDgmfIBZ 8jvD59rlndzRZG6VvTA+MJTU8WsFGM/WnvHgYkyQ0UQntyzL2qmJa/uePuCbfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755422717; 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=jDKtvKrcFByMu6Sr9qmKe6YVzvpa7lNeVB2gG8gL894=; b=tllYzbf98MugFheCOW69IJEsaI7E0O0fhNDj4vf0XA+HyimElcewcUljFHgIXAESTIUNUd odpC0zEe6YPbZR/1PHP22JX4F8Xhdj6/F9KgLE0nkZZG3ME7aY++AUKvwt3saRCatpcuPg XPRsCAJ8KEkGUw3z9GYZU+cb8bBrypvR5Y0JPbN0gbxHG/Gva500hkr9CThTGAm484jNSK 9a8RzgPICtn749TWJglxJI5+UddolIfy5Pr/lIZCRq9EftcCk4wEJAHchUzOzFj9tOOLzz SHSyYHN+sLpNbgc+aus6zWMVlpfGRMnxqngO5KljgnhP8ayerrMOkx0G01ZJeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755422717; a=rsa-sha256; cv=none; b=HwwCfJIIL0tZ8Xbl63WVR3n4OVDP8mYBFrJjxpxk/gweXt3tyjoRLKzIFeamPeacFolbRk dz4VkZrEq3WvyX/MftvePMtDWq0Kbv9bm5HVJ9AgPuT/P+C0lSunytNqeiVbBs90wpgdqK gzZGszNat8kx1pek1cU9Dg8G8vogomBskQ0Jo9zDr6ihc3FYQWaxOA2WOc86CxH8qZa1nA Ep55v7GdcVnRlNq0oBkt8wkaKc8SgrhjUav02B4zrWeDuvyqO4T/iqBeejLc2HVOkkI+pO yVrAc3BjICC8hhTcQoytl0xoTO5qajIWh6ozNE170NTD+PIlc5j9ZoDbiP1XfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4Vn91gPkz146j; Sun, 17 Aug 2025 09:25: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 57H9PHF0065644; Sun, 17 Aug 2025 09:25:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57H9PHNR065641; Sun, 17 Aug 2025 09:25:17 GMT (envelope-from git) Date: Sun, 17 Aug 2025 09:25:17 GMT Message-Id: <202508170925.57H9PHNR065641@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: a7818e342095 - main - stand/efi: Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7818e34209579b5e1bba0df73c4d0d5ed2b1397 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=a7818e34209579b5e1bba0df73c4d0d5ed2b1397 commit a7818e34209579b5e1bba0df73c4d0d5ed2b1397 Author: Gordon Bergling AuthorDate: 2025-08-17 09:23:45 +0000 Commit: Gordon Bergling CommitDate: 2025-08-17 09:23:45 +0000 stand/efi: Fix a typo in a source code comment - s/externel/external/ MFC after: 3 days --- stand/efi/include/amd64/pe.h | 2 +- stand/efi/include/i386/pe.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/efi/include/amd64/pe.h b/stand/efi/include/amd64/pe.h index b858ba916c7d..faf8eafde1e9 100644 --- a/stand/efi/include/amd64/pe.h +++ b/stand/efi/include/amd64/pe.h @@ -83,7 +83,7 @@ typedef struct _IMAGE_FILE_HEADER { #define IMAGE_SIZEOF_FILE_HEADER 20 #define IMAGE_FILE_RELOCS_STRIPPED 0x0001 // Relocation info stripped from file. -#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 // File is executable (i.e. no unresolved externel references). +#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 // File is executable (i.e. no unresolved external references). #define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 // Line nunbers stripped from file. #define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 // Local symbols stripped from file. #define IMAGE_FILE_BYTES_REVERSED_LO 0x0080 // Bytes of machine word are reversed. diff --git a/stand/efi/include/i386/pe.h b/stand/efi/include/i386/pe.h index c756080fe2d7..226c6c7564a7 100644 --- a/stand/efi/include/i386/pe.h +++ b/stand/efi/include/i386/pe.h @@ -83,7 +83,7 @@ typedef struct _IMAGE_FILE_HEADER { #define IMAGE_SIZEOF_FILE_HEADER 20 #define IMAGE_FILE_RELOCS_STRIPPED 0x0001 // Relocation info stripped from file. -#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 // File is executable (i.e. no unresolved externel references). +#define IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 // File is executable (i.e. no unresolved external references). #define IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 // Line nunbers stripped from file. #define IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 // Local symbols stripped from file. #define IMAGE_FILE_BYTES_REVERSED_LO 0x0080 // Bytes of machine word are reversed. From nobody Sun Aug 17 09:29:47 2025 X-Original-To: dev-commits-src-main@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 4c4VtM4CKkz64Vlj; Sun, 17 Aug 2025 09:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4VtM3Mk5z3DjK; Sun, 17 Aug 2025 09:29:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755422987; 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=VJ1VQ0QygrudRcHbVyPnqMgza16mBEoboxCMGsQ4z54=; b=wMhs0iqQujGcvp3+mJuvqYxLT5AhUJ/DstQCq4XA9Hphu2l6P4R1btTiYAjKNf875UNrgN x13Z+PminWwIPO5O+cEQhl91NiHmnYNHmW6pFrtE/32YuSZDceQ54ejLDORirFlnLjML8j rHo8ApgY5UUHBFTDcbI6MGb9oJqNuVZ/C/sy7CSYBH+C6r3Yu3gblXWqU0mSY8LsycfLvk USm6C40saHfkGdOc8T92CpF0zWVs2u10crXAzFTF1si9mBIe2nCflWHaWpMx9YODsoHz6h VFm26YSY28p/ZqwlpPm+xtewETBPI6G8GqR/R3Yftwxmba0KQazKWNGUqSSTtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755422987; 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=VJ1VQ0QygrudRcHbVyPnqMgza16mBEoboxCMGsQ4z54=; b=oSe0FoEtx1CwO3zVTLGogNkMHN4S61mFUtzkdoh6dvuQJvN6NoaFC84vPPnu7nmn2R26Xz HxgNdPKg3cztE+s/Ag4kxUeBVq0wAutJUQpgDdOXHFo6rb/XL/vbqMOVYfVKvDy1Rv33BH wihJK46bc5CnDw+JfpgT3xtYs8/ZF3zCU6Fw0/PxWxNpNuiD4mJGziRSuWmICZD8IHZcLj Y7DNojIQnKqEDIpKEaFqbxhQli/hLtwb+Dm3pIpUS0QUF2WBf6J2ex8vMGRGYM0+NRQkNZ 0kCOYJwtDtKXmQEnQoMlJl4r1PqLznodkB3lLaGjVnCKSLKdpp2sDgaVRfQkfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755422987; a=rsa-sha256; cv=none; b=QNgTn1x/9NriOtvsC4AhqHC5WXglh48qYNwVYBNN3hJeLrWG/1BvWrQxqQHbWvnHI7/wqa dLQY5/ienvNaz7oanikOd2TkyYmXBysjI+NUjmkhuEtCqjg7P39/R/5WK0UBWcy/xBZ0+d TGK3vfs9PF0eVJma7+yjVtODSJe+DQfdFEOfD3vEK090GmLdXy+WLL7i5ga9oBjAyZ1Fx5 ffCtaoDHqREaZkH2dacVXI2Skm86Tr0Jwg13ysQyMd0nNdtuo/7ez5KyJECkbsdAh9mb2T 762v22Xi/9Tei1HxvSqM6QkaOB6/bZe9O9GUqnQi+oTPOsadGApG8/PA+fzOdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4VtM2lYZz144B; Sun, 17 Aug 2025 09:29: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 57H9Tldd067017; Sun, 17 Aug 2025 09:29:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57H9Tl62067014; Sun, 17 Aug 2025 09:29:47 GMT (envelope-from git) Date: Sun, 17 Aug 2025 09:29:47 GMT Message-Id: <202508170929.57H9Tl62067014@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: a3a78bd7a744 - main - udp: Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3a78bd7a7446a9a437391c681ba196d956987da Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=a3a78bd7a7446a9a437391c681ba196d956987da commit a3a78bd7a7446a9a437391c681ba196d956987da Author: Gordon Bergling AuthorDate: 2025-08-17 09:26:44 +0000 Commit: Gordon Bergling CommitDate: 2025-08-17 09:26:44 +0000 udp: Fix a typo in a source code comment - s/datgram/datagram/ MFC after: 3 days --- sys/netinet/udp_usrreq.c | 2 +- sys/netinet6/udp6_usrreq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 2f2f9abf1c83..3e6519118a40 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -448,7 +448,7 @@ udp_multi_input(struct mbuf *m, int proto, struct sockaddr_in *udp_in) /* * No matching pcb found; discard datagram. (No need * to send an ICMP Port Unreachable for a broadcast - * or multicast datgram.) + * or multicast datagram.) */ UDPSTAT_INC(udps_noport); if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 0027cf3bd230..1a32365f5d1d 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -341,7 +341,7 @@ udp6_multi_input(struct mbuf *m, int off, int proto, /* * No matching pcb found; discard datagram. (No need * to send an ICMP Port Unreachable for a broadcast - * or multicast datgram.) + * or multicast datagram.) */ UDPSTAT_INC(udps_noport); UDPSTAT_INC(udps_noportmcast); From nobody Sun Aug 17 09:29:48 2025 X-Original-To: dev-commits-src-main@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 4c4VtN5TKGz64VH7; Sun, 17 Aug 2025 09:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4VtN3T15z3Dc4; Sun, 17 Aug 2025 09:29:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755422988; 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=Kj+M/acxS8NjtE1gyQUrINkoRejltZxYV2SYqwBDZ+s=; b=d2P7k75rVGT84iOoUeo74sT8oW7pGdUKuseb0u8cQ6xdmZUk1hhmUEAahhRYQLjE5MX5bb 86vZQ/eJTvH+nuyG+ZoVsMClev+RJFrNUdDtP/7LnAlXNsrlxqfy+9L/31KU7PtYTxnGu8 vI+RYkGMhMzapu4O9CmR1sv1eu0R2+oWSdUCmEEPqABxSwQkBdcMfn/jZNwjTM6BDEbYNx 8CxYMKcwRsDFGdUzhqKLKDmurqAYAvjOlHQN6gUr5LPVaRbzSTnXpCELifaoFiGZNT2ocA IZtHPXq7vzGVRPKaqCaDCQNJBW6/tnqH4/tMJcbPQSjwrBPvBsiOnzw5KwGCrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755422988; 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=Kj+M/acxS8NjtE1gyQUrINkoRejltZxYV2SYqwBDZ+s=; b=iRoT0jneWI6QImVEJFm9AA5ZRnNBfWieMO/U0TV3ceWCsbEvG9aV7tdieKJ572ADiW3isZ vV/xAZ4aCFa1rhiv+UMjEosS2//TZiZUbY6CNo/UgQu8l44qxvNvPKealf7LE04Xcfqa4/ euPMXuTn2aIJlSwrqefd8y4v98JWqG4NGAeEFKogRZAHnYnRelBTNoOghgoTYGKpOzOC2r VVK49yipIRz4Q0mkIJsH5QYpkzlJ6c0KjtT698L9nbXWCMGPX5TT8aW/SYZepPWPx8/1DF dfrkKpUO2OHqlKV8Sm/ytQcoUfXztrxWy5UHD98XpECqxhzCToRSLmK2zd2msw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755422988; a=rsa-sha256; cv=none; b=ssGdKy3z9neaRN7cM0PHLChRiatYprbM17wFbL9myn9YfcrGzMtZwmLfg/1a/D4Nn7P7u6 7EC4ZvEfjy5o+tymwbS9bQ7jWlq/x8J/xlNWqYPOevOxADgVytsHgT+7Bqj2QyUwScQk+9 f5HbZJ/OQ2HQfpoKdo5kbCyiQAP1Y6wn38dNWIlPElz4eFWRR2BCpciN0+elGz6y0XdEA8 6ejn3QXPk+GVZJFYRGXjNB2kTfpCahXMlmt0ty2F4nTG3Mu0qL2sLthbUKOv7rwZaMcdtv Puv9OE5nl7lTQ/1Po87YU7EoUpRIDfJpSIiCvkoptc8AJLtHubAh/YXedwMroA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4VtN31DMz13qr; Sun, 17 Aug 2025 09:29: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 57H9Tm6i067054; Sun, 17 Aug 2025 09:29:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57H9TmQI067051; Sun, 17 Aug 2025 09:29:48 GMT (envelope-from git) Date: Sun, 17 Aug 2025 09:29:48 GMT Message-Id: <202508170929.57H9TmQI067051@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 4c7b81cfa290 - main - isa: Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4c7b81cfa29084bb0013969c175700069e6d7019 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=4c7b81cfa29084bb0013969c175700069e6d7019 commit 4c7b81cfa29084bb0013969c175700069e6d7019 Author: Gordon Bergling AuthorDate: 2025-08-17 09:28:20 +0000 Commit: Gordon Bergling CommitDate: 2025-08-17 09:28:20 +0000 isa: Fix a typo in a source code comment - s/Monochome/Monochrome/ MFC after: 3 days --- sys/isa/isareg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/isa/isareg.h b/sys/isa/isareg.h index e89136c7e1e5..8b2d55608078 100644 --- a/sys/isa/isareg.h +++ b/sys/isa/isareg.h @@ -49,7 +49,7 @@ #define IO_RTC 0x070 /* RTC */ #define IO_ICU2 0x0A0 /* 8259A Interrupt Controller #2 */ -#define IO_MDA 0x3B0 /* Monochome Adapter */ +#define IO_MDA 0x3B0 /* Monochrome Adapter */ #define IO_VGA 0x3C0 /* E/VGA Ports */ #define IO_CGA 0x3D0 /* CGA Ports */ From nobody Sun Aug 17 09:31:44 2025 X-Original-To: dev-commits-src-main@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 4c4Vwc6vhwz64Vv4; Sun, 17 Aug 2025 09:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4Vwc67Wvz3FLd; Sun, 17 Aug 2025 09:31:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755423104; 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=BcbTUfhXC/S3CYktz5uWd7vu9NUSIZ/4qaIEEjN/oTA=; b=ebFLIzWlGKG8ZTysBtrEAXybJTpTbhGr0TH30Nj4SfAStFG0WLZkdI/XUDPwkNmPSUrP4d WR/sTH8fnEMlKhKIgKB9Yv9Vb0W4HjKIivDc53nfLU5g9X9dBg/q61qCBt1pRWoamMlGS9 2bOcF+lXJMdGc5k+Z5K78si7D5YcKpcKmsuTIWQmUSu362PfgPFv85dZJ8HgaieItXyS88 iyxQj9r+n8xaQk20FVmOsOxo0yQR24NuZ44wOTLMmCiEFLDuRREqtMusI7GgDMGx9QTXjB Vesbu+DePzb5Zgn7ivEJW67JcVc8z3lMqKGrVXE/QhdrRTjuaksZlS+UG8zqEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755423104; 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=BcbTUfhXC/S3CYktz5uWd7vu9NUSIZ/4qaIEEjN/oTA=; b=HwHrRkisHnwj9HN39pLTGDS4xyVMTAcOIHVzPmvcydepT6vN8Q+Z/m4tP2fg5hZ+TG4NH/ NG3LZl1scOq87OtN9blXka7nA6YjlGzDIwVMprT4ItadnOME9oQwcz7nuSA5ypfpB4QbGY SoldZi7ITTExVBip0ECksTeD3xXdrfbqMWGjrIzi+i1g+xYYP21nJJNQwtVKLAld2CvTHj 2RLn4I+BAnZ0TwvMaUQNNbIYzBgvoKpZGapVhiT40vEEb2x6nt/ZQGn52zPzE2aKd9fyNT FccWhsn8YG3xjz7KUpnzAyhzZERduiL6sDg8w2oqciVn4w4cwdtc/5Gg8n5AjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755423104; a=rsa-sha256; cv=none; b=HMkavF/dtz8yvoismr1mAubWiPTCTJSxn/NvHHCM/+rJpwOh6BqpG4cLSgOBw80iJ3pRKP nB3hJ5KE+DKsoi0ybbFE0QC81wRBTlLnBONmUYI77WRlTn2YMqBTHNnRAeRbvvGDlsiFcu SVT85BZIvh2X9i+45NvY2uG+w3wf4OZY3a67oM7EIOi3JnowHUcoBzJLmach4AGf/dHMc2 wRkrZUnEy9FK0j/Ic197x+uJvgelVpfDLV5qhFpEZerNXNgppic0wbXNwoMIYfi6GrEWkV CRtoZYi0qRBHtkq05DbpkNnCNlGfRtQZ1/iXir6USsHD+Wb92VOr3DTr8sqINQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4Vwc5kvmz14Jb; Sun, 17 Aug 2025 09:31: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 57H9Vij9081048; Sun, 17 Aug 2025 09:31:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57H9ViAf081045; Sun, 17 Aug 2025 09:31:44 GMT (envelope-from git) Date: Sun, 17 Aug 2025 09:31:44 GMT Message-Id: <202508170931.57H9ViAf081045@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 7ce07c41423d - main - g_part: Fix a few typos in source code comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ce07c41423d143cd3f7b8f7e61c2f3e8b6336c2 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=7ce07c41423d143cd3f7b8f7e61c2f3e8b6336c2 commit 7ce07c41423d143cd3f7b8f7e61c2f3e8b6336c2 Author: Gordon Bergling AuthorDate: 2025-08-17 09:30:16 +0000 Commit: Gordon Bergling CommitDate: 2025-08-17 09:30:16 +0000 g_part: Fix a few typos in source code comments - s/partitition/partition/ MFC after: 3 days --- sys/geom/part/g_part.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c index 41125f6478ac..88e44b335b29 100644 --- a/sys/geom/part/g_part.c +++ b/sys/geom/part/g_part.c @@ -1046,7 +1046,7 @@ g_part_ctl_create(struct gctl_req *req, struct g_part_parms *gpp) /* * Synthesize a disk geometry. Some partitioning schemes * depend on it and since some file systems need it even - * when the partitition scheme doesn't, we do it here in + * when the partition scheme doesn't, we do it here in * scheme-independent code. */ g_part_geometry(table, cp, pp->mediasize / pp->sectorsize); @@ -1539,7 +1539,7 @@ g_part_ctl_undo(struct gctl_req *req, struct g_part_parms *gpp) /* * Synthesize a disk geometry. Some partitioning schemes * depend on it and since some file systems need it even - * when the partitition scheme doesn't, we do it here in + * when the partition scheme doesn't, we do it here in * scheme-independent code. */ pp = cp->provider; @@ -2023,7 +2023,7 @@ g_part_taste(struct g_class *mp, struct g_provider *pp, int flags __unused) /* * Synthesize a disk geometry. Some partitioning schemes * depend on it and since some file systems need it even - * when the partitition scheme doesn't, we do it here in + * when the partition scheme doesn't, we do it here in * scheme-independent code. */ g_part_geometry(table, cp, pp->mediasize / pp->sectorsize); From nobody Sun Aug 17 10:50:26 2025 X-Original-To: dev-commits-src-main@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 4c4XgS50NHz64bFv; Sun, 17 Aug 2025 10:50:28 +0000 (UTC) (envelope-from des@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4XgS4BRZz3MQ3; Sun, 17 Aug 2025 10:50:28 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755427828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Kd9P70CroPkVqYLu2pUvLA7gyansi5kuE02JFnxLzKU=; b=SfpfzAZ07rmN+en9j6twJHh5GdeIoYXGZzb09QE3Qtr7ORCKY2qj37/D9rOBU4qtKB7jsp AFWWnkZBXxLfL8LtkPrvSGFAlrDrYNalt40FU8NrJAqaG3Qa8BqHnVP4wsOJYtUYfLJAoT ZwFxiAGqBRMERqAyw8ZSP32ocZClo99WXVibvOnIv3yfdZrvzW6PfiLBh8bIF5y6/Yw7Ku Zm4PEn2K+jGXb3BLUyPcauyrwcgjH1g3XcEFusCAcXzajURzyTJzcK34TbsJ/l1izVrvUY Zdcbx8NiV49BN8294DCs9nT7T8wSFkH/hvmkVb5v3SkrCa5nsMVRYj7/IA1yTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755427828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Kd9P70CroPkVqYLu2pUvLA7gyansi5kuE02JFnxLzKU=; b=g+kbOq/EZlSN5zvnt2D8WcdnwX6ecjovdmZ7PjjhOfeSWaLhr3CKutr0HXq8J1QJd4mPTE yOcFmfDZoIsUqqfeYCApxXpfguIF3opgvJKY+h0FuZoFKEHeEzHmJePqyPotJUbvA3F7zY 9UobI+HoY8Y6ZH9BP0fxEc54KSCQaUa1ZRJHwlgXkdp1Av8JDv+2ZapspY931q6HFDDl9B 09TPQi5lvgNyD6J4xkxsIdjc5jtvrY7fi4iAhFr/VbxhA+CeHZVRUeowLZwVhkS2f2r5Ad nYyhFL74Q3ulwuzNTGma82CdiAcPct8FFGE0dnJVWovptEAYCRkb+TqvZKEHag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755427828; a=rsa-sha256; cv=none; b=LiVnxq0yvCqoks2iP21yze90pvTux+qxO2Qrgh+f+BdLcZPNfF/mmxBL3g0C9KBgdQf2Vw bNQZvC51JIdzEGdqjkkhY7MYTFHIlGoO+zvTWRpHZBHxLMKA4UpBuu4F65GMhzrtks1a7D 302S+8fIGGgI6C10Ynl42Wb3fi+DpQSXmtYft2ZmCSe0JvJkyOIop/ng1BBi40pR4gK+3x zbLPJyi0DIwml8nqJDOoOF4uvXHlH7Rtjd0tWmA5MNTnWHHlb7gKOKcSLgLn6nES2tWahc PrpkeojW7JyN4TEMEk+zLh1wTd1koiDb06VkJRE1yRRI4wPMd39ocBHwiNoKFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from ltc.des.dev (unknown [IPv6:2a01:e0a:c54:bed0:922e:16ff:fef1:acef]) (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) (Authenticated sender: des) by smtp.freebsd.org (Postfix) with ESMTPSA id 4c4XgS2b4Tz11rs; Sun, 17 Aug 2025 10:50:28 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 63A653C086; Sun, 17 Aug 2025 12:50:26 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Colin Percival Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 31ac42b486eb - main - Revert certctl reimplementation and follow-ups In-Reply-To: <202508170026.57H0QseT043673@gitrepo.freebsd.org> (Colin Percival's message of "Sun, 17 Aug 2025 00:26:54 GMT") References: <202508170026.57H0QseT043673@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Sun, 17 Aug 2025 12:50:26 +0200 Message-ID: <861ppafci5.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Colin Percival writes: > The branch main has been updated by cperciva: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D31ac42b486ebb5609c94cfd8a9= bec86e457f9b53 > > commit 31ac42b486ebb5609c94cfd8a9bec86e457f9b53 > Author: Colin Percival > AuthorDate: 2025-08-17 00:17:03 +0000 > Commit: Colin Percival > CommitDate: 2025-08-17 00:25:49 +0000 > > Revert certctl reimplementation and follow-ups >=20=20=20=20=20 > The reimplementation of certctl, while much needed, broke the release > build and 72 hours later corrections are still under review (D51896). You could have approved that review, you know. I'm also still waiting for your input on D51774 and D51775. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Sun Aug 17 13:41:28 2025 X-Original-To: dev-commits-src-main@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 4c4cSm5SZSz64n1m; Sun, 17 Aug 2025 13:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4cSm4cZSz3d5n; Sun, 17 Aug 2025 13:41:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755438088; 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=OwfMX719FcyV4W/W/6JOUlCDsUBqIm5EMxnosuN7qQc=; b=EkDRsPd6RdPwlDs2ndS/TU8Bgl8v4SP9IjvIIV8Q9fROky3Pa/Kqx3nakRogO+3K+msART ZxYom9ISGnIcqkNSXTHTEIeNAvmqtTXhPGEoI87/cWiRogwDjRNNBvp6UkR2jXtJFBB0oo 9vGU1cwQecPkpe0QyRfbjSUKDqWivD91PyQqh/Zmgd6g42BouVMihfRuGPoDuh7vAnw9P2 vfaISY6a3TzkuRfcfKi9Br835WutSoNQPauf2hMD2wb/078DZr5SlZEYhz9a6pUP1xdF21 OqJ1HCb4XsqvfbWgY5m1PjcwGXKKBaxDGmtP8Z+grrMivozDC/cjbFTbGoPVfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755438088; 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=OwfMX719FcyV4W/W/6JOUlCDsUBqIm5EMxnosuN7qQc=; b=NUPEmbIVREW86IUlHfeJ4FkuKbybk+oZNIgHw7UoXD2xxRTBBT2Cis7IWLnDTO91ldrfSs 8vubD8SpWmg8OtqSFv4xCoY61NJkwUCHkiA2AH3KnFYzf1rG9uXF+e4EAYcC5PaVBiy31k 2o8v+/P16CfSLEDIfFHiwXXOw1rDBTVQAH8oxG4UYg4DOjXabZQzjmANeUq2+3ddRXMSrK /Ff4bUabkIQu2s2dnHm+iNbdK4lnc2JRPeE2dn4lgl80nUjTIDQAxQsmuk6a3D/JwFHZ5+ W6+43jiBnRcH+Tshww2Z4X42M5kPGyccSw5OJkVbOTrBKh43ztuoKQdxd3G3DQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755438088; a=rsa-sha256; cv=none; b=HcybSbd7cG3saPLk1X2pYlBNO3dFTt1PZc+eevFTmJdf12MujjPathDWP/7w8cLlWUD60t C7vKtw2TLs7fyeG7u3WAtfjbae+QaMTzWPhlGS+FHiz33U4SM3IMRj3MjChaxdQL00SOp3 a197dJrhqMosaj1MwFN7nSrmjchTqg69HS5yYeMgAzyVxFdJriBdABgvZ6Q4e4Lhd/CSxT g2nb6GU6QgsjJC2i40tIGaOCwRD0AAHchiCD+BQEhBlwWu7jmW7kSyaO05getylqMVpLPX tHSxovhIo0s51ClERqBl3xsI6Fm8coBnmLgHrmFKQYWbauO5WsP3Nt5bEMPQnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4cSm47H9z1Bj1; Sun, 17 Aug 2025 13:41: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 57HDfS9V052033; Sun, 17 Aug 2025 13:41:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HDfSss052030; Sun, 17 Aug 2025 13:41:28 GMT (envelope-from git) Date: Sun, 17 Aug 2025 13:41:28 GMT Message-Id: <202508171341.57HDfSss052030@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: e1a358aa72af - main - Revert "amd64: re-enable la57" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: e1a358aa72afe978492d7f58d2a1a79393e87a11 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e1a358aa72afe978492d7f58d2a1a79393e87a11 commit e1a358aa72afe978492d7f58d2a1a79393e87a11 Author: Konstantin Belousov AuthorDate: 2025-08-17 13:33:50 +0000 Commit: Konstantin Belousov CommitDate: 2025-08-17 13:41:18 +0000 Revert "amd64: re-enable la57" This reverts commit 2abf24b3698c08c9fc906580fd5be67be65c9feb. The la57 should be not force-enabled. Sponsored by: The FreeBSD Foundation --- sys/amd64/amd64/pmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 9867bb7fdbac..243a6625bece 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -424,7 +424,7 @@ static int __read_frequently pg_ps_enabled = 1; SYSCTL_INT(_vm_pmap, OID_AUTO, pg_ps_enabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &pg_ps_enabled, 0, "Are large page mappings enabled?"); -int __read_frequently la57 = 1; +int __read_frequently la57 = 0; SYSCTL_INT(_vm_pmap, OID_AUTO, la57, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &la57, 0, "5-level paging for host is enabled"); From nobody Sun Aug 17 16:11:17 2025 X-Original-To: dev-commits-src-main@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 4c4gnd3ZdFz64wwT; Sun, 17 Aug 2025 16:11: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4gnd27nMz3wHL; Sun, 17 Aug 2025 16:11:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755447077; 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=XzF78YAr7bze4aO7sNPNei3dtohfBe93ullPY0kzvyI=; b=YQwOWBo8R2gv0Nf0SliQcemF1Sn+S416RkdWDx9o7UqqHWGeMOsvaPuBUXicikvT4ZshY2 raV34HRll5P4wyq3Q4mOI4Mq0Op3nq2CG3+P77DyNyUznll26/owVww9SNwbrVyercyLWa RcCElDaEj/o1N8oyvWlnKDGGPItI0hphe9uAY5jWDY/HHIJ/PBTWJwBMjNHa4Pw8do/EmK uJcCmDwYInvIyYUOlprgdNcoDiCJrKXV/oWrEW41UsptkdUYb/A7AU5OY5oqNkw+O9p4x6 boWgBcXcmjHsCpzyOo/QPa5sADfQyJ6Ia5rpzvqfWRlL//WV6ChVehgILE8y2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755447077; 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=XzF78YAr7bze4aO7sNPNei3dtohfBe93ullPY0kzvyI=; b=T8roFTCxVNADWsoAn4hbWyd/5ycdmYj6/T6gl0susaTE1ZeYvAGPsiKcfTQqaD4OTOF+B0 hdhkYuPVY0krXblrvsvKI4v22mNK+7kYUPiVZ4+ugjqHHe8mSQwWNXQf40SkD5mRZHNwK8 W5FXbZSbSj56v2k4uq04s7gWDmR2/AtZr5sOAO4xMi4ZeSKt9XIW3BSo0h07557fXZ7keB 4tyT6BYKzWk647PrIMluglhc5cTmWYgQaX+s+5epmqD9rZsyaSOu+a4uqttcbJCfwUM+cd nQBln3qtg7/o3jGjhsJ8QQXPdZVyVo7u/geqLER/81Vy1Mni+Ql0r94Tqe04cQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755447077; a=rsa-sha256; cv=none; b=DDOPQrRudh2f6W6EU6QCIOGWwRSFou52ls0hWm9ppCD5kBn0sC3coVO3W3UAgTJWlrWKPF +5K8KxzXdbH+PrqM4LaTLS1oRFqdHjO1+0SBlnv1RGx4FAJn8M0xR9RelQSYv6hnwUxpgv Ms37Rjsi2DdgIpWrnSFATrqf4DmtAguwJ7c55CwZoMZ+CGY2EjI38ALGjJBW2WfT7eNYjV /HWPe8CSDvHfbZ1YIido5cPsNZbyx+1pxhGrg9KV28a04n4xx7Op/yp89tDHlPHwrXMEA6 DFqoGXCFdhbLIHGNBcQOkV9VAImbaw9aywloqTQJ8NEkirXSdbnrGqXqJ19Oaw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4gnd1lwrz2GL; Sun, 17 Aug 2025 16:11: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 57HGBH8w031147; Sun, 17 Aug 2025 16:11:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HGBH2P031145; Sun, 17 Aug 2025 16:11:17 GMT (envelope-from git) Date: Sun, 17 Aug 2025 16:11:17 GMT Message-Id: <202508171611.57HGBH2P031145@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: 6fd60c4887cb - main - ufs: st_rdev is only meaningful for special nodes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 6fd60c4887cb08203f654e6aac6b4dbaaf76111b Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6fd60c4887cb08203f654e6aac6b4dbaaf76111b commit 6fd60c4887cb08203f654e6aac6b4dbaaf76111b Author: Konstantin Belousov AuthorDate: 2025-08-17 13:03:05 +0000 Commit: Konstantin Belousov CommitDate: 2025-08-17 16:06:44 +0000 ufs: st_rdev is only meaningful for special nodes Instead of leaking di_db[0] (for regular files this is the index of the first block of the file), return NODEV when not a special node. Reported and reviewed by: des Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D51943 --- sys/ufs/ufs/ufs_vnops.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index ffc993aef9fc..c1cf2dcdaa9f 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -540,7 +540,8 @@ ufs_stat(struct vop_stat_args *ap) sb->st_uid = ip->i_uid; sb->st_gid = ip->i_gid; if (I_IS_UFS1(ip)) { - sb->st_rdev = ip->i_din1->di_rdev; + sb->st_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ? + ip->i_din1->di_rdev : NODEV; sb->st_size = ip->i_din1->di_size; sb->st_mtim.tv_sec = ip->i_din1->di_mtime; sb->st_mtim.tv_nsec = ip->i_din1->di_mtimensec; @@ -551,7 +552,8 @@ ufs_stat(struct vop_stat_args *ap) sb->st_blocks = dbtob((uint64_t)ip->i_din1->di_blocks) / S_BLKSIZE; sb->st_filerev = ip->i_din1->di_modrev; } else { - sb->st_rdev = ip->i_din2->di_rdev; + sb->st_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ? + ip->i_din2->di_rdev : NODEV; sb->st_size = ip->i_din2->di_size; sb->st_mtim.tv_sec = ip->i_din2->di_mtime; sb->st_mtim.tv_nsec = ip->i_din2->di_mtimensec; @@ -603,7 +605,8 @@ ufs_getattr( vap->va_uid = ip->i_uid; vap->va_gid = ip->i_gid; if (I_IS_UFS1(ip)) { - vap->va_rdev = ip->i_din1->di_rdev; + vap->va_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ? + ip->i_din1->di_rdev : NODEV; vap->va_size = ip->i_din1->di_size; vap->va_mtime.tv_sec = ip->i_din1->di_mtime; vap->va_mtime.tv_nsec = ip->i_din1->di_mtimensec; @@ -612,7 +615,8 @@ ufs_getattr( vap->va_bytes = dbtob((uint64_t)ip->i_din1->di_blocks); vap->va_filerev = ip->i_din1->di_modrev; } else { - vap->va_rdev = ip->i_din2->di_rdev; + vap->va_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ? + ip->i_din2->di_rdev : NODEV; vap->va_size = ip->i_din2->di_size; vap->va_mtime.tv_sec = ip->i_din2->di_mtime; vap->va_mtime.tv_nsec = ip->i_din2->di_mtimensec; From nobody Sun Aug 17 16:25:48 2025 X-Original-To: dev-commits-src-main@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 4c4h6N6BNkz64y7y; Sun, 17 Aug 2025 16:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4h6N5XtZz3xBX; Sun, 17 Aug 2025 16:25:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755447948; 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=wotW5O5IclRpHZdl7aS2zgR1m90aEgDqDVD3+ceTAaU=; b=c78JRdwxVYMeN4wojol0TXzA0FVuFfRy1Eqzbw6Q2jVE2rnQHtCF8OAKKP8v3xhVIBNdSE UXyQr3LHRIdC+wbSeMaPHZzhF2ox2y1qextXFAJvBCszUnywCU3mPUEQswiD1liIsInrHT FiAZ6DUz5sjrKG/gXNdC6KE0xrMiQwaEpZiD7TUOXvNQ8xKo1C20EBkOIaPlfC+nbWooD8 MuACJPeK2prGcuRH7rwfSIKPcAK6U39RQCXKNmzR0kcRoJB84SpvEespu/iC1Vjvkr+Eat rGG7dwHMsMUO1YI46teSYOOdWmhPJI/75cXHn5Ul+0OBUZFNSCE6vSczrLqkZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755447948; 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=wotW5O5IclRpHZdl7aS2zgR1m90aEgDqDVD3+ceTAaU=; b=dtDlU+mC2Pk7wxVbDTDl1McUqRqp4v3jib4zzaxI8fBLfLN1nPCQHU39PxAj3pZsqdsfhl +5kh5wrQsDzolDFLCtROeZlfRW5YhsYTPevs6hfhx9EI8VEHGm0QuTQzWVEuSF1q9wi3BW Pp+fuq7eyGSPy2SpQya8Qav7EmlyyRDyIIm6vkTJnnh2HBuCiYr+5+yOMZVg6Tsh1PLwMV 947e2XhBxxBXNt1Jll8Vqf6fWEvLftb8m4uk02gnaRc7bAwcRHQAJqK9lf+ryM1cSXOfn4 pLlZbesUXfk/NgW169jad3Y1HmxbNT9HyZTaySC7rSh08pP8B0Ozxz7112cCxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755447948; a=rsa-sha256; cv=none; b=SJlPxqZkvteTzMbfGo5GTXlu3rm0P/ixdtWJjF7z++3HV0XpNF7KDcN2RHC4/02ni4liRr fshpLQfX/hchkkwVupuaWdSmoC8VTlwrfyriGpwJHKDt3FnR6sHgn9ADr3RGs9Pl/Ln+Zp z/jGdIkJr8hHRULcwjJ9P/xqtRgspQ+6m5loGLJ6c9Uh4rjYPU+cwEvqkINrLc/F5T88HM 7Gh0bUJYnN+Skvwh+MULD2bvhI2APdlnwDVe1C3jEq+IpkdOhmC98XVgMR6dI116pPeMrS FHFtbVlarKIcTVwzvQzCkGjhy58d9t7y99Wt72yoYbi8ttxELQQlCmMBzuHi6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4h6N53g0z2xK; Sun, 17 Aug 2025 16:25: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 57HGPm58057053; Sun, 17 Aug 2025 16:25:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HGPmuu057050; Sun, 17 Aug 2025 16:25:48 GMT (envelope-from git) Date: Sun, 17 Aug 2025 16:25:48 GMT Message-Id: <202508171625.57HGPmuu057050@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: 054c6e5b2fd6 - main - ufs_times_locked(): style List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 054c6e5b2fd629d651ce709e2916e13a0279309d Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=054c6e5b2fd629d651ce709e2916e13a0279309d commit 054c6e5b2fd629d651ce709e2916e13a0279309d Author: Konstantin Belousov AuthorDate: 2025-08-17 14:03:27 +0000 Commit: Konstantin Belousov CommitDate: 2025-08-17 16:21:33 +0000 ufs_times_locked(): style Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/ufs/ufs/ufs_vnops.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index c1cf2dcdaa9f..24dd51bcaef1 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -159,27 +159,27 @@ ufs_itimes_locked(struct vnode *vp) if ((vp->v_type == VBLK || vp->v_type == VCHR) && !DOINGSOFTDEP(vp)) UFS_INODE_SET_FLAG(ip, IN_LAZYMOD); else if (((vp->v_mount->mnt_kern_flag & - (MNTK_SUSPENDED | MNTK_SUSPEND)) == 0) || - (ip->i_flag & (IN_CHANGE | IN_UPDATE))) + (MNTK_SUSPENDED | MNTK_SUSPEND)) == 0) || + (ip->i_flag & (IN_CHANGE | IN_UPDATE)) != 0) UFS_INODE_SET_FLAG(ip, IN_MODIFIED); - else if (ip->i_flag & IN_ACCESS) + else if ((ip->i_flag & IN_ACCESS) != 0) UFS_INODE_SET_FLAG(ip, IN_LAZYACCESS); vfs_timestamp(&ts); - if (ip->i_flag & IN_ACCESS) { + if ((ip->i_flag & IN_ACCESS) != 0) { DIP_SET(ip, i_atime, ts.tv_sec); DIP_SET(ip, i_atimensec, ts.tv_nsec); } - if (ip->i_flag & IN_UPDATE) { + if ((ip->i_flag & IN_UPDATE) != 0) { DIP_SET(ip, i_mtime, ts.tv_sec); DIP_SET(ip, i_mtimensec, ts.tv_nsec); } - if (ip->i_flag & IN_CHANGE) { + if ((ip->i_flag & IN_CHANGE) != 0) { DIP_SET(ip, i_ctime, ts.tv_sec); DIP_SET(ip, i_ctimensec, ts.tv_nsec); DIP_SET(ip, i_modrev, DIP(ip, i_modrev) + 1); } - out: +out: ip->i_flag &= ~(IN_ACCESS | IN_CHANGE | IN_UPDATE); } From nobody Sun Aug 17 17:13:53 2025 X-Original-To: dev-commits-src-main@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 4c4j9s5f8Pz651YW; Sun, 17 Aug 2025 17:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4j9s3cHcz41mq; Sun, 17 Aug 2025 17:13:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755450833; 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=3ZZGVwhusYpm+0T8elx07Dl0kq6G7oVgTWYgYEQ7l44=; b=eRzQYD0T3jl62ZzK0jxIRabKFz9jmxIyVBza6LxlvcOgZzjhtYAiP8fmnqkcbSwLSO7zNa r8/D5TKU3Jb8IsunDlhSy2e4DxWT5IRzLMLxLLpwef9i9ayAk/1KSWsTeB2ZtwOuSTGMkc QxN9pj02yi0EDs+Oxb9j7mnIwOmuLX5QdFKUjPrA2+0i68EuOgmS2byh4mm5pjbh9HFNAe J0xQ1K1KJXNnMnmUlPRbUAcCgOK9fgjdKoNJBUalLr8BZ2SyCAW2Vsu5fM6Xd6yb8nalsR ss/KonsvrzG0smKsENu/HXz3ZaBsshGdz+9pEjx6b2sOG2v77R6UlSQ0U4orFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755450833; 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=3ZZGVwhusYpm+0T8elx07Dl0kq6G7oVgTWYgYEQ7l44=; b=sKkBOsXamSGqqwtolDBMuGbNbRE/lG7CXGOByHYG3xPP4k5c/12TGDuaFY6PxRLD2Uj7Ie YaVrEvwuOFuCUkKgsfxCQftP64hjKWar1Ccyn+sq7UIj0OPxWVg3KIaRMknRElSXds0XDR PWIUIgrvOoQXGL5tEGo/FSJPe7M3D5ht/5NMjYTNBNl6WdowN/i78Do+5rxhl9Icz29Nau 81wu3Y+QaDMjUIXATHZ5zStY1lGTqO9oekJ+l7oU5vXcVJGEZI1gOlSo9gnsxWUiddLdFM WlSHtxPqIRW5bFQGi0ito7gz2Y73P3+BW9ezEBiB2ENh4SGpEz8jEDk2RS+pmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755450833; a=rsa-sha256; cv=none; b=V7XWCnCbX4fn0FjNERM6VzhNLx2gy48gOt9r6Ww/Nnu8BxZpFZgwLAcXMgG/IgG1Y534DX 9YTTFnCn/1E45eLuJcNhJ/ro+PANn3AscmV1ILSLEMmg7SnESesLL3Q18CmhNt3NIgFxCb E7mtVMUBHGTeoPzLjDoEbIGvIju6vf3DdWWGgbI5n8T0hRRl4QQRKpDDu9fM/ZdXlyXjnJ 4KkexaXimTH2JS72zTHKILL8dPF6bzbPYWQlaI39rsqw6U2a65J8mgSLsxMBXnCXVgdwSC jRmP38/GYnuBQR3Rgrenx/c9EFcIdhxglrN545JKflH+h8/6wbke/IKBNEJuHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4j9s3BR5z47c; Sun, 17 Aug 2025 17:13: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 57HHDrIf050627; Sun, 17 Aug 2025 17:13:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HHDrUs050624; Sun, 17 Aug 2025 17:13:53 GMT (envelope-from git) Date: Sun, 17 Aug 2025 17:13:53 GMT Message-Id: <202508171713.57HHDrUs050624@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: edf9a2fae94a - main - jemalloc: don't error out on initializer warning in gcc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: edf9a2fae94a4b0ffa11d40ce52a48a609da9353 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=edf9a2fae94a4b0ffa11d40ce52a48a609da9353 commit edf9a2fae94a4b0ffa11d40ce52a48a609da9353 Author: Warner Losh AuthorDate: 2025-08-17 16:36:16 +0000 Commit: Warner Losh CommitDate: 2025-08-17 17:13:33 +0000 jemalloc: don't error out on initializer warning in gcc gcc doesn't like something about the initializer that comes with jemalloc. Since it's vendor code, make this warning not an error for -Werror purposes. Sponsored by: Netflix --- lib/libc/stdlib/malloc/jemalloc/Makefile.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libc/stdlib/malloc/jemalloc/Makefile.inc b/lib/libc/stdlib/malloc/jemalloc/Makefile.inc index b9e34edfdea5..7722a7b755f3 100644 --- a/lib/libc/stdlib/malloc/jemalloc/Makefile.inc +++ b/lib/libc/stdlib/malloc/jemalloc/Makefile.inc @@ -14,6 +14,8 @@ CFLAGS+=-I${SRCTOP}/contrib/jemalloc/include -I${LIBC_SRCTOP}/stdlib/malloc/jema .if ${MK_JEMALLOC_LG_VADDR_WIDE} != no CFLAGS+=-D_USE_LG_VADDR_WIDE .endif +CFLAGS.gcc+=-Wno-error=missing-braces + .for src in ${JEMALLOCSRCS} MISRCS+=jemalloc_${src} From nobody Sun Aug 17 17:13:54 2025 X-Original-To: dev-commits-src-main@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 4c4j9t5Sm7z651Qy; Sun, 17 Aug 2025 17:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4j9t4Z8Xz425G; Sun, 17 Aug 2025 17:13:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755450834; 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=z4C9FELABwDh12eLEyI/mPQrFbkKkkyYD5/Fp5Z8JXg=; b=tkRfrbaD/hL0maitrtN6hnqvcN2w2ijy+IoXcwIKhpBzKI6frEiTvwqTUQdx1RBHVgkO7V Wxd9MWNPZDvuqAHt49e8pbr+r83fJhyHhABpGIXleiMAs8OTdK/fEiSDvDBz82Pw52tDO/ qWDucazJ09aQODTF3VogSUbW2MdkykmldoOoKR7JSxzY+Ej9tzuQVWQ3zJVX9qopiBKeb0 lPDJ05zQPtstQ6gD7Y++ghIP++hARgJ5YnyHFklBV8IdjGfklhXINIhQS9za/44ozAJiDH 1bAu4gseR7S+gxtJL3W2dqqx42AOnJequQTkwG2rt3S3HcEKPNR3FTuKz3x/Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755450834; 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=z4C9FELABwDh12eLEyI/mPQrFbkKkkyYD5/Fp5Z8JXg=; b=dcuoVbPFcYcDmIj9nnLNibb4Rz64Iis190Boj17Hn+OoedlJgfwcv85Wry6StV9QkdokeN 6oFv7rctoRUeu13vRyvS3aWmKp9z8grgtAY+I/kMW1BUKw48JgtL7eK2BdfP3ZkQE4kF79 kpOj1ZMt0CEnizfD+BCHQGo3+Rs/OjBDx3TcwfJEdcCwgm9kZYZQ0aAfWTE9F0DtYRaRi8 zWg93ksQgliVnGClF+YFGHJRkhdvxe7auCHTyrUm7hk7cN+Cb2RHuviEy6c8JBuXdp3j94 cFS0HggQVhPpHcrNtkw18mJKbkmWPGuJIXNCXFNMKP0gOW47K7zpQ4iLq2MxAw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755450834; a=rsa-sha256; cv=none; b=fBS74vDB5TwMtFq/ZUuGVUxYOmd7H3yc6Kdxy6aQO1O2wWax8hU71GcYgQaejz7SunzUU9 IS7XIEcg/285b5yJ4BbjOqlIm3ZWpzJohk6k5YXs5SvKcE4/M0wy8dAz9xdvtrx/s4OtAI /acFRbemMKMIY6Q18vYggtPz2crLv187KoDmrNca885YzmxDmrEncaw6aY9Qr+xsbGqtZU nplrXsV3EQmDy1KIWIOyLooXX/VKfl7bx74Ck0lP6Zk+5WQIlmwTy01NtBnaf3BpX0jyVq 17Puzv/FSivlPFSYhybkSifrT9tye2cSoRM7IHlx9GxNBE1DV2irOLhGA++Ofw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4j9t47QGz4Vx; Sun, 17 Aug 2025 17:13: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 57HHDsC8050662; Sun, 17 Aug 2025 17:13:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HHDsCX050659; Sun, 17 Aug 2025 17:13:54 GMT (envelope-from git) Date: Sun, 17 Aug 2025 17:13:54 GMT Message-Id: <202508171713.57HHDsCX050659@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: d4b59682cbb4 - main - fusefs: Fix a warning in a test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: d4b59682cbb415f160f8084949128d51b8a5c3a7 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d4b59682cbb415f160f8084949128d51b8a5c3a7 commit d4b59682cbb415f160f8084949128d51b8a5c3a7 Author: Warner Losh AuthorDate: 2025-08-17 16:37:23 +0000 Commit: Warner Losh CommitDate: 2025-08-17 17:13:42 +0000 fusefs: Fix a warning in a test ints can be up to 10 digits, plus NUL. Make the val array 12 to silences a lame gcc warning (the range of the int is such that we'll never truncate, but this is a cheap fix). Sponsored by: Netflix --- tests/sys/fs/fusefs/mockfs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index 65cdc3919652..e8081dea9604 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -472,7 +472,7 @@ MockFS::MockFS(int max_read, int max_readahead, bool allow_other, sprintf(fdstr, "%d", m_fuse_fd); build_iovec(&iov, &iovlen, "fd", fdstr, -1); if (m_maxread > 0) { - char val[10]; + char val[12]; snprintf(val, sizeof(val), "%d", m_maxread); build_iovec(&iov, &iovlen, "max_read=", &val, -1); From nobody Sun Aug 17 17:30:00 2025 X-Original-To: dev-commits-src-main@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 4c4jXT2T10z6521Z; Sun, 17 Aug 2025 17:30: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4jXT1tjsz43yb; Sun, 17 Aug 2025 17:30:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755451801; 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=840zsGrGvB/EXZqEyh3A7xK6wOUNRYh84TOGgdIZBdM=; b=l9CBSNGtRd8QmG1Xpj4kj2YXNTjXM7P4g4TxXAA/Z2p318cbXNCgcySbp2dtvOE5+k+3ya cl/APv13LZpc8l/1/2FJIact0n0mSYfHQ8i3qnX8mjGfujLkUesdZ3Nt2A9ZQRj65gv1yj XaPjxAichyvvU4shmFzyDwrk/N1uAPx0n0QUMPv2LjA0tW1+3Hna0r0kOdRH6IqJWuMa+0 2yGe/nRZECFk6aP9pkGS0PUDoXTMjl9KR5J4AK2ZmO4cM4ZZr/WIxaxaUP8TJKmNmaA7Nx MD+XzGJWfN1thPNX5DtMzJNJUSLOmZ7LkUYW4ETrpnfduog0y/MN4xmmkbjVCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755451801; 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=840zsGrGvB/EXZqEyh3A7xK6wOUNRYh84TOGgdIZBdM=; b=NXzla2mD8m786Nt50Vnv55ogA2PjkzVRBvLoKZM2w+pouUEZVSfrYWf4XpYuFGvnhzq0uy DSW/zVibvVm7mHWCCV48+F1jYU+5rrVSrrM+a7BZ7Zic/0jJCjjlStuVfmogKmpcG84Jlm 9X3+LisEdoH46qw2J3sBHrrrvHoycv4bVMAnTfBs88RJon79JlWrHU7WA9ikiNCOK/m0Bx Ihg99lQ15F+ir2a8ZBwm0xbNQIFXPxjTxyGyYMqZkXcV0r3hNo6tFhktx2lZg9T312pTO7 52TKm0e+g/coyQMLgprFUR04DhwcGVqqjB1NBikKRgGrVQki269Zz0vVcd/9lA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755451801; a=rsa-sha256; cv=none; b=FY8HETG2+n+Buws5dNNFP0RREnV5r49WOw1AxDNjqL3kCWcbMr0eq7uh02wWgsEOciZd5S QOgrRSfEOL5NMYcYZdsIiy87h60Mlr6LgyWnJ3o/YeIlh3w6n2Dgiao4Jz2BnIOUlo90QZ jcUDywV+G7PwoaZTPwnQiRlu7e8p6frG7dzoXp0FRQArxgU9iFBXH2yn8lq+qLDtxgyRiP JteMzUzRuBB6sFRiAFAesLVN/Z7sGqXp7l51NIfXIMrzbY/fa93RJ8I3YMS9aNXwQeVpD2 Yyv40wDbQEiGWCYVzomLcL6U4474Uo/e3/YjLFrzvqsY9RIYrQInWYf6t3imJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4jXT19vJz4ND; Sun, 17 Aug 2025 17:30: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 57HHU0Yj072428; Sun, 17 Aug 2025 17:30:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HHU0Xe072424; Sun, 17 Aug 2025 17:30:00 GMT (envelope-from git) Date: Sun, 17 Aug 2025 17:30:00 GMT Message-Id: <202508171730.57HHU0Xe072424@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 8073a5137f22 - main - getmntpoint: Don't compare st_rdev for non-devices List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8073a5137f223bb481606b15edaa5ecb93ceffcb Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=8073a5137f223bb481606b15edaa5ecb93ceffcb commit 8073a5137f223bb481606b15edaa5ecb93ceffcb Author: Dag-Erling Smørgrav AuthorDate: 2025-08-17 17:07:45 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-17 17:29:27 +0000 getmntpoint: Don't compare st_rdev for non-devices If the mntfromname of a mountpoint is not a device (e.g. nullfs, tarfs, procfs) we shouldn't compare st_rdev, as any match will be spurious. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D51945 --- lib/libutil/mntopts.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libutil/mntopts.c b/lib/libutil/mntopts.c index 1d9347e3108a..07d3dd6d98a3 100644 --- a/lib/libutil/mntopts.c +++ b/lib/libutil/mntopts.c @@ -185,6 +185,7 @@ getmntpoint(const char *name) strncpy(statfsp->f_mntfromname, device, len); } if (stat(ddevname, &mntdevstat) == 0 && + S_ISCHR(mntdevstat.st_mode) && mntdevstat.st_rdev == devstat.st_rdev) return (statfsp); } From nobody Sun Aug 17 17:30:02 2025 X-Original-To: dev-commits-src-main@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 4c4jXV3qY6z652HX; Sun, 17 Aug 2025 17:30: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4jXV1Zqrz446r; Sun, 17 Aug 2025 17:30:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755451802; 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=IARmQ5lvTc460Ea8DpPE2FZlJVA4CqxllGgH/tp4rlE=; b=xQZt/X1FnPhduw9xi/2Tj0UnYbEFKQ7l21R2QqZv6aUrNPHlpMRV4UZKjyRaYcAeNmkNz9 S3ux51WAo5S7IqTLy8QT8PA2ajChoU0V8bGAuDnw6Wkz/w1TAkR06LC3fJvTWAO+xj+QLc xhPxz5eZLEDRKha8xkVYoP/e2fcLA78CW8C2OGKoP71WNmZ6wdYxMvMHXHTdHMWKtDQb3L aUaYLysIpgEL0UfVy9DMUdJcPMSv8kM0f6odSiNZYzAlsEyDX1IrenyU+NCY8hx56/PvSG E3uR2//8syKIlybQ/X1DSMsJOmGEDYNZ3WjqEBe/jBJ6NxPfBEsaOkMydnqDPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755451802; 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=IARmQ5lvTc460Ea8DpPE2FZlJVA4CqxllGgH/tp4rlE=; b=Z4eNgpXhoMUcOgYzlhO/2uH8VFHv7jqYuAn/cskCLSV0TGVTYe1CSH4BvhDDTy7G8X344D tFrZWdqifTm12DeocR8ccOtKH5ranjGNoHVkMe6kt3T3IjGeweI2KxPPHYw9nSTVoOQEaI NbNuUGNQFuBjEzrorbok9lJz5OQkj6r3bqBE1u4VgfZqubpl2x6JcL3mEBvdB2qm0s4Ykb UWU7VWg6GeO7ef/fZbOJ1NJ6nBTUFHXN/nPKstw5EBT1vShvkpESKbwBROm8vO1tgnicwJ I7UrLhkq30kcyh9w4SMtDWxXcdpu3BS6pG+1roKArK9Qdq/T1k7TjKl67d0p1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755451802; a=rsa-sha256; cv=none; b=R6w3oE1+psV3K699mHu0UNcyz6P5fYuvBoHiaBrElRRG0w182yHKQH7uQJ0zFxtdux939/ Zer6h0An13Z+EhFDASjqSfiu/ts1B96lZOd1Ot4FfB1bN5VowDn8PeUac1Y5+RMjZU0yYT I6XkVvYRsP7fRYBNixgJ3bmvFUqstU0tRYPVVhF92dog++PYkz3UaPUwMxlTJp/5db5+Ja bRP4yu8978sWd77qXU21KEmOUT288z6AtdgyEcSBhvJ8UQitpEvHmyyf2aZ5TBE5vRRx1/ 7pZdt0KztwFkw0j15tyLRb61g7tZ9/hnqTAasZdimiC7nrekKk00Fw3bzh4qtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4jXV18pGz4Lr; Sun, 17 Aug 2025 17:30:02 +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 57HHU29g072703; Sun, 17 Aug 2025 17:30:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HHU2UC072699; Sun, 17 Aug 2025 17:30:02 GMT (envelope-from git) Date: Sun, 17 Aug 2025 17:30:02 GMT Message-Id: <202508171730.57HHU2UC072699@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 4eaa7f66620c - main - stat(2): Document the st_rdev field List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4eaa7f66620c33957ff9a929820cb791f7fe5578 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4eaa7f66620c33957ff9a929820cb791f7fe5578 commit 4eaa7f66620c33957ff9a929820cb791f7fe5578 Author: Dag-Erling Smørgrav AuthorDate: 2025-08-17 17:07:55 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-17 17:29:27 +0000 stat(2): Document the st_rdev field MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: bcr Differential Revision: https://reviews.freebsd.org/D51946 --- lib/libsys/stat.2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/libsys/stat.2 b/lib/libsys/stat.2 index bd9005710147..8107740bd901 100644 --- a/lib/libsys/stat.2 +++ b/lib/libsys/stat.2 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 30, 2021 +.Dd August 17, 2025 .Dt STAT 2 .Os .Sh NAME @@ -169,6 +169,9 @@ Flags enabled for the file. See .Xr chflags 2 for the list of flags and their description. +.It Va st_rdev +Numeric ID of the device referenced by the file, if the file is a +character or block special; otherwise unspecified. .El .Pp The From nobody Sun Aug 17 17:30:03 2025 X-Original-To: dev-commits-src-main@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 4c4jXW52S7z651yf; Sun, 17 Aug 2025 17:30:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4jXW25d6z43rB; Sun, 17 Aug 2025 17:30:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755451803; 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=pJvDMk9eA5gYN8khejuis7G57/UumFim2J2hF24IHmU=; b=J+1O+0Qq4mRF+zq+q/spkgujXQoJZ21tcyg5THAowAR18BFhPpXVWBhyv6ZnbbEpjeSDhc eOUIkMfjpvQm1GtT1Fc/o9yOq2XK9Jg5QCGlb/jtHDHg1o9pvk1sxB+0YwSEouGhtEuMEh pAyUDw3WElPhvqq1JArMYqqhDHG6Rdnv7CrILpsqDHEQDRHPEkxXfTJeUYUTrhs9yV6in3 q1U173ud8s9pp0w6wROdejtxcodg2g6hLInbh5EsJXLFB68VLOvsGKK/plB45l8WSjCHnA nDpyRx7muLaIEUUFEjFJSo/7QbmZAxOFY23ZdmVmd8/ZJzZYI5YzIVx8GdiErQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755451803; 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=pJvDMk9eA5gYN8khejuis7G57/UumFim2J2hF24IHmU=; b=GhluOTud1GNwPzyKVL/jWM5wgSA887d7RtMxX9v78SxaVYkO1DwoZJLsYI9icoJYzRAwdH 0kRsxFHGU8AwIpo/7BUd/YdSM8siNnfuw8yPNYOFZMXO8jl+ssjPyk0qGBgYgkZSAjhnqc 2ZteH60kx9HmYbeOqWsRJVa4dqJuerU9Ua2vnysLw7GMqZEXShdtgK4rFJsGq+OIpToV+l kLtoSTYIeqWaP3BM9t4MlD2ohrqEGoBWU6GOLrjcr0hxIt5oSNKyS7RrZm3wAKBtM/PQto l79vCdOGO1NvExzFXqKA4uXq5jjum7kMGidIxKaVkAheMudw6MPV27YlClG2vw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755451803; a=rsa-sha256; cv=none; b=Wdgb2vSbD9eMRhRxvJsraKl4pV2AGhg7zVDnWCaSfF2xv0pyy3yx+88P9Co5anM+nUQvkL sYr1BUljuCJdnIwKlSC6/oWoYF5Al7U0u41edvrKqdi93wJ7TBA9AkGUEucE4nCVqqEQMN N6YRlo5DEmFr2f+O4wqcIhGy4krwmQoFn6jPn2N5BIWDLEzayO4/JF1cdwrPkE1If/JXPx OXu2qGXBnTt9HKq281YkQMqGPyCh+vRNNEOCtSLNFY1bXnGJMvNJGlAyEOL/v7MsdM8JA7 p8HCHg5olQDRBtqvdGFtbh1y/+VY0HcCdrYDkDppuqjOoaLhsJgPibpqj6/FpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4jXW1d52z4NF; Sun, 17 Aug 2025 17:30: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 57HHU3Fc072981; Sun, 17 Aug 2025 17:30:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HHU3HT072970; Sun, 17 Aug 2025 17:30:03 GMT (envelope-from git) Date: Sun, 17 Aug 2025 17:30:03 GMT Message-Id: <202508171730.57HHU3HT072970@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 567e6250c003 - main - vfs: Introduce VN_ISDEV() macro List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 567e6250c003eeb251b4bc8dbe60d2adabab2988 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=567e6250c003eeb251b4bc8dbe60d2adabab2988 commit 567e6250c003eeb251b4bc8dbe60d2adabab2988 Author: Dag-Erling Smørgrav AuthorDate: 2025-08-17 17:08:10 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-17 17:29:27 +0000 vfs: Introduce VN_ISDEV() macro We frequently need to check if a vnode refers to either a character or block special, so we might as well have a macro for it. We somewhat less frequently need to perform similar checks on things that aren't vnodes (usually a struct vattr *), so add VATTR_ISDEV() and a generic VTYPE_ISDEV() as well. Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D51947 --- lib/libprocstat/libprocstat.c | 3 +-- sys/fs/cd9660/cd9660_vnops.c | 12 ++++++------ sys/fs/ext2fs/ext2_vnops.c | 14 +++++++------- sys/fs/fuse/fuse_vnops.c | 2 +- sys/fs/nfsclient/nfs_clvnops.c | 2 +- sys/fs/p9fs/p9fs_vnops.c | 2 +- sys/fs/tarfs/tarfs_vnops.c | 5 ++--- sys/fs/tmpfs/tmpfs_subr.c | 2 +- sys/fs/tmpfs/tmpfs_vnops.c | 17 +++++++---------- sys/kern/vfs_bio.c | 2 +- sys/kern/vfs_syscalls.c | 2 +- sys/sys/param.h | 2 +- sys/sys/vnode.h | 9 +++++++++ sys/ufs/ffs/ffs_vnops.c | 12 ++++++------ sys/ufs/ufs/ufs_vnops.c | 16 ++++++---------- sys/vm/vnode_pager.c | 3 +-- 16 files changed, 52 insertions(+), 53 deletions(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index eb8137f6c76f..1651cbc6820f 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -1330,8 +1330,7 @@ procstat_get_vnode_info_kvm(kvm_t *kd, struct filestat *fst, return (1); } vn->vn_mntdir = getmnton(kd, vnode.v_mount); - if ((vnode.v_type == VBLK || vnode.v_type == VCHR) && - vnode.v_rdev != NULL){ + if (VTYPE_ISDEV(vnode.v_type) && vnode.v_rdev != NULL) { vn->vn_dev = dev2udev(kd, vnode.v_rdev); (void)kdevtoname(kd, vnode.v_rdev, vn->vn_devname); } else { diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index c4d0e6ba7b30..a496b41fcf6e 100644 --- a/sys/fs/cd9660/cd9660_vnops.c +++ b/sys/fs/cd9660/cd9660_vnops.c @@ -124,7 +124,7 @@ cd9660_access(struct vop_access_args *ap) uid_t uid; gid_t gid; - if (vp->v_type == VCHR || vp->v_type == VBLK) + if (VN_ISDEV(vp)) return (EOPNOTSUPP); /* @@ -162,7 +162,7 @@ cd9660_open(struct vop_open_args *ap) struct vnode *vp = ap->a_vp; struct iso_node *ip = VTOI(vp); - if (vp->v_type == VCHR || vp->v_type == VBLK) + if (VN_ISDEV(vp)) return (EOPNOTSUPP); vnode_create_vobject(vp, ip->i_size, ap->a_td); @@ -242,7 +242,7 @@ cd9660_ioctl(struct vop_ioctl_args *ap) VOP_UNLOCK(vp); return (EBADF); } - if (vp->v_type == VCHR || vp->v_type == VBLK) { + if (VN_ISDEV(vp)) { VOP_UNLOCK(vp); return (EOPNOTSUPP); } @@ -280,7 +280,7 @@ cd9660_read(struct vop_read_args *ap) int seqcount; long size, n, on; - if (vp->v_type == VCHR || vp->v_type == VBLK) + if (VN_ISDEV(vp)) return (EOPNOTSUPP); seqcount = ap->a_ioflag >> IO_SEQSHIFT; @@ -711,7 +711,7 @@ cd9660_strategy(struct vop_strategy_args *ap) struct bufobj *bo; ip = VTOI(vp); - if (vp->v_type == VBLK || vp->v_type == VCHR) + if (VN_ISDEV(vp)) panic("cd9660_strategy: spec"); if (bp->b_blkno == bp->b_lblkno) { bp->b_blkno = (ip->iso_start + bp->b_lblkno) << @@ -818,7 +818,7 @@ cd9660_getpages(struct vop_getpages_args *ap) struct vnode *vp; vp = ap->a_vp; - if (vp->v_type == VCHR || vp->v_type == VBLK) + if (VN_ISDEV(vp)) return (EOPNOTSUPP); if (use_buf_pager) diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c index 064c10bd18b2..669b510cf8ac 100644 --- a/sys/fs/ext2fs/ext2_vnops.c +++ b/sys/fs/ext2fs/ext2_vnops.c @@ -222,7 +222,7 @@ ext2_itimes_locked(struct vnode *vp) ip = VTOI(vp); if ((ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_UPDATE)) == 0) return; - if ((vp->v_type == VBLK || vp->v_type == VCHR)) + if (VN_ISDEV(vp)) ip->i_flag |= IN_LAZYMOD; else ip->i_flag |= IN_MODIFIED; @@ -276,7 +276,7 @@ static int ext2_open(struct vop_open_args *ap) { - if (ap->a_vp->v_type == VBLK || ap->a_vp->v_type == VCHR) + if (VN_ISDEV(ap->a_vp)) return (EOPNOTSUPP); /* @@ -1571,7 +1571,7 @@ ext2_strategy(struct vop_strategy_args *ap) daddr_t blkno; int error; - if (vp->v_type == VBLK || vp->v_type == VCHR) + if (VN_ISDEV(vp)) panic("ext2_strategy: spec"); if (bp->b_blkno == bp->b_lblkno) { if (VTOI(ap->a_vp)->i_flag & IN_E4EXTENTS) @@ -1733,7 +1733,7 @@ ext2_deleteextattr(struct vop_deleteextattr_args *ap) if (!EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_EXT_ATTR)) return (EOPNOTSUPP); - if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) + if (VN_ISDEV(ap->a_vp)) return (EOPNOTSUPP); error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, @@ -1771,7 +1771,7 @@ ext2_getextattr(struct vop_getextattr_args *ap) if (!EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_EXT_ATTR)) return (EOPNOTSUPP); - if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) + if (VN_ISDEV(ap->a_vp)) return (EOPNOTSUPP); error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, @@ -1814,7 +1814,7 @@ ext2_listextattr(struct vop_listextattr_args *ap) if (!EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_EXT_ATTR)) return (EOPNOTSUPP); - if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) + if (VN_ISDEV(ap->a_vp)) return (EOPNOTSUPP); error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, @@ -1855,7 +1855,7 @@ ext2_setextattr(struct vop_setextattr_args *ap) if (!EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_EXT_ATTR)) return (EOPNOTSUPP); - if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) + if (VN_ISDEV(ap->a_vp)) return (EOPNOTSUPP); error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index b782146b7278..de60a4717dd4 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -1748,7 +1748,7 @@ fuse_vnop_open(struct vop_open_args *ap) if (fuse_isdeadfs(vp)) return (EXTERROR(ENXIO, "This FUSE session is about " "to be closed")); - if (vp->v_type == VCHR || vp->v_type == VBLK || vp->v_type == VFIFO) + if (VN_ISDEV(vp) || vp->v_type == VFIFO) return (EXTERROR(EOPNOTSUPP, "Unsupported vnode type", vp->v_type)); if ((a_mode & (FREAD | FWRITE | FEXEC)) == 0) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index 6824ee6ef13d..52f72dc43c3f 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1782,7 +1782,7 @@ nfs_mknodrpc(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, int error = 0, attrflag, dattrflag; u_int32_t rdev; - if (vap->va_type == VCHR || vap->va_type == VBLK) + if (VATTR_ISDEV(vap)) rdev = vap->va_rdev; else if (vap->va_type == VFIFO || vap->va_type == VSOCK) rdev = 0xffffffff; diff --git a/sys/fs/p9fs/p9fs_vnops.c b/sys/fs/p9fs/p9fs_vnops.c index 227e2b93883e..acb73973d93b 100644 --- a/sys/fs/p9fs/p9fs_vnops.c +++ b/sys/fs/p9fs/p9fs_vnops.c @@ -1326,7 +1326,7 @@ p9fs_read(struct vop_read_args *ap) np = P9FS_VTON(vp); error = 0; - if (vp->v_type == VCHR || vp->v_type == VBLK) + if (VN_ISDEV(vp)) return (EOPNOTSUPP); if (vp->v_type != VREG) return (EISDIR); diff --git a/sys/fs/tarfs/tarfs_vnops.c b/sys/fs/tarfs/tarfs_vnops.c index afb8e05f5929..acf18de5ab51 100644 --- a/sys/fs/tarfs/tarfs_vnops.c +++ b/sys/fs/tarfs/tarfs_vnops.c @@ -208,8 +208,7 @@ tarfs_getattr(struct vop_getattr_args *ap) vap->va_birthtime = tnp->birthtime; vap->va_gen = tnp->gen; vap->va_flags = tnp->flags; - vap->va_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ? - tnp->rdev : NODEV; + vap->va_rdev = VN_ISDEV(vp) ? tnp->rdev : NODEV; vap->va_bytes = round_page(tnp->physize); vap->va_filerev = 0; @@ -515,7 +514,7 @@ tarfs_read(struct vop_read_args *ap) uiop = ap->a_uio; vp = ap->a_vp; - if (vp->v_type == VCHR || vp->v_type == VBLK) + if (VN_ISDEV(vp)) return (EOPNOTSUPP); if (vp->v_type != VREG) diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index 1237f6b92cdb..dd281d18d87d 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -551,7 +551,7 @@ tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *tmp, __enum_uint8(vtype) MPASS(IMPLIES(tmp->tm_root == NULL, parent == NULL && type == VDIR)); MPASS((type == VLNK) ^ (target == NULL)); - MPASS((type == VBLK || type == VCHR) ^ (rdev == VNOVAL)); + MPASS(VTYPE_ISDEV(type) ^ (rdev == VNOVAL)); if (tmp->tm_nodes_inuse >= tmp->tm_nodes_max) return (ENOSPC); diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c index 79b6c8b2e6a1..0f4ea2fdc28c 100644 --- a/sys/fs/tmpfs/tmpfs_vnops.c +++ b/sys/fs/tmpfs/tmpfs_vnops.c @@ -280,8 +280,7 @@ tmpfs_mknod(struct vop_mknod_args *v) struct componentname *cnp = v->a_cnp; struct vattr *vap = v->a_vap; - if (vap->va_type != VBLK && vap->va_type != VCHR && - vap->va_type != VFIFO) + if (!VATTR_ISDEV(vap) && vap->va_type != VFIFO) return (EINVAL); return (tmpfs_alloc_file(dvp, vpp, vap, cnp, NULL)); @@ -462,8 +461,7 @@ tmpfs_stat(struct vop_stat_args *v) sb->st_nlink = node->tn_links; sb->st_uid = node->tn_uid; sb->st_gid = node->tn_gid; - sb->st_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ? - node->tn_rdev : NODEV; + sb->st_rdev = VN_ISDEV(vp) ? node->tn_rdev : NODEV; sb->st_size = node->tn_size; sb->st_atim.tv_sec = node->tn_atime.tv_sec; sb->st_atim.tv_nsec = node->tn_atime.tv_nsec; @@ -521,8 +519,7 @@ tmpfs_getattr(struct vop_getattr_args *v) vap->va_birthtime = node->tn_birthtime; vap->va_gen = node->tn_gen; vap->va_flags = node->tn_flags; - vap->va_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ? - node->tn_rdev : NODEV; + vap->va_rdev = VN_ISDEV(vp) ? node->tn_rdev : NODEV; if (vp->v_type == VREG) { #ifdef __ILP32__ vm_object_t obj = node->tn_reg.tn_aobj; @@ -1918,7 +1915,7 @@ tmpfs_deleteextattr(struct vop_deleteextattr_args *ap) node = VP_TO_TMPFS_NODE(vp); tmp = VFS_TO_TMPFS(vp->v_mount); - if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) + if (VN_ISDEV(ap->a_vp)) return (EOPNOTSUPP); error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, ap->a_cred, ap->a_td, VWRITE); @@ -1956,7 +1953,7 @@ tmpfs_getextattr(struct vop_getextattr_args *ap) int error; node = VP_TO_TMPFS_NODE(vp); - if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) + if (VN_ISDEV(ap->a_vp)) return (EOPNOTSUPP); error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, ap->a_cred, ap->a_td, VREAD); @@ -1993,7 +1990,7 @@ tmpfs_listextattr(struct vop_listextattr_args *ap) int error; node = VP_TO_TMPFS_NODE(vp); - if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) + if (VN_ISDEV(ap->a_vp)) return (EOPNOTSUPP); error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, ap->a_cred, ap->a_td, VREAD); @@ -2037,7 +2034,7 @@ tmpfs_setextattr(struct vop_setextattr_args *ap) tmp = VFS_TO_TMPFS(vp->v_mount); attr_size = ap->a_uio->uio_resid; diff = 0; - if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) + if (VN_ISDEV(ap->a_vp)) return (EOPNOTSUPP); error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, ap->a_cred, ap->a_td, VWRITE); diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index fa655c43d155..19c39e42bafa 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -5170,7 +5170,7 @@ bufstrategy(struct bufobj *bo, struct buf *bp) vp = bp->b_vp; KASSERT(vp == bo->bo_private, ("Inconsistent vnode bufstrategy")); - KASSERT(vp->v_type != VCHR && vp->v_type != VBLK, + KASSERT(!VN_ISDEV(vp), ("Wrong vnode in bufstrategy(bp=%p, vp=%p)", bp, vp)); i = VOP_STRATEGY(vp, bp); KASSERT(i == 0, ("VOP_STRATEGY failed bp=%p vp=%p", bp, bp->b_vp)); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index b805e147bd62..bf3ed9d515dc 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2839,7 +2839,7 @@ setfflags(struct thread *td, struct vnode *vp, u_long flags) * if they are allowed to set flags and programs assume that * chown can't fail when done as root. */ - if (vp->v_type == VCHR || vp->v_type == VBLK) { + if (VN_ISDEV(vp)) { error = priv_check(td, PRIV_VFS_CHFLAGS_DEV); if (error != 0) return (error); diff --git a/sys/sys/param.h b/sys/sys/param.h index 89ab2b2b0ea8..915bfe1abfcd 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -74,7 +74,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500061 +#define __FreeBSD_version 1500062 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 074769d55c2d..6ef9bbec9446 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -67,6 +67,11 @@ __enum_uint8_decl(vtype) { VLASTTYPE = VMARKER, }; +/* + * We frequently need to test is something is a device node. + */ +#define VTYPE_ISDEV(vtype) ((vtype) == VCHR || (vtype) == VBLK) + __enum_uint8_decl(vstate) { VSTATE_UNINITIALIZED, VSTATE_CONSTRUCTED, @@ -199,6 +204,8 @@ struct vnode { int v_seqc_users; /* i modifications pending */ }; +#define VN_ISDEV(vp) VTYPE_ISDEV((vp)->v_type) + #ifndef DEBUG_LOCKS #ifdef _LP64 /* @@ -309,6 +316,8 @@ struct vattr { long va_spare; /* remain quad aligned */ }; +#define VATTR_ISDEV(vap) VTYPE_ISDEV((vap)->va_type) + /* * Flags for va_vaflags. */ diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 897a21032907..c7e2b3f4b8e6 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -1550,7 +1550,7 @@ ffs_openextattr( } */ *ap) { - if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) + if (VN_ISDEV(ap->a_vp)) return (EOPNOTSUPP); return (ffs_open_ea(ap->a_vp, ap->a_cred, ap->a_td)); @@ -1572,7 +1572,7 @@ ffs_closeextattr( struct vnode *vp; vp = ap->a_vp; - if (vp->v_type == VCHR || vp->v_type == VBLK) + if (VN_ISDEV(vp)) return (EOPNOTSUPP); if (ap->a_commit && (vp->v_mount->mnt_flag & MNT_RDONLY) != 0) return (EROFS); @@ -1610,7 +1610,7 @@ ffs_deleteextattr( vp = ap->a_vp; ip = VTOI(vp); - if (vp->v_type == VCHR || vp->v_type == VBLK) + if (VN_ISDEV(vp)) return (EOPNOTSUPP); if (strlen(ap->a_name) == 0) return (EINVAL); @@ -1688,7 +1688,7 @@ ffs_getextattr( ip = VTOI(ap->a_vp); - if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) + if (VN_ISDEV(ap->a_vp)) return (EOPNOTSUPP); error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, @@ -1738,7 +1738,7 @@ ffs_listextattr( ip = VTOI(ap->a_vp); - if (ap->a_vp->v_type == VCHR || ap->a_vp->v_type == VBLK) + if (VN_ISDEV(ap->a_vp)) return (EOPNOTSUPP); error = extattr_check_cred(ap->a_vp, ap->a_attrnamespace, @@ -1803,7 +1803,7 @@ ffs_setextattr( ip = VTOI(vp); fs = ITOFS(ip); - if (vp->v_type == VCHR || vp->v_type == VBLK) + if (VN_ISDEV(vp)) return (EOPNOTSUPP); if (strlen(ap->a_name) == 0) return (EINVAL); diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 24dd51bcaef1..0921eee92b9d 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -156,7 +156,7 @@ ufs_itimes_locked(struct vnode *vp) if ((ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_UPDATE)) == 0) return; - if ((vp->v_type == VBLK || vp->v_type == VCHR) && !DOINGSOFTDEP(vp)) + if (VN_ISDEV(vp) && !DOINGSOFTDEP(vp)) UFS_INODE_SET_FLAG(ip, IN_LAZYMOD); else if (((vp->v_mount->mnt_kern_flag & (MNTK_SUSPENDED | MNTK_SUSPEND)) == 0) || @@ -319,7 +319,7 @@ ufs_open(struct vop_open_args *ap) struct vnode *vp = ap->a_vp; struct inode *ip; - if (vp->v_type == VCHR || vp->v_type == VBLK) + if (VN_ISDEV(vp)) return (EOPNOTSUPP); ip = VTOI(vp); @@ -540,8 +540,7 @@ ufs_stat(struct vop_stat_args *ap) sb->st_uid = ip->i_uid; sb->st_gid = ip->i_gid; if (I_IS_UFS1(ip)) { - sb->st_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ? - ip->i_din1->di_rdev : NODEV; + sb->st_rdev = VN_ISDEV(vp) ? ip->i_din1->di_rdev : NODEV; sb->st_size = ip->i_din1->di_size; sb->st_mtim.tv_sec = ip->i_din1->di_mtime; sb->st_mtim.tv_nsec = ip->i_din1->di_mtimensec; @@ -552,8 +551,7 @@ ufs_stat(struct vop_stat_args *ap) sb->st_blocks = dbtob((uint64_t)ip->i_din1->di_blocks) / S_BLKSIZE; sb->st_filerev = ip->i_din1->di_modrev; } else { - sb->st_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ? - ip->i_din2->di_rdev : NODEV; + sb->st_rdev = VN_ISDEV(vp) ? ip->i_din2->di_rdev : NODEV; sb->st_size = ip->i_din2->di_size; sb->st_mtim.tv_sec = ip->i_din2->di_mtime; sb->st_mtim.tv_nsec = ip->i_din2->di_mtimensec; @@ -605,8 +603,7 @@ ufs_getattr( vap->va_uid = ip->i_uid; vap->va_gid = ip->i_gid; if (I_IS_UFS1(ip)) { - vap->va_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ? - ip->i_din1->di_rdev : NODEV; + vap->va_rdev = VN_ISDEV(vp) ? ip->i_din1->di_rdev : NODEV; vap->va_size = ip->i_din1->di_size; vap->va_mtime.tv_sec = ip->i_din1->di_mtime; vap->va_mtime.tv_nsec = ip->i_din1->di_mtimensec; @@ -615,8 +612,7 @@ ufs_getattr( vap->va_bytes = dbtob((uint64_t)ip->i_din1->di_blocks); vap->va_filerev = ip->i_din1->di_modrev; } else { - vap->va_rdev = (vp->v_type == VBLK || vp->v_type == VCHR) ? - ip->i_din2->di_rdev : NODEV; + vap->va_rdev = VN_ISDEV(vp) ? ip->i_din2->di_rdev : NODEV; vap->va_size = ip->i_din2->di_size; vap->va_mtime.tv_sec = ip->i_din2->di_mtime; vap->va_mtime.tv_nsec = ip->i_din2->di_mtimensec; diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index de8a6c52c08f..244aa31ea703 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -901,8 +901,7 @@ vnode_pager_generic_getpages(struct vnode *vp, vm_page_t *m, int count, int error, before, after, rbehind, rahead, poff, i; int bytecount, secmask; - KASSERT(vp->v_type != VCHR && vp->v_type != VBLK, - ("%s does not support devices", __func__)); + KASSERT(!VN_ISDEV(vp), ("%s does not support devices", __func__)); if (VN_IS_DOOMED(vp)) return (VM_PAGER_BAD); From nobody Sun Aug 17 17:30:04 2025 X-Original-To: dev-commits-src-main@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 4c4jXX5M7Pz652PD; Sun, 17 Aug 2025 17:30: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4jXX2M3Xz444W; Sun, 17 Aug 2025 17:30:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755451804; 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=X++95lpi9sYR78Np9a4p66LXqUe38UpTMwSs1dOt1uU=; b=NwCb0VAMTUzY/+MUkbn/PwoPlalB3UsmWd0QP1BZlgsa1n/vmUP84g6U5LsFNr00DQ4lv/ +KXHJ8/XfpPb2SOcrZmekBjiCvVd20mkHlYpHF2LkiKn5Y7olvJTAjrtT+wQhR0l9L+0wW PFceu+5o1B2AoHwzQ4+bdrDdIyaPuNCb5PkRJ2lgy/ZEpZkujHOn3J0/AaIHd/21HWYyI4 HNBiH+O/WUM1+r8FdCg4dc9ThH8s6tX8gZZopBv25MzpGsFm6gpjjQRLfBOp2MhjSTLVvh WQUAJGX6f7vQ8VxQroDbo29TpwCo/Y7p8ZmREgiDIONBUBdGtHsDH9FW15etuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755451804; 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=X++95lpi9sYR78Np9a4p66LXqUe38UpTMwSs1dOt1uU=; b=iAgrEYwwunBEV3HWIXtvxCkNNtDoyx8sxLElvxvYOAQeiWGmQdLxHdsE7mQrkK/XTUBjkD ZN1kwTCh+BLxn3FO+/hVUmbyNIyT9IoRO2fsq3u8h9SMK1hNLTGs0EfzbuXsD08Ve/1KBH 4KezE7NJGnsP4oHec1Q/6O0nw/IDISHW26+fpDVJemiWT5Wh0YinsOjvWTxbwVEq2N3xx4 +D8ziS2AOe8DVJnX+A5tEBabVeE1Qzl5jcu/RTiyiCFHc7PxDtF2x+3xYK7xVxTUq5bL8F R3yRLqDf9W1lQ+fmQOgQ1tmqP40YhSGmrKYyj61eE77WS8DUC0RbCyeI92xPkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755451804; a=rsa-sha256; cv=none; b=ejRWIrrTeUEPMxyGcXQa9ktn5MS50GJ70ZKMxyfSCR1wwAbg+gpiLhYGIgDG1j3adJwdX5 g9SRHRhlzP0NUeOqM9D9LU+BClfIX+hiNvThgvvqUdksf1NSL2uj26/taHYpjVDHv0Ge6D TdrqKs7KHjzyufl7byqSuG1momBLvZOgC4XNU4b0E1Mjpw37xtHYJNzUa/w62osi8NSqHY S823BbpALH+WZzBDdAjaGVVuOt1XTk2WMrm3bk6MI2SeA9rk7dbHuLHmaT2O9ky//woVdz h14U0b+TOHZVYo/Tut2c/xZmmcEGWzjNr8Psdli6geUtoXli0kHtXmw6mrmroA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4jXX1tCgz48T; Sun, 17 Aug 2025 17:30: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 57HHU4iq073246; Sun, 17 Aug 2025 17:30:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HHU4an073240; Sun, 17 Aug 2025 17:30:04 GMT (envelope-from git) Date: Sun, 17 Aug 2025 17:30:04 GMT Message-Id: <202508171730.57HHU4an073240@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: ccc7f2f20238 - main - zfs: Set st_rdev to NODEV, not 0, when not a device List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ccc7f2f20238675cda9cf704bd2ca49f2979ed0d Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ccc7f2f20238675cda9cf704bd2ca49f2979ed0d commit ccc7f2f20238675cda9cf704bd2ca49f2979ed0d Author: Dag-Erling Smørgrav AuthorDate: 2025-08-17 17:08:45 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-17 17:29:27 +0000 zfs: Set st_rdev to NODEV, not 0, when not a device Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D51954 --- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c | 2 +- sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c index 61d0bb26d1e5..3377db7952ef 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_ctldir.c @@ -494,7 +494,7 @@ zfsctl_common_getattr(vnode_t *vp, vattr_t *vap) vap->va_uid = 0; vap->va_gid = 0; - vap->va_rdev = 0; + vap->va_rdev = NODEV; /* * We are a purely virtual object, so we have no * blocksize or allocated blocks. diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c index 1813c411b013..64995f14ee5f 100644 --- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c +++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_vnops_os.c @@ -2013,7 +2013,7 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, int flags, cred_t *cr) if (vp->v_type == VBLK || vp->v_type == VCHR) vap->va_rdev = zfs_cmpldev(rdev); else - vap->va_rdev = 0; + vap->va_rdev = NODEV; vap->va_gen = zp->z_gen; vap->va_flags = 0; /* FreeBSD: Reset chflags(2) flags. */ vap->va_filerev = zp->z_seq; From nobody Sun Aug 17 17:30:05 2025 X-Original-To: dev-commits-src-main@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 4c4jXZ3mYZz652PF; Sun, 17 Aug 2025 17:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4jXY3KXqz43xM; Sun, 17 Aug 2025 17:30:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755451805; 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=vEydtAxs2ctwK2lignqnM6uL5hldnewpS/xz+sEb1RY=; b=vwA8tOQ1RiS+MdaNlZx7keiSIc9cfVCJ91semPsbsvRRba2FuYUtDPRpo9H6HHLUcmZKmx FU09AkhBebUm8I6D+i4tDU4DKHo4x6m5lV0a0PZ+4TnKEQmruu1YNNahxfTxxYXwzLANNS CBP6b2i+ugyx9B5VE1ySrNl0l67PuiFKPcrYgPQ7vKBIBak1YXm5uS8WmAfC3Zg+EnnQmv xtVZvyI7wiUD+h252vcf/cWJmDfX9TKamnlp5qkfaZG+WPzMVLExz+QfFk5Z23ZR+WDU1x 22FaFQb/VuO946+Rpj50vUU5lBmNQlHifYbNw5e2E6R683PhfJqDqgoqoNZnbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755451805; 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=vEydtAxs2ctwK2lignqnM6uL5hldnewpS/xz+sEb1RY=; b=DJlUlKluUtvx5nhqtZ37FVS8BaPXSTudmgVX4LRY1YAfVXGLV0bk6aXFgliYYUloUrixm1 tDq/XP2N1WPFM6wxQbbnKox3/7PAe9nnR3E+qOOD7ige0hUq8Ouwb6gerVUyrivhlswxd1 Gs+4rHfaOwx68keMhgx/AitSlC5NGGCq3YOpU2dRFjrUiJ+VzWWg5+hDe78jb0DLYfPyU6 HZn4vaw6JCdOmWM4txBS9HGCWTzdFAxc4kfPnhdbV3qgwyuBNyvrqVAPGu9N7UL7yKgQp6 Qu1M0G2AZxtv3txCr2J+z/FMcjReZ7AiaTqXR8t6O2zXPwdID7USJngWJD/8Rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755451805; a=rsa-sha256; cv=none; b=GYiRnn/Stdllsrt+nhzD19ANqT5CPQ9is2ACafOv4xvJsFQLIIuvYRnQ9Z9myFazgPrLJb TWYN6agCAWn9gfNBOLyp2VUtTt0szIxSh03gIORSRKrCHDpkZUNkLCmFWWqpaL+EPwbhXA tMKcjjW6I/vWJMr3/lOzZZEkiENGAnjxnzv1DJcYHAmjOP18e4eLX1S9+tc+oLVdjwHoog T7WxlfvEAQhrEtvOb+Kq8QsC+TFqdfa2p26cirBfTGG4J3B/8dbJLgG0GzeWYmd4KS+xFb 3/Raj2hIsasKX6oNxIE+NyMvpwbY2cHohh379vyjo3Bf2xPedVoZrikeGchq2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4jXY2k53z4jw; Sun, 17 Aug 2025 17:30:05 +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 57HHU5FZ073515; Sun, 17 Aug 2025 17:30:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HHU52t073510; Sun, 17 Aug 2025 17:30:05 GMT (envelope-from git) Date: Sun, 17 Aug 2025 17:30:05 GMT Message-Id: <202508171730.57HHU52t073510@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: df52ed9f7489 - main - ext2fs: Set st_rdev to NODEV when not a device List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df52ed9f7489879d678204ad5351ba635f7bdd2d Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=df52ed9f7489879d678204ad5351ba635f7bdd2d commit df52ed9f7489879d678204ad5351ba635f7bdd2d Author: Dag-Erling Smørgrav AuthorDate: 2025-08-17 17:08:51 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-17 17:29:27 +0000 ext2fs: Set st_rdev to NODEV when not a device Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D51955 --- sys/fs/ext2fs/ext2_vnops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/ext2fs/ext2_vnops.c b/sys/fs/ext2fs/ext2_vnops.c index 669b510cf8ac..00389c927087 100644 --- a/sys/fs/ext2fs/ext2_vnops.c +++ b/sys/fs/ext2fs/ext2_vnops.c @@ -360,7 +360,7 @@ ext2_getattr(struct vop_getattr_args *ap) vap->va_nlink = ip->i_nlink; vap->va_uid = ip->i_uid; vap->va_gid = ip->i_gid; - vap->va_rdev = ip->i_rdev; + vap->va_rdev = VN_ISDEV(vp) ? ip->i_rdev : NODEV; vap->va_size = ip->i_size; vap->va_atime.tv_sec = ip->i_atime; vap->va_atime.tv_nsec = E2DI_HAS_XTIME(ip) ? ip->i_atimensec : 0; From nobody Sun Aug 17 17:30:06 2025 X-Original-To: dev-commits-src-main@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 4c4jXb3NmFz652V3; Sun, 17 Aug 2025 17:30: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4jXZ3VJ8z44J0; Sun, 17 Aug 2025 17:30:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755451806; 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=WK7wFuYWYSv7ghf9mncJ8FuRJCl7OIV8g70Zae3EKms=; b=nhUk8eVIs4UqU9UinuLS8f2BYqG/woGTDyIEBZbWcOM3sryDc1MgFbxciE0hg0X+8c/YAn +6K7xqkB2+uajLVfxwI9u1wqrLH12/pNF0KJ50aNoqxGsUmpuGrDAHkiAjaZ4av2bU6USa q+IWDmQgIDmLIHwkm9XAlh6hKguP2c7rzu+gt94rSW7Y5emJYAy3NqPNLWDSOH9aPxvEHC R2bpLPqsOMVvKsFbrmyaGURTgeWZRV0QCr6KkeRa525Hgd0skM4NSdYh4kvQbyn95BRDlt Vmor8qEhdWSoIVeysZW2dGCaRZ03cvQZGvRt8mQxkQjnFVzCOWG5P2CDH2vUzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755451806; 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=WK7wFuYWYSv7ghf9mncJ8FuRJCl7OIV8g70Zae3EKms=; b=brMkAQR04Gk/VbVuUnl+EcPEphHg+bwKTqs1UJ4AzRsaxiNCvSasch+Eti7IAHLZcf1bBz +AEX+h8IvjB/QoGWBQ1deLMZeYQtUKyXO653eoZzru6XELFKnddd4IbiYcd9KY1x0RI7NY C4D1jl0G5SWkBrhltFdpt+o5Uzhus5A5ZaAIBuB5HZQO3YvB/BdL6g1dj1NozRMlWqDOi6 8nDT6n2n7Fh166Vvrk8CeI8PaVdfT29mfQZP4CAJ8GmrazIri5iYM8iuLaw80hLbjsZG0a dZMAZ60oQGai4r6yArRx2ewj3TMws/AWNCjpul9Weu3cxYGM7ErSLP8TImK/bA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755451806; a=rsa-sha256; cv=none; b=YdqNcmLI5EMrbpaqyWV7S5oexPRsVDZeLb90s62VLqTIkZvYGm3ZRYrmzUACV8cdnN7WGK 9sICoaP2iO5qH9ysFooQ6n5HRLQbTG2MuBcfMOFV0UskbbrKKObDae2pFdQUMkEM1ZftOB iqgC2N+5Aw/q1MyNuvwrmr5Wrq9klISt7PU4jycVx8DYOG1JXTVfpiUZXr9zP9Te4u7xI6 ycQBBk3OwDd3E7ab+Td9SU6OIXOuOZDzbHZqmvhJqDanhoTeQfeuTBY8z1GCkoBmQOEobN Etuos5Rr/0jGQVE9Qyv5tVLyxzagIQ2/mwQkqhTqRPAIYtfacGBpHUn6fDgUXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4jXZ2twnz4Ls; Sun, 17 Aug 2025 17:30:06 +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 57HHU6Wq073784; Sun, 17 Aug 2025 17:30:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HHU6Fp073779; Sun, 17 Aug 2025 17:30:06 GMT (envelope-from git) Date: Sun, 17 Aug 2025 17:30:06 GMT Message-Id: <202508171730.57HHU6Fp073779@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: f9ff1e48cc1b - main - vfs: Assert that st_rdev is NODEV for non-devices List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9ff1e48cc1b77f1840fd514050ccc5904a0cac2 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f9ff1e48cc1b77f1840fd514050ccc5904a0cac2 commit f9ff1e48cc1b77f1840fd514050ccc5904a0cac2 Author: Dag-Erling Smørgrav AuthorDate: 2025-08-17 17:08:56 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-17 17:29:28 +0000 vfs: Assert that st_rdev is NODEV for non-devices Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D51956 --- sys/kern/vfs_syscalls.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index bf3ed9d515dc..aeb5657452dc 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2571,6 +2571,8 @@ kern_statat(struct thread *td, int flag, int fd, const char *path, } error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); NDFREE_PNBUF(&nd); + KASSERT(error != 0 || VN_ISDEV(nd.ni_vp) || sbp->st_rdev == NODEV, + ("st_rdev should be NODEV unless the file is a device node")); vput(nd.ni_vp); #ifdef __STAT_TIME_T_EXT sbp->st_atim_ext = 0; From nobody Sun Aug 17 19:39:21 2025 X-Original-To: dev-commits-src-main@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 4c4mPj6kDkz659hV; Sun, 17 Aug 2025 19:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4mPj5s82z3KS0; Sun, 17 Aug 2025 19:39:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755459561; 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=swZpej3gGDkKYX9tHmOzcK1EOTtAqMnHlBdtDKAqjSY=; b=YtDKjDAKqdCARjjYbe1ZyROANhsX7Z0UlwLehfIDZGDE6K9rGyuiZU9KGrsZjWnKz+V6p5 C7td5BBDXgpkBc+FuJ2FlExDjubZyffooZOiNXWxQsKB454S3uUCP5RbsyTjl+EOoGjlg3 HkDGjdun6TRplkdNGxr1G9qhWYVKlFJ8e28Oo8bK7ScXSoeWuIXKAyI/cgTEpNrBQT2seP GogzmvZAwncWKqjNsCJ9sLCGyca54C+6hmiRDSUSqtgHSn8sQxmmXnSdbjFr9o7/XTwHNx i5Nlk5wmdyJ/JFw+wS91yERvyShF/eBpDp8dG7oY3x9Tv1s/+y1KDXBOg19UJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755459561; 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=swZpej3gGDkKYX9tHmOzcK1EOTtAqMnHlBdtDKAqjSY=; b=V1Cl/xlorsciM+1upf5BFU6UzYl/te9baSo0oZ0xBnlTcLBbI1KSLUjInGNQvNMMguevZC 2ffPLSN3oRQomdJ4JQEHVErj3fDfmpPKWOYlTgwoF6J+A52EyZct6HRn1cLeLiaBwpj3yG N8SEpyx5x6BOZ9RC7zgZpI21BPNkKPhlhWZRSMH5cJxjd3n1ESgaZlEZQam+h2eIU7+02w ZH53yHbEoPNB3yceLmexFFbQSoe57UWh9eyt36qzSsexGP/cb4VwSBU2O2Nw2FW0+mlorJ lxkjKGVfTs5keBnlsCF2QctVmV3YtgapbqqFXK5nND0f8YNI79n7FG4PCLfELg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755459561; a=rsa-sha256; cv=none; b=nv2OwGpRsVqlCj/pFIVB86mPKmrkYpJKmNnsOBYs5pf4PROrdsCO/Ay82EWbx8MZOzNmtk yvQjdQdzqampomRkXq6keGZkQ4ChI3QJUG1URCBsPnWtMgS22sYKnKyphbaVEM+8/j+Hyb QfezJbjwoIlnILT7KmAZiuRhoZRb5nJyCiMqRednkZVmDHC/eWViNoKrpxDNia2HAmFNl9 AohE8WJrvbfYVVZNTJfY1S8ETakDTvMwsZTnw9rFFHZ2HXpAYLLMPrZNk4Zdk3j8SgOKgi Fac8R+4BjK7eUfijmETR8h3J86VEekrnQA+Hhna+NGcsJEds4BXuRImYjtPe3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4mPj58wlz7dh; Sun, 17 Aug 2025 19:39: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 57HJdLX1016380; Sun, 17 Aug 2025 19:39:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HJdL15016377; Sun, 17 Aug 2025 19:39:21 GMT (envelope-from git) Date: Sun, 17 Aug 2025 19:39:21 GMT Message-Id: <202508171939.57HJdL15016377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: 6582915c59e8 - main - tcopy: Fix braino. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6582915c59e8a974d65fafc25c39ec2713a02d28 Auto-Submitted: auto-generated The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=6582915c59e8a974d65fafc25c39ec2713a02d28 commit 6582915c59e8a974d65fafc25c39ec2713a02d28 Author: Poul-Henning Kamp AuthorDate: 2025-08-17 19:38:56 +0000 Commit: Poul-Henning Kamp CommitDate: 2025-08-17 19:38:56 +0000 tcopy: Fix braino. Spotted by: Gunther Nikl --- usr.bin/tcopy/tcopy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/tcopy/tcopy.cc b/usr.bin/tcopy/tcopy.cc index 891c37f871e5..37a146376c2e 100644 --- a/usr.bin/tcopy/tcopy.cc +++ b/usr.bin/tcopy/tcopy.cc @@ -738,7 +738,7 @@ main(int argc, char *argv[]) warnx("illegal block size"); usage(); } - if (maxblk <= 0) { + if (tmp <= 0) { warnx("illegal block size"); usage(); } From nobody Sun Aug 17 21:02:26 2025 X-Original-To: dev-commits-src-main@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 4c4pFZ4K6Nz642wm; Sun, 17 Aug 2025 21:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4pFZ3HMbz3V59; Sun, 17 Aug 2025 21:02:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755464546; 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=cPpUlDApAitUTyuXWX0J6C+LcsRYlyw4fmJ519zBn4k=; b=W6SE1oXyvOA8xeq9MbVMTJzPfkzDrEi6IRRWE90dZl3iLKg7Py9USKS2tv1oY2uOf314DN ej648fpt7iQYrSDbjj57ApXr7Pak895E9AVq8sc5llI5RiRmM5HL6aP7XyCPcDSeLh/GTr t97zhnAtRskUbc/3hl05Tv8iqoTsU3jM+4odnIs2+Eg7ou6lg9hR/0GHXiZNiNK2dLKpDu LEobeE0P+6mM2lBdMjqO3CyzksoD9SuIf/kolwzlzwQXz0oX9JkD3Zwxhll8gOFNSdX2HL 0MdgcMBfi206dqRnQfnTXY+CmVL7ZVldhsBLBBr8tbLta5qv72x9JBPBGlrTWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755464546; 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=cPpUlDApAitUTyuXWX0J6C+LcsRYlyw4fmJ519zBn4k=; b=eAbLBj1PK3I1xjv1r6SBNVvOXPu0BTK6sPd1dCehyAVZbC6vlHNKoBg830Nc9EQuEEiL+J qDJV9XZptcaKfyZqWj3TCy1B6vbs8tQj/KkalzPinUmtj+UBvWlQbGBMUpyxpQfrDs9jpS nJkka64U59CaK474lmZHlce80/jpV9nD3wXwNls5kCboQbB2Z9AZOEj/qGNoPYQB4QJs0Q xBE81AUeDetdTb+WSFWoJCI2gjYvw/16hGZFTrc2MIUu50ei+6J2nx3Mr/9r6RG4b1m6S7 twU/SDIzJOZpuC7lN5O7svUDD50rZFEam0GfQfIQ/NnrRKOIxF9T+oH4Rq1VNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755464546; a=rsa-sha256; cv=none; b=blFykOg8Hbt5+kQciOocaw1v1cpFyyC2wSEAC8XeSM8KbW80ENDyKS3wfqS9/TRIGYX4b0 Fmt+/h7q8dd8q/nu3+ktr23HfR03dZtvjxPKcT1e7VSQNeLFtETdfzq9wtd7o/j1D2DIBT My4HCBItaRm9EL/sA44Fl4Fvm0ON1Uuh08owEc1y8tOOSozOuyxy28QkpZ0TL7A1yCBOjC jZZH4dxcs8J9FwX2g4qYUWtkQL1yySvAT2TFKFTscW/ZGIZ0EscQQQZ5m6V+eFEhgIUbum 0BduaS5TyzoE02KZCtU9tPr+iApGK2wj79ub/2uBf3iz2TJH9iLRvoE6qGmXFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4pFZ2rHyzBgQ; Sun, 17 Aug 2025 21:02: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 57HL2Q7n085232; Sun, 17 Aug 2025 21:02:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HL2Qjs085230; Sun, 17 Aug 2025 21:02:26 GMT (envelope-from git) Date: Sun, 17 Aug 2025 21:02:26 GMT Message-Id: <202508172102.57HL2Qjs085230@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: 7699ec1558b7 - main - hid: Add HQ_NO_READAHEAD quirk and implement it in usbhid(4) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 7699ec1558b7ec2224a4db992ab63aaa849b26fd Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=7699ec1558b7ec2224a4db992ab63aaa849b26fd commit 7699ec1558b7ec2224a4db992ab63aaa849b26fd Author: Vladimir Kondratyev AuthorDate: 2025-08-17 21:00:44 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-08-17 21:00:44 +0000 hid: Add HQ_NO_READAHEAD quirk and implement it in usbhid(4) It disables interrupt emulation on poll-driven buses like USB and forces aquiring of only one USB frame per read(2) operation. This avoids an FIDO/U2F issue where IN endpoint data received from the device right before the file handle is closed, gets lost. PR: 263995 Reviewed by: aokblast Differential revision: https://reviews.freebsd.org/D51605 --- sys/dev/hid/hidquirk.h | 1 + sys/dev/usb/input/usbhid.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/hid/hidquirk.h b/sys/dev/hid/hidquirk.h index 4f8b8acbe201..f6fa9f88c6c9 100644 --- a/sys/dev/hid/hidquirk.h +++ b/sys/dev/hid/hidquirk.h @@ -50,6 +50,7 @@ HQ(IS_XBOX360GP), /* device is XBox 360 GamePad */ \ HQ(NOWRITE), /* device does not support writes */ \ HQ(IICHID_SAMPLING), /* IIC backend runs in sampling mode */ \ + HQ(NO_READAHEAD), /* Disable interrupt after one report */\ \ /* Various quirks */ \ HQ(HID_IGNORE), /* device should be ignored by hid class */ \ diff --git a/sys/dev/usb/input/usbhid.c b/sys/dev/usb/input/usbhid.c index df810012b3f8..255e639621fe 100644 --- a/sys/dev/usb/input/usbhid.c +++ b/sys/dev/usb/input/usbhid.c @@ -114,6 +114,7 @@ struct usbhid_xfer_ctx { void *cb_ctx; int waiters; bool influx; + bool no_readahead; }; struct usbhid_softc { @@ -272,7 +273,7 @@ usbhid_intr_handler_cb(struct usbhid_xfer_ctx *xfer_ctx) sc->sc_intr_handler(sc->sc_intr_ctx, xfer_ctx->buf, xfer_ctx->req.intr.actlen); - return (0); + return (xfer_ctx->no_readahead ? ECANCELED : 0); } static int @@ -430,6 +431,7 @@ usbhid_intr_start(device_t dev, device_t child __unused) .cb = usbhid_intr_handler_cb, .cb_ctx = sc, .buf = sc->sc_intr_buf, + .no_readahead = hid_test_quirk(&sc->sc_hw, HQ_NO_READAHEAD), }; sc->sc_xfer_ctx[POLL_XFER(USBHID_INTR_IN_DT)] = (struct usbhid_xfer_ctx) { .req.intr.maxlen = From nobody Sun Aug 17 21:02:27 2025 X-Original-To: dev-commits-src-main@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 4c4pFb5kB3z6432k; Sun, 17 Aug 2025 21:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4pFb3RySz3V3R; Sun, 17 Aug 2025 21:02:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755464547; 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=A3snDso2Lvy7rsJHHT9bKe3qCZjooMLKhRazKHDAYH8=; b=BC/c5vSV7JsM0pM315T3b0f9/3NhgJ+TIGrBX7xkcx1HxKdr570Fm2LjVZOrJpjfa7XkOa vFnWSHgvCSMrqYlp/m6g4j8rWsX0Cz9EGfljHnCylJql19+vdqSuJuqugzbGD/4IMnERRr x3rVDIxTX7zzVM74TP1Oz/VAmdQGQwugODIxdvJ7F+gQFzL8WY5MsHYltYMq5s2o4Rngtm SR3vUdHeO5ui9jEIEeTvhgRxUkEG1LvOVVRpLjU4HFcaX3SYwD/geW9ISLBknGTRrZLu/d Fr1JEHL2PPOoNn1+7EPbhC6FXYRmrX0xiTmofn/SMHILXSHoC+QQI5u6iZO3sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755464547; 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=A3snDso2Lvy7rsJHHT9bKe3qCZjooMLKhRazKHDAYH8=; b=I1deA+EZ6tFGst5Ow9wNouaC+QZKN6zhfJVMuwdIPD0+wT3hx1NxHJ6SA6gp3OAAdnktqj atLkYfKRTt9s4E7XrjxHtr5DwjTzdBvUbzh2QTthKAsYuQs2uGwNeUN+DJdPSvDUeKv3f1 +3hyI/koIoIOCBQm7ZlAiuisBuT8E7l89jLtiYi6Q1W0KifypG2eO+DJgq6pCfK9h0HMx0 0DRF9Qy8906qQVsQpSL6Bw9+KDif+ze6SFJT6f6N+uPxxusGYxOkmgYOcDjGX2DBh+yYF6 sIGUHxEzYBytGKtZt4xfxDBBO/v16Mog67GJwPT5a0Hj/R+XGctRhWkqCD8YgA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755464547; a=rsa-sha256; cv=none; b=vfSYzwA0jmC9wD2KDKZlFDAVDk3ac7p7HpFTz/+8zV7xGpvuJs+CScm+vT1UrNY5W+ospR HemSnmMMEfQQ/5Caif0kJkKn7pknjrIpfUoN+9ywGO+wEz8URlogUilU494xB5nnLbcTMU a9Zs/3YPKQi0N8H2iqW07Tz2vs5COUS+ZigF28IlGyBL6VIjOt0yXsIYfUea5cfQ2ctkaG Px2n7NeAnM//JGEyid0oQ+J7w1VP4yZKALE5UOl4fG0JMwVciywAm1MgW0hJ1HJ2RayYLV KYgo+dm5fFS3qDdxLrZ4wSC6SrpGQFFsylvC8wUxI21NscpY2GGQ+1L4BFhMEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4pFb33hbzBPM; Sun, 17 Aug 2025 21:02: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 57HL2RWj085269; Sun, 17 Aug 2025 21:02:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HL2RPC085266; Sun, 17 Aug 2025 21:02:27 GMT (envelope-from git) Date: Sun, 17 Aug 2025 21:02:27 GMT Message-Id: <202508172102.57HL2RPC085266@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: df6ae0577d2c - main - hid: Allow serial execution of HID_INTR_START method. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: df6ae0577d2c966ac0db9983ae353c24b53067eb Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=df6ae0577d2c966ac0db9983ae353c24b53067eb commit df6ae0577d2c966ac0db9983ae353c24b53067eb Author: Vladimir Kondratyev AuthorDate: 2025-08-17 21:00:44 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-08-17 21:00:44 +0000 hid: Allow serial execution of HID_INTR_START method. It is required to implement HQ_NO_READAHEAD HID quirk. Differential revision: https://reviews.freebsd.org/D51606 --- sys/dev/hid/hidbus.c | 41 +++++++++++++++-------------------------- sys/dev/hid/ietp.c | 31 +++++++++++++++++++++++-------- sys/dev/iicbus/iichid.c | 3 ++- 3 files changed, 40 insertions(+), 35 deletions(-) diff --git a/sys/dev/hid/hidbus.c b/sys/dev/hid/hidbus.c index 96d36c8d191d..683449fca49c 100644 --- a/sys/dev/hid/hidbus.c +++ b/sys/dev/hid/hidbus.c @@ -65,7 +65,7 @@ struct hidbus_ivars { struct mtx *mtx; /* child intr mtx */ hid_intr_t *intr_handler; /* executed under mtx*/ void *intr_ctx; - unsigned int refcnt; /* protected by mtx */ + bool active; /* protected by mtx */ struct epoch_context epoch_ctx; CK_STAILQ_ENTRY(hidbus_ivars) link; }; @@ -398,7 +398,7 @@ hidbus_child_detached(device_t bus, device_t child) struct hidbus_softc *sc = device_get_softc(bus); struct hidbus_ivars *tlc = device_get_ivars(child); - KASSERT(tlc->refcnt == 0, ("Child device is running")); + KASSERT(!tlc->active, ("Child device is running")); tlc->mtx = &sc->mtx; tlc->intr_handler = NULL; tlc->flags &= ~HIDBUS_FLAG_CAN_POLL; @@ -423,7 +423,7 @@ hidbus_child_deleted(device_t bus, device_t child) struct hidbus_ivars *tlc = device_get_ivars(child); sx_xlock(&sc->sx); - KASSERT(tlc->refcnt == 0, ("Child device is running")); + KASSERT(!tlc->active, ("Child device is running")); CK_STAILQ_REMOVE(&sc->tlcs, tlc, hidbus_ivars, link); sx_unlock(&sc->sx); epoch_call(INPUT_EPOCH, hidbus_ivar_dtor, &tlc->epoch_ctx); @@ -572,7 +572,7 @@ hidbus_intr(void *context, void *buf, hid_size_t len) if (!HID_IN_POLLING_MODE()) epoch_enter_preempt(INPUT_EPOCH, &et); CK_STAILQ_FOREACH(tlc, &sc->tlcs, link) { - if (tlc->refcnt == 0 || tlc->intr_handler == NULL) + if (!tlc->active || tlc->intr_handler == NULL) continue; if (HID_IN_POLLING_MODE()) { if ((tlc->flags & HIDBUS_FLAG_CAN_POLL) != 0) @@ -602,21 +602,14 @@ hidbus_intr_start(device_t bus, device_t child) MPASS(bus == device_get_parent(child)); struct hidbus_softc *sc = device_get_softc(bus); struct hidbus_ivars *ivar = device_get_ivars(child); - struct hidbus_ivars *tlc; - bool refcnted = false; int error; if (sx_xlock_sig(&sc->sx) != 0) return (EINTR); - CK_STAILQ_FOREACH(tlc, &sc->tlcs, link) { - refcnted |= (tlc->refcnt != 0); - if (tlc == ivar) { - mtx_lock(tlc->mtx); - ++tlc->refcnt; - mtx_unlock(tlc->mtx); - } - } - error = refcnted ? 0 : hid_intr_start(bus); + mtx_lock(ivar->mtx); + ivar->active = true; + mtx_unlock(ivar->mtx); + error = hid_intr_start(bus); sx_unlock(&sc->sx); return (error); @@ -629,21 +622,17 @@ hidbus_intr_stop(device_t bus, device_t child) struct hidbus_softc *sc = device_get_softc(bus); struct hidbus_ivars *ivar = device_get_ivars(child); struct hidbus_ivars *tlc; - bool refcnted = false; + bool active = false; int error; if (sx_xlock_sig(&sc->sx) != 0) return (EINTR); - CK_STAILQ_FOREACH(tlc, &sc->tlcs, link) { - if (tlc == ivar) { - mtx_lock(tlc->mtx); - MPASS(tlc->refcnt != 0); - --tlc->refcnt; - mtx_unlock(tlc->mtx); - } - refcnted |= (tlc->refcnt != 0); - } - error = refcnted ? 0 : hid_intr_stop(bus); + mtx_lock(ivar->mtx); + ivar->active = false; + mtx_unlock(ivar->mtx); + CK_STAILQ_FOREACH(tlc, &sc->tlcs, link) + active |= tlc->active; + error = active ? 0 : hid_intr_stop(bus); sx_unlock(&sc->sx); return (error); diff --git a/sys/dev/hid/ietp.c b/sys/dev/hid/ietp.c index 217585a7948b..73a5cb7414d4 100644 --- a/sys/dev/hid/ietp.c +++ b/sys/dev/hid/ietp.c @@ -102,6 +102,7 @@ struct ietp_softc { device_t dev; struct evdev_dev *evdev; + bool open; uint8_t report_id; hid_size_t report_len; @@ -217,13 +218,25 @@ static const struct evdev_methods ietp_evdev_methods = { static int ietp_ev_open(struct evdev_dev *evdev) { - return (hid_intr_start(evdev_get_softc(evdev))); + struct ietp_softc *sc = evdev_get_softc(evdev); + int error; + + error = hid_intr_start(sc->dev); + if (error == 0) + sc->open = true; + return (error); } static int ietp_ev_close(struct evdev_dev *evdev) { - return (hid_intr_stop(evdev_get_softc(evdev))); + struct ietp_softc *sc = evdev_get_softc(evdev); + int error; + + error = hid_intr_stop(sc->dev); + if (error == 0) + sc->open = false; + return (error); } static int @@ -275,7 +288,7 @@ ietp_attach(struct ietp_softc *sc) evdev_set_id(sc->evdev, hw->idBus, hw->idVendor, hw->idProduct, hw->idVersion); evdev_set_serial(sc->evdev, hw->serial); - evdev_set_methods(sc->evdev, sc->dev, &ietp_evdev_methods); + evdev_set_methods(sc->evdev, sc, &ietp_evdev_methods); evdev_set_flag(sc->evdev, EVDEV_FLAG_MT_STCOMPAT); evdev_set_flag(sc->evdev, EVDEV_FLAG_EXT_EPOCH); /* hidbus child */ @@ -584,11 +597,13 @@ ietp_iic_set_absolute_mode(device_t dev, bool enable) * Some ASUS touchpads need to be powered on to enter absolute mode. */ require_wakeup = false; - for (i = 0; i < nitems(special_fw); i++) { - if (sc->ic_type == special_fw[i].ic_type && - sc->product_id == special_fw[i].product_id) { - require_wakeup = true; - break; + if (!sc->open) { + for (i = 0; i < nitems(special_fw); i++) { + if (sc->ic_type == special_fw[i].ic_type && + sc->product_id == special_fw[i].product_id) { + require_wakeup = true; + break; + } } } diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c index 3f1d7a0cefba..fdb4816b8bd9 100644 --- a/sys/dev/iicbus/iichid.c +++ b/sys/dev/iicbus/iichid.c @@ -861,7 +861,8 @@ iichid_intr_start(device_t dev, device_t child __unused) sc = device_get_softc(dev); DPRINTF(sc, "iichid device open\n"); - iichid_set_power_state(sc, IICHID_PS_ON, IICHID_PS_NULL); + if (!sc->open) + iichid_set_power_state(sc, IICHID_PS_ON, IICHID_PS_NULL); return (0); } From nobody Sun Aug 17 21:02:28 2025 X-Original-To: dev-commits-src-main@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 4c4pFc6Lq1z6432p; Sun, 17 Aug 2025 21:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4pFc4m9lz3V7v; Sun, 17 Aug 2025 21:02:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755464548; 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=o7/lqYDmQT27DdXDylqdckfbY7fedV8MmKErIQB8tt0=; b=XQO9cJL8r/jwIY0luDlhOTP5iOviqUXqv/f8KhuyCVYuD85OuU7pMaSF3VX7xYQiEQjmIH UZlelFUMPEBLuLy8vAePEuOODoNGkZLmu1QYTLrLAGqYhrbBKp0NuhloE/J19u8BbcyCb7 oCq1egpLsISheQIJNYkXsieYNjhekxJ4W98E3OKQ7dPwlGLKafa723V9TMkpsymMAcOkaR IRl9xiVKtD67HiWzQsZ7PDc75bj4ndq0IvhiLRr1mr0rWuGyD4skPqRU0JegkTgRI4rOxj p89uSbhrt8gMFVDhLVpZqfxH5nlR7kAVxQ+Ssr7Zoor3QmeF5TTwsMyXkiJ+Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755464548; 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=o7/lqYDmQT27DdXDylqdckfbY7fedV8MmKErIQB8tt0=; b=GvzsziuP0HuWVwCSz42d2ko+4BkLGU8ivmUZZkPqZb/Eet29+0tHR9SrP1XsSKaTIw6emk LZ24rbJZyqj4HAkSBNOHVKkrAvUYHMFoTRSvPzCNciL9pmNrkMQ9eH6POR5DbsOIBfFNBc ZfG00C2qsOzNz/Wk3fbp4mbMjBbzjZfVj/OPzt0HTDD3VJ9X6zhnCxJcAn/0V3ISo+CemK hj1ZBjbogzvdpAM8LPcm19eG4u9OQgpiLGgwwJnRHEvz7ykmQrxfsTSSyhjpKtVtIgE+3d ypzx07Vc1nOgZ5CubFLTPjT8f6QmsPx+0QQMDevV5Af3Sbcz+Y+9ciYAfnKz7Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755464548; a=rsa-sha256; cv=none; b=Hna8bspnK1YW4q4b31pKV60ZRD8mjf6+DTdFHdLrbA3LSMTf0LeZwIFzsA19rKVZgKcweg s54Bhb2cPpRjnCNoMVkh4af8j1//Hq95WWAkUoyXgLoCJ1L5bN4P4yllAKbZgu6BSLMX6t AlXs4QrRWLb0FPaq4vZP+kszAM8lZ2Txkr02EyBJ5FQES9i6IBPF4xUyQxNer3rmp12PTx 3LX67jbTjSQpLVE+5zJbhj3fD3LDAqZYd5zEfLn3bGcZH4RRM5pX0TZ6FA4UZhzDjTXXlS GGIx45RmzJJugA96fIqw6ViqzobJbT3yD3Lb0O8bOK+GXTXZn1rBokr+zV7yZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4pFc4JWSzBHy; Sun, 17 Aug 2025 21:02: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 57HL2SYW085302; Sun, 17 Aug 2025 21:02:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HL2Sdg085299; Sun, 17 Aug 2025 21:02:28 GMT (envelope-from git) Date: Sun, 17 Aug 2025 21:02:28 GMT Message-Id: <202508172102.57HL2Sdg085299@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: d3d92388a54c - main - sys/conf.h: Add u2f group id to use in coming FIDO/U2F driver List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: d3d92388a54c2c4f5788a4b7117868d7a5ab845b Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=d3d92388a54c2c4f5788a4b7117868d7a5ab845b commit d3d92388a54c2c4f5788a4b7117868d7a5ab845b Author: Vladimir Kondratyev AuthorDate: 2025-08-17 21:00:44 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-08-17 21:00:44 +0000 sys/conf.h: Add u2f group id to use in coming FIDO/U2F driver We have already reserved this group ID in /etc/group file. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D51607 --- sys/sys/conf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 1646aa108701..a830c9d4c622 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -159,6 +159,7 @@ typedef int dumper_hdr_t(struct dumperinfo *di, struct kerneldumpheader *kdh); #define GID_RT_PRIO 47 #define GID_ID_PRIO 48 #define GID_DIALER 68 +#define GID_U2F 116 #define GID_NOGROUP 65533 #define GID_NOBODY 65534 From nobody Sun Aug 17 21:02:30 2025 X-Original-To: dev-commits-src-main@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 4c4pFg2sBRz642ww; Sun, 17 Aug 2025 21:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4pFf6NfKz3V47; Sun, 17 Aug 2025 21:02:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755464550; 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=LbCL7Ww5vAJKV4f9Sa0I5LT9GPI/TjPF0JnIDh9uWxA=; b=DVLJxF14HOyFpEkrSJ0IcUk9Uy/9UHF0XwcUO6WgPbMiegDWa9zalloiF1wJCjNh5LAja8 6YC04jV0riiFYTt9uC16GWy3AneGi5pu1HnzuXXHoGQd6rq9saproHhpJ22unLb48AQyw8 XF4ANo4HZUDlGinkfHb+ZVtIeEGh1b2AxLEvTwXvDHbKdEjyxrVi7yZE0NX7NFcB8P1FWs 5oJItbFZ1XBQnIVvnBk9G8qpM6VWQgkkXECI1et4rGJqvNbfvj5GKDJ1IVPA1bMQabhoEy d+BsAA2qrGT29wjmWcdrRspBiPj+I4vTNfbAFFAfQ9Fv4J2f4sNC/GmVCOP3JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755464550; 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=LbCL7Ww5vAJKV4f9Sa0I5LT9GPI/TjPF0JnIDh9uWxA=; b=e/bu7wzJieLhtD7obzYoOZ9KVXeL3U12kfVY6xiFLblLPzolHzTxq2rS0rfC9JbU/qIRhZ dRUAETRf/xkNXYBzN9mT2+9k3PRv2AjEKFjV9GWXThtyDG7TneC06AG8oesl+0iwKMKBm9 2gSeHJy/KVPtkU4oEOf/d/zjpOq4WzGZ2FojWV5GhWaQhGNuNppqpUR7jzWAA7d5iX12Bn YnDu/BnymFYTq6prD+FrrE0qVQ6eGrynGuhbrZO3hGWyslHTLr7P+iQVSZ5uYDtvD+HAxx kayGqCu7qAFqoODLs0svJF812oFEFzVXkWKEgXXqOBPoKVb/9TpwVae11sWnlQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755464550; a=rsa-sha256; cv=none; b=Y9V8W5mcr5YqGxXGuPMg0/Y787LbpW641k4NG9vLzbqZ0OlB6MrWbnk8eGod48qiXLMtEK E+MBTUny/LQgz/jithJ1FWFiic1EPPjzj6y63R+XZ4aYeZwjF4jefmbSq7wfKnmxjg7gnE hL4NoIp8zMr3isWxP4MvtFjTzCAjpuiytYUe3EbV+aJGsUPmUww3j02eVrLP0RC9w0zZA8 AlX4rK+z+r4lquU6Z4zjDPI3YmDV79r5/k2bVb2b0CLroezmZIz++jBqVSp8nUO2a6S1S7 uwjRaNwrWT9mT3Op5jjHAZzPRFQ5PXs4gw2BgYLDRe9FB9MIhtOTbnvpnPbO1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4pFf5zWfzBs1; Sun, 17 Aug 2025 21:02: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 57HL2UAW085368; Sun, 17 Aug 2025 21:02:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HL2UMi085365; Sun, 17 Aug 2025 21:02:30 GMT (envelope-from git) Date: Sun, 17 Aug 2025 21:02:30 GMT Message-Id: <202508172102.57HL2UMi085365@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: 37e3b6646692 - main - usbhid(4): Implement USB_GET_DEVICEINFO ioctl List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 37e3b664669288dc1775a6f8fb0d84b962fc9c5b Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=37e3b664669288dc1775a6f8fb0d84b962fc9c5b commit 37e3b664669288dc1775a6f8fb0d84b962fc9c5b Author: Vladimir Kondratyev AuthorDate: 2025-08-17 21:00:45 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-08-17 21:00:45 +0000 usbhid(4): Implement USB_GET_DEVICEINFO ioctl With factoring out of supporting code from ugen(4) driver. The ioctl is used in FIDO/U2F security key drivers to get USB product and manufacturer strings. PR: 264843 Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D51609 --- sys/dev/usb/input/usbhid.c | 4 ++++ sys/dev/usb/usb_device.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++ sys/dev/usb/usb_generic.c | 37 +---------------------------------- sys/dev/usb/usbdi.h | 3 +++ 4 files changed, 56 insertions(+), 36 deletions(-) diff --git a/sys/dev/usb/input/usbhid.c b/sys/dev/usb/input/usbhid.c index 255e639621fe..cba3f34053e5 100644 --- a/sys/dev/usb/input/usbhid.c +++ b/sys/dev/usb/input/usbhid.c @@ -707,6 +707,10 @@ usbhid_ioctl(device_t dev, device_t child __unused, unsigned long cmd, if (error == 0) ucr->ucr_actlen = UGETW(req.ctrl.wLength); break; + case USB_GET_DEVICEINFO: + error = usbd_fill_deviceinfo(sc->sc_udev, + (struct usb_device_info *)data); + break; default: error = EINVAL; } diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index 60c2d6745b3f..f0989972f49f 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -3111,3 +3111,51 @@ usbd_get_endpoint_mode(struct usb_device *udev, struct usb_endpoint *ep) { return (ep->ep_mode); } + +/*------------------------------------------------------------------------* + * usbd_fill_deviceinfo + * + * This function dumps information about an USB device to the + * structure pointed to by the "di" argument. + * + * Returns: + * 0: Success + * Else: Failure + *------------------------------------------------------------------------*/ +int +usbd_fill_deviceinfo(struct usb_device *udev, struct usb_device_info *di) +{ + struct usb_device *hub; + + bzero(di, sizeof(di[0])); + + di->udi_bus = device_get_unit(udev->bus->bdev); + di->udi_addr = udev->address; + di->udi_index = udev->device_index; + strlcpy(di->udi_serial, usb_get_serial(udev), sizeof(di->udi_serial)); + strlcpy(di->udi_vendor, usb_get_manufacturer(udev), sizeof(di->udi_vendor)); + strlcpy(di->udi_product, usb_get_product(udev), sizeof(di->udi_product)); + usb_printbcd(di->udi_release, sizeof(di->udi_release), + UGETW(udev->ddesc.bcdDevice)); + di->udi_vendorNo = UGETW(udev->ddesc.idVendor); + di->udi_productNo = UGETW(udev->ddesc.idProduct); + di->udi_releaseNo = UGETW(udev->ddesc.bcdDevice); + di->udi_class = udev->ddesc.bDeviceClass; + di->udi_subclass = udev->ddesc.bDeviceSubClass; + di->udi_protocol = udev->ddesc.bDeviceProtocol; + di->udi_config_no = udev->curr_config_no; + di->udi_config_index = udev->curr_config_index; + di->udi_power = udev->flags.self_powered ? 0 : udev->power; + di->udi_speed = udev->speed; + di->udi_mode = udev->flags.usb_mode; + di->udi_power_mode = udev->power_mode; + di->udi_suspended = udev->flags.peer_suspended; + + hub = udev->parent_hub; + if (hub) { + di->udi_hubaddr = hub->address; + di->udi_hubindex = hub->device_index; + di->udi_hubport = udev->port_no; + } + return (0); +} diff --git a/sys/dev/usb/usb_generic.c b/sys/dev/usb/usb_generic.c index c0af27d77e5d..ccb0b2184ec4 100644 --- a/sys/dev/usb/usb_generic.c +++ b/sys/dev/usb/usb_generic.c @@ -831,42 +831,7 @@ ugen_get_iface_driver(struct usb_fifo *f, struct usb_gen_descriptor *ugd) int ugen_fill_deviceinfo(struct usb_fifo *f, struct usb_device_info *di) { - struct usb_device *udev; - struct usb_device *hub; - - udev = f->udev; - - bzero(di, sizeof(di[0])); - - di->udi_bus = device_get_unit(udev->bus->bdev); - di->udi_addr = udev->address; - di->udi_index = udev->device_index; - strlcpy(di->udi_serial, usb_get_serial(udev), sizeof(di->udi_serial)); - strlcpy(di->udi_vendor, usb_get_manufacturer(udev), sizeof(di->udi_vendor)); - strlcpy(di->udi_product, usb_get_product(udev), sizeof(di->udi_product)); - usb_printbcd(di->udi_release, sizeof(di->udi_release), - UGETW(udev->ddesc.bcdDevice)); - di->udi_vendorNo = UGETW(udev->ddesc.idVendor); - di->udi_productNo = UGETW(udev->ddesc.idProduct); - di->udi_releaseNo = UGETW(udev->ddesc.bcdDevice); - di->udi_class = udev->ddesc.bDeviceClass; - di->udi_subclass = udev->ddesc.bDeviceSubClass; - di->udi_protocol = udev->ddesc.bDeviceProtocol; - di->udi_config_no = udev->curr_config_no; - di->udi_config_index = udev->curr_config_index; - di->udi_power = udev->flags.self_powered ? 0 : udev->power; - di->udi_speed = udev->speed; - di->udi_mode = udev->flags.usb_mode; - di->udi_power_mode = udev->power_mode; - di->udi_suspended = udev->flags.peer_suspended; - - hub = udev->parent_hub; - if (hub) { - di->udi_hubaddr = hub->address; - di->udi_hubindex = hub->device_index; - di->udi_hubport = udev->port_no; - } - return (0); + return (usbd_fill_deviceinfo(f->udev, di)); } int diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index 08d130aa2868..0826d9f078c4 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -38,6 +38,7 @@ struct usb_process; struct usb_proc_msg; struct usb_mbuf; struct usb_fs_privdata; +struct usb_device_info; struct mbuf; typedef enum { /* keep in sync with usb_errstr_table */ @@ -587,6 +588,8 @@ usb_error_t usbd_set_endpoint_mode(struct usb_device *udev, struct usb_endpoint *ep, uint8_t ep_mode); uint8_t usbd_get_endpoint_mode(struct usb_device *udev, struct usb_endpoint *ep); +int usbd_fill_deviceinfo(struct usb_device *udev, + struct usb_device_info *di); const struct usb_device_id *usbd_lookup_id_by_info( const struct usb_device_id *id, usb_size_t sizeof_id, From nobody Sun Aug 17 21:02:29 2025 X-Original-To: dev-commits-src-main@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 4c4pFf40k9z643GX; Sun, 17 Aug 2025 21:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4pFd5mjtz3VBJ; Sun, 17 Aug 2025 21:02:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755464549; 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=aXGb0Re07kPHk+5Ct1J92P4TimmfllXzomtCWNNpxw4=; b=h45SCXEkkENUaSSDPZkBlHd0t4F9ktzpbF+u6l/8HhWu5uiyErrTKyWN3uYcY6X/p/8MNr 6vpgmJHwvDB7BcUwtQIDsz9udFlH9JdL2U8KzpZR7aDYDn8pB90XgUS53JO9wVWuWju3MP uZWSq52j4B0bwGrTAqu6UozLUxo8VPX6aXBwk0Ej/xv1GDaPu1EoHwTUdtAFUeDAj4YcNl yM4Kv4GYExP2Y+bFF2w5gO7Azbi1VbEyYxhlpxomseYg3CRis0UlrP9bkHEEVo6Efvzz5k qFcjSqc2OUN+joeTD/PnQ8zWJMEsR5Y9MeiodKg7JqUX4UbNVqDKOxnS/aFrKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755464549; 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=aXGb0Re07kPHk+5Ct1J92P4TimmfllXzomtCWNNpxw4=; b=sIdGf4PpCKIzCbpZvbhsFXmkdy5UDNFgismKk1if6snzU95PrOfQ17cMt76cqs0VArm9gF jApssYuixZtw4pTxsPAZxkeCENsrY9dBYPhpb1RAUqBOH3YBWfXeQn54ZnRUa1VIKg1EsE TDq/7gvKK1AnYdbDj/Bpo1SeGzxl9uXmZ4TxNsOFDegUHE30drJAWt6F9EGHq9/MNnrsxF j0ehKXdfh5u09FGfWqqGhMjOXfDkIU6V/R7aQT+uIZneU8q90cGe38Trzl79JPwgukfskJ O5Z53299ESunuGzkbPBou6q7MZofmLVSFg/e04Yn0gSNYqC7lXYmCp3wWzSJHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755464549; a=rsa-sha256; cv=none; b=GqYY+mrmUogCbQpyrE/EN0lUdV32vtpLFs0o+zEZqI8pB43WpYLhwFB8pOIZE1ezmsOgPj C5Hkjf/lpIayKSsiYMYG67RK0Who2EC0ckygQJooITNAiZUqGDTfkAQrnoratHQfghOTSI Fu1o3YoOi7bvc3Czvnuh46s7WsmCxIDDOQo8l96UV4PqWGZeatCNansn9i98XfYfTj7cqW nc+heYg/FN2jpkXSZXpZ/1PV9fOnl/kn6talZlViy9K2S5oNKjf52/XTwYcevYtFRz+2DR TSzET2odDmHfeH2/YV9ZzgJ2DvXdvIB4sCyCvXPq8XlaAavm3mnDmdZokn7mrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4pFd5Jx6zBbT; Sun, 17 Aug 2025 21:02: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 57HL2TxR085335; Sun, 17 Aug 2025 21:02:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HL2Te0085332; Sun, 17 Aug 2025 21:02:29 GMT (envelope-from git) Date: Sun, 17 Aug 2025 21:02:29 GMT Message-Id: <202508172102.57HL2Te0085332@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: 149b9f26d0ba - main - hidraw(4): Rename to uhid if HIDRAW_MAKE_UHID_ALIAS is specified List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 149b9f26d0bab5864f484b52066f9b0ffb06939c Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=149b9f26d0bab5864f484b52066f9b0ffb06939c commit 149b9f26d0bab5864f484b52066f9b0ffb06939c Author: Vladimir Kondratyev AuthorDate: 2025-08-17 21:00:44 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-08-17 21:00:44 +0000 hidraw(4): Rename to uhid if HIDRAW_MAKE_UHID_ALIAS is specified instead of renaming uhid(4) to hidraw to make easier import of coming u2f(4) driver which has similar option. Differential Revision: https://reviews.freebsd.org/D51608 --- sys/dev/hid/hidraw.c | 12 +++++++++--- sys/dev/usb/input/uhid.c | 6 ------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/dev/hid/hidraw.c b/sys/dev/hid/hidraw.c index 06f70070f61b..4855843cd265 100644 --- a/sys/dev/hid/hidraw.c +++ b/sys/dev/hid/hidraw.c @@ -85,6 +85,12 @@ SYSCTL_INT(_hw_hid_hidraw, OID_AUTO, debug, CTLFLAG_RWTUN, free((buf), M_DEVBUF); \ } +#ifdef HIDRAW_MAKE_UHID_ALIAS +#define HIDRAW_NAME "uhid" +#else +#define HIDRAW_NAME "hidraw" +#endif + struct hidraw_softc { device_t sc_dev; /* base device */ @@ -183,8 +189,8 @@ hidraw_identify(driver_t *driver, device_t parent) { device_t child; - if (device_find_child(parent, "hidraw", DEVICE_UNIT_ANY) == NULL) { - child = BUS_ADD_CHILD(parent, 0, "hidraw", + if (device_find_child(parent, HIDRAW_NAME, DEVICE_UNIT_ANY) == NULL) { + child = BUS_ADD_CHILD(parent, 0, HIDRAW_NAME, device_get_unit(parent)); if (child != NULL) hidbus_set_index(child, HIDRAW_INDEX); @@ -1050,7 +1056,7 @@ static device_method_t hidraw_methods[] = { }; static driver_t hidraw_driver = { - "hidraw", + HIDRAW_NAME, hidraw_methods, sizeof(struct hidraw_softc) }; diff --git a/sys/dev/usb/input/uhid.c b/sys/dev/usb/input/uhid.c index a31081663f0c..e2b97f5accac 100644 --- a/sys/dev/usb/input/uhid.c +++ b/sys/dev/usb/input/uhid.c @@ -40,8 +40,6 @@ * HID spec: http://www.usb.org/developers/devclass_docs/HID1_11.pdf */ -#include "opt_hid.h" - #include #include #include @@ -928,11 +926,7 @@ static device_method_t uhid_methods[] = { }; static driver_t uhid_driver = { -#ifdef HIDRAW_MAKE_UHID_ALIAS - .name = "hidraw", -#else .name = "uhid", -#endif .methods = uhid_methods, .size = sizeof(struct uhid_softc), }; From nobody Sun Aug 17 21:02:31 2025 X-Original-To: dev-commits-src-main@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 4c4pFh3KJPz642x3; Sun, 17 Aug 2025 21:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4pFh0Pqsz3VTD; Sun, 17 Aug 2025 21:02:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755464552; 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=nMx3sGSZ/iqIQGeKFcm5YYJCB9C7MxQgSVsiQPSbsZ4=; b=vxZtDQwWVB6yVnjlkhZbugA7UUxzM+wnVBNN5mEIxNegnn5Agh7kdtfu4z/Fg5eDVAmmYX 4c5s6llkgXHclbJt47d+oZsQiP1s5/eOZQ9n42oWQcQFyf+ZutHPT+OzJ8XFEPBK/SpSzp j5Ow2uqaMVYsSiQePDKfjSiGNFuDnOUVOhA70Rvanl06kj/u42HbuQmkQJaD0hbJkyCoR7 hCLrhkFn19z7twS1uFZ8iZLRjk3qQVAP+S7gh9B1jNZL+oFhuBsU/ZMt2wv0PC+QBOahg9 J9eFp2LR+272Ly0fn0D3naDQ5AxZY1DiWctVvLLnbM6fOufG93LvKBal2OjD8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755464552; 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=nMx3sGSZ/iqIQGeKFcm5YYJCB9C7MxQgSVsiQPSbsZ4=; b=AqCqCkrqJ2cADKaEwR17jbllpOKLDriUE7dMaIAcmC3HKbnGD/snhrGtxVqreXKyhcqs2Z nqTPCUv7PzZ4g0BIradJPd3nNzgblfoM//q6DkMQevN3dKVowf2ffg1TQLs6tU5xc4afYw sBw+eDVI7fEkAEypAh/1Vs5mBfwhXdrEMWguPdWMDaVt0Og4/Kc4n5GBw/GMvJmehxyH60 9rxxuKO45lrUgJSJkwMCIjKLhJ0tyeXykfo+cyzWsQjt0L7sEfbe5dcUmgvTp0IH1ZnB83 n2shUmQS3O5vosl73Atfvo23V/D2unQSuXY6KpdejihlAuvsSzx7Fmm0h1nDdQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755464552; a=rsa-sha256; cv=none; b=kRgugA6LlQsXeSSmlnc1115JL/KXJbjC9ZP7HOVZct+lQH833U1eekVa4NDhBNGuuY8acm QCshXCnPZhpcPlrPeobmh5IFPwvo0HT1/b0MyJGF8je7ss43UHC6x9J1HmTuh5+dT7zvNn 8GeWEMkskY54oa0I002Z5sm9CW5M363KsIZTN2lGd47Ly5Q+6dB7BRLQ5MwT++9FbEhjr1 mPGDcsDbhMFIVDXqYPTnYl0bxwpzlwqvG1oOOdSeMNlSUveRJt+tQgxXZ4EEIiHNyPQ/TU CLjmOeI2kpnf+Qkkqh9BrA5mDeus9cI6yNpEKqnFp0rTXdZ1wxxeCpCdXTIt8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4pFg75J3zBbV; Sun, 17 Aug 2025 21:02: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 57HL2V9r085402; Sun, 17 Aug 2025 21:02:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HL2VYG085399; Sun, 17 Aug 2025 21:02:31 GMT (envelope-from git) Date: Sun, 17 Aug 2025 21:02:31 GMT Message-Id: <202508172102.57HL2VYG085399@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: 4a04e0a6c703 - main - u2f(4): a HID driver for FIDO/U2F security keys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 4a04e0a6c703db9d2d9e6a0ef2b000644143b705 Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=4a04e0a6c703db9d2d9e6a0ef2b000644143b705 commit 4a04e0a6c703db9d2d9e6a0ef2b000644143b705 Author: Vladimir Kondratyev AuthorDate: 2025-08-17 21:00:45 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-08-17 21:00:45 +0000 u2f(4): a HID driver for FIDO/U2F security keys While FIDO/U2F keys were already supported by the generic uhid(4) and hidraw(4) drivers, this driver adds some additional features an does steps to tighten the security of FIDO/U2F access. - It automatically loads through devd. - Automatically enables HQ_NO_READAHEAD for FIDO/U2F devices. - Implements only miminum set of features. - Do not requires external devfs configuration to set character device permissions. - Names character device as u2f/# to make possible capsicum or any other pledge()-style sandboxing. PR: 265528 Differential Revision: https://reviews.freebsd.org/D51612 --- share/man/man4/Makefile | 1 + share/man/man4/u2f.4 | 93 +++++++ sys/amd64/conf/GENERIC | 1 + sys/arm/conf/GENERIC | 1 + sys/arm64/conf/std.dev | 1 + sys/conf/NOTES | 2 + sys/conf/files | 1 + sys/conf/options | 1 + sys/dev/hid/u2f.c | 590 +++++++++++++++++++++++++++++++++++++++++++ sys/i386/conf/GENERIC | 1 + sys/modules/hid/Makefile | 1 + sys/modules/hid/u2f/Makefile | 8 + sys/powerpc/conf/GENERIC64 | 1 + sys/powerpc/conf/GENERIC64LE | 1 + sys/riscv/conf/GENERIC | 1 + 15 files changed, 704 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index f93610631bb3..519b113b0a2e 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -594,6 +594,7 @@ MAN= aac.4 \ tty.4 \ tun.4 \ tws.4 \ + u2f.4 \ udp.4 \ udplite.4 \ ${_ufshci.4} \ diff --git a/share/man/man4/u2f.4 b/share/man/man4/u2f.4 new file mode 100644 index 000000000000..7f0e076028db --- /dev/null +++ b/share/man/man4/u2f.4 @@ -0,0 +1,93 @@ +.\" $OpenBSD: fido.4,v 1.4 2020/08/21 19:02:46 mglocker Exp $ +.\" +.\" Copyright (c) 2019 Reyk Floeter +.\" Copyright (c) 2023 Vladimir Kondratyev +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd August 21, 2023 +.Dt U2F 4 +.Os +.Sh NAME +.Nm u2f +.Nd FIDO/U2F security keys +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device u2f" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +u2f_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for FIDO/U2F-compatible USB security keys. +They are Human Interface Devices (HID) which can be accessed via the +.Pa /dev/u2f/N +interface. +.Pp +The driver is compatible with the +.Xr read 2 , +.Xr write 2 , +and +.Xr ioctl 2 +operations of the generic +.Xr uhid 4 +device but only accepts the optional HID +.Xr ioctl 2 +calls from u2f group users. +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width indent +.It Va hw.hid.u2f.debug +Debug output level, where 0 is debugging disabled and larger values increase +debug message verbosity. +Default is 0. +.El +.Sh FILES +.Bl -tag -width /dev/u2f/* -compact +.It Pa /dev/u2f/* +.El +.Sh SEE ALSO +.Xr uhid 4 , +.Xr usbhid 4 , +.Xr usb 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 15.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Vladimir Kondratyev Aq Mt wulf@FreeBSD.org . +.Pp +This manual page was written by +.An Vladimir Kondratyev Aq Mt wulf@FreeBSD.org +based on the +.Ox +.Xr fido 4 +manual page. diff --git a/sys/amd64/conf/GENERIC b/sys/amd64/conf/GENERIC index 33f1630d4baa..81427b5b18b6 100644 --- a/sys/amd64/conf/GENERIC +++ b/sys/amd64/conf/GENERIC @@ -386,6 +386,7 @@ options HID_DEBUG # enable debug msgs device hid # Generic HID support device hidbus # Generic HID Bus options IICHID_SAMPLING # Workaround missing GPIO INTR support +options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/ # EFI devices device efidev # EFI pseudo-device diff --git a/sys/arm/conf/GENERIC b/sys/arm/conf/GENERIC index 7394f3842d43..26b0c7bf0294 100644 --- a/sys/arm/conf/GENERIC +++ b/sys/arm/conf/GENERIC @@ -261,6 +261,7 @@ device aw_thermal # Allwinner Thermal Sensor Controller # HID support device hid # Generic HID support device hidbus # Generic HID Bus +options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/ # Flattened Device Tree options FDT # Configure using FDT/DTB data diff --git a/sys/arm64/conf/std.dev b/sys/arm64/conf/std.dev index c5c364ffda04..719f272426dd 100644 --- a/sys/arm64/conf/std.dev +++ b/sys/arm64/conf/std.dev @@ -115,6 +115,7 @@ device mmcsd # mmc/sd flash cards options HID_DEBUG # enable debug msgs device hid # Generic HID support device hidbus # Generic HID Bus +options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/ # Firmware device mmio_sram # Generic on-chip SRAM diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 2458756ae350..1338f47199a9 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2446,6 +2446,8 @@ device hmt # HID multitouch (MS-compatible) device hpen # Generic pen driver device hsctrl # System controls device ps4dshock # Sony PS4 DualShock 4 gamepad driver +device u2f # FIDO/U2F authenticator +options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/ device xb360gp # XBox 360 gamepad driver ##################################################################### diff --git a/sys/conf/files b/sys/conf/files index be65ed20d6aa..35318dbc8367 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1750,6 +1750,7 @@ dev/hid/hpen.c optional hpen dev/hid/hsctrl.c optional hsctrl dev/hid/ietp.c optional ietp dev/hid/ps4dshock.c optional ps4dshock +dev/hid/u2f.c optional u2f dev/hid/xb360gp.c optional xb360gp dev/hifn/hifn7751.c optional hifn dev/hptiop/hptiop.c optional hptiop scbus diff --git a/sys/conf/options b/sys/conf/options index a637b0b74a77..bb3d08e88e21 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -1009,6 +1009,7 @@ IICHID_DEBUG opt_hid.h IICHID_SAMPLING opt_hid.h HKBD_DFLT_KEYMAP opt_hkbd.h HIDRAW_MAKE_UHID_ALIAS opt_hid.h +U2F_MAKE_UHID_ALIAS opt_hid.h # kenv options # The early kernel environment (loader environment, config(8)-provided static) diff --git a/sys/dev/hid/u2f.c b/sys/dev/hid/u2f.c new file mode 100644 index 000000000000..ac2eba7a499d --- /dev/null +++ b/sys/dev/hid/u2f.c @@ -0,0 +1,590 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2022-2023 Vladimir Kondratyev + * + * 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 "opt_hid.h" + +#include +#ifdef COMPAT_FREEBSD32 +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define HID_DEBUG_VAR u2f_debug +#include +#include +#include + +#include + +#ifdef HID_DEBUG +static int u2f_debug = 0; +static SYSCTL_NODE(_hw_hid, OID_AUTO, u2f, CTLFLAG_RW, 0, + "FIDO/U2F authenticator"); +SYSCTL_INT(_hw_hid_u2f, OID_AUTO, debug, CTLFLAG_RWTUN, + &u2f_debug, 0, "Debug level"); +#endif + +#define U2F_MAX_REPORT_SIZE 64 + +/* A match on these entries will load u2f */ +static const struct hid_device_id u2f_devs[] = { + { HID_BUS(BUS_USB), HID_TLC(HUP_FIDO, HUF_U2FHID) }, +}; + +struct u2f_softc { + device_t sc_dev; /* base device */ + struct cdev *dev; + + struct mtx sc_mtx; /* hidbus private mutex */ + void *sc_rdesc; + hid_size_t sc_rdesc_size; + hid_size_t sc_isize; + hid_size_t sc_osize; + struct selinfo sc_rsel; + struct { /* driver state */ + bool open:1; /* device is open */ + bool aslp:1; /* waiting for device data in read() */ + bool sel:1; /* waiting for device data in poll() */ + bool data:1; /* input report is stored in sc_buf */ + int reserved:28; + } sc_state; + int sc_fflags; /* access mode for open lifetime */ + + uint8_t sc_buf[U2F_MAX_REPORT_SIZE]; +}; + +static d_open_t u2f_open; +static d_read_t u2f_read; +static d_write_t u2f_write; +static d_ioctl_t u2f_ioctl; +static d_poll_t u2f_poll; +static d_kqfilter_t u2f_kqfilter; + +static d_priv_dtor_t u2f_dtor; + +static struct cdevsw u2f_cdevsw = { + .d_version = D_VERSION, + .d_open = u2f_open, + .d_read = u2f_read, + .d_write = u2f_write, + .d_ioctl = u2f_ioctl, + .d_poll = u2f_poll, + .d_kqfilter = u2f_kqfilter, + .d_name = "u2f", +}; + +static hid_intr_t u2f_intr; + +static device_probe_t u2f_probe; +static device_attach_t u2f_attach; +static device_detach_t u2f_detach; + +static int u2f_kqread(struct knote *, long); +static void u2f_kqdetach(struct knote *); +static void u2f_notify(struct u2f_softc *); + +static struct filterops u2f_filterops_read = { + .f_isfd = 1, + .f_detach = u2f_kqdetach, + .f_event = u2f_kqread, +}; + +static int +u2f_probe(device_t dev) +{ + int error; + + error = HIDBUS_LOOKUP_DRIVER_INFO(dev, u2f_devs); + if (error != 0) + return (error); + + hidbus_set_desc(dev, "Authenticator"); + + return (BUS_PROBE_GENERIC); +} + +static int +u2f_attach(device_t dev) +{ + struct u2f_softc *sc = device_get_softc(dev); + struct hid_device_info *hw = __DECONST(struct hid_device_info *, + hid_get_device_info(dev)); + struct make_dev_args mda; + int error; + + sc->sc_dev = dev; + + error = hid_get_report_descr(dev, &sc->sc_rdesc, &sc->sc_rdesc_size); + if (error != 0) + return (ENXIO); + sc->sc_isize = hid_report_size_max(sc->sc_rdesc, sc->sc_rdesc_size, + hid_input, NULL); + if (sc->sc_isize > U2F_MAX_REPORT_SIZE) { + device_printf(dev, "Input report size too large. Truncate.\n"); + sc->sc_isize = U2F_MAX_REPORT_SIZE; + } + sc->sc_osize = hid_report_size_max(sc->sc_rdesc, sc->sc_rdesc_size, + hid_output, NULL); + if (sc->sc_osize > U2F_MAX_REPORT_SIZE) { + device_printf(dev, "Output report size too large. Truncate.\n"); + sc->sc_osize = U2F_MAX_REPORT_SIZE; + } + + mtx_init(&sc->sc_mtx, "u2f lock", NULL, MTX_DEF); + knlist_init_mtx(&sc->sc_rsel.si_note, &sc->sc_mtx); + + make_dev_args_init(&mda); + mda.mda_flags = MAKEDEV_WAITOK; + mda.mda_devsw = &u2f_cdevsw; + mda.mda_uid = UID_ROOT; + mda.mda_gid = GID_U2F; + mda.mda_mode = 0660; + mda.mda_si_drv1 = sc; + + error = make_dev_s(&mda, &sc->dev, "u2f/%d", device_get_unit(dev)); + if (error) { + device_printf(dev, "Can not create character device\n"); + u2f_detach(dev); + return (error); + } +#ifdef U2F_MAKE_UHID_ALIAS + (void)make_dev_alias(sc->dev, "uhid%d", device_get_unit(dev)); +#endif + + hid_add_dynamic_quirk(hw, HQ_NO_READAHEAD); + + hidbus_set_lock(dev, &sc->sc_mtx); + hidbus_set_intr(dev, u2f_intr, sc); + + return (0); +} + +static int +u2f_detach(device_t dev) +{ + struct u2f_softc *sc = device_get_softc(dev); + + DPRINTF("sc=%p\n", sc); + + if (sc->dev != NULL) { + mtx_lock(&sc->sc_mtx); + sc->dev->si_drv1 = NULL; + /* Wake everyone */ + u2f_notify(sc); + mtx_unlock(&sc->sc_mtx); + destroy_dev(sc->dev); + } + + hid_intr_stop(sc->sc_dev); + + knlist_clear(&sc->sc_rsel.si_note, 0); + knlist_destroy(&sc->sc_rsel.si_note); + seldrain(&sc->sc_rsel); + mtx_destroy(&sc->sc_mtx); + + return (0); +} + +void +u2f_intr(void *context, void *buf, hid_size_t len) +{ + struct u2f_softc *sc = context; + + mtx_assert(&sc->sc_mtx, MA_OWNED); + + DPRINTFN(5, "len=%d\n", len); + DPRINTFN(5, "data = %*D\n", len, buf, " "); + + if (sc->sc_state.data) + return; + + if (len > sc->sc_isize) + len = sc->sc_isize; + + bcopy(buf, sc->sc_buf, len); + + /* Make sure we don't process old data */ + if (len < sc->sc_isize) + bzero(sc->sc_buf + len, sc->sc_isize - len); + + sc->sc_state.data = true; + + u2f_notify(sc); +} + +static int +u2f_open(struct cdev *dev, int flag, int mode, struct thread *td) +{ + struct u2f_softc *sc = dev->si_drv1; + int error; + + if (sc == NULL) + return (ENXIO); + + DPRINTF("sc=%p\n", sc); + + mtx_lock(&sc->sc_mtx); + if (sc->sc_state.open) { + mtx_unlock(&sc->sc_mtx); + return (EBUSY); + } + sc->sc_state.open = true; + mtx_unlock(&sc->sc_mtx); + + error = devfs_set_cdevpriv(sc, u2f_dtor); + if (error != 0) { + mtx_lock(&sc->sc_mtx); + sc->sc_state.open = false; + mtx_unlock(&sc->sc_mtx); + return (error); + } + + /* Set up interrupt pipe. */ + sc->sc_state.data = false; + sc->sc_fflags = flag; + + return (0); +} + + +static void +u2f_dtor(void *data) +{ + struct u2f_softc *sc = data; + +#ifdef NOT_YET + /* Disable interrupts. */ + hid_intr_stop(sc->sc_dev); +#endif + + mtx_lock(&sc->sc_mtx); + sc->sc_state.open = false; + mtx_unlock(&sc->sc_mtx); +} + +static int +u2f_read(struct cdev *dev, struct uio *uio, int flag) +{ + uint8_t buf[U2F_MAX_REPORT_SIZE]; + struct u2f_softc *sc = dev->si_drv1; + size_t length = 0; + int error; + + DPRINTFN(1, "\n"); + + if (sc == NULL) + return (EIO); + + if (!sc->sc_state.data) + hid_intr_start(sc->sc_dev); + + mtx_lock(&sc->sc_mtx); + if (dev->si_drv1 == NULL) { + error = EIO; + goto exit; + } + + while (!sc->sc_state.data) { + if (flag & O_NONBLOCK) { + error = EWOULDBLOCK; + goto exit; + } + sc->sc_state.aslp = true; + DPRINTFN(5, "sleep on %p\n", &sc->sc_buf); + error = mtx_sleep(&sc->sc_buf, &sc->sc_mtx, PZERO | PCATCH, + "u2frd", 0); + DPRINTFN(5, "woke, error=%d\n", error); + if (dev->si_drv1 == NULL) + error = EIO; + if (error) { + sc->sc_state.aslp = false; + goto exit; + } + } + + if (sc->sc_state.data && uio->uio_resid > 0) { + length = min(uio->uio_resid, sc->sc_isize); + memcpy(buf, sc->sc_buf, length); + sc->sc_state.data = false; + } +exit: + mtx_unlock(&sc->sc_mtx); + if (length != 0) { + /* Copy the data to the user process. */ + DPRINTFN(5, "got %lu chars\n", (u_long)length); + error = uiomove(buf, length, uio); + } + + return (error); +} + +static int +u2f_write(struct cdev *dev, struct uio *uio, int flag) +{ + uint8_t buf[U2F_MAX_REPORT_SIZE]; + struct u2f_softc *sc = dev->si_drv1; + int error; + + DPRINTFN(1, "\n"); + + if (sc == NULL) + return (EIO); + + if (uio->uio_resid != sc->sc_osize) + return (EINVAL); + error = uiomove(buf, uio->uio_resid, uio); + if (error == 0) + error = hid_write(sc->sc_dev, buf, sc->sc_osize); + + return (error); +} + +#ifdef COMPAT_FREEBSD32 +static void +update_ugd32(const struct usb_gen_descriptor *ugd, + struct usb_gen_descriptor32 *ugd32) +{ + /* Don't update hgd_data pointer */ + CP(*ugd, *ugd32, ugd_lang_id); + CP(*ugd, *ugd32, ugd_maxlen); + CP(*ugd, *ugd32, ugd_actlen); + CP(*ugd, *ugd32, ugd_offset); + CP(*ugd, *ugd32, ugd_config_index); + CP(*ugd, *ugd32, ugd_string_index); + CP(*ugd, *ugd32, ugd_iface_index); + CP(*ugd, *ugd32, ugd_altif_index); + CP(*ugd, *ugd32, ugd_endpt_index); + CP(*ugd, *ugd32, ugd_report_type); + /* Don't update reserved */ +} +#endif + +static int +u2f_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, + struct thread *td) +{ +#ifdef COMPAT_FREEBSD32 + struct usb_gen_descriptor local_ugd; + struct usb_gen_descriptor32 *ugd32 = NULL; +#endif + struct u2f_softc *sc = dev->si_drv1; + struct usb_gen_descriptor *ugd = (struct usb_gen_descriptor *)addr; + uint32_t size; + + DPRINTFN(2, "cmd=%lx\n", cmd); + + if (sc == NULL) + return (EIO); + +#ifdef COMPAT_FREEBSD32 + switch (cmd) { + case USB_GET_REPORT_DESC32: + cmd = _IOC_NEWTYPE(cmd, struct usb_gen_descriptor); + ugd32 = (struct usb_gen_descriptor32 *)addr; + ugd = &local_ugd; + PTRIN_CP(*ugd32, *ugd, ugd_data); + CP(*ugd32, *ugd, ugd_lang_id); + CP(*ugd32, *ugd, ugd_maxlen); + CP(*ugd32, *ugd, ugd_actlen); + CP(*ugd32, *ugd, ugd_offset); + CP(*ugd32, *ugd, ugd_config_index); + CP(*ugd32, *ugd, ugd_string_index); + CP(*ugd32, *ugd, ugd_iface_index); + CP(*ugd32, *ugd, ugd_altif_index); + CP(*ugd32, *ugd, ugd_endpt_index); + CP(*ugd32, *ugd, ugd_report_type); + /* Don't copy reserved */ + break; + } +#endif + + /* fixed-length ioctls handling */ + switch (cmd) { + case FIONBIO: + /* All handled in the upper FS layer. */ + return (0); + + case USB_GET_REPORT_DESC: + size = MIN(sc->sc_rdesc_size, ugd->ugd_maxlen); + ugd->ugd_actlen = size; +#ifdef COMPAT_FREEBSD32 + if (ugd32 != NULL) + update_ugd32(ugd, ugd32); +#endif + if (ugd->ugd_data == NULL) + return (0); /* descriptor length only */ + + return (copyout(sc->sc_rdesc, ugd->ugd_data, size)); + + case USB_GET_DEVICEINFO: + return(hid_ioctl( + sc->sc_dev, USB_GET_DEVICEINFO, (uintptr_t)addr)); + } + + return (EINVAL); +} + +static int +u2f_poll(struct cdev *dev, int events, struct thread *td) +{ + struct u2f_softc *sc = dev->si_drv1; + int revents = 0; + bool start_intr = false; + + if (sc == NULL) + return (POLLHUP); + + if (events & (POLLOUT | POLLWRNORM) && (sc->sc_fflags & FWRITE)) + revents |= events & (POLLOUT | POLLWRNORM); + if (events & (POLLIN | POLLRDNORM) && (sc->sc_fflags & FREAD)) { + mtx_lock(&sc->sc_mtx); + if (sc->sc_state.data) + revents |= events & (POLLIN | POLLRDNORM); + else { + sc->sc_state.sel = true; + start_intr = true; + selrecord(td, &sc->sc_rsel); + } + mtx_unlock(&sc->sc_mtx); + if (start_intr) + hid_intr_start(sc->sc_dev); + } + + return (revents); +} + +static int +u2f_kqfilter(struct cdev *dev, struct knote *kn) +{ + struct u2f_softc *sc = dev->si_drv1; + + if (sc == NULL) + return (ENXIO); + + switch(kn->kn_filter) { + case EVFILT_READ: + if (sc->sc_fflags & FREAD) { + kn->kn_fop = &u2f_filterops_read; + break; + } + /* FALLTHROUGH */ + default: + return(EINVAL); + } + kn->kn_hook = sc; + + knlist_add(&sc->sc_rsel.si_note, kn, 0); + return (0); +} + +static int +u2f_kqread(struct knote *kn, long hint) +{ + struct u2f_softc *sc = kn->kn_hook; + int ret; + + mtx_assert(&sc->sc_mtx, MA_OWNED); + + if (sc->dev->si_drv1 == NULL) { + kn->kn_flags |= EV_EOF; + ret = 1; + } else { + ret = sc->sc_state.data ? 1 : 0; + if (!sc->sc_state.data) + hid_intr_start(sc->sc_dev); + } + + return (ret); +} + +static void +u2f_kqdetach(struct knote *kn) +{ + struct u2f_softc *sc = kn->kn_hook; + + knlist_remove(&sc->sc_rsel.si_note, kn, 0); +} + +static void +u2f_notify(struct u2f_softc *sc) +{ + mtx_assert(&sc->sc_mtx, MA_OWNED); + + if (sc->sc_state.aslp) { + sc->sc_state.aslp = false; + DPRINTFN(5, "waking %p\n", &sc->sc_buf); + wakeup(&sc->sc_buf); + } + if (sc->sc_state.sel) { + sc->sc_state.sel = false; + selwakeuppri(&sc->sc_rsel, PZERO); + } + KNOTE_LOCKED(&sc->sc_rsel.si_note, 0); +} + +static device_method_t u2f_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, u2f_probe), + DEVMETHOD(device_attach, u2f_attach), + DEVMETHOD(device_detach, u2f_detach), + + DEVMETHOD_END +}; + +static driver_t u2f_driver = { +#ifdef U2F_MAKE_UHID_ALIAS + "uhid", +#else + "u2f", +#endif + u2f_methods, + sizeof(struct u2f_softc) +}; + +DRIVER_MODULE(u2f, hidbus, u2f_driver, NULL, NULL); +MODULE_DEPEND(u2f, hidbus, 1, 1, 1); +MODULE_DEPEND(u2f, hid, 1, 1, 1); +MODULE_VERSION(u2f, 1); +HID_PNP_INFO(u2f_devs); diff --git a/sys/i386/conf/GENERIC b/sys/i386/conf/GENERIC index f577cd07ac7c..88b8967cd693 100644 --- a/sys/i386/conf/GENERIC +++ b/sys/i386/conf/GENERIC @@ -343,3 +343,4 @@ options HID_DEBUG # enable debug msgs device hid # Generic HID support device hidbus # Generic HID Bus options IICHID_SAMPLING # Workaround missing GPIO INTR support +options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/ diff --git a/sys/modules/hid/Makefile b/sys/modules/hid/Makefile index 56c3267d8684..10720570deb7 100644 --- a/sys/modules/hid/Makefile +++ b/sys/modules/hid/Makefile @@ -17,6 +17,7 @@ SUBDIR += \ hsctrl \ ietp \ ps4dshock \ + u2f \ xb360gp .include diff --git a/sys/modules/hid/u2f/Makefile b/sys/modules/hid/u2f/Makefile new file mode 100644 index 000000000000..227e7154035b --- /dev/null +++ b/sys/modules/hid/u2f/Makefile @@ -0,0 +1,8 @@ +.PATH: ${SRCTOP}/sys/dev/hid + +KMOD= u2f +SRCS= u2f.c +SRCS+= opt_hid.h opt_usb.h +SRCS+= bus_if.h device_if.h + +.include diff --git a/sys/powerpc/conf/GENERIC64 b/sys/powerpc/conf/GENERIC64 index 85711c8fc3ff..630c88b97dd7 100644 --- a/sys/powerpc/conf/GENERIC64 +++ b/sys/powerpc/conf/GENERIC64 @@ -293,3 +293,4 @@ device virtio_balloon # VirtIO Memory Balloon device options HID_DEBUG # enable debug msgs device hid # Generic HID support device hidbus # Generic HID Bus +options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/ diff --git a/sys/powerpc/conf/GENERIC64LE b/sys/powerpc/conf/GENERIC64LE index a56feb6574a4..eb9a9441425d 100644 --- a/sys/powerpc/conf/GENERIC64LE +++ b/sys/powerpc/conf/GENERIC64LE @@ -274,3 +274,4 @@ device virtio_balloon # VirtIO Memory Balloon device options HID_DEBUG # enable debug msgs device hid # Generic HID support device hidbus # Generic HID Bus +options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/ diff --git a/sys/riscv/conf/GENERIC b/sys/riscv/conf/GENERIC index a8500fe80019..2ff711e80127 100644 --- a/sys/riscv/conf/GENERIC +++ b/sys/riscv/conf/GENERIC @@ -132,6 +132,7 @@ device umass # Disks/Mass storage - Requires scbus and da options HID_DEBUG # enable debug msgs device hid # Generic HID support device hidbus # Generic HID Bus +options U2F_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/u2f/ # Serial (COM) ports device uart # Generic UART driver From nobody Sun Aug 17 21:02:33 2025 X-Original-To: dev-commits-src-main@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 4c4pFj4kmWz64334; Sun, 17 Aug 2025 21:02:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4pFj10FFz3VWJ; Sun, 17 Aug 2025 21:02:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755464553; 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=cbEMwTa0OlZ53xlBya2Kx4lu5d1TvwuqLSXFqPPyS48=; b=Z9vVqqgfXBToi70q52mYk3PQXhC9vZzNko/vSbwLIjyHpG3c5zzK5bEbGUotC2xBZbjimz tFtcJYZZbJWkczaf+Vtfm/ki4UuIO349zoVEvCUJNBCE7PLCYECBiu1mZoAUip5m2zxulw xssrPB7NVn/nl9bTeM80T9czG3IaVzMJ3n+tuM7UPdIYEiwSEHsWMYW14WWh3sADpYWvIp F/nIgIs+2p9fcYpoTJ0i84sm8JrGLZRRcUvr2yAngfz0vB0kg26FeYtc/z+YByuMZra6GT iZvfYTL4qFn7CJyqbnvyIIa/pgQf3lWTrOKUV2NmV608rHdl95E7bXNHl8G4ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755464553; 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=cbEMwTa0OlZ53xlBya2Kx4lu5d1TvwuqLSXFqPPyS48=; b=U/OkovqJ7hbBrnLy7OJFU0+Oh+wWMInXcazoYGX16cGZycvOrU4HCFgNMaMrlAm39PBts6 kXnPwO6BYqGo7lN5R7AP75WdlEKmmet1SO4i4PkgwqQ4XRhWCJzb8+9bkKPvNh2Tlku68+ 1d78nGQ4jD4Dpe4voAn+o4+yMfYlCQ5exrhOfY6n0yuUXCNUhKBdZ0CBS02vQWokAa90kM nY+DEl7FDrDbjtL+3vl97Lk3wbdpu3I5+hAYX1fIHDKFbJHleC/v6vVx+ieEnLhZmbCqN5 uNH7WnccQO+jVIxAluCbku2KTkTUUkBqPEte5Qo334ILKS1MamvzyQZ4IjjJcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755464553; a=rsa-sha256; cv=none; b=au0fbqz8LPFO4/69jz1FEuw+QGHS1FpHSFpK8vcqKfDBrIItn5LONT5nDRGmeWVtyBTdSs hulO/cCpqhuogvsfsrO1QZ26oe0cFSUpenVEBhoQPMyyVFn4KtuzfHqBp5dUyyBQOEDtpJ mUhn7nMi8JnjS41NpQhEc1VRUarcEr7//97gWMwq+UGREP6cKOA/6fNd6DUfBTPwbCpucn N742oxGmyOgKNE5BoBB20quEB5BcTifz4ct+524Hh0CTNbwK8cH8aTnmJml3dHXt/JUwz4 HpvksjOHZbVenXLxzHLFNPv0Kvl64KQLVEzofsT4dFdC6BOYLvWkoXaQqLDyZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4pFj0ZphzBPP; Sun, 17 Aug 2025 21:02:33 +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 57HL2Xn5085438; Sun, 17 Aug 2025 21:02:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HL2X3h085435; Sun, 17 Aug 2025 21:02:33 GMT (envelope-from git) Date: Sun, 17 Aug 2025 21:02:33 GMT Message-Id: <202508172102.57HL2X3h085435@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: e06d0350ec42 - main - NOTES: improve HIDRAW_MAKE_UHID_ALIAS description List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: e06d0350ec4231aba6c4ad7a091192b8d624931b Auto-Submitted: auto-generated The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=e06d0350ec4231aba6c4ad7a091192b8d624931b commit e06d0350ec4231aba6c4ad7a091192b8d624931b Author: Vladimir Kondratyev AuthorDate: 2025-08-17 21:00:45 +0000 Commit: Vladimir Kondratyev CommitDate: 2025-08-17 21:00:45 +0000 NOTES: improve HIDRAW_MAKE_UHID_ALIAS description Reviewed by: aokblast Differential Revision: https://reviews.freebsd.org/D51611 --- sys/conf/NOTES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/NOTES b/sys/conf/NOTES index 1338f47199a9..92e98aa57ebf 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -2436,7 +2436,7 @@ options HID_DEBUG # enable debug msgs device hidbus # HID bus device hidmap # HID to evdev mapping device hidraw # Raw access driver -options HIDRAW_MAKE_UHID_ALIAS # install /dev/uhid alias +options HIDRAW_MAKE_UHID_ALIAS # install /dev/uhid alias for /dev/hidraw device hconf # Multitouch configuration TLC device hcons # Consumer controls device hgame # Generic game controllers From nobody Sun Aug 17 21:17:30 2025 X-Original-To: dev-commits-src-main@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 4c4pZy3PRPz643XS; Sun, 17 Aug 2025 21:17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4pZy2hsrz3Yr8; Sun, 17 Aug 2025 21:17:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755465450; 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=JpwFfR+W1UFlQVU3wwYfpoQxtu2VMYKySC2tRvnn+rE=; b=P3Al65lvlufoi3gDf+wQRIdJtgu6fctqToCZ3BDzwxQK+GD21uXcCLvhVfXtawsAyfrdf2 WFiZmoGoFivxEw7103Hwlk0dc6//5gMHzzi6RvYATlK2NH85Z3sphL2v08YAgZ/JLHWoRw h83EX5R/aV0KwgqLLBKxiL1yMl7f8DpKPA8tM0adXUKr1S9izAq2r127RfxmfoggmRRqA2 N7d/Cq1OkYd7uz0Wl3clkGikWZ+YiVJCPXp/MwSIjFxI0ilI7xOUy97xU3cvwVfnO/NMr7 4wp+0USnD1ZUuh82BtZkXmvdTOs6pT2WJ+zpNrMMacOgZm6tAWejB6r+17mAOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755465450; 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=JpwFfR+W1UFlQVU3wwYfpoQxtu2VMYKySC2tRvnn+rE=; b=AGtyITAvp6ZNe4c6GZnh4CntfMsV2FK+P1MTsKE9nKx4BmQsc69KP3JF2x+htnjMWZmnN4 DBN4aT8NjRTvq9te1UdJzBMXguzvbDJCnndtrbKWamdSSODP2hSEwNlndGOyeZXGV6Yepe xxfHkaIvYhOWByyjz7fTnwju6swgKeM6uagL6c1C7eN26WIpY27rHJ8Hjkw0r8jpKfReI1 m3wHUrAqRUTfCDuJ8meqsYQpUvjQF0TkGV9KjaXwbX4fj4rVqVFOWqmrAbuA8UPOOf3KQU Xxb4IIH5+NMbXnR7SSS32EctmHwnAQoV35N5ApL9i5jvzyObCOL5bmSEQ+iH0Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755465450; a=rsa-sha256; cv=none; b=N7pb4i5CcbzOEL1pdiOBjJE4BzAnJbXQqmHn1JgIaL29Mel1KuQKMuLdKJkdlF7T1bPa2J zxAgmAbzSrmgrRIEmZXLvfE5phACbq3Qfb5IGCtdpzPSY+Il/EoBMQB3z2bP5OgGsitozR yqrnLvZjFMyodBvjvhwtMgqtK0s9pDLKM0MfYykS1+OJO4LRTqGBvzzmKH4PqcYzrdH2Sa NRwcRlKO/EXzsbF1qVAr91V4ZTyM9UxrcDMZGay+vFpSV9AmB9FBrxWZgGLrdixaOHJqrP iTrw+UVPyFCPngGRoTustmLmZVe6Nb+0b/Md3m7/tUbkJBSJVyKHnyAKOPrMSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4pZy1xdYzCCG; Sun, 17 Aug 2025 21:17: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 57HLHU3L005842; Sun, 17 Aug 2025 21:17:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HLHUAo005839; Sun, 17 Aug 2025 21:17:30 GMT (envelope-from git) Date: Sun, 17 Aug 2025 21:17:30 GMT Message-Id: <202508172117.57HLHUAo005839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 18a870751b03 - main - krb5: Fix typo "SPDX-License-Idendifier" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 18a870751b036f1dc78b36084ccb993d139a11bb Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=18a870751b036f1dc78b36084ccb993d139a11bb commit 18a870751b036f1dc78b36084ccb993d139a11bb Author: Lexi Winter AuthorDate: 2025-08-17 21:13:48 +0000 Commit: Lexi Winter CommitDate: 2025-08-17 21:17:06 +0000 krb5: Fix typo "SPDX-License-Idendifier" sed -e s/SPDX-License-Idendifier/SPDX-License-Identifier/ --- krb5/Makefile.et | 2 +- krb5/Makefile.inc | 2 +- krb5/include/Makefile | 2 +- krb5/include/Makefile.inc | 2 +- krb5/include/gssapi/Makefile | 2 +- krb5/include/gssrpc/Makefile | 2 +- krb5/include/krb5/Makefile | 2 +- krb5/lib/Makefile | 2 +- krb5/lib/Makefile.inc | 2 +- krb5/lib/apputils/Makefile | 2 +- krb5/lib/crypto/Makefile | 2 +- krb5/lib/crypto/builtin/Makefile.inc | 2 +- krb5/lib/crypto/builtin/aes/Makefile.inc | 2 +- krb5/lib/crypto/builtin/camellia/Makefile.inc | 2 +- krb5/lib/crypto/builtin/des/Makefile.inc | 2 +- krb5/lib/crypto/builtin/enc_provider/Makefile.inc | 2 +- krb5/lib/crypto/builtin/hash_provider/Makefile.inc | 2 +- krb5/lib/crypto/builtin/md4/Makefile.inc | 2 +- krb5/lib/crypto/builtin/md5/Makefile.inc | 2 +- krb5/lib/crypto/builtin/sha1/Makefile.inc | 2 +- krb5/lib/crypto/builtin/sha2/Makefile.inc | 2 +- krb5/lib/crypto/krb/Makefile.inc | 2 +- krb5/lib/crypto/openssl/Makefile.inc | 2 +- krb5/lib/crypto/openssl/des/Makefile.inc | 2 +- krb5/lib/crypto/openssl/enc_provider/Makefile.inc | 2 +- krb5/lib/crypto/openssl/hash_provider/Makefile.inc | 2 +- krb5/lib/gssapi/Makefile | 2 +- krb5/lib/gssapi/generic/Makefile.et | 2 +- krb5/lib/gssapi/generic/Makefile.inc | 2 +- krb5/lib/gssapi/krb5/Makefile.et | 2 +- krb5/lib/gssapi/krb5/Makefile.inc | 2 +- krb5/lib/gssapi/mechglue/Makefile.inc | 2 +- krb5/lib/gssapi/spnego/Makefile.inc | 2 +- krb5/lib/kadm5clnt/Makefile | 2 +- krb5/lib/kadm5clnt/clnt/Makefile.inc | 2 +- krb5/lib/kadm5srv/Makefile | 2 +- krb5/lib/kadm5srv/srv/Makefile.inc | 2 +- krb5/lib/kadmin_common/Makefile | 2 +- krb5/lib/kdb/Makefile | 2 +- krb5/lib/kprop_util/Makefile | 2 +- krb5/lib/krad/Makefile | 2 +- krb5/lib/krb5/Makefile | 2 +- krb5/lib/krb5/asn.1/Makefile.inc | 2 +- krb5/lib/krb5/ccache/Makefile.inc | 2 +- krb5/lib/krb5/docs/Makefile.inc | 2 +- krb5/lib/krb5/error_tables/Makefile.inc | 2 +- krb5/lib/krb5/keytab/Makefile.inc | 2 +- krb5/lib/krb5/krb/Makefile.inc | 2 +- krb5/lib/krb5/os/Makefile.inc | 2 +- krb5/lib/krb5/rcache/Makefile.inc | 2 +- krb5/lib/krb5/unicode/Makefile.inc | 2 +- krb5/lib/rpc/Makefile | 2 +- krb5/libexec/Makefile | 2 +- krb5/libexec/Makefile.inc | 2 +- krb5/libexec/kadmind/Makefile | 2 +- krb5/libexec/kdc/Makefile | 2 +- krb5/libexec/kprop/Makefile | 2 +- krb5/libexec/kpropd/Makefile | 2 +- krb5/libexec/kproplog/Makefile | 2 +- krb5/plugins/Makefile | 2 +- krb5/plugins/Makefile.inc | 2 +- krb5/plugins/audit/Makefile | 2 +- krb5/plugins/k5tls/Makefile | 2 +- krb5/plugins/kdb/Makefile | 2 +- krb5/plugins/kdb/Makefile.inc | 2 +- krb5/plugins/kdb/db2/Makefile | 2 +- krb5/plugins/kdb/db2/libdb2/Makefile.inc | 2 +- krb5/plugins/kdb/db2/libdb2/btree/Makefile.inc | 2 +- krb5/plugins/kdb/db2/libdb2/db/Makefile.inc | 2 +- krb5/plugins/kdb/db2/libdb2/hash/Makefile.inc | 2 +- krb5/plugins/kdb/db2/libdb2/include/Makefile.inc | 2 +- krb5/plugins/kdb/db2/libdb2/mpool/Makefile.inc | 2 +- krb5/plugins/kdb/db2/libdb2/recno/Makefile.inc | 2 +- krb5/plugins/preauth/Makefile | 2 +- krb5/plugins/preauth/Makefile.inc | 2 +- krb5/plugins/preauth/otp/Makefile | 2 +- krb5/plugins/preauth/pkinit/Makefile | 2 +- krb5/plugins/preauth/spake/Makefile | 2 +- krb5/plugins/preauth/test/Makefile | 2 +- krb5/usr.bin/Makefile | 2 +- krb5/usr.bin/Makefile.inc | 2 +- krb5/usr.bin/gss-client/Makefile | 2 +- krb5/usr.bin/kadmin/Makefile | 2 +- krb5/usr.bin/kdestroy/Makefile | 2 +- krb5/usr.bin/kinit/Makefile | 2 +- krb5/usr.bin/klist/Makefile | 2 +- krb5/usr.bin/kpasswd/Makefile | 2 +- krb5/usr.bin/ksu/Makefile | 2 +- krb5/usr.bin/kswitch/Makefile | 2 +- krb5/usr.bin/ktutil/Makefile | 2 +- krb5/usr.bin/kvno/Makefile | 2 +- krb5/usr.bin/sclient/Makefile | 2 +- krb5/usr.bin/sim_client/Makefile | 2 +- krb5/usr.sbin/Makefile | 2 +- krb5/usr.sbin/Makefile.inc | 2 +- krb5/usr.sbin/gss-server/Makefile | 2 +- krb5/usr.sbin/kadmin.local/Makefile | 2 +- krb5/usr.sbin/kdb5_util/Makefile | 2 +- krb5/usr.sbin/sim_server/Makefile | 2 +- krb5/usr.sbin/sserver/Makefile | 2 +- krb5/util/Makefile | 2 +- krb5/util/Makefile.inc | 2 +- krb5/util/build-tools/Makefile | 2 +- krb5/util/compile_et/Makefile | 2 +- krb5/util/et/Makefile | 2 +- krb5/util/profile/Makefile | 2 +- krb5/util/ss/Makefile | 2 +- krb5/util/support/Makefile | 2 +- krb5/util/verto/Makefile | 2 +- 109 files changed, 109 insertions(+), 109 deletions(-) diff --git a/krb5/Makefile.et b/krb5/Makefile.et index b89e17857675..e80712c6ee2a 100644 --- a/krb5/Makefile.et +++ b/krb5/Makefile.et @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/Makefile.inc b/krb5/Makefile.inc index 5d302962208c..cd54f7a0eff6 100644 --- a/krb5/Makefile.inc +++ b/krb5/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/include/Makefile b/krb5/include/Makefile index 64c5d39b867b..759c81685da9 100644 --- a/krb5/include/Makefile +++ b/krb5/include/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/include/Makefile.inc b/krb5/include/Makefile.inc index 1f0dddcf31e1..5c21860b6157 100644 --- a/krb5/include/Makefile.inc +++ b/krb5/include/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/include/gssapi/Makefile b/krb5/include/gssapi/Makefile index 997cbc06c389..0eabcd130200 100644 --- a/krb5/include/gssapi/Makefile +++ b/krb5/include/gssapi/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/include/gssrpc/Makefile b/krb5/include/gssrpc/Makefile index 929c9eaacdc9..1eacd5c91c77 100644 --- a/krb5/include/gssrpc/Makefile +++ b/krb5/include/gssrpc/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/include/krb5/Makefile b/krb5/include/krb5/Makefile index 2bbc558394c0..8df5c96559a6 100644 --- a/krb5/include/krb5/Makefile +++ b/krb5/include/krb5/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/Makefile b/krb5/lib/Makefile index 9df98e2cc056..3b89effaa29c 100644 --- a/krb5/lib/Makefile +++ b/krb5/lib/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/Makefile.inc b/krb5/lib/Makefile.inc index b6e5f6275039..50cacb9492ac 100644 --- a/krb5/lib/Makefile.inc +++ b/krb5/lib/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/apputils/Makefile b/krb5/lib/apputils/Makefile index cf430eb3cd27..1a79b3800863 100644 --- a/krb5/lib/apputils/Makefile +++ b/krb5/lib/apputils/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/crypto/Makefile b/krb5/lib/crypto/Makefile index 4dda0d85da54..9521b48f020c 100644 --- a/krb5/lib/crypto/Makefile +++ b/krb5/lib/crypto/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/crypto/builtin/Makefile.inc b/krb5/lib/crypto/builtin/Makefile.inc index afb1afa27083..59b2e6674b6a 100644 --- a/krb5/lib/crypto/builtin/Makefile.inc +++ b/krb5/lib/crypto/builtin/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/crypto/builtin/aes/Makefile.inc b/krb5/lib/crypto/builtin/aes/Makefile.inc index f74b486b5ba5..f46a55921f51 100644 --- a/krb5/lib/crypto/builtin/aes/Makefile.inc +++ b/krb5/lib/crypto/builtin/aes/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/crypto/builtin/camellia/Makefile.inc b/krb5/lib/crypto/builtin/camellia/Makefile.inc index eef5973f3a7d..5effb8d132be 100644 --- a/krb5/lib/crypto/builtin/camellia/Makefile.inc +++ b/krb5/lib/crypto/builtin/camellia/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/crypto/builtin/des/Makefile.inc b/krb5/lib/crypto/builtin/des/Makefile.inc index 8fd5b615e913..02f8d4a1b53d 100644 --- a/krb5/lib/crypto/builtin/des/Makefile.inc +++ b/krb5/lib/crypto/builtin/des/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/crypto/builtin/enc_provider/Makefile.inc b/krb5/lib/crypto/builtin/enc_provider/Makefile.inc index 09df8cbc6300..ef2f6603e60c 100644 --- a/krb5/lib/crypto/builtin/enc_provider/Makefile.inc +++ b/krb5/lib/crypto/builtin/enc_provider/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/crypto/builtin/hash_provider/Makefile.inc b/krb5/lib/crypto/builtin/hash_provider/Makefile.inc index 216d7f2d4e9d..4f89791b9f79 100644 --- a/krb5/lib/crypto/builtin/hash_provider/Makefile.inc +++ b/krb5/lib/crypto/builtin/hash_provider/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/crypto/builtin/md4/Makefile.inc b/krb5/lib/crypto/builtin/md4/Makefile.inc index baf45bb094d2..e47dea4115aa 100644 --- a/krb5/lib/crypto/builtin/md4/Makefile.inc +++ b/krb5/lib/crypto/builtin/md4/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/crypto/builtin/md5/Makefile.inc b/krb5/lib/crypto/builtin/md5/Makefile.inc index ffdccd41fe3f..a01188fa6979 100644 --- a/krb5/lib/crypto/builtin/md5/Makefile.inc +++ b/krb5/lib/crypto/builtin/md5/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/crypto/builtin/sha1/Makefile.inc b/krb5/lib/crypto/builtin/sha1/Makefile.inc index 9e5f8a5b9d2c..f8ca967b45fd 100644 --- a/krb5/lib/crypto/builtin/sha1/Makefile.inc +++ b/krb5/lib/crypto/builtin/sha1/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/crypto/builtin/sha2/Makefile.inc b/krb5/lib/crypto/builtin/sha2/Makefile.inc index f6ce222f730f..a9463f691c53 100644 --- a/krb5/lib/crypto/builtin/sha2/Makefile.inc +++ b/krb5/lib/crypto/builtin/sha2/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/crypto/krb/Makefile.inc b/krb5/lib/crypto/krb/Makefile.inc index a38178fd3a2e..3745ad66e6b9 100644 --- a/krb5/lib/crypto/krb/Makefile.inc +++ b/krb5/lib/crypto/krb/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/crypto/openssl/Makefile.inc b/krb5/lib/crypto/openssl/Makefile.inc index 0b81260a059e..6b7bd89338f7 100644 --- a/krb5/lib/crypto/openssl/Makefile.inc +++ b/krb5/lib/crypto/openssl/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/crypto/openssl/des/Makefile.inc b/krb5/lib/crypto/openssl/des/Makefile.inc index ef05fe0b0785..9cc99846c6b3 100644 --- a/krb5/lib/crypto/openssl/des/Makefile.inc +++ b/krb5/lib/crypto/openssl/des/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/crypto/openssl/enc_provider/Makefile.inc b/krb5/lib/crypto/openssl/enc_provider/Makefile.inc index 8cf42dcc6e31..d1c21f334b10 100644 --- a/krb5/lib/crypto/openssl/enc_provider/Makefile.inc +++ b/krb5/lib/crypto/openssl/enc_provider/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/crypto/openssl/hash_provider/Makefile.inc b/krb5/lib/crypto/openssl/hash_provider/Makefile.inc index 83f2f1ba9129..f8d25ff8a8cc 100644 --- a/krb5/lib/crypto/openssl/hash_provider/Makefile.inc +++ b/krb5/lib/crypto/openssl/hash_provider/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/gssapi/Makefile b/krb5/lib/gssapi/Makefile index 63e4d7df4bed..c3948c6ffe28 100644 --- a/krb5/lib/gssapi/Makefile +++ b/krb5/lib/gssapi/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/gssapi/generic/Makefile.et b/krb5/lib/gssapi/generic/Makefile.et index 787a1c8aa1e3..c245967e3d40 100644 --- a/krb5/lib/gssapi/generic/Makefile.et +++ b/krb5/lib/gssapi/generic/Makefile.et @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/gssapi/generic/Makefile.inc b/krb5/lib/gssapi/generic/Makefile.inc index 9dcc3476775e..f449ab15c379 100644 --- a/krb5/lib/gssapi/generic/Makefile.inc +++ b/krb5/lib/gssapi/generic/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/gssapi/krb5/Makefile.et b/krb5/lib/gssapi/krb5/Makefile.et index 347f6a72f3b6..393635d5a8da 100644 --- a/krb5/lib/gssapi/krb5/Makefile.et +++ b/krb5/lib/gssapi/krb5/Makefile.et @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/gssapi/krb5/Makefile.inc b/krb5/lib/gssapi/krb5/Makefile.inc index 7e001aa0af27..61010408cd5a 100644 --- a/krb5/lib/gssapi/krb5/Makefile.inc +++ b/krb5/lib/gssapi/krb5/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/gssapi/mechglue/Makefile.inc b/krb5/lib/gssapi/mechglue/Makefile.inc index c54cdf37b55b..13855ae4ebad 100644 --- a/krb5/lib/gssapi/mechglue/Makefile.inc +++ b/krb5/lib/gssapi/mechglue/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/gssapi/spnego/Makefile.inc b/krb5/lib/gssapi/spnego/Makefile.inc index 4ebac318ef5a..1184ecc3e6a2 100644 --- a/krb5/lib/gssapi/spnego/Makefile.inc +++ b/krb5/lib/gssapi/spnego/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/kadm5clnt/Makefile b/krb5/lib/kadm5clnt/Makefile index 898276e77d04..9b17644e86de 100644 --- a/krb5/lib/kadm5clnt/Makefile +++ b/krb5/lib/kadm5clnt/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/kadm5clnt/clnt/Makefile.inc b/krb5/lib/kadm5clnt/clnt/Makefile.inc index 2c66879d0eec..c42c87918793 100644 --- a/krb5/lib/kadm5clnt/clnt/Makefile.inc +++ b/krb5/lib/kadm5clnt/clnt/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/kadm5srv/Makefile b/krb5/lib/kadm5srv/Makefile index aa4fad49ea02..c3996af2225b 100644 --- a/krb5/lib/kadm5srv/Makefile +++ b/krb5/lib/kadm5srv/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/kadm5srv/srv/Makefile.inc b/krb5/lib/kadm5srv/srv/Makefile.inc index cd46e1af7333..2ea4d22932fc 100644 --- a/krb5/lib/kadm5srv/srv/Makefile.inc +++ b/krb5/lib/kadm5srv/srv/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/kadmin_common/Makefile b/krb5/lib/kadmin_common/Makefile index d324acbbe31c..9eed31bc94f3 100644 --- a/krb5/lib/kadmin_common/Makefile +++ b/krb5/lib/kadmin_common/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/kdb/Makefile b/krb5/lib/kdb/Makefile index ff17900fb7ec..d6fbc71b7584 100644 --- a/krb5/lib/kdb/Makefile +++ b/krb5/lib/kdb/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/kprop_util/Makefile b/krb5/lib/kprop_util/Makefile index 31c35601d1a8..aaaeb969058d 100644 --- a/krb5/lib/kprop_util/Makefile +++ b/krb5/lib/kprop_util/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/krad/Makefile b/krb5/lib/krad/Makefile index a990354c1877..36074dff1296 100644 --- a/krb5/lib/krad/Makefile +++ b/krb5/lib/krad/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/krb5/Makefile b/krb5/lib/krb5/Makefile index dc6c53ec6ce2..a1576fcc256f 100644 --- a/krb5/lib/krb5/Makefile +++ b/krb5/lib/krb5/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/krb5/asn.1/Makefile.inc b/krb5/lib/krb5/asn.1/Makefile.inc index 1c00b4a9389a..a878986e8a24 100644 --- a/krb5/lib/krb5/asn.1/Makefile.inc +++ b/krb5/lib/krb5/asn.1/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/krb5/ccache/Makefile.inc b/krb5/lib/krb5/ccache/Makefile.inc index 08514b2819d9..746a24f11e8b 100644 --- a/krb5/lib/krb5/ccache/Makefile.inc +++ b/krb5/lib/krb5/ccache/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/krb5/docs/Makefile.inc b/krb5/lib/krb5/docs/Makefile.inc index efc4dc2f6b4b..7c1e55325b4c 100644 --- a/krb5/lib/krb5/docs/Makefile.inc +++ b/krb5/lib/krb5/docs/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/krb5/error_tables/Makefile.inc b/krb5/lib/krb5/error_tables/Makefile.inc index 5d2ec3b9e920..e024238219da 100644 --- a/krb5/lib/krb5/error_tables/Makefile.inc +++ b/krb5/lib/krb5/error_tables/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/krb5/keytab/Makefile.inc b/krb5/lib/krb5/keytab/Makefile.inc index 8fca2e640f30..800bddb0d952 100644 --- a/krb5/lib/krb5/keytab/Makefile.inc +++ b/krb5/lib/krb5/keytab/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/krb5/krb/Makefile.inc b/krb5/lib/krb5/krb/Makefile.inc index aedc0438a596..4d8438246dac 100644 --- a/krb5/lib/krb5/krb/Makefile.inc +++ b/krb5/lib/krb5/krb/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/krb5/os/Makefile.inc b/krb5/lib/krb5/os/Makefile.inc index a59f6fc56c59..f81ab7866ecb 100644 --- a/krb5/lib/krb5/os/Makefile.inc +++ b/krb5/lib/krb5/os/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/krb5/rcache/Makefile.inc b/krb5/lib/krb5/rcache/Makefile.inc index 4f68dc702dd8..6b5d61e8b75c 100644 --- a/krb5/lib/krb5/rcache/Makefile.inc +++ b/krb5/lib/krb5/rcache/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/krb5/unicode/Makefile.inc b/krb5/lib/krb5/unicode/Makefile.inc index 19cea34f2193..ff146961ccea 100644 --- a/krb5/lib/krb5/unicode/Makefile.inc +++ b/krb5/lib/krb5/unicode/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/lib/rpc/Makefile b/krb5/lib/rpc/Makefile index a539803cc57c..6f09020261e1 100644 --- a/krb5/lib/rpc/Makefile +++ b/krb5/lib/rpc/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/libexec/Makefile b/krb5/libexec/Makefile index 1f8ce8728d19..7658ed8f19ef 100644 --- a/krb5/libexec/Makefile +++ b/krb5/libexec/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/libexec/Makefile.inc b/krb5/libexec/Makefile.inc index 6ce709d08304..9bec75eba9cb 100644 --- a/krb5/libexec/Makefile.inc +++ b/krb5/libexec/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/libexec/kadmind/Makefile b/krb5/libexec/kadmind/Makefile index 62046214af7b..434e4adce211 100644 --- a/krb5/libexec/kadmind/Makefile +++ b/krb5/libexec/kadmind/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/libexec/kdc/Makefile b/krb5/libexec/kdc/Makefile index 1a0d5b9c208b..9317ebbbc9a8 100644 --- a/krb5/libexec/kdc/Makefile +++ b/krb5/libexec/kdc/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/libexec/kprop/Makefile b/krb5/libexec/kprop/Makefile index 1294d9014ee4..0889562cfa43 100644 --- a/krb5/libexec/kprop/Makefile +++ b/krb5/libexec/kprop/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/libexec/kpropd/Makefile b/krb5/libexec/kpropd/Makefile index e7ffe5a26016..667947dcc84c 100644 --- a/krb5/libexec/kpropd/Makefile +++ b/krb5/libexec/kpropd/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/libexec/kproplog/Makefile b/krb5/libexec/kproplog/Makefile index 81405260a06e..3a69164ddabf 100644 --- a/krb5/libexec/kproplog/Makefile +++ b/krb5/libexec/kproplog/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/Makefile b/krb5/plugins/Makefile index a72dd4a521bc..d8ba01585f2a 100644 --- a/krb5/plugins/Makefile +++ b/krb5/plugins/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/Makefile.inc b/krb5/plugins/Makefile.inc index d98ed1d3887b..f1ae34663769 100644 --- a/krb5/plugins/Makefile.inc +++ b/krb5/plugins/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/audit/Makefile b/krb5/plugins/audit/Makefile index f85e5d1a81a5..124c6e2b7a5a 100644 --- a/krb5/plugins/audit/Makefile +++ b/krb5/plugins/audit/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/k5tls/Makefile b/krb5/plugins/k5tls/Makefile index 30738a70e71d..928d64d28ab5 100644 --- a/krb5/plugins/k5tls/Makefile +++ b/krb5/plugins/k5tls/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/kdb/Makefile b/krb5/plugins/kdb/Makefile index f9e2a4d1afb1..1d5533bf8d22 100644 --- a/krb5/plugins/kdb/Makefile +++ b/krb5/plugins/kdb/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/kdb/Makefile.inc b/krb5/plugins/kdb/Makefile.inc index 56c36b7539f7..8005a7b99e37 100644 --- a/krb5/plugins/kdb/Makefile.inc +++ b/krb5/plugins/kdb/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/kdb/db2/Makefile b/krb5/plugins/kdb/db2/Makefile index 3230a77171f4..737ae7e15e27 100644 --- a/krb5/plugins/kdb/db2/Makefile +++ b/krb5/plugins/kdb/db2/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/kdb/db2/libdb2/Makefile.inc b/krb5/plugins/kdb/db2/libdb2/Makefile.inc index d31beb5dd5f5..ae035ad49f00 100644 --- a/krb5/plugins/kdb/db2/libdb2/Makefile.inc +++ b/krb5/plugins/kdb/db2/libdb2/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/kdb/db2/libdb2/btree/Makefile.inc b/krb5/plugins/kdb/db2/libdb2/btree/Makefile.inc index 1c1b2b6ea26c..27fc2627c0ef 100644 --- a/krb5/plugins/kdb/db2/libdb2/btree/Makefile.inc +++ b/krb5/plugins/kdb/db2/libdb2/btree/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/kdb/db2/libdb2/db/Makefile.inc b/krb5/plugins/kdb/db2/libdb2/db/Makefile.inc index cdcdac287b5d..66613c4dd69d 100644 --- a/krb5/plugins/kdb/db2/libdb2/db/Makefile.inc +++ b/krb5/plugins/kdb/db2/libdb2/db/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/kdb/db2/libdb2/hash/Makefile.inc b/krb5/plugins/kdb/db2/libdb2/hash/Makefile.inc index 7943281b7797..d6f1fae0414a 100644 --- a/krb5/plugins/kdb/db2/libdb2/hash/Makefile.inc +++ b/krb5/plugins/kdb/db2/libdb2/hash/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/kdb/db2/libdb2/include/Makefile.inc b/krb5/plugins/kdb/db2/libdb2/include/Makefile.inc index 63be42f21082..a73998cdc8d0 100644 --- a/krb5/plugins/kdb/db2/libdb2/include/Makefile.inc +++ b/krb5/plugins/kdb/db2/libdb2/include/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/kdb/db2/libdb2/mpool/Makefile.inc b/krb5/plugins/kdb/db2/libdb2/mpool/Makefile.inc index 801f36a085c7..5b05e9b866e4 100644 --- a/krb5/plugins/kdb/db2/libdb2/mpool/Makefile.inc +++ b/krb5/plugins/kdb/db2/libdb2/mpool/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/kdb/db2/libdb2/recno/Makefile.inc b/krb5/plugins/kdb/db2/libdb2/recno/Makefile.inc index 01557c312a53..10af0f174b56 100644 --- a/krb5/plugins/kdb/db2/libdb2/recno/Makefile.inc +++ b/krb5/plugins/kdb/db2/libdb2/recno/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/preauth/Makefile b/krb5/plugins/preauth/Makefile index 23861859bd2c..b037aa2058ab 100644 --- a/krb5/plugins/preauth/Makefile +++ b/krb5/plugins/preauth/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/preauth/Makefile.inc b/krb5/plugins/preauth/Makefile.inc index 8a713e4d0856..49065f8a3147 100644 --- a/krb5/plugins/preauth/Makefile.inc +++ b/krb5/plugins/preauth/Makefile.inc @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/preauth/otp/Makefile b/krb5/plugins/preauth/otp/Makefile index 48fc35db0727..fa047b44e176 100644 --- a/krb5/plugins/preauth/otp/Makefile +++ b/krb5/plugins/preauth/otp/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/preauth/pkinit/Makefile b/krb5/plugins/preauth/pkinit/Makefile index 7d227aca5420..47e02b315cd6 100644 --- a/krb5/plugins/preauth/pkinit/Makefile +++ b/krb5/plugins/preauth/pkinit/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/preauth/spake/Makefile b/krb5/plugins/preauth/spake/Makefile index 3aa375cb5100..602d563d291f 100644 --- a/krb5/plugins/preauth/spake/Makefile +++ b/krb5/plugins/preauth/spake/Makefile @@ -1,5 +1,5 @@ # -# SPDX-License-Idendifier: BSD-2-Clause +# SPDX-License-Identifier: BSD-2-Clause # # Copyright (c) 2025 FreeBSD Foundation # diff --git a/krb5/plugins/preauth/test/Makefile b/krb5/plugins/preauth/test/Makefile index 99f632c0cb17..70292dec9a14 100644 --- a/krb5/plugins/preauth/test/Makefile *** 338 LINES SKIPPED *** From nobody Sun Aug 17 23:55:38 2025 X-Original-To: dev-commits-src-main@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 4c4t5Q3bc2z64FcT; Sun, 17 Aug 2025 23:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c4t5Q2qyjz3qf4; Sun, 17 Aug 2025 23:55:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755474938; 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=2GFeUO2YrrSFNNuJYhXnbKZbV5ddNSmZWy9nQ1UxDiU=; b=q6lDPyqApWk6Y4MF+HxEQqwIUCPLu6FJ8AuBnF1wR4O7KOs1tH9Fc17x8j8Kr6vQLf2QNj f+6rwu4aAWs+1m5mi6RvKylenx6NGkDXNK+GnbTYi9Th8qfN+O/BxUS+WwAAoT/iAB4s9t bGF+RVySiZczbREMsGBO+Jk035SAdcoYsLj64EEJXj/XkImeJIpB6VmJZcwTMy0TKD7mtt b7dJWoV7pGXPUCcBm6+nhnJYLRWjXUl7S++RmFf8yMLLcIYKOqTFhwudLXwsfwhkVuzgZd 14J2xzImG6js6E0iPU0CZkWaNfHVqsh9BbTlpW+gtPi0qmQRFJWJUC5WyCZjUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755474938; 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=2GFeUO2YrrSFNNuJYhXnbKZbV5ddNSmZWy9nQ1UxDiU=; b=jh50gY7l8L5pt8Sqvws0KkzukhcB7FXhMRtTQFuZgkQacbSJiSJlkLi5Yj40VGLmhvwv8H UBFcQ0v9lcsCeFCYCbNETeyy5kcgydxZpni4/253bpGqtnA58MT/fBayHN1sXQ3681kFzu 2kVDkisBUCRrD0VA3iULdLXEQ9rAWBkCxm8poAeEYK7dqAfhghjT2+d2PNI4nVzmNZMhJv kkGQh9ZtQXJXI5OGMxcw1KTjQm+yJsQUkcnAlEHtPeK0wNMn1eVoE1a5Bb3expLuZ0PdE/ pIooWeKcpQ6zPeBmiNR2oeKo40Z8llIn8PcRJzQICUyzMkhVMiR6D6OfCJaFnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755474938; a=rsa-sha256; cv=none; b=njER9BcUpmj0uJ7+JAAVJyYiXe3RLcJ1ZM2I2kJY8FM0BnabFJ9ZWEpvapvgL9Cygj+jbq 6crYNGyB7AEI17wX+4S9umUQ0Iua8pczaNKnhqY2S2/D8crJiWOV19qt0mTLEamD8eQHRh kGLxerqYH5XT3epleohotmMffqzk9D2Sn99PgJmjLN6MtEuTvgE8lLb8QmTOuug0so63IW 7r0NHwMcO1RH+G9YKvHP87t7cW/uhji9XJna9MaB1HZNDGurwRx4Gs47lCEwmhhmhEbmN4 q5FIi2UlQ2MNK5gLc5lIzu86e7arv9ldorKyREq670JDv+cRjAravEtSxsbf1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4c4t5Q2GnSzXr0; Sun, 17 Aug 2025 23:55: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 57HNtcVh005614; Sun, 17 Aug 2025 23:55:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57HNtchd005611; Sun, 17 Aug 2025 23:55:38 GMT (envelope-from git) Date: Sun, 17 Aug 2025 23:55:38 GMT Message-Id: <202508172355.57HNtchd005611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 2bc115a6c287 - main - Revert "vfs: Assert that st_rdev is NODEV for non-devices" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2bc115a6c2874b157a8da973a3521889a1542fc0 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2bc115a6c2874b157a8da973a3521889a1542fc0 commit 2bc115a6c2874b157a8da973a3521889a1542fc0 Author: Dag-Erling Smørgrav AuthorDate: 2025-08-17 23:55:12 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-08-17 23:55:12 +0000 Revert "vfs: Assert that st_rdev is NODEV for non-devices" This reverts commit f9ff1e48cc1b77f1840fd514050ccc5904a0cac2. --- sys/kern/vfs_syscalls.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index aeb5657452dc..bf3ed9d515dc 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2571,8 +2571,6 @@ kern_statat(struct thread *td, int flag, int fd, const char *path, } error = VOP_STAT(nd.ni_vp, sbp, td->td_ucred, NOCRED); NDFREE_PNBUF(&nd); - KASSERT(error != 0 || VN_ISDEV(nd.ni_vp) || sbp->st_rdev == NODEV, - ("st_rdev should be NODEV unless the file is a device node")); vput(nd.ni_vp); #ifdef __STAT_TIME_T_EXT sbp->st_atim_ext = 0;