From nobody Mon Mar 11 00:29:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TtHhj60mhz5DDH4; Mon, 11 Mar 2024 00:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TtHhj5SF4z4sZ7; Mon, 11 Mar 2024 00:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710116965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M4oIY2UYnPCCfhFy6JmddxErYM7Oacpz3uxSkBKMcI8=; b=SsmXcoVWoxY9BLdAT6mQJThrBjNH4fIypXkIFg8OHxiP1ghGjmiViYadExC4qawA/lwdwD QZEgdbQph+6YLZpaArh6KV37FwXar9YRcB6mZbBeDorxpdj3KCJ25Jrx0tHx4+tsY/LyLM W60eDkFwv4BTe3G6UweRCuAJOIJqodhB2rF4XCaczPB6zc+3dXiPhwRYW4wMWqbrkfRvE3 iRR3aGKed/TO9tkD6CAGO2dDqAyUIvH15sz3rCx9thOMHPIaWIMAOzu1Q413YV+O9vU5wX v0muu2qzPfiY2mjsfneCJPyCpNglB9EwDry1b5KqIbWzyPXB4kerWHYhAAGqpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710116965; a=rsa-sha256; cv=none; b=OQQ0Z0vIHe1XE78eyczsxW1VE/mhkCB26keIOfCKlSPr4L1D0e7TqxlNyAn+pZDee5ZdvB f56tLdcA7Sz9UAVXorelJ35XkWXlwL/Xzjql2r7mC4lrLPX4+6ZBCHlqS/dgTvSUpSkDb/ uFndbFxTuYOAWPf8eA+HrbmiPKIYAie/RJR97oA3RYrVnomfPY5yEPe1/fnGrBkQFBbjqv KNEAlPpXkrMwBzrEw97kNU97ruGC87eA11VDAGhRsLJgIVQcj2GIlN6UkG+aoUzxpBp47l bCvpN64Tn/4QnJIWJX8bcxMIhfhxobb5aDr2H9Vm7MQzuJ7/Meu2NBFUssJrOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710116965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M4oIY2UYnPCCfhFy6JmddxErYM7Oacpz3uxSkBKMcI8=; b=OTD+3L1jcE4jPfK/FyCn/tumWOXX+ycIR8OhdHvRx62YWW1qsTlPa6//RKNnX+uD2jq4XO hMIA5/+d59SVO039u5smOFCDgUaRV7otMQvPCFxujYbj3sCcXZcJD0/kxegcKgaCay69V8 ao1G1cW6GDIGDeF57W+p/LgaQMgadPp9zMELPDddDoSUXzGMbM8x1Ee9m39jwkoDtfWmHg W+0p4M6yr/HoNf2NeQ44f5JLN96wilmhvumfcBikPE4BXfoo3AYfeNexWUHtYJBPjWKZ1m IQaxMwBSMj5zs3fumfSeX197MUUz8UmJ+h06teDwJtbZpzMdTw8+2UDL9UYdkg== 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 4TtHhj4wdFz17J6; Mon, 11 Mar 2024 00:29:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42B0TP7G093856; Mon, 11 Mar 2024 00:29:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B0TPYs093853; Mon, 11 Mar 2024 00:29:25 GMT (envelope-from git) Date: Mon, 11 Mar 2024 00:29:25 GMT Message-Id: <202403110029.42B0TPYs093853@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: eb36277dc926 - stable/14 - posix_spawnattr_setflags(3): validate argument List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: eb36277dc926b671b520ca0ecb1da54eacf424a2 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=eb36277dc926b671b520ca0ecb1da54eacf424a2 commit eb36277dc926b671b520ca0ecb1da54eacf424a2 Author: Konstantin Belousov AuthorDate: 2024-03-03 13:19:37 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-11 00:25:58 +0000 posix_spawnattr_setflags(3): validate argument (cherry picked from commit 80ac36c3a2a87a19790eba487466bf70d55f566e) --- lib/libc/gen/posix_spawn.c | 4 ++++ lib/libc/gen/posix_spawnattr_getflags.3 | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index a067d1f68ea5..41e059cf437b 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -629,6 +629,10 @@ posix_spawnattr_getsigmask(const posix_spawnattr_t * __restrict sa, int posix_spawnattr_setflags(posix_spawnattr_t *sa, short flags) { + if ((flags & ~(POSIX_SPAWN_RESETIDS | POSIX_SPAWN_SETPGROUP | + POSIX_SPAWN_SETSCHEDPARAM | POSIX_SPAWN_SETSCHEDULER | + POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK)) != 0) + return (EINVAL); (*sa)->sa_flags = flags; return (0); } diff --git a/lib/libc/gen/posix_spawnattr_getflags.3 b/lib/libc/gen/posix_spawnattr_getflags.3 index 9a468cbb8b0f..18cf6683e935 100644 --- a/lib/libc/gen/posix_spawnattr_getflags.3 +++ b/lib/libc/gen/posix_spawnattr_getflags.3 @@ -83,9 +83,12 @@ The default value of this attribute is as if no flags were set. .Sh RETURN VALUES The .Fn posix_spawnattr_getflags -and +function returns zero. +The .Fn posix_spawnattr_setflags -functions return zero. +function returns zero on success, and +.Er EINVAL +on failure due to invalid flag specified. .Sh SEE ALSO .Xr posix_spawn 3 , .Xr posix_spawnattr_destroy 3 , From nobody Mon Mar 11 00:29:26 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TtHhl1FpBz5DDDS; Mon, 11 Mar 2024 00:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TtHhl0Fk1z4sWp; Mon, 11 Mar 2024 00:29:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710116967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=viqM3UOmzPtIT4+SC0fDPUDM8M/QX9mDLYsQviuO1IQ=; b=n4expSy7S29GQwGeI4tw3JY1ZHz/Y/9WN1nKuPwIZERV0Dru/ANj9xiyyr1WeI2pFVponA rFZdBhcSdMHNo3f+M+x5gj/+NPeWkY3HB6yNk0J423tbolq5Bk970ElpAo55guqg8A57D8 boKMMdRJAev26PHh1CHrJmcboq+8uC19yhkApg/Z3yKotfh+4oYXgR7Z0Wv992fyWn0afB 6Pw8YaHtFBTwCQCOKt+8FOQzZqN76Tuby2G1lre4pFHMa69SDGzPPiYBPE+kBQlsbh2CqN +0xP0QRbHYWS6XwwFoj8FxGeHpT76RAxpduWd0iU8W6h8it6J83zG96L5fNznA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710116967; a=rsa-sha256; cv=none; b=DBOXPIzJoKAesUQOpj5kXPUFGbBqoP6EgLe8fQQV6GvoeSwPuaqXCJvli/0iOrn/DiGzTR Tx0W3+VbpOdoD6OrJuPOxu+5vClRN+hPnXo+7ER+xQhAtj6b2DtZayXk04Ryp6/gH74MBe q2xGKKlbQfh/bAN5dkbGP6aURJwKYEO6GTYzr1rQjZ6LMH28VL1LSc369Q1fScoBfzJdK1 umk2jM56vmjG+36ezFoRSWX4eVazcarEzn6Bgta1OQG50MRjtkmzApaZDq9We9B7wqCp6v zYoLvrPXCr1xgrSFlX/A6T6pUZxWRxhFoYzQ4j4xlQenkYUOCairm6gEqVDBMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710116967; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=viqM3UOmzPtIT4+SC0fDPUDM8M/QX9mDLYsQviuO1IQ=; b=qpjwX+hadY5KznDX+o3hbTyf9Y2CGoqgSLNgRik6L3KBm6rJ6zy/ZMCPCh6Dx7mlpYfhC2 WgUg1Tq+4GOqgln6DhrnEIFaUl+PMjGlm7f8bIg0yMH/jIohFMCHxScGrcMN/vGCUc5lBv WhRuHbm6a5jTfBZC56DZaB1A16z7JeRUQ5VS0OhEXM+8G+ZZrE9P4pHl6Ila0U+FEkTpsN Ah7mt6VHCpsXFqokxd1o0U+9N6yxPhnH05PB8nj4GfYDzmW7WIfgHIY6X9UsjZxJTVTCk1 xz32joAjFYMXePC+WEXDBBdEd801GFb7/LXbxdFHN7BX3KDGRxO4xViWFioTCQ== 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 4TtHhk68Zdz17J7; Mon, 11 Mar 2024 00:29:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42B0TQoW093892; Mon, 11 Mar 2024 00:29:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B0TQww093889; Mon, 11 Mar 2024 00:29:26 GMT (envelope-from git) Date: Mon, 11 Mar 2024 00:29:26 GMT Message-Id: <202403110029.42B0TQww093889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b5e95d17ec89 - stable/14 - posix_spawn(3): add POSIX_SPAWN_DISABLE_ASLR_NP List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b5e95d17ec8958e26efe70368405e6dd18df6336 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b5e95d17ec8958e26efe70368405e6dd18df6336 commit b5e95d17ec8958e26efe70368405e6dd18df6336 Author: Konstantin Belousov AuthorDate: 2024-03-03 13:30:04 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-11 00:25:58 +0000 posix_spawn(3): add POSIX_SPAWN_DISABLE_ASLR_NP (cherry picked from commit 822042fdfca79faada89e67110b01dd9ecc05996) --- include/spawn.h | 1 + lib/libc/gen/posix_spawn.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/spawn.h b/include/spawn.h index 9643fcda5c13..a93315930954 100644 --- a/include/spawn.h +++ b/include/spawn.h @@ -59,6 +59,7 @@ typedef struct __posix_spawn_file_actions *posix_spawn_file_actions_t; #define POSIX_SPAWN_SETSCHEDULER 0x08 #define POSIX_SPAWN_SETSIGDEF 0x10 #define POSIX_SPAWN_SETSIGMASK 0x20 +#define POSIX_SPAWN_DISABLE_ASLR_NP 0x40 __BEGIN_DECLS /* diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index 41e059cf437b..4726416f1d02 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -28,6 +28,7 @@ #include "namespace.h" #include +#include #include #include @@ -91,7 +92,7 @@ static int process_spawnattr(const posix_spawnattr_t sa) { struct sigaction sigact = { .sa_flags = 0, .sa_handler = SIG_DFL }; - int i; + int aslr, i; /* * POSIX doesn't really describe in which order everything @@ -139,6 +140,13 @@ process_spawnattr(const posix_spawnattr_t sa) } } + /* Disable ASLR. */ + if ((sa->sa_flags & POSIX_SPAWN_DISABLE_ASLR_NP) != 0) { + aslr = PROC_ASLR_FORCE_DISABLE; + if (procctl(P_PID, 0, PROC_ASLR_CTL, &aslr) != 0) + return (errno); + } + return (0); } @@ -631,7 +639,8 @@ posix_spawnattr_setflags(posix_spawnattr_t *sa, short flags) { if ((flags & ~(POSIX_SPAWN_RESETIDS | POSIX_SPAWN_SETPGROUP | POSIX_SPAWN_SETSCHEDPARAM | POSIX_SPAWN_SETSCHEDULER | - POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK)) != 0) + POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK | + POSIX_SPAWN_DISABLE_ASLR_NP)) != 0) return (EINVAL); (*sa)->sa_flags = flags; return (0); From nobody Mon Mar 11 00:29:27 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TtHhm25kqz5DDBY; Mon, 11 Mar 2024 00:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TtHhm0clMz4snc; Mon, 11 Mar 2024 00:29:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710116968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vrm1z8ESbj2+s0hLu8nQZ2/WrujZO4T0xmnod5f2yiE=; b=N5tTf6yOgwH1oBDgA2SNpDGyWON7sVu5HWasvmLwSkz1acMg14b+43KIL9eHmqslmkBCfW 0GQv4MIH3cUfVq/XumzOILg25yiDLoR6Bg/4WLjmKy1KLqN/RdMahwFyocMqQ+p6L65YrF YBHr6lMndLevJ3YrhM+Ezds3kH2JIJo7X3XP6TGD/yCRprQT67HzrMjpOOmvU1M/Tmrmfi J0D9B/ZdJaOOvWe+BjiRILtbE2Z4pTc81iHhEykuRLumjPrBZwyJ8dh8ObrZgfGpk2YuAz OQ/DTSYo3CzNV6zhGp+74jpQTLKqxgB/0sgv3gwznwy2BhxFjZgCBhu2/LjA6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710116968; a=rsa-sha256; cv=none; b=ggA6T5s3cY+sV0llf6MAchqoz0fU/2yJsXGo4LfwliJwwQeeZGp0KM8Iy3irdFQ8ut8MrX 05NKl4vvqi80QYjhF/orl0NpMu099TwbakmnIitkzd8dL9yfqxSe7A+tYc8StmndS0s35W FGeZ1lEzgMbML03gjguPtFOzxxxGxMUlH83MzHzkPfSHQ3ASMfCMnpPqdoX7MJ+UxMywhT M0TQwk5vRYGcuSwKdrenp147BodW+7oRf0qiheYCrIFNmzmZAijitm/EdPCE9FDnXnuN2f nOHMlhefyEmtKzozpIfvfywvWvO5n8BKtHeHcA/Nin0bLAEX6d/mCSeeg8q7dQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710116968; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vrm1z8ESbj2+s0hLu8nQZ2/WrujZO4T0xmnod5f2yiE=; b=LB6BF44/XM6nyn3Eg5q4rWU6AejBUh4Fjj7X2tZ0d0vSag94i7N1K34qLLimZMcr7bOItE GLuv2EDw+Og5UhtOzIKRIm25qUPIRuhMhnQYiZUsscmjqVxVj3r14M03VXT3l4FVd+3s2M M/gQY3np1IM5sxJ42RxqfNlboOe+oj4kIGLzr82mT9FsHYXHQimPb+VgwFljPOzV0O2bPe tw3ZSrDiHRiszfx9H28l1EzxvjGdMxweeesqSOe4spAAfG6s8FglMg1qbwGzjUIHtyx6Xb f5TkhD7vwb7kF40JFvklPnGwUI/qUC4J55lOqxzyTFnZ8181Q/3QRtiFM4Rgqw== 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 4TtHhl6wq6z179c; Mon, 11 Mar 2024 00:29:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42B0TRvq093928; Mon, 11 Mar 2024 00:29:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B0TR2Y093925; Mon, 11 Mar 2024 00:29:27 GMT (envelope-from git) Date: Mon, 11 Mar 2024 00:29:27 GMT Message-Id: <202403110029.42B0TR2Y093925@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 7178cd5f8108 - stable/14 - posix_spawn(3): document POSIX_SPAWN_DISABLE_ASLR_NP List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7178cd5f810809d0329327131f8181d2c954918f Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=7178cd5f810809d0329327131f8181d2c954918f commit 7178cd5f810809d0329327131f8181d2c954918f Author: Konstantin Belousov AuthorDate: 2024-03-03 22:19:22 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-11 00:25:58 +0000 posix_spawn(3): document POSIX_SPAWN_DISABLE_ASLR_NP (cherry picked from commit a725a7a24de585e996f21e190b5af41261ebc774) --- lib/libc/gen/posix_spawn.3 | 12 +++++++++++- lib/libc/gen/posix_spawnattr_getflags.3 | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/posix_spawn.3 b/lib/libc/gen/posix_spawn.3 index a9ff7b2b21da..55559ae7222b 100644 --- a/lib/libc/gen/posix_spawn.3 +++ b/lib/libc/gen/posix_spawn.3 @@ -32,7 +32,7 @@ .\" the referee document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" -.Dd November 28, 2021 +.Dd March 4, 2024 .Dt POSIX_SPAWN 3 .Os .Sh NAME @@ -297,6 +297,15 @@ and the signals being indicated in the spawn-sigdefault attribute of the object referenced by .Fa attrp . .Pp +The Address Space Layout Randomization for the newly spawned process +can be disabled by specifying the +.Dv POSIX_SPAWN_DISABLE_ASLR_NP +flag in the spawn-flags attribute. +This setting is inherited by future children of the child as well. +See +.Xr procctl 2 +for more details. +.Pp If the value of the .Fa attrp pointer is NULL, then the default values are used. @@ -432,6 +441,7 @@ action. .Xr execve 2 , .Xr fcntl 2 , .Xr open 2 , +.Xr procctl 2 , .Xr sched_setparam 2 , .Xr sched_setscheduler 2 , .Xr setpgid 2 , diff --git a/lib/libc/gen/posix_spawnattr_getflags.3 b/lib/libc/gen/posix_spawnattr_getflags.3 index 18cf6683e935..308bbb386d76 100644 --- a/lib/libc/gen/posix_spawnattr_getflags.3 +++ b/lib/libc/gen/posix_spawnattr_getflags.3 @@ -32,7 +32,7 @@ .\" the referee document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" -.Dd March 24, 2008 +.Dd March 4, 2024 .Dt POSIX_SPAWNATTR_GETFLAGS 3 .Os .Sh NAME @@ -75,6 +75,7 @@ It is the bitwise-inclusive OR of zero or more of the following flags .It Dv POSIX_SPAWN_SETSIGMASK .It Dv POSIX_SPAWN_SETSCHEDPARAM .It Dv POSIX_SPAWN_SETSCHEDULER +.It Dv POSIX_SPAWN_DISABLE_ASLR_NP .El .Pp These flags are defined in From nobody Mon Mar 11 00:29:29 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TtHhn3F1lz5DDHD; Mon, 11 Mar 2024 00:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TtHhn1L2jz4ssv; Mon, 11 Mar 2024 00:29:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710116969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/eiGqil5qzs8BzLRypIOCDr4IHV6/0mBvsnAQVFj7ww=; b=WjAkw5sdpfq+rOzAGF7r5noKuCGoOND7GfUGgYxuKrzp5GDOy9rPN0EslaP42aRxTTpRtH fgEnSqlArlwnbsTGUxpzkdN65E/OHeZubhgTzB/5riZWzvy00bIKeivXLcFu0OKujvMiih 2zR8pa1HSYzVf9Qstg/PFTldm+H4RjOEC95aPq9+wjbpWwbjBE8vSD4NUXN3siVBiLwPKR EKv0tE9Le1u0SH6OiRZYykjMCz+6E2gJMprk0PF8OXKmiETM/hvbT1MXlj3PSRQJTAEz+/ eBDQRnU4au+vtHfhHe7o32DCcGeIfHhp2v/QgTAqG8f76yMIp4ddT8gYk74inw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710116969; a=rsa-sha256; cv=none; b=Gn8ntIe5VQ/QZqtsrnAtgm9mGmh2O7kkm+jLPNo1GlThGvKjLlhyMcft4tncVadmXOD5Tz zr3nxL31sZcQkRFx5V91x4WfzpCSMgLshalTUgm4JqBjjz3X2UvwrhpaBaq4EKxs/Jcwzn gRh6md0QwUtShiMKHcPhvrWKA+SBw0hl8UdFzlXK690ob2xDAgeBmsh1j68lTUNrUnwvEh 6pc60Aw0KYlNutuHujizKzbnnW+utL4w/UhHrR4t0jdZeVRR6flG6GWPpT23jfcTBMPq1P gUq3OxCnYoAytcQ0qWe70vUtVdjx1ZuSHgMZ4hHVMf1OmQ7vwUzVGn47Dke7KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710116969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/eiGqil5qzs8BzLRypIOCDr4IHV6/0mBvsnAQVFj7ww=; b=OWHDsmno+4PLfeSXbI3Z8x2G3ftcIONJViaa2DotuHiDxw2N7AWRpFhRA62+dQ0Ng8nQ8j OSIh0xGau4PzjP5fO6ej7H50Ixdg0aHoRyo/V+AVI7NVsZD4qTf9zIurMEMniTULINbeHa PxCBnOjeQgdnTJfrXfFcgmrK5P19BXjXL25K5Uv6r0EXeAe5fcV3l0THHtiC5c0I3k0mr3 bX79BOonuSdp57y0kGAwsXpezTtxpqEhnkXwE0zVuV5uSXc1CPrbz4icWZGMj/J6z8r9Ju 6WoeTtEUIvSmOD6RsWRC4/p7kuRb52PL1bvrK0qd08qrItBv+24MHeIiMsAOmA== 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 4TtHhn0pQbz16sb; Mon, 11 Mar 2024 00:29:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42B0TTON093976; Mon, 11 Mar 2024 00:29:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B0TTfT093973; Mon, 11 Mar 2024 00:29:29 GMT (envelope-from git) Date: Mon, 11 Mar 2024 00:29:29 GMT Message-Id: <202403110029.42B0TTfT093973@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 8e9963d7b000 - stable/14 - posix_spawn.c: fix typo in comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8e9963d7b0004becb3b2d83a3b354b079db9d697 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=8e9963d7b0004becb3b2d83a3b354b079db9d697 commit 8e9963d7b0004becb3b2d83a3b354b079db9d697 Author: Konstantin Belousov AuthorDate: 2024-03-06 06:19:16 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-11 00:25:58 +0000 posix_spawn.c: fix typo in comment (cherry picked from commit ebaf907114aa6bda49be4204185072571396bb0d) --- lib/libc/gen/posix_spawn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index 4726416f1d02..d405517ba68d 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -329,7 +329,7 @@ do_posix_spawn(pid_t *pid, const char *path, #ifdef _RFORK_THREAD_STACK_SIZE /* * x86 stores the return address on the stack, so rfork(2) cannot work - * as-is because the child would clobber the return address om the + * as-is because the child would clobber the return address of the * parent. Because of this, we must use rfork_thread instead while * almost every other arch stores the return address in a register. */ From nobody Mon Mar 11 00:29:30 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TtHhp3n3Qz5DDBf; Mon, 11 Mar 2024 00:29: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TtHhp2LyHz4spB; Mon, 11 Mar 2024 00:29:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710116970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xsfKVwrII5J8m9zw9mWaFWDKr3CLGPbYwL1p0Tpzh6c=; b=sEj+sAMKUVxVnmRwhIlaxVsCix3Rpglxvi7sY3Gw/ULf1Qf+6TxBlxd9aGUtDYtDOiFZsS o7OLXbSnJxfNVIx1edUE8cIMjP3MHljNJDoUrfMoaL45Ozn9iuGgz6o8mHG1HsiAhofM4i +QIzqH1Q5/c/Leh+xeAzkQ8LQIzB523lArcQOG6yOUgU1qIlicMk4PlRBCih5prpg5DmjS 85pwKMDsxs15YJixFEsmOAFdmtVhvOeDaXvsOwhefFDSXdb96wtKOww3FPUKx+opmKBMjk n5ZDXRvden/A+hRBIUiLBFcZRC5J0Pzvqv9IgFSaYpy5LYiq/pZzceMG/VNksA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710116970; a=rsa-sha256; cv=none; b=XzClvUQtvdregDE6vJ6SgI59qLxMfuv2h0nnZc1aXjpKPmcJYbANlM3+A1LoPwCK8cVUXO jpF90INfoqgfJEN3N5SYE4CaPRQVUQZO0Q8rFry9/h4kVdBFaw2ucwhRgPVL/oip6y47o6 9xvq/ixr2koMWGtJMbCL9uiW2hwvqbll+cCgUsYp4cafskjkYMkeUKqa+ecRo8+k3RLcwi 4uQJZ6DvoUB+1W3z/Dlx/fsyGyut5EBRsjWICmgFpQgzGQk7PhIkQiDb8c0ntxteS3OvQd SeNFZKWHWSLI97w1c2SeeoVaO6lzT9TYij9GnrgsDeGawLBw0B5Vg415i++mvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710116970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xsfKVwrII5J8m9zw9mWaFWDKr3CLGPbYwL1p0Tpzh6c=; b=k66Fr3dXlkK8TNHNEHUrSjQXvdQPQf0gyGG3yxM4XLStCd6nYFRH88hB7+kJ69lfzEZ2zo y6f1UlUdkFbnJdNmbE0SChA5eI3ODN42k1sr14u6uKcJQmMlBZ8r1b3xnbUQKCuqrnQSLP h7MbiQOr1NhqsCvEJRqy+zaCXyhHlNoK2McUnJ/0fIndzrupui77HgUQY+jzGc+JyXLSvu H6iZybDpyYG/7XKKSQRs6ADUrSQqLqTXMBvEObIp8oK4oqEmK46agxCYjamEPdKSVTWHgE phzODXzKTrJnfEIqztTorDM5y/xV5A/Co5hMF674cT8WS4lZt3RtExAwssKGsA== 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 4TtHhp1rR0z17G5; Mon, 11 Mar 2024 00:29:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42B0TUQA094038; Mon, 11 Mar 2024 00:29:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B0TU9Y094035; Mon, 11 Mar 2024 00:29:30 GMT (envelope-from git) Date: Mon, 11 Mar 2024 00:29:30 GMT Message-Id: <202403110029.42B0TU9Y094035@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: f8b5e5320eee - stable/14 - libc posix_spawn(): explain why rtld can be used after fork List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f8b5e5320eee75b2dfeb965d485d8f97bae729e0 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f8b5e5320eee75b2dfeb965d485d8f97bae729e0 commit f8b5e5320eee75b2dfeb965d485d8f97bae729e0 Author: Konstantin Belousov AuthorDate: 2024-03-06 07:24:22 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-11 00:25:58 +0000 libc posix_spawn(): explain why rtld can be used after fork (cherry picked from commit 2ce23b1f76721e44646fc98ba4e24a113a6d5972) --- lib/libc/gen/posix_spawn.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index d405517ba68d..ee2ce05ff317 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -325,6 +325,11 @@ do_posix_spawn(pid_t *pid, const char *path, * ideal vfork(2) if we get an EINVAL from rfork -- this should only * happen with newer libc on older kernel that doesn't accept * RFSPAWN. + * + * Combination of vfork() (or its equivalent rfork() form) and + * a special property of the libthr rtld locks ensure that + * rtld is operational in the child. In particular, libthr + * rtld locks do not store owner' tid into the lock word. */ #ifdef _RFORK_THREAD_STACK_SIZE /* From nobody Mon Mar 11 00:30:31 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TtHk01673z5DDRN; Mon, 11 Mar 2024 00:30:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TtHjz64C6z4v6c; Mon, 11 Mar 2024 00:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710117031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cpK5VRyLcv4TXf3dSESbY+QATTRnsynY0Y4YZyPlzFA=; b=kboUIno/Avt7dEmxTywaK7YMJKp0e43zm68cPO2XRg8qMPMHnxohJF0gEoT3WKkf6CV8/v A8i54rXsq3f/FXE9FLjf8rDrU/B9X4TF1FsxHuU5ukwX8l90gs9gBtGZI+B0rbqMjnhp3y QWnMDt2seVXd11aPrFGxEuXKHJyWW1lyi6yJ8jPNKl0VarZX5afxzWkwMmP5wiqD/ZgLy/ fCY8eqmDifRdhQVl6AhbbyRNp450o4PpXRGgYiRGM6TVNk/+5Btj+ZAVnHVqaz7SRlK5fF ynpsmpD3ZtJONmIQLxwP1YcsbV0XktjGkKx9FZiKClpEOSu5Qc1QCbpnSIHAyA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710117031; a=rsa-sha256; cv=none; b=Xf0WY80C6tfzoFBwcE01KuRakVoDvSsadFIQkGj1AQ0xhxS26ReaXHkzoNZCkF3Dkjsl2x bopQAekuGaK2CxbOduQTKaK8AjcA/+85iY52tVzL8zDl/EGIaYQhE3KwtgXYRmDBBur9b7 lkgX3akCQRspiOhOsVRWU3Leeksf6RCmFTxn0aNjV6x0dbTWuIGovZ4d/DpOUuDYspX2lX UlS99WvElysR9RRqo3pallHTmASHoEz1Ba/MGRFNUz/RKAPCiiDhBCqrs3hNHaN7aWfute Pywf0pNfsuvCf2+V29OYyWa4N0W7M0GVlq47nNCG6cqVC5Gltupiou1OIf/VVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710117031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cpK5VRyLcv4TXf3dSESbY+QATTRnsynY0Y4YZyPlzFA=; b=pYZBoTn5vfvV3bcwlmbxvLXbhx67blzaksNPfMQGAqfI9dqLEUwSP774INmwTvzDzV0HMj sYTG/5KPyXzSJbT/sfBCCQI7+fyazKbnNqANyJdtSbQhDwJyaVpBBwD+L7bYlnHoz9MYap VXKsiKwOwa4elN3/cK4gunCBo065gsj068glWujv6DSgBVFumCMAz8FjBfvpDTixJJq5iU zfytQpVpwqPqN8HZsDASPu9Odsybhu7Bf/GftyE22Dpgn4IrxShjm1OusEBZtahRQwzX1z T2a8HkD3qbpHtbApe4k43rikE4ekOq/Lc7OvufhJTHUYiCGSlOewln4CwV+aCQ== 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 4TtHjz5NK7z17Lc; Mon, 11 Mar 2024 00:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42B0UVd5002991; Mon, 11 Mar 2024 00:30:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B0UVJk002988; Mon, 11 Mar 2024 00:30:31 GMT (envelope-from git) Date: Mon, 11 Mar 2024 00:30:31 GMT Message-Id: <202403110030.42B0UVJk002988@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 2c34a6f77008 - stable/13 - posix_spawnattr_setflags(3): validate argument List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2c34a6f77008780307df85d9387adf37bf74026f Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2c34a6f77008780307df85d9387adf37bf74026f commit 2c34a6f77008780307df85d9387adf37bf74026f Author: Konstantin Belousov AuthorDate: 2024-03-03 13:19:37 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-11 00:29:51 +0000 posix_spawnattr_setflags(3): validate argument (cherry picked from commit 80ac36c3a2a87a19790eba487466bf70d55f566e) --- lib/libc/gen/posix_spawn.c | 4 ++++ lib/libc/gen/posix_spawnattr_getflags.3 | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index 77f7dd9955cd..49a63bb40501 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -630,6 +630,10 @@ posix_spawnattr_getsigmask(const posix_spawnattr_t * __restrict sa, int posix_spawnattr_setflags(posix_spawnattr_t *sa, short flags) { + if ((flags & ~(POSIX_SPAWN_RESETIDS | POSIX_SPAWN_SETPGROUP | + POSIX_SPAWN_SETSCHEDPARAM | POSIX_SPAWN_SETSCHEDULER | + POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK)) != 0) + return (EINVAL); (*sa)->sa_flags = flags; return (0); } diff --git a/lib/libc/gen/posix_spawnattr_getflags.3 b/lib/libc/gen/posix_spawnattr_getflags.3 index 9a468cbb8b0f..18cf6683e935 100644 --- a/lib/libc/gen/posix_spawnattr_getflags.3 +++ b/lib/libc/gen/posix_spawnattr_getflags.3 @@ -83,9 +83,12 @@ The default value of this attribute is as if no flags were set. .Sh RETURN VALUES The .Fn posix_spawnattr_getflags -and +function returns zero. +The .Fn posix_spawnattr_setflags -functions return zero. +function returns zero on success, and +.Er EINVAL +on failure due to invalid flag specified. .Sh SEE ALSO .Xr posix_spawn 3 , .Xr posix_spawnattr_destroy 3 , From nobody Mon Mar 11 00:30:32 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TtHk11mkGz5DDcX; Mon, 11 Mar 2024 00:30: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TtHk06xvcz4ttH; Mon, 11 Mar 2024 00:30:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710117033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lhQDq065743AEf4+af9GkQDsm/fcBZX8i0uYMjQrFnw=; b=u3ilPiIjplTotE5n4dzJ4UnhYCIDZKjDnmFWjRAd8kMFqVC5gLxaZEGPC6cXALo9HQMlXm RQmg/jmqdy8hTxPSL0ak9y12SNxWjO2bSRstzQYktebOqO6389MkRk+sBb9CtNVJ4e8t0Q F+HRUbR43BVhaxEarC26WcLpWkCWDnng4oAtQVzozL5/QK8XTLioIfHh5EWjF6YHclE7Dl 8XNaBI4mF/uCU2C7lWxEH0TY8XMWLGGBcieC+TKD/8v8gcORqXJWfkEGJgzqwCECgP3J7S qTGOxT9YtyJZt1OmQmnXDf7aAo6WXb41gyPMyGu+BKG6NQo42vQUMv3scz4XwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710117033; a=rsa-sha256; cv=none; b=X3YU8SIDlnDAv6Td+/qKiM/p+khB9+BRJHZYykAIYAlPHwHQsj6E+5otWaSGFSvqUMeBV3 HQMnUurKU0QSJrVldb+Vabf3BXgs3tmFUicYlX1IVGkOj3e0Si92GPnklUIRq1nqIPqZnk mb2heVjeUg91kbQCX9i8UXhOqTjNZYqJmbBKT4ecNGdU3kdVlwL9a8b5Nt0a3mXq/cOHC0 oB5HRHqqLq0TT6BTanA9MZUnHEXVzn66SP4zviAVNr0DH0DU/3sMPQ4gamcvlWNUtB6LH3 FR/XS02mDmRr0unYDF7SWGHFYBL0kCfX3RGJO1KDObWFHfqb7ursu7HldZOW2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710117033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lhQDq065743AEf4+af9GkQDsm/fcBZX8i0uYMjQrFnw=; b=b9Z+5GyhiBYJIWmmyrwL2Q5jkWmOXhk5zwlPuKzMDP3aCDBacuY8uL9HaVaiQJFU7/O2Qj AUX+Wogm2TXULeyuBFR+lUEDk+LBzPjchH05kLZsJTx6yLfjv1e0sB4OQZFXHOvdIPyy9F 3ybB/2eU0GthJlC9iTPp+0OYqahGgE76nOB+QG593lH2U7LR6DX2Q8T/udnmXBwpKFYlQO KPpZoE5GDBVUo7bizEaERt+14ABHEMlOYj2ZFf3lUA38YDZNgwNpft+9N/4GJDJUxmZ38K TNk+ZMZV5JYSCptO6IHlK9E7F5uqRk7qDIMjm04IjO7i0itT1nwqw3qoigtGxQ== 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 4TtHk06LbVz16h1; Mon, 11 Mar 2024 00:30:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42B0UWK5003028; Mon, 11 Mar 2024 00:30:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B0UWJ7003025; Mon, 11 Mar 2024 00:30:32 GMT (envelope-from git) Date: Mon, 11 Mar 2024 00:30:32 GMT Message-Id: <202403110030.42B0UWJ7003025@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: fc287f28dfc9 - stable/13 - posix_spawn(3): add POSIX_SPAWN_DISABLE_ASLR_NP List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fc287f28dfc99bfe47d7a6071f52ddecd9983472 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=fc287f28dfc99bfe47d7a6071f52ddecd9983472 commit fc287f28dfc99bfe47d7a6071f52ddecd9983472 Author: Konstantin Belousov AuthorDate: 2024-03-03 13:30:04 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-11 00:29:51 +0000 posix_spawn(3): add POSIX_SPAWN_DISABLE_ASLR_NP (cherry picked from commit 822042fdfca79faada89e67110b01dd9ecc05996) --- include/spawn.h | 1 + lib/libc/gen/posix_spawn.c | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/include/spawn.h b/include/spawn.h index 9643fcda5c13..a93315930954 100644 --- a/include/spawn.h +++ b/include/spawn.h @@ -59,6 +59,7 @@ typedef struct __posix_spawn_file_actions *posix_spawn_file_actions_t; #define POSIX_SPAWN_SETSCHEDULER 0x08 #define POSIX_SPAWN_SETSIGDEF 0x10 #define POSIX_SPAWN_SETSIGMASK 0x20 +#define POSIX_SPAWN_DISABLE_ASLR_NP 0x40 __BEGIN_DECLS /* diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index 49a63bb40501..eda654a2f7e6 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -29,6 +29,7 @@ #include #include "namespace.h" #include +#include #include #include @@ -92,7 +93,7 @@ static int process_spawnattr(const posix_spawnattr_t sa) { struct sigaction sigact = { .sa_flags = 0, .sa_handler = SIG_DFL }; - int i; + int aslr, i; /* * POSIX doesn't really describe in which order everything @@ -140,6 +141,13 @@ process_spawnattr(const posix_spawnattr_t sa) } } + /* Disable ASLR. */ + if ((sa->sa_flags & POSIX_SPAWN_DISABLE_ASLR_NP) != 0) { + aslr = PROC_ASLR_FORCE_DISABLE; + if (procctl(P_PID, 0, PROC_ASLR_CTL, &aslr) != 0) + return (errno); + } + return (0); } @@ -632,7 +640,8 @@ posix_spawnattr_setflags(posix_spawnattr_t *sa, short flags) { if ((flags & ~(POSIX_SPAWN_RESETIDS | POSIX_SPAWN_SETPGROUP | POSIX_SPAWN_SETSCHEDPARAM | POSIX_SPAWN_SETSCHEDULER | - POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK)) != 0) + POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK | + POSIX_SPAWN_DISABLE_ASLR_NP)) != 0) return (EINVAL); (*sa)->sa_flags = flags; return (0); From nobody Mon Mar 11 00:30:33 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TtHk22RK7z5DDKq; Mon, 11 Mar 2024 00:30: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TtHk20dF4z4trK; Mon, 11 Mar 2024 00:30:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710117034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7szmvXepgFCAAH8siR16vCwlodAs8D/ifzKo+2PuvWw=; b=hBqa00GM6mJPbvxfWoXydQvUIo+QiFRc4oHT9QeI/EdBVTnz++QCFl6kM0cbRIuw4HnRMI /USRXfRlt3+vValnThry0tbHXEvUuEU2HrCUhWje92WUNcpG5RLBnufwjU4UvO0xlbqNle 6vtRiq+M0iXS/RjEXwHshmWjv7hfoJFoc1WEC/c8ei1/c68AsVC+DMq6WCFUKLniV+haPz kKPtDduJgk3SvhM3wNus4XCrLsRsrUpwJWZ+UHN1kVSmU9RG7dPplmNpk0J+4UOnAtqSne OIsFjULnG887sa6uBWkGn7WgG0To0sq1IjU6ZXJdekFuhCYs40E/lxIKGrFxEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710117034; a=rsa-sha256; cv=none; b=QyF4fehfzGJHUbyl/WlWf1VfczdBpaLlW3JFtknkqUsIa5vtBKOaLXVm+7BBU7iRx+/0Ol 5DLJ9V2b1QSLIGs4mPh3qPZvHGdRPL88d8lVwUgeYmqwiX/ZbaxLq7deFmuKbSPKgoBQWH +pyh72xeD3R8EzrMrQ6DvicOuNaBo/XJq3pZLL+EGnXHsrIe/jsOgqJDleFlk5zXHpTSGM XAe9yyxel8Z3lwn0gmbB1mg5Gsd2NlqKhryL/I6m95cssGvzyWTf/2dMAre+mJ6rornS67 A8/BHM7ZzU39DUP65qgNnyZmE1HvP/qSpaWqOCo0TTc5OrUWN4yriWoawH4Jtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710117034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7szmvXepgFCAAH8siR16vCwlodAs8D/ifzKo+2PuvWw=; b=Jmanddpk/7iTSn1D5MXcVSIdeGeTs1rEajq384IwI+Iyx4vujWciR3KNaT27X4uCs8MmIO ZVpBaPnvnwPi37IO4LdYOW3Zwb3q8IEiZb2yvebW2Ljt3uDH3qehc3onqorAzGFIMcnVdS tidI0xBoF3gt9AQYkTy8s5JHEW+ujt/4Ru9W+x+JTkljGplRJaGft7Ya4LlyNTFs64gDlH p2FqlcbxkRzjiEl2iHA//8cXfkUBHUzo/zyN4AzjMjZMoFCSAXhNj8EKTDU59JCSlXz4lK QH+rP+yWuDOuDyyX4LHDTZ5b9L8tCOoBztDO4YS9Ye9qFxlk1bpVuZ2xBXGmuQ== 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 4TtHk20DTsz16h2; Mon, 11 Mar 2024 00:30:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42B0UXHm003064; Mon, 11 Mar 2024 00:30:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B0UXOe003062; Mon, 11 Mar 2024 00:30:33 GMT (envelope-from git) Date: Mon, 11 Mar 2024 00:30:33 GMT Message-Id: <202403110030.42B0UXOe003062@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: b52405d11db5 - stable/13 - posix_spawn(3): document POSIX_SPAWN_DISABLE_ASLR_NP List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b52405d11db5f959106f19568d4a8f94e951cee3 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b52405d11db5f959106f19568d4a8f94e951cee3 commit b52405d11db5f959106f19568d4a8f94e951cee3 Author: Konstantin Belousov AuthorDate: 2024-03-03 22:19:22 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-11 00:29:51 +0000 posix_spawn(3): document POSIX_SPAWN_DISABLE_ASLR_NP (cherry picked from commit a725a7a24de585e996f21e190b5af41261ebc774) --- lib/libc/gen/posix_spawn.3 | 12 +++++++++++- lib/libc/gen/posix_spawnattr_getflags.3 | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/posix_spawn.3 b/lib/libc/gen/posix_spawn.3 index a9ff7b2b21da..55559ae7222b 100644 --- a/lib/libc/gen/posix_spawn.3 +++ b/lib/libc/gen/posix_spawn.3 @@ -32,7 +32,7 @@ .\" the referee document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" -.Dd November 28, 2021 +.Dd March 4, 2024 .Dt POSIX_SPAWN 3 .Os .Sh NAME @@ -297,6 +297,15 @@ and the signals being indicated in the spawn-sigdefault attribute of the object referenced by .Fa attrp . .Pp +The Address Space Layout Randomization for the newly spawned process +can be disabled by specifying the +.Dv POSIX_SPAWN_DISABLE_ASLR_NP +flag in the spawn-flags attribute. +This setting is inherited by future children of the child as well. +See +.Xr procctl 2 +for more details. +.Pp If the value of the .Fa attrp pointer is NULL, then the default values are used. @@ -432,6 +441,7 @@ action. .Xr execve 2 , .Xr fcntl 2 , .Xr open 2 , +.Xr procctl 2 , .Xr sched_setparam 2 , .Xr sched_setscheduler 2 , .Xr setpgid 2 , diff --git a/lib/libc/gen/posix_spawnattr_getflags.3 b/lib/libc/gen/posix_spawnattr_getflags.3 index 18cf6683e935..308bbb386d76 100644 --- a/lib/libc/gen/posix_spawnattr_getflags.3 +++ b/lib/libc/gen/posix_spawnattr_getflags.3 @@ -32,7 +32,7 @@ .\" the referee document. The original Standard can be obtained online at .\" http://www.opengroup.org/unix/online.html. .\" -.Dd March 24, 2008 +.Dd March 4, 2024 .Dt POSIX_SPAWNATTR_GETFLAGS 3 .Os .Sh NAME @@ -75,6 +75,7 @@ It is the bitwise-inclusive OR of zero or more of the following flags .It Dv POSIX_SPAWN_SETSIGMASK .It Dv POSIX_SPAWN_SETSCHEDPARAM .It Dv POSIX_SPAWN_SETSCHEDULER +.It Dv POSIX_SPAWN_DISABLE_ASLR_NP .El .Pp These flags are defined in From nobody Mon Mar 11 00:30:35 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TtHk33qL9z5DDcd; Mon, 11 Mar 2024 00:30: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TtHk31njCz4v1t; Mon, 11 Mar 2024 00:30:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710117035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SNirJomNJ/QpxQQs1mOJodRIw59+GBj7bvXKjnIPZwc=; b=eVtLxPYPfFtFOJxXUJAWz6LP1sPVQSa+TjXyw1mTjL4f6Clnz9HDu/e43XS9WsE5Rq3FoC D/Nlh9gs82JulxuPIUTBT+yb7Kwowm5AyZ8GGtmX6hoZjVsPTK6ir3/DIEIVv+2E9iFuCp w/rV9wt6rmRE6afrdirq4aANUFrJ5AdtoBO7/q7K2i1aVK5yJqA+HQyUp4WA8QIXP2FaXz M1rFhF4wAbjuLJrwAHwcVZb0Q6APRNlD/TEe79WZWZhjJ355n9swa+H/G/qCwZiAhEx3aQ AZ7HI4SN2bkpJx4VfClwV7TCkutOYYvXm4fDToaNKkGcz0NteN0mKRNaO3M8yg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710117035; a=rsa-sha256; cv=none; b=G1jpdbIMIaefsRYkryUxRclsOt55MMZ3MYZHeLE2cLmd/nNS0NpityfnCqtNIfsh0cBq1z eVscc0lTIAHx4zXOLLvhvhcCVYo6LAq8a7OLhcGvbl3AsMoXSW5M27p1IB8w9ooMmMDPx6 0w7w7n0o44cyaO0vcelzsyCFY8EEZsi/gMF4RxJs3j9e2+KkVNsstDhpYsutotHL+Vi4Zo R5pOIDLF9ACJcjkM+nf86TZmMqapExtyaxp3cMpFsqtdhfqfzBtYdNtUwwWojytx7/SEu2 kcpHU5VqyXyy2Sb9cc/M0DippxSi/EWBKhG/iaWbWvVq1Ej6vAHcy6O4cT/5/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710117035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SNirJomNJ/QpxQQs1mOJodRIw59+GBj7bvXKjnIPZwc=; b=ycPHC9Ow9LC3AsPlSEE0EMqVF3SiUcmw1D3BRB06vMs2FT7LW5qqXxkn5RRBZYskGnSTq4 3iqre87N5ZCG6dfG3D0L3/npmghozmBaQ4PkT/di7TBbmHisiRTsoJtTO0SnRuHFtw4RLS ub2nnD6nSZKRuO5cbrt4RkBCQNM2yZHZHZmuJlSKoRrkrJESORpGi+6OW9HC5h3EsK+0Ad cZIzB1HnqUzOxO/3XPPbixdC/cmQdNXs++xlZUi/3lrfE5+nqnG0HjY2WoIu8aNcgwhAdD MXG548aagxcESEKSw9L/53pFiB/UYXlF3zjr5W+lS0os9PwOKQnQacyCc+7okw== 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 4TtHk31FrFz16pY; Mon, 11 Mar 2024 00:30:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42B0UZ5Z003107; Mon, 11 Mar 2024 00:30:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B0UZca003104; Mon, 11 Mar 2024 00:30:35 GMT (envelope-from git) Date: Mon, 11 Mar 2024 00:30:35 GMT Message-Id: <202403110030.42B0UZca003104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d27a8000c4b2 - stable/13 - posix_spawn.c: fix typo in comment List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d27a8000c4b26fea1f417b053550c0fae701fa57 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d27a8000c4b26fea1f417b053550c0fae701fa57 commit d27a8000c4b26fea1f417b053550c0fae701fa57 Author: Konstantin Belousov AuthorDate: 2024-03-06 06:19:16 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-11 00:29:51 +0000 posix_spawn.c: fix typo in comment (cherry picked from commit ebaf907114aa6bda49be4204185072571396bb0d) --- lib/libc/gen/posix_spawn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index eda654a2f7e6..67e6e3a19876 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -330,7 +330,7 @@ do_posix_spawn(pid_t *pid, const char *path, #ifdef _RFORK_THREAD_STACK_SIZE /* * x86 stores the return address on the stack, so rfork(2) cannot work - * as-is because the child would clobber the return address om the + * as-is because the child would clobber the return address of the * parent. Because of this, we must use rfork_thread instead while * almost every other arch stores the return address in a register. */ From nobody Mon Mar 11 00:30:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TtHk50Djbz5DDXQ; Mon, 11 Mar 2024 00:30: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TtHk43BGGz4v01; Mon, 11 Mar 2024 00:30:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710117036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BmL29skH24JotQgGoJl9RjumDg+RyZJQb1Ch8rquBbA=; b=fX0duFRzM8tpSUScWcukcxTNOQfT2WVv5WZWwv326qhB85kjnxx9KEnkfHH1ZZFoTjmjjG Ermowk4Lb52xyVBTj8hsnDA0QbKjXTjIY7qucIHCZnZ1de4htkrBe33LCPKd/A9+VTnO/4 fcZa0VVwKC0tWWurZQl2xknPYj8FGfwvjfyaAyBWlMzhwWUKkpmr3r33EUYwUHQMGeU7Pg RZxQpa1kFVYf2An+IUB7JmArFSnQlBDQo0WUUtcnOUEZ0CSwpJAEdJo0mcN3jZLXyDEV2e 3JON88cRxoF5P2g+ORLXNOsuWj50NM1B5c65FkCA8t1/ieJFmG2+S3fyJkXWHg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710117036; a=rsa-sha256; cv=none; b=HIcfBHN6yox6UK47jeliql9jXTdKAkuAAfhRzlVv8uC2ZC1sB6uvXsBa7wZzmy5JALdVml 8dT65H7pnVdQ5bOR/HEkCrX4LyYi5RREg7pc8zR/70AAkJk5vnQ57lMwB/OvQMRzl5TSLO qQT5F+BPVbi3UDx/MSDnwyJ9M7bgsYs5Yd4fDBOLj2isOEJn9xZA4j7rlId1Q7a9ROYIvr yaPFansqddNaorxirDhKmLWti7WLmjuICBE3k33KsDmJBoQ/BK6DZ6zuWAhoB3G6+F0NVO Esq2G3RYpY4HBT0ca/9pAHLh82mLmSj7S8zJQZZTittoqZ7jaJPmfmC6/YJUvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710117036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BmL29skH24JotQgGoJl9RjumDg+RyZJQb1Ch8rquBbA=; b=b7TBXCREWqxOHK1ACDjZ1mYr2d13Kk7QKdAJLI9EtlRpEkbhQpqK+xcF9+mKAn+5ipPjTV h8apu7dzS0ccySmqABEvKGGDpLkMSXtsHW8Ob4m0wEnaSbpfL6kW1QwVsUBUYHT3IfHMbJ ZafwDcnU7vOfrcKfy8MbnubqaERURKqX9PmS9nG1VzP6Zvcqx963c+3OXPCvsvnezpld3i vAErRoAySKG+hE1Htw33dVMdQS0mf5MEcGvGGKzAQNhvWiK6ArNzJafWncfcjupvQIS5Td OXbF2iNcLdKbEzWrq0wqSRCFVu0Yz+ybetJ++dbBVJlEXfu3SulsKqrh1tpxNw== 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 4TtHk42KdCz16sd; Mon, 11 Mar 2024 00:30:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42B0UavI003175; Mon, 11 Mar 2024 00:30:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B0UarT003172; Mon, 11 Mar 2024 00:30:36 GMT (envelope-from git) Date: Mon, 11 Mar 2024 00:30:36 GMT Message-Id: <202403110030.42B0UarT003172@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: c4e18a7ba35e - stable/13 - libc posix_spawn(): explain why rtld can be used after fork List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c4e18a7ba35e663d6d0765545ab6fd8377c55366 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c4e18a7ba35e663d6d0765545ab6fd8377c55366 commit c4e18a7ba35e663d6d0765545ab6fd8377c55366 Author: Konstantin Belousov AuthorDate: 2024-03-06 07:24:22 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-11 00:29:51 +0000 libc posix_spawn(): explain why rtld can be used after fork (cherry picked from commit 2ce23b1f76721e44646fc98ba4e24a113a6d5972) --- lib/libc/gen/posix_spawn.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c index 67e6e3a19876..064bae186876 100644 --- a/lib/libc/gen/posix_spawn.c +++ b/lib/libc/gen/posix_spawn.c @@ -326,6 +326,11 @@ do_posix_spawn(pid_t *pid, const char *path, * ideal vfork(2) if we get an EINVAL from rfork -- this should only * happen with newer libc on older kernel that doesn't accept * RFSPAWN. + * + * Combination of vfork() (or its equivalent rfork() form) and + * a special property of the libthr rtld locks ensure that + * rtld is operational in the child. In particular, libthr + * rtld locks do not store owner' tid into the lock word. */ #ifdef _RFORK_THREAD_STACK_SIZE /* From nobody Mon Mar 11 00:39:53 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TtHwn4f35z5DFKw; Mon, 11 Mar 2024 00:39: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TtHwn4B1pz3xcs; Mon, 11 Mar 2024 00:39:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710117593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UfHP+r8p1945kTNTPrxLtxvkxMlsHbuMOGdUnPGopkc=; b=JJ4/1iwvliP58qMAOvn+qu8dfl79xKGFzFrGqgWyPq9k3g+YH/m04KiRT8S59UXyfzRVn0 PIAdwG7azmowiTVds6BDqcmdv/iS3DN7NwgRPmpp3guHQsZkzw4avDJvAlct2tLou8MrNT k4EijuulzjoIHx0RCacVIDymy/Jus0Q7QPKAdkZ8DrrnLBzog7KqDJXWKyOAUkZ11vxp6W TRCuENlPcuu2MjNCCNqG7LJA/yTd7syfjFxGi2/qEFyXp2D1lE3iQn/pxxOkdivqq0RqKV e1lSmGihrDa8bJi8juvF4kcXlFaCuDAuCykoYrKYtjmWA+FM+VX6wmzC8lb7oQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710117593; a=rsa-sha256; cv=none; b=jALZAubFH5LVDJCQq911xEwTFNUwar6F/7SR9U1GINSBYuguthA56tQXXc/PRYWguDBimS tKwh/R0MFlyqSqoS2reBdIzRB5VO4I+3HbqeEbkquW4A85VOzQyzWADIoHA+uE+kcqBLJP aTQMIx5wg/2W/GtKqw12sGAZB7RBvWDZOrFihWZupeDGV1acrYUoA9YWxT/6nv0bgSqbrX CFVDmZbcDm5epbvjPsjDZzZuI3BpVLfl7zejR9xU3lWXWciNZVI8fvCDjG+dTyHuOW+z5d /jyh8WqgN6HZ9Zg6h7D6rywbMARGw1cf45HkRbThc4Qe1V67KxANY/dilVJd1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710117593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UfHP+r8p1945kTNTPrxLtxvkxMlsHbuMOGdUnPGopkc=; b=RMAm/XcdZPEgFA96NLOFN2WYEtMsCOWqVw9mRbU5yArj6exgcFRt2hqJ0ZPC7sXc2E6+Fj OR9v/Ks2xy8JdG6em8vxVm2M85kQPn0bN9WhHJfHi+TVQogtQKJSkxE2m3RhUq85sHBfkA 1tuHiO5tkNI3YjutSJQf/Dpxx0kHhG5WEaqzRVPo348SMs7epyOr77Sx8D1W97Gsf3IVuQ wesC4PM6yuWDJMoWtmZ2aNxjDxO8xFyxPBk5PvYIUIj2dFOkwrwKJvN5MGtB/FJRbNPvYV FIUFvA1SDyDNk35vtZn6QmRfOegzsDsoEqAyf1DYYnTGQkHmkfsgU0IscMwCCg== 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 4TtHwn3kS8z17Jk; Mon, 11 Mar 2024 00:39:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42B0drGQ011210; Mon, 11 Mar 2024 00:39:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B0drHg011207; Mon, 11 Mar 2024 00:39:53 GMT (envelope-from git) Date: Mon, 11 Mar 2024 00:39:53 GMT Message-Id: <202403110039.42B0drHg011207@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: f9e317a7b41b - stable/14 - pcm.4: Fix lint warnings List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: f9e317a7b41bdddab124ae58921e2334e707777c Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f9e317a7b41bdddab124ae58921e2334e707777c commit f9e317a7b41bdddab124ae58921e2334e707777c Author: Christos Margiolis AuthorDate: 2024-02-26 23:28:53 +0000 Commit: Christos Margiolis CommitDate: 2024-03-11 00:39:47 +0000 pcm.4: Fix lint warnings Ignore the "manual not found" warnings for snd_ai2s(4) and snd_davbus(4). Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43996 (cherry picked from commit 8bfb23abf882afdca0a0530ef1231ac59963bc4a) --- share/man/man4/pcm.4 | 97 ++++++++++++++++++---------------------------------- 1 file changed, 33 insertions(+), 64 deletions(-) diff --git a/share/man/man4/pcm.4 b/share/man/man4/pcm.4 index 54efd86a2b52..cd0d29519f0c 100644 --- a/share/man/man4/pcm.4 +++ b/share/man/man4/pcm.4 @@ -167,16 +167,16 @@ This will mute the input channel per default. Multichannel audio, popularly referred to as .Dq surround sound is supported and enabled by default. -The FreeBSD multichannel matrix processor supports up to 18 interleaved -channels, but the limit is currently set to 8 channels (as commonly used -for 7.1 surround sound). +The +.Fx +multichannel matrix processor supports up to 18 interleaved channels, but the +limit is currently set to 8 channels (as commonly used for 7.1 surround sound). The internal matrix mapping can handle reduction, expansion or re-routing of channels. This provides a base interface for related multichannel .Fn ioctl support. -Multichannel audio works both with and without -.Tn VCHANs . +Multichannel audio works both with and without VCHANs. .Pp Most bridge device drivers are still missing multichannel matrixing support, but in most cases this should be trivial to implement. @@ -202,21 +202,18 @@ tunable. Each device can optionally support more playback and recording channels than physical hardware provides by using .Dq virtual channels -or -.Tn VCHANs . -.Tn VCHAN -options can be configured via the +or VCHANs. +VCHAN options can be configured via the .Xr sysctl 8 interface but can only be manipulated while the device is inactive. .Ss VPC -FreeBSD supports independent and individual volume controls for each active +.Fx +supports independent and individual volume controls for each active application, without touching the master .Nm volume. This is sometimes referred to as Volume Per Channel (VPC). -The -.Tn VPC -feature is enabled by default. +The VPC feature is enabled by default. .Ss Loader Tunables The following loader tunables are used to set driver configuration at the .Xr loader 8 @@ -238,12 +235,9 @@ Enabling this will make bass and treble controls appear in mixer applications. This tunable is undefined by default. Equalizing is disabled by default. .It Va hint.pcm.%d.vpc -Set to 1 or 0 to explicitly enable (1) or disable (0) the -.Tn VPC -feature. +Set to 1 or 0 to explicitly enable (1) or disable (0) the VPC feature. This tunable is undefined by default. -.Tn VPC -is however enabled by default. +VPC is however enabled by default. .El .Ss Runtime Configuration There are a number of @@ -365,16 +359,12 @@ in possible underruns if the application cannot keep up with a rapid irq rate, especially during high workload. The default value is 1, which is considered a moderate/safe latency profile. .It Va hw.snd.maxautovchans -Global -.Tn VCHAN -setting that only affects devices with at least one playback or recording channel available. -The sound system will dynamically create up to this many -.Tn VCHANs . +Global VCHAN setting that only affects devices with at least one playback or +recording channel available. +The sound system will dynamically create up to this many VCHANs. Set to .Dq 0 -if no -.Tn VCHANs -are desired. +if no VCHANs are desired. Maximum value is 256. .It Va hw.snd.report_soft_formats Controls the internal format conversion if it is @@ -419,13 +409,11 @@ This means that any changes to the volume will be lost. Enabling this will preserve the volume, at the cost of possible confusion when applications tries to re-open the same device. .It Va hw.snd.vpc_mixer_bypass -The recommended way to use the -.Tn VPC -feature is to teach applications to use -the correct +The recommended way to use the VPC feature is to teach applications to use the +correct .Fn ioctl : -.Dv SNDCTL_DSP_GETPLAYVOL, SNDCTL_DSP_SETPLAYVOL, -.Dv SNDCTL_DSP_SETRECVOL, SNDCTL_DSP_SETRECVOL. +.Dv SNDCTL_DSP_GETPLAYVOL , SNDCTL_DSP_SETPLAYVOL , +.Dv SNDCTL_DSP_SETRECVOL , SNDCTL_DSP_SETRECVOL . This is however not always possible. Enable this to allow applications to use their own existing mixer logic to control their own channel volume. @@ -438,30 +426,19 @@ matrixing, rate converting and equalizing. The pure .Nm stream will be fed directly to the hardware. -If -.Tn VCHANs -are enabled, the bitperfect mode will use the -.Tn VCHAN -format/rate as the definitive format/rate target. -The recommended way to use bitperfect mode is to disable -.Tn VCHANs -and enable this sysctl. +If VCHANs are enabled, the bitperfect mode will use the VCHAN format/rate as +the definitive format/rate target. +The recommended way to use bitperfect mode is to disable VCHANs and enable this +sysctl. Default is disabled. .It Va dev.pcm.%d.[play|rec].vchans -The current number of -.Tn VCHANs -allocated per device. -This can be set to preallocate a certain number of -.Tn VCHANs . +The current number of VCHANs allocated per device. +This can be set to preallocate a certain number of VCHANs. Setting this value to .Dq 0 -will disable -.Tn VCHANs -for this device. +will disable VCHANs for this device. .It Va dev.pcm.%d.[play|rec].vchanformat -Format for -.Tn VCHAN -mixing. +Format for VCHAN mixing. All playback paths will be converted to this format before the mixing process begins. By default only 2 channels are enabled. @@ -491,8 +468,7 @@ Quadraphonic, 4 channels (front/rear left and right). 8 channels (4.0 + center + LFE + left and right side). .El .It Va dev.pcm.%d.[play|rec].vchanmode -.Tn VCHAN -format/rate selection. +VCHAN format/rate selection. Available options include: .Bl -tag -width 2n .It fixed @@ -527,9 +503,7 @@ The downside is that the hardware DMA mode needs to be restarted, which may cause annoying pops or clicks. .El .It Va dev.pcm.%d.[play|rec].vchanrate -Sample rate speed for -.Tn VCHAN -mixing. +Sample rate speed for VCHAN mixing. All playback paths will be converted to this sample rate before the mixing process begins. .It Va dev.pcm.%d.polling @@ -552,17 +526,12 @@ Channel statistics are only kept while the device is open. So with situations involving overruns and underruns, consider the output while the errant application is open and running. .Ss IOCTL Support -The driver supports most of the -.Tn OSS +The driver supports most of the OSS .Fn ioctl functions, and most applications work unmodified. A few differences exist, while memory mapped playback is -supported natively and in -.Tn Linux -emulation, memory mapped recording is -not due to -.Tn VM -system design. +supported natively and in Linux emulation, memory mapped recording is not due +to VM system design. As a consequence, some applications may need to be recompiled with a slightly modified audio module. See From nobody Mon Mar 11 04:47:12 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TtPQ83pj9z5Dddd; Mon, 11 Mar 2024 04:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TtPQ83JZWz4KTR; Mon, 11 Mar 2024 04:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710132432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sur33/r07fjOigoVgwI7K2TQ0VskSGcsp0ttUtyYChw=; b=MVE5lgWWhb7lKcnyepVn3c9BlDOMX39+4RL6gjUvNWb4a2A/68Fa61GgJTalhpyPhUm4SY bwls2satVZAaohyTuKJOstX6Bvsh5G3gUgmBUQEgyWnOU2PA+UnjKjW2tWRSkSEpUAp6qp 6rS1l5NWyWa7YgQ7m1WkFFfKR7A/ZqGO9VzYiMpSayqZVM/ldQNuBhYrdkFPhlyE3q8c1v QelBir/FK71hFsJLtnXvQh/cUzUG3ffWK/LiBcrZxDCo34bIIX8kAoDQOOgRkieNOZhdwB A6zOCq08PHPkXV/hq13MLffHXo4oP3lLEZZoH1Uy47EWtkrOKzR1J+s8WDBOnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710132432; a=rsa-sha256; cv=none; b=SnYYcA0Hu3Nm8VQ5rEHvRK6BB/TKI5Eq9+OPN/3LET5g1cNqoZx8oAaXh+8+5gqBcFEsVs mErgtFQ47axvvuPD3OO9z5yp0fPL5oqS/OANCiVoSXZzPlXpt3aWWkGpNG4oYLk6W0Gaiq jPOGVq+qKKFSF9Mr+WwWMZdNI2KFErRUaDoe6fIIcF5fNYg8w7aLxW/NvaA+kiAjk8NgVx 2LIykcYboRD2+AruHLPwcpd549WD5PAtqrRmcLFGmItbyduYyze7PGg6Ykpxqvg233Ma+a NXU2ABzdUlDjduusc3Np7ZeJn8Oi390ZT+GPMl1rOu0yBowJ7LJ7LAqkkRAHCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710132432; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sur33/r07fjOigoVgwI7K2TQ0VskSGcsp0ttUtyYChw=; b=YrJxBLNlaKzNz7hdVI2OYDVCGX22ZrkwCbMhFW+ArV9wCD2kLmdTm/rlzecGB2KcDkzD3v HhqvKCL9Oe+oh/Y0wBowP1LICuR/XHFfG5ebstdByvbwnvRJ3JKtNd0vLjtmfuPybGnThW aoA5dmXqh4BMSBbjt2zmlXCU8lX8u+PcMHnptYfZMoP3LhVg1Lj9TAcHUue+kYCHN7PBTP ae4cEX4rptkQHrarUNvk8ko/ehy2K+MhYpBXi4gweaxeMPX1PCFJqYvO6u4ULT5YY/Mlrn +HxO2YWxurAYW87SLgwUy6R1NmlCaZhSYKvFHurOyiro8xHAvRJ9zWjt+hAZkw== 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 4TtPQ82ngbzFPV; Mon, 11 Mar 2024 04:47:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42B4lCqd034380; Mon, 11 Mar 2024 04:47:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B4lCJH034377; Mon, 11 Mar 2024 04:47:12 GMT (envelope-from git) Date: Mon, 11 Mar 2024 04:47:12 GMT Message-Id: <202403110447.42B4lCJH034377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wei Hu Subject: git: 0010132dbd24 - stable/14 - Hyper-V: vPCI: fix cpu id mis-mapping in vmbus_pcib_map_msi() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0010132dbd24b9d23a1f9c4a9961b7593438fa34 Auto-Submitted: auto-generated The branch stable/14 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=0010132dbd24b9d23a1f9c4a9961b7593438fa34 commit 0010132dbd24b9d23a1f9c4a9961b7593438fa34 Author: Wei Hu AuthorDate: 2024-03-08 10:00:25 +0000 Commit: Wei Hu CommitDate: 2024-03-11 04:23:18 +0000 Hyper-V: vPCI: fix cpu id mis-mapping in vmbus_pcib_map_msi() The msi address contains apic id. The code in vmbus_pcib_map_msi() treats it as cpu id, which could cause mis-configuration of msix IRQs, leading to missing interrupts for SRIOV devices. This happens when apic id is not the same as cpu id on certain large VM sizes with multiple numa domains in Azure. Fix this issue by correctly mapping apic ids to cpu ids. On vPCI version before 1.4, it only supports up to 64 vcpus for msi/msix interrupt. This change also adds a check and returns error if the vcpu_id is greater than 63. Reported by: NetApp Tested by: whu Sponsored by: Microsoft (cherry picked from commit 999174ba03642fa63c9654752993a62db461afc9) --- sys/dev/hyperv/pcib/vmbus_pcib.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c index da722eb0b834..be66393a7ab4 100644 --- a/sys/dev/hyperv/pcib/vmbus_pcib.c +++ b/sys/dev/hyperv/pcib/vmbus_pcib.c @@ -67,6 +67,7 @@ #if defined(__i386__) || defined(__amd64__) #include #include +#include #endif #if defined(__aarch64__) #include @@ -1891,11 +1892,21 @@ vmbus_pcib_map_msi(device_t pcib, device_t child, int irq, vcpu_id = VMBUS_GET_VCPU_ID(device_get_parent(pcib), pcib, cpu); vector = v_data; #else - cpu = (v_addr & MSI_INTEL_ADDR_DEST) >> 12; + cpu = apic_cpuid((v_addr & MSI_INTEL_ADDR_DEST) >> 12); vcpu_id = VMBUS_GET_VCPU_ID(device_get_parent(pcib), pcib, cpu); vector = v_data & MSI_INTEL_DATA_INTVEC; #endif + if (hpdev->hbus->protocol_version < PCI_PROTOCOL_VERSION_1_4 && + vcpu_id > 63) { + /* We only support vcpu_id < 64 before vPCI version 1.4 */ + device_printf(pcib, + "Error: " + "vcpu_id %u overflowed on PCI VMBus version 0x%x\n", + vcpu_id, hpdev->hbus->protocol_version); + return (ENODEV); + } + init_completion(&comp.comp_pkt.host_event); memset(&ctxt, 0, sizeof(ctxt)); From nobody Mon Mar 11 04:54:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TtPZF4XHyz5DfGZ; Mon, 11 Mar 2024 04:54: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TtPZF3sDcz4LgH; Mon, 11 Mar 2024 04:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710132853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A869HA9MCfAjYPKrwxXyW9F3foXqLcM2Z3TGjlYR6uM=; b=sglWQo9KN/OEOuhkKmSJIT2f2raIzac1EdFzBMdHwqNjiVC8D2wgTZkYOCEoxIL9M/7Dt6 I5pcSEcv3ZII1n4ZPcipkmLwwruhu7719Jwdvbe8xnCBnnttE5l41Gqp3uzE07njYbFUc8 hQHg9S4XK95II2GMToiGR4xVXuGPpPynqhItq5clxzvANdHKzomsrmonUHnc/+GmQyp0PL O4jJmjnfxeDZlVUMg6SNPEVLem8nELVSiKYLGTUtGSxHP9SeWxcVbNRtDSu0WnH57+GQ0y 0jUoWdwbUTHJVOw952iAL0qNi7iG8bCTXpQY72JssTBePOKCFVwGqdohuko4+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710132853; a=rsa-sha256; cv=none; b=YjPBpL1dlE28qOBG/MdBzhaif5Dt4anVD8JqjU0twvqeL1kOcpp5RiZZLs86+v3W6FnIbo GBdPVeh1ltpharwPl5a1IJZX5yGBEjiRnAPlW1LewL6HPbQ9CLaqEl+Um5L2N/4ofvLEmv l7pajZjzArykYLxjZjNrDzidwfdVfaUgiRToOF2pNbk74r6ONCgkHg4dCgg7WOdwADSCEf TBJnDl4j5YlapToo3hIZRi3pg4/QFTdRpophlsZe/bUk7BbELYtKcvX/iiRGJ4IoCFnGGP 5qGt9K+H74jzjt7ZAF/6KHJdnurz1RQZkJ1KulY8y6cAgia67TsJq9hZi4kelw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710132853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A869HA9MCfAjYPKrwxXyW9F3foXqLcM2Z3TGjlYR6uM=; b=G4rkG2noWpqcJMP56fey6VKQ502L5pIpnKz8in7+QpnhaM+21qJdggdu00h9gj32DJG4R3 QIJD3kY4WWv7MYQ2qCvPTBuFCwd0L/B8Qon1UObx8VCC/PZVPvWa5sXCbf5ACZkavI+vyL wE4QQ4eumvAkAeojtFcna+NRBR69a368PDvCTApbCWuMZES93d8ue4SBIXhBcKYx1/0e6o YL5emnIo1XsoWJXWg60semuZfkEFWaBbZyfZcW3xp2+euKhY1HcgnezQ929m4q5k43wTQ7 /6VLSjgdCrdK0v1pad/g0gw4eocc7M6J64k+kpFUQQfZR9n8c4dE0ZtqkDl9nA== 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 4TtPZF3SLkzG5S; Mon, 11 Mar 2024 04:54:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42B4sD3T050356; Mon, 11 Mar 2024 04:54:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B4sDDX050353; Mon, 11 Mar 2024 04:54:13 GMT (envelope-from git) Date: Mon, 11 Mar 2024 04:54:13 GMT Message-Id: <202403110454.42B4sDDX050353@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: 07de733b1f55 - stable/14 - MFC: liblzma: don't export lzma_lz_decoder_uncompressed List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 07de733b1f558ab82cd4463c8ab3ee12975d0831 Auto-Submitted: auto-generated The branch stable/14 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=07de733b1f558ab82cd4463c8ab3ee12975d0831 commit 07de733b1f558ab82cd4463c8ab3ee12975d0831 Author: Brooks Davis AuthorDate: 2024-03-07 00:54:22 +0000 Commit: Xin LI CommitDate: 2024-03-11 04:53:46 +0000 MFC: liblzma: don't export lzma_lz_decoder_uncompressed It was removed in the 5.4.0 import. (cherry picked from commit 023fa553bf0000837738ce3ba118921ee24e3792) --- lib/liblzma/Symbol.map | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/liblzma/Symbol.map b/lib/liblzma/Symbol.map index 3b58bc759e75..938b6191b4f4 100644 --- a/lib/liblzma/Symbol.map +++ b/lib/liblzma/Symbol.map @@ -142,7 +142,6 @@ XZprivate_1.0 { lzma_index_prealloc; lzma_lz_decoder_init; lzma_lz_decoder_memusage; - lzma_lz_decoder_uncompressed; lzma_lz_encoder_init; lzma_lz_encoder_memusage; lzma_lzma2_block_size; From nobody Mon Mar 11 04:54:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TtPZk2hD0z5DfK3; Mon, 11 Mar 2024 04:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TtPZk22XVz4Lbv; Mon, 11 Mar 2024 04:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710132878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SKiVI3WvjTGsf4nozJyS+WfOZmZ7B9gkA5M0M7aADMM=; b=e5s1U8HMtj46Q43StI2Hz2IwXvDA5F5zQO568/EP2ccZvB4Hb1jlsHAunDBm+hAH3nb4vd 2j7x7kySfHeqB/HUEdk5I4/CAeYGA2fJizxl+JOxt0DNoi+XJzvRoMkHPwr9UkXOD2RDv3 pRtr9nn7mthL5Ach/I7PG2s1RzyFHgOOrx2e8CbDslI3rnHOliuKoNwoTVbZp3dIhPY5qE IJVsBZnDDlij6cN8NasTWWgDzUOaza1Mg9iqXVq7ZW7BDc6cnMY5sDaDCcOeUGKGn6FC9w cn0pZ6+KqnVg6P4GApIUTINDL3g50vImB8HwCyVQyp7cqvFHCpJsM6jyljvQqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710132878; a=rsa-sha256; cv=none; b=xUzMZbknbGaLtX5dbLtvZ+qrnoUt/0+1fHe8lAqYcBE+GzizI5rVrNwywkaycJOIy0wbTI cETr0V2mrCLoCNezKfQ0Yfl+/ykeTmT/UjJSYI66LywQmf/ehMpEGPH1KG3Htdn3QyDJuk 5s5Y1AGzM1hqCVO3YIEfrT4bpg8TZBg/UmT58yAH4B+z1Pa48eX52rRZRpVIP106KYtz55 FqRhaCcBVyndpfWJUXgwA/BQPvVZaLcM/Xs36hIGMOLAXxw5MCE51CpA3ruZWOWb+o59tF x2deQKD4eH8rw2sfaC2kJiZ6vkL03voDn6M3DwBN6cjry6pkKqTKHxXiXSYR5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710132878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SKiVI3WvjTGsf4nozJyS+WfOZmZ7B9gkA5M0M7aADMM=; b=NxGi1wzATv0ONjZ5SmsjKStLSdQx9folvsr/Fy2zbB6c9TTr+HmOcMuueqonWuU22Xwyjl gl0FqOdOGqAoXANqrXw+aLVG9L+lHBBVn02w2VUs7Mpl3zkrDMnaBZRHB8/x1pqPdlUlHy LkZQsT2VCDYqYUmWs5W19l+I9iEtzCVjWW0Wv6pWo1qLW3rfon/eWLiY4i81DnwAUCvCfH vwJAP6mEJuAQf7HFaOgVL6Yc5TL09tKElBdDr9dQu1MCJ9CpWbVB1JSfdWqDRc5y1uLwWa fPCtQVklMRuEG1O1UwyAhkcWuW1XzVVSeoEeTCN7+c3nr+QnNlqvNd0csc7VOQ== 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 4TtPZk1f7JzGYT; Mon, 11 Mar 2024 04:54:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42B4scnc050542; Mon, 11 Mar 2024 04:54:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B4sc6q050539; Mon, 11 Mar 2024 04:54:38 GMT (envelope-from git) Date: Mon, 11 Mar 2024 04:54:38 GMT Message-Id: <202403110454.42B4sc6q050539@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Xin LI Subject: git: 6b7800eea4ea - stable/13 - liblzma: don't export lzma_lz_decoder_uncompressed List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 6b7800eea4ea3442ff6d7cb5f23b49313cdb7915 Auto-Submitted: auto-generated The branch stable/13 has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=6b7800eea4ea3442ff6d7cb5f23b49313cdb7915 commit 6b7800eea4ea3442ff6d7cb5f23b49313cdb7915 Author: Brooks Davis AuthorDate: 2024-03-07 00:54:22 +0000 Commit: Xin LI CommitDate: 2024-03-11 04:54:30 +0000 liblzma: don't export lzma_lz_decoder_uncompressed It was removed in the 5.4.0 import. Reviewed by: delphij Differential Revision: https://reviews.freebsd.org/D44247 (cherry picked from commit 023fa553bf0000837738ce3ba118921ee24e3792) --- lib/liblzma/Symbol.map | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/liblzma/Symbol.map b/lib/liblzma/Symbol.map index 3b58bc759e75..938b6191b4f4 100644 --- a/lib/liblzma/Symbol.map +++ b/lib/liblzma/Symbol.map @@ -142,7 +142,6 @@ XZprivate_1.0 { lzma_index_prealloc; lzma_lz_decoder_init; lzma_lz_decoder_memusage; - lzma_lz_decoder_uncompressed; lzma_lz_encoder_init; lzma_lz_encoder_memusage; lzma_lzma2_block_size; From nobody Mon Mar 11 05:30:28 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TtQN44JtHz5Dj5q; Mon, 11 Mar 2024 05:30:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TtQN43nDRz4NfZ; Mon, 11 Mar 2024 05:30:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710135028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xgwEcBytZ2QSmD4UXdUBKW1FN28r6BBBRxgrwEaBqU4=; b=GVB5Xe4BKzZqDI5FAVF5ojXOK6x9+aDuScmlGb6JTEDJioMWouCDIZhen5bklUHkiMvSRj HQM/5YlH82JM5RPVTWTJ0rvXIg5kijiNMv/TsT7bk/21SxQXmXcpTUqgF59ymWRfwSfaJd O5Dbheco3fhZfyBE5S6KczXmnB8LvYBQwzV00v11zK6EUd/6ku8qxo3zlh8Aw53v60mdxn JKZa2h+qOaDN2JQv63chLJF13wsZdLiNhcNBovnBoNK21jbndiLjf8r2tba3nKgtlXu1N1 XlShp8qvfjIdulGpBcq0IyAff+q9zN6PtZQbCnHEjw1c1+qS7KkIGwYFGc7ObQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710135028; a=rsa-sha256; cv=none; b=qveezlRxSrhuEM3xLsb+qd5TYypFNgkD28V/or+M65avxg/wwfUkd5GN0sRfikUYzJ69wa K5lZdDJ+HHzMtOQwT37gFDiYFxoqEKBL+CWlSJns6WWouGv2WaHKOpEOWmk9peJqCTonmx HxMhzA5DOQDysBcfPDnxioYEa3qoK7Gklk8TvXfVHG7J9+Ytp/aVZ0nSBrGu0v0c//d4r/ 355DJ6mScfB7OZTTSj+PmMHeI8RpPovNoOsZB93pJLWooqeFce+G5HAwg4TWr4gDoGL5J0 AvsUpmXyYOFbQsPqqLHEqXZva6o0HYRXCfWr3bY+gPApNfZ5CKvHUNYQARdwJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710135028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xgwEcBytZ2QSmD4UXdUBKW1FN28r6BBBRxgrwEaBqU4=; b=xf+k1y8wvwDNsrQ+UJR2CxEvGcBKquHFgx3tL1k9In7cAdq5gIa/y8UsTm05w2ASPKRkWg pPLEsh+vm8WD6dw8zFtvMxuyTbBRJh/9abIL59/HvvpIqI4tNjANbyGTNdPEr4Nwbl4apD OE21H/6UNUv86c9s3fLwpSzHBPJzLQWsF+hO1A/QUgYrwoWvh/kBqEDoivABjlbB93BLRY jyDFcdIxxIWBKKiT+WiUuEHfFW72drjn59ebi500scQKxLfdNdJ8/zF7Q48eCcf6xPG26O a1NKa7GNh8GUHs7DtvGCoGNqLob5zpZImfSnootlnttS2g9/AnHoI8YeW457RQ== 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 4TtQN43NZpzHJ0; Mon, 11 Mar 2024 05:30:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42B5US3K011264; Mon, 11 Mar 2024 05:30:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42B5US4E011261; Mon, 11 Mar 2024 05:30:28 GMT (envelope-from git) Date: Mon, 11 Mar 2024 05:30:28 GMT Message-Id: <202403110530.42B5US4E011261@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wei Hu Subject: git: fa397e50fd88 - stable/13 - Hyper-V: vPCI: fix cpu id mis-mapping in vmbus_pcib_map_msi() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fa397e50fd8820446d44b90cf4017bd31e264c76 Auto-Submitted: auto-generated The branch stable/13 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=fa397e50fd8820446d44b90cf4017bd31e264c76 commit fa397e50fd8820446d44b90cf4017bd31e264c76 Author: Wei Hu AuthorDate: 2024-03-11 05:24:53 +0000 Commit: Wei Hu CommitDate: 2024-03-11 05:29:52 +0000 Hyper-V: vPCI: fix cpu id mis-mapping in vmbus_pcib_map_msi() The msi address contains apic id. The code in vmbus_pcib_map_msi() treats it as cpu id, which could cause mis-configuration of msix IRQs, leading to missing interrupts for SRIOV devices. This happens when apic id is not the same as cpu id on certain large VM sizes with multiple numa domains in Azure. Fix this issue by correctly mapping apic ids to cpu ids. On vPCI version before 1.4, it only supports up to 64 vcpus for msi/msix interrupt. This change also adds a check and returns error if the vcpu_id is greater than 63. (cherry picked from commit 999174ba03642fa63c9654752993a62db461afc9) Reported by: NetApp Tested by: whu Sponsored by: Microsoft --- sys/dev/hyperv/pcib/vmbus_pcib.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c index 037ea7032184..ec80d97a959f 100644 --- a/sys/dev/hyperv/pcib/vmbus_pcib.c +++ b/sys/dev/hyperv/pcib/vmbus_pcib.c @@ -63,6 +63,7 @@ #include #include +#include #include #include @@ -1804,10 +1805,17 @@ vmbus_pcib_map_msi(device_t pcib, device_t child, int irq, } } - cpu = (v_addr & MSI_INTEL_ADDR_DEST) >> 12; + cpu = apic_cpuid((v_addr & MSI_INTEL_ADDR_DEST) >> 12); vcpu_id = VMBUS_GET_VCPU_ID(device_get_parent(pcib), pcib, cpu); vector = v_data & MSI_INTEL_DATA_INTVEC; + if (vcpu_id > 63) { + /* We only support vcpu_id < 64 on current vPCI version*/ + device_printf(pcib, + "Error: vcpu_id %u overflowed\n", vcpu_id); + return (ENODEV); + } + init_completion(&comp.comp_pkt.host_event); memset(&ctxt, 0, sizeof(ctxt)); From nobody Mon Mar 11 12:35:06 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ttbp26FDxz5CtrK; Mon, 11 Mar 2024 12:35: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ttbp25b8Xz4CSB; Mon, 11 Mar 2024 12:35:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710160506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GtWfp9ybd0ohk61HD6gQrRV2asXQiC2HgrELwjoG9lo=; b=rwYILAqopR86W7YESFTq7KGlov7M8KSTqE/U15aZZc0a9GdbxFEVvS9wOOV5+273cX6qZE wDSYjtSEiEDE9wnXhSZpGbp8o/aBGkA+3g99u1JRk/chf16WFnVVK0Vcdc+Oi22WnvhD9Z Y1C4oom5ONXlqFx8FlAkEDE+SrB3CrXnAs5KK37nW8RTO3IxAy4HmGTVbTLyY3xLHFxfal e1UehWbdU2QLetHpV/bl2QdgGk3Yk6MPYLT1MeQsmjT4spTaalLvPqzRg93YCna9s1g2eY rQ975cbTryQAcmz7f3DQ/NsobGORfx7MjOt1gQ6nrCyyRD37hS4bLksnxh+2tQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710160506; a=rsa-sha256; cv=none; b=iBsol+XKhEjQWfqfLF0N/TepF/zg+ZLV+sTty5nJlffl+/ZtTr8IblcXEMhEJnDdOqjcBS K294t+MdUZT7dx6nk9oxLqtZzbk4GkmSZPsl4hOmS8qIVYzWxak0X+6sIooewjUjp+LRde SDO22U0at9hrYp7ZFo5u4iGDLGcZ/Aq2oFcI9wDV3R6/kNVShB4bjqnsgurTzQcOCLJ0QI qHoCPzkbgSw0rsEHNYm8sD6/q2YZbwcl80wPE8NZ3+If7WJZBysN+tbL5YmPrbmDYvkOLq 07W6yhU2phTROoTkyLxARv5q0rRlwfiuZFee7mNqryMLaAhcYjm1gFR1gYSSwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710160506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GtWfp9ybd0ohk61HD6gQrRV2asXQiC2HgrELwjoG9lo=; b=gfpOt+meEwIqz1b8wSrvsKapiUAHhO/DTG5EopS+P653+UtFpeDR1MJQechQDuNV0B3nB/ 5tDxR2iSyJnGQ5RnR3lKA6VuOd5U4olWyEyGrae0rlQGIxYmqzkc9dNVTkndR5LpzOrOny vx/xRCRM7a2VVxCVYXKXD8cyfwtESTdTLZdOZIM3iNwO5F01jmoWLZrJR3B8+5EXCj7u1I kkOR8sepurEpTPSe5tixhwrTG7a6lYnHSjAvsGru/eSOfmprouPrNI/4hECLcbUY+8MbCI e+uZAThCWl5SxIit/KPorXxnUPK/RXuLVc2/r6mRtvQ3b7C1pwSQ5Ew1QuWv+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ttbp24tL0zVk2; Mon, 11 Mar 2024 12:35:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42BCZ60p028901; Mon, 11 Mar 2024 12:35:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42BCZ6Tf028898; Mon, 11 Mar 2024 12:35:06 GMT (envelope-from git) Date: Mon, 11 Mar 2024 12:35:06 GMT Message-Id: <202403111235.42BCZ6Tf028898@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: da2905289748 - stable/14 - diff: Fix --expand-tabs and --side-by-side. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: da290528974846d3ed49138ca0f2de7fff02eaf6 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=da290528974846d3ed49138ca0f2de7fff02eaf6 commit da290528974846d3ed49138ca0f2de7fff02eaf6 Author: Dag-Erling Smørgrav AuthorDate: 2024-02-26 18:08:06 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-03-11 12:19:06 +0000 diff: Fix --expand-tabs and --side-by-side. * Overhaul column width and padding calculation. * Rewrite print_space() so it is now a) correct and b) understandable. * Rewrite tab expansion in fetch() for the same reason. This brings us in line with GNU diff for all cases I could think of. Sponsored by: Klara, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44014 (cherry picked from commit 53de23f4d140becc3166e87665b0064f215a220e) diff: Bump manual page date. Sponsored by: Klara, Inc. (cherry picked from commit 312b1076c6b0aff9bbcaff058b93385eaf607685) --- usr.bin/diff/diff.1 | 11 ++++- usr.bin/diff/diff.c | 12 ++---- usr.bin/diff/diffreg.c | 113 ++++++++++++++++++++++++++++--------------------- 3 files changed, 79 insertions(+), 57 deletions(-) diff --git a/usr.bin/diff/diff.1 b/usr.bin/diff/diff.1 index e04aeb5d6d67..d3978158d1d1 100644 --- a/usr.bin/diff/diff.1 +++ b/usr.bin/diff/diff.1 @@ -29,7 +29,7 @@ .\" .\" @(#)diff.1 8.1 (Berkeley) 6/30/93 .\" -.Dd March 10, 2022 +.Dd February 26, 2024 .Dt DIFF 1 .Os .Sh NAME @@ -429,6 +429,15 @@ Output at most .Ar number columns when using side by side format. The default value is 130. +Note that unless +.It Fl t +was specified, +.Nm +will always align the second column to a tab stop, so values of +.Fl -width +smaller than approximately five times the value of +.Fl -tabsize +may yield surprising results. .It Fl -changed-group-format Ar GFMT Format input groups in the provided .Pp diff --git a/usr.bin/diff/diff.c b/usr.bin/diff/diff.c index 03eb363fc323..d947c1e01705 100644 --- a/usr.bin/diff/diff.c +++ b/usr.bin/diff/diff.c @@ -276,10 +276,8 @@ main(int argc, char **argv) break; case 'W': width = (int) strtonum(optarg, 1, INT_MAX, &errstr); - if (errstr) { - warnx("Invalid argument for width"); - usage(); - } + if (errstr) + errx(1, "width is %s: %s", errstr, optarg); break; case 'X': read_excludes_file(optarg); @@ -317,10 +315,8 @@ main(int argc, char **argv) break; case OPT_TSIZE: tabsize = (int) strtonum(optarg, 1, INT_MAX, &errstr); - if (errstr) { - warnx("Invalid argument for tabsize"); - usage(); - } + if (errstr) + errx(1, "tabsize is %s: %s", errstr, optarg); break; case OPT_STRIPCR: dflags |= D_STRIPCR; diff --git a/usr.bin/diff/diffreg.c b/usr.bin/diff/diffreg.c index 11aefb73cda6..8042003cd836 100644 --- a/usr.bin/diff/diffreg.c +++ b/usr.bin/diff/diffreg.c @@ -169,7 +169,6 @@ struct context_vec { enum readhash { RH_BINARY, RH_OK, RH_EOF }; -#define MIN_PAD 1 static FILE *opentemp(const char *); static void output(char *, FILE *, char *, FILE *, int); static void check(FILE *, FILE *, int); @@ -209,7 +208,7 @@ static int len[2]; static int pref, suff; /* length of prefix and suffix */ static int slen[2]; static int anychange; -static int hw, padding; /* half width and padding */ +static int hw, lpad, rpad; /* half width and padding */ static int edoffset; static long *ixnew; /* will be overlaid on file[1] */ static long *ixold; /* will be overlaid on klist */ @@ -254,21 +253,44 @@ diffreg(char *file1, char *file2, int flags, int capsicum) lastline = 0; lastmatchline = 0; - /* - * hw excludes padding and make sure when -t is not used, - * the second column always starts from the closest tab stop - */ + /* + * In side-by-side mode, we need to print the left column, a + * change marker surrounded by padding, and the right column. + * + * If expanding tabs, we don't care about alignment, so we simply + * subtract 3 from the width and divide by two. + * + * If not expanding tabs, we need to ensure that the right column + * is aligned to a tab stop. We start with the same formula, then + * decrement until we reach a size that lets us tab-align the + * right column. We then adjust the width down if necessary for + * the padding calculation to work. + * + * Left padding is half the space left over, rounded down; right + * padding is whatever is needed to match the width. + */ if (diff_format == D_SIDEBYSIDE) { - hw = width >> 1; - padding = tabsize - (hw % tabsize); - if ((flags & D_EXPANDTABS) != 0 || (padding % tabsize == 0)) - padding = MIN_PAD; - - hw = (width >> 1) - - ((padding == MIN_PAD) ? (padding << 1) : padding) - 1; + if (flags & D_EXPANDTABS) { + if (width > 3) { + hw = (width - 3) / 2; + } else { + /* not enough space */ + hw = 0; + } + } else if (width <= 3 || width <= tabsize) { + /* not enough space */ + hw = 0; + } else { + hw = (width - 3) / 2; + while (hw > 0 && roundup(hw + 3, tabsize) + hw > width) + hw--; + if (width - (roundup(hw + 3, tabsize) + hw) < tabsize) + width = roundup(hw + 3, tabsize) + hw; + } + lpad = (width - hw * 2 - 1) / 2; + rpad = (width - hw * 2 - 1) - lpad; } - if (flags & D_IGNORECASE) chrtran = cup2low; else @@ -869,7 +891,7 @@ output(char *file1, FILE *f1, char *file2, FILE *f2, int flags) while (i0 <= m && J[i0] == J[i0 - 1] + 1) { if (diff_format == D_SIDEBYSIDE && suppress_common != 1) { nc = fetch(ixold, i0, i0, f1, '\0', 1, flags); - print_space(nc, (hw - nc) + (padding << 1) + 1, flags); + print_space(nc, hw - nc + lpad + 1 + rpad, flags); fetch(ixnew, J[i0], J[i0], f2, '\0', 0, flags); printf("\n"); } @@ -1147,10 +1169,10 @@ proceed: else if (color && c > d) printf("\033[%sm", del_code); if (a > b) { - print_space(0, hw + padding , *pflags); + print_space(0, hw + lpad, *pflags); } else { nc = fetch(ixold, a, b, f1, '\0', 1, *pflags); - print_space(nc, hw - nc + padding, *pflags); + print_space(nc, hw - nc + lpad, *pflags); } if (color && a > b) printf("\033[%sm", add_code); @@ -1159,7 +1181,7 @@ proceed: printf("%c", (a > b) ? '>' : ((c > d) ? '<' : '|')); if (color && c > d) printf("\033[m"); - print_space(hw + padding + 1 , padding, *pflags); + print_space(hw + lpad + 1, rpad, *pflags); fetch(ixnew, c, d, f2, '\0', 0, *pflags); printf("\n"); } @@ -1265,30 +1287,24 @@ fetch(long *f, int a, int b, FILE *lb, int ch, int oldfile, int flags) printf("\n\\ No newline at end of file\n"); return (col); } - /* - * when using --side-by-side, col needs to be increased - * in any case to keep the columns aligned - */ if (c == '\t') { - if (flags & D_EXPANDTABS) { - newcol = ((col / tabsize) + 1) * tabsize; - do { - printf(" "); - } while (++col < newcol && col < hw); + /* + * Calculate where the tab would bring us. + * If it would take us to the end of the + * column, either clip it (if expanding + * tabs) or return right away (if not). + */ + newcol = roundup(col + 1, tabsize); + if ((flags & D_EXPANDTABS) == 0) { + if (hw > 0 && newcol >= hw) + return (col); + printf("\t"); } else { - if (diff_format == D_SIDEBYSIDE) { - if ((col + tabsize) > hw) { - printf("%*s", hw - col, ""); - col = hw; - } else { - printf("\t"); - col += tabsize - 1; - } - } else { - printf("\t"); - col++; - } + if (hw > 0 && newcol > hw) + newcol = hw; + printf("%*s", newcol - col, ""); } + col = newcol; } else { if (diff_format == D_EDIT && j == 1 && c == '\n' && lastc == '.') { @@ -1668,18 +1684,19 @@ print_header(const char *file1, const char *file2) * nc is the preceding number of characters */ static void -print_space(int nc, int n, int flags) { - int i, col; +print_space(int nc, int n, int flags) +{ + int col, newcol, tabstop; - col = n; + col = nc; + newcol = nc + n; + /* first, use tabs if allowed */ if ((flags & D_EXPANDTABS) == 0) { - /* first tabstop may be closer than tabsize */ - i = tabsize - (nc % tabsize); - while (col >= tabsize) { + while ((tabstop = roundup(col + 1, tabsize)) <= newcol) { printf("\t"); - col -= i; - i = tabsize; + col = tabstop; } } - printf("%*s", col, ""); + /* finish with spaces */ + printf("%*s", newcol - col, ""); } From nobody Mon Mar 11 12:35:07 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ttbp371Ygz5Ctp2; Mon, 11 Mar 2024 12:35: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ttbp369t5z4Bt9; Mon, 11 Mar 2024 12:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710160507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E2XhIF8XnunSRuMQdZKzRzl2pq87tELQVU39kBbZkhY=; b=MhYzzv3Hgn0S8WVaeDl/0bZF6lg2twKeFnQaJomps461MpHYq7C1ZB82t3tfB10hJFPf/s AwEQBdR/CFtmM2llXq+QKPa1mvkSDHnlNtqMHZVs+hSAVGPN6Y7DS2O0M67FoUskwWKi05 zOytFyhirmK/tCNI/RyGO1Mh1dA73QnYWUv9esp/ZcXmxWOxdwz8pdZ+wU5C08UREZUCbP VHgy5gR+OzLKpc5qRMwIvDc2V6pgeiJMns8WYAEsm7Be4fZyGfo/3FDnCGd/4xt3SAHNvH HC51Dwi5hHF02z9nvL18noacXLEwQ8Jbzpx9i2EbMmJTfHiupJmgFuvvQBqOpQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710160507; a=rsa-sha256; cv=none; b=AS0EexoIoVUwn9ihvqFvx8FaO6qSbYGxmE1mq3LO40g7i/f8Vui7CBZuSzxqLQueKzng3d 39pL4mcBzrlSJuOu8edJvcv3toWdoZXm0Dd3FVTI/VfXbp6twIxoZjEgehqtCFyAr/P5yM 6knaHY9krWyg7ewJlgeAixpUy6wPGMRj7ouOm0pY4b2DsKC9aYPJB5yqIYTDLGjJpk0Qjm UvKp5LOc7UBzcxX3214hJVDl2XAFMcScF9GnncgUs97rjqgBWO3S75vLgKmBF7uI98LCpZ ZOv75GBx/gv+1vYuM/4uwrooONZIk4uneiWCWj8NQIkUBXZjiReL4CU04vEMTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710160507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E2XhIF8XnunSRuMQdZKzRzl2pq87tELQVU39kBbZkhY=; b=IfyHiK2mX+Mr30ViOMEaPwwcdBRL9ffJSPgpsd0qUNknWld+5oWXzYhlc1H9+M6iXITUs1 fVKHLHCQHu+xffLexRsJZC67jCYa6F+AJzCBeenJVfp504WgnD2sicb3tQnspUZ5HfUl87 qppZE1WBnixIf+SzuXYdMQXoYRqhnxl0qi3Up0PK/VhQLjw0vPH+nfH9nDF+Gc58TZFoJU kQHUXOwzjqy74P+0XIbQ5kQWBuiqk56Q4nJvwrC/1hGe8FyEFawaUk/1c2kcUrVpBk8AhP iErRN5Z0xc9abvoJekThIWeFG/7icXSLJ2A7LHND8ksQVQmwAvTdHVg78/I5tg== 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 4Ttbp35nCRzV8V; Mon, 11 Mar 2024 12:35:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42BCZ73Z028953; Mon, 11 Mar 2024 12:35:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42BCZ7F0028949; Mon, 11 Mar 2024 12:35:07 GMT (envelope-from git) Date: Mon, 11 Mar 2024 12:35:07 GMT Message-Id: <202403111235.42BCZ7F0028949@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: d85ea7e79b30 - stable/14 - lorder: Clean up and improve robustness. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: d85ea7e79b30dd51281f2fb8a457e5eccc3fc47e Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d85ea7e79b30dd51281f2fb8a457e5eccc3fc47e commit d85ea7e79b30dd51281f2fb8a457e5eccc3fc47e Author: Dag-Erling Smørgrav AuthorDate: 2024-02-28 15:37:36 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-03-11 12:19:06 +0000 lorder: Clean up and improve robustness. * Properly parse (no) command-line options. * Ensure that errors go to stderr and result in a non-zero exit. * Drop the special-case code for a single argument, as it will produce the wrong outcome if the file does not exist or is corrupted. * Don't print anything until after we've collected all the data. * Always create all temporary files before setting the trap. This ensures that the trap can safely fire at any moment, regardless of any previous definition of `T`. * Use a temporary file rather than a pipe between `nm` and `sed` to ensure proper termination if `nm` fails due to a missing or invalid input. * The check for self-referential entries was conditional on testing our argument list against a regex looking for archives. This was a needless and unreliable optimization; make the check unconditional. * Document that lorder will not work properly if any of its inputs have spaces in their name. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D44133 (cherry picked from commit 5c7b986c21ed47545203e8f630fe2281b83112d2) lorder: Add unit tests. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D44134 (cherry picked from commit 96da41b6dbf383436018f11ad8a672faab2d3789) lorder: Undeprecate. While lorder is not required by our current toolchain (or any toolchain we've used in the past decade or two), it still occasionally shows up in build systems of third party software, including The Open Group's UNIX conformance test suite, and the maintenance cost is negligible. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: imp, allanjude, emaste Differential Revision: https://reviews.freebsd.org/D44135 (cherry picked from commit cf4d9bf8b38819da12c6d686d5cf6dbd6353cd61) lorder: Don't rely on legacy syntax. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D44155 (cherry picked from commit aedb37dc49319a7cd1faf34f312a8a9fc01e611d) lorder: Tweak invalid file test. Different implementations of `nm` have different ways of telling you that your file is not a valid object or library, but they all seem to have “not recognized” as a common substring. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D44154 (cherry picked from commit aa80cfadff0bb715ca090cbd1b3561a1619251d5) --- etc/mtree/BSD.tests.dist | 2 + usr.bin/lorder/Makefile | 4 ++ usr.bin/lorder/lorder.1 | 37 ++++++------ usr.bin/lorder/lorder.sh | 94 ++++++++++++++++++------------ usr.bin/lorder/tests/Makefile | 4 ++ usr.bin/lorder/tests/lorder_test.sh | 111 ++++++++++++++++++++++++++++++++++++ 6 files changed, 195 insertions(+), 57 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 8b985f3b4682..8a3b097c4162 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1087,6 +1087,8 @@ .. lockf .. + lorder + .. m4 .. mkimg diff --git a/usr.bin/lorder/Makefile b/usr.bin/lorder/Makefile index a94860b51c6a..6b3fa2c829d6 100644 --- a/usr.bin/lorder/Makefile +++ b/usr.bin/lorder/Makefile @@ -1,6 +1,10 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 +.include SCRIPTS=lorder.sh MAN= lorder.1 +HAS_TESTS= +SUBDIR.${MK_TESTS}= tests + .include diff --git a/usr.bin/lorder/lorder.1 b/usr.bin/lorder/lorder.1 index e268f81d7254..478b7f493e03 100644 --- a/usr.bin/lorder/lorder.1 +++ b/usr.bin/lorder/lorder.1 @@ -27,17 +27,12 @@ .\" .\" @(#)lorder.1 8.2 (Berkeley) 4/28/95 .\" -.Dd March 21, 2023 +.Dd February 27, 2024 .Dt LORDER 1 .Os .Sh NAME .Nm lorder .Nd list dependencies for object files -.Sh DEPRECATION NOTICE -.Nm -is obsolete and may not be present in -.Fx 14 -and later. .Sh SYNOPSIS .Nm .Ar @@ -46,13 +41,10 @@ The .Nm utility uses .Xr nm 1 -to determine interdependencies in the list of object files -and library archives -specified on the command line. -The -.Nm -utility outputs a list of file names where the first file contains a symbol -which is defined by the second file. +to determine interdependencies between object files and library +archives listed on its command line. +It then outputs a list of pairs of file names such that the first file +in each pair references at least one symbol defined by the second. .Pp The output is normally used with .Xr tsort 1 @@ -60,18 +52,16 @@ when a library is created to determine the optimum ordering of the object modules so that all references may be resolved in a single pass of the loader. .Pp -When linking static binaries, +Similarly, when linking static binaries, .Nm and .Xr tsort 1 -can be used to properly order library archives automatically. +can be used to sort libraries in order of dependency. .Pp -The use of -.Nm -is not required by contemporary linkers, and -.Nm -may be removed from a future version of -.Fx . +While contemporary linkers no longer require the use of +.Nm , +it is provided for the benefit of legacy code bases and build +systems which still insist on it. .Sh ENVIRONMENT .Bl -tag -width indent .It Ev NM @@ -99,3 +89,8 @@ A .Nm utility appeared in .At v7 . +.Sh CAVEATS +The +.Nm +utility will not work properly if given file names with spaces or +newlines in them. diff --git a/usr.bin/lorder/lorder.sh b/usr.bin/lorder/lorder.sh index 640e128b0cb9..c0a7dbbd43e6 100644 --- a/usr.bin/lorder/lorder.sh +++ b/usr.bin/lorder/lorder.sh @@ -33,35 +33,50 @@ # # -# only one argument is a special case, just output the name twice -case $# in - 0) - echo "usage: lorder file ..."; - exit ;; - 1) - echo $1 $1; - exit ;; -esac +export LC_CTYPE=C +export LC_COLLATE=C +set -e -# temporary files +usage() { + echo "usage: lorder file ..." >&2 + exit 1 +} + +while getopts "" opt ; do + case $opt in + *) + usage + ;; + esac +done +shift $(($OPTIND - 1)) +if [ $# -eq 0 ] ; then + usage +fi + +# +# Create temporary files. +# +N=$(mktemp -t _nm_) R=$(mktemp -t _reference_) S=$(mktemp -t _symbol_) +T=$(mktemp -t _temp_) NM=${NM:-nm} -# remove temporary files on HUP, INT, QUIT, PIPE, TERM -trap "rm -f $R $S $T; exit 1" 1 2 3 13 15 - -# make sure all the files get into the output -for i in $*; do - echo $i $i -done +# +# Remove temporary files on termination. +# +trap "rm -f $N $R $S $T" EXIT 1 2 3 13 15 -# if the line has " [RTDW] " it's a globally defined symbol, put it -# into the symbol file. # -# if the line has " U " it's a globally undefined symbol, put it into -# the reference file. -${NM} ${NMFLAGS} -go $* | sed " +# A line matching " [RTDW] " indicates that the input defines a symbol +# with external linkage; put it in the symbol file. +# +# A line matching " U " indicates that the input references an +# undefined symbol; put it in the reference file. +# +${NM} ${NMFLAGS} -go "$@" >$N +sed -e " / [RTDW] / { s/:.* [RTDW] / / w $S @@ -72,21 +87,28 @@ ${NM} ${NMFLAGS} -go $* | sed " w $R } d -" +" <$N -export LC_ALL=C -# eliminate references that can be resolved by the same library. -if [ $(expr "$*" : '.*\.a[[:>:]]') -ne 0 ]; then - sort -u -o $S $S - sort -u -o $R $R - T=$(mktemp -t _temp_) - comm -23 $R $S >$T - mv $T $R -fi +# +# Elide entries representing a reference to a symbol from within the +# library that defines it. +# +sort -u -o $S $S +sort -u -o $R $R +comm -23 $R $S >$T +mv $T $R + +# +# Make sure that all inputs get into the output. +# +for i ; do + echo "$i" "$i" +done -# sort references and symbols on the second field (the symbol), -# join on that field, and print out the file names. +# +# Sort references and symbols on the second field (the symbol), join +# on that field, and print out the file names. +# sort -k 2 -o $R $R sort -k 2 -o $S $S -join -j 2 -o 1.1 2.1 $R $S -rm -f $R $S +join -j 2 -o 1.1 -o 2.1 $R $S diff --git a/usr.bin/lorder/tests/Makefile b/usr.bin/lorder/tests/Makefile new file mode 100644 index 000000000000..21207f413a8d --- /dev/null +++ b/usr.bin/lorder/tests/Makefile @@ -0,0 +1,4 @@ +PACKAGE= tests +ATF_TESTS_SH= lorder_test + +.include diff --git a/usr.bin/lorder/tests/lorder_test.sh b/usr.bin/lorder/tests/lorder_test.sh new file mode 100644 index 000000000000..a4276b2dcfe6 --- /dev/null +++ b/usr.bin/lorder/tests/lorder_test.sh @@ -0,0 +1,111 @@ +# +# Copyright (c) 2024 Klara, Inc. +# +# SPDX-License-Identifier: BSD-2-Clause +# + +atf_test_case noargs +noargs_head() { + atf_set descr "No arguments" +} +noargs_body() { + atf_check -s exit:1 -e match:"^usage:" \ + lorder +} + +atf_test_case onearg +onearg_head() { + atf_set descr "One argument" +} +onearg_body() { + echo "void a(void) { }" >a.c + cc -o a.o -c a.c + echo "a.o a.o" >output + atf_check -o file:output \ + lorder *.o +} + +atf_test_case dashdash +dashdash_head() { + atf_set descr "One argument" +} +dashdash_body() { + echo "void a(void) { }" >a.c + cc -o a.o -c a.c + echo "a.o a.o" >output + atf_check -o file:output \ + lorder -- *.o +} + +atf_test_case nonexistent +nonexistent_head() { + atf_set descr "Nonexistent file" +} +nonexistent_body() { + atf_check -s not-exit:0 -e match:"No such file" -o empty \ + lorder nonexistent.o +} + +atf_test_case invalid +invalid_head() { + atf_set descr "Invalid file" +} +invalid_body() { + echo "not an object file" >invalid.o + atf_check -s not-exit:0 -e match:"not recognized" -o empty \ + lorder invalid.o +} + +atf_test_case objects +objects_head() { + atf_set descr "Order objects" +} +objects_body() { + echo "void a(void) { }" >a.c + echo "void a(void); void b(void) { a(); }" >b.c + echo "void b(void); void c(void) { b(); }" >c.c + for n in a b c ; do + cc -o $n.o -c $n.c + echo "$n.o $n.o" + done >output + echo "b.o a.o" >>output + echo "c.o b.o" >>output + atf_check -o file:output \ + lorder *.o +} + +atf_test_case archives +archives_head() { + atf_set descr "Order archives" +} +archives_body() { + echo "void a(void) { }" >a.c + echo "void a(void); void b(void) { a(); }" >b.c + echo "void b(void); void c(void) { b(); }" >c.c + echo "void e(void); void d(void) { e(); }" >d.c + echo "void d(void); void e(void) { d(); }" >e.c + for n in a b c d e ; do + cc -o $n.o -c $n.c + done + for n in a b c ; do + ar -crs $n.a $n.o + echo "$n.a $n.a" + done >output + ar -crs z.a d.o e.o + echo "z.a z.a" >>output + echo "b.a a.a" >>output + echo "c.a b.a" >>output + atf_check -o file:output \ + lorder *.a +} + +atf_init_test_cases() +{ + atf_add_test_case noargs + atf_add_test_case onearg + atf_add_test_case dashdash + atf_add_test_case nonexistent + atf_add_test_case invalid + atf_add_test_case objects + atf_add_test_case archives +} From nobody Mon Mar 11 12:35:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ttbp51HwDz5Ctp3; Mon, 11 Mar 2024 12:35: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ttbp46rD9z4BsQ; Mon, 11 Mar 2024 12:35:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710160508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2v9X75eRtpRGi+TFs9z1S+f2Z/z6GApYz0SVpAKnShU=; b=AiaUZ7WcOgr5S+Eugx86nfBLHr+KnhqnefNIpQD64x42frE6MiBFtuFv5nQO6SuwYKXQK+ ZdJxjpPb9JXMRu0f7FkzmpGT+Pknte7B7TthpCX4+fad4nqzWurITDfqak7aR8upmUTwpC FXcFTxIyWBXtjE+XvKa/CT6YQd+VTvm0dOITIXei7wt2a0XFc5bSS6b3Vnv/h9/FaCcSIO GaqSCDoQo1s5J6uDy5r/4iTwO0YLIJlpYXvAzJX0d+dLEwqUekIaT5XJvBWg4JwRqYplfC 1w7priAW5J7bWC0pNG3VCpzm+y5POn5gOWO42aYCJwuMxKpw3zjm/bDMESLEoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710160508; a=rsa-sha256; cv=none; b=evREWOGg6cnHUG8XbqO+XNzP8yeQT3SfFWxCD6fCdMfFtkqx03qqffCG6Vt9SsOR8OK1Gl ETEOcMbjrOxasPlzE1gV4pxXEM99/2f/HQZPDGuf8BRR1qUCpZugEMnr3E4wk124exqWK0 wL0oBXrRdBxNwII5F+xrXvkzXfh06Xkp7Z5t5ukcS4AkIJgZ94CLvaI63qVL2NGL9W85u5 ITFGTvmPPvm1vEctAzcq3m/mP51qakwrODgfhDd8XEfm5qIMs+ZBf/8A+ryHaH3OI7kluM 4n9t5UZzJV54/cuw1PYWL6Z6zTSC0Gr3jqsYlXbywBU09WIRnH30PeaNDdaxMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710160508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2v9X75eRtpRGi+TFs9z1S+f2Z/z6GApYz0SVpAKnShU=; b=dpcAAM+23cEkqR3FYQBt/zNaVII4tsJG0LA55JTI4LE+wzOIq4srCuAEcmSO6+Foso9E6A SxSsqqYy1kDkvYNnqgWBgUm5kqvcUvGREP/9Ikt9PPRa6r924IMYUmiwOG5PtylxyEAEZ3 WCBEFc4F2//KMgCdYhUlVByCwm3HOGmqf0N1JNnWc3Nzha1Rw03gVNU+NM8mT7G4B6KpTu bHX6w7Zz1FK1areLL+xiKBzT2f8oklTfK1EvgfeD0JbziMWMKDMI4wd/8s1+KLX3NRDbQT qLTC4C6jTQBjSmHouvRcAkHuDGhwZ9d3mZg9DIOnaYGk8KFqehdbyhsRydfxPw== 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 4Ttbp46CkkzT73; Mon, 11 Mar 2024 12:35:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42BCZ8xu029001; Mon, 11 Mar 2024 12:35:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42BCZ8wA028998; Mon, 11 Mar 2024 12:35:08 GMT (envelope-from git) Date: Mon, 11 Mar 2024 12:35:08 GMT Message-Id: <202403111235.42BCZ8wA028998@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 08e799c0cc23 - stable/14 - tarfs: Fix two input validation issues. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 08e799c0cc235b8c5a98921653127a915a985220 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=08e799c0cc235b8c5a98921653127a915a985220 commit 08e799c0cc235b8c5a98921653127a915a985220 Author: Dag-Erling Smørgrav AuthorDate: 2024-03-06 16:13:42 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-03-11 12:19:06 +0000 tarfs: Fix two input validation issues. * Reject hard or soft links with an empty target path. Currently, a debugging kernel will hit an assertion in tarfs_lookup_path() while a non-debugging kernel will happily create a link to the mount root. * Use a temporary variable to store the result of the link target path, and copy it to tnp->other only once we have found it to be valid. Otherwise we error out after creating a reference to the target but before incrementing the target's reference count, which results in a use-after-free situation in the cleanup code. * Correctly return ENOENT from tarfs_lookup_path() if the requested path was not found and create_dirs is false. Luckily, existing callers did not rely solely on the return value. MFC after: 3 days PR: 277360 Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D44161 (cherry picked from commit 38b3683592d4c20a74f52a6e8e29368e6fa61858) tarfs: Improve validation of numeric fields. MFC after: 3 days Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Reviewed by: sjg, allanjude Differential Revision: https://reviews.freebsd.org/D44166 (cherry picked from commit 8427d94ce05682abb6c75e2a27c8c497962c0dc5) tarfs: Avoid overflow in exthdr calculation. MFC after: 3 days PR: 277420 Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D44202 (cherry picked from commit c291b7914e1db9469cc820abcb1f5dde7a6f7f28) tarfs: Remove unnecessary hack and obsolete comment. MFC after: 3 days Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D44203 (cherry picked from commit e212f0c0666e7d3a24dce03b8c88920d14b80e47) tarfs: Fix checksum calculation. The checksum code assumed that struct ustar_header filled an entire block and calculcated the checksum based on the size of the structure. The header is in fact only 500 bytes long while the checksum covers the entire block (“logical record” in POSIX terms). Add padding and an assertion, and clean up the checksum code. MFC after: 3 days Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D44226 (cherry picked from commit 0118b0c8e58a438a931a5ce1bf8d7ae6208cc61b) tarfs: Factor out common test code. MFC after: 3 days Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D44227 (cherry picked from commit 32b8aac6f9b77a1c4326083472d634e5de427547) tarfs: Fix checksum on 32-bit platforms. MFC after: 3 days Fixes: b56872332e47786afc09515a4daaf1388da4d73c Sponsored by: Juniper Networks, Inc. Sponsored by: Klara, Inc. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D44261 (cherry picked from commit cbddb2f02c7687d1039abcffd931e94e481c11a5) --- sys/fs/tarfs/tarfs_vfsops.c | 222 ++++++++++++++++++++++----------------- tests/sys/fs/tarfs/Makefile | 2 +- tests/sys/fs/tarfs/tarfs_test.sh | 120 ++++++++++++++++++--- tests/sys/fs/tarfs/tarsum.c | 128 ++++++++++++++++++++++ 4 files changed, 357 insertions(+), 115 deletions(-) diff --git a/sys/fs/tarfs/tarfs_vfsops.c b/sys/fs/tarfs/tarfs_vfsops.c index 4489b41699ec..d1af7070e706 100644 --- a/sys/fs/tarfs/tarfs_vfsops.c +++ b/sys/fs/tarfs/tarfs_vfsops.c @@ -2,7 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013 Juniper Networks, Inc. - * Copyright (c) 2022-2023 Klara, Inc. + * Copyright (c) 2022-2024 Klara, Inc. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -56,7 +56,7 @@ #include #include -CTASSERT(ZERO_REGION_SIZE > TARFS_BLOCKSIZE); +CTASSERT(ZERO_REGION_SIZE >= TARFS_BLOCKSIZE); struct ustar_header { char name[100]; /* File name */ @@ -75,8 +75,11 @@ struct ustar_header { char major[8]; /* Device major number */ char minor[8]; /* Device minor number */ char prefix[155]; /* Path prefix */ + char _pad[12]; }; +CTASSERT(sizeof(struct ustar_header) == TARFS_BLOCKSIZE); + #define TAR_EOF ((off_t)-1) #define TAR_TYPE_FILE '0' @@ -113,58 +116,46 @@ static const char *tarfs_opts[] = { }; /* - * Reads a len-width signed octal number from strp. Returns the value. - * XXX Does not report errors. + * Reads a len-width signed octal number from strp. Returns 0 on success + * and non-zero on error. */ -static int64_t -tarfs_str2octal(const char *strp, size_t len) +static int +tarfs_str2octal(const char *strp, size_t len, int64_t *num) { int64_t val; size_t idx; int sign; - /* - * Skip leading spaces or tabs. - * XXX why? POSIX requires numeric fields to be 0-padded. - */ - for (idx = 0; idx < len; idx++) - if (strp[idx] != ' ' && strp[idx] != '\t') - break; - - if (idx == len) - return (0); - + idx = 0; if (strp[idx] == '-') { sign = -1; idx++; - } else + } else { sign = 1; + } val = 0; - for (; idx < len; idx++) { + for (; idx < len && strp[idx] != '\0' && strp[idx] != ' '; idx++) { if (strp[idx] < '0' || strp[idx] > '7') - break; + return (EINVAL); val <<= 3; - val += (strp[idx] - '0'); - - /* Truncate on overflow */ - if (val > INT64_MAX / 8) { - val = INT64_MAX; - break; - } + val += strp[idx] - '0'; + if (val > INT64_MAX / 8) + return (ERANGE); } - return (sign > 0) ? val : -val; + *num = val * sign; + return (0); } /* * Reads a len-byte extended numeric value from strp. The first byte has * bit 7 set to indicate the format; the remaining 7 bits + the (len - 1) * bytes that follow form a big-endian signed two's complement binary - * number. Returns the value. XXX Does not report errors. + * number. Returns 0 on success and non-zero on error; */ -static int64_t -tarfs_str2base256(const char *strp, size_t len) +static int +tarfs_str2base256(const char *strp, size_t len, int64_t *num) { int64_t val; size_t idx; @@ -183,37 +174,27 @@ tarfs_str2base256(const char *strp, size_t len) for (idx = 1; idx < len; idx++) { val <<= 8; val |= (0xff & (int64_t)strp[idx]); - - /* Truncate on overflow and underflow */ - if (val > INT64_MAX / 256) { - val = INT64_MAX; - break; - } else if (val < INT64_MAX / 256) { - val = INT64_MIN; - break; - } + if (val > INT64_MAX / 256 || val < INT64_MIN / 256) + return (ERANGE); } - return (val); + *num = val; + return (0); } /* * Read a len-byte numeric field from strp. If bit 7 of the first byte it * set, assume an extended numeric value (signed two's complement); * otherwise, assume a signed octal value. - * - * XXX practically no error checking or handling */ -static int64_t -tarfs_str2int64(const char *strp, size_t len) +static int +tarfs_str2int64(const char *strp, size_t len, int64_t *num) { - if (len < 1) - return (0); - + return (EINVAL); if ((strp[0] & 0x80) != 0) - return (tarfs_str2base256(strp, len)); - return (tarfs_str2octal(strp, len)); + return (tarfs_str2base256(strp, len, num)); + return (tarfs_str2octal(strp, len, num)); } /* @@ -225,21 +206,26 @@ tarfs_checksum(struct ustar_header *hdrp) { const unsigned char *ptr; int64_t checksum, hdrsum; - size_t idx; - hdrsum = tarfs_str2int64(hdrp->checksum, sizeof(hdrp->checksum)); - TARFS_DPF(CHECKSUM, "%s: header checksum %lx\n", __func__, hdrsum); + if (tarfs_str2int64(hdrp->checksum, sizeof(hdrp->checksum), &hdrsum) != 0) { + TARFS_DPF(CHECKSUM, "%s: invalid header checksum \"%.*s\"\n", + __func__, (int)sizeof(hdrp->checksum), hdrp->checksum); + return (false); + } + TARFS_DPF(CHECKSUM, "%s: header checksum \"%.*s\" = %#lo\n", __func__, + (int)sizeof(hdrp->checksum), hdrp->checksum, hdrsum); checksum = 0; for (ptr = (const unsigned char *)hdrp; ptr < (const unsigned char *)hdrp->checksum; ptr++) checksum += *ptr; - for (idx = 0; idx < sizeof(hdrp->checksum); idx++) + for (; + ptr < (const unsigned char *)hdrp->typeflag; ptr++) checksum += 0x20; - for (ptr = (const unsigned char *)hdrp->typeflag; + for (; ptr < (const unsigned char *)(hdrp + 1); ptr++) checksum += *ptr; - TARFS_DPF(CHECKSUM, "%s: calc unsigned checksum %lx\n", __func__, + TARFS_DPF(CHECKSUM, "%s: calc unsigned checksum %#lo\n", __func__, checksum); if (hdrsum == checksum) return (true); @@ -252,12 +238,13 @@ tarfs_checksum(struct ustar_header *hdrp) for (ptr = (const unsigned char *)hdrp; ptr < (const unsigned char *)&hdrp->checksum; ptr++) checksum += *((const signed char *)ptr); - for (idx = 0; idx < sizeof(hdrp->checksum); idx++) + for (; + ptr < (const unsigned char *)&hdrp->typeflag; ptr++) checksum += 0x20; - for (ptr = (const unsigned char *)&hdrp->typeflag; + for (; ptr < (const unsigned char *)(hdrp + 1); ptr++) checksum += *((const signed char *)ptr); - TARFS_DPF(CHECKSUM, "%s: calc signed checksum %lx\n", __func__, + TARFS_DPF(CHECKSUM, "%s: calc signed checksum %#lo\n", __func__, checksum); if (hdrsum == checksum) return (true); @@ -379,8 +366,10 @@ tarfs_lookup_path(struct tarfs_mount *tmp, char *name, size_t namelen, tnp = tarfs_lookup_node(parent, NULL, &cn); if (tnp == NULL) { do_lookup = false; - if (!create_dirs) + if (!create_dirs) { + error = ENOENT; break; + } } } name += cn.cn_namelen; @@ -451,7 +440,7 @@ tarfs_alloc_one(struct tarfs_mount *tmp, off_t *blknump) int64_t num; int endmarker = 0; char *namep, *sep; - struct tarfs_node *parent, *tnp; + struct tarfs_node *parent, *tnp, *other; size_t namelen = 0, linklen = 0, realsize = 0, sz; ssize_t res; dev_t rdev; @@ -519,42 +508,47 @@ again: } /* get standard attributes */ - num = tarfs_str2int64(hdrp->mode, sizeof(hdrp->mode)); - if (num < 0 || num > (S_IFMT|ALLPERMS)) { + if (tarfs_str2int64(hdrp->mode, sizeof(hdrp->mode), &num) != 0 || + num < 0 || num > (S_IFMT|ALLPERMS)) { TARFS_DPF(ALLOC, "%s: invalid file mode at %zu\n", __func__, TARFS_BLOCKSIZE * (blknum - 1)); mode = S_IRUSR; } else { mode = num & ALLPERMS; } - num = tarfs_str2int64(hdrp->uid, sizeof(hdrp->uid)); - if (num < 0 || num > UID_MAX) { - TARFS_DPF(ALLOC, "%s: UID out of range at %zu\n", + if (tarfs_str2int64(hdrp->uid, sizeof(hdrp->uid), &num) != 0 || + num < 0 || num > UID_MAX) { + TARFS_DPF(ALLOC, "%s: invalid UID at %zu\n", __func__, TARFS_BLOCKSIZE * (blknum - 1)); uid = tmp->root->uid; mode &= ~S_ISUID; } else { uid = num; } - num = tarfs_str2int64(hdrp->gid, sizeof(hdrp->gid)); - if (num < 0 || num > GID_MAX) { - TARFS_DPF(ALLOC, "%s: GID out of range at %zu\n", + if (tarfs_str2int64(hdrp->gid, sizeof(hdrp->gid), &num) != 0 || + num < 0 || num > GID_MAX) { + TARFS_DPF(ALLOC, "%s: invalid GID at %zu\n", __func__, TARFS_BLOCKSIZE * (blknum - 1)); gid = tmp->root->gid; mode &= ~S_ISGID; } else { gid = num; } - num = tarfs_str2int64(hdrp->size, sizeof(hdrp->size)); - if (num < 0) { - TARFS_DPF(ALLOC, "%s: negative size at %zu\n", + if (tarfs_str2int64(hdrp->size, sizeof(hdrp->size), &num) != 0 || + num < 0) { + TARFS_DPF(ALLOC, "%s: invalid size at %zu\n", + __func__, TARFS_BLOCKSIZE * (blknum - 1)); + error = EINVAL; + goto bad; + } + sz = num; + if (tarfs_str2int64(hdrp->mtime, sizeof(hdrp->mtime), &num) != 0) { + TARFS_DPF(ALLOC, "%s: invalid modification time at %zu\n", __func__, TARFS_BLOCKSIZE * (blknum - 1)); error = EINVAL; goto bad; - } else { - sz = num; } - mtime = tarfs_str2int64(hdrp->mtime, sizeof(hdrp->mtime)); + mtime = num; rdev = NODEV; TARFS_DPF(ALLOC, "%s: [%c] %zu @%jd %o %d:%d\n", __func__, hdrp->typeflag[0], sz, (intmax_t)mtime, mode, uid, gid); @@ -598,7 +592,8 @@ again: error = EINVAL; goto bad; } - if (line + len > exthdr + sz) { + if ((uintptr_t)line + len < (uintptr_t)line || + line + len > exthdr + sz) { TARFS_DPF(ALLOC, "%s: exthdr overflow\n", __func__); error = EINVAL; @@ -732,43 +727,82 @@ again: link = hdrp->linkname; linklen = strnlen(link, sizeof(hdrp->linkname)); } - error = tarfs_alloc_node(tmp, namep, sep - namep, VREG, - 0, 0, 0, 0, 0, 0, 0, NULL, 0, parent, &tnp); - if (error != 0) { + if (linklen == 0) { + TARFS_DPF(ALLOC, "%s: %.*s: link without target\n", + __func__, (int)namelen, name); + error = EINVAL; goto bad; } error = tarfs_lookup_path(tmp, link, linklen, NULL, - NULL, NULL, &tnp->other, false); - if (tnp->other == NULL || - tnp->other->type != VREG || - tnp->other->other != NULL) { - TARFS_DPF(ALLOC, "%s: %.*s: dead hard link to %.*s\n", + NULL, NULL, &other, false); + if (error != 0 || other == NULL || + other->type != VREG || other->other != NULL) { + TARFS_DPF(ALLOC, "%s: %.*s: invalid link to %.*s\n", __func__, (int)namelen, name, (int)linklen, link); error = EINVAL; goto bad; } - tnp->other->nlink++; + error = tarfs_alloc_node(tmp, namep, sep - namep, VREG, + 0, 0, 0, 0, 0, 0, 0, NULL, 0, parent, &tnp); + if (error == 0) { + tnp->other = other; + tnp->other->nlink++; + } break; case TAR_TYPE_SYMLINK: if (link == NULL) { link = hdrp->linkname; linklen = strnlen(link, sizeof(hdrp->linkname)); } + if (linklen == 0) { + TARFS_DPF(ALLOC, "%s: %.*s: link without target\n", + __func__, (int)namelen, name); + error = EINVAL; + goto bad; + } error = tarfs_alloc_node(tmp, namep, sep - namep, VLNK, 0, linklen, mtime, uid, gid, mode, flags, link, 0, parent, &tnp); break; case TAR_TYPE_BLOCK: - major = tarfs_str2int64(hdrp->major, sizeof(hdrp->major)); - minor = tarfs_str2int64(hdrp->minor, sizeof(hdrp->minor)); + if (tarfs_str2int64(hdrp->major, sizeof(hdrp->major), &num) != 0 || + num < 0 || num > INT_MAX) { + TARFS_DPF(ALLOC, "%s: %.*s: invalid device major\n", + __func__, (int)namelen, name); + error = EINVAL; + goto bad; + } + major = num; + if (tarfs_str2int64(hdrp->minor, sizeof(hdrp->minor), &num) != 0 || + num < 0 || num > INT_MAX) { + TARFS_DPF(ALLOC, "%s: %.*s: invalid device minor\n", + __func__, (int)namelen, name); + error = EINVAL; + goto bad; + } + minor = num; rdev = makedev(major, minor); error = tarfs_alloc_node(tmp, namep, sep - namep, VBLK, 0, 0, mtime, uid, gid, mode, flags, NULL, rdev, parent, &tnp); break; case TAR_TYPE_CHAR: - major = tarfs_str2int64(hdrp->major, sizeof(hdrp->major)); - minor = tarfs_str2int64(hdrp->minor, sizeof(hdrp->minor)); + if (tarfs_str2int64(hdrp->major, sizeof(hdrp->major), &num) != 0 || + num < 0 || num > INT_MAX) { + TARFS_DPF(ALLOC, "%s: %.*s: invalid device major\n", + __func__, (int)namelen, name); + error = EINVAL; + goto bad; + } + major = num; + if (tarfs_str2int64(hdrp->minor, sizeof(hdrp->minor), &num) != 0 || + num < 0 || num > INT_MAX) { + TARFS_DPF(ALLOC, "%s: %.*s: invalid device minor\n", + __func__, (int)namelen, name); + error = EINVAL; + goto bad; + } + minor = num; rdev = makedev(major, minor); error = tarfs_alloc_node(tmp, namep, sep - namep, VCHR, 0, 0, mtime, uid, gid, mode, flags, NULL, rdev, @@ -856,16 +890,8 @@ tarfs_alloc_mount(struct mount *mp, struct vnode *vp, tmp->vfs = mp; tmp->mtime = mtime; - /* - * XXX The decompression layer passes everything through the - * buffer cache, and the buffer cache wants to know our blocksize, - * but mnt_stat normally isn't populated until after we return, so - * we have to cheat a bit. - */ + /* Initialize I/O layer */ tmp->iosize = 1U << tarfs_ioshift; - mp->mnt_stat.f_iosize = tmp->iosize; - - /* Initialize decompression layer */ error = tarfs_io_init(tmp); if (error != 0) goto bad; diff --git a/tests/sys/fs/tarfs/Makefile b/tests/sys/fs/tarfs/Makefile index b16c6544d33f..72355a08a158 100644 --- a/tests/sys/fs/tarfs/Makefile +++ b/tests/sys/fs/tarfs/Makefile @@ -3,7 +3,7 @@ PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/fs/tarfs BINDIR= ${TESTSDIR} -PROGS+= mktar +PROGS+= mktar tarsum ATF_TESTS_SH+= tarfs_test diff --git a/tests/sys/fs/tarfs/tarfs_test.sh b/tests/sys/fs/tarfs/tarfs_test.sh index 15354aac501a..2a5dfc434201 100644 --- a/tests/sys/fs/tarfs/tarfs_test.sh +++ b/tests/sys/fs/tarfs/tarfs_test.sh @@ -2,7 +2,7 @@ #- # SPDX-License-Identifier: BSD-2-Clause # -# Copyright (c) 2023 Klara, Inc. +# Copyright (c) 2023-2024 Klara, Inc. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -43,15 +43,27 @@ mktar() { "$(atf_get_srcdir)"/mktar ${TARFS_USE_GNU_TAR+-g} "$@" } +tarsum() { + "$(atf_get_srcdir)"/tarsum +} + +tarfs_setup() { + kldload -n tarfs || atf_skip "This test requires tarfs and could not load it" + mkdir "${mnt}" +} + +tarfs_cleanup() { + umount -f "${mnt}" 2>/dev/null || true +} + atf_test_case tarfs_basic cleanup tarfs_basic_head() { atf_set "descr" "Basic function test" atf_set "require.user" "root" } tarfs_basic_body() { + tarfs_setup local tarball="${PWD}/tarfs_test.tar.zst" - kldload -n tarfs || atf_skip "This test requires tarfs and could not load it" - mkdir "${mnt}" mktar "${tarball}" atf_check mount -rt tarfs "${tarball}" "${mnt}" atf_check -o match:"^${tarball} on ${mnt} \(tarfs," mount @@ -68,7 +80,7 @@ tarfs_basic_body() { atf_check -o inline:"3,40755\n" stat -f%l,%p "${mnt}" } tarfs_basic_cleanup() { - umount "${mnt}" || true + tarfs_cleanup } atf_test_case tarfs_basic_gnu cleanup @@ -91,8 +103,7 @@ tarfs_notdir_device_head() { atf_set "require.user" "root" } tarfs_notdir_device_body() { - kldload -n tarfs || atf_skip "This test requires tarfs and could not load it" - mkdir "${mnt}" + tarfs_setup atf_check mknod d b 0xdead 0xbeef tar -cf tarfs_notdir.tar d rm d @@ -103,7 +114,7 @@ tarfs_notdir_device_body() { mount -rt tarfs tarfs_notdir.tar "${mnt}" } tarfs_notdir_device_cleanup() { - umount "${mnt}" || true + tarfs_cleanup } atf_test_case tarfs_notdir_device_gnu cleanup @@ -126,8 +137,7 @@ tarfs_notdir_dot_head() { atf_set "require.user" "root" } tarfs_notdir_dot_body() { - kldload -n tarfs || atf_skip "This test requires tarfs and could not load it" - mkdir "${mnt}" + tarfs_setup echo "hello" >d tar -cf tarfs_notdir.tar d rm d @@ -138,7 +148,7 @@ tarfs_notdir_dot_body() { mount -rt tarfs tarfs_notdir.tar "${mnt}" } tarfs_notdir_dot_cleanup() { - umount "${mnt}" || true + tarfs_cleanup } atf_test_case tarfs_notdir_dot_gnu cleanup @@ -161,8 +171,7 @@ tarfs_notdir_dotdot_head() { atf_set "require.user" "root" } tarfs_notdir_dotdot_body() { - kldload -n tarfs || atf_skip "This test requires tarfs and could not load it" - mkdir "${mnt}" + tarfs_setup echo "hello" >d tar -cf tarfs_notdir.tar d rm d @@ -173,7 +182,7 @@ tarfs_notdir_dotdot_body() { mount -rt tarfs tarfs_notdir.tar "${mnt}" } tarfs_notdir_dotdot_cleanup() { - umount "${mnt}" || true + tarfs_cleanup } atf_test_case tarfs_notdir_dotdot_gnu cleanup @@ -196,8 +205,7 @@ tarfs_notdir_file_head() { atf_set "require.user" "root" } tarfs_notdir_file_body() { - kldload -n tarfs || atf_skip "This test requires tarfs and could not load it" - mkdir "${mnt}" + tarfs_setup echo "hello" >d tar -cf tarfs_notdir.tar d rm d @@ -208,7 +216,7 @@ tarfs_notdir_file_body() { mount -rt tarfs tarfs_notdir.tar "${mnt}" } tarfs_notdir_file_cleanup() { - umount "${mnt}" || true + tarfs_cleanup } atf_test_case tarfs_notdir_file_gnu cleanup @@ -225,6 +233,82 @@ tarfs_notdir_file_gnu_cleanup() { tarfs_notdir_file_cleanup } +atf_test_case tarfs_emptylink cleanup +tarfs_emptylink_head() { + atf_set "descr" "Regression test for PR 277360: empty link target" + atf_set "require.user" "root" +} +tarfs_emptylink_body() { + tarfs_setup + touch z + ln -f z hard + ln -fs z soft + tar -cf - z hard soft | dd bs=512 skip=1 | tr z '\0' | \ + tarsum >> tarfs_emptylink.tar + atf_check -s not-exit:0 -e match:"Invalid" \ + mount -rt tarfs tarfs_emptylink.tar "${mnt}" +} +tarfs_emptylink_cleanup() { + tarfs_cleanup +} + +atf_test_case tarfs_linktodir cleanup +tarfs_linktodir_head() { + atf_set "descr" "Regression test for PR 277360: link to directory" + atf_set "require.user" "root" +} +tarfs_linktodir_body() { + tarfs_setup + mkdir d + tar -cf - d | dd bs=512 count=1 > tarfs_linktodir.tar + rmdir d + touch d + ln -f d link + tar -cf - d link | dd bs=512 skip=1 >> tarfs_linktodir.tar + atf_check -s not-exit:0 -e match:"Invalid" \ + mount -rt tarfs tarfs_linktodir.tar "${mnt}" +} +tarfs_linktodir_cleanup() { + tarfs_cleanup +} + +atf_test_case tarfs_linktononexistent cleanup +tarfs_linktononexistent_head() { + atf_set "descr" "Regression test for PR 277360: link to nonexistent target" + atf_set "require.user" "root" +} +tarfs_linktononexistent_body() { + tarfs_setup + touch f + ln -f f link + tar -cf - f link | dd bs=512 skip=1 >> tarfs_linktononexistent.tar + atf_check -s not-exit:0 -e match:"Invalid" \ + mount -rt tarfs tarfs_linktononexistent.tar "${mnt}" +} +tarfs_linktononexistent_cleanup() { + tarfs_cleanup +} + +atf_test_case tarfs_checksum cleanup +tarfs_checksum_head() { + atf_set "descr" "Verify that the checksum covers header padding" + atf_set "require.user" "root" +} +tarfs_checksum_body() { + tarfs_setup + touch f + tar -cf tarfs_checksum.tar f + truncate -s 500 tarfs_checksum.tar + printf "\1\1\1\1\1\1\1\1\1\1\1\1" >> tarfs_checksum.tar + dd if=/dev/zero bs=512 count=2 >> tarfs_checksum.tar + hexdump -C tarfs_checksum.tar + atf_check -s not-exit:0 -e match:"Invalid" \ + mount -rt tarfs tarfs_checksum.tar "${mnt}" +} +tarfs_checksum_cleanup() { + tarfs_cleanup +} + atf_init_test_cases() { atf_add_test_case tarfs_basic atf_add_test_case tarfs_basic_gnu @@ -236,4 +320,8 @@ atf_init_test_cases() { atf_add_test_case tarfs_notdir_dotdot_gnu atf_add_test_case tarfs_notdir_file atf_add_test_case tarfs_notdir_file_gnu + atf_add_test_case tarfs_emptylink + atf_add_test_case tarfs_linktodir + atf_add_test_case tarfs_linktononexistent + atf_add_test_case tarfs_checksum } diff --git a/tests/sys/fs/tarfs/tarsum.c b/tests/sys/fs/tarfs/tarsum.c new file mode 100644 index 000000000000..73ead2230a5e --- /dev/null +++ b/tests/sys/fs/tarfs/tarsum.c @@ -0,0 +1,128 @@ +/*- + * Copyright (c) 2024 Klara, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + * + * This program reads a tarball from stdin, recalculates the checksums of + * all ustar records within it, and writes the result to stdout. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +static bool opt_v; + +static int +verbose(const char *fmt, ...) +{ + va_list ap; + int ret; + + if (!opt_v) + return (0); + va_start(ap, fmt); + ret = vfprintf(stderr, fmt, ap); + va_end(ap); + return (ret); +} + +static void +tarsum(FILE *in, const char *ifn, FILE *out, const char *ofn) +{ + union { + uint8_t bytes[512]; + struct { + uint8_t prelude[148]; + char checksum[8]; + uint8_t interlude[101]; + char magic[6]; + char version[2]; + char postlude[]; + }; + } ustar; + unsigned long sum; + off_t offset = 0; + ssize_t ret; + size_t i; + + for (;;) { + if ((ret = fread(&ustar, 1, sizeof(ustar), in)) < 0) + err(1, "%s", ifn); + else if (ret == 0) + break; + else if ((size_t)ret < sizeof(ustar)) + errx(1, "%s: Short read", ifn); + if (strcmp(ustar.magic, "ustar") == 0 && + ustar.version[0] == '0' && ustar.version[1] == '0') { + verbose("header found at offset %#lx\n", offset); + verbose("current checksum %.*s\n", + (int)sizeof(ustar.checksum), ustar.checksum); + memset(ustar.checksum, ' ', sizeof(ustar.checksum)); + for (sum = i = 0; i < sizeof(ustar); i++) + sum += ustar.bytes[i]; + verbose("calculated checksum %#lo\n", sum); + sprintf(ustar.checksum, "%#lo", sum); + } + if ((ret = fwrite(&ustar, 1, sizeof(ustar), out)) < 0) + err(1, "%s", ofn); + else if ((size_t)ret < sizeof(ustar)) + errx(1, "%s: Short write", ofn); + offset += sizeof(ustar); + } + verbose("%lu bytes processed\n", offset); +} + +static void +usage(void) +{ + fprintf(stderr, "usage: tarsum [-v] [-o output] [input]\n"); + exit(1); +} + +int +main(int argc, char *argv[]) +{ + const char *ifn, *ofn = NULL; + FILE *in, *out; + int opt; + + while ((opt = getopt(argc, argv, "o:v")) != -1) { + switch (opt) { + case 'o': + ofn = optarg; + break; + case 'v': + opt_v = true; + break; + default: + usage(); + } + } + argc -= optind; + argv += optind; + if (argc == 0 || strcmp(*argv, "-") == 0) { + ifn = "stdin"; + in = stdin; + } else if (argc == 1) { + ifn = *argv; + if ((in = fopen(ifn, "rb")) == NULL) + err(1, "%s", ifn); + } else { + usage(); + } + if (ofn == NULL || strcmp(ofn, "-") == 0) { + ofn = "stdout"; + out = stdout; + } else { + if ((out = fopen(ofn, "wb")) == NULL) + err(1, "%s", ofn); + } + tarsum(in, ifn, out, ofn); + return (0); +} From nobody Mon Mar 11 14:13:33 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ttdzf0q0lz5D45Z; Mon, 11 Mar 2024 14:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ttdzf0CFrz4PYS; Mon, 11 Mar 2024 14:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710166414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gi7D0+x4nCftzwxigxiuMKGnNpPwd5TnZm5qTTE+DBI=; b=kBfULzGPS8sRb79zWGoYH9KLRgAsSnEIel0cisa30f1IcXYhuLlDNVUHi3YktfYkJRD+lV /Haqs/SiMwYHWAkn9wO2SsTkURB8Ast9qJGcY69/Ng4s8moY1yXWJBWJ22DngqFwaREkSB AUSY5a2P3xjgjQWPmeJIpnRXuQ/cUPHgy2w4zlIAF9Stt6gIEVFkSfPs1i4kGF9RuFI8ui NkzP4RBzcj2gBEWZ4z/VQclJJwfJXnOT+loYSDFLG7M+g5+17Au0Pfjay0CvgDyjMbZrq+ 4wPPqMDFB62XLslyOSJnVtmgaT3KYABSGPh0lj/FkX7VApwVzCfhxAybLKv/QQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710166414; a=rsa-sha256; cv=none; b=xxl7hrCmT0kmvnodiWTI9PmYj/0edKhLMRA6rnScmgmSa5N6h6FaVllwRpC7+dfAHYR2wg ZC8o4bI4hZUFgM2PUhRzwJa59WYyMiIdaD+jvvBeyaj7L8pGevT4xtj8z7MLM825Dv7HM8 Oj0Jn1GmWAPghv2bXnURzsgJB4WkbHCCR0G3dRAwwjMkjg5io5bB0XYs72sFlI01CC17fR 2q1l0MKTxfEYIyd3+4MzrGXfvNwKN4cwBbV2cludCbLfHeVSDWH+hFyx7KYtkeHd6TejiV YdAIiLPhNCs5qk7zkCu4ZlYegWX/8Dr+nl7gc2/sbMYy4ikl5wMsp+MSQpt8zA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710166414; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gi7D0+x4nCftzwxigxiuMKGnNpPwd5TnZm5qTTE+DBI=; b=jmYDb3A1m/UwSn2q4ZUOLPEFLq1IgasUf8Kw2Ncm+oXp/zYY4ZeMc54H4X0f6bk+lIoQ/C FJM8sN5A4FTljvkggHMkIcMLlVGyLrrghH6LLnW6qWXm/VkIrRBTHauF0X0ix+YZUelMz3 QwmpYzRPyb9jVwAwLz0QBuAR+jVi6dryk2Zr9VKJiQ94fg/jI/15n0XWueIfxZqYrDt6qc yoBTcbU9TPCfEqJQ6vURwRsJQvSy/MnQWxOqgXJdfMzkEVVRQghnS3V3xPgzLk4/2j8dvN fVSltvF1hqJ00pFAlZTe9kWtT52w6ro7CISVJAVDDJW3bcPCSZHdmHdo/Ok/cw== 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 4Ttdzd6sHDzYQS; Mon, 11 Mar 2024 14:13:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42BEDXFk097451; Mon, 11 Mar 2024 14:13:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42BEDXHJ097447; Mon, 11 Mar 2024 14:13:33 GMT (envelope-from git) Date: Mon, 11 Mar 2024 14:13:33 GMT Message-Id: <202403111413.42BEDXHJ097447@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Toomas Soome Subject: git: 0148ccb95a8d - stable/14 - loader: we can only env_discard() existing variable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 0148ccb95a8df13d8a1234083490655d40550527 Auto-Submitted: auto-generated The branch stable/14 has been updated by tsoome: URL: https://cgit.FreeBSD.org/src/commit/?id=0148ccb95a8df13d8a1234083490655d40550527 commit 0148ccb95a8df13d8a1234083490655d40550527 Author: Toomas Soome AuthorDate: 2024-02-25 22:34:00 +0000 Commit: Toomas Soome CommitDate: 2024-03-11 14:08:50 +0000 loader: we can only env_discard() existing variable While dropping nvpair from nvstore, we also remove the corresponding environment variable. By doing so, we should be careful not to try to unset non-existing variable. Reviewed by: imp MFC after: 2 week Differential revision: https://reviews.freebsd.org/D44083 (cherry picked from commit 1b3f4ccb7dd8600d010fc6a09b09ee7d74872809) --- stand/libsa/zfs/zfs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c index af938fbe1b2b..f3cf60786a23 100644 --- a/stand/libsa/zfs/zfs.c +++ b/stand/libsa/zfs/zfs.c @@ -1265,8 +1265,12 @@ zfs_nvstore_unset_impl(void *vdev, const char *name, bool unset_env) rv = zfs_set_bootenv(vdev, spa->spa_bootenv); } - if (unset_env) - env_discard(env_getenv(name)); + if (unset_env) { + struct env_var *ev = env_getenv(name); + + if (ev != NULL) + env_discard(ev); + } return (rv); } From nobody Mon Mar 11 16:12:05 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TthcQ33ygz5DF6t; Mon, 11 Mar 2024 16:12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TthcQ0R3jz4dGq; Mon, 11 Mar 2024 16:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710173526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=csH8jvCbMMXbn1GLq7VdsY0lG/7lVKp2ySCy8czWUmc=; b=XaQtdX+QO9jq38ehI8z6KQ7dtbCYfYjZw61xba6UF20hzexix7pc7zIC/R2b8EZr8hOlg9 9u2nryMwY4+GOsfa3DUMtfKQBbx9YH3GdFpQKO+ppIxYoQ5zO/K6BIboA4xqQlMZxvwAkB 1diGl3GXZPeFPCSD0oNJ6aNg3YhCXcYCagtMMd/EIHyDnMvIXIAEvsaK2YYiufc/uLy0wp k9QrsIIcuECnN8vEnxK+fzvY2jW3fBlUZbENF/Wuks8DChsprUs1cBrCOcXJbMmOUF8cPL UkocfSOsm0NpspYA5p9jlPby8z4rSiQsgUGcQ1pNOeBkS9BSFfeHK2Hd9eYS+A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710173526; a=rsa-sha256; cv=none; b=MAxe/XfPYqiGowqQidWuSBDS5+gK09GVMurxKGUh+JrTcFmgiF5FDjtkCEgP6luy6yuULw MXvIWBQ+w/7Cd9BsrV9RIn7yecvxyJWDROCekosrDim1UWFNdsjnnCnmnNXalCpGWMKf3u POoAEw6AmDlBA464ziwWdVlfiFQgtMG+0U+i97JTRhve/y1PoL+ZLR1i1IFDlhEwGgDc8U DwQ43Aqb4XkN4VCM25Bp+1FjEYHV/BBAnwGKdDRbe4/9yxJmy6PRApEAg7U1qmYa1QA48R ULWu3OAL5f6rKcGuV1rpxtI1SxaQ4KN9XEM/3GzNSFQ6O0o3Zwh90ONYgBvx0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710173526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=csH8jvCbMMXbn1GLq7VdsY0lG/7lVKp2ySCy8czWUmc=; b=cBBIVYGY7RUiQuR+wHbBncdo83Qty3vqHm6PU3qTmEXlvCrNhlupaRQEfWbS0U2rg2bYUL bj+VMzoznYF2dNtlPY4z2b/p+KGC2Rd7/qGihLx2hHwv63r9Y0BM934P87Hg+t3fOtz2MK oG+Egvkr31e63KQw1FTN7/cuzP45WJSs2gOImdoHyoWuXsCWQHUbwAX5ZxomtKNOKnt3me C3zOcRWuXnDCxDK1lUgGTlvO6CWi2IuOTzPgZ+Xc3joQ4qUw51CWpZ2Z6h6N51Yf+/R1BV lj8e0/Unyy0xPr5gueNRGKrib1LVs3LjS6U7tpBDh3/AYRTyVSdNwPPqET6cxQ== 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 4TthcQ02yJzcHC; Mon, 11 Mar 2024 16:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42BGC58K099193; Mon, 11 Mar 2024 16:12:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42BGC5T5099190; Mon, 11 Mar 2024 16:12:05 GMT (envelope-from git) Date: Mon, 11 Mar 2024 16:12:05 GMT Message-Id: <202403111612.42BGC5T5099190@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: f45ecf5fe407 - stable/14 - linux: require vnet(9) context in ifname_bsd_to_linux_name() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f45ecf5fe4076fac300cd1e2e93877ff1762c93a Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f45ecf5fe4076fac300cd1e2e93877ff1762c93a commit f45ecf5fe4076fac300cd1e2e93877ff1762c93a Author: Gleb Smirnoff AuthorDate: 2024-03-03 20:56:58 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-11 16:11:56 +0000 linux: require vnet(9) context in ifname_bsd_to_linux_name() This function is used by netlink(9) only. The netlink(9) taskqueue thread runs in the vnet of the socket whose request the thread is processing right now. This is a correct vnet and resetting it to vnet0 is incorrect. If the function is to be used by any other caller in addition to netlink(9), it would be caller's responsiblity to provide correct vnet(9). Reviewed by: melifaro, dchagin Differential Revision: https://reviews.freebsd.org/D44191 PR: 277286 (cherry picked from commit 2f5a315b307447f91891c96fb23c7333fa406f2f) --- sys/compat/linux/linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux.c b/sys/compat/linux/linux.c index 569f9ffe1617..69849b1d98ad 100644 --- a/sys/compat/linux/linux.c +++ b/sys/compat/linux/linux.c @@ -253,14 +253,14 @@ ifname_bsd_to_linux_name(const char *bsdname, char *lxname, size_t len) struct ifnet *ifp; int ret; + CURVNET_ASSERT_SET(); + ret = 0; - CURVNET_SET(TD_TO_VNET(curthread)); NET_EPOCH_ENTER(et); ifp = ifunit(bsdname); if (ifp != NULL) ret = ifname_bsd_to_linux_ifp(ifp, lxname, len); NET_EPOCH_EXIT(et); - CURVNET_RESTORE(); return (ret); } From nobody Mon Mar 11 16:12:53 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TthdK2ZR4z5DFdM; Mon, 11 Mar 2024 16:12: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TthdK21TQz4f2b; Mon, 11 Mar 2024 16:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710173573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uYEmVXhF65rG0EOYq+gPcJA0eYn1KFPNDZpxmoC1OjU=; b=ELYPlbdYZudOhH99wGBpoOqjhuz5se/ecDy3voxvaFfttHU+HsqTEpxuwfZ7Rk06eb5jC9 goVw9bWzSbHEBP72nnaGuE4JhN5GqThbjNf6aaVDed8faWHnOnOK4eJA6gmM17i/oh9Z3u kTLaAug5lVGRnwg90suOYAvR+29xmnDuwcWTm/SsdDt3HAj0xG88nbw09RRILmkrj1km8k D3y2iisXqwXhSSLQlbxHXasWBENR5MouaKhHoBCj2cX9UcGJ2v2wmNLQgPqyX0KzMo5TqJ J2+89UFHyoyDC7a37W4o/yNb6V5q4vkR2EkuOCMObY3jWuNcH8dXeD/xsVTOLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710173573; a=rsa-sha256; cv=none; b=U9tq6g7byrhsZFCC73fA5jnqJiQdZYikx0sjvHuJhx/iRAtpl/pnGC4rCXIugif2mXut3q 7C3sVybmjSbgTzLY0bL/44rr0qjmlrrT+MTSac8gLOIEgPqvQ+lQGWMwtIIxKMuJASt3nB sGNwf7+taGOoyrkIeaEVWRU4FD3Qzc2U4iCplMszedwWAAQobOeiZ7g2kfdaUZspsQC3B2 JnklYFc1CA9lMwwTWWRBpqjXP2tMhSMoeTWK2uTMgxURHSBPMvUke8JD0yesFWI89/Funm lS0L/LS81ooQz26klt4Sh9Xyf8t+QJv26mB5IC3njtn+M9zKDTzuEtE79XGnZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710173573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uYEmVXhF65rG0EOYq+gPcJA0eYn1KFPNDZpxmoC1OjU=; b=nYtx7JbYu08hm98qSQGEzrWkybMAO/EUxiDyL5XBThRLLG9KycyGj1rw8ywTjVFbWiIRRD jfMKRIw4l9tS5QdnipfJXV01s7cReFFNAbclXUgQcZ2v6HoLzsvHA5uBPLz1vbax4q8sOD luYsSJONG1+v2xpsIZw7RquBN+7Q3a+5sSm4JYSA0EdMsObazO7lRHg3/ehCEjdWNs1Vsg gkyHkk/B4hm0ekGO5p53HxvPbOE6mua5aLKhwMkeEWIUMVGbpQIbOKUQimKZStxDleeVQ5 PH7lemzWDRZZqFfmgQH/PsUTf3dN9EjU6has755CQLLyOdpmUbpsaWiYP33Qrg== 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 4TthdK1dWNzcm2; Mon, 11 Mar 2024 16:12:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42BGCrjh000299; Mon, 11 Mar 2024 16:12:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42BGCrZd000296; Mon, 11 Mar 2024 16:12:53 GMT (envelope-from git) Date: Mon, 11 Mar 2024 16:12:53 GMT Message-Id: <202403111612.42BGCrZd000296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: db4429d00f0d - stable/13 - linux: require vnet(9) context in ifname_bsd_to_linux_name() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: db4429d00f0d95a1532f8707f8b828a744586dc7 Auto-Submitted: auto-generated The branch stable/13 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=db4429d00f0d95a1532f8707f8b828a744586dc7 commit db4429d00f0d95a1532f8707f8b828a744586dc7 Author: Gleb Smirnoff AuthorDate: 2024-03-03 20:56:58 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-11 16:12:36 +0000 linux: require vnet(9) context in ifname_bsd_to_linux_name() This function is used by netlink(9) only. The netlink(9) taskqueue thread runs in the vnet of the socket whose request the thread is processing right now. This is a correct vnet and resetting it to vnet0 is incorrect. If the function is to be used by any other caller in addition to netlink(9), it would be caller's responsiblity to provide correct vnet(9). Reviewed by: melifaro, dchagin Differential Revision: https://reviews.freebsd.org/D44191 PR: 277286 (cherry picked from commit 2f5a315b307447f91891c96fb23c7333fa406f2f) --- sys/compat/linux/linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linux/linux.c b/sys/compat/linux/linux.c index 6191372b6312..141fa715c7c1 100644 --- a/sys/compat/linux/linux.c +++ b/sys/compat/linux/linux.c @@ -250,14 +250,14 @@ ifname_bsd_to_linux_name(const char *bsdname, char *lxname, size_t len) struct ifnet *ifp; int ret; + CURVNET_ASSERT_SET(); + ret = 0; - CURVNET_SET(TD_TO_VNET(curthread)); NET_EPOCH_ENTER(et); ifp = ifunit(bsdname); if (ifp != NULL) ret = ifname_bsd_to_linux_ifp(ifp, lxname, len); NET_EPOCH_EXIT(et); - CURVNET_RESTORE(); return (ret); } From nobody Mon Mar 11 16:18:51 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TthmD1JKZz5DGgs; Mon, 11 Mar 2024 16:18: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TthmC6MCPz4fqv; Mon, 11 Mar 2024 16:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710173931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h8RBDpVgXDhhq2wQGxZuLKRmiEDU+O8wl+s48njRoFs=; b=MD0+4jLlolt/CqqMO9iYOlNn9a/UW/7GObOJi6xXgR/+3Z8Eis0mS0K8PfM67rvWViI3Jc xe9uHbFACLgXPJt0Y759EJLEd6LLz+B03Pexl7rbHjCDtSndlEPgjHgCe9xGJNvd689PJ+ N9DT71OLT+nDqUyg2YKZkDGVp3HDQzKdKlm27HY21yz+ucR50OA6cXMj6laO28dvPQL79a mfwsf6w4MiTVA98cza03BLqeyGnJEmx/WAds5fL9ZZbZ0ZQ6hqcguNSA87FjuoyijGotM8 v/PrywfoVXrxqfLl4Et/f+GrbBksbTum+Vg/K6zrr3W7+vX+sjUIoqq0zr6+Xw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710173931; a=rsa-sha256; cv=none; b=X2tYozPAt22acpV6T2kNgCqf3OtEbNpe2Dob+OqHj8qCAh/a7wZf01pPEueYjLP0xYCTgV zk2HxiQEG8jq0+W8DyNgJu8UAC4LwYctlcfWhzPTDWYkygOwzhYJd1WDQ9Y7ExR9OhshOp 3Aim2gbDuYZ5/019NMkEcJj56W4nH5m7GboUSOulrGqZEvmZyAWT+dKOVdYcVe/pR3JalB OMGCVpUDdt9xjKVJzVlqxXz3R9R5V3kpjySZvv4510Xg+kiWF4cxrwsfj2Zoe596+6xQLb Dd9DEFJpp6cGOtMWj2/cU26AIXyoq2Z9NjjdcW1aJRSKRn07RGdMsQs31FWKrA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710173931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h8RBDpVgXDhhq2wQGxZuLKRmiEDU+O8wl+s48njRoFs=; b=QAGJGaeD3KRg7bdX8d5jnFPEi1KXmjQ8AHd1GAlwK82x1Ca/Gn8Ij9MoC7ijFzeT4VMm80 MxoL7c/swBrjy46H3mYh6A/cBGZy0QGoLP28hoPhoDWVxsh5UBlWpnBBYuZi36r8HlxXRj H4s4JXMDjsoZaQl7o8qVs01S8wQQGku/PEMpo8dxURqzospn7yOLDKo5MEej7HUNzKR6zt 8/qj5KMMDiWcE08Q3b+pdKcBRfr1yb8VlTFw7tF5W0rKLKBmE2jx3uhs9VAled1gK9LFAh LvQejRgU5jiVnX2N2P2HX6hX76ANjJGktm0T6+qBXTGhGYgrxxT4G3vPmqWkcQ== 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 4TthmC5yqKzcV3; Mon, 11 Mar 2024 16:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42BGIpHl001193; Mon, 11 Mar 2024 16:18:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42BGIpku001190; Mon, 11 Mar 2024 16:18:51 GMT (envelope-from git) Date: Mon, 11 Mar 2024 16:18:51 GMT Message-Id: <202403111618.42BGIpku001190@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: a15b8e32942b - stable/14 - snd_hda: add 32-bit memory quirk for Creative Sound Blaster Audigy FX List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: a15b8e32942b2cbf70c7fc71e9c82d2b292e82c3 Auto-Submitted: auto-generated The branch stable/14 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=a15b8e32942b2cbf70c7fc71e9c82d2b292e82c3 commit a15b8e32942b2cbf70c7fc71e9c82d2b292e82c3 Author: Gleb Smirnoff AuthorDate: 2024-02-23 19:30:13 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-11 16:18:42 +0000 snd_hda: add 32-bit memory quirk for Creative Sound Blaster Audigy FX Despite still being in production the device appeared not able to use memory above BUS_SPACE_MAXADDR_32BIT, and if your desktop has a lot of memory there is a high chance driver would allocate inaccessible memory. Submitted by: wulf Reviewed by: mav (cherry picked from commit 89189224adb560af6de2bb2e13a2b1831b89101d) --- sys/dev/sound/pci/hda/hdac.c | 1 + sys/dev/sound/pci/hda/hdac.h | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index 1f06692ba36e..704bcad3822c 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -201,6 +201,7 @@ static const struct { { HDA_VMWARE, "VMware", 0, 0 }, { HDA_SIS_966, "SiS 966/968", 0, 0 }, { HDA_ULI_M5461, "ULI M5461", 0, 0 }, + { HDA_CREATIVE_SB1570, "Creative SB Audigy FX", 0, HDAC_QUIRK_64BIT }, /* Unknown */ { HDA_INTEL_ALL, "Intel", 0, 0 }, { HDA_NVIDIA_ALL, "NVIDIA", 0, 0 }, diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 31bdc9130d9b..53c101f3119b 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -192,6 +192,7 @@ /* Creative */ #define CREATIVE_VENDORID 0x1102 +#define HDA_CREATIVE_SB1570 HDA_MODEL_CONSTRUCT(CREATIVE, 0x0012) #define HDA_CREATIVE_ALL HDA_MODEL_CONSTRUCT(CREATIVE, 0xffff) /* VIA */ From nobody Mon Mar 11 16:20:18 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tthnt54gKz5DH2X; Mon, 11 Mar 2024 16:20: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tthnt4GRlz4gLq; Mon, 11 Mar 2024 16:20:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710174018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cuy2S+T39aYSttK3KOvipq95bIf/8vMGDbaNbRM5/nE=; b=E/5LFa7zXEEwQk30ptUxwvtT4bVu7hmph+PogwlnLPRERqhUWUUTF10+H+3Bbsr6mbTsqR D7xVSZYoBXRET0k0dp/0MRYaLBPutA6ZRznZKeFwKd+ii/s8a0v54KvsNVkl7xNrtnK76O CHruMuwLR4KI9kd7u2EeMbbEIfaSZ9HBpI1onq3PF9EluP2zF8pPXOHZcTgrOAmuouWUjQ 73aa5plbFongvU6loLlef8yAd7dJL6kQBlRrWfUkSjI3G7TWD8KiMwItqG3VjzBnclv4KR vhKyKy9LsVgKe0MK4rnQeNFzfhSZ3rnnjBzpJHQMPH9wx3AZMOySiBnSkRk7vg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710174018; a=rsa-sha256; cv=none; b=Vw1LqyVIf/uPhy5Bm5I8RspQlyjmgA5bPFktBPR/ZSe5neQZ1AYXlVi7kjy66bCOLUqVYn Dfgr64eRXxCvlElY3ww2U0osLRbWFPtIGsP8sLWyPGmY1MC7oMqYc48MufXyRvc9cMNiph qrGOgGwkJuAGL0ky71616b0hM8J7xM3TY24RVz8Cj0bOJyvtOeBgznY5p5q1S8hqMdCr5T wnQRG7500HnOsG7h72fBQvBKC1VgYdPp0PKGX2E+Cmidbd44yubkpeSubXFtagIyaz0qyk qFIuVDVEfEHuWXbyT05wmUDea3bmcJLwaknT79YBlnGFoyqk3aFeFa6E4zNHWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710174018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cuy2S+T39aYSttK3KOvipq95bIf/8vMGDbaNbRM5/nE=; b=QbVsW+Xeh/R5nZm/bCpxgVEjDCiYmU/ScKg46gIRpZCCOFIw7vIKJfth3pOhTuIB5F5kps TYX37QjiYZA7xKDxBZb7bBdHmsVPM0DXCjGBqUZEVa8c7grfPiPjFQODwB77L88+7Nae1J XfeOCJZjJ+j5mrsWXi998z3dGPt0Ad3DR1KfVAD/cWxoAEFuLgJwnYPHou61WJ3eHPUIVs ZevU41yuYKog9ljGeoWoXifpaB1e2bu4FYqCtvi0FA42DM2Qaiba7BWx3fyQ9DN7ZkLfsX DHlh2B++BZOWWf5FMckfpH6TYxOtY5siVqWiyNtbZFROY7jwVve28y2caAv6NQ== 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 4Tthnt3sxKzcjj; Mon, 11 Mar 2024 16:20:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42BGKIuf010145; Mon, 11 Mar 2024 16:20:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42BGKI87010142; Mon, 11 Mar 2024 16:20:18 GMT (envelope-from git) Date: Mon, 11 Mar 2024 16:20:18 GMT Message-Id: <202403111620.42BGKI87010142@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: c0d9fab3c45b - stable/13 - snd_hda: add 32-bit memory quirk for Creative Sound Blaster Audigy FX List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: c0d9fab3c45b3de19ec6c969bbd1d148a9e8a295 Auto-Submitted: auto-generated The branch stable/13 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=c0d9fab3c45b3de19ec6c969bbd1d148a9e8a295 commit c0d9fab3c45b3de19ec6c969bbd1d148a9e8a295 Author: Gleb Smirnoff AuthorDate: 2024-02-23 19:30:13 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-11 16:20:10 +0000 snd_hda: add 32-bit memory quirk for Creative Sound Blaster Audigy FX Despite still being in production the device appeared not able to use memory above BUS_SPACE_MAXADDR_32BIT, and if your desktop has a lot of memory there is a high chance driver would allocate inaccessible memory. Submitted by: wulf Reviewed by: mav (cherry picked from commit 89189224adb560af6de2bb2e13a2b1831b89101d) --- sys/dev/sound/pci/hda/hdac.c | 1 + sys/dev/sound/pci/hda/hdac.h | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index 3d2c4001d68d..f5be149ae117 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -203,6 +203,7 @@ static const struct { { HDA_VMWARE, "VMware", 0, 0 }, { HDA_SIS_966, "SiS 966/968", 0, 0 }, { HDA_ULI_M5461, "ULI M5461", 0, 0 }, + { HDA_CREATIVE_SB1570, "Creative SB Audigy FX", 0, HDAC_QUIRK_64BIT }, /* Unknown */ { HDA_INTEL_ALL, "Intel", 0, 0 }, { HDA_NVIDIA_ALL, "NVIDIA", 0, 0 }, diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index a1ddd19a518c..bcda5d563524 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -192,6 +192,7 @@ /* Creative */ #define CREATIVE_VENDORID 0x1102 +#define HDA_CREATIVE_SB1570 HDA_MODEL_CONSTRUCT(CREATIVE, 0x0012) #define HDA_CREATIVE_ALL HDA_MODEL_CONSTRUCT(CREATIVE, 0xffff) /* VIA */ From nobody Mon Mar 11 20:51:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TtppD4kwvz5DhZd; Mon, 11 Mar 2024 20:51: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TtppD4FZ1z57x7; Mon, 11 Mar 2024 20:51:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710190260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JHJYzEcD2xAuF76RLSwJpM+BZy4bGPGKnVw+T72DjT0=; b=Dp3CwJfGADwiL4AsgM04Gt4gnK5JEoYP0a/4jnAs+iNJEdL9RgM38FBwQaa3IRXZ8xYkMG 0qcCHY8nNGZ25WYVOyRTNBKLMoqQ3hp0Zh2ibGottxLIW9d0fR1W5aRcmacVMGX7CFRCyo otE3xtEqvoLjcbqEroC302yUcfwbB2F8h3XN/pSjMEZjFRu0nvwBapXu53WYMhigxIsGRT /xXkdqz5wQ61e8UH6Ns0hFKcn2ts8GVJF5d+8Rvl0i8J0kdsWrAPnuUuKvMKO4uc/80GD6 dXLLj+fD1hSiqM7ztN0Fr8Ch23pE6xIfXWqPvl/VhvRq0DUNDQAiMQEnmfBwOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710190260; a=rsa-sha256; cv=none; b=CCVyc/d6ppA0l0ogOB0vXB+wY6iN8/y0Y3XsMdUMFkpMVgtPm0VHIJX/cPoKNRjMD8srM+ uCFh/iqeDFUMoTTQPZZKCEF8DQYFUiX7FDMdgg59D9kzhU9x8MK+2D1VtSRrosct50rmNn xOX2vTvrB0Dx+NQWZ0D7U1rVXKNMWdQqf6Zu9a73GERqyGXLGzO3hgvUg77tH4z14gkKCK 0FN6aIQbTU5v4f1T4HaXzMCm2XkaN4wNCw/WwdcHFKKHputCq4wbgOxM9yo3+CL07zatfw zGqANJEDsx28iazdecEjo+fxcmBJFsR9VSusM72uJB6/xghBR/yNb0yxLBZwRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710190260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JHJYzEcD2xAuF76RLSwJpM+BZy4bGPGKnVw+T72DjT0=; b=pLR2XRjBPyGUgVf4kTm3gJwdY8htNZsC1Ao/NxkTwx1+4og58LwkffG61auHC/41FNEwCW UTuzIASGHaLzzR8lFzVyaDdT7JgmY8Lqh1h6IAeCcnGBCAaWSjCMcaweYbyeUnWYLbiByM E7LPZvytFGafUrXr0o2OIjcnGRqOjBf13WZQG8BrO9tSWZ7L40UIcauF2JLvQOY/+Q03+x UqGjnxjdcXf2FsUxGZxqDo1k3fZBbaaT5gfvQjgi1DytXAbG8Ix5elS94sn43rQXGOB9dp edlMwtIc4bawUZX0Y+K1YtIfBxoXGBkQ4wNfy7DM6SdPCdj3e3rIX4mkRNZW9w== 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 4TtppD3rxrzlNk; Mon, 11 Mar 2024 20:51:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42BKp012066775; Mon, 11 Mar 2024 20:51:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42BKp0PP066772; Mon, 11 Mar 2024 20:51:00 GMT (envelope-from git) Date: Mon, 11 Mar 2024 20:51:00 GMT Message-Id: <202403112051.42BKp0PP066772@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: 9cfb9a34bf15 - stable/13 - Eliminate unnecessary UFS1 integrity checks. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9cfb9a34bf154b27d21f9e2dfe8d2704ab664ed4 Auto-Submitted: auto-generated The branch stable/13 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=9cfb9a34bf154b27d21f9e2dfe8d2704ab664ed4 commit 9cfb9a34bf154b27d21f9e2dfe8d2704ab664ed4 Author: Kirk McKusick AuthorDate: 2024-03-11 20:49:57 +0000 Commit: Kirk McKusick CommitDate: 2024-03-11 20:50:48 +0000 Eliminate unnecessary UFS1 integrity checks. This was missed in the cited cherry pick. This is a follow-on report to bug report 264450 (comments 21-33). Reported by: slb@sonnet.com Tested by: slb@sonnet.com PR: 264450 (cherry picked from commit b241767f8ef38f9ca7c109fe2fccd11ccbfaa4f0) --- sys/ufs/ffs/ffs_subr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/ufs/ffs/ffs_subr.c b/sys/ufs/ffs/ffs_subr.c index ad9128f06266..ca595ed5bd80 100644 --- a/sys/ufs/ffs/ffs_subr.c +++ b/sys/ufs/ffs/ffs_subr.c @@ -392,7 +392,6 @@ validate_sblock(struct fs *fs, int isaltsblk) CHK(fs->fs_old_rotdelay, !=, 0, %jd); CHK(fs->fs_old_rps, !=, 60, %jd); CHK(fs->fs_old_nspf, !=, fs->fs_fsize / sectorsize, %jd); - CHK(fs->fs_old_cpg, !=, 1, %jd); CHK(fs->fs_old_interleave, !=, 1, %jd); CHK(fs->fs_old_trackskew, !=, 0, %jd); CHK(fs->fs_old_cpc, !=, 0, %jd); From nobody Mon Mar 11 21:05:29 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Ttq6y2Ymqz5Djnj; Mon, 11 Mar 2024 21:05: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ttq6y0YVyz3x6V; Mon, 11 Mar 2024 21:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710191130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XKrcqXn0Bj1AOEke5jrYJp+LwGL1Vql5Tt9NKDcIGb0=; b=s9LeJEWoUZnKAyiw0tJ4gDZY8wcgeXmtxAEADTfI9FSfF3hBHBkFiX67ERYMHUnKVSH2B/ HXrf7LLO235YMZ8ay7ACjNaSUYA/PVI9jN2o4WnguON9ugSFaJsH5TEZ5Fz2KJAz/sFWC1 twkxnFgExOGGQRPnNe1qIZXfRDPVSjzTeFHKX+61o+aXAReifyUPxFZ1ihbvcEwWuJa9do bk+kc8ufQRYQQNPUHQLednnY0s2C4axSGMx076DsiBxZRg7yf29pOor5q1GrcHLk068qXH eBtB3L61TTWvf5ZA+26YIt0dvTL1GFz6U3NGwmkNdsLFruot0hdxKLeGlEVb4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710191130; a=rsa-sha256; cv=none; b=L+1tjqnM1DGMqkUR4eGQO2XdKXYRVZRA5LB6rSo15TLnCxRRJls2AwicxwWvpuvGXHvNwF hxMMrH3K8VNfvqIIB0Cq2wVzFOxFoWRMFL8u73RcFyKCoJPy2G8Hms1RqkdUl8BxaO0h19 8sNtXjqPSomjgK0wCP1HJQFqj7p+tia3zVyVu2TBa1INnlm3qNkN6eRfbJKO4g8khGlN1R YKWaouVALvWy1YHj0HzQ6bVclHfC7vp2D7qj55woQxbFq5GqTJJztyxekgRmedkchFTfJY Glh7xPW8XhawGrEISyJkOY0xAr/Hp7rSkc0FwTpOtx1ZHBAStvfcTdpkb1NmNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710191130; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XKrcqXn0Bj1AOEke5jrYJp+LwGL1Vql5Tt9NKDcIGb0=; b=CIWkJEqsTy6IpKlkJTDkVjnFwXST9UG9cxTlbqV96dIjk6ttGK8ZFKIASXjYpb5Q1LfKae tFWgc6pxbPgGpS3/kCQn6EG3QZN5vGhdOJcOdZE2aLl6Pq2aS9b+M98qFGCS8gC8d6x8Cp BMouYQn2vbBW1QKJbuOwztNlDDPDVgs6gKDz4Hempx2A+KfTEX5UrR37zpzYQ6zA2hi2y4 mw7oraiNK9Yr/sl9NwN65DhPZRYSW5XT7uPBHnCwdLUFE4M6nbO7fyWxYxAJMPdACFpbgz dFh9NDUIns/n36ZpxfFsH7S1Xo6DcFIuoQVA7bPTjmhmdDonvWIxaYP+dFywkA== 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 4Ttq6y06hrzlgr; Mon, 11 Mar 2024 21:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42BL5TM7091965; Mon, 11 Mar 2024 21:05:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42BL5TrU091962; Mon, 11 Mar 2024 21:05:29 GMT (envelope-from git) Date: Mon, 11 Mar 2024 21:05:29 GMT Message-Id: <202403112105.42BL5TrU091962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: 6766a47c0211 - stable/13 - vnet: add CURVNET_ASSERT_SET List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 6766a47c02117a4935c097dc8996c9faf7b42d4f Auto-Submitted: auto-generated The branch stable/13 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=6766a47c02117a4935c097dc8996c9faf7b42d4f commit 6766a47c02117a4935c097dc8996c9faf7b42d4f Author: Mateusz Guzik AuthorDate: 2022-02-17 16:48:45 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-11 20:58:00 +0000 vnet: add CURVNET_ASSERT_SET Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D34312 (cherry picked from commit 75cde1f872a4dc2187e6d172e5a5e69a2b3a59cf) --- sys/net/vnet.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/net/vnet.h b/sys/net/vnet.h index 12bf0d83c119..fb26077e694c 100644 --- a/sys/net/vnet.h +++ b/sys/net/vnet.h @@ -236,6 +236,10 @@ void vnet_log_recursion(struct vnet *, const char *, int); curvnet = saved_vnet; #endif /* VNET_DEBUG */ +#define CURVNET_ASSERT_SET() \ + VNET_ASSERT(curvnet != NULL, ("vnet is not set at %s:%d %s()", \ + __FILE__, __LINE__, __func__)) + extern struct vnet *vnet0; #define IS_DEFAULT_VNET(arg) ((arg) == vnet0) From nobody Tue Mar 12 04:51:57 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tv1TB12dZz5DG2w; Tue, 12 Mar 2024 04:51: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tv1TB0ZNsz4ltb; Tue, 12 Mar 2024 04:51:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710219118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m4yYx+FYA0QeY8GIB64BVJwpKrXTdbNLeyYgWNibQ9A=; b=yc0QNetx/aVy+bFKLEqnLmphevO3gqV1sMaIIEo39qpobixsn96tySM8P1DjWndLZqAWqP xr9A47TFcTPV3qdyAJ4bqDGrgwT0PviT9M1hWULXttrs/yuzouGeQKJPuKw6wjuo75dzrL f6hNNO+cmdvE/qWoWCHSY+wefBQbZnFtq0yToYNAp5azHqEVTkk2ouLxUNbLKzHRrIIIXf 1/G7sjkB4rrVhz3qx8POBf2Jyi92LWobiFvAIGfZ6vbdQlMv6xRFFH0zdAX+dFutIT8My3 UAdRWkON3a++ZORk0zf4WtEzrYN/gADrwwfFw2wp4mnCDt5mzIGZSO11KC9V7w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710219118; a=rsa-sha256; cv=none; b=KHjIh+Wl+VIw2HTCkz99mg8IOFvMsqYENqMiNmhSUvj6+Dg0zM9S5Y6L7YaQ8/6sTavcvn tKqRK6na4GylLhEZmanQhaf0Nd3vl7nRd2yQjiUlAqCH90ttV/xyXcXrzKUdIIjfZppDUl QHeFcfhF810LBEClIW4KzYciF7nFw4U1Hcoov01o9TQiDhxEGotcjm9PUtj01j4cnMostX o7scDUNYm5dSBFELUBpWQmH821shY4GT8broUd/KZCxzZyl8Z2AP0LRcqa7TvxccWx0RWc HspnCEvKKKAJMkB7uYN4y8TxGVeJFC/cG6ZB0+D/+ONpvpkqvIKJeF1IsaRXfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710219118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=m4yYx+FYA0QeY8GIB64BVJwpKrXTdbNLeyYgWNibQ9A=; b=eCwt237ajFl8wdbmTteJeMXpPCUZhK2ADjMKzxwtygrhoI08AtgMgXKV6NFU5YUlQdF1W6 PUaMfg0DbKBMb+z18mhghNLexrl4k9VfEblUGawGZQLydicBRAKLD55v54bkeOLWc+k0m9 A5OwD0vE7YxNL4LKGzeQLGulJft/i2qFK2T9BHhZn7Hz/aPstembgXy9gBO4kxkJRY6WjF 8BNPOafK0Z6hUM7qj8vqPfsrkxU/fcUUyLDhNqzi7gRvsygmoMACgT4DzrEmPGEK/fgxfu R95qo47yihHU5eufSszi6lzS+qAMPWPzhTye7BsdeRr+axwRpqAY/9N46Ofa0Q== 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 4Tv1TB09gHz10b1; Tue, 12 Mar 2024 04:51:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42C4pvFE085979; Tue, 12 Mar 2024 04:51:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42C4pviX085976; Tue, 12 Mar 2024 04:51:57 GMT (envelope-from git) Date: Tue, 12 Mar 2024 04:51:57 GMT Message-Id: <202403120451.42C4pviX085976@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 47fff7407c22 - stable/14 - ada: Another NCQ Trim instability drive List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 47fff7407c22c2c4b36b4f9f27ddfa70bb8f3fee Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=47fff7407c22c2c4b36b4f9f27ddfa70bb8f3fee commit 47fff7407c22c2c4b36b4f9f27ddfa70bb8f3fee Author: Warner Losh AuthorDate: 2024-02-19 05:10:55 +0000 Commit: Warner Losh CommitDate: 2024-03-12 04:46:28 +0000 ada: Another NCQ Trim instability drive The Seagate IronWolf 110 SATA SSD drive has been reported to be unstable with NCQ trim enabled. PR: 264139 Sponsored by: Netflix (cherry picked from commit a6cef617660a424fcaa8343787f96d0ae720a284) --- sys/cam/ata/ata_da.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index e9a1c175f333..fc4dc91f9d54 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -814,6 +814,11 @@ static struct ada_quirk_entry ada_quirk_table[] = { T_DIRECT, SIP_MEDIA_FIXED, "*", "WDC WDS?????G0*", "*" }, /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN }, + { + /* Seagate IronWolf 110 SATA SSD NCQ Trim is unstable */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "ZA*NM*", "*" }, + /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN + }, { /* Default */ { From nobody Tue Mar 12 05:14:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tv1z62FxJz5DJZ3; Tue, 12 Mar 2024 05:14: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tv1z56PhBz4ngB; Tue, 12 Mar 2024 05:14:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710220465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E5cPFzEl0lTbf3YTFnDJ5STsHasTtKLwwbx+IK1TjWo=; b=T9T1EnuJ8rUpjSiHnz9Y8Kb2gJxi5zEjzWY/bvcLjsIMNmO+yTJwfb26nTLrYCu0FxsJzr mW7bm/jb2S6hkGoc5tqDSQ7wWQ8ZMDV+74NLP56ypiPqSFRnw+r3mywtXXGT/lxibz8mzJ 1k3e8+GGSx2DoyHzVuZSC2EOKxGyB7POhzanLT4qxjqxnZ6UIrnC7JBo7J32U4j7T0eM61 U41PFsw4vc1Cv7VMTMtUATmuxDtvmQ5tw9utVTFvFv5oaRV2RMotoP/R4DF/gTbzVT2joM f/iVWdD/O1k3SbjQKAOh+zlmg/PeUTzKc9481RB2VX6cyygoCxBE0KPaMXjoCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710220465; a=rsa-sha256; cv=none; b=Osvw4laIUnlHvnCGe6gD7v3Ga94Q/ZIR9R2cIKWzxcZolhvEqGsApzIGJ2G8fcCSE9Nqsy 4iShhix8406ISt5ZWQpUToVuHARAVYlr2RZmQupNoY4vMFp5ESQt9P9w1MQbKyZpNv0IHU 0eC3yJgQk7wlVnt4bNMhqBt2wU4RRKDRy40CixPVS6oCWPwrAxOyfVSd5IQu9Fii8IkyN+ djeJizLGwp0rS8OagS6Y/JA5PwRdeG5dVvXNUvZiIsnzLZDi2Zc7fArLALyYrmPi/cWRFd +azzBmmjlJo9pXkDZEFcfZwGpYMGntcTtZSY5ntV7TwfGzPM5bcffVbRde7e/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710220465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E5cPFzEl0lTbf3YTFnDJ5STsHasTtKLwwbx+IK1TjWo=; b=JpJ1vlaT9DAWY5jGStk4X+0alrzB8lFlr8XdmUF4+LAQCO1NmuPph16PNRkrgaQhpOsvWB DKZyeMx0v5peVEW2WNwKfQT8sZ5yZ0e2JJKqux35NpDLhe7MLVgqWOoherBi5an5/eVALs /5NsBSrrFfezFgPML5A54nTEEqsedwAqxmbujpl0Vd/F1YMsHsZPQTOFWxvNHZ2/gwCklk pvo1Hy6Eb7mkUoWqMqUL05Kexy4lHS/YMGndAFrTfFGJQd4qCfTE6JhxacL9gpJeJ7/+3D xdPXNAiDYdR82FajJMYh8wqMZhqQIw4N6TeLpQDG3GgtRCfiXq1VFisZf2LRZQ== 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 4Tv1z561qnz11M9; Tue, 12 Mar 2024 05:14:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42C5EPcg022298; Tue, 12 Mar 2024 05:14:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42C5EPls022295; Tue, 12 Mar 2024 05:14:25 GMT (envelope-from git) Date: Tue, 12 Mar 2024 05:14:25 GMT Message-Id: <202403120514.42C5EPls022295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wei Hu Subject: git: e4b8828947b1 - stable/13 - Hyper-V: vPCI: limit 64 cpus for msi/msix interrupt handling List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e4b8828947b1135fba411f58cac123c85bb24093 Auto-Submitted: auto-generated The branch stable/13 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=e4b8828947b1135fba411f58cac123c85bb24093 commit e4b8828947b1135fba411f58cac123c85bb24093 Author: Wei Hu AuthorDate: 2024-03-11 10:15:09 +0000 Commit: Wei Hu CommitDate: 2024-03-12 05:04:59 +0000 Hyper-V: vPCI: limit 64 cpus for msi/msix interrupt handling On older Hyper-V vPCI protocol version 1.1, only the first 64 cpus are able to handle msi/msix. This is true on FreeBSD 13.x and earlier releases. If MSI IRQ is assigned to cpu id greater than 63, it would lead to missing interrupts. Add check in set_interrupt_apic_ids() to only add first 64 cpus into the interrupt cpu set. Reported by: NetApp Tested by: NetApp Reviewed by: kib Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D44297 --- sys/x86/x86/mp_x86.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c index 1f4caf07f979..56cf7e426076 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -1184,6 +1184,13 @@ set_interrupt_apic_ids(void) !hyperthreading_intr_allowed) continue; + /* + * Currently Hyper-V only supports intr on first + * 64 cpus. + */ + if (vm_guest == VM_GUEST_HV && i > 63) + continue; + intr_add_cpu(i); } } From nobody Tue Mar 12 14:49:10 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TvGkG4HRMz5DxtD; Tue, 12 Mar 2024 14:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TvGkG2kbbz4pwB; Tue, 12 Mar 2024 14:49:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710254950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mnseIHzRdZLQH+HbCnDxxtV+bUYlMqCXodG6Nl6T4QU=; b=h3CCQjx/8EPiTzvAO07hamqv/qwd+UT7OMDCnFzGDxXzzgiN8s9I+6+zlXNNKHqPEyBTlu 8fqplIGW6XsRbdisbGmK+cYHJHNtI56YW32w9LgkWKMhI43Tp6Ni+sy8c9OwGYEzUV5mG/ e4H+jAW06zTgiTAradum45YYazumM/XyoOTMTBlc9P41rOxLfKujrS/j0+xHp8P4ov+w7R AraYU9ViEyK9PRfVh+YcZV+dugb82FEFI0uI5Noe5gtU7a9A817bcShUBsocMWTdCtxNay p5COtAKZL6/GBIG4UDBfO4HJjGnxbGSRyKtljHiSe6pimf/HixbdM4D2rffdOw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710254950; a=rsa-sha256; cv=none; b=q72pn8T0jYdKOnB81Fl6CaKMqtUEiFjn3OF4xWxvsLynIoBIoCwBkhpq5KySleIAzR+K++ sRDZ2FpXQvub5c9iTWorDVfaAPpeifyg9yd+Ra/QTPecMtqZl7umXfwEI2U42O0uJDMw4b y1c0xJLPEcK0aeQ3HxlFrScVkPbtaAfWLglWMghrryWD5H/KeOKO09bmvGAY0IukoOvTdx AIwzAwtxoekm6iKxor81+uzfGzCKRe3OucDc8SBjZy4qT6470tFH11Q40VmwYr2PDccXjF J5B+w1QkED4hTkodaXVXxeJOIlrsRPo//kOoApzg7ijzdyidKNmE+8z52FBmcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710254950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mnseIHzRdZLQH+HbCnDxxtV+bUYlMqCXodG6Nl6T4QU=; b=YzzcaxNeCiWnB6LqupZ2OPIYUThC98ZL/xof5Mt2OcyqGvBcwr3z1r6LHI5Ga2YN1KI9Lu S/NG7BwbW00Ul/7GRMujSKqn7zzg9SIUoHjTN7U1utMqiFzbnE1UeQPpmqGGhgUf0sSumB yWSQ6akFWBF3vS8YUxCjv9BSoTPDhR9iJaEG8oQ9tPS5RtfsHlKLlXzldsqBkn1BnIp/RT jkl5vIIXLY9ROmweawbyb6aewSyxZmwoEZwIyJFldhOD/CpX0YRuIQJ64KS3vBZkCNFcMn FZEwLr/slq5qVrIG+haWap6SAnWwCinm7XY1uUVqatGRwwbyA45NsA0r1jDS4Q== 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 4TvGkG2LSsz1H1m; Tue, 12 Mar 2024 14:49:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42CEnAp8083903; Tue, 12 Mar 2024 14:49:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42CEnApj083900; Tue, 12 Mar 2024 14:49:10 GMT (envelope-from git) Date: Tue, 12 Mar 2024 14:49:10 GMT Message-Id: <202403121449.42CEnApj083900@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: b0f058525b5b - stable/14 - awk: Fix the tests List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: b0f058525b5b67e140b6c1ae9415092175290d97 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b0f058525b5b67e140b6c1ae9415092175290d97 commit b0f058525b5b67e140b6c1ae9415092175290d97 Author: Warner Losh AuthorDate: 2024-03-08 05:40:43 +0000 Commit: Warner Losh CommitDate: 2024-03-12 04:53:47 +0000 awk: Fix the tests I'd forgotten that we have to adjust the stderr tests from upstream. Remove the OK files. Also remove system-status.*. These restore the fixes I made in 517e52b6c21c which were lost when I imported the last version of awk. Also, force LANG to be C.UTF-8 when testing to ensure that stray lang settings don't fail tests. Sponsored by: Netflix (cherry picked from commit ba7b7f94c239ce43343d7af403734fdc941b7664) --- contrib/one-true-awk/bugs-fixed/missing-precision.ok | 2 -- contrib/one-true-awk/bugs-fixed/negative-nf.ok | 2 -- contrib/one-true-awk/bugs-fixed/pfile-overflow.ok | 4 ---- contrib/one-true-awk/bugs-fixed/system-status.awk | 19 ------------------- contrib/one-true-awk/bugs-fixed/system-status.bad | 3 --- contrib/one-true-awk/bugs-fixed/system-status.ok | 3 --- contrib/one-true-awk/bugs-fixed/system-status.ok2 | 3 --- usr.bin/awk/tests/bugs-fixed/bug_fix_test.sh | 1 + 8 files changed, 1 insertion(+), 36 deletions(-) diff --git a/contrib/one-true-awk/bugs-fixed/missing-precision.ok b/contrib/one-true-awk/bugs-fixed/missing-precision.ok deleted file mode 100644 index 75e1e3d00446..000000000000 --- a/contrib/one-true-awk/bugs-fixed/missing-precision.ok +++ /dev/null @@ -1,2 +0,0 @@ -../a.out: not enough args in printf(%*s) - source line number 1 diff --git a/contrib/one-true-awk/bugs-fixed/negative-nf.ok b/contrib/one-true-awk/bugs-fixed/negative-nf.ok deleted file mode 100644 index de97f8b27def..000000000000 --- a/contrib/one-true-awk/bugs-fixed/negative-nf.ok +++ /dev/null @@ -1,2 +0,0 @@ -../a.out: cannot set NF to a negative value - source line number 1 diff --git a/contrib/one-true-awk/bugs-fixed/pfile-overflow.ok b/contrib/one-true-awk/bugs-fixed/pfile-overflow.ok deleted file mode 100644 index a0de50f9007f..000000000000 --- a/contrib/one-true-awk/bugs-fixed/pfile-overflow.ok +++ /dev/null @@ -1,4 +0,0 @@ -../a.out: syntax error at source line 1 source file pfile-overflow.awk - context is - >>> <<< -../a.out: bailing out at source line 1 source file pfile-overflow.awk diff --git a/contrib/one-true-awk/bugs-fixed/system-status.awk b/contrib/one-true-awk/bugs-fixed/system-status.awk deleted file mode 100644 index 8daf563e6f4f..000000000000 --- a/contrib/one-true-awk/bugs-fixed/system-status.awk +++ /dev/null @@ -1,19 +0,0 @@ -# Unmodified nawk prints the 16 bit exit status divided by 256, but -# does so using floating point arithmetic, yielding strange results. -# -# The fix is to use the various macros defined for wait(2) and to -# use the signal number + 256 for death by signal, or signal number + 512 -# for death by signal with core dump. - -BEGIN { - status = system("exit 42") - print "normal status", status - - status = system("kill -HUP $$") - print "death by signal status", status - - status = system("kill -ABRT $$") - print "death by signal with core dump status", status - - system("rm -f core*") -} diff --git a/contrib/one-true-awk/bugs-fixed/system-status.bad b/contrib/one-true-awk/bugs-fixed/system-status.bad deleted file mode 100644 index a1317dba54a8..000000000000 --- a/contrib/one-true-awk/bugs-fixed/system-status.bad +++ /dev/null @@ -1,3 +0,0 @@ -normal status 42 -death by signal status 0.00390625 -death by signal with core dump status 0.523438 diff --git a/contrib/one-true-awk/bugs-fixed/system-status.ok b/contrib/one-true-awk/bugs-fixed/system-status.ok deleted file mode 100644 index 737828f5ed7a..000000000000 --- a/contrib/one-true-awk/bugs-fixed/system-status.ok +++ /dev/null @@ -1,3 +0,0 @@ -normal status 42 -death by signal status 257 -death by signal with core dump status 518 diff --git a/contrib/one-true-awk/bugs-fixed/system-status.ok2 b/contrib/one-true-awk/bugs-fixed/system-status.ok2 deleted file mode 100644 index f1f631e1cb33..000000000000 --- a/contrib/one-true-awk/bugs-fixed/system-status.ok2 +++ /dev/null @@ -1,3 +0,0 @@ -normal status 42 -death by signal status 257 -death by signal with core dump status 262 diff --git a/usr.bin/awk/tests/bugs-fixed/bug_fix_test.sh b/usr.bin/awk/tests/bugs-fixed/bug_fix_test.sh index 7c8cfa47f99e..588e2f86b0b7 100644 --- a/usr.bin/awk/tests/bugs-fixed/bug_fix_test.sh +++ b/usr.bin/awk/tests/bugs-fixed/bug_fix_test.sh @@ -25,6 +25,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # +export LANG=C.UTF-8 SRCDIR=$(atf_get_srcdir) check() From nobody Tue Mar 12 14:49:09 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TvGkF2KlSz5Dxy2; Tue, 12 Mar 2024 14:49: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TvGkF24csz4ptQ; Tue, 12 Mar 2024 14:49:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710254949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OjJDO1jAEAOb2nEEiQbxvNNXurlyR5ujeByqeIr5+EY=; b=lJgtikfEEgy4DVUWXN/OQwQsaF9b7hwwaDEXxDn4EOHm6rrvK1+DT8DcOxmuTvc3DN0o6E Nm5laiAOclrbCMBEza3ekWg2oPmuEU6+bqXG1vmD/EPO7x9c6F+E0sW85ZnaP+VROa9Cwy fjGsK6rRHihtmI9XEFXvLZD9frBeN8CvgQwsteXn5qQuMEII/gridejNBHJ5/Z75hsJ43Q 9wKw0gnL9igTZ8qnoc8Ah/qEhAENagrG0dPIHESPWPdSazFKze4oNwudHgOvjRpW6mhvcr 2hF7BpSAIfmSB8k9qtDBjTOKdAVyamkAJP5AqTBKeSP+RlgD50BS9vsSTjMiJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710254949; a=rsa-sha256; cv=none; b=DdCxri5yBvK8X0I67L0k0QJcO+af2SvCxkftcIxc0+ZOI1snPsrkbUQAz5P51/sTUhNnpa z3t0JdeWpzZDmWNpTTBtVh1dvjqbj/vfkjnS4ic36lU3iuA/kq4wPoOKygu1OBIAnGeUcq 5Ub42QgY+vQRu2xDmTCkjIIV6KX+i4jgCb4BGyNG5cnjwJM66lA3xdE7LILlY2ugAiwKvg /UMH/L/xLXubIUlqDlurxAubmTN244FOtt9Nhro42HAXlNr2pl/JZFvuF/viZYQ0eafGAh kivCGQZ7X1APjK3NwCF3V599+b1dFkawcXr8j6YvtsL2nJbt1tERQZtvijFf3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710254949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OjJDO1jAEAOb2nEEiQbxvNNXurlyR5ujeByqeIr5+EY=; b=H6/7rPDrkLKKF+zVhjbISVVXcpjBCoWba88MOCVbzJKhtLQJTJ24YIQtzhkBK6Y4EBwd53 Ku/RimxmOSvJUOnDUlgxHBa50MzLYoLW6L8czGAGue+iCEH/H6BbF8K+UTkDiBTAdy4Pey lvUCGrS7wyyL//dp2yrMTXS56ExgdOaMmNLdBG7soAA5xLuUJgE8+5iNBqOMA3lteC4WMG dTTzy6OYapfJNxFFi8AeEr6ttcpvGmGultxvGpx/w4BJdamc1RRKN7ugsSTaF341i+7/Ff txQZxwBsna0xnGWrIH5dQ7BCi80mwC9DgJ1FOQNQpUE7LCjI9YTrqEJaulJcZg== 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 4TvGkF1gjKz1H1l; Tue, 12 Mar 2024 14:49:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42CEn9P2083854; Tue, 12 Mar 2024 14:49:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42CEn9ta083851; Tue, 12 Mar 2024 14:49:09 GMT (envelope-from git) Date: Tue, 12 Mar 2024 14:49:09 GMT Message-Id: <202403121449.42CEn9ta083851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: daf917daba9c - stable/14 - Merge one true awk from 2024-01-22 for the Awk Second Edition support List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: daf917daba9c41c2e11dd5470e632a6ebf4f38e1 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=daf917daba9c41c2e11dd5470e632a6ebf4f38e1 commit daf917daba9c41c2e11dd5470e632a6ebf4f38e1 Author: Warner Losh AuthorDate: 2024-02-28 15:16:16 +0000 Commit: Warner Losh CommitDate: 2024-03-12 04:53:18 +0000 Merge one true awk from 2024-01-22 for the Awk Second Edition support This brings in Unicode support, CSV support and a number of bug fixes. They are described in _The AWK Programming Language_, Second Edition, by Al Aho, Brian Kernighan, and Peter Weinberger (Addison-Wesley, 2024, ISBN-13 978-0138269722, ISBN-10 0138269726). Sponsored by: Netflix (cherry picked from commit f32a6403d34654ac6e61182d09abb5e85850e1ee) --- contrib/one-true-awk/FIXES | 1429 ++------------------ contrib/one-true-awk/FIXES.1e | 1429 ++++++++++++++++++++ contrib/one-true-awk/README.md | 80 +- contrib/one-true-awk/awk.1 | 34 +- contrib/one-true-awk/awk.h | 23 +- contrib/one-true-awk/awkgram.y | 49 +- contrib/one-true-awk/b.c | 409 ++++-- contrib/one-true-awk/bugs-fixed/REGRESS | 8 +- .../one-true-awk/bugs-fixed/getline-corruption.awk | 5 + .../one-true-awk/bugs-fixed/getline-corruption.in | 1 + .../one-true-awk/bugs-fixed/getline-corruption.ok | 1 + contrib/one-true-awk/bugs-fixed/matchop-deref.awk | 11 + contrib/one-true-awk/bugs-fixed/matchop-deref.bad | 2 + contrib/one-true-awk/bugs-fixed/matchop-deref.in | 1 + contrib/one-true-awk/bugs-fixed/matchop-deref.ok | 2 + .../one-true-awk/bugs-fixed/missing-precision.ok | 2 + contrib/one-true-awk/bugs-fixed/negative-nf.ok | 2 + contrib/one-true-awk/bugs-fixed/pfile-overflow.ok | 4 + contrib/one-true-awk/bugs-fixed/rstart-rlength.awk | 10 + contrib/one-true-awk/bugs-fixed/rstart-rlength.ok | 4 + contrib/one-true-awk/bugs-fixed/system-status.awk | 19 + contrib/one-true-awk/bugs-fixed/system-status.bad | 3 + contrib/one-true-awk/bugs-fixed/system-status.ok | 3 + contrib/one-true-awk/bugs-fixed/system-status.ok2 | 3 + .../one-true-awk/bugs-fixed/unicode-fs-rs-1.awk | 6 + contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.in | 2 + contrib/one-true-awk/bugs-fixed/unicode-fs-rs-1.ok | 5 + .../one-true-awk/bugs-fixed/unicode-fs-rs-2.awk | 7 + contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.in | 2 + contrib/one-true-awk/bugs-fixed/unicode-fs-rs-2.ok | 4 + .../one-true-awk/bugs-fixed/unicode-null-match.awk | 6 + .../one-true-awk/bugs-fixed/unicode-null-match.bad | 1 + .../one-true-awk/bugs-fixed/unicode-null-match.ok | 1 + contrib/one-true-awk/lex.c | 60 +- contrib/one-true-awk/lib.c | 158 ++- contrib/one-true-awk/main.c | 23 +- contrib/one-true-awk/makefile | 8 +- contrib/one-true-awk/maketab.c | 4 +- contrib/one-true-awk/parse.c | 2 +- contrib/one-true-awk/proto.h | 10 +- contrib/one-true-awk/run.c | 942 +++++++++---- contrib/one-true-awk/testdir/Compare.tt | 2 +- contrib/one-true-awk/testdir/REGRESS | 2 +- contrib/one-true-awk/testdir/T.argv | 6 + contrib/one-true-awk/testdir/T.csv | 80 ++ contrib/one-true-awk/testdir/T.flags | 5 +- contrib/one-true-awk/testdir/T.misc | 20 + contrib/one-true-awk/testdir/T.overflow | 2 + contrib/one-true-awk/testdir/T.split | 1 + contrib/one-true-awk/testdir/T.utf | 194 +++ contrib/one-true-awk/testdir/T.utfre | 234 ++++ contrib/one-true-awk/testdir/tt.15 | 2 +- contrib/one-true-awk/tran.c | 26 +- 53 files changed, 3525 insertions(+), 1824 deletions(-) diff --git a/contrib/one-true-awk/FIXES b/contrib/one-true-awk/FIXES index 8a2befccd624..a043b356fafa 100644 --- a/contrib/one-true-awk/FIXES +++ b/contrib/one-true-awk/FIXES @@ -22,1354 +22,87 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ****************************************************************/ -This file lists all bug fixes, changes, etc., made since the AWK book -was sent to the printers in August, 1987. +This file lists all bug fixes, changes, etc., made since the +second edition of the AWK book was published in September 2023. -July 27, 2021: - As per IEEE Std 1003.1-2008, -F "str" is now consistent with - -v FS="str" when str is null. Thanks to Warner Losh. - -July 24, 2021: - Fix readrec's definition of a record. This fixes an issue - with NetBSD's RS regular expression support that can cause - an infinite read loop. Thanks to Miguel Pineiro Jr. - - Fix regular expression RS ^-anchoring. RS ^-anchoring needs to - know if it is reading the first record of a file. This change - restores a missing line that was overlooked when porting NetBSD's - RS regex functionality. Thanks to Miguel Pineiro Jr. - - Fix size computation in replace_repeat() for special case - REPEAT_WITH_Q. Thanks to Todd C. Miller. - -February 15, 2021: - Small fix so that awk will compile again with g++. Thanks to +Jan 22, 2024: + Restore the ability to compile with g++. Thanks to Arnold Robbins. -January 06, 2021: - Fix a decision bug with trailing stuff in lib.c:is_valid_number - after recent changes. Thanks to Ozan Yigit. - -December 18, 2020: - Fix problems converting inf and NaN values in lib.c:is_valid_number. - Enhance number to string conversion to do the right thing for - NaN and inf values. Things are now pretty much the same as in - gawk. (Found a gawk bug while we're at it.) Added a torture - test for these values. Thanks to Arnold Robbins. Allows closing - of PR #101. - -December 15, 2020: - Merge PR #99, which gets the right header for strcasecmp. - Thanks to GitHub user michaelforney. - -December 8, 2020: - Merge PR #98: Disallow hex data. Allow only +nan, -nan, - +inf, -inf (case independent) to give NaN and infinity values. - Improve things so that string to double conversion is only - done once, yielding something of a speedup. This obviate - PR #95. Thanks to Arnold Robbins. - -December 3, 2020: - Fix to argument parsing to avoid printing spurious newlines. - Thanks to Todd Miller. Merges PR #97. - -October 13, 2020: - Add casts before all the calls to malloc/calloc/realloc in order - to get it to compile with g++. Thanks to Arnold Robbins. - -August 16, 2020: - Additional fixes for DJGPP. Thanks to Eli Zaretskii for - the testing. - -August 7, 2020: - Merge PR #93, which adds casts to (void*) for debug prints - using the %p format specifier. Thanks to GitHub user YongHaoWu - ("Chris") for the fixes. - -August 4, 2020: - In run.c, use non-restartable multibyte routines to attain - portability to DJGPP. Should fix Issue 92. Thanks to Albert Wik - for the report and to Todd Miller for the suggested fix. - -July 30, 2020: - Merge PRs 88-91 which fix small bugs. Thanks to Todd Miller and - Tim van der Molen for the fixes. - - In order to make life easier, we move exclusively to bison - as the parser generator. - -July 2, 2020: - Merge PRs 85 and 86 which fix regressions. Thanks to - Tim van der Molen for the fixes. - -June 25, 2020: - Merge PRs 82 and 84. The latter fixes issue #83. Thanks to - Todd Miller and awkfan77. - -June 12, 2020: - Clear errno before calling errcheck to avoid any spurious errors - left over from previous calls that may have set it. Thanks to - Todd Miller for the fix, from PR #80. - - Fix Issue #78 by allowing \r to follow floating point numbers in - lib.c:is_number. Thanks to GitHub user ajcarr for the report - and to Arnold Robbins for the fix. - -June 5, 2020: - In fldbld(), make sure that inputFS is set before trying to - use it. Thanks to Steffen Nurpmeso - for the report. - -May 5, 2020: - Fix checks for compilers that can handle noreturn. Thanks to - GitHub user enh-google for pointing it out. Closes Issue #79. - -April 16, 2020: - Handle old compilers that don't support C11 (for noreturn). - Thanks to Arnold Robbins. - -April 5, 2020: - Use and noreturn instead of GCC attributes. - Thanks to GitHub user awkfan77. Closes PR #77. - -February 28, 2020: - More cleanups from Christos Zoulas: notably backslash continuation - inside strings removes the newline and a fix for RS = "^a". - Fix for address sanitizer-found problem. Thanks to GitHub user - enh-google. - -February 19, 2020: - More small cleanups from Christos Zoulas. - -February 18, 2020: - Additional cleanups from Christos Zoulas. It's no longer necessary - to use the -y flag to bison. - -February 6, 2020: - Additional small cleanups from Christos Zoulas. awk is now - a little more robust about reporting I/O errors upon exit. - -January 31, 2020: - Merge PR #70, which avoids use of variable length arrays. Thanks - to GitHub user michaelforney. Fix issue #60 ({0} in interval - expressions doesn't work). Also get all tests working again. - Thanks to Arnold Robbins. - -January 24, 2020: - A number of small cleanups from Christos Zoulas. Add the close - on exec flag to files/pipes opened for redirection; courtesy of - Arnold Robbins. - -January 19, 2020: - If POSIXLY_CORRECT is set in the environment, then sub and gsub - use POSIX rules for multiple backslashes. This fixes Issue #66, - while maintaining backwards compatibility. - -January 9, 2020: - Input/output errors on closing files are now fatal instead of - mere warnings. Thanks to Martijn Dekker . - -January 5, 2020: - Fix a bug in the concatentation of two string constants into - one done in the grammar. Fixes GitHub issue #61. Thanks - to GitHub user awkfan77 for pointing out the direction for - the fix. New test T.concat added to the test suite. - Fix a few memory leaks reported by valgrind, as well. - -December 27, 2019: - Fix a bug whereby a{0,3} could match four a's. Thanks to - "Anonymous AWK fan" for the report. - -December 11, 2019: - Further printf-related fixes for 32 bit systems. - Thanks again to Christos Zoulas. - -December 8, 2019: - Fix the return value of sprintf("%d") on 32 bit systems. - Thanks to Jim Lowe for the report and to Christos Zoulas - for the fix. - -November 10, 2019: - Convert a number of Boolean integer variables into - actual bools. Convert compile_time variable into an - enum and simplify some of the related code. Thanks - to Arnold Robbins. - -November 8, 2019: - Fix from Ori Bernstein to get UTF-8 characters instead of - bytes when FS = "". This is currently the only bit of - the One True Awk that understands multibyte characters. - From Arnold Robbins, apply some cleanups in the test suite. - -October 25, 2019: - More fixes and cleanups from NetBSD, courtesy of Christos - Zoulas. Merges PRs 54 and 55. - -October 24, 2019: - Import second round of code cleanups from NetBSD. Much thanks - to Christos Zoulas (GitHub user zoulasc). Merges PR 53. - Add an optimization for string concatenation, also from - Christos. - -October 17, 2019: - Import code cleanups from NetBSD. Much thanks to Christos - Zoulas (GitHub user zoulasc). Merges PR 51. - -October 6, 2019: - Import code from NetBSD awk that implements RS as a regular - expression. - -September 10, 2019: - Fixes for various array / memory overruns found via gcc's - -fsanitize=unknown. Thanks to Alexander Richardson (GitHub - user arichardson). Merges PRs 47 and 48. - -July 28, 2019: - Import grammar optimization from NetBSD: Two string constants - concatenated together get turned into a single string. - -July 26, 2019: - Support POSIX-specified C-style escape sequences "\a" (alarm) - and "\v" (vertical tab) in command line arguments and regular - expressions, further to the support for them in strings added on - Apr 9, 1989. These now no longer match as literal "a" and "v" - characters (as they don't on other awk implementations). - Thanks to Martijn Dekker. - -July 17, 2019: - Pull in a number of code cleanups and minor fixes from - Warner Losh's bsd-ota branch. The only user visible change - is the use of random(3) as the random number generator. - Thanks to Warner Losh for collecting all these fixes in - one easy place to get them from. - -July 16, 2019: - Fix field splitting to use FS value as of the time a record - was read or assigned to. Thanks to GitHub user Cody Mello (melloc) - for the fix. (Merged from his branch, via PR #42.) Updated - testdir/T.split per said PR as well. - -June 24, 2019: - Extract awktest.tar into testdir directory. Add some very - simple mechanics to the makefile for running the tests and - for cleaning up. No changes to awk itself. - -June 17, 2019: - Disallow deleting SYMTAB and its elements, which creates - use-after-free bugs. Thanks to GitHub user Cody Mello (melloc) - for the fix. (Merged from PR #43.) - -June 5, 2019: - Allow unmatched right parenthesis in a regular expression to - be treated literally. Fixes Issue #40. Thanks to GitHub user - Warner Losh (bsdimp) for the report. Thanks to Arnold Robbins - for the fix. - -May 29,2019: - Fix check for command line arguments to no longer require that - first character after '=' not be another '='. Reverts change of - August 11, 1989. Thanks to GitHub user Jamie Landeg Jones for - pointing out the issue; from Issue #38. - -Apr 7, 2019: - Update awktest.tar(p.50) to use modern options to sort. Needed - for Android development. Thanks to GitHub user mohd-akram (Mohamed - Akram). From Issue #33. - -Mar 12, 2019: - Added very simplistic support for cross-compiling in the - makefile. We are NOT going to go in the direction of the - autotools, though. Thanks to GitHub user nee-san for - the basic change. (Merged from PR #34.) - -Mar 5, 2019: - Added support for POSIX-standard interval expressions (a.k.a. - bounds, a.k.a. repetition expressions) in regular expressions, - backported (via NetBSD) from Apple awk-24 (20070501). - Thanks to Martijn Dekker for the port. - (Merged from PR #30.) - -Mar 3, 2019: - Merge PRs as follows: - #12: Avoid undefined behaviour when using ctype(3) functions in - relex(). Thanks to GitHub user iamleot. - #31: Make getline handle numeric strings, and update FIXES. Thanks - to GitHub user arnoldrobbins. - #32: maketab: support build systems with read-only source. Thanks - to GitHub user enh. - -Jan 25, 2019: - Make getline handle numeric strings properly in all cases. - (Thanks, Arnold.) - -Jan 21, 2019: - Merged a number of small fixes from GitHub pull requests. - Thanks to GitHub users Arnold Robbins (arnoldrobbins), - Cody Mello (melloc) and Christoph Junghans (junghans). - PR numbers: 13-21, 23, 24, 27. - -Oct 25, 2018: - Added test in maketab.c to prevent generating a proctab entry - for YYSTYPE_IS_DEFINED. It was harmless but some gcc settings - generated a warning message. Thanks to Nan Xiao for report. - -Aug 27, 2018: - Disallow '$' in printf formats; arguments evaluated in order - and printed in order. - - Added some casts to silence warnings on debugging printfs. - (Thanks, Arnold.) - -Aug 23, 2018: - A long list of fixes courtesy of Arnold Robbins, - to whom profound thanks. - - 1. ofs-rebuild: OFS value used to rebuild the record was incorrect. - Fixed August 19, 2014. Revised fix August 2018. - - 2. system-status: Instead of a floating-point division by 256, use - the wait(2) macros to create a reasonable exit status. - Fixed March 12, 2016. - - 3. space: Use provided xisblank() function instead of ispace() for - matching [[:blank:]]. - - 4. a-format: Add POSIX standard %a and %A to supported formats. Check - at runtime that this format is available. - - 5. decr-NF: Decrementing NF did not change $0. This is a decades-old - bug. There are interactions with the old and new value of OFS as well. - Most of the fix came from the NetBSD awk. - - 6. string-conv: String conversions of scalars were sticky. Once a - conversion to string happened, even with OFMT, that value was used until - a new numeric value was assigned, even if OFMT differed from CONVFMT, - and also if CONVFMT changed. - - 7. unary-plus: Unary plus on a string constant returned the string. - Instead, it should convert the value to numeric and give that value. - - Also added Arnold's tests for these to awktest.tar as T.arnold. - -Aug 15, 2018: - fixed mangled awktest.tar (thanks, Arnold), posted all - current (very minor) fixes to github / onetrueawk - -Jun 7, 2018: - (yes, a long layoff) - Updated some broken tests (beebe.tar, T.lilly) - [thanks to Arnold Robbins] - -Mar 26, 2015: - buffer overflow in error reporting; thanks to tobias ulmer - and john-mark gurney for spotting it and the fix. - -Feb 4, 2013: - cleaned up a handful of tests that didn't seem to actually - test for correct behavior: T.latin1, T.gawk. - -Jan 5, 2013: - added ,NULL initializer to static Cells in run.c; not really - needed but cleaner. Thanks to Michael Bombardieri. - -Dec 20, 2012: - fiddled makefile to get correct yacc and bison flags. pick yacc - (linux) or bison (mac) as necessary. - - added __attribute__((__noreturn__)) to a couple of lines in - proto.h, to silence someone's enthusiastic checker. - - fixed obscure call by value bug in split(a[1],a) reported on - 9fans. the management of temporary values is just a mess; i - took a shortcut by making an extra string copy. thanks - to paul patience and arnold robbins for passing it on and for - proposed patches. - - tiny fiddle in setfval to eliminate -0 results in T.expr, which - has irritated me for 20+ years. - -Aug 10, 2011: - another fix to avoid core dump with delete(ARGV); again, many thanks - to ruslan ermilov. - -Aug 7, 2011: - split(s, a, //) now behaves the same as split(s, a, "") - -Jun 12, 2011: - /pat/, \n /pat/ {...} is now legal, though bad style to use. - - added checks to new -v code that permits -vnospace; thanks to - ruslan ermilov for spotting this and providing the patch. - - removed fixed limit on number of open files; thanks to aleksey - cheusov and christos zoulos. - - fixed day 1 bug that resurrected deleted elements of ARGV when - used as filenames (in lib.c). - - minor type fiddles to make gcc -Wall -pedantic happier (but not - totally so); turned on -fno-strict-aliasing in makefile. - -May 6, 2011: - added #ifdef for isblank. - now allows -ffoo as well as -f foo arguments. - (thanks, ruslan) - -May 1, 2011: - after advice from todd miller, kevin lo, ruslan ermilov, - and arnold robbins, changed srand() to return the previous - seed (which is 1 on the first call of srand). the seed is - an Awkfloat internally though converted to unsigned int to - pass to the library srand(). thanks, everyone. - - fixed a subtle (and i hope low-probability) overflow error - in fldbld, by adding space for one extra \0. thanks to - robert bassett for spotting this one and providing a fix. - - removed the files related to compilation on windows. i no - longer have anything like a current windows environment, so - i can't test any of it. - -May 23, 2010: - fixed long-standing overflow bug in run.c; many thanks to - nelson beebe for spotting it and providing the fix. - - fixed bug that didn't parse -vd=1 properly; thanks to santiago - vila for spotting it. - -Feb 8, 2010: - i give up. replaced isblank with isspace in b.c; there are - no consistent header files. - -Nov 26, 2009: - fixed a long-standing issue with when FS takes effect. a - change to FS is now noticed immediately for subsequent splits. - - changed the name getline() to awkgetline() to avoid yet another - name conflict somewhere. - -Feb 11, 2009: - temporarily for now defined HAS_ISBLANK, since that seems to - be the best way through the thicket. isblank arrived in C99, - but seems to be arriving at different systems at different - times. - -Oct 8, 2008: - fixed typo in b.c that set tmpvec wrongly. no one had ever - run into the problem, apparently. thanks to alistair crooks. - -Oct 23, 2007: - minor fix in lib.c: increase inputFS to 100, change malloc - for fields to n+1. - - fixed memory fault caused by out of order test in setsval. - - thanks to david o'brien, freebsd, for both fixes. - -May 1, 2007: - fiddle in makefile to fix for BSD make; thanks to igor sobrado. - -Mar 31, 2007: - fixed some null pointer refs calling adjbuf. - -Feb 21, 2007: - fixed a bug in matching the null RE in sub and gsub. thanks to al aho - who actually did the fix (in b.c), and to wolfgang seeberg for finding - it and providing a very compact test case. - - fixed quotation in b.c; thanks to Hal Pratt and the Princeton Dante - Project. - - removed some no-effect asserts in run.c. - - fiddled maketab.c to not complain about bison-generated values. - - removed the obsolete -V argument; fixed --version to print the - version and exit. - - fixed wording and an outright error in the usage message; thanks to igor - sobrado and jason mcintyre. - - fixed a bug in -d that caused core dump if no program followed. - -Jan 1, 2007: - dropped mac.code from makefile; there are few non-MacOSX - mac's these days. - -Jan 17, 2006: - system() not flagged as unsafe in the unadvertised -safe option. - found it while enhancing tests before shipping the ;login: article. - practice what you preach. - - removed the 9-years-obsolete -mr and -mf flags. - - added -version and --version options. - - core dump on linux with BEGIN {nextfile}, now fixed. - - removed some #ifdef's in run.c and lex.c that appear to no - longer be necessary. - -Apr 24, 2005: - modified lib.c so that values of $0 et al are preserved in the END - block, apparently as required by posix. thanks to havard eidnes - for the report and code. - -Jan 14, 2005: - fixed infinite loop in parsing, originally found by brian tsang. - thanks to arnold robbins for a suggestion that started me - rethinking it. - -Dec 31, 2004: - prevent overflow of -f array in main, head off potential error in - call of SYNTAX(), test malloc return in lib.c, all with thanks to - todd miller. - -Dec 22, 2004: - cranked up size of NCHARS; coverity thinks it can be overrun with - smaller size, and i think that's right. added some assertions to b.c - to catch places where it might overrun. the RE code is still fragile. - -Dec 5, 2004: - fixed a couple of overflow problems with ridiculous field numbers: - e.g., print $(2^32-1). thanks to ruslan ermilov, giorgos keramidas - and david o'brien at freebsd.org for patches. this really should - be re-done from scratch. - -Nov 21, 2004: - fixed another 25-year-old RE bug, in split. it's another failure - to (re-)initialize. thanks to steve fisher for spotting this and - providing a good test case. - -Nov 22, 2003: - fixed a bug in regular expressions that dates (so help me) from 1977; - it's been there from the beginning. an anchored longest match that - was longer than the number of states triggered a failure to initialize - the machine properly. many thanks to moinak ghosh for not only finding - this one but for providing a fix, in some of the most mysterious - code known to man. - - fixed a storage leak in call() that appears to have been there since - 1983 or so -- a function without an explicit return that assigns a - string to a parameter leaked a Cell. thanks to moinak ghosh for - spotting this very subtle one. - -Jul 31, 2003: - fixed, thanks to andrey chernov and ruslan ermilov, a bug in lex.c - that mis-handled the character 255 in input. (it was being compared - to EOF with a signed comparison.) - -Jul 29, 2003: - fixed (i think) the long-standing botch that included the beginning of - line state ^ for RE's in the set of valid characters; this led to a - variety of odd problems, including failure to properly match certain - regular expressions in non-US locales. thanks to ruslan for keeping - at this one. - -Jul 28, 2003: - n-th try at getting internationalization right, with thanks to volker - kiefel, arnold robbins and ruslan ermilov for advice, though they - should not be blamed for the outcome. according to posix, "." is the - radix character in programs and command line arguments regardless of - the locale; otherwise, the locale should prevail for input and output - of numbers. so it's intended to work that way. - - i have rescinded the attempt to use strcoll in expanding shorthands in - regular expressions (cclenter). its properties are much too - surprising; for example [a-c] matches aAbBc in locale en_US but abBcC - in locale fr_CA. i can see how this might arise by implementation - but i cannot explain it to a human user. (this behavior can be seen - in gawk as well; we're leaning on the same library.) - - the issue appears to be that strcoll is meant for sorting, where - merging upper and lower case may make sense (though note that unix - sort does not do this by default either). it is not appropriate - for regular expressions, where the goal is to match specific - patterns of characters. in any case, the notations [:lower:], etc., - are available in awk, and they are more likely to work correctly in - most locales. - - a moratorium is hereby declared on internationalization changes. - i apologize to friends and colleagues in other parts of the world. - i would truly like to get this "right", but i don't know what - that is, and i do not want to keep making changes until it's clear. - -Jul 4, 2003: - fixed bug that permitted non-terminated RE, as in "awk /x". - -Jun 1, 2003: - subtle change to split: if source is empty, number of elems - is always 0 and the array is not set. - -Mar 21, 2003: - added some parens to isblank, in another attempt to make things - internationally portable. - -Mar 14, 2003: - the internationalization changes, somewhat modified, are now - reinstated. in theory awk will now do character comparisons - and case conversions in national language, but "." will always - be the decimal point separator on input and output regardless - of national language. isblank(){} has an #ifndef. - - this no longer compiles on windows: LC_MESSAGES isn't defined - in vc6++. - - fixed subtle behavior in field and record splitting: if FS is - a single character and RS is not empty, \n is NOT a separator. - this tortuous reading is found in the awk book; behavior now - matches gawk and mawk. - -Dec 13, 2002: - for the moment, the internationalization changes of nov 29 are - rolled back -- programs like x = 1.2 don't work in some locales, - because the parser is expecting x = 1,2. until i understand this - better, this will have to wait. - -Nov 29, 2002: - modified b.c (with tiny changes in main and run) to support - locales, using strcoll and iswhatever tests for posix character - classes. thanks to ruslan ermilov (ru@freebsd.org) for code. - the function isblank doesn't seem to have propagated to any - header file near me, so it's there explicitly. not properly - tested on non-ascii character sets by me. - -Jun 28, 2002: - modified run/format() and tran/getsval() to do a slightly better - job on using OFMT for output from print and CONVFMT for other - number->string conversions, as promised by posix and done by - gawk and mawk. there are still places where it doesn't work - right if CONVFMT is changed; by then the STR attribute of the - variable has been irrevocably set. thanks to arnold robbins for - code and examples. - - fixed subtle bug in format that could get core dump. thanks to - Jaromir Dolecek for finding and fixing. - minor cleanup in run.c / format() at the same time. - - added some tests for null pointers to debugging printf's, which - were never intended for external consumption. thanks to dave - kerns (dkerns@lucent.com) for pointing this out. - - GNU compatibility: an empty regexp matches anything (thanks to - dag-erling smorgrav, des@ofug.org). subject to reversion if - this does more harm than good. - - pervasive small changes to make things more const-correct, as - reported by gcc's -Wwrite-strings. as it says in the gcc manual, - this may be more nuisance than useful. provoked by a suggestion - and code from arnaud desitter, arnaud@nimbus.geog.ox.ac.uk - - minor documentation changes to note that this now compiles out - of the box on Mac OS X. - -Feb 10, 2002: - changed types in posix chars structure to quiet solaris cc. - -Jan 1, 2002: - fflush() or fflush("") flushes all files and pipes. - - length(arrayname) returns number of elements; thanks to - arnold robbins for suggestion. - - added a makefile.win to make it easier to build on windows. - based on dan allen's buildwin.bat. - -Nov 16, 2001: - added support for posix character class names like [:digit:], - which are not exactly shorter than [0-9] and perhaps no more - portable. thanks to dag-erling smorgrav for code. - -Feb 16, 2001: - removed -m option; no longer needed, and it was actually - broken (noted thanks to volker kiefel). - -Feb 10, 2001: - fixed an appalling bug in gettok: any sequence of digits, +,-, E, e, - and period was accepted as a valid number if it started with a period. - this would never have happened with the lex version. - - other 1-character botches, now fixed, include a bare $ and a - bare " at the end of the input. - -Feb 7, 2001: - more (const char *) casts in b.c and tran.c to silence warnings. - -Nov 15, 2000: - fixed a bug introduced in august 1997 that caused expressions - like $f[1] to be syntax errors. thanks to arnold robbins for - noticing this and providing a fix. - -Oct 30, 2000: - fixed some nextfile bugs: not handling all cases. thanks to - arnold robbins for pointing this out. new regressions added. - - close() is now a function. it returns whatever the library - fclose returns, and -1 for closing a file or pipe that wasn't - opened. - -Sep 24, 2000: - permit \n explicitly in character classes; won't work right - if comes in as "[\n]" but ok as /[\n]/, because of multiple - processing of \'s. thanks to arnold robbins. - -July 5, 2000: - minor fiddles in tran.c to keep compilers happy about uschar. - thanks to norman wilson. - -May 25, 2000: - yet another attempt at making 8-bit input work, with another - band-aid in b.c (member()), and some (uschar) casts to head - off potential errors in subscripts (like isdigit). also - changed HAT to NCHARS-2. thanks again to santiago vila. - - changed maketab.c to ignore apparently out of range definitions - instead of halting; new freeBSD generates one. thanks to - jon snader for pointing out the problem. - -May 2, 2000: - fixed an 8-bit problem in b.c by making several char*'s into - unsigned char*'s. not clear i have them all yet. thanks to - Santiago Vila for the bug report. - -Apr 21, 2000: - finally found and fixed a memory leak in function call; it's - been there since functions were added ~1983. thanks to - jon bentley for the test case that found it. - - added test in envinit to catch environment "variables" with - names beginning with '='; thanks to Berend Hasselman. - -Jul 28, 1999: - added test in defn() to catch function foo(foo), which - otherwise recurses until core dump. thanks to arnold - robbins for noticing this. - -Jun 20, 1999: - added *bp in gettok in lex.c; appears possible to exit function - without terminating the string. thanks to russ cox. - -Jun 2, 1999: - added function stdinit() to run to initialize files[] array, - in case stdin, etc., are not constants; some compilers care. - -May 10, 1999: - replaced the ERROR ... FATAL, etc., macros with functions - based on vprintf, to avoid problems caused by overrunning - fixed-size errbuf array. thanks to ralph corderoy for the - impetus, and for pointing out a string termination bug in - qstring as well. - -Apr 21, 1999: - fixed bug that caused occasional core dumps with commandline - variable with value ending in \. (thanks to nelson beebe for - the test case.) - -Apr 16, 1999: - with code kindly provided by Bruce Lilly, awk now parses - /=/ and similar constructs more sensibly in more places. - Bruce also provided some helpful test cases. - -Apr 5, 1999: - changed true/false to True/False in run.c to make it - easier to compile with C++. Added some casts on malloc - and realloc to be honest about casts; ditto. changed - ltype int to long in struct rrow to reduce some 64-bit - complaints; other changes scattered throughout for the - same purpose. thanks to Nelson Beebe for these portability - improvements. - - removed some horrible pointer-int casting in b.c and elsewhere - by adding ptoi and itonp to localize the casts, which are - all benign. fixed one incipient bug that showed up on sgi - in 64-bit mode. - - reset lineno for new source file; include filename in error - message. also fixed line number error in continuation lines. - (thanks to Nelson Beebe for both of these.) - -Mar 24, 1999: - Nelson Beebe notes that irix 5.3 yacc dies with a bogus - error; use a newer version or switch to bison, since sgi - is unlikely to fix it. - -Mar 5, 1999: - changed isnumber to is_number to avoid the problem caused by - versions of ctype.h that include the name isnumber. - - distribution now includes a script for building on a Mac, - thanks to Dan Allen. - -Feb 20, 1999: - fixed memory leaks in run.c (call) and tran.c (setfval). - thanks to Stephen Nutt for finding these and providing the fixes. - -Jan 13, 1999: - replaced srand argument by (unsigned int) in run.c; - avoids problem on Mac and potentially on Unix & Windows. - thanks to Dan Allen. - - added a few (int) casts to silence useless compiler warnings. - e.g., errorflag= in run.c jump(). - - added proctab.c to the bundle outout; one less thing - to have to compile out of the box. - - added calls to _popen and _pclose to the win95 stub for - pipes (thanks to Steve Adams for this helpful suggestion). - seems to work, though properties are not well understood - by me, and it appears that under some circumstances the - pipe output is truncated. Be careful. - -Oct 19, 1998: - fixed a couple of bugs in getrec: could fail to update $0 - after a getline var; because inputFS wasn't initialized, - could split $0 on every character, a misleading diversion. - - fixed caching bug in makedfa: LRU was actually removing - least often used. - - thanks to ross ridge for finding these, and for providing - great bug reports. - -May 12, 1998: - fixed potential bug in readrec: might fail to update record - pointer after growing. thanks to dan levy for spotting this - and suggesting the fix. - -Mar 12, 1998: - added -V to print version number and die. - -[notify dave kerns, dkerns@dacsoup.ih.lucent.com] - -Feb 11, 1998: - subtle silent bug in lex.c: if the program ended with a number - longer than 1 digit, part of the input would be pushed back and - parsed again because token buffer wasn't terminated right. - example: awk 'length($0) > 10'. blush. at least i found it - myself. - -Aug 31, 1997: - s/adelete/awkdelete/: SGI uses this in malloc.h. - thanks to nelson beebe for pointing this one out. - -Aug 21, 1997: - fixed some bugs in sub and gsub when replacement includes \\. - this is a dark, horrible corner, but at least now i believe that - the behavior is the same as gawk and the intended posix standard. - thanks to arnold robbins for advice here. - -Aug 9, 1997: - somewhat regretfully, replaced the ancient lex-based lexical - analyzer with one written in C. it's longer, generates less code, - and more portable; the old one depended too much on mysterious - properties of lex that were not preserved in other environments. - in theory these recognize the same language. - - now using strtod to test whether a string is a number, instead of - the convoluted original function. should be more portable and - reliable if strtod is implemented right. - - removed now-pointless optimization in makefile that tries to avoid - recompilation when awkgram.y is changed but symbols are not. - - removed most fixed-size arrays, though a handful remain, some - of which are unchecked. you have been warned. - -Aug 4, 1997: - with some trepidation, replaced the ancient code that managed - fields and $0 in fixed-size arrays with arrays that grow on - demand. there is still some tension between trying to make this - run fast and making it clean; not sure it's right yet. - - the ill-conceived -mr and -mf arguments are now useful only - for debugging. previous dynamic string code removed. - - numerous other minor cleanups along the way. - -Jul 30, 1997: - using code provided by dan levy (to whom profuse thanks), replaced - fixed-size arrays and awkward kludges by a fairly uniform mechanism - to grow arrays as needed for printf, sub, gsub, etc. - -Jul 23, 1997: - falling off the end of a function returns "" and 0, not 0. - thanks to arnold robbins. - -Jun 17, 1997: - replaced several fixed-size arrays by dynamically-created ones - in run.c; added overflow tests to some previously unchecked cases. - getline, toupper, tolower. - - getline code is still broken in that recursive calls may wind - up using the same space. [fixed later] - - increased RECSIZE to 8192 to push problems further over the horizon. - - added \r to \n as input line separator for programs, not data. - damn CRLFs. - - modified format() to permit explicit printf("%c", 0) to include - a null byte in output. thanks to ken stailey for the fix. - - added a "-safe" argument that disables file output (print >, - print >>), process creation (cmd|getline, print |, system), and - access to the environment (ENVIRON). this is a first approximation - to a "safe" version of awk, but don't rely on it too much. thanks - to joan feigenbaum and matt blaze for the inspiration long ago. - -Jul 8, 1996: - fixed long-standing bug in sub, gsub(/a/, "\\\\&"); thanks to *** 5975 LINES SKIPPED *** From nobody Tue Mar 12 15:21:22 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TvHRQ3Zyjz5F1Lc; Tue, 12 Mar 2024 15:21: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TvHRQ38ZCz4tMt; Tue, 12 Mar 2024 15:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710256882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UkUgJxvCAHQmwaiHIe6nCOvn+DM9L+6eSqxPs2wHhwQ=; b=s8R/nOAVvDDC4y0kkOJxGzxBaQnpjgAKohTvWBrTneJlLMw0/QIqGIbXpcAOuaekDZ31rF ySJq0B/X4vHKABVunAoaMHjb3VcRARSdN6N19ErD4xGTN2srXiJH0xZMPCGnVTolw2DOXA dSg9XQE/Hb6lqNn08Hqh3JsYws9DUMHWzrHobogqy+BVcUaldPkkamY7rgUoBEKGL5+CWi gPd4qLmO4iL0T3284zHztr+GKmEXzA2AQSaidx6aUuOzQQ+uhqAPA+wqD7HSaIiI2pNxO/ lNureDFnsJ2ku3aENbOAQbl/CNaVAGmQEaw+oHJxllTF+LyNGQCJ3yMJ99G3PQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710256882; a=rsa-sha256; cv=none; b=GEwu7ZXqJlK6wWpncn+ssKOS9OcewnL47GFdS0T+QjGK8izYwBkjv/6iG32NOk8odMXT1E bG7viMhYfMbxvqmPm3oL6GiUzD9KnkcG8h2Dk/xIjuKmdosh41wg+Q5Z4fkuzbIa7l2uZ4 /69pVIJR5Qhfpu+7FqbeQnX/BYBO9S/f3f23xZvuw3inqu/nk0Zarx8GNJfwEStXkkHS9/ xnIGOYkmFX0i/xZ24ex5w0IPrpjU+EEB809QQLbFVyjRAwZP0LVr4BdH9/PGGbOt4+c57K mWQb8njrETFm0vh0rse31Cms4Yi/Aadq2/hp+UZzydL/RFPe+2TVbwxqc6rR3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710256882; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UkUgJxvCAHQmwaiHIe6nCOvn+DM9L+6eSqxPs2wHhwQ=; b=pLsMRjc5+TmKC4iwKWDhC6QIkXTuAe8JlSkx+T5feMe3MGKhLoAttIzOAcXwunL7XawRn9 ZK66uyj3B6JkCDKZHVjyB5YIT8KsLqOiIBV+0nQIqXCTd95S7wzS1i/Z+9a+nATUoa7P4G 1okvtSJg1wU+cjdD2OIGIWDN1yY/QGGNucWpo/qDG4gFLcNJ8WxnD8GDVrcvbXcnaR+eE9 albJVdfvWSgsFBpMjoSr73NlwxTqroWmBc4NwyDm/MuQEgg3235rxH5nxSIM8w+GqlVQYq EoKeFEUEa+brPomPcpJxKlzsFZ29Kg9G7gV8ooc+gJHpVBHmuUSbiLuQxkSBtw== 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 4TvHRQ2lpKz1JLT; Tue, 12 Mar 2024 15:21:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42CFLMmC048572; Tue, 12 Mar 2024 15:21:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42CFLMn1048569; Tue, 12 Mar 2024 15:21:22 GMT (envelope-from git) Date: Tue, 12 Mar 2024 15:21:22 GMT Message-Id: <202403121521.42CFLMn1048569@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 10f1eebd2c61 - stable/14 - Add info about one true awk 2nd edition. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 10f1eebd2c610f2c2aca8ecaca3caedebee27445 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=10f1eebd2c610f2c2aca8ecaca3caedebee27445 commit 10f1eebd2c610f2c2aca8ecaca3caedebee27445 Author: Warner Losh AuthorDate: 2024-03-12 15:02:10 +0000 Commit: Warner Losh CommitDate: 2024-03-12 15:10:47 +0000 Add info about one true awk 2nd edition. See https://awk.dev/ for information about the features added in the 2nd edition. Sponsored by: Netflix --- RELNOTES | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELNOTES b/RELNOTES index 3a3edc500152..b92174354789 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. +daf917daba9c: + One True Awk updated to 2nd Edition with new -csv support and UTF-8 + support. + b8e137d8d32d: This commit added some statistics collection to the NFS-over-TLS code in the NFS server so that sysadmins can moditor usage. From nobody Tue Mar 12 15:23:20 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TvHTh2S0Wz5F1Xp; Tue, 12 Mar 2024 15:23: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TvHTh1PXTz4vCh; Tue, 12 Mar 2024 15:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710257000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aXelMXmFt1qb7GLGSABVb3D7kiWTMrysU838tCbN/1w=; b=biQ5PTCrkGv8xHNToA/GB2tV9nnPV5hq1s1syrs80yMIRf9klZQ0paWRANOErUt8R4r8VI iK5aJaUKV0hNnWhAd+pG4TqijpkTF+FFqCKTUcLLSdq7aAhBt0x5kjenE+l7g00Tan9XSb /PICJyJ6e+gJyiex108iAQ5Gyz8PfvQOg9RFMsgtYEUEV7wWZUrjC3NAwUqNIqE3RKNde6 0H+VroVLbbjK4lPIVr32MT8MIN3hhecIk0A+8z4HypfH/Z31k8fhpUzCEQzVHf1vihq29n GRfCbc2oWEbqYNNXwMML7kOMNXTFXrt3OhzHU3WopvkEhYHJJtZb6FzvaaMqQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710257000; a=rsa-sha256; cv=none; b=JCZEnxI4tPU3Er2oLnsLGTe4nV2itrgGQbfjFj/v+gxgN5MA+gtvEE2ECwW9QTHO8vXSW0 90FoLx+U0a9faMkBHVQAgK991EOrL+JrUE6TqHlFBfbcpAVf1DtmstJc4BIm7gwAolrei1 5Ko3uHXqeTE4g1GuHU727mSbneJOBaFbVBBDJNlKk6SQG4h65MGRbVGEkQQEeznnsZ/oCD 0bIol33/Fb9wfO4VEzIM+UQxb58kVIjIKbSHtt+Xo4uW6RswwviDlg2BRSNYQHTSXoTby2 Q30kU4Ny+74Rbs0DYxLtXRa60qe1mXjNMKzpAVMqbuyifaY7nB1jE5YxHY8gGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710257000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aXelMXmFt1qb7GLGSABVb3D7kiWTMrysU838tCbN/1w=; b=xF0oHpRBGTtY94iNJoAUK1ayWKjHsNkDhWgC+avAQz/fRDv8DDBy2pjRn47hCbqSJ3On0o LnCrhMD13hzrHkcKYrn3iDX5J3jOQPeCrW6RY0W+B0pitKY8F9drJZTHlakLwxTd5BjCxU arQcJG/IhRek+65LgBSY5+Bw/8WYz1xOyYwL1g2Td7dtOLADDl/DG+Op/RdhaEFBWjkhME YqNCzplbxtcAduNH7OFRgJJw62Np66Rl5OLOeew/L4H11iiIb4KXxabUjXEtlDHw0v9e8P BWnq7M5fiDg7en+Py/YA3LggEpacEaxb4luQzNshIo/12VHNk7bvcb7JfpCcxQ== 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 4TvHTh10nWz1Jhf; Tue, 12 Mar 2024 15:23:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42CFNKEv050806; Tue, 12 Mar 2024 15:23:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42CFNKMU050803; Tue, 12 Mar 2024 15:23:20 GMT (envelope-from git) Date: Tue, 12 Mar 2024 15:23:20 GMT Message-Id: <202403121523.42CFNKMU050803@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: e36906ac1a4d - stable/14 - RELNOTES: Add pointer to awk info. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: e36906ac1a4d7a30c2f5d9e27ae292c7108ede74 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e36906ac1a4d7a30c2f5d9e27ae292c7108ede74 commit e36906ac1a4d7a30c2f5d9e27ae292c7108ede74 Author: Warner Losh AuthorDate: 2024-03-12 15:22:40 +0000 Commit: Warner Losh CommitDate: 2024-03-12 15:22:40 +0000 RELNOTES: Add pointer to awk info. Sponsored by: Netflix --- RELNOTES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RELNOTES b/RELNOTES index b92174354789..6a32876351ea 100644 --- a/RELNOTES +++ b/RELNOTES @@ -12,7 +12,7 @@ Changes to this file should not be MFCed. daf917daba9c: One True Awk updated to 2nd Edition with new -csv support and UTF-8 - support. + support. See https://awk.dev for more details. b8e137d8d32d: This commit added some statistics collection to the NFS-over-TLS From nobody Wed Mar 13 00:31:11 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TvWdr0t06z5CrMw; Wed, 13 Mar 2024 00:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TvWdr0fzkz4tPb; Wed, 13 Mar 2024 00:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710289872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YrRnJ9gF3g4uBGlPt38+RsImv2DVlpeWiUaqpgiYyJ8=; b=CQC3hFd6IlNo2dXujQNJRH7LcPAdhfa1avdFhA2OsWn/XnRO2kOsgBx0nQYuvzjRQpmPHF T6Lb9KbFj5Ua9BMJqE3SDxTbxXvk/OSTwD4VRpp/ub1YOzVUNM1Q5SAoDeRil0FzFS3hw/ 92pUfx55hDY/727MMvigHwXI+0u/md+fKysleYj+s3v9JJxjHB1lUI52r1/ZyYbkxI8rks BA4kgyg0bgGKTrGoc+deyaMgH7M8a6SKYN+dCG5M/0HReY+1RR67kSE1GyMxRMf0GLgSxz s1m1tcauvmbNAOZ7lGNCfPGkNXmRV+aO3QJsyLNguqqbwUwKor0HHyqZ9aj1rA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710289872; a=rsa-sha256; cv=none; b=ctRtZo+2JbSIW2Ec9ofVPy9NK2V9lSUjuopaf22AdTKnddt1NMs0ibeeyNBHm3jRp9wjKB TLbQoo/Mp8ZsAcBPbH30mELPjxX3rXXdBtmT1Woln9HLOfTHjq6DhdDKb86NWa/SMv9mth 8RY7oiqDMgtLI9B+B6hva1+WdaVzeueJ85rKlPD+rI8mNU40HcdtvMouJwXqIsYnHy6/ir WzDuZAIzDwHmq2shT2VvdeMNZ3RiWK2yz5r7e3e42jOHu6J96eLZf1SizphXJ/Nia68gQj zphH3r8x3mAOsDwFtKhPZ0VBtC95R5Efgbk7tO/pimziM51ammIlVK84oIGRQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710289872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YrRnJ9gF3g4uBGlPt38+RsImv2DVlpeWiUaqpgiYyJ8=; b=K/D1HUMnsyVn5f8/tDSDRs/7bB2nrjEvVSWMH8CR1W01ijBMGWVYKtIat2KqvK31qBemfe 02xnHGs+6ExGQTKyPgBjlOm6HrRaNJrfeUW8tUUWB/sOLI9Aa0ukEAIwCmSbd3R6SJPfPx 8LryL3BYCicT3aCBt67tALXeFWwsyZonPYRsUV53IpWHn92q8hMa3nDGZhyM4Um0fFCChX p6v9h46L/XaRat+nRJOvbZTJ/RMnebAxT9u40IwYWFiawNS/FtHSS9zTZRpO67BHM70Dc4 9AGm+l72CxK1aOCpGs28JT4Yk42/IPLEUZmtNeGydJMH6L/sjr1rmlHt945MOA== 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 4TvWdr0GmPzLJM; Wed, 13 Mar 2024 00:31:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42D0VBkd072379; Wed, 13 Mar 2024 00:31:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42D0VBWB072376; Wed, 13 Mar 2024 00:31:11 GMT (envelope-from git) Date: Wed, 13 Mar 2024 00:31:11 GMT Message-Id: <202403130031.42D0VBWB072376@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 91c1c36102a6 - stable/14 - libthr: remove explicit sys/cdefs.h includes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 91c1c36102a6cded3848e46fd2d242db46a76684 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=91c1c36102a6cded3848e46fd2d242db46a76684 commit 91c1c36102a6cded3848e46fd2d242db46a76684 Author: Konstantin Belousov AuthorDate: 2024-03-06 07:06:35 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-13 00:30:40 +0000 libthr: remove explicit sys/cdefs.h includes (cherry picked from commit f8bbbce458194ff4312c610d32a64ff4a3a71d45) --- lib/libthr/Makefile | 5 ----- lib/libthr/thread/thr_affinity.c | 1 - lib/libthr/thread/thr_attr.c | 1 - lib/libthr/thread/thr_autoinit.c | 1 - lib/libthr/thread/thr_barrier.c | 1 - lib/libthr/thread/thr_barrierattr.c | 1 - lib/libthr/thread/thr_cancel.c | 1 - lib/libthr/thread/thr_clean.c | 1 - lib/libthr/thread/thr_concurrency.c | 1 - lib/libthr/thread/thr_cond.c | 1 - lib/libthr/thread/thr_condattr.c | 1 - lib/libthr/thread/thr_create.c | 1 - lib/libthr/thread/thr_detach.c | 1 - lib/libthr/thread/thr_equal.c | 1 - lib/libthr/thread/thr_event.c | 1 - lib/libthr/thread/thr_exit.c | 1 - lib/libthr/thread/thr_fork.c | 1 - lib/libthr/thread/thr_getcpuclockid.c | 1 - lib/libthr/thread/thr_getprio.c | 1 - lib/libthr/thread/thr_getschedparam.c | 1 - lib/libthr/thread/thr_getthreadid_np.c | 1 - lib/libthr/thread/thr_info.c | 1 - lib/libthr/thread/thr_init.c | 1 - lib/libthr/thread/thr_join.c | 1 - lib/libthr/thread/thr_kill.c | 1 - lib/libthr/thread/thr_main_np.c | 1 - lib/libthr/thread/thr_multi_np.c | 1 - lib/libthr/thread/thr_mutex.c | 1 - lib/libthr/thread/thr_mutexattr.c | 1 - lib/libthr/thread/thr_once.c | 1 - lib/libthr/thread/thr_printf.c | 1 - lib/libthr/thread/thr_private.h | 1 - lib/libthr/thread/thr_pspinlock.c | 1 - lib/libthr/thread/thr_resume_np.c | 1 - lib/libthr/thread/thr_rtld.c | 2 -- lib/libthr/thread/thr_rwlock.c | 1 - lib/libthr/thread/thr_rwlockattr.c | 1 - lib/libthr/thread/thr_self.c | 1 - lib/libthr/thread/thr_sem.c | 1 - lib/libthr/thread/thr_setprio.c | 1 - lib/libthr/thread/thr_setschedparam.c | 1 - lib/libthr/thread/thr_sig.c | 1 - lib/libthr/thread/thr_single_np.c | 1 - lib/libthr/thread/thr_sleepq.c | 1 - lib/libthr/thread/thr_spec.c | 1 - lib/libthr/thread/thr_suspend_np.c | 1 - lib/libthr/thread/thr_switch_np.c | 1 - lib/libthr/thread/thr_syscalls.c | 1 - lib/libthr/thread/thr_umtx.c | 1 - lib/libthr/thread/thr_yield.c | 1 - 50 files changed, 55 deletions(-) diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile index dde2a9dce94e..2f20934bb351 100644 --- a/lib/libthr/Makefile +++ b/lib/libthr/Makefile @@ -1,8 +1,3 @@ -# -# All library objects contain FreeBSD revision strings by default; they may be -# excluded as a space-saving measure. To produce a library that does -# not contain these strings, add -DSTRIP_FBSDID (see ) to CFLAGS -# below. PACKAGE= clibs SHLIBDIR?= /lib diff --git a/lib/libthr/thread/thr_affinity.c b/lib/libthr/thread/thr_affinity.c index 89f654ebffc2..78c89e146a79 100644 --- a/lib/libthr/thread/thr_affinity.c +++ b/lib/libthr/thread/thr_affinity.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_attr.c b/lib/libthr/thread/thr_attr.c index 3c03225c33cb..1d0bc8cb7b91 100644 --- a/lib/libthr/thread/thr_attr.c +++ b/lib/libthr/thread/thr_attr.c @@ -93,7 +93,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_autoinit.c b/lib/libthr/thread/thr_autoinit.c index f18f53517e06..b0b4e601eff7 100644 --- a/lib/libthr/thread/thr_autoinit.c +++ b/lib/libthr/thread/thr_autoinit.c @@ -33,7 +33,6 @@ * SUCH DAMAGE. */ -#include #include #include "thr_private.h" diff --git a/lib/libthr/thread/thr_barrier.c b/lib/libthr/thread/thr_barrier.c index 8f5936409c05..13dec864e2f6 100644 --- a/lib/libthr/thread/thr_barrier.c +++ b/lib/libthr/thread/thr_barrier.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_barrierattr.c b/lib/libthr/thread/thr_barrierattr.c index 7af7e40f9159..6e5de86973f2 100644 --- a/lib/libthr/thread/thr_barrierattr.c +++ b/lib/libthr/thread/thr_barrierattr.c @@ -28,7 +28,6 @@ * DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_cancel.c b/lib/libthr/thread/thr_cancel.c index 86632e41449b..b1b95e54b46f 100644 --- a/lib/libthr/thread/thr_cancel.c +++ b/lib/libthr/thread/thr_cancel.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include "un-namespace.h" diff --git a/lib/libthr/thread/thr_clean.c b/lib/libthr/thread/thr_clean.c index ba699f0376d8..43fd570fd1df 100644 --- a/lib/libthr/thread/thr_clean.c +++ b/lib/libthr/thread/thr_clean.c @@ -30,7 +30,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_concurrency.c b/lib/libthr/thread/thr_concurrency.c index cc0d1075b92d..64c605f7d058 100644 --- a/lib/libthr/thread/thr_concurrency.c +++ b/lib/libthr/thread/thr_concurrency.c @@ -32,7 +32,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_cond.c b/lib/libthr/thread/thr_cond.c index bec7933537b3..c1cbd546350e 100644 --- a/lib/libthr/thread/thr_cond.c +++ b/lib/libthr/thread/thr_cond.c @@ -30,7 +30,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_condattr.c b/lib/libthr/thread/thr_condattr.c index c5f675f0023d..0dc3e52bab5e 100644 --- a/lib/libthr/thread/thr_condattr.c +++ b/lib/libthr/thread/thr_condattr.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_create.c b/lib/libthr/thread/thr_create.c index 4b9f45ac49de..4de9bd84ca5b 100644 --- a/lib/libthr/thread/thr_create.c +++ b/lib/libthr/thread/thr_create.c @@ -27,7 +27,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_detach.c b/lib/libthr/thread/thr_detach.c index 214d5e76262e..c7a60bb26129 100644 --- a/lib/libthr/thread/thr_detach.c +++ b/lib/libthr/thread/thr_detach.c @@ -27,7 +27,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_equal.c b/lib/libthr/thread/thr_equal.c index 2a4cc9f6d049..e5b2ab881138 100644 --- a/lib/libthr/thread/thr_equal.c +++ b/lib/libthr/thread/thr_equal.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include "un-namespace.h" diff --git a/lib/libthr/thread/thr_event.c b/lib/libthr/thread/thr_event.c index afe0b307423c..f0b1805894fb 100644 --- a/lib/libthr/thread/thr_event.c +++ b/lib/libthr/thread/thr_event.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include "thr_private.h" void diff --git a/lib/libthr/thread/thr_exit.c b/lib/libthr/thread/thr_exit.c index 001b30f6671a..5a9dcf99fa21 100644 --- a/lib/libthr/thread/thr_exit.c +++ b/lib/libthr/thread/thr_exit.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #ifdef _PTHREAD_FORCED_UNWIND diff --git a/lib/libthr/thread/thr_fork.c b/lib/libthr/thread/thr_fork.c index fc7d77180e8b..614841cc314f 100644 --- a/lib/libthr/thread/thr_fork.c +++ b/lib/libthr/thread/thr_fork.c @@ -57,7 +57,6 @@ * */ -#include #include #include "namespace.h" #include diff --git a/lib/libthr/thread/thr_getcpuclockid.c b/lib/libthr/thread/thr_getcpuclockid.c index 0281fc626882..dee3a2a9447a 100644 --- a/lib/libthr/thread/thr_getcpuclockid.c +++ b/lib/libthr/thread/thr_getcpuclockid.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_getprio.c b/lib/libthr/thread/thr_getprio.c index 5ab147af212c..d338287342ac 100644 --- a/lib/libthr/thread/thr_getprio.c +++ b/lib/libthr/thread/thr_getprio.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_getschedparam.c b/lib/libthr/thread/thr_getschedparam.c index 557bcc834950..3abe9be6937b 100644 --- a/lib/libthr/thread/thr_getschedparam.c +++ b/lib/libthr/thread/thr_getschedparam.c @@ -32,7 +32,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_getthreadid_np.c b/lib/libthr/thread/thr_getthreadid_np.c index 1fe927435b02..ade332519dfb 100644 --- a/lib/libthr/thread/thr_getthreadid_np.c +++ b/lib/libthr/thread/thr_getthreadid_np.c @@ -25,7 +25,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_info.c b/lib/libthr/thread/thr_info.c index 41ab7f0bcf0c..f6bf81203f9c 100644 --- a/lib/libthr/thread/thr_info.c +++ b/lib/libthr/thread/thr_info.c @@ -33,7 +33,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index b59678c3f6c3..007cf5be81c9 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -33,7 +33,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_join.c b/lib/libthr/thread/thr_join.c index 4b48249489f6..53f28daa258d 100644 --- a/lib/libthr/thread/thr_join.c +++ b/lib/libthr/thread/thr_join.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_kill.c b/lib/libthr/thread/thr_kill.c index dd7beddd5c33..5fb40b3bc496 100644 --- a/lib/libthr/thread/thr_kill.c +++ b/lib/libthr/thread/thr_kill.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_main_np.c b/lib/libthr/thread/thr_main_np.c index 9dd8b1820acd..1d34dc21b84c 100644 --- a/lib/libthr/thread/thr_main_np.c +++ b/lib/libthr/thread/thr_main_np.c @@ -27,7 +27,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_multi_np.c b/lib/libthr/thread/thr_multi_np.c index cbd3f31fddf0..bac58ca85dca 100644 --- a/lib/libthr/thread/thr_multi_np.c +++ b/lib/libthr/thread/thr_multi_np.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c index 5dd624a269e4..ca8971cc720a 100644 --- a/lib/libthr/thread/thr_mutex.c +++ b/lib/libthr/thread/thr_mutex.c @@ -38,7 +38,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_mutexattr.c b/lib/libthr/thread/thr_mutexattr.c index 6d38f164df52..d78aad518ee8 100644 --- a/lib/libthr/thread/thr_mutexattr.c +++ b/lib/libthr/thread/thr_mutexattr.c @@ -59,7 +59,6 @@ * */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_once.c b/lib/libthr/thread/thr_once.c index 065781907771..89b76ee58c1e 100644 --- a/lib/libthr/thread/thr_once.c +++ b/lib/libthr/thread/thr_once.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include "un-namespace.h" diff --git a/lib/libthr/thread/thr_printf.c b/lib/libthr/thread/thr_printf.c index 5304cc00c5c8..e1edffe5acb2 100644 --- a/lib/libthr/thread/thr_printf.c +++ b/lib/libthr/thread/thr_printf.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include #include #include diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index 3fc4d02c611e..e590fb0c1e7a 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -37,7 +37,6 @@ */ #include #include -#include #include #include #include diff --git a/lib/libthr/thread/thr_pspinlock.c b/lib/libthr/thread/thr_pspinlock.c index 37f14d22909d..4820490ab6af 100644 --- a/lib/libthr/thread/thr_pspinlock.c +++ b/lib/libthr/thread/thr_pspinlock.c @@ -30,7 +30,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_resume_np.c b/lib/libthr/thread/thr_resume_np.c index 6dac28ab1f4b..1e69bfa7358b 100644 --- a/lib/libthr/thread/thr_resume_np.c +++ b/lib/libthr/thread/thr_resume_np.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_rtld.c b/lib/libthr/thread/thr_rtld.c index 767b4735e1fa..54560a2f7df2 100644 --- a/lib/libthr/thread/thr_rtld.c +++ b/lib/libthr/thread/thr_rtld.c @@ -26,11 +26,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include /* * A lockless rwlock for rtld. */ -#include #include #include #include diff --git a/lib/libthr/thread/thr_rwlock.c b/lib/libthr/thread/thr_rwlock.c index f8d5fa4f673f..b482dc8b732a 100644 --- a/lib/libthr/thread/thr_rwlock.c +++ b/lib/libthr/thread/thr_rwlock.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include #include #include diff --git a/lib/libthr/thread/thr_rwlockattr.c b/lib/libthr/thread/thr_rwlockattr.c index 068ad7d3acbf..34bbbb20e611 100644 --- a/lib/libthr/thread/thr_rwlockattr.c +++ b/lib/libthr/thread/thr_rwlockattr.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_self.c b/lib/libthr/thread/thr_self.c index f5b1ce8fdb98..cbdadb13ccc4 100644 --- a/lib/libthr/thread/thr_self.c +++ b/lib/libthr/thread/thr_self.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include "un-namespace.h" diff --git a/lib/libthr/thread/thr_sem.c b/lib/libthr/thread/thr_sem.c index c7b5ac009a8c..76180604c183 100644 --- a/lib/libthr/thread/thr_sem.c +++ b/lib/libthr/thread/thr_sem.c @@ -30,7 +30,6 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_setprio.c b/lib/libthr/thread/thr_setprio.c index 6ee60ffeb205..fddf664457bd 100644 --- a/lib/libthr/thread/thr_setprio.c +++ b/lib/libthr/thread/thr_setprio.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include "un-namespace.h" diff --git a/lib/libthr/thread/thr_setschedparam.c b/lib/libthr/thread/thr_setschedparam.c index e3e4174c753b..49ec2ae7a7fd 100644 --- a/lib/libthr/thread/thr_setschedparam.c +++ b/lib/libthr/thread/thr_setschedparam.c @@ -32,7 +32,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c index e082f0601be1..ad291d106001 100644 --- a/lib/libthr/thread/thr_sig.c +++ b/lib/libthr/thread/thr_sig.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_single_np.c b/lib/libthr/thread/thr_single_np.c index e772fb5d3bb7..3aa7adba954d 100644 --- a/lib/libthr/thread/thr_single_np.c +++ b/lib/libthr/thread/thr_single_np.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_sleepq.c b/lib/libthr/thread/thr_sleepq.c index b3feef8c9381..d7de9ab4e25a 100644 --- a/lib/libthr/thread/thr_sleepq.c +++ b/lib/libthr/thread/thr_sleepq.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include "thr_private.h" diff --git a/lib/libthr/thread/thr_spec.c b/lib/libthr/thread/thr_spec.c index ee58bb37f6f7..44a124785085 100644 --- a/lib/libthr/thread/thr_spec.c +++ b/lib/libthr/thread/thr_spec.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_suspend_np.c b/lib/libthr/thread/thr_suspend_np.c index b594ea562480..b272c7b2a169 100644 --- a/lib/libthr/thread/thr_suspend_np.c +++ b/lib/libthr/thread/thr_suspend_np.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_switch_np.c b/lib/libthr/thread/thr_switch_np.c index cbf959f161e3..80cd34c15650 100644 --- a/lib/libthr/thread/thr_switch_np.c +++ b/lib/libthr/thread/thr_switch_np.c @@ -32,7 +32,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_syscalls.c b/lib/libthr/thread/thr_syscalls.c index d68ca60e5993..69fb4b45fce5 100644 --- a/lib/libthr/thread/thr_syscalls.c +++ b/lib/libthr/thread/thr_syscalls.c @@ -65,7 +65,6 @@ * */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_umtx.c b/lib/libthr/thread/thr_umtx.c index 37b378e74405..ba73fd906232 100644 --- a/lib/libthr/thread/thr_umtx.c +++ b/lib/libthr/thread/thr_umtx.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "thr_private.h" #include "thr_umtx.h" diff --git a/lib/libthr/thread/thr_yield.c b/lib/libthr/thread/thr_yield.c index b391e69cabc1..057fc789de02 100644 --- a/lib/libthr/thread/thr_yield.c +++ b/lib/libthr/thread/thr_yield.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include From nobody Wed Mar 13 00:31:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TvWfK6cngz5CrYk; Wed, 13 Mar 2024 00:31: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TvWfK6NCNz4tj7; Wed, 13 Mar 2024 00:31:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710289897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rAA6OiV51iZ8f2veZL+xnQswurVIWY8+1ByAWO6BBcg=; b=ulM+MGvdDGYa314m0+lWNIHIPenzJFcEpMBMbza8Xr75542nyVPV7uekEMQliNaYnKtqMD 2OVJwZcdgETuEfSuocbaOgTZe9e7+EJ5Rm7qG6a3W//3a0yItTdX/HeynU4nYWIVyeRZpi eeWkPAQdyQHICIm/xA8T2fb3kxZhSIohO2wN+lOdf1i5Ym3JgDAQqXjoyZNga8UNuN12Fv zLpw5bMiy87dXaMqly4K7iJcgkDl3m/44lO4Lb6oov2K5uly/g5U7NBvbswd/PZ29Kh8WC VCXk5d2cepb/8TgOW+QEujlgOBdYRnOTqclQ+6Lo5vGS+rjaIbgRaSL1gcjHcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710289897; a=rsa-sha256; cv=none; b=fYk1748GmbERJ/SDgfp8yEMUyRyz40/bNez9zMSOG7UpRsJHIMljvc2BSquzRCu8d9WqKW 1oPcGMpn5Wx6k47uSdH/0NksoWaUGs9qieHI7qe206y/xkMdJ8x2X2w1qXoX/+4ZeZZOE5 sL8HJuLcSM7JToM40MBeSNSPanB8N88ASHEZ/TiLEvWNWf5JtWFvgVKITZek1v3PEq3pCG U2MBQraKdheHh7gufhj8HWDQ8pVhit4LgwNPUWAkXd0lXAfJM3EHRVyXIZGK3ThUAL1hyV q+lHgGsZH/LDiG4Lv4JuEmoc2kV+oIGqGo4cBIrLDGJnQwEy9GzW3EpHX14wQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710289897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rAA6OiV51iZ8f2veZL+xnQswurVIWY8+1ByAWO6BBcg=; b=qV+ofHg8aC8Ys6WBLKXcR9J6ROsu9Dn3LifVKfd6Mc6VYnRp35FD7BTAm2qC+uNB3AaP3f JlX75gD4jN3h7nARW4JBbMV0Golp8TZOT/6LWSCT3ktfRltrcZGNevceh4Pmkc64UL5C9r 1O2Naqvt6F/DJysPj1DXcs484rVcPAKmx83M/LqsXql85QQ0ZpscA3RR3Lxs3f2eesmuoW +D+Ik2XZA8977cm251n7EhjG37phguiKaCJwGaajGe+yRUBS51LE0+sGr+3gh3qpFTQ9J9 4iwKuCDXM+F2ue3a0r9kUOa5TOb0fzBvRAy2f6pbYq1NEFrufGDVRO0TVFZ+vQ== 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 4TvWfK5zFszLSP; Wed, 13 Mar 2024 00:31:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42D0VbS1072563; Wed, 13 Mar 2024 00:31:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42D0Vbip072560; Wed, 13 Mar 2024 00:31:37 GMT (envelope-from git) Date: Wed, 13 Mar 2024 00:31:37 GMT Message-Id: <202403130031.42D0Vbip072560@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 32651946de0d - stable/13 - libthr: remove explicit sys/cdefs.h includes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 32651946de0d354f2cb15bb0bf4e86a73ecbe493 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=32651946de0d354f2cb15bb0bf4e86a73ecbe493 commit 32651946de0d354f2cb15bb0bf4e86a73ecbe493 Author: Konstantin Belousov AuthorDate: 2024-03-06 07:06:35 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-13 00:31:20 +0000 libthr: remove explicit sys/cdefs.h includes (cherry picked from commit f8bbbce458194ff4312c610d32a64ff4a3a71d45) --- lib/libthr/Makefile | 5 ----- lib/libthr/thread/thr_affinity.c | 1 - lib/libthr/thread/thr_attr.c | 1 - lib/libthr/thread/thr_autoinit.c | 1 - lib/libthr/thread/thr_barrier.c | 1 - lib/libthr/thread/thr_barrierattr.c | 1 - lib/libthr/thread/thr_cancel.c | 1 - lib/libthr/thread/thr_clean.c | 1 - lib/libthr/thread/thr_concurrency.c | 1 - lib/libthr/thread/thr_cond.c | 1 - lib/libthr/thread/thr_condattr.c | 1 - lib/libthr/thread/thr_create.c | 1 - lib/libthr/thread/thr_detach.c | 1 - lib/libthr/thread/thr_equal.c | 1 - lib/libthr/thread/thr_event.c | 1 - lib/libthr/thread/thr_exit.c | 1 - lib/libthr/thread/thr_fork.c | 1 - lib/libthr/thread/thr_getcpuclockid.c | 1 - lib/libthr/thread/thr_getprio.c | 1 - lib/libthr/thread/thr_getschedparam.c | 1 - lib/libthr/thread/thr_getthreadid_np.c | 1 - lib/libthr/thread/thr_info.c | 1 - lib/libthr/thread/thr_init.c | 1 - lib/libthr/thread/thr_join.c | 1 - lib/libthr/thread/thr_kill.c | 1 - lib/libthr/thread/thr_main_np.c | 1 - lib/libthr/thread/thr_multi_np.c | 1 - lib/libthr/thread/thr_mutex.c | 1 - lib/libthr/thread/thr_mutexattr.c | 1 - lib/libthr/thread/thr_once.c | 1 - lib/libthr/thread/thr_printf.c | 1 - lib/libthr/thread/thr_private.h | 1 - lib/libthr/thread/thr_pspinlock.c | 1 - lib/libthr/thread/thr_resume_np.c | 1 - lib/libthr/thread/thr_rtld.c | 2 -- lib/libthr/thread/thr_rwlock.c | 1 - lib/libthr/thread/thr_rwlockattr.c | 1 - lib/libthr/thread/thr_self.c | 1 - lib/libthr/thread/thr_sem.c | 1 - lib/libthr/thread/thr_setprio.c | 1 - lib/libthr/thread/thr_setschedparam.c | 1 - lib/libthr/thread/thr_sig.c | 1 - lib/libthr/thread/thr_single_np.c | 1 - lib/libthr/thread/thr_sleepq.c | 1 - lib/libthr/thread/thr_spec.c | 1 - lib/libthr/thread/thr_suspend_np.c | 1 - lib/libthr/thread/thr_switch_np.c | 1 - lib/libthr/thread/thr_syscalls.c | 1 - lib/libthr/thread/thr_umtx.c | 1 - lib/libthr/thread/thr_yield.c | 1 - 50 files changed, 55 deletions(-) diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile index dbd64c210470..126214393e29 100644 --- a/lib/libthr/Makefile +++ b/lib/libthr/Makefile @@ -1,8 +1,3 @@ -# -# All library objects contain FreeBSD revision strings by default; they may be -# excluded as a space-saving measure. To produce a library that does -# not contain these strings, add -DSTRIP_FBSDID (see ) to CFLAGS -# below. PACKAGE= clibs SHLIBDIR?= /lib diff --git a/lib/libthr/thread/thr_affinity.c b/lib/libthr/thread/thr_affinity.c index 89f654ebffc2..78c89e146a79 100644 --- a/lib/libthr/thread/thr_affinity.c +++ b/lib/libthr/thread/thr_affinity.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_attr.c b/lib/libthr/thread/thr_attr.c index 3c03225c33cb..1d0bc8cb7b91 100644 --- a/lib/libthr/thread/thr_attr.c +++ b/lib/libthr/thread/thr_attr.c @@ -93,7 +93,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_autoinit.c b/lib/libthr/thread/thr_autoinit.c index f18f53517e06..b0b4e601eff7 100644 --- a/lib/libthr/thread/thr_autoinit.c +++ b/lib/libthr/thread/thr_autoinit.c @@ -33,7 +33,6 @@ * SUCH DAMAGE. */ -#include #include #include "thr_private.h" diff --git a/lib/libthr/thread/thr_barrier.c b/lib/libthr/thread/thr_barrier.c index 8f5936409c05..13dec864e2f6 100644 --- a/lib/libthr/thread/thr_barrier.c +++ b/lib/libthr/thread/thr_barrier.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_barrierattr.c b/lib/libthr/thread/thr_barrierattr.c index 7af7e40f9159..6e5de86973f2 100644 --- a/lib/libthr/thread/thr_barrierattr.c +++ b/lib/libthr/thread/thr_barrierattr.c @@ -28,7 +28,6 @@ * DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_cancel.c b/lib/libthr/thread/thr_cancel.c index 86632e41449b..b1b95e54b46f 100644 --- a/lib/libthr/thread/thr_cancel.c +++ b/lib/libthr/thread/thr_cancel.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include "un-namespace.h" diff --git a/lib/libthr/thread/thr_clean.c b/lib/libthr/thread/thr_clean.c index ba699f0376d8..43fd570fd1df 100644 --- a/lib/libthr/thread/thr_clean.c +++ b/lib/libthr/thread/thr_clean.c @@ -30,7 +30,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_concurrency.c b/lib/libthr/thread/thr_concurrency.c index cc0d1075b92d..64c605f7d058 100644 --- a/lib/libthr/thread/thr_concurrency.c +++ b/lib/libthr/thread/thr_concurrency.c @@ -32,7 +32,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_cond.c b/lib/libthr/thread/thr_cond.c index bec7933537b3..c1cbd546350e 100644 --- a/lib/libthr/thread/thr_cond.c +++ b/lib/libthr/thread/thr_cond.c @@ -30,7 +30,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_condattr.c b/lib/libthr/thread/thr_condattr.c index c5f675f0023d..0dc3e52bab5e 100644 --- a/lib/libthr/thread/thr_condattr.c +++ b/lib/libthr/thread/thr_condattr.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_create.c b/lib/libthr/thread/thr_create.c index 4b9f45ac49de..4de9bd84ca5b 100644 --- a/lib/libthr/thread/thr_create.c +++ b/lib/libthr/thread/thr_create.c @@ -27,7 +27,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_detach.c b/lib/libthr/thread/thr_detach.c index 214d5e76262e..c7a60bb26129 100644 --- a/lib/libthr/thread/thr_detach.c +++ b/lib/libthr/thread/thr_detach.c @@ -27,7 +27,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_equal.c b/lib/libthr/thread/thr_equal.c index 2a4cc9f6d049..e5b2ab881138 100644 --- a/lib/libthr/thread/thr_equal.c +++ b/lib/libthr/thread/thr_equal.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include "un-namespace.h" diff --git a/lib/libthr/thread/thr_event.c b/lib/libthr/thread/thr_event.c index afe0b307423c..f0b1805894fb 100644 --- a/lib/libthr/thread/thr_event.c +++ b/lib/libthr/thread/thr_event.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include "thr_private.h" void diff --git a/lib/libthr/thread/thr_exit.c b/lib/libthr/thread/thr_exit.c index 001b30f6671a..5a9dcf99fa21 100644 --- a/lib/libthr/thread/thr_exit.c +++ b/lib/libthr/thread/thr_exit.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #ifdef _PTHREAD_FORCED_UNWIND diff --git a/lib/libthr/thread/thr_fork.c b/lib/libthr/thread/thr_fork.c index fc7d77180e8b..614841cc314f 100644 --- a/lib/libthr/thread/thr_fork.c +++ b/lib/libthr/thread/thr_fork.c @@ -57,7 +57,6 @@ * */ -#include #include #include "namespace.h" #include diff --git a/lib/libthr/thread/thr_getcpuclockid.c b/lib/libthr/thread/thr_getcpuclockid.c index 0281fc626882..dee3a2a9447a 100644 --- a/lib/libthr/thread/thr_getcpuclockid.c +++ b/lib/libthr/thread/thr_getcpuclockid.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_getprio.c b/lib/libthr/thread/thr_getprio.c index 5ab147af212c..d338287342ac 100644 --- a/lib/libthr/thread/thr_getprio.c +++ b/lib/libthr/thread/thr_getprio.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_getschedparam.c b/lib/libthr/thread/thr_getschedparam.c index 557bcc834950..3abe9be6937b 100644 --- a/lib/libthr/thread/thr_getschedparam.c +++ b/lib/libthr/thread/thr_getschedparam.c @@ -32,7 +32,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_getthreadid_np.c b/lib/libthr/thread/thr_getthreadid_np.c index 1fe927435b02..ade332519dfb 100644 --- a/lib/libthr/thread/thr_getthreadid_np.c +++ b/lib/libthr/thread/thr_getthreadid_np.c @@ -25,7 +25,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_info.c b/lib/libthr/thread/thr_info.c index 41ab7f0bcf0c..f6bf81203f9c 100644 --- a/lib/libthr/thread/thr_info.c +++ b/lib/libthr/thread/thr_info.c @@ -33,7 +33,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_init.c b/lib/libthr/thread/thr_init.c index b59678c3f6c3..007cf5be81c9 100644 --- a/lib/libthr/thread/thr_init.c +++ b/lib/libthr/thread/thr_init.c @@ -33,7 +33,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_join.c b/lib/libthr/thread/thr_join.c index 4b48249489f6..53f28daa258d 100644 --- a/lib/libthr/thread/thr_join.c +++ b/lib/libthr/thread/thr_join.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_kill.c b/lib/libthr/thread/thr_kill.c index dd7beddd5c33..5fb40b3bc496 100644 --- a/lib/libthr/thread/thr_kill.c +++ b/lib/libthr/thread/thr_kill.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_main_np.c b/lib/libthr/thread/thr_main_np.c index 9dd8b1820acd..1d34dc21b84c 100644 --- a/lib/libthr/thread/thr_main_np.c +++ b/lib/libthr/thread/thr_main_np.c @@ -27,7 +27,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_multi_np.c b/lib/libthr/thread/thr_multi_np.c index cbd3f31fddf0..bac58ca85dca 100644 --- a/lib/libthr/thread/thr_multi_np.c +++ b/lib/libthr/thread/thr_multi_np.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_mutex.c b/lib/libthr/thread/thr_mutex.c index 5dd624a269e4..ca8971cc720a 100644 --- a/lib/libthr/thread/thr_mutex.c +++ b/lib/libthr/thread/thr_mutex.c @@ -38,7 +38,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_mutexattr.c b/lib/libthr/thread/thr_mutexattr.c index 6d38f164df52..d78aad518ee8 100644 --- a/lib/libthr/thread/thr_mutexattr.c +++ b/lib/libthr/thread/thr_mutexattr.c @@ -59,7 +59,6 @@ * */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_once.c b/lib/libthr/thread/thr_once.c index 065781907771..89b76ee58c1e 100644 --- a/lib/libthr/thread/thr_once.c +++ b/lib/libthr/thread/thr_once.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include "un-namespace.h" diff --git a/lib/libthr/thread/thr_printf.c b/lib/libthr/thread/thr_printf.c index 5304cc00c5c8..e1edffe5acb2 100644 --- a/lib/libthr/thread/thr_printf.c +++ b/lib/libthr/thread/thr_printf.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include #include #include diff --git a/lib/libthr/thread/thr_private.h b/lib/libthr/thread/thr_private.h index 3fc4d02c611e..e590fb0c1e7a 100644 --- a/lib/libthr/thread/thr_private.h +++ b/lib/libthr/thread/thr_private.h @@ -37,7 +37,6 @@ */ #include #include -#include #include #include #include diff --git a/lib/libthr/thread/thr_pspinlock.c b/lib/libthr/thread/thr_pspinlock.c index 37f14d22909d..4820490ab6af 100644 --- a/lib/libthr/thread/thr_pspinlock.c +++ b/lib/libthr/thread/thr_pspinlock.c @@ -30,7 +30,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_resume_np.c b/lib/libthr/thread/thr_resume_np.c index 6dac28ab1f4b..1e69bfa7358b 100644 --- a/lib/libthr/thread/thr_resume_np.c +++ b/lib/libthr/thread/thr_resume_np.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_rtld.c b/lib/libthr/thread/thr_rtld.c index 9026abf941e2..3bc07638e6bf 100644 --- a/lib/libthr/thread/thr_rtld.c +++ b/lib/libthr/thread/thr_rtld.c @@ -26,11 +26,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include /* * A lockless rwlock for rtld. */ -#include #include #include #include diff --git a/lib/libthr/thread/thr_rwlock.c b/lib/libthr/thread/thr_rwlock.c index f8d5fa4f673f..b482dc8b732a 100644 --- a/lib/libthr/thread/thr_rwlock.c +++ b/lib/libthr/thread/thr_rwlock.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include #include #include diff --git a/lib/libthr/thread/thr_rwlockattr.c b/lib/libthr/thread/thr_rwlockattr.c index 068ad7d3acbf..34bbbb20e611 100644 --- a/lib/libthr/thread/thr_rwlockattr.c +++ b/lib/libthr/thread/thr_rwlockattr.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_self.c b/lib/libthr/thread/thr_self.c index f5b1ce8fdb98..cbdadb13ccc4 100644 --- a/lib/libthr/thread/thr_self.c +++ b/lib/libthr/thread/thr_self.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include "un-namespace.h" diff --git a/lib/libthr/thread/thr_sem.c b/lib/libthr/thread/thr_sem.c index c7b5ac009a8c..76180604c183 100644 --- a/lib/libthr/thread/thr_sem.c +++ b/lib/libthr/thread/thr_sem.c @@ -30,7 +30,6 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_setprio.c b/lib/libthr/thread/thr_setprio.c index 6ee60ffeb205..fddf664457bd 100644 --- a/lib/libthr/thread/thr_setprio.c +++ b/lib/libthr/thread/thr_setprio.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include "un-namespace.h" diff --git a/lib/libthr/thread/thr_setschedparam.c b/lib/libthr/thread/thr_setschedparam.c index e3e4174c753b..49ec2ae7a7fd 100644 --- a/lib/libthr/thread/thr_setschedparam.c +++ b/lib/libthr/thread/thr_setschedparam.c @@ -32,7 +32,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c index e082f0601be1..ad291d106001 100644 --- a/lib/libthr/thread/thr_sig.c +++ b/lib/libthr/thread/thr_sig.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_single_np.c b/lib/libthr/thread/thr_single_np.c index e772fb5d3bb7..3aa7adba954d 100644 --- a/lib/libthr/thread/thr_single_np.c +++ b/lib/libthr/thread/thr_single_np.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_sleepq.c b/lib/libthr/thread/thr_sleepq.c index b3feef8c9381..d7de9ab4e25a 100644 --- a/lib/libthr/thread/thr_sleepq.c +++ b/lib/libthr/thread/thr_sleepq.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include #include "thr_private.h" diff --git a/lib/libthr/thread/thr_spec.c b/lib/libthr/thread/thr_spec.c index ee58bb37f6f7..44a124785085 100644 --- a/lib/libthr/thread/thr_spec.c +++ b/lib/libthr/thread/thr_spec.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_suspend_np.c b/lib/libthr/thread/thr_suspend_np.c index b594ea562480..b272c7b2a169 100644 --- a/lib/libthr/thread/thr_suspend_np.c +++ b/lib/libthr/thread/thr_suspend_np.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_switch_np.c b/lib/libthr/thread/thr_switch_np.c index cbf959f161e3..80cd34c15650 100644 --- a/lib/libthr/thread/thr_switch_np.c +++ b/lib/libthr/thread/thr_switch_np.c @@ -32,7 +32,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_syscalls.c b/lib/libthr/thread/thr_syscalls.c index d68ca60e5993..69fb4b45fce5 100644 --- a/lib/libthr/thread/thr_syscalls.c +++ b/lib/libthr/thread/thr_syscalls.c @@ -65,7 +65,6 @@ * */ -#include #include "namespace.h" #include #include diff --git a/lib/libthr/thread/thr_umtx.c b/lib/libthr/thread/thr_umtx.c index 37b378e74405..ba73fd906232 100644 --- a/lib/libthr/thread/thr_umtx.c +++ b/lib/libthr/thread/thr_umtx.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include #include "thr_private.h" #include "thr_umtx.h" diff --git a/lib/libthr/thread/thr_yield.c b/lib/libthr/thread/thr_yield.c index b391e69cabc1..057fc789de02 100644 --- a/lib/libthr/thread/thr_yield.c +++ b/lib/libthr/thread/thr_yield.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include #include "namespace.h" #include #include From nobody Thu Mar 14 00:45:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tw7wS1Dz3z5DnM1; Thu, 14 Mar 2024 00:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tw7wR64GPz4G1w; Thu, 14 Mar 2024 00:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yWNYPH3z9SIJd3B5bBci5U4z5As7fsFa26JX0h70N7k=; b=F+8AMPz68NrTIwEySRK3duAPKqyTSt18PJO2cKKEoWJ9Wjzkvpxw93tb49dVjz20BZ6dsJ NzzJp5kob3F9t07Nwjo31a8rMe0jtBAugQ2TNk/zImaYrtfV4el7wwRBqtdkjbgqQGkic6 76rgQbZFv6w3yqGdl+vYPgM5v+GSqSxCRjvmvdcoft9pZyTZAb3iuVvdIYdjOGhVHps8NX e7loG+cKnJeemq7ASjUwRhjE0ni3Cd1GSZ/7VexS3bKsnzXz6ZmSvKKrcKz3AsIwwAzhSD ZGSlwM8Gizx4YzgodjsItpB/9WZ8T1zaBmiueJU4eVkifQ1lk5cxRFT+cEaMrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710377159; a=rsa-sha256; cv=none; b=b5nqI3PTjI/uig0XUmIM/xLWu15UiZrDTC4N3Y1l8N5/isfsgeB24gugen3KTvoadDuvBU hIh7KalmZHhRi4wJ/dqqYAOZVhdZm2cLTQ9OhD131x3MiMeeQ0Vz7xnfnROd285LE4IO1S nJPLwezBnTLFT1iXgywl1asmC3pPm8CIqhpWKQnR1B+J2I60E+7BnyhwJ/BtHkR0YbTxjz GMKkPSssFTglPlO5PpAA3HUE1vNUrMkPT3AGvyxqY/LSF/6VIq8c/YaWFaljYup3PiDZvJ 2z1Pc/XkBl1BwhdHCGrj+c0l3TMcINyC39ylkiaCGLE7Pg7HCMQMTr1SxA4e2g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yWNYPH3z9SIJd3B5bBci5U4z5As7fsFa26JX0h70N7k=; b=N4KtGT+2+NlT7sku/JJoMemeEajX0/CoP0ij0lWign2aEK9YT83PfRNznvhPfl2t5uEc2j 4epMWfkQyb49owsYrcn45XfYgFAcmetdKiSPmPVK1uRyuIvZvIKqepCieBXcKTTAyKxbXL LJhZgRRp99ZfXbPoKeoa+II8e+MzkxUCojlnl42A4MH8XPema6HkYgI0YQHAt6sLlIf4go 7xIniOkW4P7F20rv6qlW6loKKWtm8xlRLCDFN6WR/R57lrEjv0uAhG54Bianqcl+PI07nm mhqUKHbtLUxyp5lSBypNGJv8xwDAlBPyUPS2MEM4E4WDLX9az2hRY66Vo6+HEQ== 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 4Tw7wR5hdzz152Z; Thu, 14 Mar 2024 00:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42E0jx14028602; Thu, 14 Mar 2024 00:45:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E0jx1x028599; Thu, 14 Mar 2024 00:45:59 GMT (envelope-from git) Date: Thu, 14 Mar 2024 00:45:59 GMT Message-Id: <202403140045.42E0jx1x028599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: a79bb016d9cf - stable/14 - nullfs_mount(): remove unneeded cast List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a79bb016d9cf261a4afa0f6fe1a0c8d3ce43f298 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a79bb016d9cf261a4afa0f6fe1a0c8d3ce43f298 commit a79bb016d9cf261a4afa0f6fe1a0c8d3ce43f298 Author: Konstantin Belousov AuthorDate: 2024-03-08 18:37:43 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-13 00:30:41 +0000 nullfs_mount(): remove unneeded cast (cherry picked from commit 0724293331e4c35c0a8cc5b8922a153545725c24) --- sys/fs/nullfs/null_vfsops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 9d4a9588fed9..dde69d444923 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -174,8 +174,8 @@ nullfs_mount(struct mount *mp) return (EINVAL); } - xmp = (struct null_mount *) malloc(sizeof(struct null_mount), - M_NULLFSMNT, M_WAITOK | M_ZERO); + xmp = malloc(sizeof(struct null_mount), M_NULLFSMNT, + M_WAITOK | M_ZERO); /* * Save pointer to underlying FS and the reference to the From nobody Thu Mar 14 00:46:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tw7wT0TSbz5DmwW; Thu, 14 Mar 2024 00:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tw7wS73Wfz4G48; Thu, 14 Mar 2024 00:46:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wg2gauSTfKrouZjk0lvMg/3bmPxY3P7vOPUU8DiOv6I=; b=FiBpq0OtOBqit5ApqfIgU+XzkazkUoagCH5AR/i0/qxyglOHffXN8ImkACIuPe31ahxZdS W4+9s6vqOYZVdeDj90x6pnXi4Fx1qDGoTz+xiJ5vJfmkjZbkLjofWqXXfWOzZAmKkBB6cU G5Z4Si0/do3+0rtdGs36nir4XMEMGvHs3J7aPZRpFSmfI++mts0sMmcxHPNcm2qaT95f+q SkXncj2Ne4e7qH/yuA4K5quXe7iD/U0a+uc9vEwl1HabDjKMWsatZ0BTjgKSTEWHK2xA3m y/1ULg20WB9i1ihREMgVNVtgYzmpeJSf3HV3oqZXd9nfX5/1z8qwJM/mzhjvNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710377161; a=rsa-sha256; cv=none; b=Gkzxd+R7MS1EnYG5zjkoGhhjenVC53c4gQKIwXEoI4Fe930N9m/XQnHQGYDNDiAX/xcX1b KfXJYNQVBkaqEQjF3waKCoTQ6pkxoF7aZuxUCuw1ZC+VDc2YzNuuP/x7DQfq+cwRiM6qG4 NP26af3OWJTxVEiq7jV/d0TvyXRb8/qCKTVtE1IILR/AZwgusGqE5AKVoz/05TiiMAvKm7 jM6DkRplyORCXRFdpyehMfRJ5Dkt25VHpaV8igMSdYsm5V+qfclHkYnSePXMV7+Hci/6Gi 6yVKhL4HxUd54rgBowL7s8uHxLJsG0MoRA+veYThCkwEH2biKA7YheEYevyz+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wg2gauSTfKrouZjk0lvMg/3bmPxY3P7vOPUU8DiOv6I=; b=DJhyIoEOjI0CGj5zNCYcmaxcWcGgtQ/IgfWBh1j0aSiTviA5V7QPmuXvawCMVEvmSRCTq3 /TqvtV8isxK6joKW0vrFFQnpgbKzf5hNYKmgubRGEzLxLwIpGZAuWz2uJSY3egEdNFJcJn Fs48l7q2DU3xE/KvSmZy5wuoztVuh/JF/97nI+YVi8qR6qEAaZtEcZalzaq5u1anEnd8f7 5Q69TmlhtPL7gimSybQZHjW26QetHvWUAOVNYOVSPg93p8fRqyl1HwBosKpBadj+MzthUO LvuSH4v9rqFlmu2v/Hy+LJdkQyeZ8yHUEVuL3rD9mjOvvJlQHFWHW/kcFq6phA== 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 4Tw7wS6gYgz14yv; Thu, 14 Mar 2024 00:46:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42E0k0VJ028652; Thu, 14 Mar 2024 00:46:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E0k0oJ028649; Thu, 14 Mar 2024 00:46:00 GMT (envelope-from git) Date: Thu, 14 Mar 2024 00:46:00 GMT Message-Id: <202403140046.42E0k0oJ028649@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: adcb01c08e84 - stable/14 - nullfs: add -o cache List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: adcb01c08e849bee32b10b214f59d6bcf8ea46ea Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=adcb01c08e849bee32b10b214f59d6bcf8ea46ea commit adcb01c08e849bee32b10b214f59d6bcf8ea46ea Author: Konstantin Belousov AuthorDate: 2024-03-08 18:26:02 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-13 00:30:41 +0000 nullfs: add -o cache (cherry picked from commit 8921216dbee6884532e22d5347cff4d9ed23e782) --- sys/fs/nullfs/null_vfsops.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index dde69d444923..3df24305f3ff 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -209,12 +209,15 @@ nullfs_mount(struct mount *mp) MNT_IUNLOCK(mp); } - xmp->nullm_flags |= NULLM_CACHE; - if (!null_cache_vnodes || - vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0 || - (xmp->nullm_vfs->mnt_kern_flag & MNTK_NULL_NOCACHE) != 0) - xmp->nullm_flags &= ~NULLM_CACHE; - + if (vfs_getopt(mp->mnt_optnew, "cache", NULL, NULL) == 0) { + xmp->nullm_flags |= NULLM_CACHE; + } else if (vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0) { + ; + } else if (null_cache_vnodes && + (xmp->nullm_vfs->mnt_kern_flag & MNTK_NULL_NOCACHE) == 0) { + xmp->nullm_flags |= NULLM_CACHE; + } + if ((xmp->nullm_flags & NULLM_CACHE) != 0) { vfs_register_for_notification(xmp->nullm_vfs, mp, &xmp->notify_node); From nobody Thu Mar 14 00:46:01 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tw7wV27kPz5DmyX; Thu, 14 Mar 2024 00:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tw7wV0by6z4Fq0; Thu, 14 Mar 2024 00:46:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qQwXxC0U1M2fXiiZbsLilAMbZ7NmTXLZhIsPkRwSEkg=; b=B94JRh5yVXqwB5HC7HGrCIFxvmcjENEF7wGrH1fyTEJFH6Vmz0YDDncMErHRoKkupQqOFp 4kBiluthQbwfe8jTvjeK0DA1zSl8NzbIJ3+aj8BBN+g03mroLTEwKxGyWrKu2CQ1hLXwIk Inth1l/rgTYeS3f9/LxnAwikyxKUWMza5kksYcQWx1e3Y1fXp0q5l6rIpNqZn3HCB+nIsk 9yxCiLngXGAAwZABJEwInqalkL+DPjQG5WdxEeMlvW0oQpXDcQXskzZkkizUTAYh7TYoYJ x1iEjntgkW2vZG9I8QplhbnK8YX0N8Ex41Z+ehCLQXIERi27Z24DicqVKfD3Ew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710377162; a=rsa-sha256; cv=none; b=wjrETeqlzQtApE6t+A5RPpTu9PuewBPgrKwXq+0nqM4WygGHFBNyRcdGA2vJEptjG7Spj3 E9rs8BSyOfMIJutffL3EBTW40Y9Dubx7hDw6OLkkXodJ0xwGy8eixZpt9OshZciooH47b9 9wKSHsialHlhRol3TLgK9tpt1FOUWPGCcwKPrWewqZ2w1IEGmirLA8r1fCIzB7UdGOTn8R YC1CRQGbaGEUrhSqMt77K8LvA2ScrcRbbxm9Rl5Ra3XnScszq7av2M7H6T8HhWtHPrT5bC PBC69pAQHqZMJoXg1a8LQQmn3aLPSHnqPUVYA6Lt68daEr1l4R9O0/N7Icmgcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qQwXxC0U1M2fXiiZbsLilAMbZ7NmTXLZhIsPkRwSEkg=; b=DH1PqUmUUjIAyoa18YPzuf++InS/1veyoXaWbRU8U+QD563FCSkx1Ok2WwmJ3xjqZFIckg aI6IW9ouBY6K5fhT/pzaB+5vsp5XJwnnpPrNpf8vWnvBOg61yA1OSSaUquLWAIqg/Rf5m3 XdzgtFXd2TRkIMVcV78cXs3Ggyz7jAoQXvw3MUEn2IzG0hSuH+ypfSA9Rhkz/fcWDmOulh Yihf8CjrGvD+t8hbfgVSYA1VsXWOpcQnFXpXRDL6ySzR0EFgsszmXSMYiS2veRG9piIp3i aF1Mc98VnVG+XY8U7ft87x7T53pyWB6BPUgHeVH18sJP6ka48VJsATuqynSTEA== 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 4Tw7wV0BFqz15LQ; Thu, 14 Mar 2024 00:46:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42E0k1xt028712; Thu, 14 Mar 2024 00:46:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E0k1rp028708; Thu, 14 Mar 2024 00:46:01 GMT (envelope-from git) Date: Thu, 14 Mar 2024 00:46:01 GMT Message-Id: <202403140046.42E0k1rp028708@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ea8d7263d93e - stable/14 - mount_nullfs(8): document -o cache and vfs.nullfs.cache_vnodes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ea8d7263d93e3e32d8123da5f711446a37cd1722 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ea8d7263d93e3e32d8123da5f711446a37cd1722 commit ea8d7263d93e3e32d8123da5f711446a37cd1722 Author: Konstantin Belousov AuthorDate: 2024-03-08 18:26:48 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-13 00:30:41 +0000 mount_nullfs(8): document -o cache and vfs.nullfs.cache_vnodes (cherry picked from commit 4a2a69c4472cf677f8dfc026fff3dd33c83580cb) --- sbin/mount_nullfs/mount_nullfs.8 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sbin/mount_nullfs/mount_nullfs.8 b/sbin/mount_nullfs/mount_nullfs.8 index e3648a2fb2f2..b4b862b6c979 100644 --- a/sbin/mount_nullfs/mount_nullfs.8 +++ b/sbin/mount_nullfs/mount_nullfs.8 @@ -32,7 +32,7 @@ .\" .\" @(#)mount_null.8 8.6 (Berkeley) 5/1/95 .\" -.Dd June 11, 2023 +.Dd March 24, 2024 .Dt MOUNT_NULLFS 8 .Os .Sh NAME @@ -92,15 +92,21 @@ See the .Xr mount 8 man page for possible options and their meanings. Additionally the following option is supported: -.Bl -tag -width indent +.Bl -tag -width nocache .It Cm nocache Disable metadata caching in the null layer. Some lower-layer file systems may force this option. Depending on the access pattern, this may result in increased lock contention. +.It Cm cache +Force enable metadate caching. .El .El .Pp +The +.Dv vfs.nullfs.cache_vnodes +sysctl specifies global default for mount-specific cache/nocache option. +.Pp The null layer has two purposes. First, it serves as a demonstration of layering by providing a layer which does nothing. From nobody Thu Mar 14 00:46:03 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tw7wW3mKRz5Dmyb; Thu, 14 Mar 2024 00:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tw7wW2qZzz4G84; Thu, 14 Mar 2024 00:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AhlGkq/EelPf+CCkaNMHPqr7Q/P3gEQwN/h5wqWy6zo=; b=AmL0Q0umFEL7aoWsRR6FtlCW1QYKYF9+hiwgGQGUE8PzCbs1+HZi75CVZWCwb2mEgZVtJZ CisE4MtdAqPoeMiVHQ2KgurIpp+KKU/5ksR3SHm5j+XnE5J+5Vowi05hyPO5Fe1IuyyZbv uNXgVdQLQzhz4Z+aXaJMsamJv60IoucKnY4Dx5aohUEne9pZKkQXie6OZS1MWxGr6f/lVa eKlRQO6GbqGRdvPDTqAzuTMWH65jEa6nQFaEdwzpEU6qnJVJrD6fMcaNiu95E7aWpaE4cK ax8crYLGrRn9vZqYf0O4tMqNNH864meutOdBHdl/FhWfMkuJkzDu00OFsGPLkg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710377163; a=rsa-sha256; cv=none; b=MiJ480TQUotaMo9kRliAdKdNx39bvH8TD8umUYt5vN8xvsHufUrc8E6eyoU41j9ZLeNiKX sYukxCZ51WZMq96XUukHJDCWn8Tb7bF0ffr+UIjH6aVtnyc0hloFaBAggw3P8Gd4Gmpxbg ZLarp5PVs++w7SU4ZfdzlmEW54k4EFCPLfYz2NDPmLAwElGRcduckGIH0m2WDEdzLnYFkO q4hVED0NmI5MynUXh4dQUqrJqXrLIFeAlEF+TaOK+BWFNP+MWDMWCAb3ozkUEeOtdpkT6A ncHdXCJi5GOU3fMZN8lI2DsgxtE7qxRzGpt7KLxAbSmb4i4u9XgC+iUMkavMCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AhlGkq/EelPf+CCkaNMHPqr7Q/P3gEQwN/h5wqWy6zo=; b=V39W7NfTCQ8iMGiSBojGiwK7UupjS3I8hxi1RzSkZ3k+Giw1pHD6IxD+5q/gCJiNMD86pI 8J3DXGsLoTNf7KTaWR0qlY3LC/KGjU340O8Z9a8HDXPnOpYF67ThY8WCKPrMHiZGJXzcgJ sU/Fl/RsdY4uT7Jgl6TkNojpoFzh3M3tVlUzRGMJfHDJRkRz0ggXWytx7n04vyiTUnhduq Ib1YXOqcNiyVnoaRZ7KLFHTOtVIomU+xcMgCszQ5zwyBmj/1MYuBXe4Vlf416h2GHdwJKZ WzaJmO0i0Dt3ds6EQXZ8Z+5tb3vy0Lbha7ecrzHLTyaV/D1vSb9poJykQd6VzQ== 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 4Tw7wW0qRwz15VL; Thu, 14 Mar 2024 00:46:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42E0k3R6028757; Thu, 14 Mar 2024 00:46:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E0k3M8028753; Thu, 14 Mar 2024 00:46:03 GMT (envelope-from git) Date: Thu, 14 Mar 2024 00:46:03 GMT Message-Id: <202403140046.42E0k3M8028753@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 37ab169e38e2 - stable/14 - nullfs_mount(): fix whitespace List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 37ab169e38e2df7dbb9a8cae24add6f2bff83eda Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=37ab169e38e2df7dbb9a8cae24add6f2bff83eda commit 37ab169e38e2df7dbb9a8cae24add6f2bff83eda Author: Konstantin Belousov AuthorDate: 2024-03-08 18:51:04 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-13 00:30:41 +0000 nullfs_mount(): fix whitespace (cherry picked from commit 4e8d264b0057e80ed2c1086da30d5e2391d82ffc) --- sys/fs/nullfs/null_vfsops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 3df24305f3ff..262a6793b285 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -217,7 +217,7 @@ nullfs_mount(struct mount *mp) (xmp->nullm_vfs->mnt_kern_flag & MNTK_NULL_NOCACHE) == 0) { xmp->nullm_flags |= NULLM_CACHE; } - + if ((xmp->nullm_flags & NULLM_CACHE) != 0) { vfs_register_for_notification(xmp->nullm_vfs, mp, &xmp->notify_node); From nobody Thu Mar 14 00:46:04 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tw7wX4P0dz5Dmwh; Thu, 14 Mar 2024 00:46: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tw7wX2KKkz4GFF; Thu, 14 Mar 2024 00:46:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kgHGQyu/E73Ae6f+E4pSwnjSDHwPLQK2GDWQXfKRYgw=; b=hgxnwif0dJrTFoVgtaHxk/8h2xmtAe/EWQ36AF/A0OM8EGN2ec0mxCCR/Lx5UdGFs4d3JJ buMSz03lOKtZpG0kHwQrqUxYxVonWyBIUNRFCIKxjUQJox+BS+N+WBHpLrRdFXwtKWr/MQ cHsDmJ5SaTFf3AWhKJAqyfz7uGPvXQq4TbHHuHx8R++l7LYP9OC+DuhMV6J9/h8nnhYi7Z uXjHwVBKKEynwVb5eAhpegtw1s9PufMXoN/q6o4doTtCUOdswi/mr9Yh5AU/qbXCr38vrU JmBZUnwa3iUuHiPf/5TNHLrdu2UE4oF/f1v4rYIeq2CRZMXxcnAC8f10ZkTDVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710377164; a=rsa-sha256; cv=none; b=Al32HDVYlgTiNZmovgKNtFd6jY+eitXHRWzmqhBu2GfjvP7G0ZuyujEDeaH2aqyDBU4oWP tvhDwArbPtDMv1hOObAWlv83xEFn/xm2n+lq3AJCL4QNMPC07KdUK+Xv75tunbCRQiIDXy 6uaAKTFiBhRMr0uDENkRh+HC9V8QlTwMi1D0wnhH7/fiJxemn5JMEGKq1XAOyRO7jyQPFx BZefNds5ZTRiim66hPaRHaU3mvbHXkEXjEwIdVUJH0XuzdJ658RWgQ3sH0f6C1DSfLdM9o ozew6DzSQinN/2VPsSIYAh+zYD4lqoDortpdF+1zeYuspJqdxxhRyszAGjCDZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kgHGQyu/E73Ae6f+E4pSwnjSDHwPLQK2GDWQXfKRYgw=; b=DoA+xjEaHxSWBZVXrto5wK4yaJTSuYRQD8XN4vxxjj3/bmNAxZWeujxBlHosqZIsoEPU9h CBfkg1pEBymu3/OIYQhD5JvNWrXmZLQkb9Rpn9uqmrWYJN3knfQLsLHgarFkninIM7KaNp 24KZrQ2UYWYn1sg4yIF+bYG/95SNGyRXZG+f4n0fEMmfnDz3gZ4R1Jp6U2/TIKWvHm0YT1 +XY495Uwyn1chmS3+MQ8lrWVQsBNntG/b0dN2YXLDZBMYTi49ltI/fsGyHTIn+5X+rgmwU kbdGeQerEfrGAkbWjxnAh6l9hMrFYjwEBETslLBAqKbI28fecmcEpP73NLDpOg== 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 4Tw7wX1nf4z14yw; Thu, 14 Mar 2024 00:46:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42E0k4sX028805; Thu, 14 Mar 2024 00:46:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E0k4bj028800; Thu, 14 Mar 2024 00:46:04 GMT (envelope-from git) Date: Thu, 14 Mar 2024 00:46:04 GMT Message-Id: <202403140046.42E0k4bj028800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 47ee352ffda9 - stable/14 - mount_nullfs(8): fix typo List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 47ee352ffda9f5fbd872ea926e721b7b7cde936b Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=47ee352ffda9f5fbd872ea926e721b7b7cde936b commit 47ee352ffda9f5fbd872ea926e721b7b7cde936b Author: Konstantin Belousov AuthorDate: 2024-03-09 21:18:11 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-13 00:30:41 +0000 mount_nullfs(8): fix typo (cherry picked from commit bdf1587a4973df2f012278b4e975da1cd8766f83) --- sbin/mount_nullfs/mount_nullfs.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/mount_nullfs/mount_nullfs.8 b/sbin/mount_nullfs/mount_nullfs.8 index b4b862b6c979..68ff6beb8eaf 100644 --- a/sbin/mount_nullfs/mount_nullfs.8 +++ b/sbin/mount_nullfs/mount_nullfs.8 @@ -99,7 +99,7 @@ Some lower-layer file systems may force this option. Depending on the access pattern, this may result in increased lock contention. .It Cm cache -Force enable metadate caching. +Force enable metadata caching. .El .El .Pp From nobody Thu Mar 14 00:47:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tw7yJ4GdDz5DnDn; Thu, 14 Mar 2024 00:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tw7yJ2tpnz4HcV; Thu, 14 Mar 2024 00:47:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3aSuQzXlD5fA1liuU7AsVVYzxDyb8Hk21KbW6mteZB4=; b=Gn1aQQ3iMmy4f3rZA25dECczcxXEuE5nlh8xYWiY9PS7qfJvU6dhTr4QTg1nemhPFgepIq wNObiX7SIoNE4yd1W+W0RJ6mOPI7NKWYTu+rvC8P/1y7Eoj77jUzsSAGZ9Daf9Iz+NVBqX MKcS3iq45mPN3ESUdE8p9xj/vt6xdMaYDNgke7k4L5CJRDyntdoV9N4c14/Dq4oFVAzMal bn8Xc9ddx7VcMzNXgXZHQ3Y0Cf2zGfte/hhbigEzN857Wed3Pdft/kByk90lfPnMuCscc3 KxsAChrgTFOvWP9fGMw5o7aC0syBv+w5EfuvPPeiDlyMMZcSfUe6kWqMNa8CcA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710377256; a=rsa-sha256; cv=none; b=ZOhY1oJ9Zr6QIc6+Y6WdjW2e969W3dYcrB3r6lFbmM8V/BRPvXjKnmxn4IP3liYdxhDcDP 5hWYbycZE8euFUD+YSO5US8zJ38PkNzz3bbRJMp0lH5a3O6P4tTaFRhMndp9tPdAA8ygXC ME6Ddlei8MOahXcH7J0f2HGRAhbGnmWE18IHlW0u4VR71TPU5/vn4t2D6XPF0HfToLGDym xHl8dlBrFHDFNc/ks8ze1C9YVIBVQvsqy53rHd2QFlVQ0+zHQmDm5ZONKSgpNPiiZn4MnK kxnZozK0yjbApRRse6Y3XCFn5G5qPkHgbVwsMWYCNpLgfA2CPcFrD0/GT0GF3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3aSuQzXlD5fA1liuU7AsVVYzxDyb8Hk21KbW6mteZB4=; b=WUQnp0FeupDvfaeT6+LwGG8Uf4kTTfVzrnfU1vagwI8qRoREJkp3+aksnWsXASfa7FNMds OBfmlldjxANCUf1T2zrsUQQsKUHdM4WQOpcl6IRZZM127ejWEPZ379Bw0QelAryr7jwJNj youpQKPrLSGhQAyDrcNOuriVJbKQDfta4qbnfUVhg8phu0s4zftvjHayIiq7yVb2YF7Iek 4hGBpjBymW5AptK9t3Mp+s7A4753mou64hkqDos4f0uk0uS7+Ol0p9If0yauHj2a+kRBP9 /hJgadndBH/NU9JadsLsG8IqSkCJYnzM9s2HSXKttVpq1a1B+DvGiR6G4AnkzQ== 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 4Tw7yJ2VKtz15Jt; Thu, 14 Mar 2024 00:47:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42E0laun029258; Thu, 14 Mar 2024 00:47:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E0laYm029255; Thu, 14 Mar 2024 00:47:36 GMT (envelope-from git) Date: Thu, 14 Mar 2024 00:47:36 GMT Message-Id: <202403140047.42E0laYm029255@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d119f5a194fe - stable/13 - nullfs: Add the vfs.nullfs.cache_nodes sysctl to control nocache default List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d119f5a194fe0dd81e43f8ab7470b1b0a51b932d Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d119f5a194fe0dd81e43f8ab7470b1b0a51b932d commit d119f5a194fe0dd81e43f8ab7470b1b0a51b932d Author: Seigo Tanimura AuthorDate: 2024-03-04 13:50:25 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-13 00:31:20 +0000 nullfs: Add the vfs.nullfs.cache_nodes sysctl to control nocache default (cherry picked from commit c849eb8f1925f95ebfb8dbbe00672d902486a973) --- sys/fs/nullfs/null_vfsops.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 500352338f6d..0285a5e45e51 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -50,6 +50,7 @@ #include #include #include +#include #include #include @@ -67,6 +68,13 @@ static vfs_unmount_t nullfs_unmount; static vfs_vget_t nullfs_vget; static vfs_extattrctl_t nullfs_extattrctl; +SYSCTL_NODE(_vfs, OID_AUTO, nullfs, CTLFLAG_RW, 0, "nullfs"); + +static bool null_cache_vnodes = true; +SYSCTL_BOOL(_vfs_nullfs, OID_AUTO, cache_vnodes, CTLFLAG_RWTUN, + &null_cache_vnodes, 0, + "cache free nullfs vnodes"); + /* * Mount null layer */ @@ -195,7 +203,8 @@ nullfs_mount(struct mount *mp) } xmp->nullm_flags |= NULLM_CACHE; - if (vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0 || + if (!null_cache_vnodes || + vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0 || (xmp->nullm_vfs->mnt_kern_flag & MNTK_NULL_NOCACHE) != 0) xmp->nullm_flags &= ~NULLM_CACHE; From nobody Thu Mar 14 00:47:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tw7yK4WV6z5Dmwt; Thu, 14 Mar 2024 00:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tw7yK3sgbz4HPh; Thu, 14 Mar 2024 00:47:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L4JAnC1CQDoZjWCuaY5PISEGHdiItF9r04yWvdYGR7c=; b=nGsi76WDa/itHEkqETWaJ5BfiiFqItS0C3aQ5Ca3H0bcQDq4qPnMnya61cpp8swq3MwRkn JSzaVjNEht4JLs/KfH2UqGlGjF/IaGEVzufA4SwkKriC/Oo8z/cSuVwI7aqWExf4vqEaBn sNcwAL3GnlotIquk9E45ypH7r5+NM4et0kGCs4WdHQNy8DUMFIqLk2+Ws8HLHfsSlo9vHP ZO6Fqbg5h9swZCB4PzFPEAuZKGbtFHqLGLhYdaeKrLw0KZk5dggO1LkSjpWV3U1L3qTYQ1 ijNfw7E0mSgO9X0b3L4U4J/89k8HtgvE4FgOEh3tiDQH0sr/o3enojersKQNPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710377257; a=rsa-sha256; cv=none; b=A7UBJsnukvcfzxTeQ/qFg+F+6/gj8Z0xGvxSV48FxZBAmZOzI6Dq4UOMIQbpk8BK2hqEmY tqTTocUsSC/C8eEiccrovQNWUnLv8WVb/5CZ//hI2P4IWx26zwDRFhUxeyyTH+goLjWRFb T3VnBcd931lPjWTwu96Kv8xIMk/LOW25W3Sq3IK8hzgDjicpufivmI2pczhUs+juFw40Gg NFlcgXB6VMQDA1I61xP/XVa/GUmCiJeWzHC+gbaN3ZeVBdRw8EIw1TEUKvwLUxhZpDDf/k 2vHkk5vc0ZVoc/LKAs2fvHXa7uX5I3HlOacGWxut4RmNthke2ctXwp58GsvHOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377257; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L4JAnC1CQDoZjWCuaY5PISEGHdiItF9r04yWvdYGR7c=; b=qaLAMCgDvg9IYu9VTiUIzdYJ1catgyI11Y65kWIJzTtkFN7PKL2h1PxMpukvb02Zk0CEdS 5INaYm7IMOmMW1Igfpu+63qcWSyizT52yrOnmnK1h7megTSMs6L0ARBmLMKDbRbcgQ0Exu yNP1zBagqLPVXhDUYMVtRelKiKI6YB054rGMcziURAq0KdJFzvWIQVSQEZT3XQhKVd7IOi SNCCtWY5qARY8xpc4eLIRP5X6LrjuZC68uaLrkd3gRMcS6cOg8Au5ooo3hjjK57HwDlEnF OeWPOYvRWsaw4HSzetIiSrwba0lTcyzR5fNXP/u5taclXuJDMpKLx6pxelJXUg== 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 4Tw7yK3TcBz152b; Thu, 14 Mar 2024 00:47:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42E0lb4B029299; Thu, 14 Mar 2024 00:47:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E0lbvK029296; Thu, 14 Mar 2024 00:47:37 GMT (envelope-from git) Date: Thu, 14 Mar 2024 00:47:37 GMT Message-Id: <202403140047.42E0lbvK029296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 4794e34384f0 - stable/13 - nullfs_mount(): remove unneeded cast List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4794e34384f00577e7eaf9dbf8be7724f3a39ef6 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4794e34384f00577e7eaf9dbf8be7724f3a39ef6 commit 4794e34384f00577e7eaf9dbf8be7724f3a39ef6 Author: Konstantin Belousov AuthorDate: 2024-03-08 18:37:43 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-13 00:31:20 +0000 nullfs_mount(): remove unneeded cast (cherry picked from commit 0724293331e4c35c0a8cc5b8922a153545725c24) --- sys/fs/nullfs/null_vfsops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 0285a5e45e51..e08ed2f55d38 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -174,8 +174,8 @@ nullfs_mount(struct mount *mp) return (EINVAL); } - xmp = (struct null_mount *) malloc(sizeof(struct null_mount), - M_NULLFSMNT, M_WAITOK | M_ZERO); + xmp = malloc(sizeof(struct null_mount), M_NULLFSMNT, + M_WAITOK | M_ZERO); /* * Save pointer to underlying FS and the reference to the From nobody Thu Mar 14 00:47:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tw7yM12cMz5Dmyr; Thu, 14 Mar 2024 00:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tw7yL5BWnz4HML; Thu, 14 Mar 2024 00:47:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sqC2qHeWcbAzAOtXgc9P+mNSBWumbcunK0KxR9Ttcu8=; b=Icn1ecD0xmzVbc2OUYj1G5THFfCy+u/s8pLpZDaeRpkxjQT5jyD/HssPezwSZ8cRh1MwiM DztTovSNzg8FOIbwekPjTq7Jeiwz9NLeT8NQ93wpP+kRq3p7V8U8Yh5n176poDxWvqB/Ae GsTA6XKld4OxMDJ5VimOrpy7B8hP+w6qEXHsm7oOSbCQ8AqP9QCoSdUnenj9ll5ygkimKd tQ8h6UDV5EQAiFXq+/WpFcawAe1sQykFvMsgcdWSX9uIjZyqvxM/Q+ktsl3ibZ4aQEK6AE NeZvNwiNE2zsoVdsx5QiVKRBlAiGEyNrfHMDJwDdOaMkVCef3fgHt595yEGMSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710377258; a=rsa-sha256; cv=none; b=sSe18M0KbCoHPNPpCBgINiSm5HCPCnGOKqui9Y0Ljw3AoiOEVtqD9VNVH5ySbIh9LbO5oH QQWsklzExY3dLLVMvqUYLfHkIj0FQO97RIqRos/M0f0JK2IgwAyXxM3FP0TyH2gm5G8epA iiNMcxxtVuKgOg4YM6JK4of6ug6QqMCnlvLd/XPMtbM4L4Jpgefq6stVsaP3H+fHYmMU7R Uvxr57sl5gGJAkJe+Bf+s0xoxgvtTnY8T9CPQ1q9COpJjS4vcmN6LczgFdIFMLBbPAG3xw YdnORM+q2z408ADyXVlMZySRncHTPBD6wyYEkM1n9wdccVQ4bKBQiawYNv8xTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377258; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sqC2qHeWcbAzAOtXgc9P+mNSBWumbcunK0KxR9Ttcu8=; b=FEMJE1FpcQfKYb3WB2xPuf9sPwjpHzrpHgQIXjK/PrYeq4LLkZIhueHRkvE+rfNtZf79AY Waty4HEMT/0FX1dWdmnlDVd69VQoeeXJuSaCf4Xg0bbTonzs0qsKYAHRq6zgJ95AYAY5mQ a2YCLCkiqtWDKF0RFDUOgaH0irHG4gvyYht6UjI/6kk0wxDbAJAOI06b2vkFjf4P5MQbsw G+Dyo5vbry+whl5a/oy3i+W7vUWLBZ2c614D6nZt1UQkp7nwBhpSW0xoD0Zkndigub4xci EDiJWwlfyGIKSzc2vvt7upljzMrKapnh3Ap5JCaCyJct0vPFOq+xes9HvRjWaA== 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 4Tw7yL4WSlz15X0; Thu, 14 Mar 2024 00:47:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42E0lc0J029343; Thu, 14 Mar 2024 00:47:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E0lc2m029340; Thu, 14 Mar 2024 00:47:38 GMT (envelope-from git) Date: Thu, 14 Mar 2024 00:47:38 GMT Message-Id: <202403140047.42E0lc2m029340@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: cfa5b2a501c9 - stable/13 - nullfs: add -o cache List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: cfa5b2a501c9062d3495aa73d5deac8a33992146 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=cfa5b2a501c9062d3495aa73d5deac8a33992146 commit cfa5b2a501c9062d3495aa73d5deac8a33992146 Author: Konstantin Belousov AuthorDate: 2024-03-08 18:26:02 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-13 00:31:20 +0000 nullfs: add -o cache (cherry picked from commit 8921216dbee6884532e22d5347cff4d9ed23e782) --- sys/fs/nullfs/null_vfsops.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index e08ed2f55d38..6a3f77a11734 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -202,12 +202,15 @@ nullfs_mount(struct mount *mp) MNT_IUNLOCK(mp); } - xmp->nullm_flags |= NULLM_CACHE; - if (!null_cache_vnodes || - vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0 || - (xmp->nullm_vfs->mnt_kern_flag & MNTK_NULL_NOCACHE) != 0) - xmp->nullm_flags &= ~NULLM_CACHE; - + if (vfs_getopt(mp->mnt_optnew, "cache", NULL, NULL) == 0) { + xmp->nullm_flags |= NULLM_CACHE; + } else if (vfs_getopt(mp->mnt_optnew, "nocache", NULL, NULL) == 0) { + ; + } else if (null_cache_vnodes && + (xmp->nullm_vfs->mnt_kern_flag & MNTK_NULL_NOCACHE) == 0) { + xmp->nullm_flags |= NULLM_CACHE; + } + MNT_ILOCK(mp); if ((xmp->nullm_flags & NULLM_CACHE) != 0) { mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & From nobody Thu Mar 14 00:47:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tw7yN3ydXz5DnPQ; Thu, 14 Mar 2024 00:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tw7yM5ymcz4HVL; Thu, 14 Mar 2024 00:47:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uf79luq7RNV7kv813LUHp2vzbTuxJvcHCnRwgu/2CXY=; b=ilB8Y8MFXdRAeMH+LgNm8W05QoKCi57K2ekgMHLHV/9jaTM3JxVebjDVfnyIgaLOOQC5NN XVFsDZl93acJPqhKSDrGHHohWCGifnen9WtVW2aSc+MYdvzu+Qb/UhK5kzzYsAz/u957ym VGMrTS6JwxeAjdsIEhDKU91SO9ImGLU0xKY7zBYRd5/PJzH4CWtpt+ujR7apMIGDxjEkpA MxX+hPKXqpD9l4oG7gIB00XycxNBHk0lpxHK7g1oQyKRYyuEU3DY37AQ/gArQRB1Ee1l5Q /63eMii1Eh7YRyTg5On3aqShHnWhyxis2LrLgCmZX+WbMszQlfY6InXI+M/A6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710377259; a=rsa-sha256; cv=none; b=FWme+BKv2Vt4P1t+eA1W0YohBizvlUggi+qpf8n3FE+xhuhhZpl7TttSgVkc2tL8uoTOf3 wjXUXjenQ9XJspnBFLN/a1V7BL+ZLk0EIaKmAmTARmofmiGuV4RiFNizC3hKX5692CqihR MjE/qcU6vt75DnWqT44dsg/fZRtUCorFxvFXUfFtPq1KsDIEXqLWn3o3ThUyQHRbbiNtf/ m48r+zAn6dVPF1T4EKDooT+YBDV6Hjd8TRDOU17z6gSO2oh/2KsZMa7FWtaTmyfCX8bkCU By/Abbb3/aW1mibTVciLGNHL4RYt3wmG8tk7tHi7UE2QNMAqKpBobeLPyTYuog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uf79luq7RNV7kv813LUHp2vzbTuxJvcHCnRwgu/2CXY=; b=k6l09IjHi20It2nlkuYxQcuqzM2bNI9DxFmIjCBypRXhOYEhrs7yA+8N/CXIeBPEcpO2Lq tUcO/bCO+xfR2NttdtjJkp/snEM2ZdN117No/Iif2T2ArDFkSdL2b+yjElgttlIDsMz3Np 1yrXxbGj84YSgr7gO4Q+anCJeTRZ7RstT9BpEfWIdqVk0Z1PTcrfLv0RZmheROeGB/2e0U Df3JTeINeysIgtff+hGaq795U5RzySoPD2BFuKn7lNE9FGqv739uRr17o/CDYFbOP5s2aR C9KiHpoa9u3+ITWsf1NuvXAmUXnCB9z1yBAyuYYAeXep7F/Cgt69KtaJkdjghw== 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 4Tw7yM5Xn3z15LS; Thu, 14 Mar 2024 00:47:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42E0ldOn029388; Thu, 14 Mar 2024 00:47:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E0ldif029385; Thu, 14 Mar 2024 00:47:39 GMT (envelope-from git) Date: Thu, 14 Mar 2024 00:47:39 GMT Message-Id: <202403140047.42E0ldif029385@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: ff4196ad0bb2 - stable/13 - mount_nullfs(8): document -o cache and vfs.nullfs.cache_vnodes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ff4196ad0bb25c8bfababd6e1ee31362aef92283 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ff4196ad0bb25c8bfababd6e1ee31362aef92283 commit ff4196ad0bb25c8bfababd6e1ee31362aef92283 Author: Konstantin Belousov AuthorDate: 2024-03-08 18:26:48 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-13 00:31:20 +0000 mount_nullfs(8): document -o cache and vfs.nullfs.cache_vnodes (cherry picked from commit 4a2a69c4472cf677f8dfc026fff3dd33c83580cb) --- sbin/mount_nullfs/mount_nullfs.8 | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/sbin/mount_nullfs/mount_nullfs.8 b/sbin/mount_nullfs/mount_nullfs.8 index d515decff211..fc33e64e2902 100644 --- a/sbin/mount_nullfs/mount_nullfs.8 +++ b/sbin/mount_nullfs/mount_nullfs.8 @@ -32,7 +32,7 @@ .\" .\" @(#)mount_null.8 8.6 (Berkeley) 5/1/95 .\" -.Dd December 19, 2022 +.Dd March 24, 2024 .Dt MOUNT_NULLFS 8 .Os .Sh NAME @@ -90,8 +90,34 @@ flag followed by a comma separated string of options. See the .Xr mount 8 man page for possible options and their meanings. +<<<<<<< HEAD +||||||| parent of 4a2a69c4472c (mount_nullfs(8): document -o cache and vfs.nullfs.cache_vnodes) +Additionally the following option is supported: +.Bl -tag -width indent +.It Cm nocache +Disable metadata caching in the null layer. +Some lower-layer file systems may force this option. +Depending on the access pattern, +this may result in increased lock contention. +.El +======= +Additionally the following option is supported: +.Bl -tag -width nocache +.It Cm nocache +Disable metadata caching in the null layer. +Some lower-layer file systems may force this option. +Depending on the access pattern, +this may result in increased lock contention. +.It Cm cache +Force enable metadate caching. +.El +>>>>>>> 4a2a69c4472c (mount_nullfs(8): document -o cache and vfs.nullfs.cache_vnodes) .El .Pp +The +.Dv vfs.nullfs.cache_vnodes +sysctl specifies global default for mount-specific cache/nocache option. +.Pp The null layer has two purposes. First, it serves as a demonstration of layering by providing a layer which does nothing. From nobody Thu Mar 14 00:47:40 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tw7yP6ks4z5DnPT; Thu, 14 Mar 2024 00:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tw7yP2l2bz4HSQ; Thu, 14 Mar 2024 00:47:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zpK2QOtC++BXVh757GptLTFo3QbTcInAG62q0rQW4Kk=; b=wrmrIEuh8eQwZvRZdS4bGEH7Aabxelo1HUtWDAbpyBbqwItvwGonZ6+tJTTkqI+RjPxsIB y9fwQLCdLMEvbw9mtnEd5ILQYxlnWxq5ehogQC/Bg5EUnpOlo/qPm4b2FQUVZehc34Au57 dimmV6eC0T9skmoWt8LHVzcRbpjbviiFGIZm/+4egDrR0M46LMdpo3NrIDZ6pJdHzQErNQ CZN2V4I++e4oyNXs2gh7ISpYWsfyGchVLCQruUggJZ6p3UhT1rg4Z4s6vUQOZfSL2yrDME UTdk/VMv/vHn4aDEVd03OJ5MldDCE+rNp2uoW5bU2APlmUvEVmTgGKrG9tJbow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710377261; a=rsa-sha256; cv=none; b=O0GgSIlBYkOV/gNJ1IOL6mRm0in/WkHb4NHeumsJdD2pOrm8tMI/oGMlC9U1Cohhhsvw8F j2PTvELqFuyEHJlMNmLx4LrNp3wZ8AqHHrIs2+cuRBMHEkDC3J7th7LMEW+/cDisgIaNUG Ku0NWJkuJETIddwhhkCAnc6VC4OkXL9fTXPs1JLtfG/TKhWKRyLXxzzR///gESLwiMJMp7 ErfZLqYhlnrU3OtQrElyNW+EWTE4eD9+Od02QcmWgerj4X80XyFnEegQHWecwHxu06Rt50 XiXMzeSZUaKL2zbAOSfi/yzwHUO4I9iWglsJBfzg1NosrXlG60WzJbkUa5y/uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zpK2QOtC++BXVh757GptLTFo3QbTcInAG62q0rQW4Kk=; b=dCAjJgaA4+VEFRoBG6LDXyd2f4VJAnyBsetyN6P5Rj9bggb+g5raLUiBU8X/OPXe1iaaOZ qanu6x74YlPKEE+GR7nlTPzPudwOqVXCgEte2UjZT/ajqILVfKD9u3akxUUaNTVnD4Yzuu zU5Hv+LMSFXzZb9wReaTvFtLtpYk0t59qrLBB7vjYoQo2ho9LonBN9YVogu2lCo75x9uJT wU1D/ozlNUaaVroYVkwrq/Zc66FZLkjZ8q4DMmPsUgFUTxz4Tuu/pHgjSdeW9yAyb+1EZm MboEESqCw9fnvQx6F+PdGTomTi689Sh66T6WPQ44UWbyRKz1xT7JvjA7wwg2dw== 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 4Tw7yN6ZDHz152c; Thu, 14 Mar 2024 00:47:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42E0lep4029424; Thu, 14 Mar 2024 00:47:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E0lepM029421; Thu, 14 Mar 2024 00:47:40 GMT (envelope-from git) Date: Thu, 14 Mar 2024 00:47:40 GMT Message-Id: <202403140047.42E0lepM029421@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: de21d08e9e31 - stable/13 - nullfs_mount(): fix whitespace List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: de21d08e9e31059d0a387bd2cf180528adb473ff Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=de21d08e9e31059d0a387bd2cf180528adb473ff commit de21d08e9e31059d0a387bd2cf180528adb473ff Author: Konstantin Belousov AuthorDate: 2024-03-08 18:51:04 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-13 00:31:21 +0000 nullfs_mount(): fix whitespace (cherry picked from commit 4e8d264b0057e80ed2c1086da30d5e2391d82ffc) --- sys/fs/nullfs/null_vfsops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 6a3f77a11734..77ead04b1616 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -210,7 +210,7 @@ nullfs_mount(struct mount *mp) (xmp->nullm_vfs->mnt_kern_flag & MNTK_NULL_NOCACHE) == 0) { xmp->nullm_flags |= NULLM_CACHE; } - + MNT_ILOCK(mp); if ((xmp->nullm_flags & NULLM_CACHE) != 0) { mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & From nobody Thu Mar 14 00:47:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tw7yQ34VRz5DnPV; Thu, 14 Mar 2024 00:47: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tw7yQ186Rz4HVp; Thu, 14 Mar 2024 00:47:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R16L/CzbQHv404e/JvZ9/XHqZjzPeaVEt0vAGz1F2hE=; b=Xc4/YJB4srze9EbXOfkE0ux0OzUlAEPcESA+iXi5pBl4KEmaK3tlTmL/2Di7iLBTwnaOt7 33K6slFDUi5zNHGe1T01nJEWX1cad3G7HLuJGgVa1OjN7CYtKwgTPe9fko9IUmA2d2vYc6 SXVBe65jgOEXnAV8JgXno/lA+OjzpWLq+/EbnHH8FEkmgc7quSRkUk677/Ge9ARN7ysEKM 2sl9dSprQnrYmH8mhtAMtWehw3yneS+BZOJiXWloOAGDMdHcgPFGamapEkLs+mX6YPG3yq wwSE9cazw7sEpLSddOYGMgtUEa8XL5MjdoHgKxQhaxfdOqy25eZu2kUHpkTTBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710377262; a=rsa-sha256; cv=none; b=iknwEkWp8WcMySNmqW6XgF9Id8m9D2EVjOh2DpOPe/sfcAcpbwRtcufwUx3vufBe6hBD7t mqpXiLrahlOAUWlF1Kt4tl2BFHQxJQSmL8fXApmYRDE2XYWyGx3ELQ/u6btsdn/+Letm60 wDti0Qo9/AgyqQW406ITAFzXEwDeMqngYi2CQr4VUDvc/PeJBnBE4orPWOAIPOVfR7KKYI bUxkYL7TfjeScYm3WlpSjmNzv5RlYjE0lRPmq4ICvsluriAzH8awT9pNw6Xje5tWQ38Bid NfnUWeSk6+GIFzMzFDjI0q/UkbBnOSZ9LosAZaaIe9180Ok9gq4jrBHggX5hAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710377262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R16L/CzbQHv404e/JvZ9/XHqZjzPeaVEt0vAGz1F2hE=; b=q+Jz7iGdngs0uOGEFXWIlZMm5jXvUZyrV1qrbv5nNUJ73Bj866DRj6nviyfkDGfN+tGjkh rVA15EVyApU1az9AkQP3QrGmwoqIDyh7hRHh5DfD3cCouFwJgUAcvyooHS0mRKTuOg3vhZ VefzM7lMCIHDM7NBGfhPrAfpp9QnSyp54jYzmq9kcEXLS70m4bur9jMmIqekTZAOkRjKnJ BwYvEeeND99B4bP+kZlZCL5dgWsJJwypXrrQVuGbf7VaMpTnaebCpsuHh9jiHqLioSAUjR kqTepeXpPdzXMlKdPWJK8QA0y5grpQjt94VjEiQIjW/2CuFF1g8WNj6vSEHrAg== 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 4Tw7yQ099pz15ZL; Thu, 14 Mar 2024 00:47:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42E0lfjO029460; Thu, 14 Mar 2024 00:47:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E0lfIG029457; Thu, 14 Mar 2024 00:47:41 GMT (envelope-from git) Date: Thu, 14 Mar 2024 00:47:41 GMT Message-Id: <202403140047.42E0lfIG029457@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 6bf21b4c0c61 - stable/13 - mount_nullfs(8): fix typo List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 6bf21b4c0c616e627a685bab58bf884ebf33e031 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6bf21b4c0c616e627a685bab58bf884ebf33e031 commit 6bf21b4c0c616e627a685bab58bf884ebf33e031 Author: Konstantin Belousov AuthorDate: 2024-03-09 21:18:11 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-13 00:31:21 +0000 mount_nullfs(8): fix typo (cherry picked from commit bdf1587a4973df2f012278b4e975da1cd8766f83) --- sbin/mount_nullfs/mount_nullfs.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/mount_nullfs/mount_nullfs.8 b/sbin/mount_nullfs/mount_nullfs.8 index fc33e64e2902..759f7546c49a 100644 --- a/sbin/mount_nullfs/mount_nullfs.8 +++ b/sbin/mount_nullfs/mount_nullfs.8 @@ -109,7 +109,7 @@ Some lower-layer file systems may force this option. Depending on the access pattern, this may result in increased lock contention. .It Cm cache -Force enable metadate caching. +Force enable metadata caching. .El >>>>>>> 4a2a69c4472c (mount_nullfs(8): document -o cache and vfs.nullfs.cache_vnodes) .El From nobody Thu Mar 14 08:29:42 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TwLCW1TXNz5FSJl; Thu, 14 Mar 2024 08:29:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TwLCW0zh5z43DB; Thu, 14 Mar 2024 08:29:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710404983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ZKfxLHTUTUxiWlu+7ayETeuuokajA5tPfB1x2w7nRs=; b=ZyNckWSmyTiG1wmMj9RpSGzAjvuG32rvz+lkN5qYP/2AT/WZ5D+UImiCtUYnlLQRTtAdsL nJzg+c/iZef4CBpjjrs6L1kzG/fTiCT8FcRBHSYeWeVPoB1+TqRXs1OkmuiiQcIHzAQF99 V4Sd2snbw7wAcdC1UybqpTJ9SvSBBVsgXLmUpvViZKe7hc1DdD0Au8Rzz/dvvpLt6DFdLP al2taN6GrIvEVUk41mD5JoeJ7ZhreX0Ro5R/+BAnEGQrJGQtGoHAXK4fYHfZv9Zrt1cItD xDv3hG//5s93AB3FxQbS3sI0Z7FrjeZNGIMm8AeXFMP/GdoRcWinT/DVTxUIxQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710404983; a=rsa-sha256; cv=none; b=jNgr1vwLww/VN2DkW104YeRHyY/rI4X5qpqPeCUrLqQRkJYJQxHse+AxgERL5jZbAhXWdO 52oOY3pGMDW0k0qlYPbFYCX/ErEiG2j/+S+5D/TNCed4g94IecbfVkHifDAjlF3XBbXP2S GssnT65D0p8xIKSNZ6tOm1J+/e10LigLddPjO+dtfqpwZ0jFxK4RjcVRH8YaSDn/LU89Gu Ss5XXhUdcTI1GITvG13pTaiuzEOsa2TWQ+vPkWC68+tzbEBsV7iiP9r19cj4YTnPx82L3o Oc7/E+aeYdN8pxS1aTw+vOs5+mZmaNRlSS5Ex33VeWCCQp9386/nicQG+FN8Uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710404983; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6ZKfxLHTUTUxiWlu+7ayETeuuokajA5tPfB1x2w7nRs=; b=bK1TQzHuE0Axh5/usXFj0XWcKqEpR7hVofzey9pRTgWaxDbF4zr6Ne2pdawQ0muBVHwA2b 6l39SjvZXBr5D2bYt5TfCAHDiWLx/fitbvsoDVr/rLUDM80d0+GpMdoprlcu+2za/gz3If PcIepPEQzpCl767rHP2fPb4eLUvhpiZKQ2KQYSAlEa4VR2+wW1vjNlvPU/HH/0h26wLL+S tRl9YwwZROWnXVR/A35tn4qRf5T1tua74tKP6T6FaxzW4T1CQEewBwwPoFKtilE96Y1fDx h3Pt7dSAvaUJhJI/I9QJaWHuPSi+sOD+O30otHhMnnw+JCO0SYcXGEntvB3vOg== 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 4TwLCW0SgNzKN2; Thu, 14 Mar 2024 08:29:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42E8TgtX006366; Thu, 14 Mar 2024 08:29:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E8TgRp006363; Thu, 14 Mar 2024 08:29:42 GMT (envelope-from git) Date: Thu, 14 Mar 2024 08:29:42 GMT Message-Id: <202403140829.42E8TgRp006363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 7a4a122f9731 - stable/14 - netlink: fix adding an interface route List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 7a4a122f9731c589831e1c00d85588ff9813b338 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=7a4a122f9731c589831e1c00d85588ff9813b338 commit 7a4a122f9731c589831e1c00d85588ff9813b338 Author: KUROSAWA Takahiro AuthorDate: 2023-11-28 18:14:50 +0000 Commit: Zhenlei Huang CommitDate: 2024-03-14 08:27:42 +0000 netlink: fix adding an interface route route add -iface " for a netif without an IPv4/IPv6 address fails with EINVAL. Need to use a link-level ifaddr for gw if an ifaddr for dst is not found as the rtsock-based implementation does. PR: 275341 Reported by: Sean Cody Reviewed by: rcm Tested by: rcm Approved by: kp (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41330 (cherry picked from commit f818559774cb0c1516364c4beca361480fd68b5b) --- sys/netlink/route/rt.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c index cfaa2167b0d2..ed09748995dc 100644 --- a/sys/netlink/route/rt.c +++ b/sys/netlink/route/rt.c @@ -750,9 +750,14 @@ finalize_nhop(struct nhop_object *nh, const struct sockaddr *dst, int *perror) struct ifaddr *ifa = ifaof_ifpforaddr(gw_sa, nh->nh_ifp); if (ifa == NULL) { - NL_LOG(LOG_DEBUG, "Unable to determine ifa, skipping"); - *perror = EINVAL; - return (NULL); + /* Try link-level ifa. */ + gw_sa = &nh->gw_sa; + ifa = ifaof_ifpforaddr(gw_sa, nh->nh_ifp); + if (ifa == NULL) { + NL_LOG(LOG_DEBUG, "Unable to determine ifa, skipping"); + *perror = EINVAL; + return (NULL); + } } nhop_set_src(nh, ifa); } From nobody Thu Mar 14 08:29:44 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TwLCX2g4Hz5FSF2; Thu, 14 Mar 2024 08:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TwLCX1grgz437b; Thu, 14 Mar 2024 08:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710404984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OHwzN5lg8+ERUzXWu2Y13ezi7gaa89zyYspAebusGVM=; b=HGlONhHvOKOvNhYwWwbF9Gukvm93OwFnkHZpqTbk3Sj/JKonWWqqZAEV73JpXTGggH+M7y 1ovVmP6N2AKlkd9HcacJZaS6PKqGI3V66NpOL+IMspvTAcAoS2JVNtaM8VyXRM2a40rj7l S1odTkhEcM50AtjGRulJgBwX9OGXfhqEDbpSwHS86hj3Kz7pO7P+aQThyOcqWedzeO2zXs TfYf2bMuxLUNv6XMPpsLaWlhl5AYxV04ZAf5XFsspWs6zOWLH1GYjuJgeQHGc9JzpgOBnV zX0C2mVJJ2msmxjp0aYgVyTqK2DfR5PwGWtTNR7e7DgowUo3FJcObFzrjQCrUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710404984; a=rsa-sha256; cv=none; b=OW7QZihtTGSLffjlwtqLOI7uB3ET3trNDW4IAFk6B6tT3BYvYJou5Zm1GylPL7I7+mK9FL ZpGcmy2033e9swSQwQ7iX4KLrqrUqvjN6cyr2XqBGKSxn683EY1VzKMjd20moDXsrmhfGJ aT2lGcXkWl/RnBYY66QmJlRm5oSv+biGYAtRLbfTVxzh9uyBQV3hBO8kUp5Rv3JLGNTDL4 Xq+1xFZeIWgYijmfnARuLCfMv57Sc0eSSHlVQHiMMdGWkFXXBafjF4fyBH3GhGncwhCRfu QoyEQQrzmQbQBlvwT09p7/axGYkoOSRPRhEoJ9htBAjA1FyUCcQGfJj8AB5qxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710404984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OHwzN5lg8+ERUzXWu2Y13ezi7gaa89zyYspAebusGVM=; b=q8YG2LGWrnApp7Xz5EX8b6podrlqstSqMZyiobMODX4+z066Dy3eVWb4v0t6ReKBiu6vYD K+rHd40RQVwDWw2tgZOjh01tBj7GZMWiF+wBXZ6qjWWEzMe7ECV04TaNR/0NjxMWMjOPEq I0moc/vKVVHtwddTxNF2rem9tnJ+7SIXPN7IodPHTk6s1xTZV81s94Kgdw7sih8CVXl4fJ 613jneMKoyceCAIq8gT7X8qcqVEZuVCnLilosbuh9gn+PnS5pPdYnLkq50/nMJ81YsOzab RQD1KiqivYaEtOlPQw433WVbYpPBZnfp7mBy1dD4ypjUtajIVDG1soNphnKLNg== 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 4TwLCX1HCPzK5T; Thu, 14 Mar 2024 08:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42E8Tii1006417; Thu, 14 Mar 2024 08:29:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E8Ti7q006414; Thu, 14 Mar 2024 08:29:44 GMT (envelope-from git) Date: Thu, 14 Mar 2024 08:29:44 GMT Message-Id: <202403140829.42E8Ti7q006414@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: b2cb054dac62 - stable/14 - netlink: Add tests when adding an interface route List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b2cb054dac62b2f976677d140700f7aa5c228f5e Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=b2cb054dac62b2f976677d140700f7aa5c228f5e commit b2cb054dac62b2f976677d140700f7aa5c228f5e Author: Jose Luis Duran AuthorDate: 2023-11-28 19:58:03 +0000 Commit: Zhenlei Huang CommitDate: 2024-03-14 08:27:54 +0000 netlink: Add tests when adding an interface route Add tests for adding a route using an interface only (without an IP address). Reviewed by: rcm Approved by: kp (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41436 (cherry picked from commit 1db64f89363c97858961c4df0b7d02f3223723cf) --- tests/sys/netlink/test_rtnl_route.py | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tests/sys/netlink/test_rtnl_route.py b/tests/sys/netlink/test_rtnl_route.py index e6bbe7656eb4..20f2c3ce3ee2 100644 --- a/tests/sys/netlink/test_rtnl_route.py +++ b/tests/sys/netlink/test_rtnl_route.py @@ -3,6 +3,7 @@ import socket import pytest from atf_python.sys.net.tools import ToolsHelper +from atf_python.sys.net.vnet import IfaceFactory from atf_python.sys.net.vnet import SingleVnetTestTemplate from atf_python.sys.netlink.attrs import NlAttrIp from atf_python.sys.netlink.attrs import NlAttrU32 @@ -45,6 +46,46 @@ class TestRtNlRoute(NetlinkTestTemplate, SingleVnetTestTemplate): ToolsHelper.print_net_debug() ToolsHelper.print_output("netstat -6onW") + @pytest.mark.timeout(5) + def test_add_route6_ll_if_gw(self): + tun_ifname = IfaceFactory().create_iface("", "tun")[0].name + tun_ifindex = socket.if_nametoindex(tun_ifname) + + msg = NetlinkRtMessage(self.helper, NlRtMsgType.RTM_NEWROUTE) + msg.set_request() + msg.add_nlflags([NlmNewFlags.NLM_F_CREATE]) + msg.base_hdr.rtm_family = socket.AF_INET6 + msg.base_hdr.rtm_dst_len = 64 + msg.add_nla(NlAttrIp(RtattrType.RTA_DST, "2001:db8:2::")) + msg.add_nla(NlAttrU32(RtattrType.RTA_OIF, tun_ifindex)) + + rx_msg = self.get_reply(msg) + assert rx_msg.is_type(NlMsgType.NLMSG_ERROR) + assert rx_msg.error_code == 0 + + ToolsHelper.print_net_debug() + ToolsHelper.print_output("netstat -6onW") + + @pytest.mark.timeout(5) + def test_add_route4_ll_if_gw(self): + tun_ifname = IfaceFactory().create_iface("", "tun")[0].name + tun_ifindex = socket.if_nametoindex(tun_ifname) + + msg = NetlinkRtMessage(self.helper, NlRtMsgType.RTM_NEWROUTE) + msg.set_request() + msg.add_nlflags([NlmNewFlags.NLM_F_CREATE]) + msg.base_hdr.rtm_family = socket.AF_INET + msg.base_hdr.rtm_dst_len = 32 + msg.add_nla(NlAttrIp(RtattrType.RTA_DST, "192.0.2.1")) + msg.add_nla(NlAttrU32(RtattrType.RTA_OIF, tun_ifindex)) + + rx_msg = self.get_reply(msg) + assert rx_msg.is_type(NlMsgType.NLMSG_ERROR) + assert rx_msg.error_code == 0 + + ToolsHelper.print_net_debug() + ToolsHelper.print_output("netstat -4onW") + @pytest.mark.timeout(20) def test_buffer_override(self): msg_flags = ( From nobody Thu Mar 14 09:54:50 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TwN5l0Sdwz5Ccgx; Thu, 14 Mar 2024 09:54: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TwN5k74Jgz4DyQ; Thu, 14 Mar 2024 09:54:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710410091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jo7044ff+bzkVIrSfEn/bAGPvWabhMlMuJ5o0wNoSmA=; b=AKtGlLQ7GbUSOsd0BILpy3knr4SV1MlgiFiQECpwh+HSUDNUcCbDIvRfnJoNq0v0NrB82/ PH/HX+nMtV9CVIJg7Ja0s5u1qsHRM2s8tbI/s8XKvx5wCvhNzBViE9s1reapXD7ldjLqEj n3HBc87GwAFZ/PDeSBO6HKzCdaVfse/rZZkSeE/03Wy8zFmBwINCcPgyl0HlHCjLOLkOIo 8woflP/54NAwN3zWMEEhqjMH1LN25VTSOJjhgN8D4r727XF18hCButbUk6z5fGApbbDzom iNYxP8eUdUCZ1iHEIxxoA+XJ+PfoXryazzCzcTYM2arcHOrLlB6HtG1zireAxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710410091; a=rsa-sha256; cv=none; b=AwCXfMxihUTQJqoXT6ilkImmda8W4lIy46dLxb7XRQ8Q0QqBB/j29aby4Iwm59t/nwATfo Us70fCkmJfoibqeIPvVZl6ZNss24Pp6kJvZMyLNpy/wen1Jdz90dJH7ZGfJ9WpSNhM0+MI dqFFOj7hqHmFcB5I0jJ6s6sWJY9nUNf5/LHYZX8e7GEtAScD9I4N8RRCIEVAnUUMVNE8Vs lMXEBKjKd1aiM+NjWn3YK8tfKP7mm7ovmtK0tSfG2dm5Ojs+lyuCmLWkG+czV75eiccrcc xqgtfuU/1rGtZtnp/2skJle4xOJyaNxi+j9K5Taf3bk4Ojp+ZyVI6b02jENLog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710410091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jo7044ff+bzkVIrSfEn/bAGPvWabhMlMuJ5o0wNoSmA=; b=E11wG/sQXxxvASMFUsWKflM7N5b46TabR7c7T15pcdZcf5Cs+LQS9DrXGgax1oKAqNiTwb nRdvG2GTao3UStWrhHTV6soy1MhmuJGwEALA2FUNS+O9Euyesxg5t9gatdD7cRIk5Hjfb9 lQGIFHmSEylW4SDTgb1BWPTOUTfOr7gIBC9mJaqYIKTMENpQbYziwOl8XwRiWmynKh6AR1 /OgOlDS8WVJ5pcBV8cvnHzv5QAwgUttBSKIkzfSlmP/X9D/h9aX1nnvTUe+kwVmIDziisv 5vjrTn0yHZvgHCxyuIMaTZ2UiDzvtloFZv/YJBcUZYBNeA43eQmYNlEubSxM8Q== 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 4TwN5k6g6pzLvt; Thu, 14 Mar 2024 09:54:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42E9soWf058523; Thu, 14 Mar 2024 09:54:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42E9soZT058520; Thu, 14 Mar 2024 09:54:50 GMT (envelope-from git) Date: Thu, 14 Mar 2024 09:54:50 GMT Message-Id: <202403140954.42E9soZT058520@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 9a2b4665958e - stable/14 - route: introduce add interface route test cases List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9a2b4665958e25eccf06a3b8445eacc24c5be379 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9a2b4665958e25eccf06a3b8445eacc24c5be379 commit 9a2b4665958e25eccf06a3b8445eacc24c5be379 Author: R. Christian McDonald AuthorDate: 2023-11-28 18:18:15 +0000 Commit: Zhenlei Huang CommitDate: 2024-03-14 09:52:50 +0000 route: introduce add interface route test cases As a followup to D41330 and D41436, this patch introduces two new tests for sbin/route: interface_route_v[46]. These tests fail without D41330. Reviewed by: kp Approved by: kp (mentor) MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit ca7edd0d2c339b8e6e5e52257ea6d4f22db02550) --- sbin/route/tests/basic.sh | 58 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/sbin/route/tests/basic.sh b/sbin/route/tests/basic.sh index bb432daa0793..2e2ab9dba97f 100644 --- a/sbin/route/tests/basic.sh +++ b/sbin/route/tests/basic.sh @@ -117,8 +117,66 @@ basic_v6_cleanup() vnet_cleanup } +atf_test_case "interface_route_v4" "cleanup" +interface_route_v4_head() +{ + atf_set descr 'add interface route for v4' + atf_set require.user root + atf_set require.progs jail jq +} + +interface_route_v4_body() +{ + epair=$(vnet_mkepair) + ifconfig ${epair}a up + vnet_mkjail alcatraz ${epair}b + + # add interface route + jexec alcatraz route add "192.0.2.1" -iface ${epair}b + gateway=$(check_route "alcatraz" "192.0.2.1") + + if [ -z "${gateway}" ]; then + atf_fail "Failed to add interface route." + fi +} + +interface_route_v4_cleanup() +{ + vnet_cleanup +} + +atf_test_case "interface_route_v6" "cleanup" +interface_route_v6_head() +{ + atf_set descr 'add interface route for v6' + atf_set require.user root + atf_set require.progs jail jq +} + +interface_route_v6_body() +{ + epair=$(vnet_mkepair) + ifconfig ${epair}a up + vnet_mkjail alcatraz ${epair}b + + # add interface route + jexec alcatraz route add -6 "2001:db8:cc4b::1" -iface ${epair}b + gateway=$(check_route "alcatraz" "2001:db8:cc4b::1") + + if [ -z "${gateway}" ]; then + atf_fail "Failed to add interface route." + fi +} + +interface_route_v6_cleanup() +{ + vnet_cleanup +} + atf_init_test_cases() { atf_add_test_case "basic_v4" atf_add_test_case "basic_v6" + atf_add_test_case "interface_route_v4" + atf_add_test_case "interface_route_v6" } From nobody Fri Mar 15 09:13:00 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Twz706nYWz5D06Y; Fri, 15 Mar 2024 09:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Twz703snFz4tMB; Fri, 15 Mar 2024 09:13:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710493980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vx4Cck+Qnw8bKL2BVY8Tk3JI15J3o51LVegkQiRwmP8=; b=x7MBjCVTWGL9DDz90nI5T62vGxcP6cjD7vR6mFUEDuxvjtpw8nugGC5rC+LbD425o2NFry teOJyscKxrM6HsidawQi6lsP4WSWVsUVH8TNt8kQxBO8rqT6vVt5DI2QviQl+KDKSosRPy oUEUx0H4mRtiD7ZtmMHyIb0VZlVp+RcWDsrmeHy2o7WirdXZQe/sXVivzDiHVdk3FwNbS/ 5IpNgmSBJX219XcVJcWHQmBdddXAeyRUnVctX+4gh9QM66uspqMbQnO5HoFBqGADHLpney AUlaYFeAMLFF/xLEQrZjFKkZSJwaEfox69WkGELbztUmkMMtXCrXmVqXOjZYPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710493980; a=rsa-sha256; cv=none; b=wxvMpbz7dDgmFxuCmK8WLEWd6bUXQdJPsQSDwKLZQDRm+iUTJXKJguU9gcXFzmLVmxvCIG ST+Q5rLlhU3O7WfoFnrZ7JejvAxPC4YLWsM09vDk3noxcDWvbhv0LFDIVuLBLIk1A25xZb A0WkHs59ace/EB7mkZCpLsrf9At3WzRXWn5gdsJT0T6cuT6f7k0nT8j0g11EcFoZCBIF84 eaIrp0iJEwmPu3wzA9232vRMlVPkIOrD0zs8+G7lxleYvUkFzlTCIwYS6MfPGVPDMmV0BL LIpXuoDGukD7wmXb7+L8PkAn+6pl4qk9keqy/UlSAR018ik57nbRzH9+0dGFuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710493980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vx4Cck+Qnw8bKL2BVY8Tk3JI15J3o51LVegkQiRwmP8=; b=DWt12DjEEXQfxpBu7mgW3LJu6F+jvvhAQZW+iLe1NKxxNdL+om5W8Y3xHSIxUPedis9PSH AajJeyAlvQDAs8CrAn8czpmcqn4wH/L3TOnNAoPDRI0TGcSsDTpRt6B18BMOMKEXJTqOgZ DFgwLwBFJwiBl/97kQLGXPkGHmFBiePgbZy7htCQLdi6JWhYBVJsRSggciuRdDDKjHEMC3 2ELyoGJMcJNYiV1D5QLbAjwjxZ9E2Dle2egvI6hJk1wCs6q/K3BjcL30VRw3MVyqpFs5cH kYs/rg4vGKf9Kdsd9oTR/KH2KHyvv4C+kZf6lkYEMXpYpKj2ioz/ZV45a+RjTg== 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 4Twz703T1Bz14jQ; Fri, 15 Mar 2024 09:13:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42F9D0gO022871; Fri, 15 Mar 2024 09:13:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42F9D0mc022868; Fri, 15 Mar 2024 09:13:00 GMT (envelope-from git) Date: Fri, 15 Mar 2024 09:13:00 GMT Message-Id: <202403150913.42F9D0mc022868@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Bergling Subject: git: 406f9fd0a7d8 - stable/14 - md5.1: Fix the GNU mode example when using a digest file List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 406f9fd0a7d8051e2d461b4b5673a9116a993a25 Auto-Submitted: auto-generated The branch stable/14 has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=406f9fd0a7d8051e2d461b4b5673a9116a993a25 commit 406f9fd0a7d8051e2d461b4b5673a9116a993a25 Author: Gordon Bergling AuthorDate: 2024-03-12 14:44:48 +0000 Commit: Gordon Bergling CommitDate: 2024-03-15 09:12:48 +0000 md5.1: Fix the GNU mode example when using a digest file The last example in the manpage md5(1) wants to demonstrate GNU mode (md5sum), but uses BSD mode (md5) instead. In GNU mode, the -c option does not compare against a hash string passed as parameter. Instead, it expects a digest file, as created under the name digest for /boot/loader.conf in the example above. PR: 276560 Reviewed by: mhorne, des Differential Revision: https://reviews.freebsd.org/D44098 (cherry picked from commit f3343fe4a64fe6a25b4e09ab9061a45f82e5abc1) --- sbin/md5/md5.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/md5/md5.1 b/sbin/md5/md5.1 index 0a8dc46f3b1f..b530292c8269 100644 --- a/sbin/md5/md5.1 +++ b/sbin/md5/md5.1 @@ -1,4 +1,4 @@ -.Dd February 13, 2024 +.Dd March 12, 2024 .Dt MD5 1 .Os .Sh NAME @@ -367,7 +367,7 @@ for .Pa /boot/loader.conf in the example above. .Bd -literal -offset indent -$ md5 -c digest /boot/loader.conf +$ md5sum -c digest /boot/loader.conf: OK .Ed .Pp From nobody Fri Mar 15 10:13:42 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tx0T24pslz5D5TL; Fri, 15 Mar 2024 10:13: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tx0T24NqFz41Yx; Fri, 15 Mar 2024 10:13:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710497622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wbNzJyKDzIqPUVHaXMZSvpVxr/KzIrAcPtPEYqCq0x0=; b=Mja3RkEr8Bt2t6RPMz+6B59+h+NxRd9o1pNcTfk6Ub9mHRXuzy9LfVo48G/EmSgSm+Prkm Z3LJ0uEI6/xOlJ4SJAdH7bFO/IZqOzbZjlQ/EeA8VqAnQtoTEgsWINOy6gWMuXyoilABf0 qAXBwCNnl3WCzhseMiwR24R/RGAM/9uBn7RmEzXQn9buv6ZbNU1O6KuHd6KC2l88XlSLE3 7ptfO3ZImN00YcFp7/c4WLckNOsnnEtYFCyEA6rB783nb6iRUrTR9s+CARpbMj5kRYlYXo b+znLAEHNvzy1gb4orv1uY7qbkAL9WY6fJAIy+M/ZxaRZ6+dGXb/1Qr2eD5Rug== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710497622; a=rsa-sha256; cv=none; b=oM96q1M0dO8hxaMz8568TZ9easkPqXbC546vqpzcDniVAzMEVjLbBV3XnbE5+bvLUB/SqT 1NCUuPeQpGGHxu2XtJUKxkSOoOiaCrIG6HGRHm/ZehyGAVJRRfItF98B9z/qSS1bZRD5sz llfCqHzoVJcSBfUhYj2wI9lJzWGGHWAdMY2/a4TYL9GRd2y3+bNpng+MxbX1MKjonBh1nY eqMJdOeEsArKxcUdtRKB2CD0NBtbIQQLIiLL0hK4llJKwooBPbPQ9nn6MJzubAyJmXROob UztOigmxuBgIZlg5o+jaMk//6bDFNBPXYEMeuPBRKXRH77zakDxT4bPfFzPhFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710497622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wbNzJyKDzIqPUVHaXMZSvpVxr/KzIrAcPtPEYqCq0x0=; b=f25yxWz3Wc9ejX0z72WxPe9yjEZO5xrLGIOcw0x13KRRVsIy5fpIL8w5Ah0EtWk7EqHLYH Hkv7hqQ+4ByZAs4pWNANU4n7stLY+gdoCLlnRd+owGZsTfTHYyswM3AOQiu90VtLctLmF4 YTLnKAQLujcIEZaDZQBSmKLNcQOTlv4V4ibUv71YjSjg/+V2xzVtPVAY552vsn8p7e8gUS 2wWBdo1ds1rH9KrudKBwlnFqeD++zTAvCdimr7t1b4jbbixcj+kX0kY3K3hERqm1Zb2MTU mjl7Q+r680iPKQbPHgIq6NeubL0jFw7j94niYX+Hvmhy5klJ4rcXdGs3S0aIrw== 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 4Tx0T2416Lz15lj; Fri, 15 Mar 2024 10:13:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42FADgCS024293; Fri, 15 Mar 2024 10:13:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42FADgbD024290; Fri, 15 Mar 2024 10:13:42 GMT (envelope-from git) Date: Fri, 15 Mar 2024 10:13:42 GMT Message-Id: <202403151013.42FADgbD024290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: e1341e5318a8 - stable/13 - stable/13 sbin/mount_nullfs: Resolve conlict in man page List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e1341e5318a8f6b2a2712fae799cb5c59194ea03 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e1341e5318a8f6b2a2712fae799cb5c59194ea03 commit e1341e5318a8f6b2a2712fae799cb5c59194ea03 Author: Konstantin Belousov AuthorDate: 2024-03-15 10:10:46 +0000 Commit: Konstantin Belousov CommitDate: 2024-03-15 10:12:51 +0000 stable/13 sbin/mount_nullfs: Resolve conlict in man page Reported by: Seigo Tanimura Pointy hat to: kib --- sbin/mount_nullfs/mount_nullfs.8 | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/sbin/mount_nullfs/mount_nullfs.8 b/sbin/mount_nullfs/mount_nullfs.8 index 759f7546c49a..ed35ae310e63 100644 --- a/sbin/mount_nullfs/mount_nullfs.8 +++ b/sbin/mount_nullfs/mount_nullfs.8 @@ -90,17 +90,6 @@ flag followed by a comma separated string of options. See the .Xr mount 8 man page for possible options and their meanings. -<<<<<<< HEAD -||||||| parent of 4a2a69c4472c (mount_nullfs(8): document -o cache and vfs.nullfs.cache_vnodes) -Additionally the following option is supported: -.Bl -tag -width indent -.It Cm nocache -Disable metadata caching in the null layer. -Some lower-layer file systems may force this option. -Depending on the access pattern, -this may result in increased lock contention. -.El -======= Additionally the following option is supported: .Bl -tag -width nocache .It Cm nocache @@ -111,7 +100,6 @@ this may result in increased lock contention. .It Cm cache Force enable metadata caching. .El ->>>>>>> 4a2a69c4472c (mount_nullfs(8): document -o cache and vfs.nullfs.cache_vnodes) .El .Pp The From nobody Fri Mar 15 17:33:25 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TxBDf6SCrz5Dpmc for ; Fri, 15 Mar 2024 17:33:38 +0000 (UTC) (envelope-from freebsd@oldach.net) Received: from nuc.oldach.net (hmo.in-vpn.de [IPv6:2001:67c:1407:60::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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "hmo.in-vpn.de", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TxBDd5kd6z4qHT for ; Fri, 15 Mar 2024 17:33:37 +0000 (UTC) (envelope-from freebsd@oldach.net) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@oldach.net designates 2001:67c:1407:60::1 as permitted sender) smtp.mailfrom=freebsd@oldach.net Received: from nuc.oldach.net (localhost [127.0.0.1]) by nuc.oldach.net (8.18.1/8.18.1) with ESMTPS id 42FHXPMx046236 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Fri, 15 Mar 2024 18:33:25 +0100 (CET) (envelope-from freebsd@oldach.net) Received: (from hmo@localhost) by nuc.oldach.net (8.18.1/8.18.1) id 42FHXPrI046235; Fri, 15 Mar 2024 18:33:25 +0100 (CET) (envelope-from freebsd@oldach.net) Message-Id: <202403151733.42FHXPrI046235@nuc.oldach.net> Subject: Re: git: db4429d00f0d - stable/13 - linux: require vnet(9) context in ifname_bsd_to_linux_name() In-Reply-To: <202403111612.42BGCrZd000296@gitrepo.freebsd.org> from Gleb Smirnoff at "11 Mar 2024 16:12:53" To: glebius@FreeBSD.org (Gleb Smirnoff) Date: Fri, 15 Mar 2024 18:33:25 +0100 (CET) Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: freebsd@oldach.net (Helge Oldach) X-No-Archive: Yes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable X-Greylist: inspected by milter-greylist-4.6.4 (nuc.oldach.net [0.0.0.0]); Fri, 15 Mar 2024 18:33:25 +0100 (CET) for IP:127.0.0.1 DOMAIN:localhost HELO:nuc.oldach.net FROM:freebsd@oldach.net RCPT: X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.28 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.98)[-0.976]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; ASN(0.00)[asn:29670, ipnet:2001:67c:1400::/45, country:DE]; MIME_TRACE(0.00)[0:+]; FROM_NO_DN(0.00)[]; MISSING_XM_UA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; MLMMJ_DEST(0.00)[dev-commits-src-branches@FreeBSD.org]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DMARC_NA(0.00)[oldach.net]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4TxBDd5kd6z4qHT Gleb Smirnoff wrote on Mon, 11 Mar 2024 17:12:53 +0100 (CET): > The branch stable/13 has been updated by glebius: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3Ddb4429d00f0d95a1532f8707f8= b828a744586dc7 >=20 > commit db4429d00f0d95a1532f8707f8b828a744586dc7 > Author: Gleb Smirnoff > AuthorDate: 2024-03-03 20:56:58 +0000 > Commit: Gleb Smirnoff > CommitDate: 2024-03-11 16:12:36 +0000 >=20 > linux: require vnet(9) context in ifname_bsd_to_linux_name() > =20 > This function is used by netlink(9) only. The netlink(9) taskqueue t= hread > runs in the vnet of the socket whose request the thread is processing > right now. This is a correct vnet and resetting it to vnet0 is incor= rect. > If the function is to be used by any other caller in addition to > netlink(9), it would be caller's responsiblity to provide correct vne= t(9). > =20 > Reviewed by: melifaro, dchagin > Differential Revision: https://reviews.freebsd.org/D44191 > PR: 277286 > =20 > (cherry picked from commit 2f5a315b307447f91891c96fb23c7333fa406f2f) > --- > sys/compat/linux/linux.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/sys/compat/linux/linux.c b/sys/compat/linux/linux.c > index 6191372b6312..141fa715c7c1 100644 > --- a/sys/compat/linux/linux.c > +++ b/sys/compat/linux/linux.c > @@ -250,14 +250,14 @@ ifname_bsd_to_linux_name(const char *bsdname, char = *lxname, size_t len) > struct ifnet *ifp; > int ret; > =20 > + CURVNET_ASSERT_SET(); > + > ret =3D 0; > - CURVNET_SET(TD_TO_VNET(curthread)); > NET_EPOCH_ENTER(et); > ifp =3D ifunit(bsdname); > if (ifp !=3D NULL) > ret =3D ifname_bsd_to_linux_ifp(ifp, lxname, len); > NET_EPOCH_EXIT(et); > - CURVNET_RESTORE(); > return (ret); > } This bails out when option VIMAGE is not included: =3D=3D=3D> linux (all) =3D=3D=3D> linux64 (all) =3D=3D=3D> linux_common (all) cc -target x86_64-unknown-freebsd13.3 --sysroot=3D/usr/obj/usr/src/amd64.am= d64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -O2 -pipe -fno-common = -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -DKLD_TIED -nostdinc = -DHAVE_KERNEL_OPTION_HEADERS -i= nclude /usr/obj/usr/src/amd64.amd64/sys/HMO/opt_global.h -I. -I/usr/src/sys= -I/usr/src/sys/contrib/ck/include -fno-common -g -fno-omit-frame-pointer -= mno-omit-leaf-frame-pointer -fdebug-prefix-map=3D./machine=3D/usr/src/sys/a= md64/include -fdebug-prefix-map=3D.= /x86=3D/usr/src/sys/x86/include -I/usr/obj/usr/src/amd64.amd64/sys/HMO = -MD -MF.depend.linux.o -MTlinux.o -mcmodel=3Dkernel -mno-red-zone -mno-mmx= -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fwr= apv -fstack-protector -Wall -Wstr= ict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wn= o-pointer-sign -D__printf__=3D__freebsd_kprintf__ -Wmissing-include-dirs -f= diagnostics-show-option -Wno-unknown-pragmas -Wno-error=3Dtautological-comp= are -Wno-error=3Dempty-body -Wno-er= ror=3Dparentheses-equality -Wno-error=3Dunused-function -Wno-error=3Dpointe= r-sign -Wno-error=3Dshift-negative-value -Wno-address-of-packed-member -Wno= -error=3Darray-parameter -Wno-error=3Ddeprecated-non-prototype -Wno-error= =3Dstrict-prototypes -Wno-error=3Dunused-but-se= t-variable -Wno-error=3Dunused-but-set-variable -Wno-format-zero-length -= mno-aes -mno-avx -std=3Diso9899:1999 -c /usr/src/sys/compat/linux/linux.c = -o linux.o /usr/src/sys/compat/linux/linux.c:253:2: error: call to undeclared function= 'CURVNET_ASSERT_SET'; ISO C99 and later do not support implicit function d= eclarations [-Werror,-Wimplicit-function-declaration] 253 | CURVNET_ASSERT_SET(); | ^ 1 error generated. *** Error code 1 Stop. make[4]: stopped in /usr/src/sys/modules/linux_common *** Error code 1 Stop. make[3]: stopped in /usr/src/sys/modules *** Error code 1 Stop. make[2]: stopped in /usr/obj/usr/src/amd64.amd64/sys/HMO *** Error code 1 Stop. make[1]: stopped in /usr/src *** Error code 1 Stop. make: stopped in /usr/src IMHO same behaviour with 14. Kind regards Helge From nobody Fri Mar 15 17:59:08 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TxBp43Mknz5DrhP; Fri, 15 Mar 2024 17:59: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TxBp42PVpz4rhf; Fri, 15 Mar 2024 17:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710525548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VjBofwAlXEtry7AOyN/rUpsDLjL0R7phNOaj++K5DGg=; b=EF9qIdpUzpwd+rV7foZxksTJPjTDqqsqTn5se76rT/yMb0x/Q9grRzytVTojX0xqlAEfBa PYNbyrgRYTErheqh16w3eTUqDmwAYUfD5XNLlsXm45dEfzGUiSe6u5RtwA5IiK0Kbw12lR zdeZlG/glzrvL8O+EMdcku+3YuM2IVEN/VR7dEbyHFJcu/G16GPvEAbZWr8MvOMZ9VxKN5 ZBw+Wi53vqzz1pueOSQwccz2eF2AN76DMctuixrltKYSrUkhmfBizUmYOHQR40YeBkcpLG i5MV+70Lbob24FaaAdi2878VBIdj5Fyt66gmxXv/5zu/D3ZbucHWazRaKeU7VQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710525548; a=rsa-sha256; cv=none; b=tStQLqe8up9ORW4wNUsA/UrkvHPakBJQ7xgBCMTTt/wdx13nEFHpuprys8r8MNPfHfpKOh qkeFpP40W0pjiatkEDmjIHzrqKYRFrO+tlsnpNIHgmLlYa0cGVO1Nx0a+4lj4Uz4iTJpod vSSUEp17R68CrjbEir0JBGigVUbZZCa0WxbNFbMC465HENyur7W4OOt2gu5vPZ5cn5sVcw v42apKNRQ0aMMrAVnN3Kiyel5+yB/czkmoE3nUMEmqZbM1FUxgM4xkyQp/EFZaS9lhStFu x1dkf0JS695gcIBrnKLKO4FnvYlyzhNo+Mqzm2d8cokCflnf470UzpBsduiqRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710525548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VjBofwAlXEtry7AOyN/rUpsDLjL0R7phNOaj++K5DGg=; b=HraOamGspNq/bTyOMIsO6c7SblO4scvpPCm7etFJ1fKsqs20EIUSl3WqvJaPrUeXpx6rry OkN8BDcxOtQ9Cj0L3+FosTBK4qeIIl47ms0JSXOKNrtIZj6aXDdIzslB7FAOtgb48XnTSa eIG9WGp65ErEOuGm2w/hXJ1PcZO0+mIqpzWzBjVzof8WaMQ3KRi3stHDdmbVGnw0ijkuh3 /KApwmlj9Nr+h79hGMMXzErsNMpMy533asksnCrSSLhOndeksOomx/cAhqWn3Zd7t1T9a1 EvML/Z0DNz1pxF17B3hpqv64/fgJXaYAQcK/d0wO3zLiX3hz34ap4Lp7FddTFA== 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 4TxBp41tPzzLhh; Fri, 15 Mar 2024 17:59:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42FHx8p1000154; Fri, 15 Mar 2024 17:59:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42FHx8Wi000151; Fri, 15 Mar 2024 17:59:08 GMT (envelope-from git) Date: Fri, 15 Mar 2024 17:59:08 GMT Message-Id: <202403151759.42FHx8Wi000151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gleb Smirnoff Subject: git: d68ccfb4ea2b - stable/13 - vnet: add CURVNET_ASSERT_SET for !VIMAGE List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: d68ccfb4ea2bf5245df1267377c35d9727c38264 Auto-Submitted: auto-generated The branch stable/13 has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=d68ccfb4ea2bf5245df1267377c35d9727c38264 commit d68ccfb4ea2bf5245df1267377c35d9727c38264 Author: Mateusz Guzik AuthorDate: 2022-02-19 21:00:00 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-15 17:58:54 +0000 vnet: add CURVNET_ASSERT_SET for !VIMAGE Reported by: ler Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 430e0e409ce94246bb252cbdddef866fc69dea95) --- sys/net/vnet.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/vnet.h b/sys/net/vnet.h index fb26077e694c..f15669bca61a 100644 --- a/sys/net/vnet.h +++ b/sys/net/vnet.h @@ -399,6 +399,7 @@ do { \ #define CURVNET_SET(arg) #define CURVNET_SET_QUIET(arg) #define CURVNET_RESTORE() +#define CURVNET_ASSERT_SET() \ #define VNET_LIST_RLOCK() #define VNET_LIST_RLOCK_NOSLEEP() From nobody Sat Mar 16 15:16:11 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Txl7c09tGz5F1Kp; Sat, 16 Mar 2024 15:16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Txl7b6kktz4Fy6; Sat, 16 Mar 2024 15:16:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4hsZwcCrG5LqBAdBSPIZcV/A6Piki1x4+vqAsWEBkKM=; b=goYZxSq6uH9i/H+ci9MUAPfoHuKwtHf3S7mMOSpW4gQlLrJXMBXEDlp8OgUL4sLOCo76JY Cr8Mh9ZzZGzWOvQoZTS7o3feUGOu5XU9aZSwz7amtgqCyh6cQFiu8Kn+CoyBurwPDz/gBS cm2qC1RhkNGLFVHUNhqY1WuE0tg6gMbR5tjy+toK/1yzYOf1tcqz9nTnIa2lW1LOkK4Xhu Ol7m+0MWlR1re/S9nz0g/ZlxnLxaDfHFQzAqkCK1JOcn5EpyPwv9/IdrgEcYXRPKArQEGf nTqJDilLNr4xOE2ZEmfcQtAAkRimssNhUSsVaC+59Hr2rELxGHJGQk5kYzAIQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710602171; a=rsa-sha256; cv=none; b=kahYXKoWeN4nVcsq94YLPqY1FyYmj35hDY63s61w6CQkPfbjaWhLwXslGccGCUlsguxxku T3LpJx3LhMMk1ZdmkoWucy36A/C7Lw1mn48F17xg+B86kD+XcLOEeFjb7J8ns91MEpd2pR C25LJmwIqCR0gzXeKMV+dFJWMWt0RJEJDSqNmqHfcyMD3ABCbps6NvApD6yNAO73YeDiwp 4QbJmo4kdsTHxmqvZ2UDyGECq1zoXJPR/bl+fBE9s0zqN72eUnr828mXwyYbBbu09oTyc/ +akFBR1YENTP92aQ7Dffanu3XsYeWUyS3bUwaL3DMhrXddUbQvQX9RsHgdhx1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4hsZwcCrG5LqBAdBSPIZcV/A6Piki1x4+vqAsWEBkKM=; b=w/4J2cbOGdY8lkMvozEQLGMZ5snxpka4PkYehnc5G2E6t638lWSOHA29vcR0mmuBUhZZ6J HfuW4GQsSnCHmO4tvqQMTjRZq1GWPgQR1m38kV3PYjUENSPwKZzCUgON1YlINaGgsScAXa RjyqhbsokABILUgulh+xKo00iDbNSEuf+xtOXavDWdcY98EviQj4cs3C4iGs/0rP0xtWED FSSgRJdKdfJl1djou7sd5lSEPAOxvVsHtm1Kz9SIVH8HF+RLgeinR4KgtPve7MZCyQMnxc BcNNf7udaXlxbN2VfZMaHofNdw1QmWh9EwTNjzqNb/+ExzxSgyx6k9iRGQAxIg== 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 4Txl7b6Kscz110w; Sat, 16 Mar 2024 15:16:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42GFGBFC062504; Sat, 16 Mar 2024 15:16:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42GFGBbt062501; Sat, 16 Mar 2024 15:16:11 GMT (envelope-from git) Date: Sat, 16 Mar 2024 15:16:11 GMT Message-Id: <202403161516.42GFGBbt062501@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 98ee1305b692 - stable/14 - ugen: fix USB_IFACE_DRIVER_ACTIVE after detaching a driver List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 98ee1305b6924675c1dc612dff5f912a5a0d84e1 Auto-Submitted: auto-generated The branch stable/14 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=98ee1305b6924675c1dc612dff5f912a5a0d84e1 commit 98ee1305b6924675c1dc612dff5f912a5a0d84e1 Author: Andriy Gapon AuthorDate: 2024-02-19 10:44:00 +0000 Commit: Andriy Gapon CommitDate: 2024-03-16 15:11:37 +0000 ugen: fix USB_IFACE_DRIVER_ACTIVE after detaching a driver Previosuly, USB_IFACE_DRIVER_ACTIVE would report that the driver is active even after it detached. That's because a device(9) still remains. So, add device_is_alive(9) check for more accurate reporting. Reviewed by: markj (cherry picked from commit 8f374fa528d7643919bca1b4153dde03996305fe) --- sys/dev/usb/usb_generic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/usb_generic.c b/sys/dev/usb/usb_generic.c index d8bc3a828282..c0af27d77e5d 100644 --- a/sys/dev/usb/usb_generic.c +++ b/sys/dev/usb/usb_generic.c @@ -2377,12 +2377,10 @@ ugen_ioctl_post(struct usb_fifo *f, u_long cmd, void *addr, int fflags) break; case USB_IFACE_DRIVER_ACTIVE: - n = *u.pint & 0xFF; - iface = usbd_get_iface(f->udev, n); - - if (iface && iface->subdev) + if (iface != NULL && iface->subdev != NULL && + device_is_alive(iface->subdev)) error = 0; else error = ENXIO; From nobody Sat Mar 16 15:16:12 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Txl7d0wZNz5F1Qq; Sat, 16 Mar 2024 15:16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Txl7d0Qtdz4Fq9; Sat, 16 Mar 2024 15:16:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UYIxytQO0T+OZM/O2PwWZ1zEhwaZKKdiL4kSuOay9ug=; b=EeD9LlCYAj6VvZAJEFxI+0Dz5TYHRhXT9GjfMmUpk3ryO2pV5t0Bgzg3e+5bKFSoyJ+7KC 2Q/WsQ5WdGZSVO7Li8X/H/v8j5Tjxcey0No1Tgi7RCQWFcBYhphhmPu/gRCcexeaqL879D kT6hvO2dYY9Sfu2guiazztTbykn0SE0lRwVvPwTdJKJQik3+g4WM3z6mkIXTv3TEL+Kwpb pXYSw8dB8DZfTb0PLC9txyY0kcTo4CbsqtyhKhgU3M7XHXKy9GNj5o79JRRi6kji5CaJqC NsyUulSCoUkLjuL9pKrDDQGpwhuFmrUzkAvEyxeMAQMnF44XjeDjw9r5tD3Z+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710602173; a=rsa-sha256; cv=none; b=Fyaj08IuT5VwPOEOLuuTzo+z8HaBk3PJJvEu+9kE0sw7bm45RcJoBus1C8UHxPTBej2v40 IIqDQYvMxfxItXskcLFH88c/2mb7neJZmPRpeuiLUWc1hdkqwS+Jh5dJyO2nG4WGOe2loR my3c6n/sKbKLp7W8K5hF8w3ut0GgQjeifLtfzgFbRJ6+QZmv2/RZjmW9wazcvkgTrSJ66b xyLAo0rqhGVKU8A/IPrpZUE9hiIgMo6mnVvaFFwgm8UjMRfZ1N/epAaj0DhYwqszB4LbXo n2sBU1ZT7E6HSJqOfN0qOmmTkkLE7DgOcqphvjbeHoHhE72mimFDipRW91tylA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UYIxytQO0T+OZM/O2PwWZ1zEhwaZKKdiL4kSuOay9ug=; b=GVxxGe6ebJ1sTBVXkrQ0QzJETbEjPjDdzAR03Jaw9HTbS0hWXVc3BLnuC6Zg/hu+6PdFFu 11KauksMJIi3T36W8/qys+tNgYI+aDN7ma/L/e1XJ34kQfpXSX3uTA7dgmtysHWIU5acGo Y3VyScoTIGOHixw481BiO2u/xdup7nyxnZu/mgEfmS4WlLHH++TDV6GTTLG6N7cSQZMFDy EpihPxUmOjOmnSXq49qlCQQQ0ur+st/QOf/sdtBCRCe4ri6B7yXkR0xcez4eq66D/HDdNY nAATWI6jwavKpcW1RHZpw7YVjVhevXCA3RyBZyifKtCtKMgeo1zVn46GyzoGRQ== 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 4Txl7d02ytz10XS; Sat, 16 Mar 2024 15:16:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42GFGC9a062549; Sat, 16 Mar 2024 15:16:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42GFGCqI062547; Sat, 16 Mar 2024 15:16:12 GMT (envelope-from git) Date: Sat, 16 Mar 2024 15:16:12 GMT Message-Id: <202403161516.42GFGCqI062547@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 1269b002038c - stable/14 - rk8xx_poweroff: enable power-cycling on support hardware List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1269b002038cead5af35d3fb94a008060246e5f6 Auto-Submitted: auto-generated The branch stable/14 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=1269b002038cead5af35d3fb94a008060246e5f6 commit 1269b002038cead5af35d3fb94a008060246e5f6 Author: Andriy Gapon AuthorDate: 2024-02-18 13:57:34 +0000 Commit: Andriy Gapon CommitDate: 2024-03-16 15:11:50 +0000 rk8xx_poweroff: enable power-cycling on support hardware Previously, the function would return early if RB_POWERCYCLE was specified without RB_POWEROFF. Those flags are exclusive at the moment, that is, they are never set together. Søren Schmidt (sos) uses a similar but extended patch locally. (cherry picked from commit 8b408fc6f2f6dab2bfc200edee96917abf425cb2) (cherry picked from commit a044cf60bd375f894b371fc87d148bf4704c05a8) --- sys/dev/iicbus/pmic/rockchip/rk8xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/iicbus/pmic/rockchip/rk8xx.c b/sys/dev/iicbus/pmic/rockchip/rk8xx.c index 54f4b289034d..7efa0f879506 100644 --- a/sys/dev/iicbus/pmic/rockchip/rk8xx.c +++ b/sys/dev/iicbus/pmic/rockchip/rk8xx.c @@ -109,7 +109,7 @@ rk8xx_poweroff(void *arg, int howto) int error; uint8_t val; - if ((howto & RB_POWEROFF) == 0) + if ((howto & (RB_POWEROFF | RB_POWERCYCLE)) == 0) return; device_printf(sc->dev, "Powering off...\n"); From nobody Sat Mar 16 15:16:13 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Txl7f44tTz5F1NN; Sat, 16 Mar 2024 15:16:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Txl7f16ZVz4G1Q; Sat, 16 Mar 2024 15:16:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hXHkl9TgHquos59pwF1hb6O//9sIkJ0fJ4xpM4X1WAk=; b=dZSgGb3X30Se6WWSbDHcGyAT9YT4nmcPhFXsGFFYzeEPlypnpJJ+K57eOTBa2CNffs+QJO 3HbNTnz2+zkcACQgLLyvh/7ZKFmXOHwQyPiFTCoOQtw6wgqnm4uMyEqYRAVfpwpHD7aA0E lRStW2kgjPx0JsetEg9/Aq1LxZJXieiA/c0UcY2fQXuYI3gWm7BVFG7vFZYSula1sQ8pAM cl5e6VdTANv+khSSV/ir8HfQgHI1VRvrwdKN6tUsUlN7fTydOmbbMVO4TxP+uqvNFWJJrX VWQLHf+IM9ScNEZpvixxScvAlzlXRvU3BCki+V48hhr8YRSgwIUO7z+ccVCIRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710602174; a=rsa-sha256; cv=none; b=YSm/202TXLmaMcLsYr/3R1HPolJ9ym/G51xfu+x4hD1c6k5Rq3cmfTY+bAzJMePoRmVtT8 ohFWCSgOX0OsrQdBIaIZ7hzwakHIxGVryyrIvokbRa4TvtgTSnqqSKVo8l9gzI7wmKVV/W 2ClP1DAedToEFQv1+kopExXGm6n4wSh9CcK2qq8chrbntrSQ3hFQ1ZQkWHPS2a6a8BGX8C KTYGtSVPxD5SNquzxbAD/8uAysI61Q+WTTcg20HghkgQ0uQEdVEIHr7Hb+BgF4d31c1G6q aPEwy+5cq7anRtA4ZbBTyvUlWh0M7wC0vcuqj7MhKA5x62H0TzknSZKud1Gp9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hXHkl9TgHquos59pwF1hb6O//9sIkJ0fJ4xpM4X1WAk=; b=ed9wjJ7n+G5KMuqit2VbDVKTneJiYUxtCpNLmlbkqT+O2CdME6SrU66YqNTx/TlFQIHJRP up7f0fzoHjd7+j4v2au/N9CH4qKQdfLe5+vWsSxNz6DQvzyW3t9mIVt/wtghn++H5bol1s OVf2o3NChEPaWVXaj4m0ZImEVSLclMwvc6fYu10NvPednCFfBL5xFGjrQxhE5R4yFy/Txm GXELod9kTFrM3tw7XWqccMJukiiCEA8wfGigwZ5Y8DLO4/aJ4OjXq7CRB1RgFlCPIE1uEO 34JXlTelsXKpr4dPrXTx7Ox/csa2TZ3+glmScSusMjsq3HJd/RWLSpYfmX0Pxw== 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 4Txl7f0hPTz10V8; Sat, 16 Mar 2024 15:16:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42GFGD0D062609; Sat, 16 Mar 2024 15:16:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42GFGDkl062606; Sat, 16 Mar 2024 15:16:13 GMT (envelope-from git) Date: Sat, 16 Mar 2024 15:16:13 GMT Message-Id: <202403161516.42GFGDkl062606@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 50aa22323424 - stable/14 - scsi_da: add 4K quirks for Samsung SSD 860 and 870 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 50aa22323424ccea00ef5d8f24e729a480cc77eb Auto-Submitted: auto-generated The branch stable/14 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=50aa22323424ccea00ef5d8f24e729a480cc77eb commit 50aa22323424ccea00ef5d8f24e729a480cc77eb Author: Andriy Gapon AuthorDate: 2024-02-19 10:16:47 +0000 Commit: Andriy Gapon CommitDate: 2024-03-16 15:12:53 +0000 scsi_da: add 4K quirks for Samsung SSD 860 and 870 Although the actual flash page size is either 8K or 16K for those devices (according to different sources of various reliability), they seem to be optimized for the "industry-standard" emulated 4K block size. To do: consolidate very similar Samsung SSD entries for 830 - 870 models. (cherry picked from commit b7dce5b8e988f47784c55aa096541deda7b1aaeb) --- sys/cam/scsi/scsi_da.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index df44d2279fbe..ae691520e157 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -1396,6 +1396,22 @@ static struct da_quirk_entry da_quirk_table[] = { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Samsung SSD 850*", "*" }, /*quirks*/DA_Q_4K }, + { + /* + * Samsung 860 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Samsung SSD 860*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* + * Samsung 870 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Samsung SSD 870*", "*" }, + /*quirks*/DA_Q_4K + }, { /* * Samsung 843T Series SSDs (MZ7WD*) From nobody Sat Mar 16 15:16:15 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Txl7g3Z64z5F1HR; Sat, 16 Mar 2024 15:16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Txl7g24H2z4Fvh; Sat, 16 Mar 2024 15:16:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R/bPLA0Seq9ghF7eo1wS4XbR1q6FsBuN/VZVWqKsyL8=; b=o+EweDt4APCtfxBUi5+lbb5rXIarB8jKkaQzzO++TaaO12ojNav3emc59Di5l1/vS+F2m+ m91z0Q4mjaGO+02aZsbeCujh9wYG1fCTuw89wBQlxUA/bY6/XOfr4gpLI6QJ9PqA9xVIUq 5dVmvU38SJFRF+yJZLyqmLoxHU8k4jeTmxA18zhfJw+f7jQCOynetUnUS2wN6FGyihueCw 8UFvo5ODdQM6AQvzCh5VCJJ413aOikKdJyq6yk83huNYcULBdVVHkgbRue+IB/Kb1FCDYe c3b3wPgbX2m4XiP8Ugu6vAs+sIzA2/luS1klNAXlbVd7jjpqyA01gSGQcfsnqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710602175; a=rsa-sha256; cv=none; b=bev0gJzEOxRiTcA9/av/12f462vL1k49nmeOeZZhCvCFef7gX50/gcPQeK4V6qR6eJEAuC gJXIbI3XK4B3H0tJKIybz6UBbtiFWJAt0OJPeMe4veoSRvqPVJOx5qmuMndehnXJtBT20d Ms6wqWTMIEUkdHhk9yOPn9c9jDIPNof0n9uZl55KGgkFUA12pJfJgORsOL5N1qU91IlWbk LQGqOZ6hkyKWnfh1DdKJ+/3o21MxBonlRIlMB0yfHBkGKHbaHOeL34nwMX1KGUlpYb63n7 k4ruASs5Q39wupLQhhx13SO6j/sMeNPOI695mKniM8C1xgEXAgK7YOODx/D/lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R/bPLA0Seq9ghF7eo1wS4XbR1q6FsBuN/VZVWqKsyL8=; b=Lg8B8ijjnpm/kw55fG6FZgH4iCwlhW3k0qxvRSzW7GYU1bW4JWM0R3FbCtxNYCUL+BOdUW cSMrfBIaW0x+3uXGJsZOaiTfgpu1nqNirpOnl+wZFjtxXT7dZdAOs17Kj1nmcy31Ntlpbg am+il0GLRMZtU14diF06Go1X30td1/g7DPuY1Gsj+eMJ3yRkLMby4wn6svtTKVvbuVDeNP JqVOQ/4uhHdFafcCu2rpC4r6oTjIXEI16XeNXh3M41toYmsWT4nOYdxoGt/HTjRpW/2LEq u12+XIjA2N76smqINoAkmXYsUnEB+XxAO1xdQA9jMZrj6X0ehv05sAf3fD36Ew== 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 4Txl7g1bRkz106J; Sat, 16 Mar 2024 15:16:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42GFGFZe062669; Sat, 16 Mar 2024 15:16:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42GFGFZu062666; Sat, 16 Mar 2024 15:16:15 GMT (envelope-from git) Date: Sat, 16 Mar 2024 15:16:15 GMT Message-Id: <202403161516.42GFGFZu062666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: bf11fee6a5cf - stable/14 - ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bf11fee6a5cf97102f87695185cadb63d5a2a7de Auto-Submitted: auto-generated The branch stable/14 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=bf11fee6a5cf97102f87695185cadb63d5a2a7de commit bf11fee6a5cf97102f87695185cadb63d5a2a7de Author: Andriy Gapon AuthorDate: 2024-02-19 10:08:12 +0000 Commit: Andriy Gapon CommitDate: 2024-03-16 15:13:27 +0000 ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs NCQ TRIM for Samsung 860/870 SSDs results in data corruption on systems with some SATA controllers. This can be easily reproduced using ZFS which uses TRIM and is able to detect block content changes. Linux bug report for this issue: https://bugzilla.kernel.org/show_bug.cgi?id=201693 Since at present we can not limit a quirk based on the contorller / SIM, apply the quirk in all cases. Reviewed by: imp (cherry picked from commit c01af41c3c8fdd570764ff9b6bfbad6ac9ca1664) --- sys/cam/ata/ata_da.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index fc4dc91f9d54..6338d62577da 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -728,6 +728,22 @@ static struct ada_quirk_entry ada_quirk_table[] = { T_DIRECT, SIP_MEDIA_FIXED, "*", "Samsung SSD 850*", "*" }, /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN }, + { + /* + * Samsung 860 SSDs + * 4k optimised, NCQ TRIM broken (normal TRIM fine) + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Samsung SSD 860*", "*" }, + /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN + }, + { + /* + * Samsung 870 SSDs + * 4k optimised, NCQ TRIM broken (normal TRIM fine) + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Samsung SSD 870*", "*" }, + /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN + }, { /* * Samsung SM863 Series SSDs (MZ7KM*) From nobody Sat Mar 16 15:16:16 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Txl7h621Hz5F1Qv; Sat, 16 Mar 2024 15:16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Txl7h35F3z4Fyp; Sat, 16 Mar 2024 15:16:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1c9Vsr56Ifzw0ezQ+oNp/aMXX3G8WYdOyMVRs7+J37E=; b=OrEVbRG1+TnKhHpUgGKvBN8IIAmXQapud3wT6XqgtJV50OM1qr1jmNQZMeNK7Z+kGy8O18 csZWkM2QwHisVLWc1VxiWlSLLZAGy5zfxgIRNU01rN4A4dnWPw7hELdGCTLQQMTgRlNIk6 gGZ+LRr18qZhMH9P3G4rx+++oxNhJnlfwIN4Vy9AXN75wQEKbvy3BkSJtdyq4TbfJZ2M4R RbaBn5GNbA5j9tUsp/7WvuRNF9Yi6NPo4GoA2lbihyX5tS2N3AcffajBeiVxnvNsRM1nrP T/JMszI35ZKwUrDOIThUrY/CdVK2yRYg1gWn1/1YAwMEQzQ853AteHawGAATyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710602176; a=rsa-sha256; cv=none; b=SwyTKAXQuH2DNicHiog/lt6/THOMHhg6IPivgZRfK29dzTFKWxTQTF8fnx/6wcB1sDYGw9 c646GIWRmQb2VpBhXYnOdHKY08QJO+Ut5lQT3Ia7XVaN/nhUBqp3VUgs95EXpyACspnBPh jCCsw29OSpRxvCRNeHskKAA/TtKD5wZZTvg13NwaCuSEJG41Cx/rlkD3BGPusQlHfOAHoL Kxkcw9EngmF4nm97wY7Kdct+euBSuBB5aNNr7F2Lk7b9Lh+OpLX8ySD6YhTUWCqdJmgFbJ OaMFq8PjZKiKqS4EhRjDo3l1JfCg/A5nZJsdjJZnZ6Feg6uD+ukH2Q9TsquqPw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1c9Vsr56Ifzw0ezQ+oNp/aMXX3G8WYdOyMVRs7+J37E=; b=USZ2AsDdKtdm4PgwZIdpHFcXZXQ44DHduiA38VsXn9rBpMx0no5/e/43+lTJnwSq2v+7iq QwK0jIXBa0GxR13wJEK+rirkH4+fHaAjfqJnW1LsxIwHGplg1sD52mHUtS36mLVFDT5lRl 1cLQPfLSjOuAftqhZhzbNOTtg3VwJ2E+u9BB8ODoKkfAL82kPWc2GiZ/iGBZSi02B9dlsl D4XSloqkRQhwsZzdLqIaOv4nHdVNwAhgKRJSUWlS4caX8VOqQHgTOWf4wD+t9v4FPTNen8 H/24hM0TdSVbAruNwuc06qSiGyhrBMcG+lnBbzSXEjHcfDS74LS2jkJFX4QFFw== 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 4Txl7h2cDrz10xk; Sat, 16 Mar 2024 15:16:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42GFGG7R062717; Sat, 16 Mar 2024 15:16:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42GFGGXQ062714; Sat, 16 Mar 2024 15:16:16 GMT (envelope-from git) Date: Sat, 16 Mar 2024 15:16:16 GMT Message-Id: <202403161516.42GFGGXQ062714@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 721b91d1715e - stable/14 - syscon_power: do reboot after shutdown_panic is executed List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 721b91d1715e3844b0372a2fc42c70853b91fa46 Auto-Submitted: auto-generated The branch stable/14 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=721b91d1715e3844b0372a2fc42c70853b91fa46 commit 721b91d1715e3844b0372a2fc42c70853b91fa46 Author: Andriy Gapon AuthorDate: 2021-07-09 15:00:21 +0000 Commit: Andriy Gapon CommitDate: 2024-03-16 15:14:09 +0000 syscon_power: do reboot after shutdown_panic is executed A syscon_power instance can handle either poweroff or reboot, but not both. If the instance handles reboot then set its priority to be after shutdown_panic. This is to provide uniform experience with other platforms. (cherry picked from commit 5f7312a0d70c607afa9ce24ccd757321d043e02c) --- sys/dev/extres/syscon/syscon_power.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/extres/syscon/syscon_power.c b/sys/dev/extres/syscon/syscon_power.c index 9626adb52890..201d140963d2 100644 --- a/sys/dev/extres/syscon/syscon_power.c +++ b/sys/dev/extres/syscon/syscon_power.c @@ -162,9 +162,11 @@ syscon_power_attach(device_t dev) OF_getencprop(node, "value", &sc->value, sizeof(sc->value)); } + /* Handle reboot after shutdown_panic. */ sc->reboot = ofw_bus_is_compatible(dev, "syscon-reboot"); sc->shutdown_tag = EVENTHANDLER_REGISTER(shutdown_final, - syscon_power_shutdown_final, dev, SHUTDOWN_PRI_LAST); + syscon_power_shutdown_final, dev, + sc->reboot ? SHUTDOWN_PRI_LAST + 150 : SHUTDOWN_PRI_LAST); return (0); } From nobody Sat Mar 16 15:16:17 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Txl7j5KKmz5F1NQ; Sat, 16 Mar 2024 15:16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Txl7j42cPz4G22; Sat, 16 Mar 2024 15:16:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Aoep055t7EaQYxYCch5ohJP6OlR0YbNzps5najm4vU=; b=OTb201w2JV0N0xH/cIWYRTThDOMspzwMgiABrAKxiQ69aOOartwPejQt1yFmIN1NLSeugX POAuNhMQja3DzHRsKg5bMPrqevb1MTNugwnZsT79vU0rSCJKXPdXBQMoTD6QDhsUgHr8WN T+JeQ+iKj2z88N632KXQeONS+yP0BkNlGPL5pXiRcyoEhrsFOFdw7eFbAq0fTW5yIUa6N/ YrQcnlTWZ2wwQ8DvnammsXCN6cMaWmJJJ75vHvICp4qYH2DgwA/gMxgfY2s7IFK6ZK5Vmd iXsHbXbJ9m09fmUHmnIwJt3shdZ9cnzZLWbi0OWkPVAMyECNoZCUg9+trPymzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710602177; a=rsa-sha256; cv=none; b=vIaQ+TU5wp0qSo8ARm3heXXXTAa5Q0AfSiCmoUpxO1b5jwju5qaoXliTFFZEd2ahsAqQ2P bgwD9zitMIiZJeYfEVHyzXndKuXN1mrTGpFil7r73gYQ/M30C3/cFF6FwfBA1flTI99DYY P2Edtptm3OiowvQvmjcHISs8Hkf7vprixp1I8eatH8d6XhQITgK7mtwllj9nieTVVmy+9w ptJOrhffn6UHnlVmZaZOxiO1DStvIkYNdU5G6KZ1UcfolRsTeb2A3RBWTbAnha+UfX+FnR OWHRErud84S+537AQDLTDZD4TSW+slmOX38w1aCMsuTYXjHZcy8bAHp7WaOgXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/Aoep055t7EaQYxYCch5ohJP6OlR0YbNzps5najm4vU=; b=DUS8MWg9zaGwYjQ9N0xhkI24ChLaQm+Z/simjxRwjmc1R86imj3R2CVB/8ylRiNcmpKdSd rt5XbI7vepvx/hCA+UvvOjPd+sxVZSErvGQczqAwOeoN5b73xmMd7jJO9sKJQVwLs5y/fi P5wZsQYe62TmIqHmfWGhQV9q+vxV1np6eNnDOiI0n8hBdiPgcrOk6fiA4WjtUKo1PUKNrZ U9+aERbS2sJxRbJuAZwS9FzJv4F38CUZSWad2BGFh9NCSgFpC8KUU3Rg2pexYmzD3Bp+CV OgrmIWgO8zZdEsvxh2RJCtNlZ7C065xiwy1PO8RGq7xjl/XPc7glsaMw30y9Ew== 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 4Txl7j3fp8z10Qr; Sat, 16 Mar 2024 15:16:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42GFGHv4062769; Sat, 16 Mar 2024 15:16:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42GFGHQh062766; Sat, 16 Mar 2024 15:16:17 GMT (envelope-from git) Date: Sat, 16 Mar 2024 15:16:17 GMT Message-Id: <202403161516.42GFGHQh062766@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 0cb72c25b01a - stable/14 - psci: split off psci_reboot from psci_shutdown List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0cb72c25b01aadb3c6fdd62e58e5c89cdd1b855f Auto-Submitted: auto-generated The branch stable/14 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=0cb72c25b01aadb3c6fdd62e58e5c89cdd1b855f commit 0cb72c25b01aadb3c6fdd62e58e5c89cdd1b855f Author: Andriy Gapon AuthorDate: 2021-07-09 15:01:57 +0000 Commit: Andriy Gapon CommitDate: 2024-03-16 15:14:41 +0000 psci: split off psci_reboot from psci_shutdown Priority of psci_reboot set so that it is run after shutdown_panic is executed. This is to provide uniform experience with other platforms. (cherry picked from commit 0f354b2b588b60e2ef119ff2f480f7905c5db587) --- sys/dev/psci/psci.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/sys/dev/psci/psci.c b/sys/dev/psci/psci.c index 46d7a2f07181..4fd1cd62ed8c 100644 --- a/sys/dev/psci/psci.c +++ b/sys/dev/psci/psci.c @@ -124,7 +124,6 @@ static struct ofw_compat_data compat_data[] = { #endif static int psci_attach(device_t, psci_initfn_t, int); -static void psci_shutdown(void *, int); static int psci_find_callfn(psci_callfn_t *); static int psci_def_callfn(register_t, register_t, register_t, register_t, @@ -468,12 +467,24 @@ psci_shutdown(void *xsc, int howto) if (psci_softc == NULL) return; - /* PSCI system_off and system_reset werent't supported in v0.1. */ if ((howto & RB_POWEROFF) != 0) fn = psci_softc->psci_fnids[PSCI_FN_SYSTEM_OFF]; - else if ((howto & RB_HALT) == 0) - fn = psci_softc->psci_fnids[PSCI_FN_SYSTEM_RESET]; + if (fn) + psci_call(fn, 0, 0, 0); + + /* System reset and off do not return. */ +} +static void +psci_reboot(void *xsc, int howto) +{ + uint32_t fn = 0; + + if (psci_softc == NULL) + return; + + if ((howto & RB_HALT) == 0) + fn = psci_softc->psci_fnids[PSCI_FN_SYSTEM_RESET]; if (fn) psci_call(fn, 0, 0, 0); @@ -484,7 +495,7 @@ void psci_reset(void) { - psci_shutdown(NULL, 0); + psci_reboot(NULL, 0); } #ifdef FDT @@ -582,6 +593,10 @@ psci_v0_2_init(device_t dev, int default_version) EVENTHANDLER_REGISTER(shutdown_final, psci_shutdown, sc, SHUTDOWN_PRI_LAST); + /* Handle reboot after shutdown_panic. */ + EVENTHANDLER_REGISTER(shutdown_final, psci_reboot, sc, + SHUTDOWN_PRI_LAST + 150); + return (0); } From nobody Sat Mar 16 15:16:37 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Txl8611Xkz5F1NY; Sat, 16 Mar 2024 15:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Txl855gT9z4HBv; Sat, 16 Mar 2024 15:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TxPegUOSbB1GOvLMMVNhyXTDYX/ZEfZ/gJhcvU4aG1I=; b=C+hSZXuzsyacJS6QQNVQAmmQo03MteK87yTyuu3+s45Z4bJFMQvlMZQ/Gi2i2lXKjtExKs xNfCaqIR6riFiKO2dm7oCNuPQWGPiUbEgd8EE3kNpAXiyEznH1N42qtsQoTjSvOksk8wZd TSb0x9BxzHQZ5nLOtiMdN2YM0u2vE9e0fBMLFS0coLyA44mGAj+is4aTxIti7F0SvSFJH9 pli/CHSvaTXkcF/miOWx26PWLs/pEg1u8ERvNBB6TOlYT2GQL8h1EKSGp2JREJs6IUAHf5 9rikRPCnZZLCRcsPYnoPomfwfkOGP8MqVNR4d+VITZdYIH27qYh9wNr2ksY7uQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710602197; a=rsa-sha256; cv=none; b=GN5CYh04QHI1YA0IeyhTN6jPAR/X3ypIGB3dpYDV3kse9rSLXWpGV3ONvvMBo7PMALNv3v Z5Zd76EKB9zfBzVbLs9/W2/P0xBpRSyr8thD1ZLfslQ2OPuOfcL1YH9UdpGx6OCnJ1ZDZL aNlvhfQUR71QaBNelh05PLZ04V9HhkkagJFinfSe0czD7iSQmFgRt96eM7B7e0GHVfhyf6 E8HDxkVnYfJ5JzisaQQf3DvxasAhZDQllr6V0qL8gaAzQZ8wB9rKRet2s771UxHPGPOx/B odJX5gELnq7S9QDO0ScBgxxstuLTGRVL1OE6v4DFnLdq2jdRlaBclScSU7ifQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TxPegUOSbB1GOvLMMVNhyXTDYX/ZEfZ/gJhcvU4aG1I=; b=lqye9WS70czfOaNo2GwqVI+GMILNVDOct7Tw2wrXMsO92tVUSFFiaXLt/ZVE+sj/A8W/Xv vPHZnRQaIbWNS1MYtCDS6NZCjMT9KNe55pwtBDjN4+S/C9t8BdmIfPS39PqQuVK6rmJ/xT ESnkIvAhZQfe6K6eCk1e5lpm44sdPekJDBYq3Gdsb5W92PgO9D9bB+6JwB3Mi/psz3g+XR eAhKvprXrssqnxEN0TwrZjQll0H1/HJpO+LI/aPQ8ksphMBXeEd4mQZuOZnUAlcdq6CuDZ nsiAHZoxIBIFQfoEAE4K5bRS5JBIjGfpqSCLIOZlfv8xQZZJ2kbc0nNmgMyiiQ== 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 4Txl855J4Yz10XT; Sat, 16 Mar 2024 15:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42GFGbkB063032; Sat, 16 Mar 2024 15:16:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42GFGbpU063029; Sat, 16 Mar 2024 15:16:37 GMT (envelope-from git) Date: Sat, 16 Mar 2024 15:16:37 GMT Message-Id: <202403161516.42GFGbpU063029@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 2e88c5c4b426 - stable/13 - scsi_da: add 4K quirks for Samsung SSD 860 and 870 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2e88c5c4b4263d23c16a0a1baee881db83a30773 Auto-Submitted: auto-generated The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=2e88c5c4b4263d23c16a0a1baee881db83a30773 commit 2e88c5c4b4263d23c16a0a1baee881db83a30773 Author: Andriy Gapon AuthorDate: 2024-02-19 10:16:47 +0000 Commit: Andriy Gapon CommitDate: 2024-03-16 15:13:13 +0000 scsi_da: add 4K quirks for Samsung SSD 860 and 870 Although the actual flash page size is either 8K or 16K for those devices (according to different sources of various reliability), they seem to be optimized for the "industry-standard" emulated 4K block size. To do: consolidate very similar Samsung SSD entries for 830 - 870 models. (cherry picked from commit b7dce5b8e988f47784c55aa096541deda7b1aaeb) --- sys/cam/scsi/scsi_da.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index 260db5efd545..5782d414bd42 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -1395,6 +1395,22 @@ static struct da_quirk_entry da_quirk_table[] = { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Samsung SSD 850*", "*" }, /*quirks*/DA_Q_4K }, + { + /* + * Samsung 860 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Samsung SSD 860*", "*" }, + /*quirks*/DA_Q_4K + }, + { + /* + * Samsung 870 SSDs + * 4k optimised & trim only works in 4k requests + 4k aligned + */ + { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "Samsung SSD 870*", "*" }, + /*quirks*/DA_Q_4K + }, { /* * Samsung 843T Series SSDs (MZ7WD*) From nobody Sat Mar 16 15:16:36 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Txl850wHxz5F1HW; Sat, 16 Mar 2024 15:16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Txl845B3Fz4H8K; Sat, 16 Mar 2024 15:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IybmJIhCuD1cUAV7s9WZnaH8nLHErZMa84RHG0nZmMQ=; b=TRsE6oe9YEOFFR/uGFxgh+rbdEjD7mASy1HQ3wcq0u3RoBmCyx4x4RJJyFOWuwpuAISf0U a/620Y8Yw3T25SWWui82nOCisgs5taX9vxmnMsHaP8uYg18ao2TODzy+7JEesbL33iuqru AhN1Q7mfPKm6znLW6S0d8BdonijAT99Ew0kNgcQ1N764pjGX0O4bIDU28ZGAyUxdekTUQM 5Ho40NkvW/rOIR5UYcyNr3aiPJlmpeKQ3IbsrbIKwCNNYuZ90LpyCfCAsnTamLXW4ROAtP xrafSMBS7Ua+iZvMB3JqDDJ0kbad/h6lj+d5EZY6ZQU202QXeUDHZjpBnT3kVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710602196; a=rsa-sha256; cv=none; b=ldVncprmIjAw/qOfJFe6pV84glE51WPi1a5dYbE4TRPD6MsgjYjbhpTNrdmJKS06rz6fps yt2eqivv0f6OMjjGrCSBoqQqFclC+KlPoJjo+QF2e8UmZerGB0xWIagh0+l7ucglRBquUo vN5Jh2opdAZ+gDMqduME4r2HwN9INIDG1FdWy2cw0SZbO3lQW6OdIO5U8mMoqMVVcK7b+U Ibi0TGafphiwreHAJm9KeRB0Qvv/fyE8X+SJDY8lHpbP075uHdky0cjlb3HfHovu4Ar6w0 5+sCjHI//8c3lx9ajgxQDbgsHMp5yXi1m/XcYTKRs7+kgU7DDoK3ApYlLuH0EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IybmJIhCuD1cUAV7s9WZnaH8nLHErZMa84RHG0nZmMQ=; b=YipD+WoAT6hRiLYMeG59evPFMpdTAtZRciFJK8838VtI8tOdcIMc3YmyZ+zJoggZYLDm3L U7zJjwQSZcsvbunwyB63xFqyv5VdgkntplJrQ0SetcrdCknC9geS53tujL08eu/i7WPOab RmKT+FQFgw3RM88D6tyWtmw5ntgZdUnZg07jLKtvPLu1SjRrjwj6KUW8RLbj1afKJIWHyh zEq4PLdOgKOyd5tPa3OcpqrF9iscF0nP63tQHkIQR5F7pmviHaoXocxzb8U9AWuMtNYEtM 4ocTZWOlwvOwBeEMzb7iskGOFEFwSmtMBR3Rxw0ub0M+kNltOZkpvPk68du/Bg== 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 4Txl844S3Lz10p7; Sat, 16 Mar 2024 15:16:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42GFGaSJ062974; Sat, 16 Mar 2024 15:16:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42GFGa06062971; Sat, 16 Mar 2024 15:16:36 GMT (envelope-from git) Date: Sat, 16 Mar 2024 15:16:36 GMT Message-Id: <202403161516.42GFGa06062971@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 5578ace4a174 - stable/13 - ugen: fix USB_IFACE_DRIVER_ACTIVE after detaching a driver List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5578ace4a174e6f6e4bce39f22472959cd4e745c Auto-Submitted: auto-generated The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=5578ace4a174e6f6e4bce39f22472959cd4e745c commit 5578ace4a174e6f6e4bce39f22472959cd4e745c Author: Andriy Gapon AuthorDate: 2024-02-19 10:44:00 +0000 Commit: Andriy Gapon CommitDate: 2024-03-16 15:09:30 +0000 ugen: fix USB_IFACE_DRIVER_ACTIVE after detaching a driver Previosuly, USB_IFACE_DRIVER_ACTIVE would report that the driver is active even after it detached. That's because a device(9) still remains. So, add device_is_alive(9) check for more accurate reporting. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43960 (cherry picked from commit 8f374fa528d7643919bca1b4153dde03996305fe) --- sys/dev/usb/usb_generic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/usb/usb_generic.c b/sys/dev/usb/usb_generic.c index 1086e3daa0a6..6e5a00d37d4b 100644 --- a/sys/dev/usb/usb_generic.c +++ b/sys/dev/usb/usb_generic.c @@ -2377,12 +2377,10 @@ ugen_ioctl_post(struct usb_fifo *f, u_long cmd, void *addr, int fflags) break; case USB_IFACE_DRIVER_ACTIVE: - n = *u.pint & 0xFF; - iface = usbd_get_iface(f->udev, n); - - if (iface && iface->subdev) + if (iface != NULL && iface->subdev != NULL && + device_is_alive(iface->subdev)) error = 0; else error = ENXIO; From nobody Sat Mar 16 15:16:39 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Txl881YMVz5F1Ff; Sat, 16 Mar 2024 15:16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Txl880VyBz4HCV; Sat, 16 Mar 2024 15:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kpgeZZ/GMfKF2/CUXXsfksIo5IyIGpq2JAZAhdw7x8c=; b=MRV6KXel5ZvGtWpFoqCOYTFxN2SXHQPjT7+H74GekEB1AdMWr0NR1H8BWOQELDZZQ+Q/N+ GKmb2VVQ2chQ7H+4yCVmeihV7LeM1SOpsT5+IvZDYJnmDRjXFrDhCmyI67aF7YGgQqI528 p50vEz42xzf3mLNdiXgcPgaZi/uoy9WPLzK5iDPWzT33Ubm35QneyFrAQn1iBHysrxodw7 4sIJ55D8ibNVvNqK/8zO86SWz0Kqh62ZI/AkOa8powP5Xi2Rd9gF+/B/WGdqlXr6ICePSr 4h4ewRHV10aunXj3hQv77xtMOOzRKzoJzB51AdcUsLA20auNfKVM+7A/lv+6Pg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710602200; a=rsa-sha256; cv=none; b=RRn8x/0Ar3kobnz7cgo3fxXzhLR+iOjVlW+Kuxw235cImMz2G8z+KairwFf6Gh/Cd4sc29 TduiNJ/9lN06hpv6eKi+P5W0VSctmaHnVXe09EB5iEpCb24PWZxs90FJSu1qRKvQL+ab06 ifI+CRR5v5vzwBbKAx+yfESCwBSjNMBdgQ6RoEJa0UkUkqW+zF/OMty72vBUtI/s5kY7aO 3z7lygFkcQdq7eHCp1pKndFtoCdHibpYObPFhtLJmNV3A6OBpGVVcwWcgrjNPBqrz18wHl oK08EJim4hhe20nwsfdwapXH9LBFpcsI838YlINOCVGnXhU5h8dtRXJ3ovZT0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kpgeZZ/GMfKF2/CUXXsfksIo5IyIGpq2JAZAhdw7x8c=; b=iUpJaRI/qtLt2yErL0WRaG46ambM1THssvDTs/5GAgkBNUhboY94nqT//WgGjTPtw40UwK OO4NAjO1HABS0ktQ0gJqlILbJGTdqpSTVHapIpz9qKM1MU4jBQExKyG58O7p8appVOVicu nJjcEU9FDY4IwOGmSl7Z0DmZui1CTz8X7Y2pEvceqUKBEmNcvDEXT/8KUCXLWjZlSU/XGn X6x1jajgH6G8QDT+5kjO46C3u6Pk4lbb6YqERrGioUkXgvoyxo36wKgasz9HKUB7tCT5T7 YausRQREHhTC2MCAs1Y6srtDVtGyLvwg38X4DHQzlpYE0EVu3EqiZQT39pL19Q== 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 4Txl8806C4z106K; Sat, 16 Mar 2024 15:16:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42GFGdls063150; Sat, 16 Mar 2024 15:16:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42GFGdI3063147; Sat, 16 Mar 2024 15:16:39 GMT (envelope-from git) Date: Sat, 16 Mar 2024 15:16:39 GMT Message-Id: <202403161516.42GFGdI3063147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: b2681df2294b - stable/13 - syscon_power: do reboot after shutdown_panic is executed List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b2681df2294b54c9a293946482843c63455f8818 Auto-Submitted: auto-generated The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=b2681df2294b54c9a293946482843c63455f8818 commit b2681df2294b54c9a293946482843c63455f8818 Author: Andriy Gapon AuthorDate: 2021-07-09 15:00:21 +0000 Commit: Andriy Gapon CommitDate: 2024-03-16 15:14:20 +0000 syscon_power: do reboot after shutdown_panic is executed A syscon_power instance can handle either poweroff or reboot, but not both. If the instance handles reboot then set its priority to be after shutdown_panic. This is to provide uniform experience with other platforms. (cherry picked from commit 5f7312a0d70c607afa9ce24ccd757321d043e02c) --- sys/dev/extres/syscon/syscon_power.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/extres/syscon/syscon_power.c b/sys/dev/extres/syscon/syscon_power.c index 792b9c43773a..2615e3a8f5dd 100644 --- a/sys/dev/extres/syscon/syscon_power.c +++ b/sys/dev/extres/syscon/syscon_power.c @@ -162,9 +162,11 @@ syscon_power_attach(device_t dev) OF_getencprop(node, "value", &sc->value, sizeof(sc->value)); } + /* Handle reboot after shutdown_panic. */ sc->reboot = ofw_bus_is_compatible(dev, "syscon-reboot"); sc->shutdown_tag = EVENTHANDLER_REGISTER(shutdown_final, - syscon_power_shutdown_final, dev, SHUTDOWN_PRI_LAST); + syscon_power_shutdown_final, dev, + sc->reboot ? SHUTDOWN_PRI_LAST + 150 : SHUTDOWN_PRI_LAST); return (0); } From nobody Sat Mar 16 15:16:38 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Txl871rxSz5F1Wx; Sat, 16 Mar 2024 15:16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Txl866j5Nz4HC7; Sat, 16 Mar 2024 15:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iB1+hOlClMr6g/zJiKOMI2N9fm4g1Oz1P+t0234lWVg=; b=Pvuv66sTDaRqugN9FkGyY87QkXgvwGUZiWjUnd6PTSSLe9GKFzuyHbY68tx5bMGLAj/Uzo GvnOHeuhI1xJickMFqrd3K8YBZfjzvHW+aTKqSQWR+icBMAGm8N7TbqIfcv+SVaFPNcbb/ q+8H2lPYyOSIyLZo7i74KwcKW11tnRN/zTZD63l6BW+3/Xp0LhMFLeUp0+/pmAE5Qu2bQk QL+cVb66RDtne6+VoMPVBZy3fYrNNUYqFrjPFQ0wht98UM+i40rsXmggQ8Vj9F7IYHfiJj QWY/zyk4ZItuG/DmYXq1kuc8lTBVeOV9ijmHsvWqucXzF/hg1h7FTQIcYEoMNg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710602198; a=rsa-sha256; cv=none; b=WeAHtqW4qMDKKonFC8FmlVRcPw60LbwcMonKYiVbJn7gqFlz3131oL4F4VpqmKBhq09oQ8 NMgebsfS4WQKTUMcU4BUh+0uv7U64jQH8XIRI8BKd2xqc6vfvEY8ftmRbcEfI1Ia+q3Js3 nEjQgw2UE2S9BtbNjtPXUUrBLeF5VazdpMEcnYfvtunyr+bwRVCCmt0gQOj/m/EqvWLTzS sowND1gWeNDknKPksz9Metc+jS99dmu2+x0tS7fmcwWN7/fmAN9jV3TjsMNdSbFuEcjT3K UDLTPv2Xn4vet/QmRGwyMR67Wv9Puzw3gjZ6xYhRzqSjGBJj+6dI2hflnZOReA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602198; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iB1+hOlClMr6g/zJiKOMI2N9fm4g1Oz1P+t0234lWVg=; b=AAYPS3aeFDKwxpg/ioik59zYElFWMt6mglKaukNlMQ7aHO8rjRMXRt6GHjKs3JobE80Kjm /DueMty3lDWdyM+RuVsY9b0rn1Lz4qG+wOjONssEnmMfrQTIfUVJWSaknIh87RblEKMpzD 5wjPmkOoHXEXf8lG5PrPu1px4YIqthLdQm70dL988ibgoBFD7vlVdDycbtSrqtnFjyzMlS kw+wiyIY88nFCKPGamWSc9c2FdMRnLz4ejC22U5o3ExPqQK+YoDMgaVMubq2AH8VL3lsS7 N+Sw2RurS0/C+4GQka9oYZEcpSJzB9vevKaoH+Zn6qshlOgC2Xc3ZbrXy3BD/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 4Txl866KJNz10XV; Sat, 16 Mar 2024 15:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42GFGcCC063095; Sat, 16 Mar 2024 15:16:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42GFGci7063092; Sat, 16 Mar 2024 15:16:38 GMT (envelope-from git) Date: Sat, 16 Mar 2024 15:16:38 GMT Message-Id: <202403161516.42GFGci7063092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 4eab6e77fc2a - stable/13 - ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4eab6e77fc2a050e3da6bedcabb406f9596921d4 Auto-Submitted: auto-generated The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=4eab6e77fc2a050e3da6bedcabb406f9596921d4 commit 4eab6e77fc2a050e3da6bedcabb406f9596921d4 Author: Andriy Gapon AuthorDate: 2024-02-19 10:08:12 +0000 Commit: Andriy Gapon CommitDate: 2024-03-16 15:13:42 +0000 ata_da: add quirk to disable NCQ TRIM for Samsung 860/870 SSDs NCQ TRIM for Samsung 860/870 SSDs results in data corruption on systems with some SATA controllers. This can be easily reproduced using ZFS which uses TRIM and is able to detect block content changes. Linux bug report for this issue: https://bugzilla.kernel.org/show_bug.cgi?id=201693 Since at present we can not limit a quirk based on the contorller / SIM, apply the quirk in all cases. Reviewed by: imp (cherry picked from commit c01af41c3c8fdd570764ff9b6bfbad6ac9ca1664) --- sys/cam/ata/ata_da.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/cam/ata/ata_da.c b/sys/cam/ata/ata_da.c index 359ece18960e..c5c567645166 100644 --- a/sys/cam/ata/ata_da.c +++ b/sys/cam/ata/ata_da.c @@ -726,6 +726,22 @@ static struct ada_quirk_entry ada_quirk_table[] = { T_DIRECT, SIP_MEDIA_FIXED, "*", "Samsung SSD 850*", "*" }, /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN }, + { + /* + * Samsung 860 SSDs + * 4k optimised, NCQ TRIM broken (normal TRIM fine) + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Samsung SSD 860*", "*" }, + /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN + }, + { + /* + * Samsung 870 SSDs + * 4k optimised, NCQ TRIM broken (normal TRIM fine) + */ + { T_DIRECT, SIP_MEDIA_FIXED, "*", "Samsung SSD 870*", "*" }, + /*quirks*/ADA_Q_4K | ADA_Q_NCQ_TRIM_BROKEN + }, { /* * Samsung SM863 Series SSDs (MZ7KM*) From nobody Sat Mar 16 15:16:41 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Txl893mmMz5F1Fg; Sat, 16 Mar 2024 15:16: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Txl891FLxz4HWH; Sat, 16 Mar 2024 15:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lJ822N2NejGsFWjVXslw18GRgfek3CRGhfFDVlqLc5s=; b=fSiWExeJ+eeDg8tEZwssg7QbFsrvnPCfKpkbjoBU3kheoDZmT/iWAWAZSaQYwQUcY47ZUO LOwLWHtInzjlzVS4h7y3YGxIqQH4lT+YPuYtiur3aj0YmPWPl1jNobTMp1uCOKGNDB0T0c QRpIeZ5kSU5T4y+M+w53m/N2sgAjwpt9lJLQpYvhnFC1nVqAJy9p9oDwUJlUVO62xrKvXp GZnRA635fP+BpD4SnjcKU6sQR4nyQLHCiK9J8qfhSyxMwv9mbiIaZvdQA98akq38WVE6Va Aq0bwEOT/iFwr8nrg/igoL7iFGdabLyR7JD4zS42aP2rqzTYTpf/V6Ljso7S+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710602201; a=rsa-sha256; cv=none; b=QLn+t2OYsL6Ifnh6zAcPRlnAvYesRq3RtxnsTFCy9ZuqzgV4wPJ+VLZZSUjzCOtrYfkDCT IivIIiUiYtZnaaE9CeFxCssm1QRIwqO5GxZvIItZ+VOwnNXWsuUjyUkJ3IRlqQmJWWtU3I VWwIp6xS+mG4nuQONjaJRUWkqV66YC0pvnf0RVTv+kKzViYcJ6cDlnD1oGQS1707M3FVlY MkABQKoIKc5IlmNFwpI6dbRM8pN51+IrDiCjZAXjIRuftTv/g044QeW3sbqqRvX57gu4Jo +CihOKneSfragSTn1+kxljuDj18rt1FgmlNNfWgQtRK/cNS8vT8Tp5gkcLnebA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710602201; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lJ822N2NejGsFWjVXslw18GRgfek3CRGhfFDVlqLc5s=; b=u1TsWbePlxPjVqGyzwBwiM6LPlI6Sfa+9SJMKnKuYYqklpIRym9ySguol8JRkchaP73av9 BhGAl4Zz8RZGpAyp/9Ycqt/C8zcGg9RAYqrmlmwFHWezS0S0PVbaEH3t743hUkHiMeuEXg PZOn/JE61H8DGJWITGpRCAE7mVXI1m5EHKYOV0mzI0/FIeaHi9HVy3KzpwR23/+LcVYdXC F9MbHfKImwrR7aHeS6VQsNd/aaTIyu/A4kUzzZgF59/Lf+KgFwS8XVU6o2BuhnjcHl6mDG tiwLfMtGQOD4+4KtiGDZdi/TG4+MyyvCm3YGEhxBXJjxQYJyh/xXNGOwwuEjWg== 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 4Txl890qnbz106L; Sat, 16 Mar 2024 15:16:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42GFGfqi063195; Sat, 16 Mar 2024 15:16:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42GFGfq1063192; Sat, 16 Mar 2024 15:16:41 GMT (envelope-from git) Date: Sat, 16 Mar 2024 15:16:41 GMT Message-Id: <202403161516.42GFGfq1063192@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: d463f7c7a726 - stable/13 - psci: split off psci_reboot from psci_shutdown List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d463f7c7a726842dca50e87b79d401f5d09dd196 Auto-Submitted: auto-generated The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=d463f7c7a726842dca50e87b79d401f5d09dd196 commit d463f7c7a726842dca50e87b79d401f5d09dd196 Author: Andriy Gapon AuthorDate: 2021-07-09 15:01:57 +0000 Commit: Andriy Gapon CommitDate: 2024-03-16 15:14:47 +0000 psci: split off psci_reboot from psci_shutdown Priority of psci_reboot set so that it is run after shutdown_panic is executed. This is to provide uniform experience with other platforms. (cherry picked from commit 0f354b2b588b60e2ef119ff2f480f7905c5db587) --- sys/dev/psci/psci.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/sys/dev/psci/psci.c b/sys/dev/psci/psci.c index 3d9fe230d1a2..a656a1365067 100644 --- a/sys/dev/psci/psci.c +++ b/sys/dev/psci/psci.c @@ -124,7 +124,6 @@ static struct ofw_compat_data compat_data[] = { #endif static int psci_attach(device_t, psci_initfn_t, int); -static void psci_shutdown(void *, int); static int psci_find_callfn(psci_callfn_t *); static int psci_def_callfn(register_t, register_t, register_t, register_t, @@ -472,12 +471,24 @@ psci_shutdown(void *xsc, int howto) if (psci_softc == NULL) return; - /* PSCI system_off and system_reset werent't supported in v0.1. */ if ((howto & RB_POWEROFF) != 0) fn = psci_softc->psci_fnids[PSCI_FN_SYSTEM_OFF]; - else if ((howto & RB_HALT) == 0) - fn = psci_softc->psci_fnids[PSCI_FN_SYSTEM_RESET]; + if (fn) + psci_call(fn, 0, 0, 0); + + /* System reset and off do not return. */ +} +static void +psci_reboot(void *xsc, int howto) +{ + uint32_t fn = 0; + + if (psci_softc == NULL) + return; + + if ((howto & RB_HALT) == 0) + fn = psci_softc->psci_fnids[PSCI_FN_SYSTEM_RESET]; if (fn) psci_call(fn, 0, 0, 0); @@ -488,7 +499,7 @@ void psci_reset(void) { - psci_shutdown(NULL, 0); + psci_reboot(NULL, 0); } #ifdef FDT @@ -586,6 +597,10 @@ psci_v0_2_init(device_t dev, int default_version) EVENTHANDLER_REGISTER(shutdown_final, psci_shutdown, sc, SHUTDOWN_PRI_LAST); + /* Handle reboot after shutdown_panic. */ + EVENTHANDLER_REGISTER(shutdown_final, psci_reboot, sc, + SHUTDOWN_PRI_LAST + 150); + return (0); } From nobody Sun Mar 17 15:26:51 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TyMKR5nCsz5DYs7; Sun, 17 Mar 2024 15:26: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TyMKR3YdRz4vtc; Sun, 17 Mar 2024 15:26:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710689211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QwXI+V7qVdNgtSjImycdV5hZDRQ5+pNlqF8+y2HP1ZI=; b=ABp8Xeu4I4i7dO+B7AH1GHHfc4YKXEQ7rGzG1eCofizWkQnoodMz3Fe9N1vh98WH5nJFWP IwX4RUb4KPdCx0usCxeS1QzLCofE9YaesYu639FlO38Nb1I27Nkoy44L3pGhW3zRlCmTec BH7MEbDc6hGPE1Ry7yhOIU5XQsmZMfiyUKURzN/zUrpDT0QIUfXSyP0BLqszAEmlnBAS9X 6ObIt13HKEI0v6Kj/xw7DSj2vxOILKYa6ygyG44VIso9xntsth+h3tS8mjan4wJ7gDcjMY g7pnwcPIgjHOzVJdePJVEC1I7W3xv7L5bA2N1Dz47lrYXQdzaqdJHNQVuUk+0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710689211; a=rsa-sha256; cv=none; b=Yq6DNgzoYi8SmLHoqfYT5jYjO4LuHnTXswGbewNV8Vd9rF4RAgfPIA00KOFW2z7mwlB4tB y49hQ5yBRPSN2BPTj6E6DgrOllIb6Lol/6JRVVDVqTd9zuHFYgC9F+/Vm35eUIXuJauVgw UV+HHempmcdOAUByRs5tLSLbMr5ch55PUMAkzgpCZJ8fXiv5pzCIBMfzXoWoZmImHEQNy5 GqCsFXqOCZdMiDvWxEDklZb4JJXCX1tJSHSfOWZt5cg6uhuDHv8U1/VuJxB9dUeDWj1TgM 9JldWCjPdBZp9pAyePKrO4CoJYp5vpneSL4wvt3KUn4LEfhrjItlSPPExL6CgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710689211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QwXI+V7qVdNgtSjImycdV5hZDRQ5+pNlqF8+y2HP1ZI=; b=Zk+XbkevSOE8s/LAZmownmI82jnfnv6Go31DibfDoKEHgEpay5UbSxmaLaySrKbPdB39Wh 6HrzKSV+9oDGevrZz9b7hMcr3Gfm1jxPM1yF9HQKdOZrbiKwTJDxWk5+B7LZBC8yR5/xoP owUGm5YYRdp7S8UuFJQjW1i5CHCM6x0RebowuAL4AfqPsoOlj61OpZSJgqL/jiClDDiqtV Piq8mOO3h6u5LlH78KbddeV8tceEwfI4pExIldK+SUPxk6BcYorUXrVoy8EmLDw2Mz/tUG EMxy8F/BCpoOYkBT8tcByZGikq38njLP3Jnc55wm8ucEbMYDofPM4U3EX3GNhw== 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 4TyMKR39RGzkJn; Sun, 17 Mar 2024 15:26:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42HFQpAi014666; Sun, 17 Mar 2024 15:26:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42HFQpik014663; Sun, 17 Mar 2024 15:26:51 GMT (envelope-from git) Date: Sun, 17 Mar 2024 15:26:51 GMT Message-Id: <202403171526.42HFQpik014663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 4187a7dbbe79 - stable/13 - ping: Fix protocol selection with NOINET6 kernel. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 4187a7dbbe793cffaef2399b42aa557f21aa750b Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4187a7dbbe793cffaef2399b42aa557f21aa750b commit 4187a7dbbe793cffaef2399b42aa557f21aa750b Author: Dag-Erling Smørgrav AuthorDate: 2024-03-12 19:40:36 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-03-17 14:37:59 +0000 ping: Fix protocol selection with NOINET6 kernel. A missing else caused the correct resolver hint (AF_INET) to be overwritten with AF_UNSPEC when the kernel supports IPv4 but not IPv6. MFC after: 3 days PR: 277592 Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D44304 (cherry picked from commit b53ae8a8333d730bb977276c511743b98c881423) --- sbin/ping/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ping/main.c b/sbin/ping/main.c index 2e2d3170fd13..c91959e35634 100644 --- a/sbin/ping/main.c +++ b/sbin/ping/main.c @@ -126,7 +126,7 @@ main(int argc, char *argv[]) hints.ai_socktype = SOCK_RAW; if (feature_present("inet") && !feature_present("inet6")) hints.ai_family = AF_INET; - if (feature_present("inet6") && !feature_present("inet")) + else if (feature_present("inet6") && !feature_present("inet")) hints.ai_family = AF_INET6; else hints.ai_family = AF_UNSPEC; From nobody Sun Mar 17 15:26:55 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TyMKW4sLsz5DZP1; Sun, 17 Mar 2024 15:26:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TyMKW4RQFz3wsd; Sun, 17 Mar 2024 15:26:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710689215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u+3hPU9tpJfYVczA1xTTRVwix+9ePYY45caASqjfeq8=; b=MgB5NpYeod9momX4CpRZfe8QxuKCxlXyUr2Qnr7EbvzL7+2FuLs5fouZ195nIcMCPNQ2DO nnizy4cI24vXVEy39nvqfSO+Fvm8jv5ZMMT0dwKOqHzWFmhkMY6gYCXJWJmFUZ/g+SFDcd g7zFTY3kMoSiHlbbeozPzDi34XFea6Yi23CyFve93dh+uFIC9nxmyeORA282cQg3ZgY71t hWKYA9LwCM0/hg+sBTmJk7oghZGNst0feNWF8YdqJke2GbPN11L8jLb0KGcvJPlWhLqgLW HztvU0CgP06bcKvsHvuI4gNyARj49+lsqSTuyDyvrhfn+RKMNFD2LJIx4O06MA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710689215; a=rsa-sha256; cv=none; b=wAcRhv38mK7RSIkaF9AqslhaeE+OwpTdu/rpCq85m0OzbXpEXO/P/ShnCl9WLv+6S/rtGg L4DCStqfIVeRuf8D6ETR1RELAM6ZzabAvURRBaY7JKdqGegKnLRUAONkX1CxLCW0/lw21B 0gkUQMy5hc3nJGcKxJxT5o0CYju4Da7oXhXz/fRpyF0s+ke6fVM5rmFcguqiA8XIWYgRB9 brtth3Z95f6lrVvVFdBQdWrDbOgiNUTY17D3g/MnNkh4M+ZszPfDKAJDkPzpsUY7UeXsc7 0BfqRRpO9D92609x7QGJQHkhk+jL+MG23ADqMD6Vo0owOTnTJCIBftUfB9xOfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710689215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u+3hPU9tpJfYVczA1xTTRVwix+9ePYY45caASqjfeq8=; b=E5fc4RIzAhwzQvBpJWwZfzU9w4u8rvyfJb+aujGpCnhuMCuXad+oRM5k7nh77J/Yl8r4m2 K7gYsUmPvrg52tu0P1KPM9xbmBXzUXbB/0tn+ipkJgFcI6Ouf57a6rdoJpstwLlGJT6+YD boXkqCLNImNAAIT7h53uGRju6OVgQCbytYisr3o4o7unKcbDUkLDK+hwrjuIxN912QCfrB rWgeGLUgOvxKKiH6cm8/WbHhWjGMYftFscqqbmjs21WnbByCPE9j6x+d/0n+VObiDk4dbP ioGJwb2xi7dJsBBveb41YyoChiz8ZifMOnCYyvPPV2W45u2JeAfCIA3VNxj1wg== 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 4TyMKW3wsBzkbB; Sun, 17 Mar 2024 15:26:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42HFQtfk014825; Sun, 17 Mar 2024 15:26:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42HFQtdm014822; Sun, 17 Mar 2024 15:26:55 GMT (envelope-from git) Date: Sun, 17 Mar 2024 15:26:55 GMT Message-Id: <202403171526.42HFQtdm014822@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: c3f4736f049c - stable/14 - ping: Fix protocol selection with NOINET6 kernel. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: c3f4736f049cc469f081a5879097e391a56c728b Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=c3f4736f049cc469f081a5879097e391a56c728b commit c3f4736f049cc469f081a5879097e391a56c728b Author: Dag-Erling Smørgrav AuthorDate: 2024-03-12 19:40:36 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-03-17 14:38:12 +0000 ping: Fix protocol selection with NOINET6 kernel. A missing else caused the correct resolver hint (AF_INET) to be overwritten with AF_UNSPEC when the kernel supports IPv4 but not IPv6. MFC after: 3 days PR: 277592 Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D44304 (cherry picked from commit b53ae8a8333d730bb977276c511743b98c881423) --- sbin/ping/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ping/main.c b/sbin/ping/main.c index 65896a5dba7b..eb8065cf8309 100644 --- a/sbin/ping/main.c +++ b/sbin/ping/main.c @@ -150,7 +150,7 @@ main(int argc, char *argv[]) hints.ai_socktype = SOCK_RAW; if (feature_present("inet") && !feature_present("inet6")) hints.ai_family = AF_INET; - if (feature_present("inet6") && !feature_present("inet")) + else if (feature_present("inet6") && !feature_present("inet")) hints.ai_family = AF_INET6; else hints.ai_family = AF_UNSPEC;