From nobody Mon Jan 22 00:06:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJ9WJ4jccz5833X; Mon, 22 Jan 2024 00:06: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 4TJ9WJ4CPQz4ZLk; Mon, 22 Jan 2024 00:06:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705882012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QQnGU64uh+sRg+DfP8o3mfsKD0EeOIWLFNDvHh9xSLg=; b=IILGkDpS42WJ1NnaUXQzC8DMaOyprve+o9VhqsLjTNQi2X9urDadLCMPkosoKnW5NLs2b0 hHlyQeabRtHjMsHyzQ4ZBQPEayj+3FyQiKJ1Nqrtj8mDx9uv32D7/bUnHRxgAVTkBvjIoI H5EUFjuRSKZiZ/bBoSUUsYWBQgwHxd0XHMblpIbgWquP7t/mswTli4gE4lT4Bq7tTSoYz0 Xd8+Jc68RSelfstNm5HM39X/ZD7WDIBK4KwTM/c6SKxvl1ovxKnGthgtqhj2kvSr3QdkNH 0ILzcAiAtaixHddbhh9ZqJ4oFTZcAUr2yuC1Z2xR2e03f+klglhmu3UtNyiAOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705882012; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QQnGU64uh+sRg+DfP8o3mfsKD0EeOIWLFNDvHh9xSLg=; b=ykXeZ12+xURVwZ6t/HDt64qerhnosVxJfYEP6o4kCT09+yMPrd8ioEvnzM8CxVNAGOS3KR e5Dg/dLJ2uFceoPo3zokyc5fPUIrK3Up2QIU5+xu52JopZLUelylnSLW8awpfFBNuT6HZd aZU4aKXR6MZmID6ChEjtEvNvMXipyMyJ22EqXhlWzMNVeR5o+tZgUyaFQBxznGOecxO+JU RtITq0T+pfv+zPAfrIZ31YXPZ8MZO25fIwF5SKKNEI+j2MKUNpg+3ue79+jEfoYPo0UtTO 3fSlgNnyC/uS6DjgCHBwRhXjWb5WXH//iNf6nYicSD9HdRa66GakzpCINnMK2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705882012; a=rsa-sha256; cv=none; b=BoEw3YQKbHTztLDWQ9om1fRUBnN+a64u8YiQ8amiP5O42WZNWCNe+jpNgo40mxP5E/PYO2 UwrHouzfNFYMTzB1IC48S7mmezj9NJy84ieN04qpQCaui9NgGm5oX2QaTxzu2fMXPmZquy rvWGyADhtE+UTrlgHOuR0LveNNRVOaX0Ae9st+ThReC8L98X8NanoBgkbyhuw6Azrsrz31 qUArdjtmsuWH9qkAye2+wEaZtxkLAYd9Pih6kXvjn0sdLI5sfOiRIun6WD/2xQVtoo5JBs 6G+rbePaleDhDDGkycU0NOKzHD245EDE0lTwpjKC3vFeJH+sbrZH9K+9lc/+Kw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJ9WJ3Ggxzg70; Mon, 22 Jan 2024 00:06:52 +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 40M06qlG049886; Mon, 22 Jan 2024 00:06:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40M06qxU049881; Mon, 22 Jan 2024 00:06:52 GMT (envelope-from git) Date: Mon, 22 Jan 2024 00:06:52 GMT Message-Id: <202401220006.40M06qxU049881@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 91f78c32befa - main - rc.d/kdc: Support start of MIT krb5kdc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91f78c32befa08bf4010db7afd4407277a3e585f Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=91f78c32befa08bf4010db7afd4407277a3e585f commit 91f78c32befa08bf4010db7afd4407277a3e585f Author: Cy Schubert AuthorDate: 2024-01-20 13:52:35 +0000 Commit: Cy Schubert CommitDate: 2024-01-22 00:06:26 +0000 rc.d/kdc: Support start of MIT krb5kdc Some users wishing to use the MIT krb5kdc have discovered the kdc script workaround applied to the MIT krb5 ports is insufficient. Let's build into this rc script the smarts to determine whether base or ports Hiemdal kdc is being invoked or the MIT krb5kdc. While at it, remove kdc_start_precmd(). This will simplify a future jail patch. Suggested by: netchild Original patch: netchild Reviewed by: emaste, netchild MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43523 --- libexec/rc/rc.d/kdc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libexec/rc/rc.d/kdc b/libexec/rc/rc.d/kdc index 4b8cf87197e8..c3059f261e09 100755 --- a/libexec/rc/rc.d/kdc +++ b/libexec/rc/rc.d/kdc @@ -12,17 +12,15 @@ name=kdc desc="Kerberos 5 server" rcvar=${name}_enable -start_precmd=${name}_start_precmd set_rcvar_obsolete kerberos5_server_enable kdc_enable set_rcvar_obsolete kerberos5_server kdc_program set_rcvar_obsolete kerberos5_server_flags kdc_flags -kdc_start_precmd() -{ - - command_args="$command_args --detach" -} load_rc_config $name +if [ "${kdc_program}" = /usr/libexec/kdc -o \ + "${kdc_program}" = /usr/local/libexec/kdc ]; then + command_args="$command_args --detach" +fi run_rc_command "$1" From nobody Mon Jan 22 01:35:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJCTt6wfxz58BRd; Mon, 22 Jan 2024 01:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TJCTt6Jqyz4mjq; Mon, 22 Jan 2024 01:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705887346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ijPdEU5hQVeAz1v6p46RPQFdtCuoWmJc56bQ5KwGSbU=; b=R7vmYoO0yXHLqu6lNcSANEgTEH6kbZJaXzjvZig0BbQZAel2VYfv2zoXxPXHbkMQHeANnR Aq6kevf6trj4e1oWGqNhGthuzS28dcdlJjGzelzyHpzZkBMIFA7PBgX9R3myudAbb0oQv/ Q7NJRUJaaJpvawxD/qDs57gc4iI+0dE3w4VotPM+h9N4p4cETOxFIHrfPklXeNNjJb9o0Z 4nf1xiBNWrGx5voRYCdFWBoKMAgd8l+kG5EC3RnIcWHXr4rmYDpX4qcZ6XGiyLyX0pSB8o gsn8HvZtOFXpC2Y5tT8GGosQWItnjRw8j+Xt0BgRDo5DfCRQzfzPsqCAckQvYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705887346; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ijPdEU5hQVeAz1v6p46RPQFdtCuoWmJc56bQ5KwGSbU=; b=WXaa+geO+1bigNy73M/u0uv77OCwDMQdbJ50uSMKlnQUW8Z0XjpZpl1gdV8wKx7ATzXRta avlNHv1KyukuGnLRKe6WntUc4MIa/9CpJ2/9l0EjkPDgx4Fe1p23bfI3DRcAGxDWplKYkg e6rVJNXi/mH92dB/7FYrRQ3CeeQL6T8JGa776m3RYR9lF9PEIuJU0KSQWD2wHxybccjwTp LLTpIvhKdOLTMerwBBVnI+FcvenThoXEdYRYm3cp9RpZ7KniuAlvL/Sncn9QXoShZs3o1A QxqcY5j3IqRepPI/D1NpS7hOishT83E+zMjU6ONteiCE0WTY8d5TR5MrX/Se+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705887346; a=rsa-sha256; cv=none; b=dxlIshMdJ4f7RuLw8fkd2DzUAXjAa/9cDXQY0P/23z3u2UmetXSShyZrOq2nx6lOrXjrtL JyuO/SkxJ/ABDYBpR8Vqhdrikr3WxHw2vOEck4IKauJ56UtxqP6GtgucDCuojQ7YUWNCdB ktkbK6Gry/vTdU12Q8PHQNyS5wAqv0Ibc21DQ8mw5J9PVGQb//LgLTnUoAmuU5N9qT68KS iQlr2mkf36zMKqEnvS5nm0ZYXbQJXOgJt/P1EePuQq8XHO2kuXC9esp6eFpS5ji5mBbl0O DIuSwz322MIiJ5O+Gb5yLFzHHVhjggC71sQ2w+yOWB3Y+JZBoh02MhZFA/1hQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJCTt5KTfzhvy; Mon, 22 Jan 2024 01:35:46 +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 40M1ZkNv002993; Mon, 22 Jan 2024 01:35:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40M1ZkpM002990; Mon, 22 Jan 2024 01:35:46 GMT (envelope-from git) Date: Mon, 22 Jan 2024 01:35:46 GMT Message-Id: <202401220135.40M1ZkpM002990@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e4b646ce1610 - main - find: Add -readable, -writable & -executable options List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4b646ce16105efc943bc8ac2242a2220dfe18d8 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e4b646ce16105efc943bc8ac2242a2220dfe18d8 commit e4b646ce16105efc943bc8ac2242a2220dfe18d8 Author: Ricardo Branco AuthorDate: 2024-01-21 19:53:05 +0000 Commit: John Baldwin CommitDate: 2024-01-22 01:33:46 +0000 find: Add -readable, -writable & -executable options Reviewed by: jhb, Mina Galić Pull Request: https://github.com/freebsd/freebsd-src/pull/1080 --- usr.bin/find/extern.h | 3 +++ usr.bin/find/find.1 | 20 +++++++++++++++++++- usr.bin/find/function.c | 39 +++++++++++++++++++++++++++++++++++++++ usr.bin/find/option.c | 3 +++ 4 files changed, 64 insertions(+), 1 deletion(-) diff --git a/usr.bin/find/extern.h b/usr.bin/find/extern.h index a1bd5e6d16a5..feb2e0202056 100644 --- a/usr.bin/find/extern.h +++ b/usr.bin/find/extern.h @@ -86,6 +86,7 @@ exec_f f_delete; exec_f f_depth; exec_f f_empty; exec_f f_exec; +exec_f f_executable; exec_f f_expr; exec_f f_false; exec_f f_flags; @@ -107,11 +108,13 @@ exec_f f_print; exec_f f_print0; exec_f f_prune; exec_f f_quit; +exec_f f_readable; exec_f f_regex; exec_f f_size; exec_f f_sparse; exec_f f_type; exec_f f_user; +exec_f f_writable; extern int ftsoptions, ignore_readdir_race, isdepth, isoutput; extern int issort, isxargs; diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1 index 856961d02395..635d42656bad 100644 --- a/usr.bin/find/find.1 +++ b/usr.bin/find/find.1 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 15, 2024 +.Dd January 21, 2024 .Dt FIND 1 .Os .Sh NAME @@ -465,6 +465,12 @@ if at least one invocation of returns a non-zero exit status, .Nm will return a non-zero exit status. +.It Ic -executable +Matches files which are executable by the current user. +This test makes use of the +.Xr access 2 +system call, and so can be fooled by NFS servers which do UID mapping (or root-squashing). +This is a GNU find extension. .It Ic -flags Oo Cm - Ns | Ns Cm + Oc Ns Ar flags , Ns Ar notflags The flags are specified using symbolic names (see .Xr chflags 1 ) . @@ -829,6 +835,12 @@ option was specified. Causes .Nm to terminate immediately. +.It Ic -readable +Matches files which are readable by the current user. +This test makes use of the +.Xr access 2 +system call, and so can be fooled by NFS servers which do UID mapping (or root-squashing). +This is a GNU find extension. .It Ic -regex Ar pattern True if the whole path of the file matches .Ar pattern @@ -925,6 +937,12 @@ is treated as a user ID. The same thing as .Ic -path , for GNU find compatibility. +.It Ic -writable +Matches files which are writable by the current user. +This test makes use of the +.Xr access 2 +system call, and so can be fooled by NFS servers which do UID mapping (or root-squashing). +This is a GNU find extension. .El .Sh OPERATORS The primaries may be combined using the following operators. diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c index f96a086cbda3..ef610903cc00 100644 --- a/usr.bin/find/function.c +++ b/usr.bin/find/function.c @@ -1808,3 +1808,42 @@ f_quit(PLAN *plan __unused, FTSENT *entry __unused) } /* c_quit == c_simple */ + +/* + * -readable + * + * File is readable + */ +int +f_readable(PLAN *plan __unused, FTSENT *entry) +{ + return (access(entry->fts_path, R_OK) == 0); +} + +/* c_readable == c_simple */ + +/* + * -writable + * + * File is writable + */ +int +f_writable(PLAN *plan __unused, FTSENT *entry) +{ + return (access(entry->fts_path, W_OK) == 0); +} + +/* c_writable == c_simple */ + +/* + * -executable + * + * File is executable + */ +int +f_executable(PLAN *plan __unused, FTSENT *entry) +{ + return (access(entry->fts_path, X_OK) == 0); +} + +/* c_executable == c_simple */ diff --git a/usr.bin/find/option.c b/usr.bin/find/option.c index 166fc75e9c51..99c67eed8cd9 100644 --- a/usr.bin/find/option.c +++ b/usr.bin/find/option.c @@ -75,6 +75,7 @@ static OPTION const options[] = { { "-empty", c_empty, f_empty, 0 }, { "-exec", c_exec, f_exec, 0 }, { "-execdir", c_exec, f_exec, F_EXECDIR }, + { "-executable", c_simple, f_executable, 0 }, { "-false", c_simple, f_false, 0 }, #if HAVE_STRUCT_STAT_ST_FLAGS { "-flags", c_flags, f_flags, 0 }, @@ -149,6 +150,7 @@ static OPTION const options[] = { // -printf { "-prune", c_simple, f_prune, 0 }, { "-quit", c_simple, f_quit, 0 }, + { "-readable", c_simple, f_readable, 0 }, { "-regex", c_regex, f_regex, 0 }, { "-samefile", c_samefile, f_inum, 0 }, { "-size", c_size, f_size, 0 }, @@ -158,6 +160,7 @@ static OPTION const options[] = { { "-uid", c_user, f_user, 0 }, { "-user", c_user, f_user, 0 }, { "-wholename", c_name, f_path, 0 }, + { "-writable", c_simple, f_writable, 0 }, { "-xdev", c_xdev, f_always_true, 0 }, // -xtype }; From nobody Mon Jan 22 03:27:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJFzc20LDz56srm for ; Mon, 22 Jan 2024 03:28:12 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TJFzb1jhhz4wwR for ; Mon, 22 Jan 2024 03:28:11 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of jrtc27@jrtc27.com designates 209.85.221.52 as permitted sender) smtp.mailfrom=jrtc27@jrtc27.com Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-33922d2cb92so2412677f8f.1 for ; Sun, 21 Jan 2024 19:28:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705894089; x=1706498889; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=j/uLPsxr4GzEw1Vi8D3zWjYgJoSPL4e5wO7F7f5ZidQ=; b=WminVo2ooUkuIO7MMVSXXuAcHADqMHC/1pIFTsUn/CgQwUKdhHmpn7oAA3tL+TBYAl NNatpHLr2Zhstg71dEqwObi69xZhIp4LrUB2aTteGpsFtYvpMS+hBLngxygAXJIOQL33 sLWBCLoL84Jm9Aq7HG4ZgvM6wrpLtv7tIvpe+VBiYgta1zu0yMGjLMrL842uTQHUBJwq ZFiaz8IMiBdactoM7mu6wZSOUPTPgu4Yr8KkJbmQfPLf8n4yQ8WF7FTGdAYP2muKqjlV YZ8VuGAz83PiBhUNYunbYP94A4/vXzxu/fzAkWxniSWlRybKWzJ9Hw1tceq1a76xD/Ln SO+w== X-Gm-Message-State: AOJu0YyK4FOa7P/tfIdWKIGT1nQ3o45bMkodTbIvw3q914JdQhCqQtks EwAiMiMTdg4cIyBG0coUThMaUwejN6MgOyK4OwT4iPARmxla1T60L2IsHdDqmx0= X-Google-Smtp-Source: AGHT+IGm9ANKf7tYtQYkGLvRZheHPZM/452KCMktjPHPshqrpogVvg91nOryzmjwM3AVcjvba35hYA== X-Received: by 2002:a5d:4704:0:b0:337:aa99:5e9d with SMTP id y4-20020a5d4704000000b00337aa995e9dmr1064569wrq.164.1705894089260; Sun, 21 Jan 2024 19:28:09 -0800 (PST) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id e1-20020a5d65c1000000b0033921b2a5d4sm7464297wrw.75.2024.01.21.19.28.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 Jan 2024 19:28:08 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: Re: git: 636592343c3e - main - tmpfs: increase memory reserve to a percent of available memory + swap From: Jessica Clarke In-Reply-To: <202312191534.3BJFY3fo030908@gitrepo.freebsd.org> Date: Mon, 22 Jan 2024 03:27:57 +0000 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202312191534.3BJFY3fo030908@gitrepo.freebsd.org> To: Mike Karels X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.40 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; FORGED_SENDER(0.30)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEFALL_USER(0.00)[jrtc27]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_HAS_DN(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_NEQ_ENVFROM(0.00)[jrtc27@freebsd.org,jrtc27@jrtc27.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.52:from]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.52:from] X-Rspamd-Queue-Id: 4TJFzb1jhhz4wwR On 19 Dec 2023, at 15:34, Mike Karels wrote: >=20 > The branch main has been updated by karels: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D636592343c3ec0feb61a4d8043676381= 384420dd >=20 > commit 636592343c3ec0feb61a4d8043676381384420dd > Author: Mike Karels > AuthorDate: 2023-12-19 15:33:33 +0000 > Commit: Mike Karels > CommitDate: 2023-12-19 15:33:33 +0000 >=20 > tmpfs: increase memory reserve to a percent of available memory + = swap >=20 > The tmpfs memory reserve defaulted to 4 MB, and other than that, > all of available memory + swap could be allocated to tmpfs files. > This was dangerous, as the page daemon attempts to keep some memory > free, using up swap, and then resulting in processes being killed. > Increase the reserve to a fraction of available memory + swap at > file system startup time. The limit is expressed as a percentage > of available memory + swap that can be used, and defaults to 95%. > The percentage can be changed via the vfs.tmpfs.memory_percent = sysctl, > recomputing the reserve with the new percentage but the initial > available memory + swap. Note that the reserve can also be set > directly with an existing sysctl, ignoring the percentage. The > previous behavior can be specified by setting = vfs.tmpfs.memory_percent > to 100. >=20 > Add sysctl for vfs.tmpfs.memory_percent and the pre-existing > vfs.tmpfs.memory_reserved to tmpfs(5). >=20 > PR: 275436 > MFC after: 1 month > Reviewed by: rgrimes > Differential Revision: https://reviews.freebsd.org/D43011 I just got: make[6]: Could not create temporary file /tmp/makeDl4i9S: No space = left on device after doing a buildworld -j4 on a 4 core, 16 GiB system where /tmp is a tmpfs, with the prior buildworld having taken me past this commit, which I strongly suspect to be the cause. Whilst I understand the motivation behind your commits, this is a sad regression to have; it=E2=80= =99s not exactly a particularly strange situation. The system is a HiFive Unmatched, for what it's worth. Jess From nobody Mon Jan 22 03:48:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJGQZ3tLvz56vCH; Mon, 22 Jan 2024 03:48:06 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TJGQZ3Lyzz4xts; Mon, 22 Jan 2024 03:48:06 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705895286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bqrzrLCRKnPj8Hv4+GKGikWgABNHNIjYEmfpKwT01pQ=; b=cqMNmFZw1ZV1HboCYTGQiBXympfmhFd2I7AwARkdaieBA+jf9uQSQD52yjZa3y4xB2btzy ntd8UYibjDtan0EQOhBnQ/hnYFsgZsLDrInHQuPV+AXuOTF8NhAM9Zp8oJUW39UURI4Fju ok1vIFVHa7gSk5XKMnCBMwmzaN5HbK4BIT3bBQZTxHiyF93N6IOXoMloUjwpFauhN7t3wq Q0fTEkjZjQaAXWlUJnMvQRSjo/qduGI2MKbvqBeHK2daPiWlqktTgoFWcjC8jpZCT1Idem 7aU/EkmKmz9VkPiQzncmgy7PRS6elulpAHD8j4oGgj5ZbbU80UsFqjMutYJnSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705895286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bqrzrLCRKnPj8Hv4+GKGikWgABNHNIjYEmfpKwT01pQ=; b=lxYgZwhR51a2i4no8vuef+8x8FN2+iBJVXsiiXX5VLlqq0HdqWUbBpZpC5Slx4+OxnVAgm IPpb792aeU75CqaX6EfhXtaZZOPPWShuy0//LHXltXv+NGRYZElGrQwZ754vyK9jMvgTaT t0R83rpP7wEkTNrt9tBsuR+zHCyyVmvtPjRVOWg9bl6Av4TufF4rBY6CVmELxdlscAIXg6 m8oJAw6uVUPebNeI6tERhAljlLFncqFEMoq/12Xsl5vVlA4+o0FofL7Rs7iHRRySQSe36x irJGjOwfQxFNkDePJj/zLjuIrrp7/nSpRfsnJv7b5GEJ03WqEuZukdXJp92F0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705895286; a=rsa-sha256; cv=none; b=wmg7n0ovgaR2U31hzuRPA8RsdVR7Ho4dZ0g0QhbYBiUmvh0XGI7GqrrjzFt7GM36kuBfAs 41qiRaWj0RqHB88FqwULwJUidYdyIfT9tvXFfn9DOrpjFw/yOdzAXo618w9gElESqf1JCE vPJxFnl+/+p3OLgmaWM9+Njw0SE2WFBwf+zdh4BACd+5JE++K1x56ioM4v+yLJg1gWd2Jk yq8bZEZlZUPJvnzIV6nL7rVmlIbxOF+8U+5blL3ciWZil041wlcxRAeBkapDKjAM9snEtA UOWJQVewJlW6Q5+yge9CicWY5aw+DuXxqsiE7Xk7PjUGrbYyqxvRttXShsk6xQ== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 4D05A19B86; Mon, 22 Jan 2024 03:48:06 +0000 (UTC) Date: Mon, 22 Jan 2024 03:48:06 +0000 From: Alexey Dokuchaev To: Jessica Clarke Cc: Mike Karels , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: 636592343c3e - main - tmpfs: increase memory reserve to a percent of available memory + swap Message-ID: References: <202312191534.3BJFY3fo030908@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Mon, Jan 22, 2024 at 03:27:57AM +0000, Jessica Clarke wrote: > On 19 Dec 2023, at 15:34, Mike Karels wrote: > > commit 636592343c3ec0feb61a4d8043676381384420dd > > > > tmpfs: increase memory reserve to a percent of available memory + swap > > > > [...] > > > > Add sysctl for vfs.tmpfs.memory_percent and the pre-existing > > vfs.tmpfs.memory_reserved to tmpfs(5). > > > > PR: 275436 > > MFC after: 1 month > > Reviewed by: rgrimes > > Differential Revision: https://reviews.freebsd.org/D43011 > > I just got: > > make[6]: Could not create temporary file /tmp/makeDl4i9S: > No space left on device > > after doing a buildworld -j4 on a 4 core, 16 GiB system where /tmp is a > tmpfs, with the prior buildworld having taken me past this commit, > which I strongly suspect to be the cause. Whilst I understand the > motivation behind your commits, this is a sad regression to have; it's > not exactly a particularly strange situation. FWIW, I've seen two people complain about this last week, apparently this kernel OOM protection doesn't work very well. :-/ ./danfe From nobody Mon Jan 22 05:29:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJJh70bsQz575s7; Mon, 22 Jan 2024 05:29:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TJJh706Cnz56rk; Mon, 22 Jan 2024 05:29:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705901399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PJDmhnCIomFTrU9mnyS3ueB5JUcmITe2b+ep8o0x2ic=; b=dil9IbGYYmPaaKcgrT0eK4gdXMw5mFjspWAPARrP5OjOomOXSNisXKQFQHqsjSzeaI3IfW ULzY28xcuKLwdRt6ceVlfYUziOD1m7jdGWY8zYouGiHEm9NvlN1sLOqhkTbxSsLzBW1vLM 2l483AKc/wnTLw3XpCS+sjBbwyf6teGwG97b79yLHif/bLMclxuDl738kgWighQiz7a6I6 sdlRFu70JPw2iwipdmapqgAls2xlr2ZvCSpxJdhIReMvN3KLucghXARJepMX84yPbW+NCE 4D//6Di4ZAUhuk0nX5QpApzkQS+xlBbOGCgM7TYcdGZ+1+KZLkvvbC8+to974Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705901399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PJDmhnCIomFTrU9mnyS3ueB5JUcmITe2b+ep8o0x2ic=; b=YgLN2Zdbl9H4Lxk24ILSOXQ9veMkyv/AFv3m8rhq6pdVqBhOFY4FiAuwWqo6OO/UHiNoYT lNRbw/NQrsnIwg0eObjMD8nf/XTlkPJeFGgMGlvMwUQshtF4tEICQZBikRHEkC7tdH7yux YuhaSJKIF3hGt7Oh2tyxS82VdHZ0ICg+Aq+iD+10uBpQXoFJDH0Ws9XY1UKxFQYdz5jk5D LaGCk4Rpx879unGxmAaqBghTXXTScBwXX4Xlg0JEkFvuOIXQSvwgv9cxaULLlHNveZ0SBX qVhDnZRpLmpEyziJZzi3OqJefiM4dNXfjrvuksun+L+T1Yd+6A0+WQAJcINmDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705901399; a=rsa-sha256; cv=none; b=ByBUU+NRAHLdcyAt4m5gEIUQYtOlYuVYeayDKErsbjUH92YooXXwEu4GKT0gS+Fj+yqvzd VbiRWwiESN4r/xSIP+8O3+4yLi4FBGGkGYkYv1RWh1xf/1rHnOqdFGAoqA9XqOdzeFQFFB m3slbTvpci83yxinB3aa9oqDKXsGHNQbSVFU40A5uipEBENlCI7NysAYJxANLiJuSNlaQ8 NYzE8kF4EgrKqp6U2LRAhia6+Ukqye6cQs3FUHepXMNg8ZW64nDDgcg6PvOKzEownTU+U5 Ml4dUoDMSpbSzJaxey877XksBslK4ezmHq1x5uZDdb+x+/gWbituQGOYWFQV7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJJh66GgrzpBJ; Mon, 22 Jan 2024 05:29: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 40M5Tw8i090048; Mon, 22 Jan 2024 05:29:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40M5TwC7090045; Mon, 22 Jan 2024 05:29:58 GMT (envelope-from git) Date: Mon, 22 Jan 2024 05:29:58 GMT Message-Id: <202401220529.40M5TwC7090045@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 4261507a5e3e - main - netlink.h: s/typeof/__typeof List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4261507a5e3e73ef6f9535935d22785056954b19 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4261507a5e3e73ef6f9535935d22785056954b19 commit 4261507a5e3e73ef6f9535935d22785056954b19 Author: Lexi Winter AuthorDate: 2024-01-18 02:34:39 +0000 Commit: John Baldwin CommitDate: 2024-01-22 02:15:14 +0000 netlink.h: s/typeof/__typeof typeof() does not exist in -std=c99 mode and the relevant #define is only for _KERNEL, so use __typeof here instead. Reviewed by: jhb MFC after: 2 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/1070 --- sys/netlink/netlink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netlink/netlink.h b/sys/netlink/netlink.h index 759bbed6139c..2cffa7299ef4 100644 --- a/sys/netlink/netlink.h +++ b/sys/netlink/netlink.h @@ -204,7 +204,7 @@ enum nlmsginfo_attrs { #define NL_ITEM_OK(_ptr, _len, _hlen, _LEN_M) \ ((_len) >= _hlen && _LEN_M(_ptr) >= _hlen && _LEN_M(_ptr) <= (_len)) -#define NL_ITEM_NEXT(_ptr, _LEN_M) ((typeof(_ptr))((char *)(_ptr) + _LEN_M(_ptr))) +#define NL_ITEM_NEXT(_ptr, _LEN_M) ((__typeof(_ptr))((char *)(_ptr) + _LEN_M(_ptr))) #define NL_ITEM_ITER(_ptr, _len, _LEN_MACRO) \ ((_len) -= _LEN_MACRO(_ptr), NL_ITEM_NEXT(_ptr, _LEN_MACRO)) From nobody Mon Jan 22 05:40:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJJwD6hrkz576x3; Mon, 22 Jan 2024 05:40: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 4TJJwD5vvrz580L; Mon, 22 Jan 2024 05:40:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705902028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bwzzZ3ps6bAuRr1vn6gzMJn6c//hRVluqC8XiU5wfwc=; b=mMG1oHyEb8tiyL8Lv1PtxwzkQNcaZhvkyebv0ulCwuBTHhvwrq33Wan5rQo9tzhzIZmvn4 6w0IEMpnfWvU5B9JTmL2mnjUYEooy4YqnT+ULFa1an8pe70Gve44C4cJASor/NTXzPxKmu /EWY1fzGR7nJ8vIRJb2UxcbHDLxAlaDtOgRlP8OyDjit9BAzRqUgxpM/3GBWAW2ecNg1B1 x5eAtYvrN5glUONCyF7Ii6FRrivny2+sE29UCyy4W6AJVO2PR7Xll0fixZ+78WxK+eHBMk +TIbBFqUJfCLdkspjROL9otzR1Hw64Hi+Ulb+Y6RKhUnuQwZ+yg8Wu6gWYuSnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705902028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bwzzZ3ps6bAuRr1vn6gzMJn6c//hRVluqC8XiU5wfwc=; b=v4g1jvE/zxaDql0H+TSeg9wHjHT3zm0nZmKoouiRt2jLxI7Ylb2luu23K+TNWRWqke7Gzg Vk3rLAy4vyR2bKSXTagSnnTL5b7bbPgZgo4YrPtZC3aK0UASsLmSpN1O2nIXJx2YlhxmCS 4XrxRqZ6Uuv0FNjjoRjmD8eC019SjeI2Kfn7v5OgH2Al4d84ASzfpFzZStJF/lU1773gDI M3NR8dPa+J4QIsG9ks4c6NLThylBLfPeq1gVW/lVE0i2P5kklDDcOyiL0YFDSdsP77XahH eMyOAn10c9hdu4pG8fsDCiFJeXgc4QF5eb81o3uwYF8ZfwZu5GR43fMHKB7jOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705902028; a=rsa-sha256; cv=none; b=y4NI8mGCNwKo062mkiReKLR2OEK2ErQ8713XU+poNrpQ6FrK03Wea87uWx6X8z4pb2ZcqC crE+DtyYK3rixE4QxAx7/bQhkevYbb1Bw52MZ9VTjyQSUIUGQyI3P5wkesMC/zuO+jbXzG UMQCieMDpAFx7xltIpqY+7T2m1yNug3PX8FuaMsRRLPKcro7opcueFjJ5+5//8jFr6HAoQ X2OMuA+5GNV1r3Jj5BxvkCQYnBBkgXzKJmWVIB/YNtIVzs1BFPMO+5sxq0HMC5VecE+xi8 34wXvzBuf48fMNoH/4XQimW9l5ygnEYtR13bGE28ZuEWhi89Iq4BnIGiqTIXsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJJwD4zYpzqHf; Mon, 22 Jan 2024 05:40: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 40M5eSj8015564; Mon, 22 Jan 2024 05:40:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40M5eSUc015561; Mon, 22 Jan 2024 05:40:28 GMT (envelope-from git) Date: Mon, 22 Jan 2024 05:40:28 GMT Message-Id: <202401220540.40M5eSUc015561@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: c8bf9f09ee3d - main - newfs_msdos.8: example for specific cluster size List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8bf9f09ee3d5ac97d38218f2123893a7f1f0285 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c8bf9f09ee3d5ac97d38218f2123893a7f1f0285 commit c8bf9f09ee3d5ac97d38218f2123893a7f1f0285 Author: Alexander Ziaee AuthorDate: 2024-01-12 22:12:48 +0000 Commit: John Baldwin CommitDate: 2024-01-22 05:39:16 +0000 newfs_msdos.8: example for specific cluster size The usual use case in 2024 for newfs_msdosfs is creating filesystems on SD cards for older hardware. In most tutorials, they call the cluster size "allocation size". Therefore, add a small note next to cluster size that it is also called allocation size, and add an example for how to do this. Reviewed by: jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1045 --- sbin/newfs_msdos/newfs_msdos.8 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sbin/newfs_msdos/newfs_msdos.8 b/sbin/newfs_msdos/newfs_msdos.8 index 278612548dc4..efa69c058453 100644 --- a/sbin/newfs_msdos/newfs_msdos.8 +++ b/sbin/newfs_msdos/newfs_msdos.8 @@ -23,7 +23,7 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 14, 2018 +.Dd January 12, 2024 .Dt NEWFS_MSDOS 8 .Os .Sh NAME @@ -134,7 +134,7 @@ File system block size (bytes per cluster). This should resolve to an acceptable number of sectors per cluster (see below). .It Fl c Ar cluster-size -Sectors per cluster. +Sectors per cluster, also called allocation size. Acceptable values are powers of 2 in the range 1 through 128. If the block or cluster size are not specified, the code @@ -224,6 +224,12 @@ Create a file system, using default parameters, on newfs_msdos /dev/ada0s1 .Ed .Pp +Create a FAT32 filesystem with a 32K allocation size on +.Pa /dev/mmcsd0s1 : +.Bd -literal -offset indent +newfs_msdos -F 32 -A -c 64 /dev/mmcsd0s1 +.Ed +.Pp Create a standard 1.44M file system, with volume label .Ar foo , on From nobody Mon Jan 22 09:46:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJQMb3dKMz57Xdl; Mon, 22 Jan 2024 09: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 4TJQMb2xl0z4Pg5; Mon, 22 Jan 2024 09: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=1705916763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iJ7ldwSSvGZcBIl/add3Sl20Vj/dOSKIhH/VIhynXrQ=; b=heKhmyuOvSlOTKG/i8OBjZ/0bNCjDT85pnt4jzI1jDQhpYV3V6RcA/AHtg5tq6TMrWxz19 /LX6w4EsJiOS/CKrlemdgKF8F8w6l5YGvfxPDQVde+06i8DSDG7XbcnMtBhq4XoU7xRm8G mWeltKM+ssPOt/k4pM/9cgbcXbNnwly/VCI/Xe2U99pzyabBgS4LNmyhWqmpK0ZgWzfPxW l+0GeG23m+QK0uIW6cuEtEksOb1l7i3pjrWIo1sBGlcHEAFm21/5oiXkwcHNXVJvrRg6M4 Vuyi0hGDugfaYqjk0WjBMszJp93HZQLiW3fvwVfagY35sRTb1gmEeZA0O830Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705916763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iJ7ldwSSvGZcBIl/add3Sl20Vj/dOSKIhH/VIhynXrQ=; b=BqKKmUmu9xMfx+wRR3jUyPgcNgZvsN+g9mrelncIQUgFfaAig3ucLHN1auESrp6bFuB/Xi rBNYDGVrIe+f1wB+qZVIkABzwcnoNZOvZYCOfSiTOmbygXQwcg1gY6yTkAQXa8be30q0Od 6EMMtEytvqoNiRKHZ1ny2zoNKMLwG/DWAcxNSxXqbkZb3TV0c/bOMlPQDWsuGIVMSJvTZL Q8JgYs3gzYLgMfaGLKgm0BlY3YTaH5JD6rMyiO6MpBeDLDXBVaoEOGJWxMXAxKdfo406JA 1O3hiAcXsjNQjeeZ7nirFXHuN7Guw2hIRUMXVT2cEXwHN2WDtFOWiygwGn0XoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705916763; a=rsa-sha256; cv=none; b=xvsOyoucil+BzZXMx/69Q5Oq0YOzamW8S0kFgCdB8g7lEV/LYIoZdkuauzgAtssokoiiUa 0PfhavaDGf2fUwWB5ZhBd0xNWvCVSzSrd8x4XBe4NEfJ15/AqsbLUIMIdNl89VYlhXIYQU o766H24hfvEJQbAy8G5DOolxDf5cNQtK3UFUmBmbOCsue6DthrNJWg20kilwPvmXuRESv+ Bd5ydheV1UexF0Hk8utEdAR+caAAGn2sd3E53krLNmbgg1SUt7Ni7e2yjtvV6BphMl53wD Dwmx7251vha+uRoAjG4vKDUqHN+6+B/Z+QJjh1ynCOPWuQa1BQzsfs6Ry1G6Ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJQMb20DgzxMf; Mon, 22 Jan 2024 09: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 40M9k3Ts027018; Mon, 22 Jan 2024 09: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 40M9k3kf027015; Mon, 22 Jan 2024 09:46:03 GMT (envelope-from git) Date: Mon, 22 Jan 2024 09:46:03 GMT Message-Id: <202401220946.40M9k3kf027015@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: f7d3d0a4ded3 - main - sound: use device_set_descf() to set device descriptions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7d3d0a4ded35ba15d63cdf9287b4a2d6f80da11 Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f7d3d0a4ded35ba15d63cdf9287b4a2d6f80da11 commit f7d3d0a4ded35ba15d63cdf9287b4a2d6f80da11 Author: Christos Margiolis AuthorDate: 2024-01-22 09:44:51 +0000 Commit: Christos Margiolis CommitDate: 2024-01-22 09:44:51 +0000 sound: use device_set_descf() to set device descriptions Commit 6b6914c1e21b introduced a printf-like version of device_set_desc(), so use it to simplify device description setting in the audio stack. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D43467 --- sys/dev/sound/pci/emu10kx-pcm.c | 4 +--- sys/dev/sound/pci/emu10kx.c | 12 ++---------- sys/dev/sound/pci/hda/hdaa.c | 8 ++------ sys/dev/sound/pci/hda/hdac.c | 6 ++---- sys/dev/sound/pci/hda/hdacc.c | 3 +-- sys/dev/sound/pci/hdspe-pcm.c | 13 +++++-------- sys/dev/sound/usb/uaudio.c | 5 ++--- 7 files changed, 15 insertions(+), 36 deletions(-) diff --git a/sys/dev/sound/pci/emu10kx-pcm.c b/sys/dev/sound/pci/emu10kx-pcm.c index b4633efdddc7..825a39fc4e63 100644 --- a/sys/dev/sound/pci/emu10kx-pcm.c +++ b/sys/dev/sound/pci/emu10kx-pcm.c @@ -1298,7 +1298,6 @@ emu_pcm_probe(device_t dev) { uintptr_t func, route; const char *rt; - char buffer[255]; BUS_READ_IVAR(device_get_parent(dev), dev, EMU_VAR_FUNC, &func); @@ -1328,8 +1327,7 @@ emu_pcm_probe(device_t dev) break; } - snprintf(buffer, 255, "EMU10Kx DSP %s PCM interface", rt); - device_set_desc_copy(dev, buffer); + device_set_descf(dev, "EMU10Kx DSP %s PCM interface", rt); return (0); } diff --git a/sys/dev/sound/pci/emu10kx.c b/sys/dev/sound/pci/emu10kx.c index 29366c3b61f3..6bbbfcc1df0e 100644 --- a/sys/dev/sound/pci/emu10kx.c +++ b/sys/dev/sound/pci/emu10kx.c @@ -2985,7 +2985,6 @@ emu_write_ivar(device_t bus __unused, device_t dev __unused, static int emu_pci_probe(device_t dev) { - struct sbuf *s; unsigned int thiscard = 0; uint16_t vendor; @@ -2997,15 +2996,8 @@ emu_pci_probe(device_t dev) if (thiscard == 0) return (ENXIO); - s = sbuf_new(NULL, NULL, 4096, 0); - if (s == NULL) - return (ENOMEM); - sbuf_printf(s, "Creative %s [%s]", emu_cards[thiscard].desc, emu_cards[thiscard].SBcode); - sbuf_finish(s); - - device_set_desc_copy(dev, sbuf_data(s)); - - sbuf_delete(s); + device_set_descf(dev, "Creative %s [%s]", + emu_cards[thiscard].desc, emu_cards[thiscard].SBcode); return (BUS_PROBE_DEFAULT); } diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index e64eac6114e4..02f4babcd331 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -6577,14 +6577,12 @@ static int hdaa_probe(device_t dev) { const char *pdesc; - char buf[128]; if (hda_get_node_type(dev) != HDA_PARAM_FCT_GRP_TYPE_NODE_TYPE_AUDIO) return (ENXIO); pdesc = device_get_desc(device_get_parent(dev)); - snprintf(buf, sizeof(buf), "%.*s Audio Function Group", + device_set_descf(dev, "%.*s Audio Function Group", (int)(strlen(pdesc) - 10), pdesc); - device_set_desc_copy(dev, buf); return (BUS_PROBE_DEFAULT); } @@ -6939,7 +6937,6 @@ hdaa_pcm_probe(device_t dev) struct hdaa_devinfo *devinfo = pdevinfo->devinfo; const char *pdesc; char chans1[8], chans2[8]; - char buf[128]; int loc1, loc2, t1, t2; if (pdevinfo->playas >= 0) @@ -6984,7 +6981,7 @@ hdaa_pcm_probe(device_t dev) if (pdevinfo->digital) t1 = -2; pdesc = device_get_desc(device_get_parent(dev)); - snprintf(buf, sizeof(buf), "%.*s (%s%s%s%s%s%s%s%s%s)", + device_set_descf(dev, "%.*s (%s%s%s%s%s%s%s%s%s)", (int)(strlen(pdesc) - 21), pdesc, loc1 >= 0 ? HDA_LOCS[loc1] : "", loc1 >= 0 ? " " : "", (pdevinfo->digital == 0x7)?"HDMI/DP": @@ -6994,7 +6991,6 @@ hdaa_pcm_probe(device_t dev) chans1[0] ? " " : "", chans1, chans2[0] ? "/" : "", chans2, t1 >= 0 ? " " : "", t1 >= 0 ? HDA_DEVS[t1] : ""); - device_set_desc_copy(dev, buf); return (BUS_PROBE_SPECIFIC); } diff --git a/sys/dev/sound/pci/hda/hdac.c b/sys/dev/sound/pci/hda/hdac.c index 2cf9239499af..1f06692ba36e 100644 --- a/sys/dev/sound/pci/hda/hdac.c +++ b/sys/dev/sound/pci/hda/hdac.c @@ -1101,10 +1101,8 @@ hdac_probe(device_t dev) snprintf(desc, sizeof(desc), "Generic (0x%08x)", model); result = BUS_PROBE_GENERIC; } - if (result != ENXIO) { - strlcat(desc, " HDA Controller", sizeof(desc)); - device_set_desc_copy(dev, desc); - } + if (result != ENXIO) + device_set_descf(dev, "%s HDA Controller", desc); return (result); } diff --git a/sys/dev/sound/pci/hda/hdacc.c b/sys/dev/sound/pci/hda/hdacc.c index b551b4b37701..f815e39392d4 100644 --- a/sys/dev/sound/pci/hda/hdacc.c +++ b/sys/dev/sound/pci/hda/hdacc.c @@ -472,8 +472,7 @@ hdacc_probe(device_t dev) hdacc_codecs[i].name, hda_get_device_id(dev)); } else snprintf(buf, sizeof(buf), "Generic (0x%04x)", id); - strlcat(buf, " HDA CODEC", sizeof(buf)); - device_set_desc_copy(dev, buf); + device_set_descf(dev, "%s HDA CODEC", buf); return (BUS_PROBE_DEFAULT); } diff --git a/sys/dev/sound/pci/hdspe-pcm.c b/sys/dev/sound/pci/hdspe-pcm.c index 0360e84fbe91..db39b867879f 100644 --- a/sys/dev/sound/pci/hdspe-pcm.c +++ b/sys/dev/sound/pci/hdspe-pcm.c @@ -1000,23 +1000,20 @@ hdspe_pcm_attach(device_t dev) { char status[SND_STATUSLEN]; struct sc_pcminfo *scp; - char desc[64]; + const char *buf; int err; int play, rec; scp = device_get_ivars(dev); scp->ih = &hdspe_pcm_intr; - bzero(desc, sizeof(desc)); if (scp->hc->ports & HDSPE_CHAN_AIO_ALL) - snprintf(desc, sizeof(desc), "HDSPe AIO [%s]", - scp->hc->descr); + buf = "AIO"; else if (scp->hc->ports & HDSPE_CHAN_RAY_ALL) - snprintf(desc, sizeof(desc), "HDSPe RayDAT [%s]", - scp->hc->descr); + buf = "RayDAT"; else - snprintf(desc, sizeof(desc), "HDSPe ? [%s]", scp->hc->descr); - device_set_desc_copy(dev, desc); + buf = "?"; + device_set_descf(dev, "HDSPe %s [%s]", buf, scp->hc->descr); /* * We don't register interrupt handler with snd_setup_intr diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c index ebbff0e633e4..917b6bd3f238 100644 --- a/sys/dev/sound/usb/uaudio.c +++ b/sys/dev/sound/usb/uaudio.c @@ -1171,7 +1171,7 @@ uaudio_attach_sub(device_t dev, kobj_class_t mixer_class, kobj_class_t chan_clas { struct uaudio_softc *sc = device_get_softc(device_get_parent(dev)); unsigned i = uaudio_get_child_index_by_dev(sc, dev); - char status[SND_STATUSLEN], desc[128]; + char status[SND_STATUSLEN]; uaudio_mixer_init(sc, i); @@ -1199,10 +1199,9 @@ uaudio_attach_sub(device_t dev, kobj_class_t mixer_class, kobj_class_t chan_clas mixer_hwvol_init(dev); - snprintf(desc, sizeof(desc), "%s %s", + device_set_descf(dev, "%s %s", usb_get_manufacturer(sc->sc_udev), usb_get_product(sc->sc_udev)); - device_set_desc_copy(dev, desc); snprintf(status, sizeof(status), "on %s", device_get_nameunit(device_get_parent(dev))); From nobody Mon Jan 22 12:52:51 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJVW74CgZz57rLZ; Mon, 22 Jan 2024 12:52: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 4TJVW73b7Jz3xKL; Mon, 22 Jan 2024 12:52:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705927971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nAzlGSqCQPPcs7iu4eL46NS+GzSPUkZXYHR/NYi9BiQ=; b=wbPemWvoo8bmvEzxnQr/d/7u5ezOzp8ZjaDriBstZydk8Xfq0uWUkRarLW6LxbJczRxSpF daTxJAYAp8xGKcktbxn9y0qBngMa5vX+1l89CXBABcRcqv80UMb8Hwqd9UD3y4CeY6JHsA cjkbTk1NUmU1qzRucTLeU9OsN/rzXlP4fJkn0QZK8JDRyrsDt12ZmOey+I+Lc0Sa+qvD1i KKTWSF4h6QF4+m12CVKmBs6Zo0Bmvyhu3G7mZh8isq0pbPFjMIGmfY+kYYi6OutSdTje6W SWbZMYlwzD/y/yhhgwraA+U55kHGIXu6sTXMGyK0Hwt7f5YnRmaZSWHfjXbcsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705927971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nAzlGSqCQPPcs7iu4eL46NS+GzSPUkZXYHR/NYi9BiQ=; b=tB4Rs94Qms5edk7odg2WBHR5+ErS/UyCIAdAeUSHZdBewus2qgKU45tlUIMMRkjf92hDjX NkCRVUN0RSemIU8TLaH0dG1/WStwS3ClgJeDIJMtLLQ6JMfSzTMJ7qsm+5g6X5Jb/AHNvf wJ8I30faYJBz5nUX+vZaCCjiHUvS3hK6CHCGoFgf760agtrWB6ndqLJq4tTyG6qZQShR+/ os7oZVArp9SphUFa3ORgMW+aM9UeQkfhwhzQJ2jLGFwfrvM4SsNezjGJEzs5u8FwA6D5yu 836hqwa0DyV7wyPsQdJ55lL5XKqAC/EtuY4MHTzzEr85h4Scr2zZKMfQx4UhgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705927971; a=rsa-sha256; cv=none; b=wYrmfMc3uzvmfwWghs3p5UgIekzzTPhuTbgmsKvbgnSIA9AzXi3aWAg94+scw0DLRkZMAJ aQolD3hFuQ0foVV6ZTbrcOIYuLyRZxLIB17i/fXK1Wo5WnG4soRC6j214b/q2otGb1YufO DXye0+bQAuE4yb3YkM8gF6qWAWV2LlaRlddgUst/pveZq1kpp8PD43uJQqHXxxiETJAomc KZtavQgUKc4To02PqG5AFfTNdLQj36/9y8qQxMxb+1wanyiGclqpHILsNcJH8aFpb3lJOk xKlC5Fb2EwQIKn/KOikta94BpSHIn/fOU+Xvi0FbZx1Gdybq29Vgtfrs/pEj3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJVW72fLvz12n7; Mon, 22 Jan 2024 12:52: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 40MCqpF2047529; Mon, 22 Jan 2024 12:52:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40MCqpf6047526; Mon, 22 Jan 2024 12:52:51 GMT (envelope-from git) Date: Mon, 22 Jan 2024 12:52:51 GMT Message-Id: <202401221252.40MCqpf6047526@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 54c62e3e5d8c - main - pf: work around icmp6 packet-too-big not being sent when binat-ing List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 54c62e3e5d8cd90c5571a1d4c8c5f062d580480e Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=54c62e3e5d8cd90c5571a1d4c8c5f062d580480e commit 54c62e3e5d8cd90c5571a1d4c8c5f062d580480e Author: Kristof Provost AuthorDate: 2024-01-17 17:11:27 +0000 Commit: Kristof Provost CommitDate: 2024-01-22 11:52:14 +0000 pf: work around icmp6 packet-too-big not being sent when binat-ing If we're applying NPTv6 we pass a packet with a modified source and/or destination address to the network stack. If that packet then turns out to be larger than the MTU of the sending interface the stack will attempt to generate an icmp6 packet-too-big error, but may fail to look up the appropriate source address for that error message. Even if it does, pf would still have to undo the binat operation inside the icmp6 packet so the sending host can make sense of the error. We can avoid both problems entirely by having pf also perform the MTU check (taking the potential refragmentation into account), and generating the icmp6 error directly in pf. See also: https://redmine.pfsense.org/issues/14290 Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D43499 --- sys/net/pfvar.h | 1 + sys/netpfil/pf/pf.c | 12 ++++++++++++ sys/netpfil/pf/pf_norm.c | 15 +++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index f0742c99a4a8..ff3370bc105e 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2297,6 +2297,7 @@ int pf_normalize_ip6(struct mbuf **, struct pfi_kkif *, u_short *, void pf_poolmask(struct pf_addr *, struct pf_addr*, struct pf_addr *, struct pf_addr *, sa_family_t); void pf_addr_inc(struct pf_addr *, sa_family_t); +int pf_max_frag_size(struct mbuf *); int pf_refragment6(struct ifnet *, struct mbuf **, struct m_tag *, bool); #endif /* INET6 */ diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 9bd9828a99d9..38a5a45d7991 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -8510,6 +8510,18 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb return (PF_PASS); } + /* + * If we end up changing IP addresses (e.g. binat) the stack may get + * confused and fail to send the icmp6 packet too big error. Just send + * it here, before we do any NAT. + */ + if (dir == PF_OUT && IN6_LINKMTU(ifp) < pf_max_frag_size(m)) { + PF_RULES_RUNLOCK(); + *m0 = NULL; + icmp6_error(m, ICMP6_PACKET_TOO_BIG, 0, IN6_LINKMTU(ifp)); + return (PF_DROP); + } + memset(&pd, 0, sizeof(pd)); TAILQ_INIT(&pd.sctp_multihome_jobs); if (default_actions != NULL) diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index f5d1a66f6467..295377bef3e8 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -939,6 +939,21 @@ fail: #endif /* INET6 */ #ifdef INET6 +int +pf_max_frag_size(struct mbuf *m) +{ + struct m_tag *tag; + struct pf_fragment_tag *ftag; + + tag = m_tag_find(m, PACKET_TAG_PF_REASSEMBLED, NULL); + if (tag == NULL) + return (m->m_pkthdr.len); + + ftag = (struct pf_fragment_tag *)(tag + 1); + + return (ftag->ft_maxlen); +} + int pf_refragment6(struct ifnet *ifp, struct mbuf **m0, struct m_tag *mtag, bool forward) From nobody Mon Jan 22 12:52:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJVW85PdLz57rRc; Mon, 22 Jan 2024 12:52: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 4TJVW84vn7z3xVZ; Mon, 22 Jan 2024 12:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705927972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4pyd/joJSxm7NNwGiT0U2AsKYJSessjj0Xs8PqudYmI=; b=RPCnc0mNq4WTUm7JIb1YDE/cpx3DnNlpHG2nFn/nb0BPe9rYLlVAiFtAFEaIFgMMLg8LN+ j1vEglS/mTMMA15rvqhVrSbdPzd8DTp6xJVqzHJDyY0pRlXdxSZbVSUK48/ruzsPoIKG1c 1SOwXqlYmQoh1EbYP8Kh26MyWmS54mtK35iA6KZcKRlmsz6mLu0++QfnG374LoTS9khHD1 t73UH3tyqn9x8tzzumzFEGhDE90k2gHbViOlA4noRWI+YNl1REnsVBJ/QgD+x5zsBXD/ej xzRj3tjDB2tJ8GHCdhCQt9XCaBFE+ipvlKpJ2INI5PCSA4k3NIvlmhognzwtAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705927972; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4pyd/joJSxm7NNwGiT0U2AsKYJSessjj0Xs8PqudYmI=; b=LgMze+oAs2KDiIC3SLR5XFRa8w1UgvmwLEBKss81dcmtI1XFghN/EPI45LjnGim1lZz3WL S8GpbFCrpUbjPdDOsaiDCGKQg6tno85Wy9o0B9aty1uGhUSgO65r4BGcTrIfIF+m+kVlHd w9FL+BM+QStXA70r4KO7gqissZ2lWGcan9puXzjs7w2+La9pExnBeqYK937YdUaBfjBDtn TWkLdwOjfm0a3PiJVvIQTBqPnzGVyFoz+tyG4+nEAoUW0ld/NGqW7svUIKHSSk9Gs+bv4C s2AoYldUlHriMbv73PGTUa1S9BZL0vGD+sA59OhdmkGM0rIq1hIJNPCrcxYaWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705927972; a=rsa-sha256; cv=none; b=x2fxE8tM4RzzdU1yGE1+GhJ6OiEaM99JHlGTLhSJzq58Zxu1osg94Z8DdgjLSxc4sHEReo d+t1IwGwBiuZ4uVrTtGutq+CnOzLVk5FC0YSjY+wkDI5oL9KRZ4L0Qx1tdNDpDN0adzUOk VMoR0cpVo7dWNA2u1qsREsJdqOSg25D3BbEywb7LWf2tCtc9mlfxRJi3B3ge4JGh76YE1V dcex4IskOHRptHJqtOC2LSJ0CSrHnD7ds16L4A/yP6SUnbevoT+0/Tj51gRQA1gNL5m87C 0XUIPvVOfwWYKXrWc5mmnShLsG80CLYMAFSS4cGyMWVZZglG7nZNQ5HQUII7ZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJVW83zzHz12xW; Mon, 22 Jan 2024 12:52:52 +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 40MCqqtr047583; Mon, 22 Jan 2024 12:52:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40MCqq7m047580; Mon, 22 Jan 2024 12:52:52 GMT (envelope-from git) Date: Mon, 22 Jan 2024 12:52:52 GMT Message-Id: <202401221252.40MCqq7m047580@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 57c50d6b3673 - main - pf tests: test ICMP6 packet too big with binat List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 57c50d6b3673225064d9c38cd06a41ec1730d3d1 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=57c50d6b3673225064d9c38cd06a41ec1730d3d1 commit 57c50d6b3673225064d9c38cd06a41ec1730d3d1 Author: Kristof Provost AuthorDate: 2024-01-17 17:03:56 +0000 Commit: Kristof Provost CommitDate: 2024-01-22 12:49:56 +0000 pf tests: test ICMP6 packet too big with binat Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D43500 --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/nat66.py | 166 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 167 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index f1a2fff5a45d..30099fdc4c17 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -46,6 +46,7 @@ ATF_TESTS_SH+= altq \ tos ATF_TESTS_PYTEST+= frag6.py +ATF_TESTS_PYTEST+= nat66.py ATF_TESTS_PYTEST+= sctp.py # Tests reuse jail names and so cannot run in parallel. diff --git a/tests/sys/netpfil/pf/nat66.py b/tests/sys/netpfil/pf/nat66.py new file mode 100644 index 000000000000..006ab5afee7f --- /dev/null +++ b/tests/sys/netpfil/pf/nat66.py @@ -0,0 +1,166 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +import ctypes +import ipaddress +import pytest +import re +import socket +import threading +import time +from atf_python.sys.net.tools import ToolsHelper +from atf_python.sys.net.vnet import VnetTestTemplate + +class DelayedSend(threading.Thread): + def __init__(self, packet): + threading.Thread.__init__(self) + self._packet = packet + + self.start() + + def run(self): + import scapy.all as sp + time.sleep(1) + sp.send(self._packet) + +class TestNAT66(VnetTestTemplate): + REQUIRED_MODUES = [ "pf" ] + TOPOLOGY = { + "vnet1": {"ifaces": ["if1"]}, + "vnet2": {"ifaces": ["if1", "if2"]}, + "vnet3": {"ifaces": ["if2"]}, + "if1": {"prefixes6": [("2001:db8::2/64", "2001:db8::1/64")]}, + "if2": {"prefixes6": [("2001:db8:1::1/64", "2001:db8:1::2/64")]}, + } + + def vnet2_handler(self, vnet): + ifname = vnet.iface_alias_map["if1"].name + ToolsHelper.print_output("/sbin/ifconfig %s mtu 9000" % ifname) + + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "set reassemble yes", + "binat inet6 from 2001:db8::/64 to 2001:db8:1::/64 -> 2001:db8:42::/64", + "binat inet6 from 2001:db8:1::/64 to 2001:db8:42::/64 -> 2001:db8::/64", + "pass inet6 proto icmp6"]) + + ToolsHelper.print_output("/sbin/sysctl net.inet6.ip6.forwarding=1") + + def vnet3_handler(self, vnet): + ToolsHelper.print_output("/sbin/route add -6 2001:db8:42::/64 2001:db8:1::1") + + def check_icmp_too_big(self, sp, payload_size, frag_size=None): + packet = sp.IPv6(src="2001:db8::2", dst="2001:db8:1::2") \ + / sp.ICMPv6EchoRequest(data=sp.raw(bytes.fromhex('f0') * payload_size)) + + if frag_size is not None: + packet = sp.fragment6(packet, frag_size) + + # Delay the send so the sniffer is running when we transmit. + s = DelayedSend(packet) + + packets = sp.sniff(iface=self.vnet.iface_alias_map["if1"].name, + timeout=3) + found=False + for p in packets: + # We can't get a reply to this + assert not p.getlayer(sp.ICMPv6EchoReply) + + if not p.getlayer(sp.ICMPv6PacketTooBig): + continue + + ip6 = p.getlayer(sp.IPv6) + icmp6 = p.getlayer(sp.ICMPv6PacketTooBig) + + # Error is from the router vnet + assert ip6.src == "2001:db8::1" + assert ip6.dst == "2001:db8::2" + + # And the relevant MTU is 1500 + assert icmp6.mtu == 1500 + + # The icmp6 error contains our original IPv6 packet + err = icmp6.getlayer(sp.IPerror6) + assert err.src == "2001:db8::2" + assert err.dst == "2001:db8:1::2" + assert err.nh == 58 + + found = True + + assert found + + def check_icmp_echo(self, sp, payload_size): + packet = sp.IPv6(src="2001:db8::2", dst="2001:db8:1::2") \ + / sp.ICMPv6EchoRequest(data=sp.raw(bytes.fromhex('f0') * payload_size)) + + # Delay the send so the sniffer is running when we transmit. + s = DelayedSend(packet) + + packets = sp.sniff(iface=self.vnet.iface_alias_map["if1"].name, + timeout=3) + found=False + for p in packets: + if not p.getlayer(sp.ICMPv6EchoReply): + continue + + ip6 = p.getlayer(sp.IPv6) + icmp6 = p.getlayer(sp.ICMPv6EchoReply) + + # Error is from the router vnet + assert ip6.src == "2001:db8:1::2" + assert ip6.dst == "2001:db8::2" + + found = True + + assert found + + @pytest.mark.require_user("root") + def test_npt_icmp(self): + cl_vnet = self.vnet_map["vnet1"] + ifname = cl_vnet.iface_alias_map["if1"].name + ToolsHelper.print_output("/sbin/ifconfig %s mtu 9000" % ifname) + + ToolsHelper.print_output("/sbin/route add -6 2001:db8:1::/64 2001:db8::1") + + # For unclear reasons vnet3 doesn't respond to the first ping. + # Just send two for now. + ToolsHelper.print_output("/sbin/ping -6 -c 1 2001:db8:1::2") + ToolsHelper.print_output("/sbin/ping -6 -c 1 2001:db8:1::2") + + # Import in the correct vnet, so at to not confuse Scapy + import scapy.all as sp + + # A ping that easily passes without fragmentation + self.check_icmp_echo(sp, 128) + + # Send a ping that just barely doesn't need to be fragmented + self.check_icmp_echo(sp, 1452) + + # Send a ping that just barely needs to be fragmented + self.check_icmp_too_big(sp, 1453) + + # A ping that arrives fragmented + self.check_icmp_too_big(sp, 12000, 5000) From nobody Mon Jan 22 13:15:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJW1G0n0Tz57tZs; Mon, 22 Jan 2024 13:15:30 +0000 (UTC) (envelope-from karels@freebsd.org) Received: from mail2.karels.net (mail2.karels.net [3.19.118.201]) (using TLSv1.3 with cipher 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 "freebsd", Issuer "freebsd" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TJW1F5yh6z415H; Mon, 22 Jan 2024 13:15:29 +0000 (UTC) (envelope-from karels@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from mail2.karels.net (localhost [IPv6:0:0:0:0:0:0:0:1]) by mail2.karels.net (8.17.1/8.17.1) with ESMTP id 40MDFN8E035918; Mon, 22 Jan 2024 07:15:23 -0600 (CST) (envelope-from karels@freebsd.org) Received: from [10.0.2.130] ([73.62.165.147]) by mail2.karels.net with ESMTPSA id XSgiIGtqrmVMjAAAs/W3XQ (envelope-from ); Mon, 22 Jan 2024 07:15:23 -0600 From: Mike Karels To: Alexey Dokuchaev , Jessica Clarke Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 636592343c3e - main - tmpfs: increase memory reserve to a percent of available memory + swap Date: Mon, 22 Jan 2024 07:15:22 -0600 X-Mailer: MailMate (1.14r6015) Message-ID: <04794665-EFCA-4E89-9956-B18684898C9D@freebsd.org> In-Reply-To: References: <202312191534.3BJFY3fo030908@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4TJW1F5yh6z415H X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.16.0.0/14, country:US] On 21 Jan 2024, at 21:48, Alexey Dokuchaev wrote: > On Mon, Jan 22, 2024 at 03:27:57AM +0000, Jessica Clarke wrote: >> On 19 Dec 2023, at 15:34, Mike Karels wrote: >>> commit 636592343c3ec0feb61a4d8043676381384420dd >>> >>> tmpfs: increase memory reserve to a percent of available memory + swap >>> >>> [...] >>> >>> Add sysctl for vfs.tmpfs.memory_percent and the pre-existing >>> vfs.tmpfs.memory_reserved to tmpfs(5). >>> >>> PR: 275436 >>> MFC after: 1 month >>> Reviewed by: rgrimes >>> Differential Revision: https://reviews.freebsd.org/D43011 >> >> I just got: >> >> make[6]: Could not create temporary file /tmp/makeDl4i9S: >> No space left on device >> >> after doing a buildworld -j4 on a 4 core, 16 GiB system where /tmp is a >> tmpfs, with the prior buildworld having taken me past this commit, >> which I strongly suspect to be the cause. Whilst I understand the >> motivation behind your commits, this is a sad regression to have; it's >> not exactly a particularly strange situation. Bug 276402 is about the interaction of this change with ZFS ARC, which seems to be problematical. I spent some time investigating yesterday. Depending on the dynamics, I get different results. If tmpfs grows, the ARC will be reduced if needed. But if the ARC grows to the point that tmpfs sets free space to 0 or quite low, attempts to write to tmpfs fail without any reduction in ARC. Jess, two quesions: 1. Are you using ZFS on this system? 2. Can you try with vfs.tmpfs.memory_percent set to 100? > FWIW, I've seen two people complain about this last week, apparently > this kernel OOM protection doesn't work very well. :-/ So far, I have only seen OOM kills when memory + swap are quite short, with a tmpfs memory_percent above 95. But with ZFS, it can happen when the ARC could have been reduced. I will investigate more today. If I don't find a way to resolve this, I'll probably commit a change to set vfs.tmpfs.memory_percent to 100 by default, at least for now, and if that works around the problem. Mike From nobody Mon Jan 22 13:23:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJWBh6nNHz57tv7; Mon, 22 Jan 2024 13:23:40 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TJWBh6F05z41dJ; Mon, 22 Jan 2024 13:23:40 +0000 (UTC) (envelope-from bapt@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705929820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CTxbSZ125kEyAUrIvsOS5Ehn1E3U637pAdUdMBDUB+I=; b=wxk1AQBJzSteJPE5wNXbTxieHs82PUMXcaa8bEIEDLcpXuUpE+OJNUAG3Y6juXMTtOl7pY w9vhOxF8H3UyoTurVUCCPv4yY2QjYZ8CZF1LFA8YWAyfuRgGEkHMQrgaKSdjtsgwZYNoQU W4IrOaj6ehhuI436P/ERFASUv2rfZB0fkxt9MM/ZaL1tobCCZwmdTX1c+bNlcHG7MD3yDQ cLe1v+sQkXxaTB5jlOto/hbn2U6tZHtgC/jWsydDFcrGfpyDJJFooJcPf80vq8Tg0zAYrn T4+aPWj60va2ouOr6RKQ1P8TxcJAbFrdkS1e7EBNvr0Ta3Y1vg7h4mYXjXGAgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705929820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CTxbSZ125kEyAUrIvsOS5Ehn1E3U637pAdUdMBDUB+I=; b=k3C6DZPRNVCF3shN6u6DrSAIqJZ+25dQ8mvMF9ANgXvcinCZOB2VVzykbI53GDyDy1Z4dt fWyLymzuVd9Wu4JKGEOjPQnYUtWINV+S+fNnYDyB5PjIhSqPVQENxgpTZGx6xgCudKrowF 6xH5tR8FKY0S1Kr+Y8P34VO9tj+4jQ6fEQBopGw95U9cxSjvYEv3or1r/Tzo6kUd2PTtAt Sbb9G1YRq3Ip7qgl4HKdsuEuOIyAgnRt3fXjPbjgYKXtIJU74HRWidqwBKo3g+tUwThIRv cQY97bg8uPTSjkMgZ1e/HYgxZmet5QvYQRDYC2yAc09x7p0YSrnD4CBSoPKoag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705929820; a=rsa-sha256; cv=none; b=q5yj8EiB9FOJQQ0V2bFylSwIkb/rTdOLREYG+CoTxSkjg08UsoBxvq0Yk/nXtlhCPQqj0t qgGxEEBmnv8TjMNptpqLxHKw2XVvXHFLixKOOl3un5iYRx0teNbPjtTj3Q5ehPrryAVLc8 7Dpzp9ItA8++X6LmoczMygds09+xUYX+DYzfhm8kSKtNf4Sgu1LiN9GDX5rtkQ4LjOv9R0 i9ZVnPawfmVSs+FKCIk9AaL7XJGIL17Qe89GW4wwJhD2/MvUFa51PhlKbBhkhXEZ1dxY9x Rzb4ZxjWieFy4nXHwE3Hyng4B4xjY88WBvvkI3sxBEpd0iqcCswPENnPJdSETA== Received: from aniel.nours.eu (nours.eu [176.31.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: bapt) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TJWBh4dhszb7D; Mon, 22 Jan 2024 13:23:40 +0000 (UTC) (envelope-from bapt@freebsd.org) Received: by aniel.nours.eu (Postfix, from userid 1001) id 05BB19F356; Mon, 22 Jan 2024 14:23:37 +0100 (CET) Date: Mon, 22 Jan 2024 14:23:37 +0100 From: Baptiste Daroussin To: Mike Karels Cc: Alexey Dokuchaev , Jessica Clarke , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: Re: git: 636592343c3e - main - tmpfs: increase memory reserve to a percent of available memory + swap Message-ID: References: <202312191534.3BJFY3fo030908@gitrepo.freebsd.org> <04794665-EFCA-4E89-9956-B18684898C9D@freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <04794665-EFCA-4E89-9956-B18684898C9D@freebsd.org> On Mon, Jan 22, 2024 at 07:15:22AM -0600, Mike Karels wrote: > On 21 Jan 2024, at 21:48, Alexey Dokuchaev wrote: > > > On Mon, Jan 22, 2024 at 03:27:57AM +0000, Jessica Clarke wrote: > >> On 19 Dec 2023, at 15:34, Mike Karels wrote: > >>> commit 636592343c3ec0feb61a4d8043676381384420dd > >>> > >>> tmpfs: increase memory reserve to a percent of available memory + swap > >>> > >>> [...] > >>> > >>> Add sysctl for vfs.tmpfs.memory_percent and the pre-existing > >>> vfs.tmpfs.memory_reserved to tmpfs(5). > >>> > >>> PR: 275436 > >>> MFC after: 1 month > >>> Reviewed by: rgrimes > >>> Differential Revision: https://reviews.freebsd.org/D43011 > >> > >> I just got: > >> > >> make[6]: Could not create temporary file /tmp/makeDl4i9S: > >> No space left on device > >> > >> after doing a buildworld -j4 on a 4 core, 16 GiB system where /tmp is a > >> tmpfs, with the prior buildworld having taken me past this commit, > >> which I strongly suspect to be the cause. Whilst I understand the > >> motivation behind your commits, this is a sad regression to have; it's > >> not exactly a particularly strange situation. > > Bug 276402 is about the interaction of this change with ZFS ARC, which > seems to be problematical. I spent some time investigating yesterday. > Depending on the dynamics, I get different results. If tmpfs grows, > the ARC will be reduced if needed. But if the ARC grows to the point > that tmpfs sets free space to 0 or quite low, attempts to write to > tmpfs fail without any reduction in ARC. > > Jess, two quesions: > > 1. Are you using ZFS on this system? > > 2. Can you try with vfs.tmpfs.memory_percent set to 100? > > > FWIW, I've seen two people complain about this last week, apparently > > this kernel OOM protection doesn't work very well. :-/ > > So far, I have only seen OOM kills when memory + swap are quite short, > with a tmpfs memory_percent above 95. But with ZFS, it can happen > when the ARC could have been reduced. > > I will investigate more today. If I don't find a way to resolve this, > I'll probably commit a change to set vfs.tmpfs.memory_percent to 100 > by default, at least for now, and if that works around the problem. > This is easily reproducible with poudriere, if you try to build some ports/packages which are big memory consumers, for example any chrome variant or just lang/rust, I have a machine with 64G of ram and it is impossible to get lang/rust build in poudriere (USE_TMPFS=all) without setting vfs.tmpfs.memory_percent to 100. the poudriere dies with plenty of no space left on device. Best regards, Bapt From nobody Mon Jan 22 15:36:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJZ7X5fCQz57dRr; Mon, 22 Jan 2024 15:36: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 4TJZ7X57q2z4MmL; Mon, 22 Jan 2024 15:36:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705937768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1V01mDDQcuIdhroJ06ck0nMmYhPSSWQmeEGFzdI+SAE=; b=aMmbzAOsj8KFfI0LSpUgSw1ocLQDWNqOYkxO2JIg+oH4rDPnpcvqMbMvalmD/c4oI0fZ/4 gYWVD8S7sMlaKWmVwmqfazQUlKHJZQShXZUTHbv2uAghuE5QsGsBMq4NUivvaKm6bp70Lu narzipa6scZJ0AFTo9vGwPBbtkVQTC5XXdasYXAq0icZrhH19mbn67IiZnXZ5V+FgsGcqH xL6iNGxUEgOicil4ah7kBJ/XOcuwDGto0ytJy495Tu8LlPklxhpA7X5dDCeV1FsuGUN/ZX vaQZmKizQPCrjfdEMOLgm6bzv7R40ZuXRVk0kSJ7qAcSmShxj0vv5aCl4LnzQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705937768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1V01mDDQcuIdhroJ06ck0nMmYhPSSWQmeEGFzdI+SAE=; b=Y5DevIVBiysIBGfoyMBeXcce6rQJmqvcuPtUE+7ZwaqS/AiONbSPiNmWjvy1DpjzfKXbB0 UghM3WTcXZU+YsOhzs1x2JiniYJ9M32dw1qsS8k8lxuW2UXmxXWxZ8nx6+9a4B19a1NVgD URzyswZBVVM/uGYNed7+WQc8tR64Kj+BpOhILi8DNEeeEIt3LDFJRnoGeg13gLqXpem/8u 3QvRVaArDF74tp5f8aHTBNXo+Hp3Gwl1zZx+HHYrFjPJAioL72A/BW/8hSzB6shAJKfqNK saCQlbSImIv04QAVOiak5+1zoJsPymWUF2bCylEhhdSTGkTaKmtCPkb2BKEsRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705937768; a=rsa-sha256; cv=none; b=K/K9bbPptsBN4EgpuClumMHNS5ud1yj2+DFaukXftlLkZMspzVVN2pBaB3mTa5sUwRT5uv NXRlU/vEMQaoRbwF3p8+sETwxNhi40/yHQwuKSAuRx5fBq85aBNDPfHcLvNMWoYHWbfdmw NMKWYgnWhMxeZaQC5wC9AUYX89HKHDPE+5gSkF/lDqdSYaZ04lWCtnUoYfty5ENWWkRP4i RBHjJ6a8ap9uPsgWLbgPJ3pTcoEvB/lJJzmG1ULU0YsWtrysTVNZZpPw0VtK4sw+o+uEM0 AnmegHwfj721ZZQQNfO7IR+Y4bcShS7XYlaRveKSA4qXdP+pD7ut3SHP6BbiiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJZ7X4Bb8z16pr; Mon, 22 Jan 2024 15:36: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 40MFa8qE018363; Mon, 22 Jan 2024 15:36:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40MFa76T018360; Mon, 22 Jan 2024 15:36:07 GMT (envelope-from git) Date: Mon, 22 Jan 2024 15:36:07 GMT Message-Id: <202401221536.40MFa76T018360@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: c19fb1f963e3 - main - sqlite3: Vendor import of sqlite3 3.45.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c19fb1f963e3dc88a82b20d1b17f94a4cd321e74 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c19fb1f963e3dc88a82b20d1b17f94a4cd321e74 commit c19fb1f963e3dc88a82b20d1b17f94a4cd321e74 Merge: 57c50d6b3673 cdad538768db Author: Cy Schubert AuthorDate: 2024-01-22 15:35:06 +0000 Commit: Cy Schubert CommitDate: 2024-01-22 15:35:06 +0000 sqlite3: Vendor import of sqlite3 3.45.0 Release notes at https://www.sqlite.org/releaselog/3_45_0.html Obtained from: https://www.sqlite.org/2024/sqlite-autoconf-3450000.tar.gz MFC after: 2 weeks Merge commit 'cdad538768db9e2c8258d19e9282fb5aaae80e46' contrib/sqlite3/Makefile.msc | 1 + contrib/sqlite3/configure | 20 +- contrib/sqlite3/configure.ac | 2 +- contrib/sqlite3/shell.c | 3183 +++++++++------ contrib/sqlite3/sqlite3.c | 8087 ++++++++++++++++++++++++++------------ contrib/sqlite3/sqlite3.h | 152 +- contrib/sqlite3/sqlite3rc.h | 2 +- contrib/sqlite3/tea/configure | 18 +- contrib/sqlite3/tea/configure.ac | 2 +- 9 files changed, 7698 insertions(+), 3769 deletions(-) From nobody Mon Jan 22 16:23:18 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJb9y3HC9z57k54; Mon, 22 Jan 2024 16:23: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 4TJb9y2psGz4TWw; Mon, 22 Jan 2024 16:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705940598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UEIaP0R/JUz9BY+FX86TFZE9V1Tyb+BZ+HBGaHGBKSY=; b=reQETbBd8TJpuEPdvRkPUfWllehqazuWAg28Y4o/U1E3FHO4viK5yJt36LL2TNbHzccbYg rb0kl4U8TIV+3OlMjDXDHZ6jrT4RNxvzTJdVwXCfkJ7Vq4FPNYZQKv4Tzg/yYV3L8Tz+aX NpA2AU6j6RDU0trnEooq08qJyXMQus9iKu+qd6RGFjGgH+GoXUNeQ+nmGUazSgkJnJ6fdf ozx2HTwm30neJNH+h5spunA01hsh/QjrTjFo0P0isxGGTRTYQBSy3YIHlUs+ty5OAhN3wQ xx+sgXhNVke4+gdjgadelHzcr5IGWMBH3cB8Vp7tN0fnukbIchVAGqd+WCKZhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705940598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UEIaP0R/JUz9BY+FX86TFZE9V1Tyb+BZ+HBGaHGBKSY=; b=CFFTqQbSPHPXP8KMCV8Pnv+uP8PweTf8IVj4hRWfv5LHOQ52RkKusECx0S9oy7ztSUW00s J1TM0Sahnn48LyyC+4CQfQBlkrv72pLfhLnXnpyzkFsqYAikrSmogRCDFkeK7oDWrL8/sQ jvhT1l9BnrXEzILJq75y2aiUYajHlL1V6uEaR5GINsAwEOjqGM2ABYui9oPV4tU+t4Q2Xo aeY81joA4Jp077DISm8VNkATZl5TQ7xUIqPwYRjSyCJQ7AHSC4wjoAiWubJInvqnAn2agR Refk8V/Lmdto9qh7CkRVSR2o72nwZnd5jlxv62aeXIAbyt23YxLNrEuKMHYVEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705940598; a=rsa-sha256; cv=none; b=KpjPFsAkLW/qkKgTJpdU4ywfZ9ZH5f0OrB4kisQptrS66EgrjCBT6pJOcd/CCzMuLcb2vv omxDWuZg1bcKb9YWVuH0MeIpk7v0SjITgUYj/0/IR01+fhhIZBKF9Aqs4Onz57QyvJoBDV MbP/WLW0HWzVIVSKSr/T92GP0tfRkMcPdP6iJHkMf1/rRUWFuWb/EMekEbtRpEmsGru/nm GtL3z1/cSdHuqXc9leKOvfoYbQrtYUhsQXxXwfoS6PTuLa/bkHOWzded8+EQjk/mGXtmrl u4CUfutMjtTPZDRz6YSLgp81RDfeYrdzJ0KOXNPKvw7EjuWm//dKwNSmk50Xcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJb9y1tFLz18Gc; Mon, 22 Jan 2024 16:23: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 40MGNI7I002558; Mon, 22 Jan 2024 16:23:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40MGNIo7002555; Mon, 22 Jan 2024 16:23:18 GMT (envelope-from git) Date: Mon, 22 Jan 2024 16:23:18 GMT Message-Id: <202401221623.40MGNIo7002555@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 43be2d7aaf25 - main - wg: detach bpf upon destroy as well List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 43be2d7aaf25b719aec8f49aab110c0061f1edec Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=43be2d7aaf25b719aec8f49aab110c0061f1edec commit 43be2d7aaf25b719aec8f49aab110c0061f1edec Author: Aaron LI AuthorDate: 2024-01-22 16:18:56 +0000 Commit: Kyle Evans CommitDate: 2024-01-22 16:22:44 +0000 wg: detach bpf upon destroy as well bpfattach() is called in wg_clone_create(), but the bpfdetach() is missing from wg_close_destroy(). Add the missing bpfdetach() to avoid leaking both the associated bpf bits as well as the ifnet that bpf will hold a reference to. PR: 276526 MFC after: 3 days --- sys/dev/wg/if_wg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c index 58c0e2db1ee8..c7649e2b4059 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -2876,6 +2876,7 @@ wg_clone_destroy(struct if_clone *ifc, if_t ifp, uint32_t flags) if (cred != NULL) crfree(cred); + bpfdetach(sc->sc_ifp); if_detach(sc->sc_ifp); if_free(sc->sc_ifp); From nobody Mon Jan 22 16:24:38 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJbCW0S3Tz57k7L; Mon, 22 Jan 2024 16:24: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 4TJbCV6lXJz4Vbd; Mon, 22 Jan 2024 16:24:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705940679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qW6YpP61NxaWh8RCYEYmTYnSd1Be5AfGYMF+D0tg3m0=; b=WSWnDyDxgWS0fLrip46F+cAv2Cke6JZZ6AqetghuACQQHbbR1vhalxrgIp5B4vpkArF+IM ePFJZ475TU8CFeAbloLo9J9lRsMgL0UW/kkTQCjGDOhHtR0AV74M4rboTeBFKe6/A6CieO iYBK3WD6ywtY+h8VzaNzwl8jtttGfwnQsc09jSg7lvjY0ZcJ7z6MWkec9aQZH/cKFGWJOw ACQWs4+xtkmg67fIy9jas1KVsui1p5T2Fya4UgfB8/tKsp4zkiZiiwIHqlItVWSTyG9adv ZUa4bAP0y/KLrvGvwdp9KbHll2DrvVTyL78DJDDQHycXxbnyEFSV4ndHRmHaCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705940678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qW6YpP61NxaWh8RCYEYmTYnSd1Be5AfGYMF+D0tg3m0=; b=scPJ+kQ/S1gwXUjjMDGFAhfGO6e1nGcH2GUJfGZj656+B700179Mu/TUXjZeAVgnb4UYFD uhMw4jEPSEhag41TdrbXXGunr2VO0pT2IfFHXeuqClAydkfi6FKVKxqPNt8XGlVcvZfVTD T+mKd8ZVyCtFqOaQZTh7CXuQs+EKHFXTY8v83lCzR8U7C2Y1ckw4i7RkqkJ9c5ITPLDZRP HgUi0wJvAOGb7jHMp2u2LekZ6IftVaTK8BSuDD8wFExojm/c+ivluO+Ml4+FSYcV8qzpRd huCxoBpRb8NnRfJVk913rKWaFzd9dMF4JElDoYQmCPAqfsPbM8Sf0tUbYjyUzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705940679; a=rsa-sha256; cv=none; b=GEl/TzlT8Iue2meU1LxukyHtosTQOF7NDeQ3/ahfKzzfuL/ruPuIusc9Rjk8AsYZE3VklR Y9YYuaxVpL+NGNwmyWu6/1iy0I003l9rWXsGNw2WngOn9tr9t1Opp/OaTO5fpXKcH7f//W 7F/1GoJP7agoXrxbOQH5TY/JNU5GTx31JZ5XncML330eCOKkD68h68Pz4WW4//abViRI2m HIxte6nRZQ02ID0DjXNy4hwkTDO2Z/9BnFEEs0e7dxjrP7M6Y0ReYVc3ael5THOxufGnrs JXRC33xjqBnL3sK5Te/ourmpmCrn9Ee0kVBvEIRK70B8eLkbm4xPRp9QO7u3yw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJbCV5n6gz186g; Mon, 22 Jan 2024 16:24: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 40MGOc8p002873; Mon, 22 Jan 2024 16:24:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40MGOcwP002870; Mon, 22 Jan 2024 16:24:38 GMT (envelope-from git) Date: Mon, 22 Jan 2024 16:24:38 GMT Message-Id: <202401221624.40MGOcwP002870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Pawel Stefaniak Subject: git: 8297ff13fb60 - main - tcp_wrappers: silence a few warnings List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pstef X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8297ff13fb604c86797e6a66bc654caff2cf3ce2 Auto-Submitted: auto-generated The branch main has been updated by pstef: URL: https://cgit.FreeBSD.org/src/commit/?id=8297ff13fb604c86797e6a66bc654caff2cf3ce2 commit 8297ff13fb604c86797e6a66bc654caff2cf3ce2 Author: Piotr Paweł Stefaniak AuthorDate: 2024-01-21 10:15:48 +0000 Commit: Piotr Paweł Stefaniak CommitDate: 2024-01-22 16:23:49 +0000 tcp_wrappers: silence a few warnings Mostly -Wdeprecated-non-prototype. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D43531 --- contrib/tcp_wrappers/options.c | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/contrib/tcp_wrappers/options.c b/contrib/tcp_wrappers/options.c index 481ba2d372d5..26e98db8ed95 100644 --- a/contrib/tcp_wrappers/options.c +++ b/contrib/tcp_wrappers/options.c @@ -76,20 +76,20 @@ static char *chop_string(char *string); /* strip leading and trailing blanks */ /* List of functions that implement the options. Add yours here. */ -static void user_option(); /* execute "user name.group" option */ -static void group_option(); /* execute "group name" option */ -static void umask_option(); /* execute "umask mask" option */ -static void linger_option(); /* execute "linger time" option */ -static void keepalive_option(); /* execute "keepalive" option */ -static void spawn_option(); /* execute "spawn command" option */ -static void twist_option(); /* execute "twist command" option */ -static void rfc931_option(); /* execute "rfc931" option */ -static void setenv_option(); /* execute "setenv name value" */ -static void nice_option(); /* execute "nice" option */ -static void severity_option(); /* execute "severity value" */ -static void allow_option(); /* execute "allow" option */ -static void deny_option(); /* execute "deny" option */ -static void banners_option(); /* execute "banners path" option */ +static void user_option(char *, struct request_info *); /* user name.group */ +static void group_option(char *, struct request_info *); /* group name */ +static void umask_option(char *, struct request_info *); /* umask mask */ +static void linger_option(char *, struct request_info *); /* linger time */ +static void keepalive_option(char *, struct request_info *); /* keepalive */ +static void spawn_option(char *, struct request_info *); /* spawn command */ +static void twist_option(char *, struct request_info *); /* twist command */ +static void rfc931_option(char *, struct request_info *); /* rfc931 */ +static void setenv_option(char *, struct request_info *); /* setenv name value */ +static void nice_option(char *, struct request_info *); /* nice */ +static void severity_option(char *, struct request_info *); /* severity value */ +static void allow_option(char *, struct request_info *); /* allow */ +static void deny_option(char *, struct request_info *); /* deny */ +static void banners_option(char *, struct request_info *); /* banners path */ /* Structure of the options table. */ @@ -197,9 +197,7 @@ void process_options(char *options, struct request_info *request) /* ARGSUSED */ -static void allow_option(value, request) -char *value; -struct request_info *request; +static void allow_option(char *value, struct request_info *request) { longjmp(tcpd_buf, AC_PERMIT); } @@ -208,9 +206,7 @@ struct request_info *request; /* ARGSUSED */ -static void deny_option(value, request) -char *value; -struct request_info *request; +static void deny_option(char *value, struct request_info *request) { longjmp(tcpd_buf, AC_DENY); } @@ -250,7 +246,6 @@ static void banners_option(char *value, struct request_info *request) static void group_option(char *value, struct request_info *request) { struct group *grp; - struct group *getgrnam(); if ((grp = getgrnam(value)) == 0) tcpd_jump("unknown group: \"%s\"", value); @@ -267,7 +262,6 @@ static void group_option(char *value, struct request_info *request) static void user_option(char *value, struct request_info *request) { struct passwd *pwd; - struct passwd *getpwnam(); char *group; if ((group = split_at(value, '.')) != 0) From nobody Mon Jan 22 18:20:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJdmk1PgRz57wll; Mon, 22 Jan 2024 18:20: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 4TJdmk0wLHz4r58; Mon, 22 Jan 2024 18:20:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705947606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IE+ehwLtOheG8bKkZzRtFvcvDqyQWaHwrLqKcnMwcFY=; b=teaKNdNziQ1lPDoKU8gAWUfJwugPA88pn8A4oXFNFooodsu4uESykpanqaZgUVJVwgHeL9 gO8nqh8X8fM9nALjL1o4XW4wUcJfeQS6aCyDxamASA4ZuMK13E85p5ilfCmAhGiWXk7DId meq8+1zCZ/KA3IZJKqwH2AcNJdYGPBO+doAWiC0t9Jw9UPj23FtcLai5fNRfJPX+W9u8my z/dHiY2cdwyn9jZncXOAxJ0+JNE+X8sSELL3ICzTu9/Wv4RSx2LeM7O4RGgdl6k1jRg0fq XJrUw8O5+t3F5Ta+FGJMJ7YPRTysMej0KfvTte6Pu9whJLWnGxZxdajHRFj6oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705947606; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IE+ehwLtOheG8bKkZzRtFvcvDqyQWaHwrLqKcnMwcFY=; b=J8G7bESHYVOhOuS78K0N9CNsN/f1jFUIen/PtVEJy0D9GUZuC8b9F6EENk4LI2IWxqCvPe kCdK9qs3kdk0D2Om1VVkNj2hxiCZBOb7LeWeJy1e7CNzfQB3XNSehdmTK+DTetr/XpgWLL AGiaek7OU1oQ0hK+XvM5TdmYAqKbyPpD3EPVLRy3j7QQYg7lgIZ1zuRk162EIWzW10085W S8yTpXMYvbI4LxlD/Bn67SxtDegl7xgBFTqgS4S+gb/RZcl/oduvMmH/nA0JbsR4hiv5wJ xRIe3VwvTAxhc5aeGq/mlYRuonfYmu7yoMvy8ORjfzrgWLXcnNbvaipGOmbC2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705947606; a=rsa-sha256; cv=none; b=UdQO0tti7FRPdTq/JLZm3FBtOARQ4DKNVR0bvtEfD+jU1TG+GUB18ylGkZSiRnFaKdjsps dH60zJ1CSQ9g92e9IwLbRjnWlyaPqrxSVck2ByAkuu8Gkgkl72SrCpIoPLwoX06Dxup4/5 vFd0lHdo06sEfjwe+X1l4WJ1opik5D9drrT+oOwU3KKfCq1ze7GejSD0UlaHKSEj7n2WFJ s4zsVpu3oIM2mw6Z4kSd2ZP1Qu3J5Y9t1LnxkMtbM5eKcaXHrFnctmDR1z2l46bhjVKRK7 l1Pen+ziFDqEa4336U1gtZFJwspojVO0SgLeZmVRHU38cg7hSAFzMkN5b6UfHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJdmj6zphz1C3Y; Mon, 22 Jan 2024 18:20:05 +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 40MIK55l096575; Mon, 22 Jan 2024 18:20:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40MIK5r5096570; Mon, 22 Jan 2024 18:20:05 GMT (envelope-from git) Date: Mon, 22 Jan 2024 18:20:05 GMT Message-Id: <202401221820.40MIK5r5096570@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 484e977f2441 - main - pflow: observation domain is an unsigned integer List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 484e977f24418afa848d7ea1531b4379446d6065 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=484e977f24418afa848d7ea1531b4379446d6065 commit 484e977f24418afa848d7ea1531b4379446d6065 Author: Kristof Provost AuthorDate: 2024-01-22 16:34:44 +0000 Commit: Kristof Provost CommitDate: 2024-01-22 17:02:10 +0000 pflow: observation domain is an unsigned integer Ensure we print it as such, rather than as a signed integer, as that would lead to confusion. Reported by: Jim Pingle Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pflowctl/pflowctl.c | 2 +- tests/sys/netpfil/pf/pflow.sh | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/sbin/pflowctl/pflowctl.c b/sbin/pflowctl/pflowctl.c index 35daedfdf478..4186598dd9bc 100644 --- a/sbin/pflowctl/pflowctl.c +++ b/sbin/pflowctl/pflowctl.c @@ -340,7 +340,7 @@ get(int id) if (! snl_parse_nlmsg(&ss, hdr, &get_parser, &g)) continue; - printf("pflow%d: version %d domain %d", g.id, g.version, g.obs_dom); + printf("pflow%d: version %d domain %u", g.id, g.version, g.obs_dom); print_sockaddr(" src ", &g.src.storage); print_sockaddr(" dst ", &g.dst.storage); printf("\n"); diff --git a/tests/sys/netpfil/pf/pflow.sh b/tests/sys/netpfil/pf/pflow.sh index 3cef5f5a2d98..10efcbb93ac4 100644 --- a/tests/sys/netpfil/pf/pflow.sh +++ b/tests/sys/netpfil/pf/pflow.sh @@ -282,6 +282,30 @@ rule_cleanup() pft_cleanup } +atf_test_case "obs_dom" "cleanup" +obs_dom_head() +{ + atf_set descr 'Test configuring observation domain values' + atf_set require.user root +} + +obs_dom_body() +{ + pflow_init + + vnet_mkjail alcatraz + + pflow=$(jexec alcatraz pflowctl -c) + jexec alcatraz pflowctl -s ${pflow} domain 2300000000 + atf_check -o match:".*domain 2300000000.*" -s exit:0 \ + jexec alcatraz pflowctl -l +} + +obs_dom_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "basic" @@ -289,4 +313,5 @@ atf_init_test_cases() atf_add_test_case "v6" atf_add_test_case "nat" atf_add_test_case "rule" + atf_add_test_case "obs_dom" } From nobody Mon Jan 22 18:20:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJdml1dn7z57wc1; Mon, 22 Jan 2024 18:20: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 4TJdml0sL4z4rGH; Mon, 22 Jan 2024 18:20:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705947607; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JZsVyPx7NUNMZ6mLjGOZwJvHx+lOFICZ1WsA97P62iM=; b=EbXhXwLyw6/b0ZhpqMD/48ztmm53ZqE4GhHTHL3LB6rmkfVR1/N/aX44ALhWgZRMZQFHj1 8yD8SrAqsMUXDyYGZOgTZH0FTdg83dm1VoxC8ABp7AlDbIYOahc8qCmftYfeLcxpZyzs2H e2lblM3LnJA4p/PVkt65WxvzCGIBxg3bP8/z9df0Xe5i4hcBV52uCmNwtYJ9d7WiVyn1Wf DAUaHQEo30ci9QPGyr+JGBAFsQvZ0Tt4ciRk/nYY+S+301wD6t7FHT1rH/VL6wBaw1OGGx CnuwD+o5rqnBExheMvC9xe8hh2ezTSTasW020WIgisvUjxCQGypi+Z53/LKEIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705947607; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JZsVyPx7NUNMZ6mLjGOZwJvHx+lOFICZ1WsA97P62iM=; b=wDE7KMF7pp78RcurygddjQdfTbAcRqLtswaN81oGb7O9mcBPhdoPWEOCANbaFNnt33O4bB do4pyHx0vWmQvOTk60rCxbtT9Aw+fuNQxYtsJjAu5e6P834y5RPytinVlFwLD6DgnR+mtz esILH0Yb6TistzgQNCVbLcs2vLOOEOkVJ77AkOcVCdlPcIbnVckWMj5z75pi4bh/OEUa2O t8t8ktQ4JyXAkueCW6h9LfK6kbX5QB3vNGRtQI1EE3Dd/z1HPT8kSdQD4V1e3/iUxRreG4 mKiB9T3yIG8M/1YXV7iuyshpgVFDWj8WlWt3g9rRZuX/XMf4rZ1guOlpT9N8iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705947607; a=rsa-sha256; cv=none; b=fCqPH67tD3xHanNCzPK2NHptWOiDJUb/rfXXMlJiexzGlz/gBIXPUs7/09IeK29gdUjM/e gZMxGPHELUPCweHddLSTuqZ3rD61NJwBBDDDBaMVU3z3QiFjpGqYXIN/sIUDz1NSN0+yVY yygKuGZUwuUXa5h34zg5KTVcwA/YvPVooStKlMSYAhmaNMbTebbDKECJZ90zqV9/6GDDE+ jYw7wa9ARzBfltvKvasbP7dGlbSjzQmp9ybZG7kE/OPik2d46qdJpxijjSiJ/3zFwEE5Wr FLet3W41HzkLy8+ojVURXa8bYmTI/WUVAwCIUsuebD15xVCHfQt/GJAz4VDlew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJdmk724lz1BrT; Mon, 22 Jan 2024 18:20: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 40MIK6m0096862; Mon, 22 Jan 2024 18:20:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40MIK6hm096858; Mon, 22 Jan 2024 18:20:06 GMT (envelope-from git) Date: Mon, 22 Jan 2024 18:20:06 GMT Message-Id: <202401221820.40MIK6hm096858@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 63a5fe834354 - main - pflow: limit to no more than 128 flow exporters List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 63a5fe834354dc9249388e0805e6ea68dc9f02c7 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=63a5fe834354dc9249388e0805e6ea68dc9f02c7 commit 63a5fe834354dc9249388e0805e6ea68dc9f02c7 Author: Kristof Provost AuthorDate: 2024-01-22 16:35:54 +0000 Commit: Kristof Provost CommitDate: 2024-01-22 17:02:10 +0000 pflow: limit to no more than 128 flow exporters While there are no inherent limits to the number of exporters we're likely to scale rather badly to very large numbers. There's also no obvious use case for more than a handful. Limit to 128 exporters to prevent foot-shooting. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pflow.h | 2 ++ sys/netpfil/pf/pflow.c | 6 +++++- tests/sys/netpfil/pf/pflow.sh | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/sys/net/pflow.h b/sys/net/pflow.h index 456e3de52ab1..4c194e14e001 100644 --- a/sys/net/pflow.h +++ b/sys/net/pflow.h @@ -39,6 +39,8 @@ #include #endif +#define PFLOW_MAX_ENTRIES 128 + #define PFLOW_ID_LEN sizeof(u_int64_t) #define PFLOW_MAXFLOWS 30 diff --git a/sys/netpfil/pf/pflow.c b/sys/netpfil/pf/pflow.c index 0000aa05ee0d..17a68e0d9e57 100644 --- a/sys/netpfil/pf/pflow.c +++ b/sys/netpfil/pf/pflow.c @@ -176,7 +176,7 @@ vnet_pflowattach(void) CK_LIST_INIT(&V_pflowif_list); mtx_init(&V_pflowif_list_mtx, "pflow interface list mtx", NULL, MTX_DEF); - V_pflow_unr = new_unrhdr(0, INT_MAX, &V_pflowif_list_mtx); + V_pflow_unr = new_unrhdr(0, PFLOW_MAX_ENTRIES - 1, &V_pflowif_list_mtx); for (int i = 0; i < pflow_ncounters; i++) V_pflowstats.c[i] = counter_u64_alloc(M_WAITOK); @@ -1343,6 +1343,10 @@ pflow_nl_create(struct nlmsghdr *hdr, struct nl_pstate *npt) ghdr_new->reserved = 0; unit = alloc_unr(V_pflow_unr); + if (unit == -1) { + nlmsg_abort(nw); + return (ENOMEM); + } error = pflow_create(unit); if (error != 0) { diff --git a/tests/sys/netpfil/pf/pflow.sh b/tests/sys/netpfil/pf/pflow.sh index 10efcbb93ac4..f0552eb061da 100644 --- a/tests/sys/netpfil/pf/pflow.sh +++ b/tests/sys/netpfil/pf/pflow.sh @@ -282,6 +282,37 @@ rule_cleanup() pft_cleanup } +atf_test_case "max_entries" "cleanup" +max_entries_head() +{ + atf_set descr 'Test that we can only create X pflow senders' + atf_set require.user root +} + +max_entries_body() +{ + pflow_init + + vnet_mkjail alcatraz + + for i in `seq 1 128` + do + atf_check -s exit:0 -o ignore \ + jexec alcatraz pflowctl -c + done + + # We cannot create the 129th pflow sender + atf_check -s exit:1 -o ignore -e ignore \ + jexec alcatraz pflowctl -c + + jexec alcatraz pflowctl -l +} + +max_entries_cleanup() +{ + pft_cleanup +} + atf_test_case "obs_dom" "cleanup" obs_dom_head() { @@ -313,5 +344,6 @@ atf_init_test_cases() atf_add_test_case "v6" atf_add_test_case "nat" atf_add_test_case "rule" + atf_add_test_case "max_entries" atf_add_test_case "obs_dom" } From nobody Mon Jan 22 19:37:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJgVF1dczz584l5 for ; Mon, 22 Jan 2024 19:37:41 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-20.consmr.mail.gq1.yahoo.com (sonic305-20.consmr.mail.gq1.yahoo.com [98.137.64.83]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4TJgVC57y7z44Bb for ; Mon, 22 Jan 2024 19:37:39 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=lUxkTIVN; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.83 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1705952257; bh=0g3hRfuf0rJ36XR4M0MW/y+RIm9bdZlpkfA+MIzmBW8=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=lUxkTIVNPMQrJUmZHINTA2iwfBzRd6ynhShLQND7bM/IVXnSwir3pIkS7oOH3NZjAG0ef1AHCCExFJ7nR73Om42ObYPiAMX3JHZZFAAhaYXDVhwutaCv0KSQwJFWkqv1y6GdqoSH33lgBMzB6RRjoh1VhcqKg6/eTz56OLSDsDg9LKMjf8SmafA1FpQocFvGhbWaPK8Ptp8yZVSIUVsgC2K1mRqRbB+87fuPXOAJBO35k+PxMHHKUJa3GNp9PbVV1AgRm2vind2iAuKE3FCH6jt2ka33GJKHxfkXTK+RTGOvDYz5l134wqbqExH5+6ZM38SFtlw8FZwnnliTUTCaUA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1705952257; bh=49mJ1DEE09C8/WkRDa9FD52j0Q05c9VtnxVxu4b7h3s=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=UIPaziFzH9DnJppcata250hWUoMZMLpXilx0jd7kztAeVsu6D5IHZZzXS8IA98BO+FLTMrQUt8Mnw4pSDFSzdW/szd1bXjZu6ux2e/hEPWkQblK+lElNkxJTsJb/ZR71QBYfC+NhxOs+JroVtqRdW7vJyMGASXAOIC818aX/XN6dc+XPIYCorsJM15C2jo5r8BbV3Il8P4D6o2s3ihqHnwhPERghTDlx9EksrEbaWNXnDBatJk1LNKsAOVOP/BVV+crPdnYIrO4ZFGB0gOlYuw5buL+Olv7Gpt0sDbBQzbTD3AMUPJ1e0C8mkw74xGpcI93xNriq4uCf3LA6AHRddA== X-YMail-OSG: 09vmQvIVM1lCb.cOEEa5hMokD6QfJ.qSEf353FIjWDOoZPICEcYOKUiTuZwA6Ar Q3oXPz03j2pOT49wO908lpUb6ZHGvH6jIAiWfdm1785VqusXYXapEbeFDFAjtaAQKoxMvXUJ2tCh 5HRwtX1fbirzc31yBUuMoN5gdnUdK4L12uc8vzih_efULnX1he.XLsFgronFcXLUOe.OriqQQ2mX trsHW4_ZG1pHZYLEoWcfLQ9K8lyjiXXcqFcF7pZFlm10V.hflt5mTRLNRhlz_usqIoY9JI.4in3G R3NNwMrXXAjBjq7gCc6mzsqtf1rHpvJPGfVnd.AlrxhoYcSIXi.X8K0IqOMN_ne3A_0sHewl62Uw kUJUAdDWuwJ.C7_lBJt5BlKZTEGJSbERxDSdKISpnJ4KWfMA2o6uNSigRNnfuij3k4xlsvIvhXO9 RG4mLD1LITTr_133mv8pMe0PnBaPHajUOzTf7N4v_KZCDqDWeXzoruLc3V7yVz9j_1l9EZq9dNN0 kEI_Kp39eirJVzov46V_E0s133zbkV6XDdokJPCXYNqwy52jr9v5cQotAxA8x0zakrkdpRjsRk_a _4hrVMjquaPkf9iboBLNUdIGD21gWIXmR.uHwHk6EJLi22h5Wj6xOuvzGMGIsPp6aURIDcerLQvB ZAsVMtdetOMCfT4xM_rPKL.1DD76CMx8xQgA6rNEY9A2N2iUdS.pY9Fy3TkY6PQ6637i.oCozzAh 0Iv0DXKHaolvBs3PbjB8DDT37hp_hWfHC9lKW9wnfQSNpGl5p21B8eTAsGaQYhnfaDGtFCWPMNv0 113uM8hWZVowFGb3HFasutlVqiuNFMJa1CapCDaWtmr9V5JBC1.Q4ak8lqeDe1ZM8.teQwCBBWq. Gg.NBhP0mezsUZyxhwyMKLzPyiu.dRUbCxC5VKpo2u0CgmJOi_dzJW7CbLrkh3YekKwy7_Ehgp_2 qTCYWNI6b._zt3Mc405Qw4FIDv1sdOPXJNC6_q8gREVEONtE.KmnoPduAgiE4U3930l7009cuyCY I3Lcl10gfiQnF5riFAAghTTjgVDlFjE.e6MAIkrM81OzXS9I25apHbRGgK7ekdk.RMRk4z1JXt0z ZmEgARtqDEFEQrkqJh5f.KOgtBDJRBFVEaNhnQjZuBk02GRVl1vslAjUw.d4VEHgTK84xtd8Bzb4 xDqPREkQaCMygGFcP1asJr9.f0Md99bfDgK7B5_GSh.Zi7CeCp6O2Ein51MwjC0hFn4Gur_AMxf4 tGFTbUGUEmdpBJDtHfr6BzGlpzLqdgFdNwQgSL_PVlRIGfbA2X4o7hxyFqlTw0lciBC0Hw36VOK3 8P9bMbIiHG8a_ns8WGToSLojIUcAn7xb0fcM11ERHaJk1aBi20no31NWFbJ.UCNWKReBNuYmIVdV CbjfvhW.ei1fleDBcD7_PrXMLZvR0tndQiX3pFK.dsixbV4if4ajP5AlO5OddwCUCGf736C0Y1iZ OR3ApCMM_5O.EnjKjnQXSI1NbNQQuONSQBBqXJvDx7CatIdYQ40yT.U7YLhESQtsg543j1EdMqkK dOVk3ACmweMaDDUxCd.UIr_ufGGfDZAaEERZccDmQ74VXpm8fyuRGXG0TQX85b1UxT5aDDMMW2me kc0knYpHGie.Fgs3lM31kyOYoC7XNUV3eWcCG2GMhgEyWKh2A6NJQSyNmrIGoKD4vYexwkIgl4t. cWcA3FyBzA2Zkf8rJHZSphoudPeA1l.KKv0bucZlQCi6RUaV1V.RAz6B9PBRE4T2jkzIxFIh9BAN 8XYYfNBWeKdysgFxL1XXsIDDBCKVoxHhH93foDhRmgImUJu.itxYTexsCH51Zt6G0vJXNwNW8QEs qCxCK_EprhPBDklpwhl1P7aFEw23CJIHA.NThjfPq13JteddT5hIKzTxyg_5lHo4A5J8i6AqnITY 8aO_b0Y.d.rSwTGQonl91Ro_TMNvnNPNXCvQWZappNdFJFEI_dLIrclIgWO2pmQFGZ_6pipl6pW8 6mJgbLWD.ks9F5K5.7rBqNjbfIMnH8xsWQuoaa.Km7TtNLyPlohHICedXag67uWT2HJ3HX7lIrvZ CPC8aZuTHtHo8f83Zwn9GzW0F342qcwP9mHa1utcs9kd9nQiKEr4z1Db.4cgOqOtzTMpAclNEqWQ K.1yn8PvZudI9vPV.dI4pkjUw.eXdp7vkS5l71UQQdvaGqSp3eOfWusTeqeE6tpgbR_ioErsyY_8 ZKFOHQbLlxb0oEQ5Js1GmlGzPL3NlD99p4Vj1lLWtFSx3.bzBvM7xW.MYUXk.F48hE2Kba1P.22I M7P1fl2.M0H13L7ruNQ-- X-Sonic-MF: X-Sonic-ID: 65cc2774-6786-46bc-b2a9-64a09ecd0408 Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Mon, 22 Jan 2024 19:37:37 +0000 Received: by hermes--production-gq1-78d49cd6df-k5hld (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID c4a9d5619fe09eda10e706b90849506b; Mon, 22 Jan 2024 19:37:34 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) Subject: Re: git: 636592343c3e - main - tmpfs: increase memory reserve to a percent of available memory + swap Message-Id: <33F50320-DA8F-4913-9197-5AED3D916E7A@yahoo.com> Date: Mon, 22 Jan 2024 11:37:23 -0800 To: Baptiste Daroussin , dev-commits-src-main@freebsd.org X-Mailer: Apple Mail (2.3774.300.61.1.2) References: <33F50320-DA8F-4913-9197-5AED3D916E7A.ref@yahoo.com> X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FREEMAIL_FROM(0.00)[yahoo.com]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.83:from]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.83:from] X-Rspamd-Queue-Id: 4TJgVC57y7z44Bb Baptiste Daroussin wrote on Date: Mon, 22 Jan 2024 13:23:37 UTC : > On Mon, Jan 22, 2024 at 07:15:22AM -0600, Mike Karels wrote: > > On 21 Jan 2024, at 21:48, Alexey Dokuchaev wrote: > >=20 > > > On Mon, Jan 22, 2024 at 03:27:57AM +0000, Jessica Clarke wrote: > > >> On 19 Dec 2023, at 15:34, Mike Karels wrote: > > >>> commit 636592343c3ec0feb61a4d8043676381384420dd > > >>> > > >>> tmpfs: increase memory reserve to a percent of available memory = + swap > > >>> > > >>> [...] > > >>> > > >>> Add sysctl for vfs.tmpfs.memory_percent and the pre-existing > > >>> vfs.tmpfs.memory_reserved to tmpfs(5). > > >>> > > >>> PR: 275436 > > >>> MFC after: 1 month > > >>> Reviewed by: rgrimes > > >>> Differential Revision: https://reviews.freebsd.org/D43011 > > >> > > >> I just got: > > >> > > >> make[6]: Could not create temporary file /tmp/makeDl4i9S: > > >> No space left on device > > >> > > >> after doing a buildworld -j4 on a 4 core, 16 GiB system where = /tmp is a > > >> tmpfs, with the prior buildworld having taken me past this = commit, > > >> which I strongly suspect to be the cause. Whilst I understand the > > >> motivation behind your commits, this is a sad regression to have; = it's > > >> not exactly a particularly strange situation. > >=20 > > Bug 276402 is about the interaction of this change with ZFS ARC, = which > > seems to be problematical. I spent some time investigating = yesterday. > > Depending on the dynamics, I get different results. If tmpfs grows, > > the ARC will be reduced if needed. But if the ARC grows to the point > > that tmpfs sets free space to 0 or quite low, attempts to write to > > tmpfs fail without any reduction in ARC. > >=20 > > Jess, two quesions: > >=20 > > 1. Are you using ZFS on this system? > >=20 > > 2. Can you try with vfs.tmpfs.memory_percent set to 100? > >=20 > > > FWIW, I've seen two people complain about this last week, = apparently > > > this kernel OOM protection doesn't work very well. :-/ > >=20 > > So far, I have only seen OOM kills when memory + swap are quite = short, > > with a tmpfs memory_percent above 95. But with ZFS, it can happen > > when the ARC could have been reduced. > >=20 > > I will investigate more today. If I don't find a way to resolve = this, > > I'll probably commit a change to set vfs.tmpfs.memory_percent to 100 > > by default, at least for now, and if that works around the problem. > >=20 > This is easily reproducible with poudriere, if you try to build some > ports/packages which are big memory consumers, for example any chrome = variant or > just lang/rust, I have a machine with 64G of ram How many hardware threads? How much swap space? You specified: USE_TMPFS=3Dall ALLOW_MAKE_JOBS=3Dyes ? MAKE_JOBS_NUMBER use (or the like)? I assume ZFS but any ARC specific tuning? Not that you would want to do what I do, but it illustrates why I ask about the contexts explored. 16 hardware thread aarch64 with 64 GiBytes of RAM context: I've historically used: ZFS untuned ARC context (but I also do the same in UFS contexts) USE_TMPFS=3Dall ALLOW_MAKE_JOBS=3Dyes no MAKE_JOBS_NUMBER other than for editors/lapce* RAM+SWAP =3D=3D 310 GiBytes (so a little over RAM+SWAP=3D=3D4.8*RAM) Basically SWAP is preventing tmpfs use from running out of space, despite the likes of 25 GiByte+ use of tmpfs by the rust build, for example. Historically multiple toolchains building in parallel in the resulting high load average context have completed just fine, including when rust is one of them. I've not come close to running out of RAM+SWAP so far. Although my testing of "bulk -a" is very rare, such has worked when I tried it, also using the hig load average style. Why ~4.8? Because somewhere between there and 5.0 the binding of the swap space starts puttting out a notice about potentially being mistuned. (It reports on a potential change that I do not know the other tradeoffs for. So I stay in the range where no notice is made.) > and it is impossible to get > lang/rust build in poudriere (USE_TMPFS=3Dall) without setting > vfs.tmpfs.memory_percent to 100. I'm guessing this is implicitly: without having a huge RAM+SWAP space. > the poudriere dies with plenty of no space left on device. I will note that I've not tested my configuration with the change yet, holding back on updating FreeBSD for other reasons. But I doubt that I'd run out of RAM+SWAP, given the huge RAM+SWAP that I've historically used for the context. I do analogously on 2 other systems: 32 GiBytes of RAM and 8 hardware threads 192 GiBytes of RAM and 32 hardware threads (Both having both ZFS and UFS media.) On the various small RAM systems, I use USE_TMPFS=3Ddata or USE_TMPFS=3Dno and avoid ZFS. I also always avoid spinning rust. =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Mon Jan 22 19:56:34 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJgwQ2DV4z586X3 for ; Mon, 22 Jan 2024 19:56:54 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic312-24.consmr.mail.gq1.yahoo.com (sonic312-24.consmr.mail.gq1.yahoo.com [98.137.69.205]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4TJgwP3GJFz45kh for ; Mon, 22 Jan 2024 19:56:53 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=pUBtdLXu; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.205 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1705953410; bh=ffOgC+s71+NIxokuHfqfhqN0fgVQB45vKImS7Xf43to=; h=From:Subject:Date:References:To:In-Reply-To:From:Subject:Reply-To; b=pUBtdLXubbS8a172um97pA3GNvN7h3fiOmPZVC+yP5JiXD+RfqHKzdNpT+ze1Reu6FmObkQlT9sreZRL6j8n+pxZQtW4zk/FTS7cNHvqXYFSdjDE5LsJC8Iuli4wng8iJP9Bbvtz4AYQiWotk/KW4fkNu0O2HVC8ciHEObihvoHFilzl4Ndz3dSlRWbiJX7yPxtlR5HF58ao8lY7414ySValZx4RiuVUarOuGe8r/I9Luwp6hv+KlHvHl/vX1zT/BydU9l72K9LK0klWgRicZJjXhPQKkJ7w7hn1YnyKdYp8i9WwrRbqymUaS2vdgx3NHWe5e2GIiNXAlyMk1nEQOQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1705953410; bh=ZgzTNX4wTUhVD3GToVE+tkwItG0Pswcvz3JSonlWlNf=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=Rz3U0yhuHSXTliKDNfV8V05xn/SsYLO0gG322nJYfQ6eTcP1KeZw6F7OgWLPvxhR3Bf2kq13XKE3JHwEvJqHB+ro/0wTDqx0Soosy8OhxrVzwMXyeyNtjVNKA0YJDnjQx9gvoGTRvzzf14/dYfB/2CgqdydISNUGtdulo5F5JTOrqsJoKttnbVLOnZIlKuXmQyyTVn0Tzy3n+fUz22PTdvIBA8nQITeJ6l7IROTYlI+vyqT77xHicmmA18ACla5VTLaTLCuYHUzpzGgAbdtmJzXW7LiiIVnNaz2JmzSWr5UOXd5EkfKHbDiNiFVijW9jXquprX0B9f/TKlb2NyV0mQ== X-YMail-OSG: Vu1hWD8VM1mzDny2wKXyHsDF7kOs1Q6Mp2c4DjqmY4iRPi2H_ywetxdFiL7p72o llB8.c7fwtm76XGlh23KOIvC3EZDHaVr36_WRhWJLPyVFYJYKv4wq_4Ai3jYYZLJox.BiAfmrbWP BkXfiaSp8Um8iJZZ.48sX00AV1DP0Vb8UBoAtgHspEwCclDoYfT6ILp302uARFc2hXScBWRb4gaP wXrb6ZQdXieL6d37rNjfx26wyLp8GHCjaLIZT7ctoIpFi__bDJnycXWO95krJeGZ0HlnWBmIDxSZ GauKVZGQBYd4MkoH.QGfq0P2aCGKji_5fOG.iehHOV5GES4fZJZrYVwpQDHyBQY7ZAZ8XOZEBQ9e PUIlZJRkOCk0zjczKsEiQqvISVPD_exLuuXdsDuxn7TJnBKsDCQww_8j1mKp50G2Js.7A_Ql2gXu uI4imM.yLSbBU75Eoqx2rDB4tsxwRyCSG1srH6fXq78NAYOXEX9brH82payPg13WBuDGzyWT0VYP pha1cdKav_EHHGNoc_Ye0_ItF2i62EWlR48JoV40I2mC1TSpWhpbX4L6OmwO_L9Z9pdixKU9cH9e MGRyZ9Kva4S.kAP26mjhyMLoFgasSTqPnPlWzDbJA58765.GSJFRePGfGyRk.c7BkyTvvhafOGHE dYUFpcu_Ki2ihSbsuoKmWOZ56AUmfnd6aIOfX8ZAMr.5LqLDD2VTpYngaF93W0Uaz6dMfuLwsUYW ZRUi7xMUWQ_u5o6GCYxj8jJG6lE1HqeJgEE80qCr9c0_.A4dlq7ZfJg3n.bInv2T2cT8tfHMVC9T bCD3yZKBbS4hRXBh6r8AxUecxlVdOVRNVqliog9Ybjn3iv1BLhd_7EdVZ5MxPBukS1blUJY7QPiD 64vKlUPXhmthdeKVNFkhytDcO1mijQ16XDuESFqqXCc40MzwGVmLZzyO1BrUE.gtz6eSbIVfpeo2 vq4tWy3UbO.re1f0NXVtum0iBstKCOu4uFnoh7m2KrhRnx452T3gMqq_E0AV2sgl3FxIlORUI2rn JDgs7laZUb68ArwrMf_qUgyGFOrzb2vVRxfcb1yeD3pcgydevTsMWnDQhKVtAoBxrsaY9Bn9Lqio Mn32V7i32hjTv24lHKtJ.DvoiD7eoRgugshUaALT30v_P_uZEpPrODyFRmt_YSJYK1v0JUWvwK6U jsmhJa3c7U9PPz4DQQ91hLOkP5y_SHQgDoSLwOvE8rUzOmehIN3ymp5mqzxDu779p5qnBb4ZuHYV Wli_sFdSXoRWpnfHyYznUmBqAdWY91ZxzUK709Si9fEuOX5n6kah_A46XmWr8q0DScfBtaK5oeBH G4wUy.woeMMhUCjpEHbfWGViJlDyQSPJzGdK580yL1DqO9Y6q58foajjKMw1p_z4rX_Ss_bKgxnp wPJgKYU9gnlLWOz6rruSjgBqcFql6p74RYL0dXU0WbKHFpx6nZh.ffjBkgsdeuCQDXOxdXyN7i.H xNeY8HgHURTJSC4PkraXswNODA8r8v44LAJs7jQKOtdRjZY47RwEpqpDOxv6PPKHt9u6Tba_OgLr zcpymx10.6dNygV7gBF3Sd83fZ1IrCKNDVwhUwvKybmqZhVtmKnvwASBQegKAZBv7v5QWCpBFvbG 9Ws2en_9qTEROQzN4DQHnyO8q_yFd1BBLxnqQRkPBGSJA9lLxqvoMsmW3LGQOq4iomL.HK1Ahuu0 kW4AWGrxxp8aQVEVKxuXZLadAWqmVBy.unt2FEoYJ0Cm6.s_igx9om9P40MOWL30VME_wI.kDkOr RiEg577U4w6Mz8Q5Qt6Suk.zh7sTuzMUaS1B4l9XUAwjlZghvPcbJCMusH2PzUDuweuvnUddAJJT K0a7QvHKXI.s3oNuYGhW0gJvvNeYO_o4f1VhFzYBUaHd1HjmOH9uuxpS5TUoWOYowaRsbnOwNSUx zpmkY.zcKNNe5EjUWKMjhsWIhi6RX_ya_3kfPNjfQddU1dBZ_bw2e3QBXydqbyXXCH_ghEwkXRlF N5VnVeadLiXR35FM7rTYCqlzrpcf_oYsH4ky1mr7NsJ95q8TnAzLgjao5kkaLseMRqH5NI3Zm811 ZCRWujRfYx.45euz8xui1fVLcaA.8IA4QxWL3GZ8RfOhLA7HBN7DRbLcT19ldxZhZDJRc9y5K03A B_fGbH_8zdToIRhigcHnePbpe_rTRi4qY8UQMM1_bTTVMIBX1rV6gX0rwoysxYe_MVaUugiOqn_7 QkGA6r.ZxSqILR9tHKSl9cSz7TrmUH4BY4.BrKuxwVtimaywO.hf2s5z.BzwaDOA_IvovKUh07tW 8YTz6EPwc9cSbOQH85g-- X-Sonic-MF: X-Sonic-ID: a12f69ff-2ef0-4164-aac2-dddaed5d75ed Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.gq1.yahoo.com with HTTP; Mon, 22 Jan 2024 19:56:50 +0000 Received: by hermes--production-gq1-78d49cd6df-c95sd (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 88f9494b0c4555b12a55aca88dba7b05; Mon, 22 Jan 2024 19:56:45 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) Subject: Re: git: 636592343c3e - main - tmpfs: increase memory reserve to a percent of available memory + swap Date: Mon, 22 Jan 2024 11:56:34 -0800 References: <33F50320-DA8F-4913-9197-5AED3D916E7A@yahoo.com> To: Baptiste Daroussin , dev-commits-src-main@freebsd.org In-Reply-To: <33F50320-DA8F-4913-9197-5AED3D916E7A@yahoo.com> Message-Id: X-Mailer: Apple Mail (2.3774.300.61.1.2) X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; FREEMAIL_FROM(0.00)[yahoo.com]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.205:from]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.205:from] X-Rspamd-Queue-Id: 4TJgwP3GJFz45kh On Jan 22, 2024, at 11:37, Mark Millard wrote: >=20 > Baptiste Daroussin wrote on > Date: Mon, 22 Jan 2024 13:23:37 UTC : >=20 >> On Mon, Jan 22, 2024 at 07:15:22AM -0600, Mike Karels wrote: >>> On 21 Jan 2024, at 21:48, Alexey Dokuchaev wrote: >>>=20 >>>> On Mon, Jan 22, 2024 at 03:27:57AM +0000, Jessica Clarke wrote: >>>>> On 19 Dec 2023, at 15:34, Mike Karels wrote: >>>>>> commit 636592343c3ec0feb61a4d8043676381384420dd >>>>>>=20 >>>>>> tmpfs: increase memory reserve to a percent of available memory + = swap >>>>>>=20 >>>>>> [...] >>>>>>=20 >>>>>> Add sysctl for vfs.tmpfs.memory_percent and the pre-existing >>>>>> vfs.tmpfs.memory_reserved to tmpfs(5). >>>>>>=20 >>>>>> PR: 275436 >>>>>> MFC after: 1 month >>>>>> Reviewed by: rgrimes >>>>>> Differential Revision: https://reviews.freebsd.org/D43011 >>>>>=20 >>>>> I just got: >>>>>=20 >>>>> make[6]: Could not create temporary file /tmp/makeDl4i9S: >>>>> No space left on device >>>>>=20 >>>>> after doing a buildworld -j4 on a 4 core, 16 GiB system where /tmp = is a >>>>> tmpfs, with the prior buildworld having taken me past this commit, >>>>> which I strongly suspect to be the cause. Whilst I understand the >>>>> motivation behind your commits, this is a sad regression to have; = it's >>>>> not exactly a particularly strange situation. >>>=20 >>> Bug 276402 is about the interaction of this change with ZFS ARC, = which >>> seems to be problematical. I spent some time investigating = yesterday. >>> Depending on the dynamics, I get different results. If tmpfs grows, >>> the ARC will be reduced if needed. But if the ARC grows to the point >>> that tmpfs sets free space to 0 or quite low, attempts to write to >>> tmpfs fail without any reduction in ARC. >>>=20 >>> Jess, two quesions: >>>=20 >>> 1. Are you using ZFS on this system? >>>=20 >>> 2. Can you try with vfs.tmpfs.memory_percent set to 100? >>>=20 >>>> FWIW, I've seen two people complain about this last week, = apparently >>>> this kernel OOM protection doesn't work very well. :-/ >>>=20 >>> So far, I have only seen OOM kills when memory + swap are quite = short, >>> with a tmpfs memory_percent above 95. But with ZFS, it can happen >>> when the ARC could have been reduced. >>>=20 >>> I will investigate more today. If I don't find a way to resolve = this, >>> I'll probably commit a change to set vfs.tmpfs.memory_percent to 100 >>> by default, at least for now, and if that works around the problem. >>>=20 >> This is easily reproducible with poudriere, if you try to build some >> ports/packages which are big memory consumers, for example any chrome = variant or >> just lang/rust, I have a machine with 64G of ram >=20 > How many hardware threads? > How much swap space? For got to ask: How many parallel builders allowed in the bulk run at once? > You specified: USE_TMPFS=3Dall > ALLOW_MAKE_JOBS=3Dyes ? > MAKE_JOBS_NUMBER use (or the like)? > I assume ZFS but any ARC specific tuning? >=20 > Not that you would want to do what I do, but it > illustrates why I ask about the contexts explored. >=20 >=20 > 16 hardware thread aarch64 with 64 GiBytes of RAM context: >=20 > I've historically used: Forgot to say: Number of parallel builders allowed in the bulk run equal to the count of hardware threads, so 16 here. > ZFS untuned ARC context (but I also do the same in UFS contexts) > USE_TMPFS=3Dall > ALLOW_MAKE_JOBS=3Dyes > no MAKE_JOBS_NUMBER other than for editors/lapce* > RAM+SWAP =3D=3D 310 GiBytes (so a little over RAM+SWAP=3D=3D4.8*RAM) >=20 > Basically SWAP is preventing tmpfs use from running > out of space, despite the likes of 25 GiByte+ use > of tmpfs by the rust build, for example. >=20 > Historically multiple toolchains building in parallel > in the resulting high load average context have > completed just fine, including when rust is one of > them. I've not come close to running out of RAM+SWAP > so far. >=20 > Although my testing of "bulk -a" is very rare, such > has worked when I tried it, also using the hig load > average style. >=20 > Why ~4.8? Because somewhere between there and 5.0 the > binding of the swap space starts puttting out a notice > about potentially being mistuned. (It reports on a > potential change that I do not know the other tradeoffs > for. So I stay in the range where no notice is made.) >=20 >> and it is impossible to get >> lang/rust build in poudriere (USE_TMPFS=3Dall) without setting >> vfs.tmpfs.memory_percent to 100. >=20 > I'm guessing this is implicitly: without having a huge > RAM+SWAP space. >=20 >> the poudriere dies with plenty of no space left on device. >=20 > I will note that I've not tested my configuration > with the change yet, holding back on updating FreeBSD > for other reasons. But I doubt that I'd run out of > RAM+SWAP, given the huge RAM+SWAP that I've > historically used for the context. >=20 > I do analogously on 2 other systems: > 32 GiBytes of RAM and 8 hardware threads > 192 GiBytes of RAM and 32 hardware threads > (Both having both ZFS and UFS media.) >=20 > On the various small RAM systems, I use > USE_TMPFS=3Ddata or USE_TMPFS=3Dno and avoid > ZFS. >=20 > I also always avoid spinning rust. >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com From nobody Mon Jan 22 20:42:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJhxB2HP6z589rT; Mon, 22 Jan 2024 20:42: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 4TJhxB0crQz4F3B; Mon, 22 Jan 2024 20:42:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705956158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TOEZJDURVyGSlW1wzkxTpBaQS8OEIYkac1SEYcrru+A=; b=ZgS/Wka7dHATSOahzPRxAzqC+xMwrl5oXHkMJ3BpMqW1hD7ZWX1eP7kHqHwjE5kZLoyAtT jgM/rp35FuCPhqoeYOTzdk8AsjTiOaplu/GieMk2Z2miAjeSvMoJx2qxLPkDKapzj+IxdQ 8G8mGpHHY0Kmvw4hDpQ1m8MjFuQDVaXXLEh6cdnrHNxPI8VYwxlFZzbzP0rfngPSiYnDO+ /zve4yPdDbQhTA4c5dGiLmvVeFKcXtdSW1PqUTq2LKC6dHbunEmLvq2uyUYkSAzo7KNTqA 7Ry14arAcl10rtLVjDbdjenq2jD125zWSsh6HTKvgAfngxItglOnNMPR4SiNvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705956158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TOEZJDURVyGSlW1wzkxTpBaQS8OEIYkac1SEYcrru+A=; b=rQgE5mqo5Kp+32qvkHWdNionheguLZZh27zIjA9boCNhhMBRG0OAcZnW/+Hlx2TzPocs9c oblcIvgtA/n1D0SLhYhA3M5WA/bmQh+pcE/xZqrLQvPkVo4x42edaXliQsqm21a1idVhVH 3e1gf4xXZk5AliSLh08ocqa9ZH1bPC0dm09VTC2efFWtr+vqp/O/A0ZfZBSpCqs/wRrIu9 s+erntlfRRfxfiYgrH3YyfXjlQLSDdv99YkO58eQ3RfC42pk6JvWpPESC0UuYfY5cLOFOJ prh7rIxoMtqif20ce+/AY3iWEE6tvBcvupIhUHp2FwQ5aaeaSHL3hZNTrLPinw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705956158; a=rsa-sha256; cv=none; b=HMoEnBSZtek0jAY7csZSfCW2hjKEtELxebu2CUNeUYAb3uR5gECaK8jLp3KDS376lsUt22 Y7TPauVBFzjUvMGhjlViPWv5suk5b87O18k0wA3QaypgMQWoJkVfAEnWG//UUNHpY6Pgr0 bRNDRhF++xLENFBpfEISU5OW01AAXWJavVLw85BuI+Nhko5iXYWsMNknmxMFHBovXhXaO4 cR03JucWDYRkqg0nHZ0tJow1zdeCvFC/u/gGurVyzJ9UMqu6Kpm4yTCVv5DMqmHqoyeqYc rsNdde5+J4JWHszmLe9+m5abJ10DAEc2ZL80iVkx4X9NTxhcFJN2286VBnpePw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJhx96r1cz1G7s; Mon, 22 Jan 2024 20:42: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 40MKgbB5045941; Mon, 22 Jan 2024 20:42:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40MKgbd1045936; Mon, 22 Jan 2024 20:42:37 GMT (envelope-from git) Date: Mon, 22 Jan 2024 20:42:37 GMT Message-Id: <202401222042.40MKgbd1045936@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 7f3184ba7974 - main - tcp: remove outdated comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7f3184ba797452703904d33377dada5f0f8eae96 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=7f3184ba797452703904d33377dada5f0f8eae96 commit 7f3184ba797452703904d33377dada5f0f8eae96 Author: Gleb Smirnoff AuthorDate: 2024-01-22 20:42:21 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-22 20:42:21 +0000 tcp: remove outdated comment This paragraph should have been removed in 446ccdd08e2a. --- sys/netinet/tcp_var.h | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 5f064ead7f64..f9b3d1a5c3ee 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -535,16 +535,6 @@ typedef enum { #define TCP_FUNC_OUTPUT_CANDROP 0x02 /* tfb_tcp_output may ask tcp_drop */ /** - * If defining the optional tcp_timers, in the - * tfb_tcp_timer_stop call you must use the - * callout_async_drain() function with the - * tcp_timer_discard callback. You should check - * the return of callout_async_drain() and if 0 - * increment tt_draincnt. Since the timer sub-system - * does not know your callbacks you must provide a - * stop_all function that loops through and calls - * tcp_timer_stop() with each of your defined timers. - * * Adding a tfb_tcp_handoff_ok function allows the socket * option to change stacks to query you even if the * connection is in a later stage. You return 0 to From nobody Mon Jan 22 21:03:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJjPp02B2z58Cyv; Mon, 22 Jan 2024 21:03: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 4TJjPn6SvBz4HNN; Mon, 22 Jan 2024 21:03:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=311XxfIfo4VUW7rcKVHyZEIrj7U7VbphmMan2XuFdzk=; b=XbH1no1fMRZ8RYMqyVpQi5fm1sslzJ6kCSCEDF/vmE8obVSfMf3Fk9nLRxlInz5hAEoU/E Cr1r5BK4mb4uGuok0t1oOibo9pOciLpiME0BYtiu7mmCBnbKipMbfuecyb2t7o7mGnq8Uk j13fDyNVhoiZS4gcSQAVkjoD/adAmj5bFtukjNwXhOSOrF0fi1MLvTgm+vFUx9guzrCDcn 5kTglGJ71JqpT7ENXKagHLZ4mYiZdDyXPvMaFykWNHax+yzlzs+6p2E1LL9nCtYEDIqNuP //TcSg+k7k1/iuXCfGJRMqjmWnYHbIvfjQ/iiWRQqS/RImCswKbfZJbrnw0Fvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957437; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=311XxfIfo4VUW7rcKVHyZEIrj7U7VbphmMan2XuFdzk=; b=RkPpSJyGgbkz3PMcC31l63x0GhL/Xa/r+sdRSoBZs+A4/1H7Vp6VtkeyGxx4Hy5drUaAvK Dt5Jwp8ulJJwUAtlceB49acSw1Y9guSz6sYGdN3yOt5OvzLwBJUoZV0GypApaKGI4FT0xl 7hGPxawnTxs70bEzjaC89w6nfXHj/IQ/99e0mxtcuHwuesEHqj/sLByRmIMuekw6sedFkD 7HVOyVdxEK4+QoqvWl9719l4l5HK115YZWUsWYa+PZ8Wnmh5tzi6xFAII4YhgJCp9gRayD 6XEHk2j1pKEVUaFQt8IuSck+uEGYwGE6lF7JhdX6VcueDrz70SsX+3TaSCyZfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705957437; a=rsa-sha256; cv=none; b=XTyOs1xawpGG+i08ZW4NAA5rsu24O9RNWXyTuRHTh4LRKh5SpJr7ZSef6jn3ODibvcNpFQ vkk7fSFwt1KxUVk6zYSSPWvcPr5lFGaoLqN9RVDN4ysEx3nRH6d6dWXXqXcu20HToraf15 XlDhAnMIXKlnk6OK9dFFCWQTadn3P6utfLsaxWrveoTJTcQq67e+p5aRy0XwTAVjiFMSFb 0r2Tdr7sUioiwZUdSSiR57MBsfDMzH1v99otT53PiXjChup1KmD8VsowkRB/zJDTrjrgdI Z2aWZhypahV+5BGKLkEA2Rx5t8jYYfO3S1ftWVs+Jojlg0l2AMfHi6m5regoTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJjPn5WT2z1H3G; Mon, 22 Jan 2024 21:03:57 +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 40ML3vp0080551; Mon, 22 Jan 2024 21:03:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ML3vT1080548; Mon, 22 Jan 2024 21:03:57 GMT (envelope-from git) Date: Mon, 22 Jan 2024 21:03:57 GMT Message-Id: <202401222103.40ML3vT1080548@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: d04df664776b - main - bootpd(8): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d04df664776b436f712051520d48f84be93ab269 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=d04df664776b436f712051520d48f84be93ab269 commit d04df664776b436f712051520d48f84be93ab269 Author: Gordon Bergling AuthorDate: 2024-01-22 20:46:31 +0000 Commit: Gordon Bergling CommitDate: 2024-01-22 20:46:31 +0000 bootpd(8): Fix a typo in a source code comment - s/adddress/address/ MFC after: 3 days --- libexec/bootpd/dumptab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/bootpd/dumptab.c b/libexec/bootpd/dumptab.c index 3961cb4210cb..9b839c26c5b9 100644 --- a/libexec/bootpd/dumptab.c +++ b/libexec/bootpd/dumptab.c @@ -323,7 +323,7 @@ dump_generic(FILE *fp, struct shared_bindata *generic) * * The addresses are printed in standard ASCII "dot" notation and separated * from one another by a single space. A single leading space is also - * printed before the first adddress. + * printed before the first address. * * Null lists produce no output (and no error). */ From nobody Mon Jan 22 21:03:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJjPq2DYvz58CWZ; Mon, 22 Jan 2024 21:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TJjPq0Kz1z4H7y; Mon, 22 Jan 2024 21:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4pizj18MMp3ueKgcmS6KDov3UlD7RyDFBIL76K2ce3g=; b=Lg12d7T+ykGRjME4yRoPPTcEOAQZKX3FGskvpFwzMCZX2q69xTVZjaWNkFjeMrXVGfWNa+ O7TG1RmmoELG/9Igko6p6uDzj7/20hA42DsGix6h2xr35eJMWLT1krJ+OLbvFx5aUdbh8u 98zRfNVqDrgL1AqyBH8L0dxEDV8aUWDxxTj5puMx592/wCob58AqcaxKUVKW0kYJXHnGmC g+plGeRBvqr9Q45nGR1dauektkvoIRBYYYvel8z+hLhq9yimw+cCveqsjxfPQlK+XuP8Jb 2hnw6PRg0kUaQA3Yc+bjEVjgCC12obGdtMy4N4+ASrpchfw695Lq+U7xxbSgHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4pizj18MMp3ueKgcmS6KDov3UlD7RyDFBIL76K2ce3g=; b=CrMXDLoArZcBEhVFe7qOVha+84R2ThW9g1ROyut3MJp8Nu2aTpS1t1ZlD6j5wpvt5MpsRW KhFm+jdF/GksJ5PY9eLEXgB6Lj0Wc5SeJ4Jx6fvcKSV9HEV8H/OAzBgqiztZ/Ui2yPq5+r R5nHfp62ndohy2QylypWdvJmMnFJl31z2ZVnPnJ//Zq6d8gFeULq06dmnfe3vTdXDkCx45 Qp5EYlITAruGeRLDgtEdWBAZjLpjmmz76NqagN+uX7fWAYTBhRro1wvUbOJnO/8b16cgp3 x6paoytx6uJy5OpB9o4RPk/wBlDGj3sy+m9mm5GhFzTFDgV9375rgiipUiuGsg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705957439; a=rsa-sha256; cv=none; b=Dgj/+1hD4jVyCDPFZ/01mFRimx1RYV062Ps/XHLBBOulnL6X1mjIgavEoKOvn1qM7WhjvO UKUXiWnDMsAukcq8Nsj3NaQFdS3YdyjaKZSUnHdjaucf3to++p2QMbziAzznZ8o58ohCwr TPRVBuaesKwQpjF+Fj4aeK0JIelbBi0yCekN7QWVfyJXmruuYRgYCNjqeHQSdEfGT/kqLm nSMhPV7y58v/PUA4QLhzPCB3UBh1it902OfAhBh8VvaS4nl6nHbEaN4d84DPAO7k2YWmC5 2dSPdFzd5WSvX6X61GC/AeMD58LQrKMPzyKSXE3O13CrdhecTvcbxDdCgZCrXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJjPp6YV9z1H3H; Mon, 22 Jan 2024 21:03: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 40ML3w5X080602; Mon, 22 Jan 2024 21:03:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ML3wrn080599; Mon, 22 Jan 2024 21:03:58 GMT (envelope-from git) Date: Mon, 22 Jan 2024 21:03:58 GMT Message-Id: <202401222103.40ML3wrn080599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: b971c51a4d94 - main - aic7xxx: Fix two typos in source code comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b971c51a4d9498c26079fd8229f7af6ef1585020 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=b971c51a4d9498c26079fd8229f7af6ef1585020 commit b971c51a4d9498c26079fd8229f7af6ef1585020 Author: Gordon Bergling AuthorDate: 2024-01-22 20:47:23 +0000 Commit: Gordon Bergling CommitDate: 2024-01-22 20:47:23 +0000 aic7xxx: Fix two typos in source code comments - s/recevied/received/ MFC after: 3 days --- sys/dev/aic7xxx/aic79xx.seq | 2 +- sys/dev/aic7xxx/aic7xxx.seq | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/aic7xxx/aic79xx.seq b/sys/dev/aic7xxx/aic79xx.seq index 118c4f187486..85957102eb5e 100644 --- a/sys/dev/aic7xxx/aic79xx.seq +++ b/sys/dev/aic7xxx/aic79xx.seq @@ -1198,7 +1198,7 @@ mesgin_complete: test SEQ_FLAGS, NOT_IDENTIFIED jnz mesgin_proto_violation; /* - * If we recevied good status but never successfully sent the + * If we received good status but never successfully sent the * cdb, abort the command. */ test SCB_SCSI_STATUS,0xff jnz complete_accepted; diff --git a/sys/dev/aic7xxx/aic7xxx.seq b/sys/dev/aic7xxx/aic7xxx.seq index 1ae250d880bf..a94e2dae4149 100644 --- a/sys/dev/aic7xxx/aic7xxx.seq +++ b/sys/dev/aic7xxx/aic7xxx.seq @@ -1639,7 +1639,7 @@ mesgin_complete: test SEQ_FLAGS, NOT_IDENTIFIED jnz mesgin_proto_violation; /* - * If we recevied good status but never successfully sent the + * If we received good status but never successfully sent the * cdb, abort the command. */ test SCB_SCSI_STATUS,0xff jnz complete_accepted; From nobody Mon Jan 22 21:03:59 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJjPr47r2z58Cx9; Mon, 22 Jan 2024 21:04: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 4TJjPr1LXnz4HL4; Mon, 22 Jan 2024 21:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8FTdOMW79/Deoi8FplPr1Y7JXP+XyGZ2ktY+5wrG84=; b=AKGhFKzIS3GlBtK4MqZFGYrH6nW29emAOCVl1xT1W8+kbKS7I95pU2t63lPYeMKKfjvFNk ykzzpg90vFg4a7MLLhHNioOCJesp/Zi+zKRM6ZZ8UVcgAP4NdACU+O6wG32KEZae7i9u0L P3cRPx4Oew39f7w2+GJutR9nonFwZgbfnsMpEZDJVBgHpxIhcK1ZRsEp/Sgd85dtIhM2P6 gvxG1sL1mGPjY2T4dlkHkwJtVvWatZrpL90FNJWFFdsefaL17rC5VFvPNqVu4F87lSD+tZ JTBMJrat6k9qM9XUNTZyuBr35b4BETMdTJ1DK6WybfRB3yvBVnWCwBQ9wQ7cXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=j8FTdOMW79/Deoi8FplPr1Y7JXP+XyGZ2ktY+5wrG84=; b=c1Ge8twBLTDu8oSgzpkdLDJqeLbRcC3hu6XkhZ9LKw6jPL19BCD1ZQwCY7fV+XDUF8oVvn lynbGl6vwM8HR2W7iRDkG6LOtvcxCQKMMWHQi2VpXKt10lTW+xkGtNYk73YaX8Uu+KuM9p VD26cE0lPPkSyjACMidbJGL8Y6kv+s2AURAoz9+LFPG6EegmTeXMAVsGfIE4TOg4Y0xDpr NitxKilbdchwA6nU6tUe2JrBizIeyWkG8UQQAdJPU2q3SSzXNCiWjR5WPwYmot9ljelvZL C5mnn045HnkWybXfCApwg8AAKttZWXujpYWeMMBSGlK3q0TNgER57pwJTGdsVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705957440; a=rsa-sha256; cv=none; b=xnzQl52vtbPY4hepSKPQEj8CJO5GEQOHxHRlH9x7VOb7mh2EouT6LIK1ueOdl//QZYHhYM C04mYptJ6wOg4YzEKzHS3DCNffRiVROzrHST0WxSgzncfAHST1KDsBw73BM6DDarZH8Dxq mkdQVWqTPI1gx06YBYtj59M3jdjmTtDnzHljxYPY0I+QPwIi9tveSlPFCLKVLWOQqGmyih +gHQmTFQPVTxQtSjlgzIVhy10RW9Sl8thvahJUfEViCNREmF08I/MekO63uTN1UbgmZKqG Vi8vCkUBkJ9lEDUOAEGuXgUkyU77mTLlBgu4T9aKGX2K84IEXuA74zEPBU1AnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJjPr0RwRz1H3J; Mon, 22 Jan 2024 21:04: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 40ML3xS9080654; Mon, 22 Jan 2024 21:03:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ML3xIm080651; Mon, 22 Jan 2024 21:03:59 GMT (envelope-from git) Date: Mon, 22 Jan 2024 21:03:59 GMT Message-Id: <202401222103.40ML3xIm080651@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 496432f19216 - main - netinet6: Fix two typos in source code comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 496432f192165b8700da4b0ab8ebdd253002e265 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=496432f192165b8700da4b0ab8ebdd253002e265 commit 496432f192165b8700da4b0ab8ebdd253002e265 Author: Gordon Bergling AuthorDate: 2024-01-22 20:48:34 +0000 Commit: Gordon Bergling CommitDate: 2024-01-22 20:48:34 +0000 netinet6: Fix two typos in source code comments - s/adddress/address/ MFC after: 3 days --- sys/netinet6/nd6_nbr.c | 2 +- sys/netinet6/scope6.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 7d89fcc4ee69..7b4fa7a8d8c9 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -262,7 +262,7 @@ nd6_ns_input(struct mbuf *m, int off, int icmp6len) } if (ifa == NULL) { /* - * We've got an NS packet, and we don't have that adddress + * We've got an NS packet, and we don't have that address * assigned for us. We MUST silently ignore it. * See RFC2461 7.2.3. */ diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c index f3cfd4602548..0987ea7e99ad 100644 --- a/sys/netinet6/scope6.c +++ b/sys/netinet6/scope6.c @@ -525,7 +525,7 @@ in6_getscopezone(const struct ifnet *ifp, int scope) } /* - * Extracts scope from adddress @dst, stores cleared address + * Extracts scope from address @dst, stores cleared address * inside @dst and zone inside @scopeid */ void From nobody Mon Jan 22 21:04:01 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJjPs37Kfz58Ccr; Mon, 22 Jan 2024 21:04: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 4TJjPs27vjz4H25; Mon, 22 Jan 2024 21:04:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QXVJVOnSEDxlc1Fslaxaoub/MK/S1lYBBSlY51HBeZo=; b=k8mFezGzGkkteTnQT1lAnKWBqtZAYN/t3e96TzKtoCyjY0Bdg0rrwrAN+up7yep5qZ5/Q6 tjJeaPw6hPiVpwRmYVCqF/joKAaDBPX5WZs3niDDUWenSvsi6XTI6JPqTslm5945VU1xNL pItox+emYTbec6gtPP1j8l0FTjJmYxpQtfstPYZbIX4uxJl+V9+wGQOPY1OE0u1EkeDffE FnzmaA97l3VpNur1ZsuPGyA2LkKkLfTnlMdHUTzzTx0ONt5XTK/9J3UU8xxxWPn/NtUw9u LoWkb4NR40qaMRU9pGgbDSRGBUwNNJLNYYSLUeyc4mt68VrGC+QiL7BgQ/AxLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957441; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QXVJVOnSEDxlc1Fslaxaoub/MK/S1lYBBSlY51HBeZo=; b=iYx7ju+JIJaRrpHRI3IXvk8lrD6nGmvz+mxiQg1Bo3lAYoxQsI6GM7XqI6Ici4kN1UcOfz /oYpHy9sPDFEHXMgHT6cmk57w+jmilR1mZkChwgZegNY0t7S7cdBwTGKrczrt+G0ipveBc C2VmEKzavfyyfCQKq+bysNabXwX12jtzWTX0AZ49xxBUeX97+GOBsh2hyEjsy0bDpiyclo z/DzfcC+Qqd6Q7tYw0vsIF+0dmYu2efW7rcxk13nYdTQrekR93lISbkQG5fATZtmiOg6UQ u/DBTeBm860IPXMpjIGditf+52djlmdycjtc+xv2QURuVG1viP5UUUg8Qa6oFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705957441; a=rsa-sha256; cv=none; b=jl601SFu3DBhnAni3ppsH7NnWHllydL0a4q17z7C7thA/j7wHgzqr/2FXqi4tiAFvLDZhq VeyiHnVPTyEy/8Ax5HIgc+pKZdKiUsCeDFS64K+LX1dnVryyCQcSTpR2j+qfXlKoHQY4gV xeZhqA7i/ue58Mg1m4inn/vKeWnbXditDFXBikhLdKLWGXQaNxuvwZfojf3ZkpaRuQgQW/ iT7sWZrOJRILH9hYErQujLQLLERB8Pw3/nTj+0mMohfHqTwpl8qXMN5NMk0odyGqY4W9cZ t81zXmeg/Uk7L8zqoQgTvTdXBZTO0yMkHumbxSZHKZyc/GHFe6i7+4hpI4s/DQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJjPs1CNDz1H3K; Mon, 22 Jan 2024 21:04:01 +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 40ML41N4080719; Mon, 22 Jan 2024 21:04:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ML41PM080716; Mon, 22 Jan 2024 21:04:01 GMT (envelope-from git) Date: Mon, 22 Jan 2024 21:04:01 GMT Message-Id: <202401222104.40ML41PM080716@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 9b035689f15f - main - tcp_fastopen: Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b035689f15fc4aec96f9c18c6c86bd615faed2f Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=9b035689f15fc4aec96f9c18c6c86bd615faed2f commit 9b035689f15fc4aec96f9c18c6c86bd615faed2f Author: Gordon Bergling AuthorDate: 2024-01-22 20:49:47 +0000 Commit: Gordon Bergling CommitDate: 2024-01-22 20:49:47 +0000 tcp_fastopen: Fix a typo in a source code comment - s/posession/possession/ MFC after: 3 days --- sys/netinet/tcp_fastopen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_fastopen.c b/sys/netinet/tcp_fastopen.c index c31225214d1d..609637b83df3 100644 --- a/sys/netinet/tcp_fastopen.c +++ b/sys/netinet/tcp_fastopen.c @@ -43,7 +43,7 @@ * * In addition to the facilities defined in RFC7413, this implementation * supports a pre-shared key (PSK) mode of operation in which the TFO server - * requires the client to be in posession of a shared secret in order for + * requires the client to be in possession of a shared secret in order for * the client to be able to successfully open TFO connections with the * server. This is useful, for example, in environments where TFO servers * are exposed to both internal and external clients and only wish to allow From nobody Mon Jan 22 21:04:02 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJjPt5MSpz58Ccv; Mon, 22 Jan 2024 21:04: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 4TJjPt2jcqz4HNk; Mon, 22 Jan 2024 21:04:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bz70VjSD+qVr+vNib56pAVWQ8uybmY8U9dN01W4kIck=; b=AaX2YMIlx0XRPmEQw1T2+UUlZ2o5Ao9JbVbapgl3yZ4lXjfFkgqxaOrX0O4jVEC32bbvff t0wP6AfDNQ8lwttT+OJ1XDh9bUo/sXCrsbI0IwAxMWuvWtWjBDWC+fptkuax0QEZtCTMPl qdoNhbKJQ2sLJhh0H2srIy5XDogABDW02qP2/tC4vVC+5EQVKBfe/HKz1z28mjfodxuaEZ Wh3NaNeBHLVExiBrKIu3wt4jciIIzabAEjU+57AWcXXOM7s9lT7T2C4xRpNxF1gLTd+WJ0 x+XMOnPpQrGdGAh9Jt3wjK0LzoBJ/oBEHAX2Ld/vedxCKCPloFGQKXWcIiPlYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bz70VjSD+qVr+vNib56pAVWQ8uybmY8U9dN01W4kIck=; b=P2XR37UZtoLrZVOvDBatsxwottDvAJLJhKsvY2g2MJG1OUdvnjAOOYfC1dynprypxb9YLG GOFUSiby/AM2Ku4ItFZlcnWAUKlsWaeLF7FkMHNs/87FPpaTYjnUaiRf4ByYNXHn2HRzVx 5sih0xERBSabCZ2+HVcW/4DalWItdkKobYhk8L9ZNKRUbWI+AFNDTQ3x9lCp8Xa1itUD6I dX2xMAiX6AdhSexXru1OnH6WkDZ+wggdBowNd10lokk7ytOUN1AkJoQbk/Br5GIS8EanIK tgbvLp8ECmyBilRgLxxSD75FPLv7BzH7EusREtLCtV0E1PnHSUU/E5s8zwZYIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705957442; a=rsa-sha256; cv=none; b=vIGSkJv3+5qFj/zUpLoRzjcQQiDQjmUaUrDRN6ZIrab9uPKrB7rSasFMfVEAmMbhfNMJZ2 AcIL8WT/nqgc9KnHJwIkwcdUUVb2v6fF6jUVramFE8RAmZyzvZrYqAuIb1yNdUroO6Te3R U7QPZxlghPOVfZN4/pPPbft4ynppVtdfjVRXeITy/zcqqClMQE0no2KdfQ+kwVVEa/yvU2 kUPejLoppqRXzl3qu8nBD3gBy+IJbRkDtM0RBVAtJOZmWXmZeP2nsHmEA+PRVu6Ja8fmg3 pgKyaeUYfLDt83Ls1BlCfxUmCBds6okzDmdU1TjvBJB+edwShW7H3gsRkfsO6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJjPt1n1Qz1H5B; Mon, 22 Jan 2024 21:04: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 40ML42OI080773; Mon, 22 Jan 2024 21:04:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ML42lM080770; Mon, 22 Jan 2024 21:04:02 GMT (envelope-from git) Date: Mon, 22 Jan 2024 21:04:02 GMT Message-Id: <202401222104.40ML42lM080770@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: cde9ec6a451d - main - netpfil: Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cde9ec6a451d22ad65fbe602dc57135177c0a865 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=cde9ec6a451d22ad65fbe602dc57135177c0a865 commit cde9ec6a451d22ad65fbe602dc57135177c0a865 Author: Gordon Bergling AuthorDate: 2024-01-22 20:50:57 +0000 Commit: Gordon Bergling CommitDate: 2024-01-22 20:50:57 +0000 netpfil: Fix a typo in a source code comment - s/strucutre/structure/ MFC after: 3 days --- sys/netpfil/ipfilter/netinet/ip_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_pool.c b/sys/netpfil/ipfilter/netinet/ip_pool.c index 20a3eed5eb4b..2ded49401658 100644 --- a/sys/netpfil/ipfilter/netinet/ip_pool.c +++ b/sys/netpfil/ipfilter/netinet/ip_pool.c @@ -1094,7 +1094,7 @@ ipf_pool_flush(ipf_main_softc_t *softc, void *arg, iplookupflush_t *fp) /* ipo(I) - pointer to pool structure */ /* Locks: WRITE(ipf_poolrw) or WRITE(ipf_global) */ /* */ -/* Deletes the pool strucutre passed in from the list of pools and deletes */ +/* Deletes the pool structure passed in from the list of pools and deletes */ /* all of the address information stored in it, including any tree data */ /* structures also allocated. */ /* */ From nobody Mon Jan 22 21:04:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJjPv5gjqz58D25; Mon, 22 Jan 2024 21:04: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 4TJjPv47CMz4HP4; Mon, 22 Jan 2024 21:04:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tbjr8pN3bNeATQ+7patvXhICfa9x90s0gg1A9uCbHek=; b=KteKlVNnZVU1JA9MIni9I9iCNKn5cndMC/HYgzlHawu8FBO5pzRWcMumiv9KCMBJBk99as mGpP8zPy8T4uyDjowwT2GRuwTj/7UIb0CMc4NMP0kPQI6XhaVGI/gWGluxs0d+d93Y68v5 RovIS6eX6DbcDVcaognN7wK3vu3EJ0ykvBPVJLRt/5hXeUdqSgQZk1Ca3IRj2IpyTTk4T9 2BYS4xMHZJ3yUD8IrBqpFjKJoDdGJdlT40jxVlllqcDXhgFQraPVIuB5RarlIKuSaN7GE5 1RE0N+ziLGmLh82KHzdJL63FIt4mb0mnSOtu9NqiV9rEPYFtd4KVMSFVBED8OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957443; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tbjr8pN3bNeATQ+7patvXhICfa9x90s0gg1A9uCbHek=; b=PWY1bZKY/CHOQQ3qvR8PS0E7+GxAuVwatv31l0Exl6s9yL6LplaU0o5ty2kLXzdeUJKkWq roJ1pUQEgWR6ftalRVdGHxr9gtz6YqRuI+D9v4pDw++EuVjeR3yL/YJsGaL5unqgR3yA7M h7srbEek0xjp8N9mXavS391ZUqew5Hs5gMnjC76zN0J439o6tQF7UiVNPgdxGt69SqIc5Q 8C9muHfl9al1YRjqXFSfgm53d1dTzn+iAERj4i44nJoYkKFxsovpwsUY96qnxhlE90UDPU Nry+rfMH4j0THmlHtogBhTr8L1DBrHUmFqJi1xMbFjW0uYRF6RQpcy7Fd/YbAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705957443; a=rsa-sha256; cv=none; b=AHO6CLFO85xXWbNKjh8eSJiFRXfmatwSLKsbqAFMiUZ3E/iAmeN4WxsJuna8Gyv8L1nOUv 6aa2E/Z67/ongWZfVeKGLcDH21UFodgC+2nOYgRYfCwcOlcFoPS+6M1/Tchg2/eC/eWh2n MNtZbm8fPTCF0SwgHgT6zyNxQSlmVFJzBCPG2O+LIobOQfdb+9wiguTlFs1cToQhNwpGxw uI5AlTFRkI6bikCTFf+uQtN8ax2KEfhB1Tt9r9ULjXx5Qh4Pcw60nvlMs07VXt/QyY/CCd g0eGI/U6/D4AUrxHjLrcHVC/hAkIXgmV8hr8SWkQCGOjChkcXdwXZC7rXhwIkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJjPv33frz1Gxc; Mon, 22 Jan 2024 21:04: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 40ML43l2080834; Mon, 22 Jan 2024 21:04:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ML43ew080831; Mon, 22 Jan 2024 21:04:03 GMT (envelope-from git) Date: Mon, 22 Jan 2024 21:04:03 GMT Message-Id: <202401222104.40ML43ew080831@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: c90f1ed10460 - main - netlink(4): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c90f1ed104606f5a691ea2defc5711ca9d28fcc7 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=c90f1ed104606f5a691ea2defc5711ca9d28fcc7 commit c90f1ed104606f5a691ea2defc5711ca9d28fcc7 Author: Gordon Bergling AuthorDate: 2024-01-22 20:52:16 +0000 Commit: Gordon Bergling CommitDate: 2024-01-22 20:52:16 +0000 netlink(4): Fix a typo in a source code comment - s/permament/permanent/ MFC after: 3 days --- sys/netlink/route/neigh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netlink/route/neigh.h b/sys/netlink/route/neigh.h index eacacc09711a..10bc3b93d16a 100644 --- a/sys/netlink/route/neigh.h +++ b/sys/netlink/route/neigh.h @@ -82,7 +82,7 @@ enum { #define NTF_PROXY 0x0008 /* proxy entry */ #define NTF_EXT_LEARNED 0x0010 /* not used */ #define NTF_OFFLOADED 0x0020 /* not used */ -#define NTF_STICKY 0x0040 /* permament entry */ +#define NTF_STICKY 0x0040 /* permanent entry */ #define NTF_ROUTER 0x0080 /* dst indicated itself as a router */ /* start of NDA_FLAGS_EXT */ #define NTF_EXT_MANAGED 0x0100 /* not used */ From nobody Mon Jan 22 21:04:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJjPx0MJ5z58CxF; Mon, 22 Jan 2024 21:04:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TJjPw51HWz4HK3; Mon, 22 Jan 2024 21:04:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7wXPrw7X6Av0ImbHuKnknYJLsG2ePluxgPNVIf4m6bk=; b=KiAukm3K40KbAkIilO85oayVH3GDMyiyeSu1R3RuVNwvayr2/NjRa3nh01MLlZi4ppEjcO gSWnY1H5bL0hNn8mNWyEcpv1ebdMNjyBMIMkcFNIJEGsW9KuQ3N5Jhkz/ClwmUHrUKLMrN ivnIeNZ6hbxgM5/jsFMMctyCUhFkmp6gPUGzbtUtajbQVR9ZVmzezOzwXIMrQStLobvYh1 NWv8lNKgrzs2SLfQiBAytv8jpbF4L16G3qXxwknPzfWRgsnTLRVUGn9pyYNFf48E/RtQp0 zEA0OLoZQnBRkA7PelK72oKkckCl+M4wNwaUwko0GbhmULicLyLk1SYCz0wigg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7wXPrw7X6Av0ImbHuKnknYJLsG2ePluxgPNVIf4m6bk=; b=LsYjDezkw98JhColk1nsMWk5ahy5gr7JVb8ZHMMDLfHDeK/lR7/APhxxCS8VT7Bx6elHAF ghAsoFk7Bbpl69rhy5yt2xgidLJVPn9UK0FjyDWKDeQRYLc6c26Qu/lrZ4k9T8wNSxbH9C FhEfhqwxhhvFG0Ob2DSlpnxCrZO/6bSw6o4S99+tXbHCsOS7gONBzyHponbRSotwMeUnMt Mdfk05BnZ1FzEoTv7Tndax9Zlle7KvFeWVP/hANSZgsLdc8zaLEjOCOxdbx7qYHLgc2DPe H24X1yLqAiPRPNHGZSE1WJ1LcCHXPfhed8Ow3Cw9zJJcapKSUQR8mYdPutRvBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705957444; a=rsa-sha256; cv=none; b=GmYVB84073OPkfSZequ/ft+ZkKk3DXOyeq0xAoq/7k7KUn5uU07rfsIA42Vdz3eqx9DGz+ TKcfzgxBGszvDj6B1HAmRKdAlsL9csnPeUbkymFtx0H6zUTejzWoH7f5+M1b+l5jh05FMS 6sHkCKycVJKjWodDsKkTVhML20G/hXByjoF6YzNpZZTgeS0tUYUuN4NTkgmFfBjy4AHr9k F+w/hjIF9rKmpnwBFhbtEeJFWPMu5jN0dRIrRpoBBFPoaLZtwYPa9Asd4IxeKEn8iDZiy+ yM67kXdoj2Mn6ymBwstviKO0kF5RoHdViwSLlEd92paGvdbh4+hEnw6ePm1YQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJjPw46bwz1HFq; Mon, 22 Jan 2024 21:04: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 40ML44WZ080888; Mon, 22 Jan 2024 21:04:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ML44Oo080885; Mon, 22 Jan 2024 21:04:04 GMT (envelope-from git) Date: Mon, 22 Jan 2024 21:04:04 GMT Message-Id: <202401222104.40ML44Oo080885@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: ab6d773dbf92 - main - rtsock: Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab6d773dbf926e4f92e37b67a85c3290cfb90723 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=ab6d773dbf926e4f92e37b67a85c3290cfb90723 commit ab6d773dbf926e4f92e37b67a85c3290cfb90723 Author: Gordon Bergling AuthorDate: 2024-01-22 20:53:21 +0000 Commit: Gordon Bergling CommitDate: 2024-01-22 20:53:21 +0000 rtsock: Fix a typo in a source code comment - s/adddress/address/ MFC after: 3 days --- sys/net/rtsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index cb149f176b6d..e4183232700e 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -695,7 +695,7 @@ fill_addrinfo(struct rt_msghdr *rtm, int len, struct linear_buffer *lb, u_int fi /* * A host route through the loopback interface is - * installed for each interface adddress. In pre 8.0 + * installed for each interface address. In pre 8.0 * releases the interface address of a PPP link type * is not reachable locally. This behavior is fixed as * part of the new L2/L3 redesign and rewrite work. The From nobody Mon Jan 22 21:04:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJjPy1Xsnz58CgF; Mon, 22 Jan 2024 21:04: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 4TJjPx6C2gz4HXF; Mon, 22 Jan 2024 21:04:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iBqJO0WG7R0obouDL7cIdTtiQ1igSCvD8ysszefG9W0=; b=MvOkmIn1QIgQ2BxydBZXjyZv3BLyNZxq1H9mS0Ts6M/McymQAqAZVs7EjrO92vERnj7HX2 f2U5Ye6BfbQ2DmLdA+OdYQu3fGMfvuW27xOvcZ4PVy/E6WfGh9VQD34b5V8/sHuo+0T9hJ mjcCoYIwwpcy9kHoipDPGgwpCzwvnhqcsozBayfuUPrMXagTYNG/pAilWp0vrgQ+DvyORg b6CIkIv8lljJci5VCTbazNYM3ewn7IMvRD1UHwAosrf1LcLco5yQNCRVRh350RGIFGJgGY N+gCaYcSZ5dvh45R+vE5UbgW4zWhHFe1Z2D3mGIENK7WdFyscKrops54L/Mwqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957445; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iBqJO0WG7R0obouDL7cIdTtiQ1igSCvD8ysszefG9W0=; b=WcJZXTYBvQj4ysTEUJWMiueQvm4AZSAyuN6mnFhnBupaIk9BuK0ngbKIG34fqeYjUW5KHY Hiq0TqvFMj9Mvjs1r/pfBsRRkNlgEYRUpuvhdoW+wmeElJcEHKq4UAPTw4FtZ4g9HC4DRr cTqIEODcEZT7quOQXDa7FY3Gn+xOCIe0K/tFh4yRMCrIq52sFlQEan99xDK2VTYFMep78D vCZp0be4zesTMNKWZaFvX2aE6Qf9wcZlbP3TKMPiL8syK6G610R5IDglCY1Buo66SlIDX+ HtTZPdvw20EFk9E2IUVnEvxxA0dCrPB9NKZcPLYWFZJw/iwjRtDvOldlFTdIyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705957445; a=rsa-sha256; cv=none; b=xVSWUiftggPOm87r1zbqe30ATgp3QJXeE4xiGCt47UXWOADwycfl92eLJOmKC28VdZBRCY dxCXmOXy9vWMUedUj6xCQXT+4jIX30Aw6oEO3ghgFwUWKMUb2rnwngAwLwr4YuhxOycAXs zLSILS1wLtXrPxINywl/TLILH1RwuUOBRXWUcGiHd4GdKE5oMH4L2URAwXv53oj2Lp24ge 6oGpi9FViGa9QV8GrPh2zO0mX6c/de1iSNnmHisty2F3ksXrtg48dXAeVCmZ/a55WTiy67 YfUrUbuf0sh+oW4IZc6g3EVHD6gmIVTaBvPQ++/7UTWYhQ1DrQn6DfV5IXs/7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJjPx59Ygz1Gll; Mon, 22 Jan 2024 21:04:05 +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 40ML45uh080944; Mon, 22 Jan 2024 21:04:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ML45ee080941; Mon, 22 Jan 2024 21:04:05 GMT (envelope-from git) Date: Mon, 22 Jan 2024 21:04:05 GMT Message-Id: <202401222104.40ML45ee080941@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: c1ada3978310 - main - net80211: Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c1ada39783109c496fde853cc2fe32f31a8f7516 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=c1ada39783109c496fde853cc2fe32f31a8f7516 commit c1ada39783109c496fde853cc2fe32f31a8f7516 Author: Gordon Bergling AuthorDate: 2024-01-22 20:54:36 +0000 Commit: Gordon Bergling CommitDate: 2024-01-22 20:54:36 +0000 net80211: Fix a typo in a source code comment - s/recevied/received/ MFC after: 3 days --- sys/net80211/ieee80211_hwmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net80211/ieee80211_hwmp.c b/sys/net80211/ieee80211_hwmp.c index 429cd69629fc..c47e845bb8a8 100644 --- a/sys/net80211/ieee80211_hwmp.c +++ b/sys/net80211/ieee80211_hwmp.c @@ -1395,7 +1395,7 @@ hwmp_recv_prep(struct ieee80211vap *vap, struct ieee80211_node *ni, /* * Check if we received a PREP w/ AE and store target external address. - * We may store target external address if recevied PREP w/ AE + * We may store target external address if received PREP w/ AE * and we are not final destination */ if (prep->prep_flags & IEEE80211_MESHPREP_FLAGS_AE) { From nobody Mon Jan 22 21:04:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJjPz3wKRz58Cpm; Mon, 22 Jan 2024 21:04: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 4TJjPy6grGz4HZk; Mon, 22 Jan 2024 21:04:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LGlgcsd/o0Vf7EIYCxS+5k9NRnnpvGGxMllu5nuW9Zg=; b=kD06EQOofiypepW9YV1hTouteL95rqHdG2FOZZVffFTG/M9rJK4eXNuqtAG3BEkRCF+bhJ IMQdnBan+UsNtYnu1CpQ5u7qzVkj8rmNI/4V67Y8oqZUxVZ2DZcZOD986lzouY0RBKZhwn oqdOncbAm6Tj4547WkUWKaKf0gb37vkE0C6+Aav42UcR3AdMUNqq4C7gUT5TU4YtymFdYa il2VfI7GYmT0f/8QZzS0DHQvF+wFuMgwdjUaraxPqYvMkrHF9Tk1L0w4EF/JrIE7dsRfnm y+b+mmIDEbYh16+iYT1iSVtOnG2F3Fpi6bUZbzo8+26MTsqpmzuoO6GMFre9kQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957446; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LGlgcsd/o0Vf7EIYCxS+5k9NRnnpvGGxMllu5nuW9Zg=; b=Sde1AMW1PN3iglHLcOruMnXsyaL2kplywWNiMSLYeVRTDwyqIMQEVIDUTq43H2asrNOxGW aGGo1BbWQ4Ue9IRmG2v6GUoiQLH/56ATMePuolmI+N8858ZXuaaUGVKhy+tWseZEnTCLEx BnFukCMDRcG5LXwQAKDbcis6JXxQEc6YsFK4iOLCYGOcK2+cFiQxFl8eDe4/vL5m1bBd0V A2AmkGqaWpX8uTgaF2zLUELET5PTYbwDeLC8b9Ie81xoOdasBQTFcRSHblIxH4R1f3MyrX WtO5LOJrVzE9xxG6h60ie4+eCVlDgdPjxdu5R349GpIHwvo2vmBSNJELOjrueg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705957446; a=rsa-sha256; cv=none; b=dhAQvbFBsiYFMKaXtEgtwH6ZXktrd67IjgKLWuJUKio76xeGWm32DShcqXJYnPfq6APWWA WLgy1DUYBlJz61kkbvB7i/ZVwJ1FwIpbkPnRizSwdh76NcAsmSor+uxFUUNnOXtJcwPlPr JSph1xrmP96D9qV8JsatO79I0YrERJ8AdUeqSCIxikd8dETs0FpMLnt/OhwPEaVKJELI0e ioC8LN+q6LjLFHaAA/CkEENkrHI73V3eAlLHIVxuggwjONI18v7M3uKGY/4+Q1ZDVc4/bt lBpfAsKaFdszt90AHKbR6FRkLj6bipLOFZ8M7xOb50BxXhDDsVmMKuQ2ZfoJiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJjPy5nYyz1HKK; Mon, 22 Jan 2024 21:04: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 40ML465F080992; Mon, 22 Jan 2024 21:04:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ML46lF080989; Mon, 22 Jan 2024 21:04:06 GMT (envelope-from git) Date: Mon, 22 Jan 2024 21:04:06 GMT Message-Id: <202401222104.40ML46lF080989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: b2c48aa4d192 - main - vmd(4): Fix typos in source code comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b2c48aa4d19268610191a0b7d7b76d01d28b0a13 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=b2c48aa4d19268610191a0b7d7b76d01d28b0a13 commit b2c48aa4d19268610191a0b7d7b76d01d28b0a13 Author: Gordon Bergling AuthorDate: 2024-01-22 20:55:33 +0000 Commit: Gordon Bergling CommitDate: 2024-01-22 20:55:33 +0000 vmd(4): Fix typos in source code comments - s/harwdare/hardware/ MFC after: 3 days --- sys/dev/vmd/vmd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/vmd/vmd.c b/sys/dev/vmd/vmd.c index 42b48da05321..1563d707c6b4 100644 --- a/sys/dev/vmd/vmd.c +++ b/sys/dev/vmd/vmd.c @@ -436,7 +436,7 @@ vmd_alloc_resource(device_t dev, device_t child, int type, int *rid, switch (type) { case SYS_RES_IRQ: - /* VMD harwdare does not support legacy interrupts. */ + /* VMD hardware does not support legacy interrupts. */ if (*rid == 0) return (NULL); return (bus_generic_alloc_resource(dev, child, type, rid, @@ -464,7 +464,7 @@ vmd_alloc_resource(device_t dev, device_t child, int type, int *rid, pcib_child_name(child)); break; default: - /* VMD harwdare does not support I/O ports. */ + /* VMD hardware does not support I/O ports. */ return (NULL); } rman_set_rid(res, *rid); @@ -499,7 +499,7 @@ static int vmd_route_interrupt(device_t dev, device_t child, int pin) { - /* VMD harwdare does not support legacy interrupts. */ + /* VMD hardware does not support legacy interrupts. */ return (PCI_INVALID_IRQ); } From nobody Mon Jan 22 21:04:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJjQ03NVPz58Cpn; Mon, 22 Jan 2024 21:04: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 4TJjQ00nySz4HXg; Mon, 22 Jan 2024 21:04:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5vNfwXVvlM3yXEnZS3xuNR3zUD2WSGvAIoeulqyrhd4=; b=p1Gu9XfScLd6LGKxmxSeCxZ1mO+N9XARKZ+Z42AiU4822C6kesNhtqq+aBM9zDHIPt1HrG NiqFP/lIMc9F9+7XDAchPqXTktxtCqGMT5MUCUTIif+grcZ0VMAPBA1chEAx7jvWAMRXlQ epJncQ1eBM+bmmk6ZoRxcYBRgGLM9+MTD3H95P7NvEZ/q18MgUIRMvMPuBu3MjRwC1Gu8s YK0k08arHvm5NKTav4J7f08ybCpcnzAxjYtLXB2GjLrRfN0pqhjLWIbu/duyXr+OaCrSLv zIdrKbXL37xpOeEnR0OCqCPmdgGjY4d0jYrrR8Mcx/8GnrzQp+xnnm9xFUeutg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5vNfwXVvlM3yXEnZS3xuNR3zUD2WSGvAIoeulqyrhd4=; b=EUOZemveZTUIujXAB3wiWa00Q/WVZMMjFQY6kn7Lu8G+yw5Ew+XbUVcB435JcZGVWANdYc GIcwe2ZsPthCU1S8q85IVrnKa23QBywNEfwy+zu2QXi4CcxhclH5fe7Vzmu0gSgP/rPE78 4SqB6IpV+q7VzgxB+0uJ0sdz1KYWl8t5XydcDv8h08C1IvHGpbCQrjee5vFQo17N9fzwG7 BLtaevJPXV2y6M5KKkbddOB8mZyRFDvcVlZ1JaNnFKOQ945bu8orXJick7IR2EJv4fO525 KYMuUmNTxjG/a8Fp0olJ60v8nGpV0boFWRcyQCe4Drb0h+OWXlbYJgznaQ2oig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705957448; a=rsa-sha256; cv=none; b=OUWoTbh55zbMfAyVNpG8ML0z7TPi8fLcL06R4TPVmWoakIt0kWnLsZK2NTt2LVc0qU7k9T B0CVSpJJ1Mdr0G6ZFju6pETdG57OxBheJRU6Wp1M4Cp1XUqDcEUo80bZ0kfLPJNfoBkanc DvAIPBvFdAA3ornAe/e2wDX5ps3c6vW50iZ4Zxm8bZl0cl590iKtGdPKuLZs3tLc6QRIRm GCahmB5vYTXfKNtQpg/wVIF668FcVn5531oD0YKAMkWVR4vxFt5fxC54xOml/IpL8lOVxf ZLkgthro/oLyPzwGT+i8+JWtBIDSqEayx4226NPhlX3EkktdJPfM8Scs/3zvmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJjPz6vKKz1Glm; Mon, 22 Jan 2024 21:04: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 40ML470L081046; Mon, 22 Jan 2024 21:04:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ML47KT081043; Mon, 22 Jan 2024 21:04:07 GMT (envelope-from git) Date: Mon, 22 Jan 2024 21:04:07 GMT Message-Id: <202401222104.40ML47KT081043@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: d74371101629 - main - usb: Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d743711016298046ca77c5661bab41739396a180 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=d743711016298046ca77c5661bab41739396a180 commit d743711016298046ca77c5661bab41739396a180 Author: Gordon Bergling AuthorDate: 2024-01-22 20:57:06 +0000 Commit: Gordon Bergling CommitDate: 2024-01-22 20:57:06 +0000 usb: Fix a typo in a source code comment - s/recevied/received/ MFC after: 3 days --- sys/dev/usb/serial/umcs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/usb/serial/umcs.h b/sys/dev/usb/serial/umcs.h index c8c6135710cf..0d34c54a3707 100644 --- a/sys/dev/usb/serial/umcs.h +++ b/sys/dev/usb/serial/umcs.h @@ -169,7 +169,7 @@ #define MCS7840_DEV_SPx_LOOP_PIPES 0x01 /* Loop Bulk-Out FIFO to the * Bulk-In FIFO, default = 0 */ #define MCS7840_DEV_SPx_SKIP_ERR_DATA 0x02 /* Drop data bytes from UART, - * which were recevied with + * which were received with * errors, default = 0 */ #define MCS7840_DEV_SPx_RESET_OUT_FIFO 0x04 /* Reset Bulk-Out FIFO */ #define MCS7840_DEV_SPx_RESET_IN_FIFO 0x08 /* Reset Bulk-In FIFO */ From nobody Mon Jan 22 21:04:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJjQ12bxDz58CWm; Mon, 22 Jan 2024 21:04: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 4TJjQ11rFwz4HjS; Mon, 22 Jan 2024 21:04:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vK7TsgB5ZfGIjEYJ99lLr499i+Zy5PvKxYwlUrOv108=; b=cu/HARTBoTUXJnFX2R1i02ieJS5VO/TCcyoEem4ToDIY3Ygc4niTXdgjCfAF83kJupc4wJ a1UdwQ1xMhwun/qY2fwQRUsV8MosQ1Rj5hAJdD89H9oSiy1pkeIxmWwPXc+wQxguM+oja/ 62nLxITKZGmRP477rThqdcxmyrJaH3Pb9iwjv5DgWAV3pJ5XtIUED7RvJxNrIeqKi6lRMo nL+DOzmL2QpxRjRw7IKXWeXuFOU/QY+fCVl/CfmRZPlAL85399natdYVYpj5UrmsQnQI/3 rppiNOQ1iVgcSFmeb+r0yNBQhaeMGSlB83JIoJL+1IsUIsbhE1dbB7jOitKb4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vK7TsgB5ZfGIjEYJ99lLr499i+Zy5PvKxYwlUrOv108=; b=nv0ViTnQN5Bq5jA3TXCxSw9pmnGErZ0NTWf2mAlMIfFAJttAB3uFIh/kBJlcc0JJ+rZpXM UIp/bpV8tM1IeXEoZi5JIIjNitemZpPOaxkIHWWnqTSjSMXv75dtjpwqa/BVD2IYrouwfV Wdj5/o8IbE821pkayHAiSds4wrW8Vmau1vGR9ZcxfF3UTTyy1DFgnj14LBqx2nyVlMtAZ7 Jw1XXu/X7WUisgZWNwTiR65BgsJTPUBmm7BLjUU9+Z2i4RueytVV1FQKyaq2QqzFWynwil 6eg1n/xToh5S0XwiKpOuOFv7r0xq90TrK85zuzcwmLr2SYzEzQiemt67XYp9CA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705957449; a=rsa-sha256; cv=none; b=Q93W05uPH0htKIAImC82vZh2QojqXI3Jmbjj3RC2d+v6VGYCNzGXnx3xnyDlDD+B2lbJlb 7Nf39L1K4TmoW8JapeyNEQjzjIj2vvvnl0TpciZ30juqeH+oa1M7EwcrdgI+xqtESQ1FkL n+tD6hIDaFfbppLyfrfL01FuGNDZCdyS+LNUVUBFqydB5v8CwDpwShVT12kah1LwoFGDci bI1gRyzUn7dOCr9uMD+O9G8mhRiogb8A1gzMAA7Y9R0xxuq/QjV2B6DRz86Qj7yAXuhlHc wGMHKU1T+nk3RmI3l6w3Auu2EsQFwHjZr3YzsjQAUk6KlN3vMReDvlzoK5QONw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJjQ10vtGz1HFr; Mon, 22 Jan 2024 21:04: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 40ML49sC081106; Mon, 22 Jan 2024 21:04:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ML49oT081103; Mon, 22 Jan 2024 21:04:09 GMT (envelope-from git) Date: Mon, 22 Jan 2024 21:04:09 GMT Message-Id: <202401222104.40ML49oT081103@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 97a4045aaf36 - main - virtio(4): Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 97a4045aaf36079f54ee05a8cb314b8a90f20af8 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=97a4045aaf36079f54ee05a8cb314b8a90f20af8 commit 97a4045aaf36079f54ee05a8cb314b8a90f20af8 Author: Gordon Bergling AuthorDate: 2024-01-22 20:59:06 +0000 Commit: Gordon Bergling CommitDate: 2024-01-22 20:59:06 +0000 virtio(4): Fix a typo in a source code comment - s/recevied/received/ MFC after: 3 days --- sys/dev/virtio/network/virtio_net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/virtio/network/virtio_net.h b/sys/dev/virtio/network/virtio_net.h index 4dfa4d3341f0..4b728f7af21a 100644 --- a/sys/dev/virtio/network/virtio_net.h +++ b/sys/dev/virtio/network/virtio_net.h @@ -210,7 +210,7 @@ struct virtio_net_ctrl_mac { * Control link announce acknowledgement * * The command VIRTIO_NET_CTRL_ANNOUNCE_ACK is used to indicate that - * driver has recevied the notification; device would clear the + * driver has received the notification; device would clear the * VIRTIO_NET_S_ANNOUNCE bit in the status field after it receives * this command. */ From nobody Mon Jan 22 21:04:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJjQ25DNkz58CWp; Mon, 22 Jan 2024 21:04: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 4TJjQ22sBnz4Hm3; Mon, 22 Jan 2024 21:04:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dUisZGZW8SyhQZEr5aR6r+O8/Lq7otIFxYNxShZdoXA=; b=JD+rL59yrYecel3E53N7i/zoJuFUturcnQtfe30NW1/5RbXJfaH37tfpLPqUnuB6wqQSgY gtOOukstlFL38PSz5V6Xd7aSMRXTIdMhXTzzJ7rvbVNx0xPmVzt8XU4mzPa/9226H3o2Kw RWLCTcC6HI5qTcmaXgaVzvq0IakRRUz33LQgMoPyRDB/A5/y94WgJxAGad0PULrFU8j1Qc qLq0p7wPctTYP5K4FTEnTpob7c27R30ZAP0Dew6moOJqQXZxpYkHJBwutTuV8QgHv4Ypl1 WNYpS4Yfkilc9HlXwOqwRihHoXbCcWRVCpHpPqmRdnOTaCev9MvEQkA6+rKpIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957450; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dUisZGZW8SyhQZEr5aR6r+O8/Lq7otIFxYNxShZdoXA=; b=u48W1lP5/cyTG+UBeT8hLhUH/c3+Pp6Y39R4n5uhf1ES6tFs7YbKj2tOWB/XBJQJaZ/LNM ZEA0auX+yk4AfU8NvVXerl5R0tA+5q98yySxfThtkOpPJRzBqc1TTAgCkPbATfW2VayLZu kAKwru82VzxD2LtJFgVy2M0DgLZVtL+w6Op20ibA1ViKqVS/j7FgSd2S9cT4DLSeIsjJ8G SoASmYmrzDYX4iN53zD4irICKDBhPVRqAxkm8oJREW1BmE+9xVfwxxWiUOIpOQXe6jSsk2 ly2tiOIwZBFu83f7F0J+WZM8Vz+5PzWPL8UweschJuHKnLzZZpy3VGbT+LBCmg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705957450; a=rsa-sha256; cv=none; b=YtNzRNYqeUr7m8ie+ORJnpbHNFPPYXuS3z+1wb1Drbu5c/yLWKk+nIf15bN3FLQguyHi/Y YasVYbFKHzbYOFZcix1xmNOhSKMN91NqbcFJKJm+IkyzQZj3CMt7pKeJIgfglBOfpM6C3q zkNzQyBBeJXFv3eMmEpH3XBBwZyskFMzUJK4oWrUrH3o3xRqdxXqlkPh65TgZK379j/z86 EYZlpGlTF0co89PwXrPV/cGD9MjGDylcTw4+rIUu6ciQVl/1sy92ed42cykuavkKNcC+gd QFdlo03PGdH7juaFohddEp7DMQNLsl3UtMrvc3ZLxGDzwbpRru3Hkc/tui9EKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJjQ21yTwz1HKL; Mon, 22 Jan 2024 21:04: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 40ML4Aou081162; Mon, 22 Jan 2024 21:04:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ML4Abo081159; Mon, 22 Jan 2024 21:04:10 GMT (envelope-from git) Date: Mon, 22 Jan 2024 21:04:10 GMT Message-Id: <202401222104.40ML4Abo081159@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: ad92f3d9d0b5 - main - meta2deps.py: Fix a typo in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad92f3d9d0b56ee723271152cec9174f74e17cb9 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=ad92f3d9d0b56ee723271152cec9174f74e17cb9 commit ad92f3d9d0b56ee723271152cec9174f74e17cb9 Author: Gordon Bergling AuthorDate: 2024-01-22 21:00:36 +0000 Commit: Gordon Bergling CommitDate: 2024-01-22 21:00:36 +0000 meta2deps.py: Fix a typo in a source code comment - s/follwing/following/ MFC after: 3 days --- share/mk/meta2deps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/mk/meta2deps.py b/share/mk/meta2deps.py index d7820ec71b5b..334a008a2ab5 100755 --- a/share/mk/meta2deps.py +++ b/share/mk/meta2deps.py @@ -197,7 +197,7 @@ class MetaFile: def __init__(self, name, conf={}): """if name is set we will parse it now. - conf can have the follwing keys: + conf can have the following keys: SRCTOPS list of tops of the src tree(s). From nobody Mon Jan 22 21:04:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJjQ36KV9z58CxW; Mon, 22 Jan 2024 21:04:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TJjQ3404Zz4Hjp; Mon, 22 Jan 2024 21:04:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sKGQwb0kOa/T4wgAoIjaKPKNbQGsnN0q5bgyLqUGsOE=; b=CjB30DVjFu1PzQ0haPgBAXYARANSJupclKC8DLRuYJbIRIqSOmNXHjgPZ2g1cT/UfvNUng bEXDfKX1Nx4Df9iMXICwAESel+gsUsxoMVeYvih7tYZ9V6aWaYMY2s706x2YujIwthg+Z/ naN8e2u3zdsKXSfMTI/dk6s5b9wK/4XVRPORo9Z+A2FLl5PGUDogBcoDU52HGB3Muq33DU FA+/ytKIWgci4XDuLX7zneBru9ffo0rufspONw5jiRfsVFt8sMtVTgRmD5CDCpoFkgjWps jsgiZ2odMFyCaSAf4RFXWOgL7GMXdF69DupMnypewGJOLdGoGQAOCNP9vLV3Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705957451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sKGQwb0kOa/T4wgAoIjaKPKNbQGsnN0q5bgyLqUGsOE=; b=G5uLjMszAOxFXKePw7O1aAROnRt6Fr4SkIAoYGVdoOlm5apUyPYP2zH8h5C9ovDBFhK1uQ AChx26xVVc99IetwFi4tFz3LQmG7wE48YTa5/7ae1ZRK0JQxBTxKgY36OrmawXgMhIqTFw OKylnAgKJ9tQ35baLQmpFH+pH32UUR4/LscvQzRywPDHiaCMisVNAODEHi0b6piecDlWc8 Jy3H/gBebk8EM66DZkLK6TEfLKbAqpGk9ziVsR/zW2lbtWfr4ZbTh5akql3gKIIw/gXgV5 sgP1IIAtmJX+lL9NwPIqhpZqMbsO+4fwwKutuW6q/GHpFx2fD4Rz5ZYgcxgWWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705957451; a=rsa-sha256; cv=none; b=miT8etr9V4ntDRXZs2I8rYZHNIsaPWMeMhlmoOOt6oxuY2OikYBsKChw4feexUCIz31kkz Viv/kd91M7XEzlpL1q4oW3drAf8nwEtYTZtqLeuV78JzZYQ5BUO/tqmen2X0E+Mo2TCvcQ 64N688NmKNcXx39hDTsvqKtlCKkFfGW8GcpYS8lxR5SbKXAiU8d6Kvs89XkHnN+Dr1wYea 4SqS7TT3j9oVr4QWCbJ/crl57LUFMeTcLQ3MWyADTEKJqSjn810MjTiGXI5tRujBydFQH8 t0Vb8ucQPvvNxBYG77dg26AV6P7a1Ll30mSjE/ctaQd3kCqJvh8w/EgS8svD+g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJjQ335BGz1HGq; Mon, 22 Jan 2024 21:04: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 40ML4BX4081216; Mon, 22 Jan 2024 21:04:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ML4BwN081213; Mon, 22 Jan 2024 21:04:11 GMT (envelope-from git) Date: Mon, 22 Jan 2024 21:04:11 GMT Message-Id: <202401222104.40ML4BwN081213@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: e125371fb6ff - main - dwc: Fix two typos in a source code comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e125371fb6ff22d452c5ae90d3787432b8bfa0d1 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=e125371fb6ff22d452c5ae90d3787432b8bfa0d1 commit e125371fb6ff22d452c5ae90d3787432b8bfa0d1 Author: Gordon Bergling AuthorDate: 2024-01-22 21:03:29 +0000 Commit: Gordon Bergling CommitDate: 2024-01-22 21:03:29 +0000 dwc: Fix two typos in a source code comment - s/recevied/received/ - s/descriptr/descriptor/ MFC after: 3 days --- sys/dev/dwc/dwc1000_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/dwc/dwc1000_dma.c b/sys/dev/dwc/dwc1000_dma.c index c510c252072c..44b9f0d114bf 100644 --- a/sys/dev/dwc/dwc1000_dma.c +++ b/sys/dev/dwc/dwc1000_dma.c @@ -363,7 +363,7 @@ dwc_rxfinish_one(struct dwc_softc *sc, struct dwc_hwdesc *desc, (RDESC0_FS | RDESC0_LS)) { /* * Something very wrong happens. The whole packet should be - * recevied in one descriptr. Report problem. + * received in one descriptor. Report problem. */ device_printf(sc->dev, "%s: RX descriptor without FIRST and LAST bit set: 0x%08X", From nobody Tue Jan 23 02:17:53 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJrN20XfHz58gbs; Tue, 23 Jan 2024 02:17:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TJrN16nglz44yk; Tue, 23 Jan 2024 02:17:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705976274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V3gYiN/nnw8qA21v2MnhSof3Fz7sPpqe13cvcHlUBoI=; b=W3Gpsdzfbi0gn2hXIolt8F/5bS/4RMEd25XB3CQndudFTqoMGKjVqhhtCo9Vg90jDsJ9zD kMvZ0/zqNGRbGVhfbtByPLahAjt5Z/2emdG33r1YAVmu31aO04alhe6GNN8h/bDEfEWcaz 8CbCLS5/KVvStCA5iMc9Dw42BC7AhotI1bc8EM0THqu1NL5x9ziC4qLI+f34ElnziTKYzp yuIZ7H/XECcvvo/m+B+otC5Az8dBDfT/Qo/GV3V6KfIyinsScRfLthTbjvo7URx85nMWrQ ZHvU7OS2zvhoDba1VMPXh9kMJtd3TjNnhmyS+k6Du6Ojt/BS82KVTmm7+5xdkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705976274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V3gYiN/nnw8qA21v2MnhSof3Fz7sPpqe13cvcHlUBoI=; b=coIqkyFh6dzcC1Ld6LfxdQMNOeAYBcZvfZ+yHb2Ke69F0GgQcVUMfGdK/hEvm7g86SqaqI 36aQz50Png102Plje9R3kFgD/1vVtu4QhExmu6wt6KGCSPm50U3Yu3WEr6+iu3i5q3Gy9f ZvUikntHh8wLOBFEwnoKQC9Xe5V/HiC+e9Cx+qmOyHYmJDWanSaVLGvS6NZsmqtWSFRPo2 el27csJoiDaN/cDQnQRrq89KFZQfxXSAOo0445KW/wXO8J/Z/kzAfx4JvdgQtolnrYapPh RWRjGancg45mMRC71Oo0CTag8MU+JZN8BCFMGAAcu4JX/7xd8y9SDujHzhPnyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705976274; a=rsa-sha256; cv=none; b=RJAW94uk9sw4PgmVD1jYiSGXaTdzkr0FFqdoHY04Ia7SEDchfKHRFk+BG9Zccp+BbN605R Q1TWCXd5cda5bzVu0oS3KdHDqpCDtVPCuCu9OHKCbFY+bByr+1I8KsGufh9bDvl7mS4ovk cFULpdHkylwjacxPjhKyhyjVOc0464N/w5izughxY23Vdnnh525voI5ps1FtqD+GZUl6sA Fzj5EZr7dMeEYYn+u6fKkFTkpFkp+US5Gg+K3ZSBb+MNvjDtud0BWu/eYlhqP1PWKISASP OioHrthpEBGf9/jIaUTEJwRE8iPtysHnJuQ0Djl/BLlSi1DiYxvNqTxd9oasnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJrN15rtTz1Q8d; Tue, 23 Jan 2024 02:17: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 40N2HrGP004495; Tue, 23 Jan 2024 02:17:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40N2HrJN004492; Tue, 23 Jan 2024 02:17:53 GMT (envelope-from git) Date: Tue, 23 Jan 2024 02:17:53 GMT Message-Id: <202401230217.40N2HrJN004492@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 3f4f82c0d779 - main - bsdlabel: limit to 8 partitions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f4f82c0d7791bddf2d6f2c29d9f2f8c48c712e2 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3f4f82c0d7791bddf2d6f2c29d9f2f8c48c712e2 commit 3f4f82c0d7791bddf2d6f2c29d9f2f8c48c712e2 Author: Ed Maste AuthorDate: 2024-01-23 02:05:58 +0000 Commit: Ed Maste CommitDate: 2024-01-23 02:17:23 +0000 bsdlabel: limit to 8 partitions bsdlabel is intended to support up to 20 partitions, but the disklabel struct has a d_partitions array with only BSD_NPARTS_MIN (8) entries. Previously, an attempt to operate on a bsdlabel with more than eight partitions resulted in a buffer overflow. As a stopgap limit bsdlabel to 8 partitions until this is fixed properly. PR: 276517 --- sbin/bsdlabel/bsdlabel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c index 2c03117e344a..b831c8ba4ec6 100644 --- a/sbin/bsdlabel/bsdlabel.c +++ b/sbin/bsdlabel/bsdlabel.c @@ -50,7 +50,7 @@ #include #define DKTYPENAMES #define FSTYPENAMES -#define MAXPARTITIONS 20 +#define MAXPARTITIONS 8 /* XXX should be 20, but see PR276517 */ #include #include From nobody Tue Jan 23 02:54:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TJsBj2WPRz58kdy; Tue, 23 Jan 2024 02:54: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 4TJsBj0TGxz49pg; Tue, 23 Jan 2024 02:54:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705978493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=StZNmg+oGLwIU2ibFUqIkQy3euLb0YNjJeNX2LLi7L0=; b=VbDZnFJgnaf/Z2KrDUa5kZhygOChjKOC2kFa7H9Xuhr+MkpdEXVlZKMZk6hLW00xgtP24A G8xJEa3zvoW+VCcr/Jf5o3yrcEY2QqBeCytwzieSiS4DtPg4dJWdvXFZ98UnEuFpm4yibJ 46+PkXIrBcMSjaFtuMfQY1xDKjUQOk+DdN4819oYou9efhtGVOJoq+792SBFGSxt2OCTI5 I2YdCfY8akrFUsIMzBgcROl2mFYfrkaugqAsuhjRSDu8PSFCijzmX3tq3wKgzW3q1KryDj i1b0wWnFFwelMQjbM7Jylh52IZGoJS7450g5VzNTohFgNBvLfJx1ZEJUyBiWFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705978493; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=StZNmg+oGLwIU2ibFUqIkQy3euLb0YNjJeNX2LLi7L0=; b=PvdNoUoGAu6mx98bB11y2SJs4OwAdwN6XNjw1NnehZ+AkSvqXX23484o6fDgayqBHVFLur zpYAje9MJoLUmMT1IWzYuBLPGgfbrD1y45DTPZwh1zuQmL1wFEWhKMsUzGsfH9SviNFm7I JUm/lppjfxXx4jKsn7AxQVIaAkrn3Fp+ybDAOLmhuZ3VN0r1L/pRK3oKE4pMF/02nmh7mK V5JmLA9ydcHrsELmkroG5n5GJUmXkXsA3VFRTuvewWd/rOri2JiTDsh+fwdshyyX94CqNR khML6Lmrb0fbPR1UOTssiu85sbYujlPhhUvjoISyhcrX4wls2N0FLMHfYKshpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705978493; a=rsa-sha256; cv=none; b=UI18JkTQ0pHaE8oa8eaH6cxRVVFrR/1MCGPMrSJIlspJF3phpK6HQdj/KWy/wlpfN/LD1F Ifj2KIpx6ui0ht13rNyCz2JYXjhMNfLrSMN+nJ9GSWEGXdglTehUJ8Cnw8m64XPuxVkyYO /moipnaUHCGBPHvP7mIxLXacRMnZPvjTPoiZqSRXUoJcBipiypJYZy8FS7QVwDBTlBpYwG I1UreJmAEqcMZURNGOCmAUoMMy0YrteXm/np/hjGFrHoNJ2+NunE7fkaKcMkfNaIJCZhdd x+z1hJf8VsiwuTCEwIohgXfWu80gu/vT5tv5Pc978YA82jPYKeiUyWBgbjaltw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TJsBh6g4lz1RDG; Tue, 23 Jan 2024 02:54:52 +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 40N2sq6G070181; Tue, 23 Jan 2024 02:54:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40N2sqGt070178; Tue, 23 Jan 2024 02:54:52 GMT (envelope-from git) Date: Tue, 23 Jan 2024 02:54:52 GMT Message-Id: <202401230254.40N2sqGt070178@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: a8b2189c90c5 - main - arm/mpic: remove empty pic_init_secondary() hook List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a8b2189c90c52e43e27614b2cca6b753a70da0ca Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=a8b2189c90c52e43e27614b2cca6b753a70da0ca commit a8b2189c90c52e43e27614b2cca6b753a70da0ca Author: Elliott Mitchell AuthorDate: 2024-01-23 02:52:37 +0000 Commit: Jessica Clarke CommitDate: 2024-01-23 02:52:37 +0000 arm/mpic: remove empty pic_init_secondary() hook The default hook does nothing, so having an empty handler is pointless. Simple cleanup. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D40475 --- sys/arm/mv/mpic.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sys/arm/mv/mpic.c b/sys/arm/mv/mpic.c index 15574e409001..232eb8556948 100644 --- a/sys/arm/mv/mpic.c +++ b/sys/arm/mv/mpic.c @@ -149,7 +149,6 @@ static void mpic_unmask_irq_err(uintptr_t nb); static boolean_t mpic_irq_is_percpu(uintptr_t); static int mpic_intr(void *arg); static void mpic_unmask_msi(void); -void mpic_init_secondary(device_t); void mpic_ipi_send(device_t, struct intr_irqsrc*, cpuset_t, u_int); int mpic_ipi_read(int); void mpic_ipi_clear(int); @@ -384,7 +383,6 @@ static device_method_t mv_mpic_methods[] = { DEVMETHOD(pic_post_filter, mpic_post_filter), DEVMETHOD(pic_post_ithread, mpic_post_ithread), DEVMETHOD(pic_pre_ithread, mpic_pre_ithread), - DEVMETHOD(pic_init_secondary, mpic_init_secondary), DEVMETHOD(pic_ipi_send, mpic_ipi_send), { 0, 0 } }; @@ -565,11 +563,6 @@ mv_msi_data(int irq, uint64_t *addr, uint32_t *data) return (0); } -void -mpic_init_secondary(device_t dev) -{ -} - void mpic_ipi_send(device_t dev, struct intr_irqsrc *isrc, cpuset_t cpus, u_int ipi) { From nobody Tue Jan 23 14:20:54 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TK8QG2VJGz56vkp; Tue, 23 Jan 2024 14:20:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TK8QG236Gz4MmZ; Tue, 23 Jan 2024 14:20:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706019654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IckEmpE2FcVM727sNgobgfU1+YNF9lTgFVOLWKZckDY=; b=vFCfJ1NAC82QJZ4vhNku2K6GOr9iR3XsHpbnjE4aVNjZEMVzdAzwEKisrmt0Y3VCXJELyO eCA2XCCzkE27moy70q1lAd2BTZlscU2D08Y/8Y7x3KZ5mX+01h9DpWwW7aUl5xqShRi4uE OZED1LMX/rwYpBxVxtDOX1fmxDEe7XKn+EXIA/GDhvF3PJfRxYR0vVQZImi7brT56Gu4CM 9K6zatZSrlhGAqxey5xuTQHRaZ0RB6L371c63WTCCxkMdCbVP2KHaYH19kkwqz44ib3MUg AHXKAim9XCoR/saOXtzHQcUEa0zIk3Ypfsqs6GEhKwBnjlOGCx2yie24VlMCdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706019654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IckEmpE2FcVM727sNgobgfU1+YNF9lTgFVOLWKZckDY=; b=wSKu7GW/GaCXZfPKmJZcXSSHdLMoaxuFyzZvixG9wOo4fkJ2syju4GwVF8QI2Brk6xwhtb Kkl26yk4Dcv2sfscXl/n3vX+djSseNA5BjF1Kvpf73dnnrP6yFxjGzWvtm08eCfmrrfCHZ sXkKOPGXe/sN+pUydBxTR01RlRoRQJveC9RnS9FRx8DpJpebg3S1mfiBCrl4Z/YLCnq+eT IP4u0W2vGTg9abbSX0cGBMXpwq4nJoNI6FbUKJH0WQy5ba07Xjy1ztpDGssbBgh88hojQm bU/ZecHTRDq4aJt/d1JFW5Eb8ZqMoD4BaSzLBp0j7uBFKRkQ4b57Y91C9mpOkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706019654; a=rsa-sha256; cv=none; b=GroXvziJINSPwvo1w5nv+5E+S9OBj9agP7A6HAL0OJp+Hln3v+5YvWrOooEjMGrOdQ8gjj NqYLl+JqxB/71+KLFkq1njadkoi7ogbLHsQk6vLpJTDkCyltgyuOL6geItd797/s89Wa1/ PTstkJQfiZkeHWF5GbYWG14IAaRflTia/mOX7tB0mTCouNEnkHYzCaIlVIyXM5G+r6fnvM vPk0hKOUIwQdQVrWi+t1GRyNBR64SjqMkyraCKbQluFn+49fVhte50WZBYjZ7zeh/6mtFN a7tGMpyPqC2heyKin8AU1J1ZsrV7QMusy1XwMgCsrflztCih9lURoeHZcWUtKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TK8QG0qQXzZ79; Tue, 23 Jan 2024 14:20:54 +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 40NEKs88029179; Tue, 23 Jan 2024 14:20:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NEKsdg029176; Tue, 23 Jan 2024 14:20:54 GMT (envelope-from git) Date: Tue, 23 Jan 2024 14:20:54 GMT Message-Id: <202401231420.40NEKsdg029176@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 7edbf69b79c1 - main - stand: Add 1440p to the list of known resolutions. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7edbf69b79c13debff251e6edfee1f57eeac3a6b Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=7edbf69b79c13debff251e6edfee1f57eeac3a6b commit 7edbf69b79c13debff251e6edfee1f57eeac3a6b Author: Dag-Erling Smørgrav AuthorDate: 2024-01-23 14:20:27 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2024-01-23 14:20:27 +0000 stand: Add 1440p to the list of known resolutions. MFC after: 1 week Reviewed by: manu, kevans, imp Differential Revision: https://reviews.freebsd.org/D43391 --- stand/defaults/loader.conf | 2 +- stand/defaults/loader.conf.5 | 3 ++- stand/efi/loader/framebuffer.c | 5 +++++ stand/i386/libi386/vbe.c | 5 +++++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/stand/defaults/loader.conf b/stand/defaults/loader.conf index 08406aa43bc8..e0062bbc8149 100644 --- a/stand/defaults/loader.conf +++ b/stand/defaults/loader.conf @@ -95,7 +95,7 @@ audit_event_type="etc_security_audit_event" bootenv_autolist="YES" # Auto populate the list of ZFS Boot Environments #beastie_disable="NO" # Turn the beastie boot menu on and off efi_max_resolution="1x1" # Set the max resolution for EFI loader to use: - # 480p, 720p, 1080p, 2160p/4k, 5k, or specify + # 480p, 720p, 1080p, 1440p, 2160p/4k, 5k, or # WidthxHeight (e.g. 1920x1080) #kernels="kernel kernel.old" # Kernels to display in the boot menu kernels_autodetect="YES" # Auto-detect kernel directories in /boot diff --git a/stand/defaults/loader.conf.5 b/stand/defaults/loader.conf.5 index 8b7508c8a5b2..42e5712d93b8 100644 --- a/stand/defaults/loader.conf.5 +++ b/stand/defaults/loader.conf.5 @@ -21,7 +21,7 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.Dd December 20, 2023 +.Dd January 10, 2024 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -315,6 +315,7 @@ The following values are accepted: .It 480p Ta 640x480 .It 720p Ta 1280x720 .It 1080p Ta 1920x1080 +.It 1440p Ta 2560x1440 .It 2160p Ta 3840x2160 .It 4k Ta 3840x2160 .It 5k Ta 5120x2880 diff --git a/stand/efi/loader/framebuffer.c b/stand/efi/loader/framebuffer.c index b8e61dc73acf..56693187b576 100644 --- a/stand/efi/loader/framebuffer.c +++ b/stand/efi/loader/framebuffer.c @@ -77,6 +77,11 @@ static struct named_resolution { .width = 1920, .height = 1080, }, + { + .name = "1440p", + .width = 2560, + .height = 1440, + }, { .name = "2160p", .alias = "4k", diff --git a/stand/i386/libi386/vbe.c b/stand/i386/libi386/vbe.c index 8fbfaa9a3475..61339a1e7911 100644 --- a/stand/i386/libi386/vbe.c +++ b/stand/i386/libi386/vbe.c @@ -84,6 +84,11 @@ static struct named_resolution { .width = 1920, .height = 1080, }, + { + .name = "1440p", + .width = 2560, + .height = 1440, + }, { .name = "2160p", .alias = "4k", From nobody Tue Jan 23 15:39:53 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKB9P3RBJz573vV; Tue, 23 Jan 2024 15: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 4TKB9P2rc3z4myB; Tue, 23 Jan 2024 15: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=1706024393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mQ4D1VOHHMCP3b4yp7mdFUj3nmZLyjGX+0o3htwJnzs=; b=JOY2yScePCkkZuXxMVevi1yb3JJ43S6jPxLwCloaZtSUiBs5d6RRt701rfG7H5+epnwCFS QagDzjMU2rZP1IaqGIf9538Myb7H9XB1YQPbska3FjAB0F5V/Rc5V1hz07vcaQPRWPICQw TESM72xB1mIWnrO+IkDx8q5n6vAlSrJvDRtdv3uPP2KoFj6E/mElIKO89+frwZ+zmm1lue +HmPGxrT2jl0pvC8oi9fVVBLtNSLBHe+bSyLYVYtXKNmhswhqr/uqzJoKp7crZ0Z2nAa0j ZSh90WOfPWVhm8kTce1kA0n6D+NOevNIEv4PAii1zio1Tehy7HbrXmWbDUIF+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706024393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mQ4D1VOHHMCP3b4yp7mdFUj3nmZLyjGX+0o3htwJnzs=; b=qO80gfaWFLC0lueZxZiB/7yvOg2KxB7NPsHKQWa28pBqpDPSg88mMxSJcTn86B+86eaL8c hCljVt8C0zT3ZRBygovaty43s8kbcjYiiWCUZADL94BM5RPNWkK6ZmsUqJBWlL/gmrsJPg UiAAYHVG5TYxjOcbFfBGdNDxT/m+9a/dlBIO//pneFBFDjD3vrppzCSJ5sqSrYSHCsOnNt QukGbaKFVfyfPR7xuZDeRMzf9OWVEiExYTTY5uMCPtQgGNZW0Ar3Ors8ArqpoUNezNw7T8 C0KcNjlTKHPcfu9f3RR3w7wF4Svc/jzhGsZ8N9ZnBHT2ekLnKeLDARqnOm77kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706024393; a=rsa-sha256; cv=none; b=agevotIIVXkrxX6dbOVQHmsUSX60TAL4wN7oURcdn1QSOEEwKHYkLF86ZcWEy1ZUYB+P4V ANWM7ZKl4h4gCX9IOeIezgNU27CY5S6fcDz4ZIFktvHX6907f6gI2Mn2HtkzBSBRzCtuBf PLHz2/BID3IhTgmaBfKV7ofVEWzef8nyJz4HCXNSc5IxWEWUvImlB6kVOS78aZSCG8bUIX 1OCfERRfJeOfLMisG21BecuO3Tq4p8NHYmmYf6pbyD3p2HEbPn2/DY2RgdwrsUh8aZFxZT ayHn1UaJqPzk+qp9oQq0tsHkqG75vy6ohAhBegbQz9+zzRZEUzD/OIKuFvVYsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKB9P1x9nzbYv; Tue, 23 Jan 2024 15: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 40NFdrZA055930; Tue, 23 Jan 2024 15: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 40NFdr7h055927; Tue, 23 Jan 2024 15:39:53 GMT (envelope-from git) Date: Tue, 23 Jan 2024 15:39:53 GMT Message-Id: <202401231539.40NFdr7h055927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 9f550134a4a4 - main - acpiconf: remove trailing space in "Mesurement Accuracy" output List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f550134a4a4c8319e79f0ae9f44c58d30f6c26f Auto-Submitted: auto-generated The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=9f550134a4a4c8319e79f0ae9f44c58d30f6c26f commit 9f550134a4a4c8319e79f0ae9f44c58d30f6c26f Author: Christos Margiolis AuthorDate: 2024-01-23 15:39:40 +0000 Commit: Christos Margiolis CommitDate: 2024-01-23 15:39:40 +0000 acpiconf: remove trailing space in "Mesurement Accuracy" output No functional change intended. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43561 --- usr.sbin/acpi/acpiconf/acpiconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/acpi/acpiconf/acpiconf.c b/usr.sbin/acpi/acpiconf/acpiconf.c index 44c39ca66368..4f5cb08325dc 100644 --- a/usr.sbin/acpi/acpiconf/acpiconf.c +++ b/usr.sbin/acpi/acpiconf/acpiconf.c @@ -131,7 +131,7 @@ acpi_battinfo(int num) if (ACPI_BIX_REV_MIN_CHECK(battio.bix.rev, ACPI_BIX_REV_0)) { if (battio.bix.cycles != ACPI_BATT_UNKNOWN) printf("Cycle Count:\t\t%d\n", battio.bix.cycles); - printf("Measurement Accuracy:\t%d %%\n", + printf("Measurement Accuracy:\t%d%%\n", battio.bix.accuracy / 1000); if (battio.bix.stmax != ACPI_BATT_UNKNOWN) printf("Max Sampling Time:\t%d ms\n", From nobody Tue Jan 23 15:40:36 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKBBD55DPz57464; Tue, 23 Jan 2024 15:40: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 4TKBBD4gSPz4nMN; Tue, 23 Jan 2024 15:40:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706024436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9LysRkmOpV9/z9PW8GhyB/Ji05d2SKDQOU7EnoUbiKU=; b=P6Xosr1UKkWDijJC68jinRTEsF3/0i9C6qrVoIiCf4XB9ArzAmRrEHe0Yr9lQwgeWA2X2v qaTMmyA1Ac1tiGkJhi89Pi8tkaUEqeLNPhTnBKf2LKMG794NwVJBM2rgr7ENYzxhMAPnEA wH86VkG5iiGN/w/XxrU+QWzof3FcSZusAaVcKkH/dFMcTf/EuE27UGCKzAwEj7Z86hWf0E 2wBMQJYh6GKi0VoP0B6qLwB4zCHkjVcsn7b3eAdLhUYXPJ7AOm3xF2vrwionZpX5zO1p72 ga7zdgs1+bMEA5qyHE5a5TqRJCp351R85o1/rpUuawh5vYghxR4G73hbGRULLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706024436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9LysRkmOpV9/z9PW8GhyB/Ji05d2SKDQOU7EnoUbiKU=; b=SsBfjco+iAJg/gV5t3tF0gAOOOmCLy4XEg/fXlZeek3r7wC6BgUASLXCKNfYTBulvhgG78 37T/dRTYSsL3iIp917ZaYOtlGUq3bf4VNC7XYXHjnGJlq0Bf4gAp8QET7RXNOgcl6Co1mZ 02hEoEFov6UMo6L2dESa0pkGPe8NhM3JLBSvcUyE7LG/WsjCJss5IF4lDW6K7adAvGeqCy NzBskaFgKfA2sUfqVsqnK8o95nISP6tK7WjlNSadvXhw+I3Kc/DbHpgUalH4FRn+XUl4OR TwpV6HHPabJGOieguuieKuBDVmOvbCKpFWNmkq/l7fknv9T+EMLGmV4I2s++dA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706024436; a=rsa-sha256; cv=none; b=R87g3V7fGQWaapClnXxHyeyxFWGlrYvPGLaXY2zYpA5gA6L1IDyCZP8RHJpH5GLpSWn318 cFjrP4lxY2gy2yyvahfi6faQmOeeClWZjCBdjBJ7G5I4iKzLS0jB+wQlDViiaJhWZ3LssK FfAqJFbwylB1BJrphNMjZpuzWIN8WIFMQtXZnA4VgupN6T6u012u2zSCFDBwra0Jiiyxd9 WSDF1rt2uuwR9PMqFNt4lSiMXr9nvJZsUDOmwWTolDdpegSP3lEL8LdjvsmM4HkO8of5wh cQwRjzNgIlWM8lWkopbtr+rTC0auuQnyYI8N4eEOSZW51xuGOyB6YlENWBmDDQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKBBD3kb7zbnr; Tue, 23 Jan 2024 15:40: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 40NFeaCl064701; Tue, 23 Jan 2024 15:40:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NFeaYV064698; Tue, 23 Jan 2024 15:40:36 GMT (envelope-from git) Date: Tue, 23 Jan 2024 15:40:36 GMT Message-Id: <202401231540.40NFeaYV064698@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 380b7eb30947 - main - sysctl.8: fix format typo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 380b7eb309478e1aac1609a3dfe1c28436add1c4 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=380b7eb309478e1aac1609a3dfe1c28436add1c4 commit 380b7eb309478e1aac1609a3dfe1c28436add1c4 Author: Igor Ostapenko AuthorDate: 2024-01-23 14:34:59 +0000 Commit: Kristof Provost CommitDate: 2024-01-23 15:40:14 +0000 sysctl.8: fix format typo Signed-off-by: Igor Ostapenko --- sbin/sysctl/sysctl.8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/sysctl/sysctl.8 b/sbin/sysctl/sysctl.8 index 837282e80a9b..528efe6697b5 100644 --- a/sbin/sysctl/sysctl.8 +++ b/sbin/sysctl/sysctl.8 @@ -322,7 +322,7 @@ option has been deprecated and is silently ignored. .Xr sysctl 3 , .Xr loader.conf 5 , .Xr sysctl.conf 5 , -.Xr security 7, +.Xr security 7 , .Xr loader 8 .Sh HISTORY A From nobody Tue Jan 23 16:45:30 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKCd70cdFz57gNY; Tue, 23 Jan 2024 16:45:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKCd705C3z4vbH; Tue, 23 Jan 2024 16:45:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706028331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CdZqraYeLLjzio4RUkRn2HMhdfUTR1/3yqZXtoPoKDw=; b=BRQebV1hASERdB4JxscuqQNoDtN+hU/WGxK+toSoLpacvDUA+kMRzK6z9rlbZpNg5UcSt9 kV7F0jx/mW5WeauIuk4mwrIY4lMITjJQZkogKZ0gj7NnTQCRcXE4gcEklXs1d87/CZic3O nq7tlRphrAFLdQdqZFBHAnfqZeI0NSv6zhA7JUrB6KJPW1DRDudPCdOvMg7VShcp07ipk0 lm/CFTJgh94kIXNN686opI/AfLCr6OW8uEd9rGV3Qu6o9rcaVbZXlkPsARZ3fdytW8nUmv jnH3OYENY5uet5MEFy2OvpsLGDeHZumpzk8rLddJM1KzhST6slLhlCu1qhJZrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706028331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CdZqraYeLLjzio4RUkRn2HMhdfUTR1/3yqZXtoPoKDw=; b=F3X5FRF0v5Wyean8ifUoaMWjhNP/23KcL9vvzyFR9jFZa40Z0CHjZHRSlZF36N9wxwzq1D FiM7GNUZwByIPzRZu1OUVsvc5ACRAMfHw4cFQJhWR3jMO4lV2EEAaSwIHbqDaquPAz2cAO FhpwuuZvJs/vqKm99nTWiNJK7w+S6lQLzjFfN4W72sFIMBTloFlykYl8QMdtxqdqrM+4ha XptSdokrUr7d7DoZTp8FhL4TAlvHh5E/D/5Z9TG9ON93ffdv8b5d12zhBdA0r9Vo2X8K09 jU4rjIZZkWglhUKctkP4ZHs5xRlKhP20IkS4+D5UKVbvxYSmYDRJCix1/CFxDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706028331; a=rsa-sha256; cv=none; b=meA+uteF/kde9t7SyJxpIxq5XE5PiWxJ4wToSFEdk3wP+Q26Hg8q3PTMFZ1wFx9u3XAZds SRfzXyFdDj0dLAdVaK+WLKX2itPKEdoG8CjkM0Xe0ZYwLkv8p+gpHl7GE+RrcpsYQaIMDj xx7ngOUpiIlVxBspXKNGHJQGzbZPNqSzL9pqrvB5gFBv4mdTWa9keo8W8NNyECWqy4e/GG Mjd7YxBpbm2gtvDACZG/7GrC/k0pHQUATwx8Hs9fv2+ffRtIxiHcJNBdWv6fu4plrw1S++ GlYAMxisNriwdxDPXqBLajyJ7zKhPQadCtHbeXKZ2t2pXw7xKbJzpnnQSmCPeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKCd66DVXzddJ; Tue, 23 Jan 2024 16:45: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 40NGjU6G074248; Tue, 23 Jan 2024 16:45:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NGjUps074245; Tue, 23 Jan 2024 16:45:30 GMT (envelope-from git) Date: Tue, 23 Jan 2024 16:45:30 GMT Message-Id: <202401231645.40NGjUps074245@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: cfa2c78aee85 - main - bhyve: Avoid underflows when handling remote commands List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cfa2c78aee859bfc6549951bb6a36085fdd374e8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cfa2c78aee859bfc6549951bb6a36085fdd374e8 commit cfa2c78aee859bfc6549951bb6a36085fdd374e8 Author: Mark Johnston AuthorDate: 2024-01-23 16:40:40 +0000 Commit: Mark Johnston CommitDate: 2024-01-23 16:40:40 +0000 bhyve: Avoid underflows when handling remote commands Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D43480 --- usr.sbin/bhyve/gdb.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/gdb.c b/usr.sbin/bhyve/gdb.c index 2d49469c2e11..f1aabbde43fd 100644 --- a/usr.sbin/bhyve/gdb.c +++ b/usr.sbin/bhyve/gdb.c @@ -1052,6 +1052,8 @@ gdb_read_mem(const uint8_t *data, size_t len) bool started; int error; + assert(len >= 1); + /* Skip 'm' */ data += 1; len -= 1; @@ -1163,6 +1165,8 @@ gdb_write_mem(const uint8_t *data, size_t len) size_t resid, todo, bytes; int error; + assert(len >= 1); + /* Skip 'M' */ data += 1; len -= 1; @@ -1557,7 +1561,7 @@ gdb_query(const uint8_t *data, size_t len) data += strlen("qThreadExtraInfo"); len -= strlen("qThreadExtraInfo"); - if (*data != ',') { + if (len == 0 || *data != ',') { send_error(EINVAL); return; } @@ -1608,7 +1612,7 @@ handle_command(const uint8_t *data, size_t len) case 'H': { int tid; - if (data[1] != 'g' && data[1] != 'c') { + if (len < 2 || (data[1] != 'g' && data[1] != 'c')) { send_error(EINVAL); break; } From nobody Tue Jan 23 16:45:31 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKCd81ZY6z57gW6; Tue, 23 Jan 2024 16:45: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 4TKCd811Bzz4vqH; Tue, 23 Jan 2024 16:45:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706028332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Ry1phDUK9yF+m066OlXZ6SimsrTHTemGxLv2n0CkZ4=; b=EqRQ7gGtYV7oFldZaaO62vZzy9v23xOavymP1s1aX/jwGcoq3R/eaYTCPB86TbPSL5iSbJ 6TS1+razpgOiTthPBXLSNwYDihqFQLvq1c8or0XHjWLaA6lLtS638iTbmIDWnF1YyefNm1 f80BkkKntWuY2BwiPIcSJWz7qYk1/EbjWSNvQuXEcfKZBq0JZP/nSy0Pn3IzOOLXwh0oTG y2lYEWOFmzJ9FfLOnuEIfops2J5GR4fJ1VAR3O78wzBuLheoQKaqnFydA1s+IDc+bICeuD YbOHgIUkrlOu+6hDMXZk9OrEcuA3DBOIScbdR1gY8ZqAicH1JaV8OsCV+TYsHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706028332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1Ry1phDUK9yF+m066OlXZ6SimsrTHTemGxLv2n0CkZ4=; b=C7WWX/q0pNTE7pXVGgUXYoE1tIa8jZd3Lu3/WDm2DCv3cpo13Py3nx6TNLGLbHHT7q9bLk XudG178g4iTPvEs8jSGy6+tzVcQUZFMl+jflHqYqtvRySTlo0eOqgZlLVzPZ0TmUxriCmj 0Fg6cCuAp6pDWVA+o3ulkBjQHK2j8r7U6IUeIws0UaVFWAZ2w365f9VpMm/4eDK63TU4f1 1/VWVHLWAcLMYDgr+YHUWixeEkHuNpfqMFu1Qownl/cxxzTlZlMJnbPFrG63yPV8jjdjen QJkJmNkMJeQDNULp37dmZKx+r0KFVXKPVpCjyGda3W2I/A/PgLvGw/a5zO84xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706028332; a=rsa-sha256; cv=none; b=MYXl6/cQK1HdEEg5QzlZcf/ETwkK4vg0R6aECbwT4Eq+5knWlrYXwFbbVdVpmBwXQOV0a5 PJw+nAEIzaPj24vVwhn6S493l1A4Fw7+4x18A8Dh6fQvx0GwtxQFne4xHP+p4bWiYVe2AM yrT7CvNxCkU6ytswhxmpSpyVXcjQpIV5yqwK6dCA4/2tj8jwAx01AX8ogtjN9sPlPHGOR4 E5GqVfz+C0i9JoxXIf+HOpY7keMAVCIFqm1tnc0tt6+rxelmFKPTTqCF8MiOApK1ed8fqh AC2IRma9sa6MqNp4vYO0vl5vlnNeQ/Z3vGsJBG9gzKeplghwh9rHDS0i9QilQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKCd8059Gzf30; Tue, 23 Jan 2024 16:45: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 40NGjV2R074293; Tue, 23 Jan 2024 16:45:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NGjVNW074290; Tue, 23 Jan 2024 16:45:31 GMT (envelope-from git) Date: Tue, 23 Jan 2024 16:45:31 GMT Message-Id: <202401231645.40NGjVNW074290@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 5e728af444b1 - main - bhyve: Simplify register definitions a bit List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e728af444b16f480ec0f43803ca2a7a3e6e2e48 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5e728af444b16f480ec0f43803ca2a7a3e6e2e48 commit 5e728af444b16f480ec0f43803ca2a7a3e6e2e48 Author: Mark Johnston AuthorDate: 2024-01-23 16:40:52 +0000 Commit: Mark Johnston CommitDate: 2024-01-23 16:40:52 +0000 bhyve: Simplify register definitions a bit It's awkward to have separate tables for information which is logically connected. Merge the gdb_regset[] and gdb_regsize[] arrays and update gdb_read_regs() to cope with the result. This makes the addition of arm64 support a bit cleaner. No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D43481 --- usr.sbin/bhyve/gdb.c | 89 ++++++++++++++++++++-------------------------------- 1 file changed, 34 insertions(+), 55 deletions(-) diff --git a/usr.sbin/bhyve/gdb.c b/usr.sbin/bhyve/gdb.c index f1aabbde43fd..2ef684e82c4b 100644 --- a/usr.sbin/bhyve/gdb.c +++ b/usr.sbin/bhyve/gdb.c @@ -134,58 +134,34 @@ static struct vcpu **vcpus; static int cur_vcpu, stopped_vcpu; static bool gdb_active = false; -static const int gdb_regset[] = { - VM_REG_GUEST_RAX, - VM_REG_GUEST_RBX, - VM_REG_GUEST_RCX, - VM_REG_GUEST_RDX, - VM_REG_GUEST_RSI, - VM_REG_GUEST_RDI, - VM_REG_GUEST_RBP, - VM_REG_GUEST_RSP, - VM_REG_GUEST_R8, - VM_REG_GUEST_R9, - VM_REG_GUEST_R10, - VM_REG_GUEST_R11, - VM_REG_GUEST_R12, - VM_REG_GUEST_R13, - VM_REG_GUEST_R14, - VM_REG_GUEST_R15, - VM_REG_GUEST_RIP, - VM_REG_GUEST_RFLAGS, - VM_REG_GUEST_CS, - VM_REG_GUEST_SS, - VM_REG_GUEST_DS, - VM_REG_GUEST_ES, - VM_REG_GUEST_FS, - VM_REG_GUEST_GS -}; - -static const int gdb_regsize[] = { - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 8, - 4, - 4, - 4, - 4, - 4, - 4, - 4 +static const struct gdb_reg { + enum vm_reg_name id; + int size; +} gdb_regset[] = { + { .id = VM_REG_GUEST_RAX, .size = 8 }, + { .id = VM_REG_GUEST_RBX, .size = 8 }, + { .id = VM_REG_GUEST_RCX, .size = 8 }, + { .id = VM_REG_GUEST_RDX, .size = 8 }, + { .id = VM_REG_GUEST_RSI, .size = 8 }, + { .id = VM_REG_GUEST_RDI, .size = 8 }, + { .id = VM_REG_GUEST_RBP, .size = 8 }, + { .id = VM_REG_GUEST_RSP, .size = 8 }, + { .id = VM_REG_GUEST_R8, .size = 8 }, + { .id = VM_REG_GUEST_R9, .size = 8 }, + { .id = VM_REG_GUEST_R10, .size = 8 }, + { .id = VM_REG_GUEST_R11, .size = 8 }, + { .id = VM_REG_GUEST_R12, .size = 8 }, + { .id = VM_REG_GUEST_R13, .size = 8 }, + { .id = VM_REG_GUEST_R14, .size = 8 }, + { .id = VM_REG_GUEST_R15, .size = 8 }, + { .id = VM_REG_GUEST_RIP, .size = 8 }, + { .id = VM_REG_GUEST_RFLAGS, .size = 4 }, + { .id = VM_REG_GUEST_CS, .size = 4 }, + { .id = VM_REG_GUEST_SS, .size = 4 }, + { .id = VM_REG_GUEST_DS, .size = 4 }, + { .id = VM_REG_GUEST_ES, .size = 4 }, + { .id = VM_REG_GUEST_FS, .size = 4 }, + { .id = VM_REG_GUEST_GS, .size = 4 }, }; #ifdef GDB_LOG @@ -1031,15 +1007,18 @@ static void gdb_read_regs(void) { uint64_t regvals[nitems(gdb_regset)]; + int regnums[nitems(gdb_regset)]; + for (size_t i = 0; i < nitems(gdb_regset); i++) + regnums[i] = gdb_regset[i].id; if (vm_get_register_set(vcpus[cur_vcpu], nitems(gdb_regset), - gdb_regset, regvals) == -1) { + regnums, regvals) == -1) { send_error(errno); return; } start_packet(); - for (size_t i = 0; i < nitems(regvals); i++) - append_unsigned_native(regvals[i], gdb_regsize[i]); + for (size_t i = 0; i < nitems(gdb_regset); i++) + append_unsigned_native(regvals[i], gdb_regset[i].size); finish_packet(); } From nobody Tue Jan 23 16:45:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKCd949Mpz57gKm; Tue, 23 Jan 2024 16:45: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 4TKCd91npWz4vdj; Tue, 23 Jan 2024 16:45:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706028333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cWKoqLJhSSUwRa2j7MUUIqPtiqSRZNXESxf6doUEy+M=; b=EcTth+D5bRq0EwbJFwl6CZWinCfOczt1jQ5egQp28jQLjpzwu+HUVX3FtW2f75B1S/Tryy QGwr4SIzdpA59JfeOipTNAAqUBrDHEblsywQ8uFetCOKIf332wHY5v/wFOJlMjcE1wVzcE TRePi4ECLS04OpjFuFEqkrYA9pYYA3fDlY9RZAKcuGomP/2FwGrVLxwueS0l9buQkxr5bx LtwPvVBb0DEBtRWNQWqSgujbtwSkRWaVWWAztK7zH8LB6LIHEUlMSRUB9qt5GgBHx27sHZ FOP5V6OMxFzYrwxibaIssMpUap0P1EsfoeS4Te9Fz2qYevLsBaV43b8qQDjuhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706028333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cWKoqLJhSSUwRa2j7MUUIqPtiqSRZNXESxf6doUEy+M=; b=fX2jn1Vh217+IuhnrB0BuR6HgWHlM/IQj6Pky8suQbraZMhbDaGOn3ofpurldeuY4r0JGQ M4ARsgo10ZUiFORK0IAdmPRT7WSezlaQwxpPKI4akzb1XJ93dHWQ8gkZAJ82iES6uyPLCm G2e9kwbQLTvRcHDp5GfXQR2goTL+3ubaANfjaJN9EfOiVtsDLP0D48fTbJS/XqbiZDRKuc JykU8mZvlxcTqQRZTo1HqbuHqXUiPV+ON00BaPDcuvaOqkO/LWYCrx/vMyOldXvIwcgRPE ErYYOoh6JLcrQHh5A0UdyUebtrkg7waVk0fkkM9RxbT95/4Oi/2XZ9o8fdAv8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706028333; a=rsa-sha256; cv=none; b=cyjDhJjCHkiXRx3VZ3TPuVSzNWaN79BfSqLH2+75W4hO0Cy7juRDhpWnD1+TXLaonRP8ub fDpyfehTF4FI0wzZ5sWq52HeuMZbB8vCWa4jh5RgNqm6BnNlcXEJedxpfAw0Gwpk8raEPq 1Ljv2KOYSpVrxlanGP7jnKDsHEZe+V9xeVSmyGRufJDpEe5yn07fF1GsimOQrfOOdUjNiu 2g+wtwZ55OXXMnmY8Y7MhPbqxQOWUKwfOaaSv4ME0Oe9/S+5iNf78W2g+jfVc3ZygawMib X/EjGZVY5RvMt3/EG3Hk+IeBKplMH4fjLSpoQc70/v8UxK5SH+krIx8On1OJAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKCd90rMJzf31; Tue, 23 Jan 2024 16:45: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 40NGjXdv074350; Tue, 23 Jan 2024 16:45:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NGjXjZ074347; Tue, 23 Jan 2024 16:45:33 GMT (envelope-from git) Date: Tue, 23 Jan 2024 16:45:33 GMT Message-Id: <202401231645.40NGjXjZ074347@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 5f086566e02a - main - bhyve: Prepare to add arm64 support to the gdb stub List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f086566e02a3d21dc840564b90d46f1d3b829bb Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=5f086566e02a3d21dc840564b90d46f1d3b829bb commit 5f086566e02a3d21dc840564b90d46f1d3b829bb Author: Mark Johnston AuthorDate: 2024-01-23 16:41:13 +0000 Commit: Mark Johnston CommitDate: 2024-01-23 16:41:13 +0000 bhyve: Prepare to add arm64 support to the gdb stub In particular: - Stop assuming that the breakpoint size is one byte. - Avoid referencing the "rip" field in machine-independent code, use a helper. No functional change intended. Reviewed by: corvink, jhb MFC after: 1 week Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D43483 --- usr.sbin/bhyve/gdb.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/usr.sbin/bhyve/gdb.c b/usr.sbin/bhyve/gdb.c index 2ef684e82c4b..4f427b1a0863 100644 --- a/usr.sbin/bhyve/gdb.c +++ b/usr.sbin/bhyve/gdb.c @@ -69,6 +69,13 @@ */ #define GDB_SIGNAL_TRAP 5 +#define GDB_BP_SIZE 1 +#define GDB_BP_INSTR (uint8_t []){0xcc} +#define GDB_PC_REGNAME VM_REG_GUEST_RIP + +_Static_assert(sizeof(GDB_BP_INSTR) == GDB_BP_SIZE, + "GDB_BP_INSTR has wrong size"); + static void gdb_resume_vcpus(void); static void check_command(int fd); @@ -95,7 +102,7 @@ struct io_buffer { struct breakpoint { uint64_t gpa; - uint8_t shadow_inst; + uint8_t shadow_inst[GDB_BP_SIZE]; TAILQ_ENTRY(breakpoint) link; }; @@ -263,6 +270,12 @@ guest_vaddr2paddr(struct vcpu *vcpu, uint64_t vaddr, uint64_t *paddr) return (1); } +static uint64_t +guest_pc(struct vm_exit *vme) +{ + return (vme->rip); +} + static void io_buffer_reset(struct io_buffer *io) { @@ -931,7 +944,7 @@ gdb_cpu_breakpoint(struct vcpu *vcpu, struct vm_exit *vmexit) } vcpuid = vcpu_id(vcpu); pthread_mutex_lock(&gdb_lock); - error = guest_vaddr2paddr(vcpu, vmexit->rip, &gpa); + error = guest_vaddr2paddr(vcpu, guest_pc(vmexit), &gpa); assert(error == 1); bp = find_breakpoint(gpa); if (bp != NULL) { @@ -940,11 +953,11 @@ gdb_cpu_breakpoint(struct vcpu *vcpu, struct vm_exit *vmexit) assert(vs->stepped == false); assert(vs->hit_swbreak == false); vs->hit_swbreak = true; - vm_set_register(vcpu, VM_REG_GUEST_RIP, vmexit->rip); + vm_set_register(vcpu, GDB_PC_REGNAME, guest_pc(vmexit)); for (;;) { if (stopped_vcpu == -1) { debug("$vCPU %d reporting breakpoint at rip %#lx\n", - vcpuid, vmexit->rip); + vcpuid, guest_pc(vmexit)); stopped_vcpu = vcpuid; gdb_suspend_vcpus(); } @@ -963,7 +976,7 @@ gdb_cpu_breakpoint(struct vcpu *vcpu, struct vm_exit *vmexit) gdb_cpu_resume(vcpu); } else { debug("$vCPU %d injecting breakpoint at rip %#lx\n", vcpuid, - vmexit->rip); + guest_pc(vmexit)); error = vm_set_register(vcpu, VM_REG_GUEST_ENTRY_INST_LENGTH, vmexit->u.bpt.inst_length); assert(error == 0); @@ -1277,8 +1290,8 @@ remove_all_sw_breakpoints(void) TAILQ_FOREACH_SAFE(bp, &breakpoints, link, nbp) { debug("remove breakpoint at %#lx\n", bp->gpa); - cp = paddr_guest2host(ctx, bp->gpa, 1); - *cp = bp->shadow_inst; + cp = paddr_guest2host(ctx, bp->gpa, sizeof(bp->shadow_inst)); + memcpy(cp, bp->shadow_inst, sizeof(bp->shadow_inst)); TAILQ_REMOVE(&breakpoints, bp, link); free(bp); } @@ -1294,7 +1307,7 @@ update_sw_breakpoint(uint64_t gva, int kind, bool insert) uint8_t *cp; int error; - if (kind != 1) { + if (kind != GDB_BP_SIZE) { send_error(EINVAL); return; } @@ -1309,7 +1322,7 @@ update_sw_breakpoint(uint64_t gva, int kind, bool insert) return; } - cp = paddr_guest2host(ctx, gpa, 1); + cp = paddr_guest2host(ctx, gpa, sizeof(bp->shadow_inst)); /* Only permit breakpoints in guest RAM. */ if (cp == NULL) { @@ -1333,15 +1346,15 @@ update_sw_breakpoint(uint64_t gva, int kind, bool insert) } bp = malloc(sizeof(*bp)); bp->gpa = gpa; - bp->shadow_inst = *cp; - *cp = 0xcc; /* INT 3 */ + memcpy(bp->shadow_inst, cp, sizeof(bp->shadow_inst)); + memcpy(cp, GDB_BP_INSTR, sizeof(bp->shadow_inst)); TAILQ_INSERT_TAIL(&breakpoints, bp, link); debug("new breakpoint at %#lx\n", gpa); } } else { if (bp != NULL) { debug("remove breakpoint at %#lx\n", gpa); - *cp = bp->shadow_inst; + memcpy(cp, bp->shadow_inst, sizeof(bp->shadow_inst)); TAILQ_REMOVE(&breakpoints, bp, link); free(bp); if (TAILQ_EMPTY(&breakpoints)) From nobody Tue Jan 23 16:58:47 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKCwR2qf4z57hTr; Tue, 23 Jan 2024 16:58:47 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKCwR1gFfz40Pt; Tue, 23 Jan 2024 16:58:47 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706029127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6SsgqemcSeDHwFYGUPoccRyGaIqAS50egiFV6fZKK9s=; b=ehrntuzuCCbx0U8759qHcfSp+yK2ny8F5xfcE4QxPsbQyQUwX4f3TmNotXD27gdF0qWcy5 oga62YVtffvEyKMlj/ggm9P2f1h0W2X7SdNsH8cUGHFKWSjd6PFa4RwyL5fp/bKvMekPJ6 qeK01DOItFD2pO/t6aPZQ8lctjnpoScn8Y9JpB0WMcI214ZhI6q9rw/e3jEcs7m73HtuoI a+F9gSmgo3jN0SEFM/2wbgZim0bdpo950W7GlXcYAZ2/Q9388Ng9Wf+l9YhNyQRhAAKVmz r5L9pQdY2I8xYRRn6iO0F/+cfOyGxU13iPK3HKhaQVIAD14x6SQ4ezFbLZCkOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706029127; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6SsgqemcSeDHwFYGUPoccRyGaIqAS50egiFV6fZKK9s=; b=vv3FqcLk2r6MdHHPx+28vwfvmnI1Ysic0KPP43g+beILTDlHl7gza77jrrLvSVVVPHHnfB SMmGf0rjde/Yr7aMUCUqq22m7mu8gI7Hf8zCcrPAKTcgjOv6Qo3c4v7NQ9ZXqMcoWvUS2z JOWH5D+yHkTYxb/v/YlkcxLRJSStvy3W+91BEszFAz3O1fLIdM3VNJD+Iw1FiuuMf91k/5 Aue2uqj0y6vTTqn05+ejXn8WQxV8MbWYN0csn0OuCbFapNJKEo2twTFFhE1+ogF+gLaqTf Pv7e3pwoigym73Qy/xgsdcvDIM3MQrBBcfukoMcQuHm98RmhrZh4IeRxQ7O0NA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706029127; a=rsa-sha256; cv=none; b=uVQVrbDrxcowRk4Vw9goI+q9gqemZrzGWAn0vqNb4VZ8YK1qIRJ+3n0SYG3QMuFkGfP/4Z LJXDvPKCkb70JAGd3LzIBKL/9WP8QI6gNY9vDITP0F+ZXjH5dPdOZj7wXxZva2VaW2Ew2K SPx4rAPCX34F+VEDITJpxASiRB7G3mIXByMFngz1V0M/TMpASSnM0Xlf3hteX4UUViXFfE 0GARIVRZ/3XNAF1K7ghmOBFg3fCTuoExnB8GAzPAuTeAMNiZjBz3hAyo5AEUUAaGWab6/V KPgr/Ty+vhwpFjiNNC3GrR+Ijef+RXKge2Wf5pYS7EmWdsmv3gLSEvZ78joTpA== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 2BD18FC7; Tue, 23 Jan 2024 16:58:47 +0000 (UTC) Date: Tue, 23 Jan 2024 16:58:47 +0000 From: Alexey Dokuchaev To: Christos Margiolis Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 9f550134a4a4 - main - acpiconf: remove trailing space in "Mesurement Accuracy" output Message-ID: References: <202401231539.40NFdr7h055927@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202401231539.40NFdr7h055927@gitrepo.freebsd.org> On Tue, Jan 23, 2024 at 03:39:53PM +0000, Christos Margiolis wrote: > commit 9f550134a4a4c8319e79f0ae9f44c58d30f6c26f > > acpiconf: remove trailing space in "Mesurement Accuracy" output Shouldn't it read "Measurement"? Also, why "accuracy" is capitalized? To be fair, there is no consistency among other entries whatsoever. :-/ ./danfe From nobody Tue Jan 23 17:45:48 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDyh5mklz57mnc; Tue, 23 Jan 2024 17:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKDyh43nTz46rQ; Tue, 23 Jan 2024 17:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MW7vGQfqJpA1bqy2tjg3YuhBx7dIVlRXsVROjL1FKBU=; b=yVUxlvhZYHBgAJoyWEo/WJKghjr2qG9XBbOv8h1sQFwH1wNLBSWIcoWi07Cd42ekXhRuMG Roy5FCmilD6WTbWkr9ZOh+PnplVGJW6hI5qh0ESrgnyR+pElhNICCxkE8Dud5YM1o5t+wn e9ik031jfcPWlipx2w5vwGLlEV+rr9DFkUBUAtCwA8cfxzRjBK9pvdfZaSXIBpamjwk8a/ US4/LLQcFgxtiUQRJ1tptaxqR1XoumfwtZ93dBzX7Ee7Uk2Xg9ZubylQMVOmK+ijPCp/MQ 6czXCNM2ZNCJt4iSWxX4B0PTUdA7vlsy0ZjOvMcrWjOsYLAFciCn7ZAN1OQEBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031948; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MW7vGQfqJpA1bqy2tjg3YuhBx7dIVlRXsVROjL1FKBU=; b=eEa6w727oB12BPACz6NY+Vc6BSjlXnhNaT64899AfSuvvzBNfSxZskhvPp1rMRhrFk3CTH jVOCpRILZ/cZQe3EzIdYw9ftdeSvKbzg0WKCBAV+3z57v1Id3KeqPbNSt8kGVyU8IFYGnx 3OBQEy6AphypT+BzeqxBNzv9ustZuWO7dN3ebpcFkjOxFBMUlRrFuPxw0FtI2PjdACVz/W TdmuG59wF9TfKzmn6HMVXZK2+U3weIDpWDcZykiSUrQfJ6n0EFFnKYh3U8qJY7mHvmU05M oFxgnZIN+v/zH6VCvtny6miXxOkFtIpIvWqbLM33ABFepmvSHFgK69HgQLUrTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031948; a=rsa-sha256; cv=none; b=kdtFkWDC2FFAwVQdMASKt1FpSVvj1Feqjnjp2PXk+Un5YstG9bFDXHJ+QFkfc+k2Raipfr Coi1S+cL9yyVQC03iUZud6OFo9bwWJ+yGI8iXMYWYsJB7iUIigjykFk4L429AYGmQHdTPi 5puZjfmswwZCjjM9bXaijDLSYWdpJGoy4Tloa69m8YJqOFWOy7cprbI/lFMSDfjkz5HGsz I7131PfVk8jC1LdM0zXt8tokbG/atLMTevZaisRgBjab7po/bQWN5t8+52gPSkf0043cBa L7nGT5EAtqDN05c3tCvrMJYkogF2HNQEm4D4zSTk3MB16cKG6sjJCZ/frYyIEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDyh37p8zgNN; Tue, 23 Jan 2024 17:45:48 +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 40NHjmlo075516; Tue, 23 Jan 2024 17:45:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHjmjC075513; Tue, 23 Jan 2024 17:45:48 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:45:48 GMT Message-Id: <202401231745.40NHjmjC075513@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 23e3b83ab61a - main - pcib: Add helper routines for [de]activating PCI_RES_BUS resources List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 23e3b83ab61a440ccce20da7fbf1340d58db361c Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=23e3b83ab61a440ccce20da7fbf1340d58db361c commit 23e3b83ab61a440ccce20da7fbf1340d58db361c Author: John Baldwin AuthorDate: 2024-01-23 17:35:08 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:35:08 +0000 pcib: Add helper routines for [de]activating PCI_RES_BUS resources Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43427 --- sys/dev/pci/pci_subr.c | 32 ++++++++++++++++++++++++++++++++ sys/dev/pci/pcib_private.h | 4 ++++ 2 files changed, 36 insertions(+) diff --git a/sys/dev/pci/pci_subr.c b/sys/dev/pci/pci_subr.c index 71485875ebe3..d0f6c9500b17 100644 --- a/sys/dev/pci/pci_subr.c +++ b/sys/dev/pci/pci_subr.c @@ -379,6 +379,38 @@ pci_domain_release_bus(int domain, device_t dev, int rid, struct resource *r) #endif return (rman_release_resource(r)); } + +int +pci_domain_activate_bus(int domain, device_t dev, int rid, struct resource *r) +{ +#ifdef INVARIANTS + struct pci_domain *d; +#endif + + if (domain < 0 || domain > PCI_DOMAINMAX) + return (EINVAL); +#ifdef INVARIANTS + d = pci_find_domain(domain); + KASSERT(rman_is_region_manager(r, &d->pd_bus_rman), ("bad resource")); +#endif + return (rman_activate_resource(r)); +} + +int +pci_domain_deactivate_bus(int domain, device_t dev, int rid, struct resource *r) +{ +#ifdef INVARIANTS + struct pci_domain *d; +#endif + + if (domain < 0 || domain > PCI_DOMAINMAX) + return (EINVAL); +#ifdef INVARIANTS + d = pci_find_domain(domain); + KASSERT(rman_is_region_manager(r, &d->pd_bus_rman), ("bad resource")); +#endif + return (rman_deactivate_resource(r)); +} #endif /* PCI_RES_BUS */ #endif /* NEW_PCIB */ diff --git a/sys/dev/pci/pcib_private.h b/sys/dev/pci/pcib_private.h index cf689026a033..d8a354c0e498 100644 --- a/sys/dev/pci/pcib_private.h +++ b/sys/dev/pci/pcib_private.h @@ -160,6 +160,10 @@ int pci_domain_adjust_bus(int domain, device_t dev, struct resource *r, rman_res_t start, rman_res_t end); int pci_domain_release_bus(int domain, device_t dev, int rid, struct resource *r); +int pci_domain_activate_bus(int domain, device_t dev, int rid, + struct resource *r); +int pci_domain_deactivate_bus(int domain, device_t dev, int rid, + struct resource *r); struct resource *pcib_alloc_subbus(struct pcib_secbus *bus, device_t child, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); From nobody Tue Jan 23 17:45:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDyj5wwcz57mqs; Tue, 23 Jan 2024 17:45:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKDyj5Mkhz46wT; Tue, 23 Jan 2024 17:45:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qx8q00kikTWirWZ/UPG5yZrxGz3PVcHlVYjLR/n4n7M=; b=U1PbjV4sgj+gtLHUnfP/SBi8wX0fArbwxUexVb1HTw840pBPhI3FHiTSKFTJjex+nH2p3G sHrGZPkcadGYA3LrNQlbgTjJknuuj5JGITftGWslTWhj0pIunvYKkXSCmqiNOXEOr+okku LtHmw7YLGvypM644MtqJJnnK9XM7t3wOORWXpGcV7fIvFjC9Y1lINroNXPrjDT1N2IA2fd FMrxR0pBHpzj/RTsJZAFN5cuv6Yn2JV2pWzEi+OPnv5vaeki2Njv9gbo/xXua6ATXuhzMO uv426Uulf61ft9hTZGmoaPOcOluO1bNsxHmqjav136tOelmSgVUt+INUG39o3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031949; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qx8q00kikTWirWZ/UPG5yZrxGz3PVcHlVYjLR/n4n7M=; b=mrJzHcYZNEbAeZUgnzqYAr40mHdGKRNvAKKXyyt0zfoMmLo74n6UoC6tMW9+2LNiSrvuGQ nMinb9tmgP/Mj7vIK8r3hzGLVOUyPJuG1bfNKRsIcPBZKTpI6vgUNOQiC0ffZPTGMBkaMU p69YRkeFlESXxsrqwReAwWiSRhvGp2rcvx29bzVDuH7F/Hb4zyJQykqd/TXKJvoptcV6mW bMrf9lZjkrZwj3An3NZDXCxMiUyeIkthVtPU+HBP4c3NX4aTqlG/Zz0ttJvMx9XMZpG0TP QMJsi1mnHsK3kb46HTcl5bHbt9PeqnaN/IMwWkiag9W0TMPm6Kfc8aeFWi38tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031949; a=rsa-sha256; cv=none; b=b7zSPS3xg9Cz6NNlCJpWvOt5O7MNG28ytPIo6lQGvwWZoeFGlCzrcv79vRIEDzLG/VRSyF 1CoVn02+0xkkRpkeG8QZbpr0GvupdC00g8aSrs22Lk/T+vhBKDdm70lcb0elC1h6upQGqF 2r408ALR18opknKSthIQSpiEJmOWW8N5d0tvl7vIoqtbp6yxzQ1g7EB63tHFVEI4dcBoYN UFUhKWhTufe5C0NMlLGn71LL+w3qNjPG2ZdekDnyUIslWx0T251eyulNHq0QMop5O/c3xe e1s/LeqAu5m8ulsuG1bzgJu2qwF+lXBBxUqETfH3VREQCndsufyOlucZCZ2rjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDyj47hZzgQd; Tue, 23 Jan 2024 17:45:49 +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 40NHjnkW075568; Tue, 23 Jan 2024 17:45:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHjnAc075565; Tue, 23 Jan 2024 17:45:49 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:45:49 GMT Message-Id: <202401231745.40NHjnAc075565@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: c2d4fef658e0 - main - acpi_pcib: Use pci_domain_[de]activate_bus for PCI_RES_BUS resources List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c2d4fef658e0dfd998115f1395cd8705b432e3c8 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c2d4fef658e0dfd998115f1395cd8705b432e3c8 commit c2d4fef658e0dfd998115f1395cd8705b432e3c8 Author: John Baldwin AuthorDate: 2024-01-23 17:35:22 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:35:22 +0000 acpi_pcib: Use pci_domain_[de]activate_bus for PCI_RES_BUS resources Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43428 --- sys/dev/acpica/acpi_pcib_acpi.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c index 06e6bc233720..451a8d8b736d 100644 --- a/sys/dev/acpica/acpi_pcib_acpi.c +++ b/sys/dev/acpica/acpi_pcib_acpi.c @@ -103,6 +103,12 @@ static int acpi_pcib_acpi_adjust_resource(device_t dev, static int acpi_pcib_acpi_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); +static int acpi_pcib_acpi_activate_resource(device_t dev, + device_t child, int type, int rid, + struct resource *r); +static int acpi_pcib_acpi_deactivate_resource(device_t dev, + device_t child, int type, int rid, + struct resource *r); #endif #endif static int acpi_pcib_request_feature(device_t pcib, device_t dev, @@ -128,11 +134,13 @@ static device_method_t acpi_pcib_acpi_methods[] = { #endif #if defined(NEW_PCIB) && defined(PCI_RES_BUS) DEVMETHOD(bus_release_resource, acpi_pcib_acpi_release_resource), + DEVMETHOD(bus_activate_resource, acpi_pcib_acpi_activate_resource), + DEVMETHOD(bus_deactivate_resource, acpi_pcib_acpi_deactivate_resource), #else DEVMETHOD(bus_release_resource, bus_generic_release_resource), -#endif DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), +#endif DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_get_cpus, acpi_pcib_get_cpus), @@ -764,6 +772,31 @@ acpi_pcib_acpi_release_resource(device_t dev, device_t child, int type, int rid, return (pci_domain_release_bus(sc->ap_segment, child, rid, r)); return (bus_generic_release_resource(dev, child, type, rid, r)); } + +int +acpi_pcib_acpi_activate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + struct acpi_hpcib_softc *sc; + + sc = device_get_softc(dev); + if (type == PCI_RES_BUS) + return (pci_domain_activate_bus(sc->ap_segment, child, rid, r)); + return (bus_generic_activate_resource(dev, child, type, rid, r)); +} + +int +acpi_pcib_acpi_deactivate_resource(device_t dev, device_t child, int type, + int rid, struct resource *r) +{ + struct acpi_hpcib_softc *sc; + + sc = device_get_softc(dev); + if (type == PCI_RES_BUS) + return (pci_domain_deactivate_bus(sc->ap_segment, child, rid, + r)); + return (bus_generic_deactivate_resource(dev, child, type, rid, r)); +} #endif #endif From nobody Tue Jan 23 17:45:50 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDyl0zjdz57mYC; Tue, 23 Jan 2024 17:45: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 4TKDyk62r7z46tG; Tue, 23 Jan 2024 17:45:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V+JSmsl4ayVtECJ9KiE6QwutNWEDWjSFIQvmWoPkmng=; b=c8qrWiIhf/9Tg3QVAZP86i/i4s5RpQ5E+wc2Mw8VN535Y2cXjk0WnNi9kvNTye697CVKgO +js3PLD40NR/8Ylj3dfCp02vNbAef/sHeww+jTW8+iqYmBIfeN+ua7lmZz2bOm1JUvfxdU 5MYHoVhtfajwhZiZpkCREM1+lmMmfrlXhVCDsoCWAaX32+Cz/H5RTSLat2+9mKq94yy6kC UXonopKi/vW8xMQFitF6mZdmAi/cma2IFfPVpiRw1sBoY0pNrq9a0F4/VkMrIGRTKXEw78 0wzhkRnm7k3DnHzed061m0w1Iou4Cfy6NrIUXnHbpUmSCPKvewHRfhrHjYVolQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V+JSmsl4ayVtECJ9KiE6QwutNWEDWjSFIQvmWoPkmng=; b=aA5mHDhUxV9wvDL9KXZCmInB5JuRTQ0SS3y52Cdeo/7ls7HyD0Xdv9vuPI/WQ7pD6AZpPQ QNfUySV4P8eDwy15aZV7OrouZFMk2M2dbHXUkyrucDQKhrrVoau6dCvkt0RXBXVMftxjYi xVEhp4igMxoKpm10Nlw1QZrIcmaZfoVG/cf8bmIGoVDRKNxz1u0CifqG6imfFyjSHdPgie NMeDp+li3f3/lNs17etNq3HlW/cEnN4VlzXsOih1SdD5p6h+d5VLFaDwlTcp/YfNkzmiWV qBMDwDcWaG4YT56eEabB/4+b3ashR+C+1/lafTY+afbMGv6WsMeOnMDn4Mrw7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031950; a=rsa-sha256; cv=none; b=khjTzT05+5LzEZz914QnZ27ecTs7j71PZ5rX0scacE6RoKizvOvP9hRh6O02t9GF1cfIPE H0XJpkFfunrzeY1iT4UhNPS8mClSNrtPBs15qB/DAAu81rVSghWxf6e4c/cUgK+kcmRCRF igBMMz4davbDmUpFaFr0Vcc77/dtfEH4MLNkOGW/QQWexWbW2UlZJXBDfON3L1uCL3mLAI lokWOZw3KzRsiSaIi61/csRCLDU1tm0oq48w6A3bQzb9z2c4m3q5VYJX95MJXNpYrX9bcj dcOugI3JrgsJoq2G0Nxzd8OgAAhxpQ1SQcKeV6SsIhK8mwa+7u0/bM/V28MV6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDyk53hPzg8x; Tue, 23 Jan 2024 17:45: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 40NHjoFZ075613; Tue, 23 Jan 2024 17:45:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHjoS0075610; Tue, 23 Jan 2024 17:45:50 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:45:50 GMT Message-Id: <202401231745.40NHjoS0075610@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e9eb353b324a - main - pci_host_generic: Use pci_domain_[de]activate_bus for PCI_RES_BUS resources List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e9eb353b324a3d051f81dde91d9f9f0fc044d822 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e9eb353b324a3d051f81dde91d9f9f0fc044d822 commit e9eb353b324a3d051f81dde91d9f9f0fc044d822 Author: John Baldwin AuthorDate: 2024-01-23 17:35:36 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:35:36 +0000 pci_host_generic: Use pci_domain_[de]activate_bus for PCI_RES_BUS resources Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43429 --- sys/dev/pci/pci_host_generic.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c index 90361a7258ed..43b6d26e9217 100644 --- a/sys/dev/pci/pci_host_generic.c +++ b/sys/dev/pci/pci_host_generic.c @@ -504,9 +504,19 @@ static int generic_pcie_activate_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + struct generic_pcie_core_softc *sc; +#endif rman_res_t start, end; int res; +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + sc = device_get_softc(dev); + if (type == PCI_RES_BUS) { + return (pci_domain_activate_bus(sc->ecam, child, rid, r)); + } +#endif + if ((res = rman_activate_resource(r)) != 0) return (res); @@ -529,8 +539,17 @@ static int generic_pcie_deactivate_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + struct generic_pcie_core_softc *sc; +#endif int res; +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + sc = device_get_softc(dev); + if (type == PCI_RES_BUS) { + return (pci_domain_deactivate_bus(sc->ecam, child, rid, r)); + } +#endif if ((res = rman_deactivate_resource(r)) != 0) return (res); From nobody Tue Jan 23 17:45:51 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDym2Pdvz57mFq; Tue, 23 Jan 2024 17:45: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 4TKDyl6wVwz479M; Tue, 23 Jan 2024 17:45:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KmZSuwjZ22iBLoXXPNI6CE3wi2rfGV+djHnBTr7ULXA=; b=KnoXHjZO2jNlRWoP6jnmIym+QnJaax8FckCGXOHn5zhr6TaA+SmYuegwF0mHQnUrqhWO4l jtiLZs+k9Bj6HR4PQ7xxKuQ9+05NhiLXQVVpYJoewIJPvL9/zUpXz8wl5h6JkvpgzKliLf LJleQOvaqguEYpcKCWgbX7lAkjYVjb3h6yZV45Q7shnVnnHaZGHjixzuJwtlmmvafaPzO2 w7VhAbD3hSNMzCGWT/h8MH63w5mB5lP8x8yFB792vLi+CwgBHplb9GDCU/9zbBdf8N/7d+ TuTPdAzRQ2933SZ94x3B7PtqXuJcZnzXFUM4IkUe/Rx693mgxlXx25AhdycAUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KmZSuwjZ22iBLoXXPNI6CE3wi2rfGV+djHnBTr7ULXA=; b=h64Xq/3l4pqlr3S/SU3Ui7OOmtiftDkqTKgeQr+Qk4Suwmhbf/PAfH4fjP6/NH1Uv8nriQ 23jrs+Uz2ObamzZuGc6UGVTXOvu11aOGAZ2D300vUUkBQ/23S8Rvmi0FYWJHKWWBoqPlPL iAWdwIp52d2jR9A4xsdIGH9nEZ1ewj+EwnLSK6Vcu+Hv3M41isr7pESanEsloYJHEtSm2W EI4AKaJHtSrctKL/8TlsWfqoXhcqOcxvEAuNGG+QQ7yqy4NhNDPhVQ5Y9wQ39OKjspK+Rd b7zK6LI3b/rVU2SJ12f1EmPPtl47fmefN346L5YJer0OoS3mgPYJtwbhuCKLHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031952; a=rsa-sha256; cv=none; b=atBnzPEEb4Nesz6g5+Mv46pYWuT9DnzCLL0IsyCfBE/m0AkZ+KN3wQTo+6E7p9GpiLK0vx bq0lgkuOOMabXXjQ60+PrrmW7ll46FmCaieRkHY16x4D76r8RBp8VCrL17oRtY1tsS6dCD 70Uxqryuk8bLWjOXpgGfUU7MGedfahv0QgYXQHRPyuz96RIzoeMxt+Fck3Ak4Qctvfinra frjsDbL3Vf55/an16iVUydkllp/IO8u6kwMzjxtzEcsv7XIHjqxyqnDRRNigE6dARsJxSf XvHWXM2d7kPxgLidVubTz8yjtbfCfVHdV6ixAXnpBYd4YJzoCfUgrDyXlMUBHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDyl61tczfpP; Tue, 23 Jan 2024 17:45: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 40NHjpP7075658; Tue, 23 Jan 2024 17:45:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHjpf5075655; Tue, 23 Jan 2024 17:45:51 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:45:51 GMT Message-Id: <202401231745.40NHjpf5075655@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 31e15e531c51 - main - x86: Use pci_domain_[de]activate_bus for PCI_RES_BUS resources List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31e15e531c51be35c6907bbb6b1a5ab125f08a0d Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=31e15e531c51be35c6907bbb6b1a5ab125f08a0d commit 31e15e531c51be35c6907bbb6b1a5ab125f08a0d Author: John Baldwin AuthorDate: 2024-01-23 17:35:47 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:35:47 +0000 x86: Use pci_domain_[de]activate_bus for PCI_RES_BUS resources Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43430 --- sys/x86/include/legacyvar.h | 4 ++++ sys/x86/pci/pci_bus.c | 22 +++++++++++++++++++++- sys/x86/pci/qpi.c | 4 +++- sys/x86/x86/mptable_pci.c | 4 +++- 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/sys/x86/include/legacyvar.h b/sys/x86/include/legacyvar.h index 2c9cf1391934..5627e9b90306 100644 --- a/sys/x86/include/legacyvar.h +++ b/sys/x86/include/legacyvar.h @@ -62,6 +62,10 @@ int legacy_pcib_adjust_resource(device_t dev, device_t child, int type, struct resource *r, rman_res_t start, rman_res_t end); int legacy_pcib_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); +int legacy_pcib_activate_resource(device_t dev, device_t child, int type, + int rid, struct resource *r); +int legacy_pcib_deactivate_resource(device_t dev, device_t child, int type, + int rid, struct resource *r); int legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs); int legacy_pcib_alloc_msix(device_t pcib, device_t dev, int *irq); diff --git a/sys/x86/pci/pci_bus.c b/sys/x86/pci/pci_bus.c index d06cfca53673..cfe0a3974187 100644 --- a/sys/x86/pci/pci_bus.c +++ b/sys/x86/pci/pci_bus.c @@ -625,6 +625,24 @@ legacy_pcib_release_resource(device_t dev, device_t child, int type, int rid, return (pci_domain_release_bus(0, child, rid, r)); return (bus_generic_release_resource(dev, child, type, rid, r)); } + +int +legacy_pcib_activate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + if (type == PCI_RES_BUS) + return (pci_domain_activate_bus(0, child, rid, r)); + return (bus_generic_activate_resource(dev, child, type, rid, r)); +} + +int +legacy_pcib_deactivate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + if (type == PCI_RES_BUS) + return (pci_domain_deactivate_bus(0, child, rid, r)); + return (bus_generic_deactivate_resource(dev, child, type, rid, r)); +} #endif static device_method_t legacy_pcib_methods[] = { @@ -643,12 +661,14 @@ static device_method_t legacy_pcib_methods[] = { #if defined(NEW_PCIB) && defined(PCI_RES_BUS) DEVMETHOD(bus_adjust_resource, legacy_pcib_adjust_resource), DEVMETHOD(bus_release_resource, legacy_pcib_release_resource), + DEVMETHOD(bus_activate_resource, legacy_pcib_activate_resource), + DEVMETHOD(bus_deactivate_resource, legacy_pcib_deactivate_resource), #else DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), -#endif DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), +#endif DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), diff --git a/sys/x86/pci/qpi.c b/sys/x86/pci/qpi.c index 9b31d7693798..38eed7f67f80 100644 --- a/sys/x86/pci/qpi.c +++ b/sys/x86/pci/qpi.c @@ -284,12 +284,14 @@ static device_method_t qpi_pcib_methods[] = { DEVMETHOD(bus_alloc_resource, qpi_pcib_alloc_resource), DEVMETHOD(bus_adjust_resource, legacy_pcib_adjust_resource), DEVMETHOD(bus_release_resource, legacy_pcib_release_resource), + DEVMETHOD(bus_activate_resource, legacy_pcib_activate_resource), + DEVMETHOD(bus_deactivate_resource, legacy_pcib_deactivate_resource), #else DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), -#endif DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), +#endif DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), diff --git a/sys/x86/x86/mptable_pci.c b/sys/x86/x86/mptable_pci.c index 38a16673551f..5792b0cb7387 100644 --- a/sys/x86/x86/mptable_pci.c +++ b/sys/x86/x86/mptable_pci.c @@ -174,11 +174,13 @@ static device_method_t mptable_hostb_methods[] = { #endif #if defined(NEW_PCIB) && defined(PCI_RES_BUS) DEVMETHOD(bus_release_resource, legacy_pcib_release_resource), + DEVMETHOD(bus_activate_resource, legacy_pcib_activate_resource), + DEVMETHOD(bus_deactivate_resource, legacy_pcib_deactivate_resource), #else DEVMETHOD(bus_release_resource, bus_generic_release_resource), -#endif DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), +#endif DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), From nobody Tue Jan 23 17:45:52 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDyn4bLFz57mmJ; Tue, 23 Jan 2024 17:45: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 4TKDyn0v9Tz476h; Tue, 23 Jan 2024 17:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GxcwfBDTkC+POYvX0ZgzaiP0EFHhtTQ8bIsKTwD+3MY=; b=OBUM9N5zrOq3FQ7LopKIRBRs5e1P6P6RmDqBmTU9AIrcLD7+xGwT8fhk8iHy1jlWXBMkh9 mHCI3n52pU5HHVbix/RdR3gP7zJdqlq3EU/le2SqvETC6Zr8Kx8X+GHerwMA7Ez+SvT9Ii R3rS8U6sA7B3efhoFksPl9TvMkcLbqJaXVbMEoz9JQzkcL9FEWxIW0y4jUTJfBi7iKe+M5 L5tAssObkLMPDwQwBxQWteHmz9UC3NF2mbDf+Mv0WYVp0JUeibjL+5zzuGNOxqB+Bg1FRn nor1sFHKra7qfPApB4J8jgmJAjA/h8aF8AGAkgUV3D9dUMJKyaZINEr2VbNFVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GxcwfBDTkC+POYvX0ZgzaiP0EFHhtTQ8bIsKTwD+3MY=; b=izn3e9lxFFsdkO4zDm47C/tEVZM7JamWI7GbTQ38rYMqGvV6YZhChD8rF6exe1nUIiuW1L BaqufqeNhx8F3QrCE7GlmR3HMYsjblar0ZMmK01pkyV42AsLiEhMafApVz4yWOhjFCAejX lAwrCTm1C9YH6uRzE5/qUhe+qt49Uz5K+DmCJ/hT1qtCRq2jqHj/SUgMqxnnV4p4ID2a9D LJgEZxHtjUKO+HlRv22BZ8w3dY6p0j09r3bPRtf9ljms6lmtrDkXLD758Clp6PXiJF1+I5 uzuhOALRGEJGQvbuHyzZHJ65p4ZpxJA+zGCO9R4OZ0wImDAyvQhMZhs8V/j/4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031953; a=rsa-sha256; cv=none; b=k4duUKtRYANVcFmJxwaA6U5zK7h+SI7KnLY4qyqjqmSNfFUwH1g9bv79TisuOC9/NFaSWE hhOcfm5pJ+/pkKL017LpTzpOFXKLDdgJSaf+i39VYXGTs75nDOr7qI2VTGxCc185LMRPKT G/qjSJxsIN0SSucstK7bWLQcj720/HkCtISq4pKa3+/Yios+idTGyU6Bq3fkxnjzjum0ws TJ2yPuKA0fbJPrz4bGyDcOEw1s3vY/+mXHDhTJBFSVdnJDTT3t0vuhx+bsYNNBDdZBsrgA Yen2EK4XCeLJdjANBlm0VGrZxoDhAjGXxOygEqMgtoSeG+Afvov0M+JslhmwVw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDyn00n9zgcM; Tue, 23 Jan 2024 17:45: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 40NHjqTn075706; Tue, 23 Jan 2024 17:45:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHjqpu075703; Tue, 23 Jan 2024 17:45:52 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:45:52 GMT Message-Id: <202401231745.40NHjqpu075703@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 9c4effb1063d - main - hyperv vmbus_pcib: Use pci_domain_*_bus for PCI_RES_BUS resources List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9c4effb1063d49748b4b7da4cc54f508ccad41fc Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9c4effb1063d49748b4b7da4cc54f508ccad41fc commit 9c4effb1063d49748b4b7da4cc54f508ccad41fc Author: John Baldwin AuthorDate: 2024-01-23 17:35:58 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:35:58 +0000 hyperv vmbus_pcib: Use pci_domain_*_bus for PCI_RES_BUS resources Specifically for bus_activate/adjust/deactivate_bus methods. Differential Revision: https://reviews.freebsd.org/D43431 --- sys/dev/hyperv/pcib/vmbus_pcib.c | 41 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c index ee7b82c10f23..f7c825d1bcf9 100644 --- a/sys/dev/hyperv/pcib/vmbus_pcib.c +++ b/sys/dev/hyperv/pcib/vmbus_pcib.c @@ -1711,6 +1711,18 @@ vmbus_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, return (res); } +static int +vmbus_pcib_adjust_resource(device_t dev, device_t child, int type, + struct resource *r, rman_res_t start, rman_res_t end) +{ + struct vmbus_pcib_softc *sc = device_get_softc(dev); + + if (type == PCI_RES_BUS) + return (pci_domain_adjust_bus(sc->hbus->pci_domain, child, r, + start, end)); + return (bus_generic_adjust_resource(dev, child, type, r, start, end)); +} + static int vmbus_pcib_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r) @@ -1727,6 +1739,30 @@ vmbus_pcib_release_resource(device_t dev, device_t child, int type, int rid, return (bus_generic_release_resource(dev, child, type, rid, r)); } +static int +vmbus_pcib_activate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + struct vmbus_pcib_softc *sc = device_get_softc(dev); + + if (type == PCI_RES_BUS) + return (pci_domain_activate_bus(sc->hbus->pci_domain, child, + rid, r)); + return (bus_generic_activate_resource(dev, child, type, rid, r)); +} + +static int +vmbus_pcib_deactivate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ + struct vmbus_pcib_softc *sc = device_get_softc(dev); + + if (type == PCI_RES_BUS) + return (pci_domain_deactivate_bus(sc->hbus->pci_domain, child, + rid, r)); + return (bus_generic_deactivate_resource(dev, child, type, rid, r)); +} + static int vmbus_pcib_get_cpus(device_t pcib, device_t dev, enum cpu_sets op, size_t setsize, cpuset_t *cpuset) @@ -1970,9 +2006,10 @@ static device_method_t vmbus_pcib_methods[] = { DEVMETHOD(bus_read_ivar, vmbus_pcib_read_ivar), DEVMETHOD(bus_write_ivar, vmbus_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, vmbus_pcib_alloc_resource), + DEVMETHOD(bus_adjust_resource, vmbus_pcib_adjust_resource), DEVMETHOD(bus_release_resource, vmbus_pcib_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_activate_resource, vmbus_pcib_activate_resource), + DEVMETHOD(bus_deactivate_resource, vmbus_pcib_deactivate_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_get_cpus, vmbus_pcib_get_cpus), From nobody Tue Jan 23 17:45:54 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDyp3hMNz57mnv; Tue, 23 Jan 2024 17:45:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKDyp1pWRz46xC; Tue, 23 Jan 2024 17:45:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5CQH0nN24wQ66mEi0QEgkMHdXjOpj8L0xiM3yB7zDGs=; b=WezmPq4+yXE+6kgBj+9QM3Losprtm08dT26gLXBZfCMLJnLnvjL8c2YZJt8+0uzhxBXFDi 860sVYQkQy0yEIPFpVMpGI+CrIh02dkkVQyRv1PUHfHFvcaSK6EB8UOldSC50fU0p7kuwC bMr0tY76sfMfnk65IqSc3kqf/ZeFLEI8/T4V34qG6lowvxNkvIVCoQi0HNshifyuOWprHw 9P7bmF5zhvaEGk2ZPbuqOUh0Bi3lb4XjKIk3+4CRO/cNsx+gSu4tcY3GqtcKk37zRvCTuY 7vUhpG0YRRZvviHZshrGutVrPx4bBuKn7N0K5m5sWqbDTiPLjEECYv4ad4BnqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031954; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5CQH0nN24wQ66mEi0QEgkMHdXjOpj8L0xiM3yB7zDGs=; b=SQTPJL/DhD9YsFe+3ohQ0Jf+6lIz4AYeegEv2Hckael36vmWIH71l4dqdkCCKx3w80RiqM DZd3Iv9Mw3738pgLYWgl8xZYyBwuUMdCme+cRQuJXHLrjlKMOucYmHNhjQFl8roFVFQUEh Sw6DCQ2fHNpnWCrAablAOvX2ieMJO2AwHjrIpvXdGP39fXSJ9j1pEdEwmFkJBgy4iaimU+ PJdnk/HxYy0J7Rxq5QY+8ttacn6gTM9t6x9RNryzWiEE5P5yBD7IdJRBOPqtBNms/573W2 LTwjqzLK0wfdwae8i12v8lHMQ94sk29l1m4KOQ9GjpheOCQihGEDrZ3tH7J1nA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031954; a=rsa-sha256; cv=none; b=j9XmxISwhjjaOl4/EDDe5b3/+PzWctgZlHcxpHXgUile75YbmGZxFYmCbXwaNVEKZubHvC ahpuvb3hUnfsXOMYk0rx4NVsPg+WTGinK51UVwEdf+tLA0oQz3SFBGQ47tNc7nATAAn4J0 Vghuxgcyh7iTH1fKHf+qrdNZShUkiK0BhPDrcvwPeO3U78fZAqC1xIV9Vl60StpI/IGfOV E5H/CwwTvH4Qg58S3/gbZsJWDU183636FvLRYqMGd4rVuNigDgxYFEMiIr3EG851TG/3ac sg8c7hAKM7+Xl4t2/Gb3GhxqV9II/E67oUyTZyipB3k39kBZB13Zbb8H7tU2ug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDyp0vlfzfpQ; Tue, 23 Jan 2024 17:45:54 +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 40NHjsNN075745; Tue, 23 Jan 2024 17:45:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHjssP075742; Tue, 23 Jan 2024 17:45:54 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:45:54 GMT Message-Id: <202401231745.40NHjssP075742@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 3dd55df98282 - main - powerpc ps3bus: Use bus_generic_rman_* List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3dd55df98282293c41bb0d98fa54312a9cf2aba5 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3dd55df98282293c41bb0d98fa54312a9cf2aba5 commit 3dd55df98282293c41bb0d98fa54312a9cf2aba5 Author: John Baldwin AuthorDate: 2024-01-23 17:36:12 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:36:12 +0000 powerpc ps3bus: Use bus_generic_rman_* - Split out part of ps3bus_activate_resource into a ps3bus_map_resource method. - Implement ps3bus_unmap_resource via pmap_unmapdev. - Use bus_generic_rman_* to add bus_adjust_resource, bus_deactivate_resource, and bus_release_resource methods. Reviewed by: imp, jhibbits Differential Revision: https://reviews.freebsd.org/D43432 --- sys/powerpc/ps3/ps3bus.c | 130 +++++++++++++++++++++++++++-------------------- 1 file changed, 74 insertions(+), 56 deletions(-) diff --git a/sys/powerpc/ps3/ps3bus.c b/sys/powerpc/ps3/ps3bus.c index 64548e5a3b34..c3f46d4942ad 100644 --- a/sys/powerpc/ps3/ps3bus.c +++ b/sys/powerpc/ps3/ps3bus.c @@ -57,13 +57,18 @@ static int ps3bus_attach(device_t); static int ps3bus_print_child(device_t dev, device_t child); static int ps3bus_read_ivar(device_t bus, device_t child, int which, uintptr_t *result); +static struct rman *ps3bus_get_rman(device_t bus, int type, u_int flags); static struct resource *ps3bus_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); -static int ps3bus_activate_resource(device_t bus, device_t child, int type, - int rid, struct resource *res); +static int ps3bus_map_resource(device_t bus, device_t child, int type, + struct resource *r, struct resource_map_request *argsp, + struct resource_map *map); +static int ps3bus_unmap_resource(device_t bus, device_t child, int type, + struct resource *r, struct resource_map *map); static bus_dma_tag_t ps3bus_get_dma_tag(device_t dev, device_t child); -static int ps3_iommu_map(device_t dev, bus_dma_segment_t *segs, int *nsegs, bus_addr_t min, bus_addr_t max, bus_size_t alignment, +static int ps3_iommu_map(device_t dev, bus_dma_segment_t *segs, int *nsegs, + bus_addr_t min, bus_addr_t max, bus_size_t alignment, bus_addr_t boundary, void *cookie); static int ps3_iommu_unmap(device_t dev, bus_dma_segment_t *segs, int nsegs, void *cookie); @@ -109,8 +114,14 @@ static device_method_t ps3bus_methods[] = { DEVMETHOD(bus_get_dma_tag, ps3bus_get_dma_tag), DEVMETHOD(bus_print_child, ps3bus_print_child), DEVMETHOD(bus_read_ivar, ps3bus_read_ivar), + DEVMETHOD(bus_get_rman, ps3bus_get_rman), DEVMETHOD(bus_alloc_resource, ps3bus_alloc_resource), - DEVMETHOD(bus_activate_resource, ps3bus_activate_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_rman_adjust_resource), + DEVMETHOD(bus_activate_resource, bus_generic_rman_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_rman_deactivate_resource), + DEVMETHOD(bus_map_resource, ps3bus_map_resource), + DEVMETHOD(bus_unmap_resource, ps3bus_unmap_resource), + DEVMETHOD(bus_release_resource, bus_generic_rman_release_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), @@ -519,22 +530,31 @@ ps3bus_read_ivar(device_t bus, device_t child, int which, uintptr_t *result) return (0); } +static struct rman * +ps3bus_get_rman(device_t bus, int type, u_int flags) +{ + struct ps3bus_softc *sc; + + sc = device_get_softc(bus); + switch (type) { + case SYS_RES_MEMORY: + return (&sc->sc_mem_rman); + case SYS_RES_IRQ: + return (&sc->sc_intr_rman); + default: + return (NULL); + } +} + static struct resource * ps3bus_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ps3bus_devinfo *dinfo; - struct ps3bus_softc *sc; - int needactivate; - struct resource *rv; - struct rman *rm; rman_res_t adjstart, adjend, adjcount; struct resource_list_entry *rle; - sc = device_get_softc(bus); dinfo = device_get_ivars(child); - needactivate = flags & RF_ACTIVE; - flags &= ~RF_ACTIVE; switch (type) { case SYS_RES_MEMORY: @@ -561,13 +581,10 @@ ps3bus_alloc_resource(device_t bus, device_t child, int type, int *rid, adjend = end; adjcount = adjend - adjstart; - - rm = &sc->sc_mem_rman; break; case SYS_RES_IRQ: rle = resource_list_find(&dinfo->resources, SYS_RES_IRQ, *rid); - rm = &sc->sc_intr_rman; adjstart = rle->start; adjcount = ulmax(count, rle->count); adjend = ulmax(rle->end, rle->start + adjcount - 1); @@ -578,58 +595,59 @@ ps3bus_alloc_resource(device_t bus, device_t child, int type, int *rid, return (NULL); } - rv = rman_reserve_resource(rm, adjstart, adjend, adjcount, flags, - child); - if (rv == NULL) { - device_printf(bus, - "failed to reserve resource %#lx - %#lx (%#lx)" - " for %s\n", adjstart, adjend, adjcount, - device_get_nameunit(child)); - return (NULL); - } - - rman_set_rid(rv, *rid); - - if (needactivate) { - if (bus_activate_resource(child, type, *rid, rv) != 0) { - device_printf(bus, - "failed to activate resource for %s\n", - device_get_nameunit(child)); - rman_release_resource(rv); - return (NULL); - } - } - - return (rv); + return (bus_generic_rman_alloc_resource(bus, child, type, rid, adjstart, + adjend, adjcount, flags)); } static int -ps3bus_activate_resource(device_t bus, device_t child, int type, int rid, - struct resource *res) +ps3bus_map_resource(device_t bus, device_t child, int type, struct resource *r, + struct resource_map_request *argsp, struct resource_map *map) { - void *p; + struct resource_map_request args; + rman_res_t length, start; + int error; - if (type == SYS_RES_IRQ) - return (bus_activate_resource(bus, type, rid, res)); + /* Resources must be active to be mapped. */ + if (!(rman_get_flags(r) & RF_ACTIVE)) + return (ENXIO); - if (type == SYS_RES_MEMORY) { - vm_offset_t start; + /* Mappings are only supported on memory resources. */ + switch (type) { + case SYS_RES_MEMORY: + break; + default: + return (EINVAL); + } - start = (vm_offset_t) rman_get_start(res); + resource_init_map_request(&args); + error = resource_validate_map_request(r, argsp, &args, &start, &length); + if (error) + return (error); - if (bootverbose) - printf("ps3 mapdev: start %zx, len %ld\n", start, - rman_get_size(res)); + if (bootverbose) + printf("ps3 mapdev: start %jx, len %jd\n", start, length); - p = pmap_mapdev(start, (vm_size_t) rman_get_size(res)); - if (p == NULL) - return (ENOMEM); - rman_set_virtual(res, p); - rman_set_bustag(res, &bs_be_tag); - rman_set_bushandle(res, (rman_res_t)p); - } + map->r_vaddr = pmap_mapdev_attr(start, length, args.memattr); + if (map->r_vaddr == NULL) + return (ENOMEM); + map->r_bustag = &bs_be_tag; + map->r_bushandle = (vm_offset_t)map->r_vaddr; + map->r_size = length; + return (0); +} + +static int +ps3bus_unmap_resource(device_t bus, device_t child, int type, + struct resource *r, struct resource_map *map) +{ - return (rman_activate_resource(res)); + switch (type) { + case SYS_RES_MEMORY: + pmap_unmapdev(map->r_vaddr, map->r_size); + return (0); + default: + return (EINVAL); + } } static bus_dma_tag_t From nobody Tue Jan 23 17:45:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDyq4VyXz57mYN; Tue, 23 Jan 2024 17:45: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 4TKDyq2tGyz472p; Tue, 23 Jan 2024 17:45:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lhr6oa/xkA2e8drqxVPk5NHocnlCFVVws6S6dluZ/EE=; b=MzKZR3pVc9fa7mxhDDm7NvhYQOcKtimcqzQTbl7wieUyLjo7/29WaNQ6Dzl8jIf0hL8O1+ WpTbk9Emlz6QFdqQsyZ0gwRp0szj5Jtfa/yVMCGfAt/wJ8B+ljhqnAWLaavyvwldJO3rcx GY0cAxIVxZhCuhK8l6TS4p9NtIjcQf2d7MqXzjTIdgWALposxWzHW5HzeCZ382IUhjFlu0 08tqWJKO8O+sZbSd1/intQu/IoBEkP2sqVs10VkAISHVyEmHF7h8/cshIsMzIdvoR1kCP6 S1eRfaQP98IUi6aZDleHim7pHSe4yGd1wLvEqgNRg6gy/SJTq0m9pFKrKJptqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lhr6oa/xkA2e8drqxVPk5NHocnlCFVVws6S6dluZ/EE=; b=BROkbAXBw6PmgoPpEWjD/x9AqfFhcf/Yj/RgQVV6sbrhSTSW/8kra5tNddRLsSNk0FkN13 tcvqFZ5PMYQG1x+HlfGZoEdphLxChQM1PZHkUEQ9yQ+hSmgRG/sTr9W0vw/DjR9w7T3akp CApP/n9uBS+rCyB4OKBpUE9YTZFLz7M6QYAUspz1hxiUPH+U0JwVZnFDATcDjH7ZyrOChc /YdoymSZ957q/RfQy0JKnI8eJBi/IG0ueaTHAeQxtwT5/6r/Sr8JLpZDqOfhL68OP1aPYK S9KiYfq1QO18Sl1Kskr0J90TkrJ7woDgpY8rfC6YYwhAXtRuCZgBXvvWtrEOSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031955; a=rsa-sha256; cv=none; b=kpe012YEk3yOrThliSBVDofAeJCEwlt3j4IIbEKsP4J3Oda7EkDcXYppn4g4Zhcc6kqm2q 08+qyDXrm3IG6sjWWRJSYrfgQm08As1GDGRWl4hE7jxTJe5WTvvMpl6io6+Z87RGJUxdnO mCUx1k+i6BHE/W0Qz0IKH3cEZ0KJ2OSg/2rYBjWsiHN4K1i6WADfCzh0l3YiLZoNKoIf81 9bsWDqjt1F8J6I1CnE+lgE1ro3RL4GTbK2NZZ6nSL0LPankNeIgya1DeyK8Pf7DxkG8LkF RsJOKN8sD1OuWMv1GuajXJy7zH9OmEFScLyVB8OOJ4W/v1U6mJU9eutYEXR/Fg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDyq1xR2zgcN; Tue, 23 Jan 2024 17:45: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 40NHjtRd075790; Tue, 23 Jan 2024 17:45:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHjtqZ075787; Tue, 23 Jan 2024 17:45:55 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:45:55 GMT Message-Id: <202401231745.40NHjtqZ075787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: d7c16b333455 - main - powerpc psim: Use bus_generic_rman_* List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d7c16b333455faef4236d98bb6e671651e87a66d Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d7c16b333455faef4236d98bb6e671651e87a66d commit d7c16b333455faef4236d98bb6e671651e87a66d Author: John Baldwin AuthorDate: 2024-01-23 17:36:26 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:36:26 +0000 powerpc psim: Use bus_generic_rman_* - Split out bits of iobus_activate/deactive_resource to implement iobus_map/unmap_resource. - Use bus_generic_rman_* methods in several bus methods to handle memory and I/O port resources. - Add an implementation of bus_adjust_resource. Reviewed by: imp, jhibbits Differential Revision: https://reviews.freebsd.org/D43433 --- sys/powerpc/psim/iobus.c | 183 +++++++++++++++++++++++++++++++---------------- 1 file changed, 123 insertions(+), 60 deletions(-) diff --git a/sys/powerpc/psim/iobus.c b/sys/powerpc/psim/iobus.c index 4ec0f1664e1c..497ef42d82e6 100644 --- a/sys/powerpc/psim/iobus.c +++ b/sys/powerpc/psim/iobus.c @@ -70,13 +70,21 @@ static int iobus_print_child(device_t dev, device_t child); static void iobus_probe_nomatch(device_t, device_t); static int iobus_read_ivar(device_t, device_t, int, uintptr_t *); static int iobus_write_ivar(device_t, device_t, int, uintptr_t); +static struct rman *iobus_get_rman(device_t, int, u_int); static struct resource *iobus_alloc_resource(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); +static int iobus_adjust_resource(device_t, device_t, int, struct resource *, + rman_res_t, rman_res_t); static int iobus_activate_resource(device_t, device_t, int, int, struct resource *); static int iobus_deactivate_resource(device_t, device_t, int, int, struct resource *); +static int iobus_map_resource(device_t, device_t, int, struct resource *, + struct resource_map_request *, + struct resource_map *); +static int iobus_unmap_resource(device_t, device_t, int, struct resource *, + struct resource_map *); static int iobus_release_resource(device_t, device_t, int, int, struct resource *); @@ -100,10 +108,14 @@ static device_method_t iobus_methods[] = { DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_get_rman, iobus_get_rman), DEVMETHOD(bus_alloc_resource, iobus_alloc_resource), + DEVMETHOD(bus_adjust_resource, iobus_adjust_resource), DEVMETHOD(bus_release_resource, iobus_release_resource), DEVMETHOD(bus_activate_resource, iobus_activate_resource), DEVMETHOD(bus_deactivate_resource, iobus_deactivate_resource), + DEVMETHOD(bus_map_resource, iobus_map_resource), + DEVMETHOD(bus_unmap_resource, iobus_unmap_resource), { 0, 0 } }; @@ -293,26 +305,32 @@ iobus_write_ivar(device_t dev, device_t child, int which, uintptr_t value) return (EINVAL); } -static struct resource * -iobus_alloc_resource(device_t bus, device_t child, int type, int *rid, - rman_res_t start, rman_res_t end, rman_res_t count, - u_int flags) +static struct rman * +iobus_get_rman(device_t bus, int type, u_int flags) { struct iobus_softc *sc; - int needactivate; - struct resource *rv; - struct rman *rm; sc = device_get_softc(bus); + switch (type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (&sc->sc_mem_rman); + default: + return (NULL); + } +} - needactivate = flags & RF_ACTIVE; - flags &= ~RF_ACTIVE; +static struct resource * +iobus_alloc_resource(device_t bus, device_t child, int type, int *rid, + rman_res_t start, rman_res_t end, rman_res_t count, + u_int flags) +{ switch (type) { case SYS_RES_MEMORY: case SYS_RES_IOPORT: - rm = &sc->sc_mem_rman; - break; + return (bus_generic_rman_alloc_resource(bus, child, type, rid, + start, end, count, flags)); case SYS_RES_IRQ: return (bus_alloc_resource(bus, type, rid, start, end, count, flags)); @@ -321,80 +339,125 @@ iobus_alloc_resource(device_t bus, device_t child, int type, int *rid, device_get_nameunit(child)); return (NULL); } +} - rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == NULL) { - device_printf(bus, "failed to reserve resource for %s\n", - device_get_nameunit(child)); - return (NULL); - } - - rman_set_rid(rv, *rid); - - if (needactivate) { - if (bus_activate_resource(child, type, *rid, rv) != 0) { - device_printf(bus, - "failed to activate resource for %s\n", - device_get_nameunit(child)); - rman_release_resource(rv); - return (NULL); - } - } +static int +iobus_adjust_resource(device_t bus, device_t child, int type, + struct resource *r, rman_res_t start, rman_res_t end) +{ - return (rv); + switch (type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (bus_generic_rman_adjust_resource(bus, child, type, r, + start, end)); + case SYS_RES_IRQ: + return (bus_adjust_resource(bus, type, r, start, end)); + default: + return (EINVAL); + } } static int iobus_release_resource(device_t bus, device_t child, int type, int rid, struct resource *res) { - if (rman_get_flags(res) & RF_ACTIVE) { - int error = bus_deactivate_resource(child, type, rid, res); - if (error) - return error; - } - return (rman_release_resource(res)); + switch (type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (bus_generic_rman_release_resource(bus, child, type, rid, + res)); + case SYS_RES_IRQ: + return (bus_release_resource(bus, type, rid, res)); + default: + return (EINVAL); + } } static int iobus_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *res) { - struct iobus_softc *sc; - void *p; - - sc = device_get_softc(bus); - if (type == SYS_RES_IRQ) + switch (type) { + case SYS_RES_IRQ: return (bus_activate_resource(bus, type, rid, res)); - - if ((type == SYS_RES_MEMORY) || (type == SYS_RES_IOPORT)) { - p = pmap_mapdev((vm_paddr_t)rman_get_start(res) + sc->sc_addr, - (vm_size_t)rman_get_size(res)); - if (p == NULL) - return (ENOMEM); - rman_set_virtual(res, p); - rman_set_bustag(res, &bs_le_tag); - rman_set_bushandle(res, (u_long)p); + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + return (bus_generic_rman_activate_resource(bus, child, type, + rid, res)); + default: + return (EINVAL); } - - return (rman_activate_resource(res)); } static int iobus_deactivate_resource(device_t bus, device_t child, int type, int rid, struct resource *res) { - /* - * If this is a memory resource, unmap it. - */ - if ((type == SYS_RES_MEMORY) || (type == SYS_RES_IOPORT)) { - u_int32_t psize; - psize = rman_get_size(res); - pmap_unmapdev(rman_get_virtual(res), psize); + switch (type) { + case SYS_RES_IRQ: + return (bus_deactivate_resource(bus, type, rid, res)); + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + return (bus_generic_rman_deactivate_resource(bus, child, type, + rid, res)); + default: + return (EINVAL); } +} - return (rman_deactivate_resource(res)); +static int +iobus_map_resource(device_t bus, device_t child, int type, struct resource *r, + struct resource_map_request *argsp, struct resource_map *map) +{ + struct resource_map_request args; + struct iobus_softc *sc; + rman_res_t length, start; + int error; + + /* Resources must be active to be mapped. */ + if (!(rman_get_flags(r) & RF_ACTIVE)) + return (ENXIO); + + /* Mappings are only supported on I/O and memory resources. */ + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + break; + default: + return (EINVAL); + } + + resource_init_map_request(&args); + error = resource_validate_map_request(r, argsp, &args, &start, &length); + if (error) + return (error); + + sc = device_get_softc(bus); + map->r_vaddr = pmap_mapdev_attr((vm_paddr_t)start + sc->sc_addr, + (vm_size_t)length, args.memattr); + if (map->r_vaddr == NULL) + return (ENOMEM); + map->r_bustag = &bs_le_tag; + map->r_bushandle = (vm_offset_t)map->r_vaddr; + map->r_size = length; + return (0); +} + +static int +iobus_unmap_resource(device_t bus, device_t child, int type, struct resource *r, + struct resource_map *map) +{ + + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + pmap_unmapdev(map->r_vaddr, map->r_size); + return (0); + default: + return (EINVAL); + } } From nobody Tue Jan 23 17:45:56 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDys0HX5z57mYX; Tue, 23 Jan 2024 17:45:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKDyr3b9Sz47Cr; Tue, 23 Jan 2024 17:45:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QUYMPhjmJWrRW5O/VpWni2fKymBx7POBIrz3jtzv8R4=; b=wqf/WP9lWw98Uem4GADKW/HW6FQ5Bz5Dm9ahM8vpBwGWDv1HZxjBBhQV0EKTIl7saCIP5d t3Jq+zSRCqvo1ApqYgHi3X7xYVe+UMLoxbbH9d4z9tp9poZtooms1yKj9hAPgVOy1O15oe fSitzFHP71KPbin+rR/n+bG4KFj4trsB8iTq3mKfUOZxuDgHS7OS3Zrjy03K2lNmTVOBaN mG5ZTAt+8UE0XQWnBajKzfvCNbVM7F1Oh4sVngp+zYq2HbrOMQtXqhjdyA/S/rYHGbB5gI N2ebY/jYmPNMRMemNLGFEvNoeWJw6Ufwa39SHMLhOjoWQ2IZ5uqycbRlpHoikw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QUYMPhjmJWrRW5O/VpWni2fKymBx7POBIrz3jtzv8R4=; b=TJ5B3l96gHWY42QR6KR1Ud8+o9+RTJ3RDBB4mm5t6GbFMs0Nee7nv5J7UPGymoK0a2M6sW 6EPwEoLbeZfe77Beh2VVlyB3z5Lpmoo4Z6kP74QszPtMKZAN6cvyIzFWJYtpm7oNoPa0vO ZpCN5mmIAMNx5NptJ/W0N9Ay1kyAijt4sc66QOtapqAZEnETA01BwLwBKLSugp6+V18S6W BOqrGqNsQvX9bhf9zwJOPgtB7J4UsqomMduap7mgESGkcGu5Zadawu+/uj1MKOsWOiUwNB gA1CfofWrOs+CMGYwRBOrfFYvTESSQbJFCMDzIjPZ1OKj+DQuJEK8ENbP2wG6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031956; a=rsa-sha256; cv=none; b=ZqVvfDChc3oNPOaqPxiADJGIzRBeYZ+TPReRNqbarvU+4ZEpr9QtRI1T9wkv9gzgrspuqS HSwBRUwXKI+vOJUtV33q3B0CnOjzUlDNNP5wsG7kTRuUP4Sos17HAZJElJksSVHJXvreZL /ShqlCCZXgusq6ltKeIsGhlkBd3Gkj/NVO01PcZWW3cEYNXZs+jhdTbKDDnQ1a44EwJfFa +RY5+meARwe5OC3LSKu64hUmKnkH02/2ZovKtpVKIBOgnJVyvprCqBoZaELk9Oi5wG2mlz 9ZLVrJ+HTY3tNgG8sGb+E1UKFzODh3+bbKrD8kbqZzO74ykpd2d+pit9QwXHSQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDyr2gY3zfpR; Tue, 23 Jan 2024 17:45:56 +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 40NHjuAZ075830; Tue, 23 Jan 2024 17:45:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHjuu0075827; Tue, 23 Jan 2024 17:45:56 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:45:56 GMT Message-Id: <202401231745.40NHjuu0075827@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 5a7e717fb790 - main - powerpc mpc85xx: Use bus_generic_rman_* List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5a7e717fb790842eddf766363d337ec879b3b513 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5a7e717fb790842eddf766363d337ec879b3b513 commit 5a7e717fb790842eddf766363d337ec879b3b513 Author: John Baldwin AuthorDate: 2024-01-23 17:36:37 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:36:37 +0000 powerpc mpc85xx: Use bus_generic_rman_* - Consistently map SYS_RES_IOPORT to SYS_RES_MEMORY for bus_activate/deactivate/adjust/release_resource. - Implement bus_map/unmap_resource. - Add an implementation of bus_adjust_resource. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D43434 --- sys/powerpc/mpc85xx/lbc.c | 185 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 137 insertions(+), 48 deletions(-) diff --git a/sys/powerpc/mpc85xx/lbc.c b/sys/powerpc/mpc85xx/lbc.c index c07fa1251b2c..7db2d49955a3 100644 --- a/sys/powerpc/mpc85xx/lbc.c +++ b/sys/powerpc/mpc85xx/lbc.c @@ -69,13 +69,20 @@ static MALLOC_DEFINE(M_LBC, "localbus", "localbus devices information"); static int lbc_probe(device_t); static int lbc_attach(device_t); static int lbc_shutdown(device_t); -static int lbc_activate_resource(device_t bus __unused, device_t child __unused, - int type, int rid __unused, struct resource *r); -static int lbc_deactivate_resource(device_t bus __unused, - device_t child __unused, int type __unused, int rid __unused, +static int lbc_map_resource(device_t, device_t, int, struct resource *, + struct resource_map_request *, struct resource_map *); +static int lbc_unmap_resource(device_t, device_t, int, struct resource *, + struct resource_map *map); +static int lbc_activate_resource(device_t bus, device_t child, + int type, int rid, struct resource *r); +static int lbc_deactivate_resource(device_t bus, + device_t child, int type __unused, int rid, struct resource *r); +static struct rman *lbc_get_rman(device_t, int, u_int); static struct resource *lbc_alloc_resource(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); +static int lbc_adjust_resource(device_t, device_t, int, struct resource *, + rman_res_t, rman_res_t); static int lbc_print_child(device_t, device_t); static int lbc_release_resource(device_t, device_t, int, int, struct resource *); @@ -95,10 +102,14 @@ static device_method_t lbc_methods[] = { DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, NULL), + DEVMETHOD(bus_get_rman, lbc_get_rman), DEVMETHOD(bus_alloc_resource, lbc_alloc_resource), + DEVMETHOD(bus_adjust_resource, lbc_adjust_resource), DEVMETHOD(bus_release_resource, lbc_release_resource), DEVMETHOD(bus_activate_resource, lbc_activate_resource), DEVMETHOD(bus_deactivate_resource, lbc_deactivate_resource), + DEVMETHOD(bus_map_resource, lbc_map_resource), + DEVMETHOD(bus_unmap_resource, lbc_unmap_resource), /* OFW bus interface */ DEVMETHOD(ofw_bus_get_devinfo, lbc_get_devinfo), @@ -672,22 +683,31 @@ lbc_shutdown(device_t dev) return(0); } +static struct rman * +lbc_get_rman(device_t bus, int type, u_int flags) +{ + struct lbc_softc *sc; + + sc = device_get_softc(bus); + switch (type) { + case SYS_RES_MEMORY: + return (&sc->sc_rman); + default: + return (NULL); + } +} + static struct resource * lbc_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { - struct lbc_softc *sc; struct lbc_devinfo *di; struct resource_list_entry *rle; - struct resource *res; - struct rman *rm; - int needactivate; /* We only support default allocations. */ if (!RMAN_IS_DEFAULT_RANGE(start, end)) return (NULL); - sc = device_get_softc(bus); if (type == SYS_RES_IRQ) return (bus_alloc_resource(bus, type, rid, start, end, count, flags)); @@ -702,6 +722,10 @@ lbc_alloc_resource(device_t bus, device_t child, int type, int *rid, if (type == SYS_RES_IOPORT) type = SYS_RES_MEMORY; + /* + * XXX: We are supposed to return a value to the user, so this + * doesn't seem right. + */ rid = &di->di_bank; rle = resource_list_find(&di->di_res, type, *rid); @@ -714,32 +738,8 @@ lbc_alloc_resource(device_t bus, device_t child, int type, int *rid, count = rle->count; end = start + count - 1; - sc = device_get_softc(bus); - - needactivate = flags & RF_ACTIVE; - flags &= ~RF_ACTIVE; - - rm = &sc->sc_rman; - - res = rman_reserve_resource(rm, start, end, count, flags, child); - if (res == NULL) { - device_printf(bus, "failed to reserve resource %#jx - %#jx " - "(%#jx)\n", start, end, count); - return (NULL); - } - - rman_set_rid(res, *rid); - rman_set_bustag(res, &bs_be_tag); - rman_set_bushandle(res, rman_get_start(res)); - - if (needactivate) - if (bus_activate_resource(child, type, *rid, res)) { - device_printf(child, "resource activation failed\n"); - rman_release_resource(res); - return (NULL); - } - - return (res); + return (bus_generic_rman_alloc_resource(bus, child, type, rid, start, + end, count, flags)); } static int @@ -761,36 +761,125 @@ lbc_print_child(device_t dev, device_t child) return (rv); } +static int +lbc_adjust_resource(device_t dev, device_t child, int type, struct resource *r, + rman_res_t start, rman_res_t end) +{ + switch (type) { + case SYS_RES_IOPORT: + type = SYS_RES_MEMORY; + /* FALLTHROUGH */ + case SYS_RES_MEMORY: + return (bus_generic_rman_adjust_resource(dev, child, type, r, + start, end)); + case SYS_RES_IRQ: + return (bus_adjust_resource(dev, type, r, start, end)); + default: + return (EINVAL); + } +} + static int lbc_release_resource(device_t dev, device_t child, int type, int rid, struct resource *res) { - int err; + switch (type) { + case SYS_RES_IOPORT: + type = SYS_RES_MEMORY; + /* FALLTHROUGH */ + case SYS_RES_MEMORY: + return (bus_generic_rman_release_resource(dev, child, type, + rid, res)); + case SYS_RES_IRQ: + return (bus_release_resource(dev, type, rid, res)); + default: + return (EINVAL); + } +} - if (rman_get_flags(res) & RF_ACTIVE) { - err = bus_deactivate_resource(child, type, rid, res); - if (err) - return (err); +static int +lbc_activate_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + switch (type) { + case SYS_RES_IOPORT: + type = SYS_RES_MEMORY; + /* FALLTHROUGH */ + case SYS_RES_MEMORY: + return (bus_generic_rman_activate_resource(bus, child, type, + rid, r)); + case SYS_RES_IRQ: + return (bus_activate_resource(bus, type, rid, r)); + default: + return (EINVAL); } +} - return (rman_release_resource(res)); +static int +lbc_deactivate_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + switch (type) { + case SYS_RES_IOPORT: + type = SYS_RES_MEMORY; + /* FALLTHROUGH */ + case SYS_RES_MEMORY: + return (bus_generic_rman_deactivate_resource(bus, child, type, + rid, r)); + case SYS_RES_IRQ: + return (bus_deactivate_resource(bus, type, rid, r)); + default: + return (EINVAL); + } } static int -lbc_activate_resource(device_t bus __unused, device_t child __unused, - int type __unused, int rid __unused, struct resource *r) +lbc_map_resource(device_t bus, device_t child, int type, struct resource *r, + struct resource_map_request *argsp, struct resource_map *map) { + struct resource_map_request args; + rman_res_t length, start; + int error; + + /* Resources must be active to be mapped. */ + if (!(rman_get_flags(r) & RF_ACTIVE)) + return (ENXIO); + + /* Mappings are only supported on I/O and memory resources. */ + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + break; + default: + return (EINVAL); + } + + resource_init_map_request(&args); + error = resource_validate_map_request(r, argsp, &args, &start, &length); + if (error) + return (error); - /* Child resources were already mapped, just activate. */ - return (rman_activate_resource(r)); + map->r_bustag = &bs_be_tag; + map->r_bushandle = start; + map->r_size = length; + map->r_vaddr = NULL; + return (0); } static int -lbc_deactivate_resource(device_t bus __unused, device_t child __unused, - int type __unused, int rid __unused, struct resource *r) +lbc_unmap_resource(device_t bus, device_t child, int type, struct resource *r, + struct resource_map *map) { - return (rman_deactivate_resource(r)); + /* Mappings are only supported on I/O and memory resources. */ + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + break; + default: + return (EINVAL); + } + return (0); } static const struct ofw_bus_devinfo * From nobody Tue Jan 23 17:45:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDys65mBz57mT2; Tue, 23 Jan 2024 17:45:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKDys4pJcz47M4; Tue, 23 Jan 2024 17:45:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HWMLzpdOzLdmQpht4Y6hLByhpByve2qLito6xZX13Lw=; b=kbYio/9//dge64XYSFD/v6TTEzNIoIrHa2zOrWy+7zvMxr+5mBylhLJaDGsM2jMghnWkmt aTseydknypfLzFHac9/xRM50GStPCxvjANVL7mPzaNRCvVRs03kkZmp6rzotHADw7zWjAw wMm3maD2Er4dhicH/iJ9sBxp4Rdkm0mKM5CNtSqQzYIRJJ3HM2ek2eoRiy0Y0q7NfnKF93 dPmjp6Ghaq/aFQzFXHel0sE/JFt+A4XVA1X0eQGUM0UPPjyxGltjpkPtTknCp4EWpyfuCO MtGr7XugLF3DXGULIEreRjYbS07TaMeeOS5+IpWpVqKiA7DeB++LeuZ2M2Jpcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HWMLzpdOzLdmQpht4Y6hLByhpByve2qLito6xZX13Lw=; b=UYtbXFrxTLgFK+6s6DHNP29ufWBUXVzfp71DvlA0p7x0cwvwheVxImXJ0Uu+jJTvveWMnD o783PjFhwxhZhO519OSkRAdZ9UCknPGunDVdt2ftWzhhA1eCgPVOR0Yt0lGXPWqNja3ICU gLEJH69C/qcdRr8Lc/aBE2Mci3At6K4eBeqbVwytT1kRKzXhu++Qjcxg+LWdtzhAATrIV1 21sQD5wxqO7hxpHQ6Il9TUd4G7GNsieoBE/To3JitN5SJ4EG0pc4UQrBE2ng7eH5/wkbHT v2c5NGrK3q1dffzBwWvyv6rw1N0bRKpM1NTr7sfoX86xpnbmP22EEICk7aDVog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031957; a=rsa-sha256; cv=none; b=sq4YAO+QQas6jrYrDwqlT61p1x8a8VyF3wfmWfZA2UGssNRd7rV26aNb909M9TXtITys4W XFCcJ2OvBMgg5nwwLHjJomYcj2tlkEQAb4J1JNeNGoVY4//YlE3NnLrMKo/4b0YXBu0TFe trlInomS668QtQRgIHEglLkIPv5iHEARwGAgUrS5yI76+PHCU326EjcmNawpdN2nXrM2qY BVTxmPMhsCyIMGINZhbF/uv0AUAJ0XNJpsgHzE8KbW6uH4oZki29x5LYrZSbcJclTh/b04 RWpnT2yO2mHYlQ+UtdgSKRnzbrygk4wejvY/DgRXWbP3923Igt8BSjquF6T+cA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDys3YxPzg0k; Tue, 23 Jan 2024 17:45:57 +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 40NHjvxt075877; Tue, 23 Jan 2024 17:45:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHjvRR075874; Tue, 23 Jan 2024 17:45:57 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:45:57 GMT Message-Id: <202401231745.40NHjvRR075874@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: af081ec6f7cf - main - powerpc powermac: Use bus_generic_rman_* List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af081ec6f7cf4b764a1b417135440cf05cf1a174 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=af081ec6f7cf4b764a1b417135440cf05cf1a174 commit af081ec6f7cf4b764a1b417135440cf05cf1a174 Author: John Baldwin AuthorDate: 2024-01-23 17:36:49 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:36:49 +0000 powerpc powermac: Use bus_generic_rman_* Implement bus_map/unmap_resource and add bus_get_rman for use by bus_generic_rman_*. Reviewed by: imp, jhibbits Differential Revision: https://reviews.freebsd.org/D43435 --- sys/powerpc/powermac/macio.c | 197 ++++++++++++++++++++++++++------------- sys/powerpc/powermac/uninorth.c | 200 ++++++++++++++++++++++++++-------------- 2 files changed, 264 insertions(+), 133 deletions(-) diff --git a/sys/powerpc/powermac/macio.c b/sys/powerpc/powermac/macio.c index 76ae844e50fe..f6ad815064e8 100644 --- a/sys/powerpc/powermac/macio.c +++ b/sys/powerpc/powermac/macio.c @@ -80,15 +80,23 @@ static int macio_probe(device_t); static int macio_attach(device_t); static int macio_print_child(device_t dev, device_t child); static void macio_probe_nomatch(device_t, device_t); +static struct rman *macio_get_rman(device_t, int, u_int); static struct resource *macio_alloc_resource(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); +static int macio_adjust_resource(device_t, device_t, int, struct resource *, + rman_res_t, rman_res_t); static int macio_activate_resource(device_t, device_t, int, int, struct resource *); static int macio_deactivate_resource(device_t, device_t, int, int, struct resource *); static int macio_release_resource(device_t, device_t, int, int, struct resource *); +static int macio_map_resource(device_t, device_t, int, struct resource *, + struct resource_map_request *, + struct resource_map *); +static int macio_unmap_resource(device_t, device_t, int, struct resource *, + struct resource_map *); static struct resource_list *macio_get_resource_list (device_t, device_t); static ofw_bus_get_devinfo_t macio_get_devinfo; #if !defined(__powerpc64__) && defined(SMP) @@ -113,10 +121,14 @@ static device_method_t macio_methods[] = { DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_get_rman, macio_get_rman), DEVMETHOD(bus_alloc_resource, macio_alloc_resource), + DEVMETHOD(bus_adjust_resource, macio_adjust_resource), DEVMETHOD(bus_release_resource, macio_release_resource), DEVMETHOD(bus_activate_resource, macio_activate_resource), DEVMETHOD(bus_deactivate_resource, macio_deactivate_resource), + DEVMETHOD(bus_map_resource, macio_map_resource), + DEVMETHOD(bus_unmap_resource, macio_unmap_resource), DEVMETHOD(bus_get_resource_list, macio_get_resource_list), DEVMETHOD(bus_child_pnpinfo, ofw_bus_gen_child_pnpinfo), @@ -495,25 +507,32 @@ macio_probe_nomatch(device_t dev, device_t child) } } +static struct rman * +macio_get_rman(device_t bus, int type, u_int flags) +{ + struct macio_softc *sc; + + sc = device_get_softc(bus); + switch (type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (&sc->sc_mem_rman); + default: + return (NULL); + } +} + static struct resource * macio_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { - struct macio_softc *sc; - int needactivate; - struct resource *rv; - struct rman *rm; - u_long adjstart, adjend, adjcount; + rman_res_t adjstart, adjend, adjcount; struct macio_devinfo *dinfo; struct resource_list_entry *rle; - sc = device_get_softc(bus); dinfo = device_get_ivars(child); - needactivate = flags & RF_ACTIVE; - flags &= ~RF_ACTIVE; - switch (type) { case SYS_RES_MEMORY: case SYS_RES_IOPORT: @@ -541,8 +560,8 @@ macio_alloc_resource(device_t bus, device_t child, int type, int *rid, adjcount = adjend - adjstart; - rm = &sc->sc_mem_rman; - break; + return (bus_generic_rman_alloc_resource(bus, child, type, rid, + adjstart, adjend, adjcount, flags)); case SYS_RES_IRQ: /* Check for passthrough from subattachments like macgpio */ @@ -574,84 +593,134 @@ macio_alloc_resource(device_t bus, device_t child, int type, int *rid, device_get_nameunit(child)); return (NULL); } +} - rv = rman_reserve_resource(rm, adjstart, adjend, adjcount, flags, - child); - if (rv == NULL) { - device_printf(bus, - "failed to reserve resource %#lx - %#lx (%#lx) for %s\n", - adjstart, adjend, adjcount, device_get_nameunit(child)); - return (NULL); +static int +macio_adjust_resource(device_t bus, device_t child, int type, + struct resource *r, rman_res_t start, rman_res_t end) +{ + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + return (bus_generic_rman_adjust_resource(bus, child, type, r, + start, end)); + case SYS_RES_IRQ: + return (bus_generic_adjust_resource(bus, child, type, r, start, + end)); + default: + return (EINVAL); } - - rman_set_rid(rv, *rid); - - if (needactivate) { - if (bus_activate_resource(child, type, *rid, rv) != 0) { - device_printf(bus, - "failed to activate resource for %s\n", - device_get_nameunit(child)); - rman_release_resource(rv); - return (NULL); - } - } - - return (rv); } static int macio_release_resource(device_t bus, device_t child, int type, int rid, struct resource *res) { - if (rman_get_flags(res) & RF_ACTIVE) { - int error = bus_deactivate_resource(child, type, rid, res); - if (error) - return error; + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + return (bus_generic_rman_release_resource(bus, child, type, rid, + res)); + case SYS_RES_IRQ: + return (bus_generic_rl_release_resource(bus, child, type, rid, + res)); + default: + return (EINVAL); } - - return (rman_release_resource(res)); } static int macio_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *res) { - struct macio_softc *sc; - void *p; - - sc = device_get_softc(bus); - - if (type == SYS_RES_IRQ) - return (bus_activate_resource(bus, type, rid, res)); - - if ((type == SYS_RES_MEMORY) || (type == SYS_RES_IOPORT)) { - p = pmap_mapdev((vm_paddr_t)rman_get_start(res) + sc->sc_base, - (vm_size_t)rman_get_size(res)); - if (p == NULL) - return (ENOMEM); - rman_set_virtual(res, p); - rman_set_bustag(res, &bs_le_tag); - rman_set_bushandle(res, (u_long)p); + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + return (bus_generic_rman_activate_resource(bus, child, type, + rid, res)); + case SYS_RES_IRQ: + return (bus_generic_activate_resource(bus, child, type, rid, + res)); + default: + return (EINVAL); } - - return (rman_activate_resource(res)); } static int macio_deactivate_resource(device_t bus, device_t child, int type, int rid, struct resource *res) { - /* - * If this is a memory resource, unmap it. - */ - if ((type == SYS_RES_MEMORY) || (type == SYS_RES_IOPORT)) { - u_int32_t psize; + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + return (bus_generic_rman_deactivate_resource(bus, child, type, + rid, res)); + case SYS_RES_IRQ: + return (bus_generic_deactivate_resource(bus, child, type, rid, + res)); + default: + return (EINVAL); + } +} + +static int +macio_map_resource(device_t bus, device_t child, int type, + struct resource *r, struct resource_map_request *argsp, + struct resource_map *map) +{ + struct resource_map_request args; + struct macio_softc *sc; + rman_res_t length, start; + int error; + + /* Resources must be active to be mapped. */ + if (!(rman_get_flags(r) & RF_ACTIVE)) + return (ENXIO); - psize = rman_get_size(res); - pmap_unmapdev(rman_get_virtual(res), psize); + /* Mappings are only supported on I/O and memory resources. */ + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + break; + default: + return (EINVAL); } - return (rman_deactivate_resource(res)); + resource_init_map_request(&args); + error = resource_validate_map_request(r, argsp, &args, &start, &length); + if (error) + return (error); + + if (bootverbose) + printf("nexus mapdev: start %jx, len %jd\n", + (uintmax_t)start, (uintmax_t)length); + + sc = device_get_softc(bus); + map->r_vaddr = pmap_mapdev_attr((vm_paddr_t)start + sc->sc_base, + length, args.memattr); + if (map->r_vaddr == NULL) + return (ENOMEM); + map->r_bustag = &bs_le_tag; + map->r_bushandle = (bus_space_handle_t)map->r_vaddr; + return (0); +} + +static int +macio_unmap_resource(device_t bus, device_t child, int type, + struct resource *r, struct resource_map *map) +{ + /* + * If this is a memory resource, unmap it. + */ + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + pmap_unmapdev(map->r_vaddr, map->r_size); + break; + default: + return (EINVAL); + } + return (0); } static struct resource_list * diff --git a/sys/powerpc/powermac/uninorth.c b/sys/powerpc/powermac/uninorth.c index 1e22e0f92855..b64bbc8ade62 100644 --- a/sys/powerpc/powermac/uninorth.c +++ b/sys/powerpc/powermac/uninorth.c @@ -71,13 +71,22 @@ static int unin_chip_attach(device_t); */ static int unin_chip_print_child(device_t dev, device_t child); static void unin_chip_probe_nomatch(device_t, device_t); +static struct rman *unin_chip_get_rman(device_t, int, u_int); static struct resource *unin_chip_alloc_resource(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); +static int unin_chip_adjust_resource(device_t, device_t, int, + struct resource *, rman_res_t, + rman_res_t); static int unin_chip_activate_resource(device_t, device_t, int, int, struct resource *); static int unin_chip_deactivate_resource(device_t, device_t, int, int, struct resource *); +static int unin_chip_map_resource(device_t, device_t, int, struct resource *, + struct resource_map_request *, + struct resource_map *); +static int unin_chip_unmap_resource(device_t, device_t, int, struct resource *, + struct resource_map *); static int unin_chip_release_resource(device_t, device_t, int, int, struct resource *); static struct resource_list *unin_chip_get_resource_list (device_t, device_t); @@ -109,10 +118,14 @@ static device_method_t unin_chip_methods[] = { DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_get_rman, unin_chip_get_rman), DEVMETHOD(bus_alloc_resource, unin_chip_alloc_resource), + DEVMETHOD(bus_adjust_resource, unin_chip_adjust_resource), DEVMETHOD(bus_release_resource, unin_chip_release_resource), DEVMETHOD(bus_activate_resource, unin_chip_activate_resource), DEVMETHOD(bus_deactivate_resource, unin_chip_deactivate_resource), + DEVMETHOD(bus_map_resource, unin_chip_map_resource), + DEVMETHOD(bus_unmap_resource, unin_chip_unmap_resource), DEVMETHOD(bus_get_resource_list, unin_chip_get_resource_list), DEVMETHOD(bus_child_pnpinfo, ofw_bus_gen_child_pnpinfo), @@ -449,25 +462,32 @@ unin_chip_probe_nomatch(device_t dev, device_t child) } } +static struct rman * +unin_chip_get_rman(device_t bus, int type, u_int flags) +{ + struct unin_chip_softc *sc; + + sc = device_get_softc(bus); + switch (type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (&sc->sc_mem_rman); + default: + return (NULL); + } +} + static struct resource * unin_chip_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { - struct unin_chip_softc *sc; - int needactivate; - struct resource *rv; - struct rman *rm; - u_long adjstart, adjend, adjcount; + rman_res_t adjstart, adjend, adjcount; struct unin_chip_devinfo *dinfo; struct resource_list_entry *rle; - sc = device_get_softc(bus); dinfo = device_get_ivars(child); - needactivate = flags & RF_ACTIVE; - flags &= ~RF_ACTIVE; - switch (type) { case SYS_RES_MEMORY: case SYS_RES_IOPORT: @@ -497,9 +517,8 @@ unin_chip_alloc_resource(device_t bus, device_t child, int type, int *rid, adjcount = adjend - adjstart; - rm = &sc->sc_mem_rman; - break; - + return (bus_generic_rman_alloc_resource(bus, child, + SYS_RES_MEMORY, rid, adjstart, adjend, adjcount, flags)); case SYS_RES_IRQ: /* Check for passthrough from subattachments. */ if (device_get_parent(child) != bus) @@ -532,89 +551,132 @@ unin_chip_alloc_resource(device_t bus, device_t child, int type, int *rid, device_get_nameunit(child)); return (NULL); } +} - rv = rman_reserve_resource(rm, adjstart, adjend, adjcount, flags, - child); - if (rv == NULL) { - device_printf(bus, - "failed to reserve resource %#lx - %#lx (%#lx)" - " for %s\n", adjstart, adjend, adjcount, - device_get_nameunit(child)); - return (NULL); +static int +unin_chip_adjust_resource(device_t bus, device_t child, int type, + struct resource *r, rman_res_t start, rman_res_t end) +{ + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + return (bus_generic_rman_adjust_resource(bus, child, type, r, + start, end)); + case SYS_RES_IRQ: + return (bus_generic_adjust_resource(bus, child, type, r, start, + end)); + default: + return (EINVAL); } - - rman_set_rid(rv, *rid); - - if (needactivate) { - if (bus_activate_resource(child, type, *rid, rv) != 0) { - device_printf(bus, - "failed to activate resource for %s\n", - device_get_nameunit(child)); - rman_release_resource(rv); - return (NULL); - } - } - - return (rv); } static int unin_chip_release_resource(device_t bus, device_t child, int type, int rid, struct resource *res) { - if (rman_get_flags(res) & RF_ACTIVE) { - int error = bus_deactivate_resource(child, type, rid, res); - if (error) - return error; + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + return (bus_generic_rman_release_resource(bus, child, type, rid, + res)); + case SYS_RES_IRQ: + return (bus_generic_rl_release_resource(bus, child, type, rid, + res)); + default: + return (EINVAL); } - - return (rman_release_resource(res)); } static int unin_chip_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *res) { - void *p; - - if (type == SYS_RES_IRQ) - return (bus_activate_resource(bus, type, rid, res)); + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + return (bus_generic_rman_activate_resource(bus, child, type, + rid, res)); + case SYS_RES_IRQ: + return (bus_generic_activate_resource(bus, child, type, rid, + res)); + default: + return (EINVAL); + } +} - if ((type == SYS_RES_MEMORY) || (type == SYS_RES_IOPORT)) { - vm_offset_t start; +static int +unin_chip_deactivate_resource(device_t bus, device_t child, int type, int rid, + struct resource *res) +{ + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + return (bus_generic_rman_deactivate_resource(bus, child, type, + rid, res)); + case SYS_RES_IRQ: + return (bus_generic_deactivate_resource(bus, child, type, rid, + res)); + default: + return (EINVAL); + } +} - start = (vm_offset_t) rman_get_start(res); +static int +unin_chip_map_resource(device_t bus, device_t child, int type, + struct resource *r, struct resource_map_request *argsp, + struct resource_map *map) +{ + struct resource_map_request args; + rman_res_t length, start; + int error; - if (bootverbose) - printf("unin mapdev: start %zx, len %jd\n", start, - rman_get_size(res)); + /* Resources must be active to be mapped. */ + if (!(rman_get_flags(r) & RF_ACTIVE)) + return (ENXIO); - p = pmap_mapdev(start, (vm_size_t) rman_get_size(res)); - if (p == NULL) - return (ENOMEM); - rman_set_virtual(res, p); - rman_set_bustag(res, &bs_be_tag); - rman_set_bushandle(res, (u_long)p); + /* Mappings are only supported on I/O and memory resources. */ + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + break; + default: + return (EINVAL); } - return (rman_activate_resource(res)); + resource_init_map_request(&args); + error = resource_validate_map_request(r, argsp, &args, &start, &length); + if (error) + return (error); + + if (bootverbose) + printf("nexus mapdev: start %jx, len %jd\n", + (uintmax_t)start, (uintmax_t)length); + + map->r_vaddr = pmap_mapdev_attr(start, length, args.memattr); + if (map->r_vaddr == NULL) + return (ENOMEM); + map->r_bustag = &bs_be_tag; + map->r_size = length; + map->r_bushandle = (bus_space_handle_t)map->r_vaddr; + return (0); } static int -unin_chip_deactivate_resource(device_t bus, device_t child, int type, int rid, - struct resource *res) +unin_chip_unmap_resource(device_t bus, device_t child, int type, + struct resource *r, struct resource_map *map) { - /* - * If this is a memory resource, unmap it. - */ - if ((type == SYS_RES_MEMORY) || (type == SYS_RES_IOPORT)) { - u_int32_t psize; - - psize = rman_get_size(res); - pmap_unmapdev(rman_get_virtual(res), psize); + /* + * If this is a memory resource, unmap it. + */ + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + pmap_unmapdev(map->r_vaddr, map->r_size); + break; + default: + return (EINVAL); } - - return (rman_deactivate_resource(res)); + return (0); } static struct resource_list * From nobody Tue Jan 23 17:45:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDyv17H8z57mYb; Tue, 23 Jan 2024 17:45:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKDyt55Hkz47Bt; Tue, 23 Jan 2024 17:45:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031958; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HKZl+ex1tIJ+svVANHWCh4NPue3WlUKEghgAD4DyUOU=; b=MSxnY7Hobjf0z7yQAFmNeoGn+7/pc/nY3og+H7EcPoam1x3v6h9VwWeXsiUIMBIBCE+T3O hYzzlP7ZSDijREZoEV4ZaS4ybjjgTr1SmvTW4/3uvOY5ZR6Ge8lOTi8ibPLMCqQiL2kM0P ktLc8oQOBcx/rHi4tDWkT4ZjkPQ++e1eLVZI9mmq+r8xeatU3KxQgkwJ3BPt4i+D46TyJS qVl0rI80r0IjbtjTYmjlK0fs6AzjSsHAc44zltRRkTV50y+P5VaWtzfVA4xAz1ZtO4ECTe XPPTdTyIrExtDAx4+OeSoXWng8fVK3dSdxz4SWIGakzHGSpVN/K9Fj7UoPkTxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031958; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HKZl+ex1tIJ+svVANHWCh4NPue3WlUKEghgAD4DyUOU=; b=Hh4upiEcdej5obOdoPfMzBTAi26nUNMKqiK4upeO/dUdMX+6xbLCJMuq4Cx6OB+/AOxuGU V8AbikewDM7QeEpSi+6vftYV4Vj6Q77W8ltMi+vVliyvr8S/LdvpAnMNK9zTcLLITEmaW/ dfs/YYGdg/iXFVW/hnVSfbw4XNeEAIB6/yXs8NKqR5FL4xSowe5uVb8pP0gMomaUP9KvVh qVDKYwaJMTXscX8WY884wTblplZX/zH9V1b2da2Cesn9cTJ/zQMaYW4b9c42lA0+xXRNs0 D6Y4OJnXwka0VKyy2+30ny0NCK3p/hk7OPvTVkc0tAa3ZfqQLV2/5HPFZHBtvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031958; a=rsa-sha256; cv=none; b=GrDE3R9w1r29ACFJOzsxUkRA5LlwGnue4Ml0erb6k3Xd/0qCoETtaS2ETGezPaRoCkYcZG AwnkUXZoeRx/ZCuR0cfZojcYwbqe9PlKQ1NNRus7l/xGVG2NpzetzAUEL636syAHi36epw yu9d0J0201fjwJX5DkOSV3/0g4sYrRRGO7DRL1ZBHkrJAtDKKLxXEfRNhkWsOAKj8j6IP4 JHkvz4KnigdkFc9jfZ37MUMbuzzl6wYo9lmWfjsRmMZIVzfmEZpvM+Mn76oLrZcIvT77VH jrNjxi4aosYvHRnUJbh4v+vSntXOplA9NzlzRiEL5Qbd4yZO+64fZ9VafNUZeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDyt4B2HzfyB; Tue, 23 Jan 2024 17:45: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 40NHjwXV075918; Tue, 23 Jan 2024 17:45:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHjwg0075915; Tue, 23 Jan 2024 17:45:58 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:45:58 GMT Message-Id: <202401231745.40NHjwg0075915@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 7b5a5e4eef50 - main - powerpc nexus: Use bus_generic_rman_* List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7b5a5e4eef504d2972b6b5f6abfff8058be6371e Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7b5a5e4eef504d2972b6b5f6abfff8058be6371e commit 7b5a5e4eef504d2972b6b5f6abfff8058be6371e Author: John Baldwin AuthorDate: 2024-01-23 17:37:02 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:37:02 +0000 powerpc nexus: Use bus_generic_rman_* Reviewed by: imp, jhibbits Differential Revision: https://reviews.freebsd.org/D43436 --- sys/powerpc/powerpc/nexus.c | 129 ++++---------------------------------------- 1 file changed, 11 insertions(+), 118 deletions(-) diff --git a/sys/powerpc/powerpc/nexus.c b/sys/powerpc/powerpc/nexus.c index b9c2755dd983..3c71e1e79e3b 100644 --- a/sys/powerpc/powerpc/nexus.c +++ b/sys/powerpc/powerpc/nexus.c @@ -67,12 +67,8 @@ static struct rman mem_rman; static device_probe_t nexus_probe; static device_attach_t nexus_attach; -static bus_activate_resource_t nexus_activate_resource; -static bus_adjust_resource_t nexus_adjust_resource; -static bus_alloc_resource_t nexus_alloc_resource; -static bus_deactivate_resource_t nexus_deactivate_resource; +static bus_get_rman_t nexus_get_rman; static bus_map_resource_t nexus_map_resource; -static bus_release_resource_t nexus_release_resource; static bus_unmap_resource_t nexus_unmap_resource; #ifdef SMP @@ -93,12 +89,13 @@ static device_method_t nexus_methods[] = { /* Bus interface */ DEVMETHOD(bus_add_child, bus_generic_add_child), - DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), - DEVMETHOD(bus_activate_resource, nexus_activate_resource), - DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), - DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_rman_adjust_resource), + DEVMETHOD(bus_activate_resource, bus_generic_rman_activate_resource), + DEVMETHOD(bus_alloc_resource, bus_generic_rman_alloc_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_rman_deactivate_resource), + DEVMETHOD(bus_get_rman, nexus_get_rman), DEVMETHOD(bus_map_resource, nexus_map_resource), - DEVMETHOD(bus_release_resource, nexus_release_resource), + DEVMETHOD(bus_release_resource, bus_generic_rman_release_resource), DEVMETHOD(bus_unmap_resource, nexus_unmap_resource), #ifdef SMP DEVMETHOD(bus_bind_intr, nexus_bind_intr), @@ -231,121 +228,17 @@ nexus_ofw_map_intr(device_t dev, device_t child, phandle_t iparent, int icells, return (intr); } -/* - * Allocate a resource on behalf of child. NB: child is usually going to be a - * child of one of our descendants, not a direct child of nexus0. - */ -static struct resource * -nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, - rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) +static struct rman * +nexus_get_rman(device_t bus, int type, u_int flags) { - struct rman *rm; - struct resource *rv; - switch (type) { case SYS_RES_IRQ: - rm = &intr_rman; - break; + return (&intr_rman); case SYS_RES_MEMORY: - rm = &mem_rman; - break; + return (&mem_rman); default: return (NULL); } - - rv = rman_reserve_resource(rm, start, end, count, flags & ~RF_ACTIVE, - child); - if (rv == NULL) - return (NULL); - rman_set_rid(rv, *rid); - - if ((flags & RF_ACTIVE) != 0) { - if (bus_activate_resource(child, type, *rid, rv) != 0) { - rman_release_resource(rv); - return (NULL); - } - } - - return (rv); -} - -static int -nexus_activate_resource(device_t bus __unused, device_t child __unused, - int type, int rid __unused, struct resource *r) -{ - - if (type == SYS_RES_MEMORY) { - vm_paddr_t start; - void *p; - - start = (vm_paddr_t) rman_get_start(r); - if (bootverbose) - printf("nexus mapdev: start %jx, len %jd\n", - (uintmax_t)start, rman_get_size(r)); - - p = pmap_mapdev(start, (vm_size_t) rman_get_size(r)); - if (p == NULL) - return (ENOMEM); - rman_set_virtual(r, p); - rman_set_bustag(r, &bs_be_tag); - rman_set_bushandle(r, (u_long)p); - } - return (rman_activate_resource(r)); -} - -static int -nexus_deactivate_resource(device_t bus __unused, device_t child __unused, - int type __unused, int rid __unused, struct resource *r) -{ - - /* - * If this is a memory resource, unmap it. - */ - if ((type == SYS_RES_MEMORY) || (type == SYS_RES_IOPORT)) { - bus_size_t psize; - - psize = rman_get_size(r); - pmap_unmapdev(rman_get_virtual(r), psize); - } - - return (rman_deactivate_resource(r)); -} - -static int -nexus_adjust_resource(device_t bus, device_t child __unused, int type, - struct resource *r, rman_res_t start, rman_res_t end) -{ - struct rman *rm; - - switch (type) { - case SYS_RES_IRQ: - rm = &intr_rman; - break; - case SYS_RES_MEMORY: - rm = &mem_rman; - break; - default: - return (EINVAL); - } - if (rm == NULL) - return (ENXIO); - if (rman_is_region_manager(r, rm) == 0) - return (EINVAL); - return (rman_adjust_resource(r, start, end)); -} - -static int -nexus_release_resource(device_t bus, device_t child, int type, - int rid, struct resource *r) -{ - int error; - - if ((rman_get_flags(r) & RF_ACTIVE) != 0) { - error = bus_deactivate_resource(child, type, rid, r); - if (error) - return (error); - } - return (rman_release_resource(r)); } static int From nobody Tue Jan 23 17:45:59 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDyw0BYnz57mxY; Tue, 23 Jan 2024 17: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 4TKDyv5hlVz475c; Tue, 23 Jan 2024 17: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=1706031959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8jvQmGHgn33IQfoP7U3nyzVFtrfi+9xbSg4xC5EVo5I=; b=LfGMaEoTESAFDKalV4s2IrQ1sjSO4sVWANjFv5vkfYwjGnwHssiPmtToRBAFdbTJUn4PEJ dkTcYni/0om1+kUhVPlonsbz1yGiKkU651aIyPRlQR5haIJ584/WIyCquPJU91iVANSUlp RSSi/junBhvbLFBX1+58xIgvvjSlln/50YuyFCwpTlA0SXqZrLvmu2jcmy3fUgJMkQtXwL ps/Or5+uCfAKktIi5ex+uvAeZqlv6fUXU3VgckV6lx51v0eA7SUwGppI5HjUMtbMDN2QOX PeJThxC9ZwdM8yo7t2lhAW37VTW+VOYLE5WwZSdA0frv4CWMjLY3zR8bRCxKAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031959; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8jvQmGHgn33IQfoP7U3nyzVFtrfi+9xbSg4xC5EVo5I=; b=mL6IiSf8emjaAkh+G/VNocqH2jJ8JgnTDc4GDZpd1Qt6jKTErAdaxGWWtSrnPVbbksGOfO GwUINEkAXiqYZFHbIhvMJgjDmAp7IUcHjReDY7m61Co3Be5SrTwU0amcpwC59xk8v6kKGG IYCMR2RRu9AZtkURegPZ/nlJr9YktU+8L1yfBFDgFzoy5f6I2hduVSpr4UWYWBa/CdDtM0 g9HSYlBjjHU5HQOPeA8INqHhBYpy0AGt4XIc0ygCqj7kCJ2ML0OjGcBypFfIBpO6YzVJ/b CxY236lHW4yh6rXhv6kZbyFeuV4YorTQgV/krOJHLU5O5HsV4SjuGZAqViT9kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031959; a=rsa-sha256; cv=none; b=KvzAT+Cz5rjsGk1zBJabrefRzdyPsEKk6tS7sPph42LzoPwWbm/4PNdo5io7ct6Uwz7gLV 9VKfiV9UvnGz/q0U/xc7fEpES8JcZfMHmFw6eTgTgzmui8Bt5c4ZVM/JqlydKd8OWQugOX EjTSGsQ7yKvfBD+gCAJch0Oj2Vl3h0RSxHGZtrTbCbMOb5GNkIOR2wPkT/uhmHgvWMbOKj hELLKHVCfzEk3+Ci1HyzlpnWJwYb1Jd4U5/N+TY97zCcRznD208q1eKR4/b9PzoDzJYm4b I3m06VdE6ayM77JyxZ8NufMED91l61KCuo+bdJX+4TcoBksg2hRavRimO5vWOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDyv4ph6zgNP; Tue, 23 Jan 2024 17: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 40NHjx5C075958; Tue, 23 Jan 2024 17: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 40NHjx87075955; Tue, 23 Jan 2024 17:45:59 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:45:59 GMT Message-Id: <202401231745.40NHjx87075955@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: faeb273e7a8e - main - arm nexus: Use bus_generic_rman_* List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: faeb273e7a8ec57d87de8d4337598fb11ae305c3 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=faeb273e7a8ec57d87de8d4337598fb11ae305c3 commit faeb273e7a8ec57d87de8d4337598fb11ae305c3 Author: John Baldwin AuthorDate: 2024-01-23 17:37:13 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:37:13 +0000 arm nexus: Use bus_generic_rman_* - Implement bus_get_rman pulling bits from nexus_alloc_resource. - Implement bus_map/unmap_resource pulling bits from nexus_activate/deactivate_resource. - Use bus_generic_rman_* for bus_alloc/adjust/activate/deactivate/release_resource except for custom interrupt activate/deactivate logic still in nexus_activate/deactivate_resource. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43437 --- sys/arm/arm/nexus.c | 220 +++++++++++++++++++++++----------------------------- 1 file changed, 97 insertions(+), 123 deletions(-) diff --git a/sys/arm/arm/nexus.c b/sys/arm/arm/nexus.c index 196e879fb0db..eb0d1a5b7ded 100644 --- a/sys/arm/arm/nexus.c +++ b/sys/arm/arm/nexus.c @@ -83,10 +83,10 @@ static bus_add_child_t nexus_add_child; static bus_print_child_t nexus_print_child; static bus_activate_resource_t nexus_activate_resource; -static bus_adjust_resource_t nexus_adjust_resource; -static bus_alloc_resource_t nexus_alloc_resource; static bus_deactivate_resource_t nexus_deactivate_resource; -static bus_release_resource_t nexus_release_resource; +static bus_get_rman_t nexus_get_rman; +static bus_map_resource_t nexus_map_resource; +static bus_unmap_resource_t nexus_unmap_resource; #ifdef SMP static bus_bind_intr_t nexus_bind_intr; @@ -119,10 +119,13 @@ static device_method_t nexus_methods[] = { DEVMETHOD(bus_add_child, nexus_add_child), DEVMETHOD(bus_print_child, nexus_print_child), DEVMETHOD(bus_activate_resource, nexus_activate_resource), - DEVMETHOD(bus_adjust_resource, nexus_adjust_resource), - DEVMETHOD(bus_alloc_resource, nexus_alloc_resource), + DEVMETHOD(bus_adjust_resource, bus_generic_rman_adjust_resource), + DEVMETHOD(bus_alloc_resource, bus_generic_rman_alloc_resource), DEVMETHOD(bus_deactivate_resource, nexus_deactivate_resource), - DEVMETHOD(bus_release_resource, nexus_release_resource), + DEVMETHOD(bus_get_rman, nexus_get_rman), + DEVMETHOD(bus_map_resource, nexus_map_resource), + DEVMETHOD(bus_release_resource, bus_generic_rman_release_resource), + DEVMETHOD(bus_unmap_resource, nexus_unmap_resource), #ifdef SMP DEVMETHOD(bus_bind_intr, nexus_bind_intr), #endif @@ -216,83 +219,18 @@ nexus_add_child(device_t bus, u_int order, const char *name, int unit) return (child); } -/* - * Allocate a resource on behalf of child. NB: child is usually going to be a - * child of one of our descendants, not a direct child of nexus0. - */ -static struct resource * -nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, - rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) +static struct rman * +nexus_get_rman(device_t bus, int type, u_int flags) { - struct resource *rv; - struct rman *rm; - int needactivate = flags & RF_ACTIVE; - - flags &= ~RF_ACTIVE; - switch (type) { case SYS_RES_IRQ: - rm = &irq_rman; - break; - + return (&irq_rman); case SYS_RES_MEMORY: case SYS_RES_IOPORT: - rm = &mem_rman; - break; - + return (&mem_rman); default: return (NULL); } - - rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == NULL) - return (NULL); - - rman_set_rid(rv, *rid); - - if (needactivate) { - if (bus_activate_resource(child, type, *rid, rv)) { - rman_release_resource(rv); - return (NULL); - } - } - - return (rv); -} - -static int -nexus_adjust_resource(device_t bus __unused, device_t child __unused, int type, - struct resource *r, rman_res_t start, rman_res_t end) -{ - struct rman *rm; - - switch (type) { - case SYS_RES_IRQ: - rm = &irq_rman; - break; - case SYS_RES_MEMORY: - rm = &mem_rman; - break; - default: - return (EINVAL); - } - if (rman_is_region_manager(r, rm) == 0) - return (EINVAL); - return (rman_adjust_resource(r, start, end)); -} - -static int -nexus_release_resource(device_t bus, device_t child, int type, int rid, - struct resource *res) -{ - int error; - - if (rman_get_flags(res) & RF_ACTIVE) { - error = bus_deactivate_resource(child, type, rid, res); - if (error) - return (error); - } - return (rman_release_resource(res)); } static bus_space_tag_t @@ -371,73 +309,109 @@ nexus_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *r) { int err; - bus_addr_t paddr; - bus_size_t psize; - bus_space_handle_t vaddr; - - if ((err = rman_activate_resource(r)) != 0) - return (err); - /* - * If this is a memory resource, map it into the kernel. - */ - if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { - paddr = (bus_addr_t)rman_get_start(r); - psize = (bus_size_t)rman_get_size(r); -#ifdef FDT - err = bus_space_map(fdtbus_bs_tag, paddr, psize, 0, &vaddr); - if (err != 0) { - rman_deactivate_resource(r); + switch (type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (bus_generic_rman_activate_resource(bus, child, type, + rid, r)); + case SYS_RES_IRQ: + err = rman_activate_resource(r); + if (err != 0) return (err); - } - rman_set_bustag(r, fdtbus_bs_tag); -#else - vaddr = (bus_space_handle_t)pmap_mapdev((vm_paddr_t)paddr, - (vm_size_t)psize); - if (vaddr == 0) { - rman_deactivate_resource(r); - return (ENOMEM); - } - rman_set_bustag(r, (void *)1); -#endif - rman_set_virtual(r, (void *)vaddr); - rman_set_bushandle(r, vaddr); - return (0); - } else if (type == SYS_RES_IRQ) { err = intr_activate_irq(child, r); if (err != 0) { rman_deactivate_resource(r); return (err); } + return (0); + default: + return (EINVAL); } - return (0); } static int -nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, - struct resource *r) +nexus_map_resource(device_t bus, device_t child, int type, struct resource *r, + struct resource_map_request *argsp, struct resource_map *map) { - bus_size_t psize; - bus_space_handle_t vaddr; + struct resource_map_request args; + rman_res_t length, start; + int error; + + /* Resources must be active to be mapped. */ + if (!(rman_get_flags(r) & RF_ACTIVE)) + return (ENXIO); + + switch (type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + break; + default: + return (EINVAL); + } - if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { - psize = (bus_size_t)rman_get_size(r); - vaddr = rman_get_bushandle(r); + resource_init_map_request(&args); + error = resource_validate_map_request(r, argsp, &args, &start, &length); + if (error) + return (error); - if (vaddr != 0) { #ifdef FDT - bus_space_unmap(fdtbus_bs_tag, vaddr, psize); + error = bus_space_map(fdtbus_bs_tag, start, length, 0, + &map->r_bushandle); + if (error) + return (error); + map->r_bustag = fdtbus_bs_tag; + map->r_vaddr = (void *)map->r_bushandle; #else - pmap_unmapdev((void *)vaddr, (vm_size_t)psize); + map->r_vaddr = pmap_mapdev(start, length); + if (map->r_vaddr == NULL) + return (ENOMEM); + map->r_bustag = (void *)1; + map->r_bushandle = (bus_space_handle_t)map->r_vaddr; #endif - rman_set_virtual(r, NULL); - rman_set_bushandle(r, 0); - } - } else if (type == SYS_RES_IRQ) { - intr_deactivate_irq(child, r); + map->r_size = length; + return (0); +} + +static int +nexus_unmap_resource(device_t bus, device_t child, int type, struct resource *r, + struct resource_map *map) +{ + + switch (type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: +#ifdef FDT + bus_space_unmap(map->r_bustag, map->r_bushandle, map->r_size); +#else + pmap_unmapdev(map->r_vaddr, map->r_size); +#endif + return (0); + default: + return (EINVAL); } +} + +static int +nexus_deactivate_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + int error; - return (rman_deactivate_resource(r)); + switch (type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (bus_generic_rman_deactivate_resource(bus, child, type, + rid, r)); + case SYS_RES_IRQ: + error = rman_deactivate_resource(r); + if (error) + return (error); + intr_deactivate_irq(child, r); + return (0); + default: + return (EINVAL); + } } #ifdef FDT From nobody Tue Jan 23 17:46:00 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDyx3pjWz57mYc; Tue, 23 Jan 2024 17: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 4TKDyw6YrRz47PS; Tue, 23 Jan 2024 17: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=1706031960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PYg1RPYB3X31tttfHjLZwfcEBPjzz0NNf4S2nN+CQ4g=; b=ywygEqMUf6c7UdxPcdowN6Ud+tjC120aBgLA/ZItUF5zyi5jKaxo6qGvhHcuLwLa/oJzTP Z6Cz4KCOD5luETlaF4B19lewUD73gJCwX/21YeGO5RBxY2cccD4vxgkkRnrtaPvIzXGKjx KST0tUOlYvOxZHN50Uz/fIGSVic/Gf5od/uL70WDuT2x4KW19PgFmUS8jpBFXJxHD+HiHl MEMMXoi1imL3sVR8H/56ub67Fo/mr//fNLrPte00cxXwtaYAmu4vqdK8XhIhMu0ty7JBlA IjNe3Ebra6hG8EgRvfMbbPKBVt4TqoBVes7AuHuUgmpZuOs2wFyBGwFp3deirQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PYg1RPYB3X31tttfHjLZwfcEBPjzz0NNf4S2nN+CQ4g=; b=SOm0SDgYTosX6GJFonABYLU/RwmvF6+LNDg9yPPk7TZzDZYXbpuqDcKH9XbH17Esv1pFtY tauPAv+Lt941ez/mYQjhUQexx/ArJR5yCF7LPRZus6P3KFbz7gc+OtOkRYi81SW3Cxi5Po Ub4+a0S7hS7AJoU+KRyJpfSr4WpIO5RBBacOm42mpnZSLOnk5PxzbHMuboVM8UZ7p49i4K C93hLPSRvXd2sjkQQNXEcEWtenhtFYfqJYEl+nvdQEhzKzwIZXgC3gXJRjBD0/tRlpvmbm jQEvmMK8bCHbfFkCUntj3HpPP2oDJJJohGHgZdxD0SKbBQx2H8ynWJacbqtIpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031960; a=rsa-sha256; cv=none; b=RwApt6QQ3O186FQMRr7jQb3Azan3znXQ5jqqZhHIEWqjtlDuwAWiFMj+9eTGiUnSpxaJ7m ++mMmzgN6+UD5598n6fJEdRe2NCP/vBIMmWspM5eWeaMfS2UYr/TTHpldPehZaw4HhpLyM AihlKAnCJC4LDGVrTGTRqsq1n2lbDK0HS70W0cApoiRkbSKgG2UPseHxct8uraviU47yU1 s98Hcg5IipYJr5+YltEx/NSjdFpYIOTpAmUqMoAE07IcAl9cRxg81q6a6GU6/xd84LkyKe R7y7lR3fRCG++Tti2+uQJc4mCdaKeS1KSDZIFwHFcTpM1SFu8AIvPdgSRfMW6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDyw5gc6zgNQ; Tue, 23 Jan 2024 17: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 40NHk0Ho076010; Tue, 23 Jan 2024 17: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 40NHk0iW076007; Tue, 23 Jan 2024 17:46:00 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:46:00 GMT Message-Id: <202401231746.40NHk0iW076007@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 4e1d94d99798 - main - arm mv_pcib: Use bus_generic_rman_* List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4e1d94d99798b9176b477062a9c7502c33d3e810 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4e1d94d99798b9176b477062a9c7502c33d3e810 commit 4e1d94d99798b9176b477062a9c7502c33d3e810 Author: John Baldwin AuthorDate: 2024-01-23 17:37:30 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:37:30 +0000 arm mv_pcib: Use bus_generic_rman_* - Implement bus_get_rman pulling bits from mv_pcib_alloc_resource. - Implement bus_map/unmap_resource pulling bits from mv_pcib_activate/deactivate_resource. - Use bus_generic_rman_* to handle memory and I/O resources for mv_pcib_alloc/activate/adjust/deactivate/release_resource. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43438 --- sys/arm/mv/mv_pci.c | 180 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 157 insertions(+), 23 deletions(-) diff --git a/sys/arm/mv/mv_pci.c b/sys/arm/mv/mv_pci.c index 74fc0419bf22..76da1c4da7a7 100644 --- a/sys/arm/mv/mv_pci.c +++ b/sys/arm/mv/mv_pci.c @@ -342,10 +342,21 @@ static int mv_pcib_mem_init(struct mv_pcib_softc *); static int mv_pcib_probe(device_t); static int mv_pcib_attach(device_t); +static struct rman *mv_pcib_get_rman(device_t, int, u_int); static struct resource *mv_pcib_alloc_resource(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); +static int mv_pcib_adjust_resource(device_t, device_t, int, struct resource *, + rman_res_t, rman_res_t); static int mv_pcib_release_resource(device_t, device_t, int, int, struct resource *); +static int mv_pcib_activate_resource(device_t, device_t, int, int, + struct resource *r); +static int mv_pcib_deactivate_resource(device_t, device_t, int, int, + struct resource *r); +static int mv_pcib_map_resource(device_t, device_t, int, struct resource *, + struct resource_map_request *, struct resource_map *); +static int mv_pcib_unmap_resource(device_t, device_t, int, struct resource *, + struct resource_map *); static int mv_pcib_read_ivar(device_t, device_t, int, uintptr_t *); static int mv_pcib_write_ivar(device_t, device_t, int, uintptr_t); @@ -370,10 +381,14 @@ static device_method_t mv_pcib_methods[] = { /* Bus interface */ DEVMETHOD(bus_read_ivar, mv_pcib_read_ivar), DEVMETHOD(bus_write_ivar, mv_pcib_write_ivar), + DEVMETHOD(bus_get_rman, mv_pcib_get_rman), DEVMETHOD(bus_alloc_resource, mv_pcib_alloc_resource), + DEVMETHOD(bus_adjust_resource, mv_pcib_adjust_resource), DEVMETHOD(bus_release_resource, mv_pcib_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_activate_resource, mv_pcib_activate_resource), + DEVMETHOD(bus_deactivate_resource, mv_pcib_deactivate_resource), + DEVMETHOD(bus_map_resource, mv_pcib_map_resource), + DEVMETHOD(bus_unmap_resource, mv_pcib_unmap_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), @@ -876,20 +891,30 @@ mv_pcib_init_all_bars(struct mv_pcib_softc *sc, int bus, int slot, return (0); } +static struct rman * +mv_pcib_get_rman(device_t dev, int type, u_int flags) +{ + struct mv_pcib_softc *sc = device_get_softc(dev); + + switch (type) { + case SYS_RES_IOPORT: + return (&sc->sc_io_rman); + case SYS_RES_MEMORY: + return (&sc->sc_mem_rman); + default: + return (NULL); + } +} + static struct resource * mv_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct mv_pcib_softc *sc = device_get_softc(dev); - struct rman *rm = NULL; - struct resource *res; switch (type) { case SYS_RES_IOPORT: - rm = &sc->sc_io_rman; - break; case SYS_RES_MEMORY: - rm = &sc->sc_mem_rman; break; #ifdef PCI_RES_BUS case PCI_RES_BUS: @@ -911,21 +936,32 @@ mv_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, (end > sc->sc_mem_base + sc->sc_mem_size - 1)) return (NULL); - res = rman_reserve_resource(rm, start, end, count, flags, child); - if (res == NULL) - return (NULL); - - rman_set_rid(res, *rid); - rman_set_bustag(res, fdtbus_bs_tag); - rman_set_bushandle(res, start); + return (bus_generic_rman_alloc_resource(dev, child, type, rid, + start, end, count, flags)); +} - if (flags & RF_ACTIVE) - if (bus_activate_resource(child, type, *rid, res)) { - rman_release_resource(res); - return (NULL); - } +static int +mv_pcib_adjust_resource(device_t dev, device_t child, int type, + struct resource *r, rman_res_t start, rman_res_t end) +{ +#ifdef PCI_RES_BUS + struct mv_pcib_softc *sc = device_get_softc(dev); +#endif - return (res); + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + return (bus_generic_rman_adjust_resource(dev, child, type, r, + start, end)); +#ifdef PCI_RES_BUS + case PCI_RES_BUS: + return (pci_domain_adjust_bus(sc->ap_segment, child, r, start, + end)); +#endif + default: + return (bus_generic_adjust_resource(dev, child, type, r, + start, end)); + } } static int @@ -934,15 +970,113 @@ mv_pcib_release_resource(device_t dev, device_t child, int type, int rid, { #ifdef PCI_RES_BUS struct mv_pcib_softc *sc = device_get_softc(dev); +#endif - if (type == PCI_RES_BUS) + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + return (bus_generic_rman_release_resource(dev, child, type, + rid, res)); +#ifdef PCI_RES_BUS + case PCI_RES_BUS: return (pci_domain_release_bus(sc->ap_segment, child, rid, res)); #endif - if (type != SYS_RES_IOPORT && type != SYS_RES_MEMORY) + default: return (BUS_RELEASE_RESOURCE(device_get_parent(dev), child, type, rid, res)); + } +} + +static int +mv_pcib_activate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ +#ifdef PCI_RES_BUS + struct mv_pcib_softc *sc = device_get_softc(dev); +#endif + + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + return (bus_generic_rman_activate_resource(dev, child, type, + rid, r)); +#ifdef PCI_RES_BUS + case PCI_RES_BUS: + return (pci_domain_activate_bus(sc->ap_segment, child, rid, r)); +#endif + default: + return (bus_generic_activate_resource(dev, child, type, rid, + r)); + } +} + +static int +mv_pcib_deactivate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ +#ifdef PCI_RES_BUS + struct mv_pcib_softc *sc = device_get_softc(dev); +#endif + + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + return (bus_generic_rman_deactivate_resource(dev, child, type, + rid, r)); +#ifdef PCI_RES_BUS + case PCI_RES_BUS: + return (pci_domain_deactivate_bus(sc->ap_segment, child, rid, + r)); +#endif + default: + return (bus_generic_deactivate_resource(dev, child, type, rid, + r)); + } +} + +static int +mv_pcib_map_resource(device_t dev, device_t child, int type, struct resource *r, + struct resource_map_request *argsp, struct resource_map *map) +{ + struct resource_map_request args; + rman_res_t length, start; + int error; - return (rman_release_resource(res)); + /* Resources must be active to be mapped. */ + if (!(rman_get_flags(r) & RF_ACTIVE)) + return (ENXIO); + + /* Mappings are only supported on I/O and memory resources. */ + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + break; + default: + return (EINVAL); + } + + resource_init_map_request(&args); + error = resource_validate_map_request(r, argsp, &args, &start, &length); + if (error) + return (error); + + map->r_bustag = fdtbus_bs_tag; + map->r_bushandle = start; + map->r_size = length; + return (0); +} + +static int +mv_pcib_unmap_resource(device_t dev, device_t child, int type, + struct resource *r, struct resource_map *map) +{ + switch (type) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + return (0); + default: + return (EINVAL); + } } static int From nobody Tue Jan 23 17:46:01 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDyy34C7z57mG8; Tue, 23 Jan 2024 17: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 4TKDyy0XJkz47Pg; Tue, 23 Jan 2024 17: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=1706031962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FFfDwozf31XXIlruj2sKrzpCdsLPgPZrtbPQdpKPkcE=; b=jOFisCs0RZk9RY7bGPGVJS01yH+ST9tig6V2BYOUTtKp93l5bS3RJEfTiOGMUhGV/Txx+C w3abf/MLQTLnYzCuvwYuiGvrUynl+0aG4fnNnQU5DT0ozJogk/Ysj6X3i6a85uamkIySs+ Sr/L1Rg7Ow1E1BiL7bfRIoX6ZHpCe72uYPaexJuP5Eru48IM7kN18MPfYA9Z3X52vMcpnW 4fi+DVHjh6m0Dt5VxCRgFFsQ4poa3UeWl1pL9TNUUDWYsJj0W0r2eQjDcr73Ll8xlE6SeD NHUgOuwfO3CjkttjLLfplL/qqb5LjNG4sZgpdVL8nQts7h8MOiW3Izdf05srCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FFfDwozf31XXIlruj2sKrzpCdsLPgPZrtbPQdpKPkcE=; b=G5XXM20l1HGQ+cVUrj/WXWIIO0o9y+ciybluDwYf/8KRbuYWa+QBcHLxF1pp4B8EpAztrA sk7r4MwmOwPMATfJI9vSagook4BOTmmTPjmDYaHIwLWrwvd9T1DPux58xXvExc+GQhbMrV 5oAv0Fdyb0eKbIEND1EWAMG5Tmm5q8NgoXH2abTlAw9hwJC4cNmT1ddafnmp106RmC3UEg /1VsAVpu/IJ+kCtBBiQR321lCOR5i7I+K9EAWKmSxXaYt7UOzh1LaSOk9lllBT3y/DiffQ HWW/yg1e0By0lXv/8fSP+UDqaG4Y5EbXlOpHyelX82x+IP0eniaazPswa12THg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031962; a=rsa-sha256; cv=none; b=ZxV3oG51esRI1Lon++p1jD3q6I/stEM0A3XIlLnSGBvwjI+H2jEskGLz/TyZkIy7sbud4W 3C3TLqNJAXR8Ru8QCmtxdeIz5CwgJ40oKjGIPJ34E5j2ct9HFulVi0uVCTDtF17d6qrDjm V71x0+oSIe54y6/MAxj3srJMbQV2pKQQBQMdhF5EcRDaGlh8iwymoOBM3FbvqqyJWqeoqp b5JroQ5/7/GdomyrkNohTQnOu13uxGwhKndvp6l26Wblotf12eFs0CtdvswRSTSz2k0oy9 EDtSFDdebeoHAf2wz1FrSVrA5MekxCpAD7E2u9noqHO/ATs2E3OMj6YZ5u8fbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDyx6hPfzg8y; Tue, 23 Jan 2024 17:46:01 +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 40NHk1Iu076061; Tue, 23 Jan 2024 17: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 40NHk1DO076058; Tue, 23 Jan 2024 17:46:01 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:46:01 GMT Message-Id: <202401231746.40NHk1DO076058@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e5c6dbd57614 - main - arm64 thunder: Use bus_generic_rman_* in the pcie_pem driver List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e5c6dbd576140c423b73ef6c908ffef6178cff9b Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e5c6dbd576140c423b73ef6c908ffef6178cff9b commit e5c6dbd576140c423b73ef6c908ffef6178cff9b Author: John Baldwin AuthorDate: 2024-01-23 17:37:41 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:37:41 +0000 arm64 thunder: Use bus_generic_rman_* in the pcie_pem driver - Implement bus_map/unmap_resource pulling bits from the previous thunder_pem_activate/deactivate_resource. - Use bus_generic_rman_* in various routines for memory and I/O port resources. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43439 --- sys/arm64/cavium/thunder_pcie_pem.c | 206 ++++++++++++++++++++++-------------- 1 file changed, 124 insertions(+), 82 deletions(-) diff --git a/sys/arm64/cavium/thunder_pcie_pem.c b/sys/arm64/cavium/thunder_pcie_pem.c index a1bd54d9744d..5060b6e79d97 100644 --- a/sys/arm64/cavium/thunder_pcie_pem.c +++ b/sys/arm64/cavium/thunder_pcie_pem.c @@ -136,6 +136,10 @@ static int thunder_pem_get_id(device_t, device_t, enum pci_id_type, static int thunder_pem_attach(device_t); static int thunder_pem_deactivate_resource(device_t, device_t, int, int, struct resource *); +static int thunder_pem_map_resource(device_t, device_t, int, struct resource *, + struct resource_map_request *, struct resource_map *); +static int thunder_pem_unmap_resource(device_t, device_t, int, + struct resource *, struct resource_map *); static bus_dma_tag_t thunder_pem_get_dma_tag(device_t, device_t); static int thunder_pem_detach(device_t); static uint64_t thunder_pem_config_reg_read(struct thunder_pem_softc *, int); @@ -148,7 +152,7 @@ static int thunder_pem_read_ivar(device_t, device_t, int, uintptr_t *); static void thunder_pem_release_all(device_t); static int thunder_pem_release_resource(device_t, device_t, int, int, struct resource *); -static struct rman * thunder_pem_rman(struct thunder_pem_softc *, int); +static struct rman * thunder_pem_get_rman(device_t, int, u_int); static void thunder_pem_slix_s2m_regx_acc_modify(struct thunder_pem_softc *, int, int); static void thunder_pem_write_config(device_t, u_int, u_int, u_int, u_int, @@ -168,11 +172,14 @@ static device_method_t thunder_pem_methods[] = { /* Bus interface */ DEVMETHOD(bus_read_ivar, thunder_pem_read_ivar), DEVMETHOD(bus_write_ivar, thunder_pem_write_ivar), + DEVMETHOD(bus_get_rman, thunder_pem_get_rman), DEVMETHOD(bus_alloc_resource, thunder_pem_alloc_resource), DEVMETHOD(bus_release_resource, thunder_pem_release_resource), DEVMETHOD(bus_adjust_resource, thunder_pem_adjust_resource), DEVMETHOD(bus_activate_resource, thunder_pem_activate_resource), DEVMETHOD(bus_deactivate_resource, thunder_pem_deactivate_resource), + DEVMETHOD(bus_map_resource, thunder_pem_map_resource), + DEVMETHOD(bus_unmap_resource, thunder_pem_unmap_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), @@ -250,86 +257,125 @@ static int thunder_pem_activate_resource(device_t dev, device_t child, int type, int rid, struct resource *r) { - int err; - bus_addr_t paddr; - bus_size_t psize; - bus_space_handle_t vaddr; +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) struct thunder_pem_softc *sc; - if ((err = rman_activate_resource(r)) != 0) - return (err); + sc = device_get_softc(dev); +#endif + switch (type) { +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + case PCI_RES_BUS: + return (pci_domain_activate_bus(sc->id, child, rid, r)); +#endif + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (bus_generic_rman_activate_resource(dev, child, type, + rid, r)); + default: + return (bus_generic_activate_resource(dev, child, type, rid, + r)); + } +} + +static int +thunder_pem_deactivate_resource(device_t dev, device_t child, int type, int rid, + struct resource *r) +{ +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + struct thunder_pem_softc *sc; sc = device_get_softc(dev); +#endif + switch (type) { +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + case PCI_RES_BUS: + return (pci_domain_deactivate_bus(sc->id, child, rid, r)); +#endif + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (bus_generic_rman_deactivate_resource(dev, child, type, + rid, r)); + default: + return (bus_generic_deactivate_resource(dev, child, type, rid, + r)); + } +} - /* - * If this is a memory resource, map it into the kernel. - */ - if (type == SYS_RES_MEMORY || type == SYS_RES_IOPORT) { - paddr = (bus_addr_t)rman_get_start(r); - psize = (bus_size_t)rman_get_size(r); +static int +thunder_pem_map_resource(device_t dev, device_t child, int type, + struct resource *r, struct resource_map_request *argsp, + struct resource_map *map) +{ + struct resource_map_request args; + struct thunder_pem_softc *sc; + rman_res_t length, start; + int error; - paddr = range_addr_pci_to_phys(sc->ranges, paddr); + /* Resources must be active to be mapped. */ + if (!(rman_get_flags(r) & RF_ACTIVE)) + return (ENXIO); - err = bus_space_map(&memmap_bus, paddr, psize, 0, &vaddr); - if (err != 0) { - rman_deactivate_resource(r); - return (err); - } - rman_set_bustag(r, &memmap_bus); - rman_set_virtual(r, (void *)vaddr); - rman_set_bushandle(r, vaddr); + switch (type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + break; + default: + return (EINVAL); } + + resource_init_map_request(&args); + error = resource_validate_map_request(r, argsp, &args, &start, &length); + if (error) + return (error); + + sc = device_get_softc(dev); + start = range_addr_pci_to_phys(sc->ranges, start); + error = bus_space_map(&memmap_bus, start, length, 0, &map->r_bushandle); + if (error) + return (error); + map->r_bustag = &memmap_bus; + map->r_vaddr = (void *)map->r_bushandle; + map->r_size = length; return (0); } -/* - * This function is an exact copy of nexus_deactivate_resource() - * Keep it up-to-date with all changes in nexus. To be removed - * once bus-mapping interface is developed. - */ static int -thunder_pem_deactivate_resource(device_t bus, device_t child, int type, int rid, - struct resource *r) +thunder_pem_unmap_resource(device_t dev, device_t child, int type, + struct resource *r, struct resource_map *map) { - bus_size_t psize; - bus_space_handle_t vaddr; - psize = (bus_size_t)rman_get_size(r); - vaddr = rman_get_bushandle(r); - - if (vaddr != 0) { - bus_space_unmap(&memmap_bus, vaddr, psize); - rman_set_virtual(r, NULL); - rman_set_bushandle(r, 0); + switch (type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + bus_space_unmap(map->r_bustag, map->r_bushandle, map->r_size); + return (0); + default: + return (EINVAL); } - - return (rman_deactivate_resource(r)); } static int thunder_pem_adjust_resource(device_t dev, device_t child, int type, struct resource *res, rman_res_t start, rman_res_t end) { +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) struct thunder_pem_softc *sc; - struct rman *rm; sc = device_get_softc(dev); +#endif + switch (type) { #if defined(NEW_PCIB) && defined(PCI_RES_BUS) - if (type == PCI_RES_BUS) + case PCI_RES_BUS: return (pci_domain_adjust_bus(sc->id, child, res, start, end)); #endif - - rm = thunder_pem_rman(sc, type); - if (rm == NULL) + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (bus_generic_rman_adjust_resource(dev, child, type, res, + start, end)); + default: return (bus_generic_adjust_resource(dev, child, type, res, start, end)); - if (!rman_is_region_manager(res, rm)) - /* - * This means a child device has a memory or I/O - * resource not from you which shouldn't happen. - */ - return (EINVAL); - return (rman_adjust_resource(res, start, end)); + } } static bus_dma_tag_t @@ -629,17 +675,19 @@ thunder_pem_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct thunder_pem_softc *sc = device_get_softc(dev); - struct rman *rm = NULL; struct resource *res; device_t parent_dev; + switch (type) { #if defined(NEW_PCIB) && defined(PCI_RES_BUS) - if (type == PCI_RES_BUS) + case PCI_RES_BUS: return (pci_domain_alloc_bus(sc->id, child, rid, start, end, count, flags)); #endif - rm = thunder_pem_rman(sc, type); - if (rm == NULL) { + case SYS_RES_IOPORT: + case SYS_RES_MEMORY: + break; + default: /* Find parent device. On ThunderX we know an exact path. */ parent_dev = device_get_parent(device_get_parent(dev)); return (BUS_ALLOC_RESOURCE(parent_dev, dev, type, rid, start, @@ -663,28 +711,15 @@ thunder_pem_alloc_resource(device_t dev, device_t child, int type, int *rid, start, end, count); } - res = rman_reserve_resource(rm, start, end, count, flags, child); - if (res == NULL) - goto fail; - - rman_set_rid(res, *rid); - - if (flags & RF_ACTIVE) - if (bus_activate_resource(child, type, *rid, res)) { - rman_release_resource(res); - goto fail; - } - - return (res); - -fail: - if (bootverbose) { + res = bus_generic_rman_alloc_resource(dev, child, type, rid, start, + end, count, flags); + if (res == NULL && bootverbose) { device_printf(dev, "%s FAIL: type=%d, rid=%d, " "start=%016lx, end=%016lx, count=%016lx, flags=%x\n", __func__, type, *rid, start, end, count, flags); } - return (NULL); + return (res); } static int @@ -694,24 +729,31 @@ thunder_pem_release_resource(device_t dev, device_t child, int type, int rid, device_t parent_dev; #if defined(NEW_PCIB) && defined(PCI_RES_BUS) struct thunder_pem_softc *sc = device_get_softc(dev); +#endif - if (type == PCI_RES_BUS) + switch (type) { +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + case PCI_RES_BUS: return (pci_domain_release_bus(sc->id, child, rid, res)); #endif - /* Find parent device. On ThunderX we know an exact path. */ - parent_dev = device_get_parent(device_get_parent(dev)); - - if ((type != SYS_RES_MEMORY) && (type != SYS_RES_IOPORT)) + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (bus_generic_rman_release_resource(dev, child, type, + rid, res)); + default: + /* Find parent device. On ThunderX we know an exact path. */ + parent_dev = device_get_parent(device_get_parent(dev)); return (BUS_RELEASE_RESOURCE(parent_dev, child, type, rid, res)); - - return (rman_release_resource(res)); + } } static struct rman * -thunder_pem_rman(struct thunder_pem_softc *sc, int type) +thunder_pem_get_rman(device_t bus, int type, u_int flags) { + struct thunder_pem_softc *sc; + sc = device_get_softc(bus); switch (type) { case SYS_RES_IOPORT: return (&sc->io_rman); @@ -866,7 +908,7 @@ thunder_pem_attach(device_t dev) if (size == 0) continue; /* empty range element */ - rman = thunder_pem_rman(sc, sc->ranges[tuple].flags); + rman = thunder_pem_get_rman(dev, sc->ranges[tuple].flags, 0); if (rman != NULL) error = rman_manage_region(rman, base, base + size - 1); From nobody Tue Jan 23 17:46:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDz03zsxz57mYx; Tue, 23 Jan 2024 17: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 4TKDz02VkQz47FL; Tue, 23 Jan 2024 17: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=1706031964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H/1J2n4Lj7bLYgijacash8EKRytzTXfHwU26EPpVqqg=; b=nkYeipN6sMJEkrICZh23sseBhzfmmGUVGCRjFOUVvQWD190YLXdr4AqSDkYqzH99BAckH1 EReI7ZCC/MVBkWpaDl94ZdlO9zkHu+U2azopr6/rk3b/0q8rXSW2iALp8p8zR85sc/F0Fu R29RKFQ8Y9Ult37OuqqcD8T+kkjcQUmgas+/iSIocYnJDgWaOs6sU4ghUGs+RWRcbae6aq xZh4bLTN/mIXX/1/AvgTofIMWKerW+jPlhERADdaDU1uSVCcsYPD9vZqcch2RfPAA8UdNb lW71CDFi7nXg+L6uBX1nwwN0rfN/qH6rq6rEox6yuSeWi/wdK3PteC4ndoGg7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H/1J2n4Lj7bLYgijacash8EKRytzTXfHwU26EPpVqqg=; b=e+QQFOYY+8L43F3iRBKfx9VwpqijyBtEOg10eCrc+U+glf6AJAU82coJBC4lvVVhfZXlv8 zc4zfa71lWIvnEt9z2HIGHLK9Gm2qRpVJIybPbCKEZp21K2VZLhAeQlHu30V4YaH7e6IRS NqFXM0WnI23Zm7neYzsZyJOo76DvLYry5f0TFtlYopxRYlF4kVwdhvV53HQzWljDrymdDC W/W0clzwt+UWeIuTDKmGszuECRkKYh6jhke/6PVlzNh2VnrwP4IAG4r0YLZlLvQauH5qdH ngnpV7qUGo9fiN2Fvq/OWXabMd1dVIudFrUJu0/qs+xJH9Hs6M5SGmq+bPFrIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031964; a=rsa-sha256; cv=none; b=tOGeW0ryFGwJrMqJ+6NPSCcyXMpjXe2s2keQDNkPmlNusDXHI8GQOL0P+bhSY5uPZswVIB IyFaJpa9f3M/RzUwSNoyG3gL/bhcBAdOaIJ3Gl5RBEmULujA5jKjY+lmx61PXZtJr8z+kc sYT31Bsbn7wNaSHM9zpEKH5u2wPS9e/Ut6Q6sdy9sckMjg5q7wriQicdpTN8YrAQKmYPwf aEskvLxgJ0satLeJicYYBqEgZmTEjcUUQ4G+CeJXmBVeCQK6G2sfFWFU2rYyx6Pt/zbgau JDmY6Y62H4NJBu4y8OTE8kWxqmFsNTAoGce7s5Y+8yvzX3WB9ii1BI1WcQxzJQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDz01Y4dzfyC; Tue, 23 Jan 2024 17: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 40NHk42e076133; Tue, 23 Jan 2024 17: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 40NHk4Sp076130; Tue, 23 Jan 2024 17:46:04 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:46:04 GMT Message-Id: <202401231746.40NHk4Sp076130@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 0b60d7a60099 - main - ofw_pcib: Use bus_generic_rman_* List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0b60d7a60099e6ce81e0fb012946a1e77b0626c4 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=0b60d7a60099e6ce81e0fb012946a1e77b0626c4 commit 0b60d7a60099e6ce81e0fb012946a1e77b0626c4 Author: John Baldwin AuthorDate: 2024-01-23 17:38:09 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:38:09 +0000 ofw_pcib: Use bus_generic_rman_* - Implement bus_map/unmap_resource pulling bits from the previous ofw_pcib_activate/deactivate_resource. One difference here is that the bus_unmap_resource implementation uses bus_space_unmap instead of pmap_unmapdev as a complement to the existing use of bus_space_map. - Use bus_generic_rman_* in various routines for memory and I/O port resources. - Use pci_domain_* for PCI_RES_BUS in ofw_pcib_activate/deactivate_resource. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43441 --- sys/dev/ofw/ofw_pcib.c | 215 ++++++++++++++++++++++++++++--------------------- 1 file changed, 123 insertions(+), 92 deletions(-) diff --git a/sys/dev/ofw/ofw_pcib.c b/sys/dev/ofw/ofw_pcib.c index 2bcaa05ab1ed..f8d0fc8e7029 100644 --- a/sys/dev/ofw/ofw_pcib.c +++ b/sys/dev/ofw/ofw_pcib.c @@ -64,6 +64,7 @@ /* * bus interface. */ +static struct rman *ofw_pcib_get_rman(device_t, int, u_int); static struct resource * ofw_pcib_alloc_resource(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); static int ofw_pcib_release_resource(device_t, device_t, int, int, @@ -74,6 +75,10 @@ static int ofw_pcib_deactivate_resource(device_t, device_t, int, int, struct resource *); static int ofw_pcib_adjust_resource(device_t, device_t, int, struct resource *, rman_res_t, rman_res_t); +static int ofw_pcib_map_resource(device_t, device_t, int, struct resource *, + struct resource_map_request *, struct resource_map *); +static int ofw_pcib_unmap_resource(device_t, device_t, int, struct resource *, + struct resource_map *); static int ofw_pcib_translate_resource(device_t bus, int type, rman_res_t start, rman_res_t *newstart); @@ -95,7 +100,6 @@ static phandle_t ofw_pcib_get_node(device_t, device_t); * local methods */ static int ofw_pcib_fill_ranges(phandle_t, struct ofw_pci_range *); -static struct rman *ofw_pcib_get_rman(struct ofw_pci_softc *, int, u_int); /* * Driver methods. @@ -110,11 +114,14 @@ static device_method_t ofw_pcib_methods[] = { DEVMETHOD(bus_write_ivar, ofw_pcib_write_ivar), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_get_rman, ofw_pcib_get_rman), DEVMETHOD(bus_alloc_resource, ofw_pcib_alloc_resource), DEVMETHOD(bus_release_resource, ofw_pcib_release_resource), DEVMETHOD(bus_activate_resource, ofw_pcib_activate_resource), DEVMETHOD(bus_deactivate_resource, ofw_pcib_deactivate_resource), DEVMETHOD(bus_adjust_resource, ofw_pcib_adjust_resource), + DEVMETHOD(bus_map_resource, ofw_pcib_map_resource), + DEVMETHOD(bus_unmap_resource, ofw_pcib_unmap_resource), DEVMETHOD(bus_translate_resource, ofw_pcib_translate_resource), #ifdef __powerpc__ DEVMETHOD(bus_get_bus_tag, ofw_pcib_bus_get_bus_tag), @@ -417,80 +424,50 @@ static struct resource * ofw_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) struct ofw_pci_softc *sc; - struct resource *rv; - struct rman *rm; - int needactivate; - - needactivate = flags & RF_ACTIVE; - flags &= ~RF_ACTIVE; sc = device_get_softc(bus); - +#endif + switch (type) { #if defined(NEW_PCIB) && defined(PCI_RES_BUS) - if (type == PCI_RES_BUS) { - return (pci_domain_alloc_bus(sc->sc_pci_domain, child, rid, - start, end, count, flags | needactivate)); - } + case PCI_RES_BUS: + return (pci_domain_alloc_bus(sc->sc_pci_domain, child, rid, + start, end, count, flags)); #endif - - rm = ofw_pcib_get_rman(sc, type, flags); - if (rm == NULL) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (bus_generic_rman_alloc_resource(bus, child, type, rid, + start, end, count, flags)); + default: return (bus_generic_alloc_resource(bus, child, type, rid, - start, end, count, flags | needactivate)); - } - - rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == NULL) { - device_printf(bus, "failed to reserve resource for %s\n", - device_get_nameunit(child)); - return (NULL); + start, end, count, flags)); } - - rman_set_rid(rv, *rid); - - if (needactivate) { - if (bus_activate_resource(child, type, *rid, rv) != 0) { - device_printf(bus, - "failed to activate resource for %s\n", - device_get_nameunit(child)); - rman_release_resource(rv); - return (NULL); - } - } - - return (rv); } static int ofw_pcib_release_resource(device_t bus, device_t child, int type, int rid, struct resource *res) { +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) struct ofw_pci_softc *sc; - struct rman *rm; - int error; sc = device_get_softc(bus); - +#endif + switch (type) { #if defined(NEW_PCIB) && defined(PCI_RES_BUS) - if (type == PCI_RES_BUS) + case PCI_RES_BUS: return (pci_domain_release_bus(sc->sc_pci_domain, child, rid, res)); #endif - - rm = ofw_pcib_get_rman(sc, type, rman_get_flags(res)); - if (rm == NULL) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (bus_generic_rman_release_resource(bus, child, type, rid, + res)); + default: return (bus_generic_release_resource(bus, child, type, rid, res)); } - KASSERT(rman_is_region_manager(res, rm), ("rman mismatch")); - - if (rman_get_flags(res) & RF_ACTIVE) { - error = bus_deactivate_resource(child, type, rid, res); - if (error != 0) - return (error); - } - return (rman_release_resource(res)); } static int @@ -536,26 +513,59 @@ static int ofw_pcib_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *res) { +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) struct ofw_pci_softc *sc; - bus_space_handle_t handle; - bus_space_tag_t tag; - struct ofw_pci_range *rp; - vm_paddr_t start; - int space; - int rv; sc = device_get_softc(bus); - - if (type != SYS_RES_IOPORT && type != SYS_RES_MEMORY) { +#endif + switch (type) { +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + case PCI_RES_BUS: + return (pci_domain_activate_bus(sc->sc_pci_domain, child, rid, + res)); +#endif + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (bus_generic_rman_activate_resource(bus, child, type, rid, + res)); + default: return (bus_generic_activate_resource(bus, child, type, rid, res)); } +} + +static int +ofw_pcib_map_resource(device_t dev, device_t child, int type, + struct resource *r, struct resource_map_request *argsp, + struct resource_map *map) +{ + struct resource_map_request args; + struct ofw_pci_softc *sc; + struct ofw_pci_range *rp; + rman_res_t length, start; + int error, space; + + /* Resources must be active to be mapped. */ + if (!(rman_get_flags(r) & RF_ACTIVE)) + return (ENXIO); + + switch (type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + break; + default: + return (EINVAL); + } - start = (vm_paddr_t)rman_get_start(res); + resource_init_map_request(&args); + error = resource_validate_map_request(r, argsp, &args, &start, &length); + if (error) + return (error); /* * Map this through the ranges list */ + sc = device_get_softc(dev); for (rp = sc->sc_range; rp < sc->sc_range + sc->sc_nrange && rp->pci_hi != 0; rp++) { if (start < rp->pci || start >= rp->pci + rp->size) @@ -571,7 +581,7 @@ ofw_pcib_activate_resource(device_t bus, device_t child, int type, int rid, break; default: space = -1; - } + } if (type == space) { start += (rp->host - rp->pci); @@ -580,23 +590,35 @@ ofw_pcib_activate_resource(device_t bus, device_t child, int type, int rid, } if (bootverbose) - printf("ofw_pci mapdev: start %jx, len %jd\n", - (rman_res_t)start, rman_get_size(res)); + printf("ofw_pci mapdev: start %jx, len %jd\n", start, length); - tag = BUS_GET_BUS_TAG(child, child); - if (tag == NULL) + map->r_bustag = BUS_GET_BUS_TAG(child, child); + if (map->r_bustag == NULL) return (ENOMEM); - rman_set_bustag(res, tag); - rv = bus_space_map(tag, start, - rman_get_size(res), 0, &handle); - if (rv != 0) - return (ENOMEM); + error = bus_space_map(map->r_bustag, start, length, 0, + &map->r_bushandle); + if (error != 0) + return (error); - rman_set_bushandle(res, handle); - rman_set_virtual(res, (void *)handle); /* XXX for powerpc only ? */ + /* XXX for powerpc only? */ + map->r_vaddr = (void *)map->r_bushandle; + map->r_size = length; + return (0); +} - return (rman_activate_resource(res)); +static int +ofw_pcib_unmap_resource(device_t dev, device_t child, int type, + struct resource *r, struct resource_map *map) +{ + switch (type) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + bus_space_unmap(map->r_bustag, map->r_bushandle, map->r_size); + return (0); + default: + return (EINVAL); + } } #ifdef __powerpc__ @@ -612,43 +634,50 @@ static int ofw_pcib_deactivate_resource(device_t bus, device_t child, int type, int rid, struct resource *res) { - vm_size_t psize; +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + struct ofw_pci_softc *sc; - if (type != SYS_RES_IOPORT && type != SYS_RES_MEMORY) { + sc = device_get_softc(bus); +#endif + switch (type) { +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + case PCI_RES_BUS: + return (pci_domain_deactivate_bus(sc->sc_pci_domain, child, rid, + res)); +#endif + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (bus_generic_rman_deactivate_resource(bus, child, type, + rid, res)); + default: return (bus_generic_deactivate_resource(bus, child, type, rid, res)); } - - psize = rman_get_size(res); - pmap_unmapdev(rman_get_virtual(res), psize); - - return (rman_deactivate_resource(res)); } static int ofw_pcib_adjust_resource(device_t bus, device_t child, int type, struct resource *res, rman_res_t start, rman_res_t end) { - struct rman *rm; +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) struct ofw_pci_softc *sc; sc = device_get_softc(bus); +#endif + switch (type) { #if defined(NEW_PCIB) && defined(PCI_RES_BUS) - if (type == PCI_RES_BUS) + case PCI_RES_BUS: return (pci_domain_adjust_bus(sc->sc_pci_domain, child, res, start, end)); #endif - - rm = ofw_pcib_get_rman(sc, type, rman_get_flags(res)); - if (rm == NULL) { + case SYS_RES_MEMORY: + case SYS_RES_IOPORT: + return (bus_generic_rman_adjust_resource(bus, child, type, res, + start, end)); + default: return (bus_generic_adjust_resource(bus, child, type, res, start, end)); } - KASSERT(rman_is_region_manager(res, rm), ("rman mismatch")); - KASSERT(!(rman_get_flags(res) & RF_ACTIVE), - ("active resources cannot be adjusted")); - - return (rman_adjust_resource(res, start, end)); } static phandle_t @@ -710,9 +739,11 @@ ofw_pcib_fill_ranges(phandle_t node, struct ofw_pci_range *ranges) } static struct rman * -ofw_pcib_get_rman(struct ofw_pci_softc *sc, int type, u_int flags) +ofw_pcib_get_rman(device_t bus, int type, u_int flags) { + struct ofw_pci_softc *sc; + sc = device_get_softc(bus); switch (type) { case SYS_RES_IOPORT: return (&sc->sc_io_rman); From nobody Tue Jan 23 17:46:02 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDyz2Xp0z57mrQ; Tue, 23 Jan 2024 17: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 4TKDyz1KgFz47H8; Tue, 23 Jan 2024 17: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=1706031963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=peuBwv+YX+HYmh4A9NqwRxygmrDZ6PMgiJTpaXN15lM=; b=ED1Cww1j1BWVDGPj8/9Lts/kXMbBU5Kk+Pw1KeIVbtloLb5VSq3YbGTrxhiMwYPp4tC1Gu WL19Gw90vwo89aPpUDytusoBEQBxVyPeDIPQNmwnjDGWq9EEvPIJVYzFwy46/UXek0HqWc EDcFgc6h23lYc7pwT7fq41IL/jrxvae1QU+UwnIyCcSVOnTMj5KYRSPjBjj5+zjKfc6x1+ 7ruSGiUETZQ+/MMBwyJov45ZVHM6gi3xNn7llM3eppBQZy+6t6bTLMvoUG5TUxAS7FbyTb +jexYtV2fl9JmGsDLjtoGqJJTZHG8pPsu0Ta4Oqm2sFmJgNCNZ7oU53f3asfRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=peuBwv+YX+HYmh4A9NqwRxygmrDZ6PMgiJTpaXN15lM=; b=xvCL+/Ndpo17RC3LhzYFPjn3a7pWy3sIvdu7GjEfwB6VWFf0FIS+QhvFlwr9BATrkA+dax 4XOZDRe9kXu1Q+T7xCnLFDGmNB0hi+kHL2rgzUL1vC9WY2wWURQAx258EAY9xrwsENFgcn vviWm/53RZbyKaBSZ+bjKKf4HFblfjHRVq+X+kL6lK+ipN4oQ0d1eGTq2lt8YhjzeXvb/P /gZa5zeEnQxwqYeYmkzzzUuoOkErdi9vCcGiVC+9kUZx0NYQHRA9y7TKBlOMqOCEX3y3ed TJrf37TLMPmR6uCV2rJlaiXz0GBAp/mE9CTlxvjSdS8bmiyul0w6iP7rTrBnnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031963; a=rsa-sha256; cv=none; b=t1gs2tIMoE4f+hyPzfwlkHrlJoRjqxVyxjO/Ves/AnRppD+AXKp5D9YcSBPgXk/Bo8e60s qIkLJqGSwIS7XF5P9wwYwQT7/BSPCvcUmZTqmSDI3XeePr7U92PUIfhZ87ajQXJU+aFHBj yDlF9LqQjaMHLv/+yepuoTxTBeF7vs8ljypbKpgazVO97UF6GBQjMNyI4CgEbSnHvKX40j CiwBsFhfybdJ0mcUREp+B3PlquegsQ5YsBvQUYOJI9LCu9Sbm0gtjrA4a9lYhTLbM7WE1o ZVWhIKaVQDmSE0QXXSC1S8WRzNgzzNDxpizad7gQCrS6NUGE8hZeZn+9B1uGEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDyz0Qr8zg90; Tue, 23 Jan 2024 17: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 40NHk2Yx076097; Tue, 23 Jan 2024 17:46:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHk2KU076094; Tue, 23 Jan 2024 17:46:02 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:46:02 GMT Message-Id: <202401231746.40NHk2KU076094@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: a3d6e0de1c89 - main - powerpc: Fix bus_space_unmap List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3d6e0de1c89c145b40ed80fe54c6bad1abbf416 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a3d6e0de1c89c145b40ed80fe54c6bad1abbf416 commit a3d6e0de1c89c145b40ed80fe54c6bad1abbf416 Author: John Baldwin AuthorDate: 2024-01-23 17:37:53 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:37:53 +0000 powerpc: Fix bus_space_unmap Previously it failed to compile since the macro passed too many arguments to the function. Fix by adding the bus handle to the function and adding an implementation that calls pmap_unmapdev. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D43440 --- sys/powerpc/include/bus.h | 2 +- sys/powerpc/powerpc/bus_machdep.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/powerpc/include/bus.h b/sys/powerpc/include/bus.h index 6e91900c236d..ddb4737d9b76 100644 --- a/sys/powerpc/include/bus.h +++ b/sys/powerpc/include/bus.h @@ -103,7 +103,7 @@ struct bus_space { /* mapping/unmapping */ int (*bs_map)(bus_addr_t, bus_size_t, int, bus_space_handle_t *); - void (*bs_unmap)(bus_size_t); + void (*bs_unmap)(bus_space_handle_t, bus_size_t); int (*bs_subregion)(bus_space_handle_t, bus_size_t, bus_size_t, bus_space_handle_t *); diff --git a/sys/powerpc/powerpc/bus_machdep.c b/sys/powerpc/powerpc/bus_machdep.c index 39096edfc1f7..e908750961d0 100644 --- a/sys/powerpc/powerpc/bus_machdep.c +++ b/sys/powerpc/powerpc/bus_machdep.c @@ -140,8 +140,13 @@ bs_remap_earlyboot(void) } static void -bs_gen_unmap(bus_size_t size __unused) +bs_gen_unmap(bus_space_handle_t bsh, bus_size_t size) { + + if (!pmap_bootstrapped) + return; + + pmap_unmapdev((void *)bsh, size); } static int From nobody Tue Jan 23 17:46:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDz15p9yz57mp8; Tue, 23 Jan 2024 17:46:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKDz13DV9z47QF; Tue, 23 Jan 2024 17:46:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9JvW26eNviNEr+zHlxKa3/aIjLHIh6o5RjwI0QhcWX0=; b=PrW/jptxBRcbQBElce7SwepHOaoL/izTmLZiw2i8VQrOQpD2R6yAl9vB9miwjef4eVil42 lM4bmbPcYvovONZlVNkhl5o5RADFZHIt3MQZsupwBXEDmsQrQ2mOYhVIKgZBs/1hOtqz+d HkPCRdny0A4WxA4aIl1/WmRNNw8nNfu7gk5wFmjEgTvQ/Tp57HQ1kfIcHdIi3NaedtFJ9l upsty7vu3bBn7eBhjGAqHnDZiZduAhu16SsfKWJ1eGBoIJ09yf3dJPMthTvnvFBMNrpkDG 8+clpsq3veukf7WVAzHke3dtcR3WKC5Zq7HexGlqAZ4vrbOKemfLcZtpiGkC5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031965; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9JvW26eNviNEr+zHlxKa3/aIjLHIh6o5RjwI0QhcWX0=; b=smSp9jcwcFOY7VKPHbmtxoVgEWwPw4JktOB1tXPucPrvWpRODKuYFo1wDHL/TqXEiER0iL 7lGYUOAXLVziflfMIToSzdoF2rftZFHTKn4HgbEkvIPWFpB8S2w7b/jhm5VVQuy65WELhR 7V98LFAmLaZhUU5L52kwU1XXwoMRtf6sGkjuDIfGa8KGUvnCYLJ9NpopTY6P49iVhRVef3 lTrLVAMSqPwuqiabq+c68FErBGGEn28ycUbsEb8VXpR0jx3NPQ85H4wFjkrrJrMVeWADkG nJ6YvGPFUpUm+7JgvNMe+r9zOYOgu+M1LvdxI5WnHvYuGsmHZQy1K2EzgTWcmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031965; a=rsa-sha256; cv=none; b=iRlFHaDGlYxOO1GVUKko+i/dhelWd4mCP1R+sUYoFwtMlZBFSjeJtMWPmahI0WTC55Vf7o KNeFCWjqrpFerdVlkb+nwb/UxywIAoj278CuX86C6gh9ZtCbwTLiC/Tm50m8Tao30UptBH qC9HtyNBbzkRd6cVLxPM2KH6Bit+947ZJ21Toai20M03FrqIUYVpNzbtHAMK9O/98vO0mw jNeySa97F3+6WXWTJMTerkN7EXUoPFCLtrA28UAHl34sRX0Bvj5QFpwcV/XPXOiBBRvMbR RKIqiHqs97DqjqVR2S6MqbI0HGY1a78AfTwYR941vmCMWheimGftgesprfVRRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDz12FJtzfpS; Tue, 23 Jan 2024 17:46:05 +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 40NHk5v6076178; Tue, 23 Jan 2024 17:46:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHk5Vn076175; Tue, 23 Jan 2024 17:46:05 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:46:05 GMT Message-Id: <202401231746.40NHk5Vn076175@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 3cf553288b96 - main - simplebus: Consistently map SYS_RES_IOPORT to SYS_RES_MEMORY List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3cf553288b968106e40882bb73b30da652614ba0 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=3cf553288b968106e40882bb73b30da652614ba0 commit 3cf553288b968106e40882bb73b30da652614ba0 Author: John Baldwin AuthorDate: 2024-01-23 17:38:25 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:38:25 +0000 simplebus: Consistently map SYS_RES_IOPORT to SYS_RES_MEMORY Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43442 --- sys/dev/fdt/simplebus.c | 90 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 83 insertions(+), 7 deletions(-) diff --git a/sys/dev/fdt/simplebus.c b/sys/dev/fdt/simplebus.c index 25d6fa51fc51..bf6fceb48a9c 100644 --- a/sys/dev/fdt/simplebus.c +++ b/sys/dev/fdt/simplebus.c @@ -46,6 +46,19 @@ static int simplebus_probe(device_t dev); static struct resource *simplebus_alloc_resource(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); +static int simplebus_adjust_resource(device_t bus, device_t child, + int type, struct resource *r, rman_res_t start, rman_res_t end); +static int simplebus_release_resource(device_t bus, device_t child, + int type, int rid, struct resource *r); +static int simplebus_activate_resource(device_t bus, + device_t child, int type, int rid, struct resource *r); +static int simplebus_deactivate_resource(device_t bus, + device_t child, int type, int rid, struct resource *r); +static int simplebus_map_resource(device_t bus, device_t child, + int type, struct resource *r, struct resource_map_request *args, + struct resource_map *map); +static int simplebus_unmap_resource(device_t bus, device_t child, + int type, struct resource *r, struct resource_map *map); static void simplebus_probe_nomatch(device_t bus, device_t child); static int simplebus_print_child(device_t bus, device_t child); static device_t simplebus_add_child(device_t dev, u_int order, @@ -83,10 +96,12 @@ static device_method_t simplebus_methods[] = { DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_alloc_resource, simplebus_alloc_resource), - DEVMETHOD(bus_release_resource, bus_generic_release_resource), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), + DEVMETHOD(bus_release_resource, simplebus_release_resource), + DEVMETHOD(bus_activate_resource, simplebus_activate_resource), + DEVMETHOD(bus_deactivate_resource, simplebus_deactivate_resource), + DEVMETHOD(bus_adjust_resource, simplebus_adjust_resource), + DEVMETHOD(bus_map_resource, simplebus_map_resource), + DEVMETHOD(bus_unmap_resource, simplebus_unmap_resource), DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), DEVMETHOD(bus_child_pnpinfo, ofw_bus_gen_child_pnpinfo), @@ -432,6 +447,9 @@ simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, sc = device_get_softc(bus); + if (type == SYS_RES_IOPORT) + type = SYS_RES_MEMORY; + /* * Request for the default allocation with a given rid: use resource * list stored in the local device info. @@ -440,9 +458,6 @@ simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, if ((di = device_get_ivars(child)) == NULL) return (NULL); - if (type == SYS_RES_IOPORT) - type = SYS_RES_MEMORY; - rle = resource_list_find(&di->rl, type, *rid); if (rle == NULL) { if (bootverbose) @@ -480,6 +495,67 @@ simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, count, flags)); } +static int +simplebus_adjust_resource(device_t bus, device_t child, int type, + struct resource *r, rman_res_t start, rman_res_t end) +{ + + if (type == SYS_RES_IOPORT) + type = SYS_RES_MEMORY; + return (bus_generic_adjust_resource(bus, child, type, r, start, end)); +} + +static int +simplebus_release_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + + if (type == SYS_RES_IOPORT) + type = SYS_RES_MEMORY; + return (bus_generic_release_resource(bus, child, type, rid, r)); +} + +static int +simplebus_activate_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + + if (type == SYS_RES_IOPORT) + type = SYS_RES_MEMORY; + return (bus_generic_activate_resource(bus, child, type, rid, r)); +} + +static int +simplebus_deactivate_resource(device_t bus, device_t child, int type, int rid, + struct resource *r) +{ + + if (type == SYS_RES_IOPORT) + type = SYS_RES_MEMORY; + return (bus_generic_deactivate_resource(bus, child, type, rid, r)); +} + +static int +simplebus_map_resource(device_t bus, device_t child, int type, + struct resource *r, struct resource_map_request *args, + struct resource_map *map) +{ + + if (type == SYS_RES_IOPORT) + type = SYS_RES_MEMORY; + return (bus_generic_map_resource(bus, child, type, r, args, map)); +} + +static int +simplebus_unmap_resource(device_t bus, device_t child, int type, + struct resource *r, struct resource_map *map) +{ + + if (type == SYS_RES_IOPORT) + type = SYS_RES_MEMORY; + return (bus_generic_unmap_resource(bus, child, type, r, map)); +} + static int simplebus_print_res(struct simplebus_devinfo *di) { From nobody Tue Jan 23 17:46:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKDz25FQFz57mrc; Tue, 23 Jan 2024 17:46: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 4TKDz23hnMz47W6; Tue, 23 Jan 2024 17:46:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kh0nIWwLaWLdlU0CmJi9NHDz5oSnyHiF1Pk6JGDHHPk=; b=D+wCXWWYZCodAvcENQM7tcGg0fowX6sS/sSQqIJRSRO7pjDPdThrL5Bak5A6ZE4K0j++CZ RuKWCQp/5PlsUxFVbcQXt07Q81+dS7tfbQz28r3K/dzqKDjnI6ESZTnH3Bqc5vo9nTfQPf mKFW26TdS/PgQgN99NGiB0B3u6GLRsF5MYt/1oYznVU0tXLpqqCBL1+mThkyQ7B8KQ3tr2 tk/gQnFe+btvFs+a1hW5OC8xO8ou4NeDEOJjrDQka8fqVPESCfr3707NswmI2wNcHKTQDu Qx6NoXUDxQK7EWSzTzHDMIRal8MThoE/i2Z1eeB/dfo5o5S4i9mabS3r4I8EbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706031966; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kh0nIWwLaWLdlU0CmJi9NHDz5oSnyHiF1Pk6JGDHHPk=; b=kVwsqnifITHjasZN0NvPryeXmf0OuCbUyQ41Nmb8zslA16ky2ZjyAqYcvbXXWJb4YbqPUW JvgOHrtVSIBKs2zSQQnnT3J2DkfVprTMSQWSA/fgc33fX5RWcYlJVpeCb0ufKjDVFJtUrf TJOencEn9qSdNQRD2oCRyjoYf+Da7ne+bKdn3Wi4PWueKv8kO9xqs8SwKrtic/W7wZymEy 0SvpHIYFi/6nDc9HjoBPICTGY2SfIf9KLocxa0WZQH9Wj+lB/ci20fjkrbec7Ms+bi7GU0 v83dDAe2EjVKlqpmrwbTlJDScxJ3AR5Ks267EBdubg5cZnS/yzYEg0gPVEmTfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706031966; a=rsa-sha256; cv=none; b=bjFljY0tOQN0MbQly84N9ZHbuWXPQak5Tr1YPP1u1O5H1b1ERX7l/U4XS8C4A/cDewxWHn jSWnD7RJLM1FpIhpkri9aZso19wjcvNgjUNhMc2M8QZqFz/ftAItlh6u6ZSOMiKVsflxs0 ibmmsJw4QFSsL042tsrrGnJcrcNO4zkv9sZwm8kMq+jM9aEsTaMDicO46Oj3Fq+iaPSDdc 6TGKbKaGl6m7jnBpCp5oMLiq5C4vpot6f6DDGGL2eP4U2TaJOY2ynB9PHuzBRnCfeCaKnl btLd60vAYW/iaYfXkLA2ltjg+ErTBSkAYASoaDjLj1QG68rXpSBgdmPWpwgZfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKDz22pyGzgcP; Tue, 23 Jan 2024 17:46: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 40NHk613076226; Tue, 23 Jan 2024 17:46:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NHk6F6076223; Tue, 23 Jan 2024 17:46:06 GMT (envelope-from git) Date: Tue, 23 Jan 2024 17:46:06 GMT Message-Id: <202401231746.40NHk6F6076223@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: a82470212b76 - main - powerpc: Add RF_LITTLEENDIAN resource flag List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a82470212b7659afb7d3287e2ccae72d5e496b71 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a82470212b7659afb7d3287e2ccae72d5e496b71 commit a82470212b7659afb7d3287e2ccae72d5e496b71 Author: John Baldwin AuthorDate: 2024-01-23 17:38:36 +0000 Commit: John Baldwin CommitDate: 2024-01-23 17:38:36 +0000 powerpc: Add RF_LITTLEENDIAN resource flag If this powerpc-specific flag is set on a resource, then the little-endian bus tag is always used when mapping that resource. Make use of this flag in the mpc85xx/fsl_sata driver to avoid setting the SATA BAR's bus tag after bus_alloc_resource. Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D43553 --- sys/powerpc/include/resource.h | 7 +++++++ sys/powerpc/mpc85xx/fsl_sata.c | 3 +-- sys/powerpc/powerpc/nexus.c | 10 ++++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/sys/powerpc/include/resource.h b/sys/powerpc/include/resource.h index 9477572176e0..e7e9493569cc 100644 --- a/sys/powerpc/include/resource.h +++ b/sys/powerpc/include/resource.h @@ -41,4 +41,11 @@ #define SYS_RES_IOPORT 4 /* i/o ports */ #define PCI_RES_BUS 5 /* PCI bus numbers */ +/* + * A powerpc-specific resource flag to request little-endian bus tags + * for a resource. + */ + +#define RF_LITTLEENDIAN RF_SPARE1 + #endif /* !_MACHINE_RESOURCE_H_ */ diff --git a/sys/powerpc/mpc85xx/fsl_sata.c b/sys/powerpc/mpc85xx/fsl_sata.c index 861aaba530e3..74fc40053fdc 100644 --- a/sys/powerpc/mpc85xx/fsl_sata.c +++ b/sys/powerpc/mpc85xx/fsl_sata.c @@ -352,9 +352,8 @@ fsl_sata_attach(device_t dev) } ch->r_mid = 0; if (!(ch->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &ch->r_mid, RF_ACTIVE))) + &ch->r_mid, RF_ACTIVE | RF_LITTLEENDIAN))) return (ENXIO); - rman_set_bustag(ch->r_mem, &bs_le_tag); fsl_sata_dmainit(dev); fsl_sata_slotsalloc(dev); fsl_sata_init(dev); diff --git a/sys/powerpc/powerpc/nexus.c b/sys/powerpc/powerpc/nexus.c index 3c71e1e79e3b..55afadcb4e20 100644 --- a/sys/powerpc/powerpc/nexus.c +++ b/sys/powerpc/powerpc/nexus.c @@ -275,14 +275,20 @@ nexus_map_resource(device_t bus, device_t child, int type, struct resource *r, panic("%s:%d SYS_RES_IOPORT handling not implemented", __func__, __LINE__); /* XXX: untested map->r_bushandle = start; - map->r_bustag = nexus_get_bus_tag(NULL, NULL); + if ((rman_get_flags(r) & RF_LITTLEENDIAN) != 0) + map->r_bustag = &bs_le_tag; + else + map->r_bustag = nexus_get_bus_tag(NULL, NULL); map->r_size = length; map->r_vaddr = NULL; */ break; case SYS_RES_MEMORY: map->r_vaddr = pmap_mapdev_attr(start, length, args.memattr); - map->r_bustag = nexus_get_bus_tag(NULL, NULL); + if ((rman_get_flags(r) & RF_LITTLEENDIAN) != 0) + map->r_bustag = &bs_le_tag; + else + map->r_bustag = nexus_get_bus_tag(NULL, NULL); map->r_size = length; map->r_bushandle = (bus_space_handle_t)map->r_vaddr; break; From nobody Tue Jan 23 18:32:46 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKG1X6CGkz57s9s; Tue, 23 Jan 2024 18:33:20 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from mail.bsd4all.net (mail.bsd4all.net [94.130.200.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail.bsd4all.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKG1W294Dz4L3M; Tue, 23 Jan 2024 18:33:19 +0000 (UTC) (envelope-from herbert@gojira.at) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gojira.at header.s=mail202005 header.b=uBGZKIji; dmarc=none; spf=pass (mx1.freebsd.org: domain of herbert@gojira.at designates 94.130.200.20 as permitted sender) smtp.mailfrom=herbert@gojira.at Date: Tue, 23 Jan 2024 19:32:46 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gojira.at; s=mail202005; t=1706034791; bh=G+SW1+zH+eCVecoAcAA37puPoTSwn3ytg/0PFtvtzU8=; h=Date:Message-ID:From:To:Cc:Subject:MIME-Version:Content-Type; b=uBGZKIji2p24vGAMmijCYUGQonHFpeNtyig6uzd+qja2+R9BnQKbmxjFCyY3YqP1r 5HC5gl2Uo4udLcNbm5Djq1a6AFZqlw2xfutmBBIQ7p1jrpwNsF1hRiMUPnjSizg+3f YH28htHHqcZH0mn/VWmNRi2+4vrLbaqxZKcqJosmDa7jETO4AVg8+fHYVuiaNFprD0 Oycm4phL/sGaa+k8A29jZRkc7CSOc2diL8HcHhM+jTdFeiuwTQePSCBiVAt49fPx+T 9SZyFmnjo2zCQOEhAGYeOpIQjbqgUt+yzpWgSZ/sn58MIkudtjYtMd+TYDJiWtmKkf 2GU7y/Ben4kmg== Message-ID: <87v87jkii9.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: Kristof Provost Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 54c62e3e5d8c - main - pf: work around icmp6 packet-too-big not being sent when binat-ing In-Reply-To: <202401221252.40MCqpf6047526@gitrepo.freebsd.org> References: <202401221252.40MCqpf6047526@gitrepo.freebsd.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/29.2 Mule/6.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_ALLOW(-0.20)[+ip4:94.130.200.20]; R_DKIM_ALLOW(-0.20)[gojira.at:s=mail202005]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:94.130.0.0/16, country:DE]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; DMARC_NA(0.00)[gojira.at]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-main@FreeBSD.org]; DKIM_TRACE(0.00)[gojira.at:+] X-Rspamd-Queue-Id: 4TKG1W294Dz4L3M On Mon, 22 Jan 2024 13:52:51 +0100, Kristof Provost wrote: > > The branch main has been updated by kp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=54c62e3e5d8cd90c5571a1d4c8c5f062d580480e > > commit 54c62e3e5d8cd90c5571a1d4c8c5f062d580480e > Author: Kristof Provost > AuthorDate: 2024-01-17 17:11:27 +0000 > Commit: Kristof Provost > CommitDate: 2024-01-22 11:52:14 +0000 > > pf: work around icmp6 packet-too-big not being sent when binat-ing > > If we're applying NPTv6 we pass a packet with a modified source and/or > destination address to the network stack. > > If that packet then turns out to be larger than the MTU of the sending > interface the stack will attempt to generate an icmp6 packet-too-big > error, but may fail to look up the appropriate source address for that > error message. Even if it does, pf would still have to undo the binat > operation inside the icmp6 packet so the sending host can make sense of > the error. > > We can avoid both problems entirely by having pf also perform the MTU > check (taking the potential refragmentation into account), and > generating the icmp6 error directly in pf. > > See also: https://redmine.pfsense.org/issues/14290 > Sponsored by: Rubicon Communications, LLC ("Netgate") > Differential Revision: https://reviews.freebsd.org/D43499 > --- > sys/net/pfvar.h | 1 + > sys/netpfil/pf/pf.c | 12 ++++++++++++ > sys/netpfil/pf/pf_norm.c | 15 +++++++++++++++ > 3 files changed, 28 insertions(+) Does this change cause problems for others too? - ssh over IPv6 permanently disconnecting (client_loop: send disconnect: Broken pipe) - ssh connections over IPv6 hanging - git pull not working Fssh_ssh_dispatch_run_fatal: Connection to 2604:1380:4091:a001::24ca:1 port 22: Permission denied fatal: Could not read from remote repository. Thanks. -- Herbert From nobody Tue Jan 23 18:40:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKGB03T8Mz57sNN; Tue, 23 Jan 2024 18:40: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 4TKGB02sJBz4Ltn; Tue, 23 Jan 2024 18:40:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706035240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4vfjL2h6ZWluLrKk7tBLv/kOjSjth4/26QYLqCqMUkk=; b=s3FMo8vEJdgI2OrNlAFygmUHsp7vn3SGa1v8Um3CVx4O2H1YLmX0uQ9yElKn+FpE58Iq7t T1KRloZ+3rzR7Np3jziNiF90un02w272DexS+anLEBMeeQUu2k+AHic0Pf6ui8jA/Aj+s8 Pwnr78Wke51AcQHoFyxRhqvyjkG/pJFjnsi4CdtxcL2jJJqM50ml9PTNZrdSYUAkertFhv XDlXjA7x0VZf6qSxlS6cfwaO+Q8s5yFzLO9fWo7BhgdltVY1ByRJHwcJk+fRzma9Lgg6MM nd2/YUQFq6moUZ0r46dAW8jlGs/RgxvXwwN5nHV+//CZRmL0Ei9FJvd+k5uLHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706035240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4vfjL2h6ZWluLrKk7tBLv/kOjSjth4/26QYLqCqMUkk=; b=jqRb4d4EPNFb0hkLwV1W3sYuoAbs/3JcsVZBxCqrEzCJ1cQpWGfaNnKFtUtk3EAHW/MMxb tR9ggadE4WjERH6TG1YZFPt/0FGab3H5PYz3b/koaDpGmIFH1BserJPxVoHUkCBsa8dOPW DLaeQ8IclDM3G5qnbWjKHjKkhR1A19AXSeVq1Oq0Q8hTyVeLcgbLTA3gz80DP0H6XVBBJu qMyVxeCVoyjI0xoQpOBOm7kbs8sXlXkLng/z39/k0Qfkoj6UaRJRiZngqX9mqR9lt5HW5t 79XRaOsgP9P7bk/e2Vcjt0QiQ58QXaw/fFQBD2BUaJC2crWC1QinV7LjbslAhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706035240; a=rsa-sha256; cv=none; b=il5TUDRnBYJO5/1zcjjpN/arkMZXoj9L7Cu6ZHOwFpc8qPoj0F1I5Bfx+Hvd8WBX6zKJzi BOpzwvQd51+wq9jQToBWNOMYZdKQRmn8YiNdlRGj1n8NZcdjC2ExMcOopeQ+rcINXZX7Gy i8bkAXAEs/cCWSqm3u0WREq+WIm6uHC5EJl7wfn1Ef8Jv8dzMdPwNaNpqDhd8gGXuBK5yW vQeNbFZZEDH5xnomEejK8lEW/QHfjwRIoSRowpHkkWYSZMW+Bn7eAzYv2wKu+0LraJ+BMB GuEyx1HGtvJqxqrtZf7I5Nj9MVj5IfyrmnoeAZeFl8gyBq4lqY+FciH8GKTYQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKGB01wj7zj0r; Tue, 23 Jan 2024 18:40: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 40NIeeIH072726; Tue, 23 Jan 2024 18:40:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NIeeGx072723; Tue, 23 Jan 2024 18:40:40 GMT (envelope-from git) Date: Tue, 23 Jan 2024 18:40:40 GMT Message-Id: <202401231840.40NIeeGx072723@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 2acd158d4b0e - main - mtree: stop creating old mixer(8) test directories List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2acd158d4b0ec832d54f69c7b245a688c612685f Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2acd158d4b0ec832d54f69c7b245a688c612685f commit 2acd158d4b0ec832d54f69c7b245a688c612685f Author: Dimitry Andric AuthorDate: 2024-01-23 18:40:01 +0000 Commit: Dimitry Andric CommitDate: 2024-01-23 18:40:12 +0000 mtree: stop creating old mixer(8) test directories The tests themselves were added to ObsoleteFiles.inc in commit f7c4f4964971, but not yet removed from BSD.tests.dist. PR: 274602 Fixes: f7c4f4964971 --- etc/mtree/BSD.tests.dist | 2 -- 1 file changed, 2 deletions(-) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index 8d9335ac711b..660883ed848a 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -1225,8 +1225,6 @@ .. makefs .. - mixer - .. newsyslog .. nmtree From nobody Tue Jan 23 18:42:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKGCp2ZbDz57t3D; Tue, 23 Jan 2024 18:42:14 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKGCp28Yzz4MQn; Tue, 23 Jan 2024 18:42:14 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706035334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XDdneEaffM/ExrqaNv2RfRPKd+oKiEYd4WWFPlgtbQ0=; b=EPLKbzBbugK65nG8NUpomAUmnX+LVhyBvEPZPkigzDS6dQrZUWXdmEHEcnCKuJkr+ckab0 gauzgddrETucygGqsFQ0FH22JQ/H7O7UeWoE6rkUlFVebtWtArtY/95udMnvU0Uw23IiG+ 8cA1p4mtM4shjYzuckjhU6elcf8TaBDDISG5q0Ib5z7Qt4fMmEgeqZ0sduNGwk491pvPpB QdyV8UT20Iuc2yhL3cIjr7fy8b7FAWs7IRBIziGr/XCVthBsdN+LzM4VAiUUGnXDdo2IYU QnfGgCzC69qwntUuVESnk+p8Evw8PccuKgNIky+MiXcogKuZxkkxF1KqNKopEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706035334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XDdneEaffM/ExrqaNv2RfRPKd+oKiEYd4WWFPlgtbQ0=; b=EgneBWOlibvclG069nFFqblpMymj33FCg4Wcs+mMLLj/KWbhLNEyHkxlSHF9YMtErGjy4g jplMRQnmLYHnYiXpUW1QRtndd1LpgeWYoGgxh2OtfORMf1FmC1mClbrVPKcaLO/88XTdyR 1GI2kcxp9eLKa5y9NHSTXykNcEHARugC9MLkiVFJldyFfdaU0ohMN9g17gzJE3ZECC+0xV uJmRgUd/8eO5jbD3KKE0mq9b05nttlNxwF04Qq2BeFS3xDcYJW+BtT/nY6S0CPPTedT26j EAMVJ6pqrSoxzf69xaXrkAF90irMs/it3TeSHpo1TsuvU/bEiZQGeb+ArGr1tA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706035334; a=rsa-sha256; cv=none; b=N+rg3G2JbTxLv4hWp0+vP2jownpdUnNKYmbMkKKHDllmUrwEmXh5C8mAcd7Tt7fWryd7Ur mWurqRPe1W9YhBlcRAYZwj5mjcXalQPRRaPLR2n+c7ttDpR7q3XPxawjjkatsC+NYqknxi KVrlbIf2RoFI5JnrHEMTUaVXRGJ1J2TjrqTry8Lp4OMuF+ufyWLYfYBrP99tLryL51zyiZ yD11y4bygZMBdQSBKFWa8uLQQKehyTb8YacFDlibrUf+TPjVsPWjdoCKvnrFsHDUw0jZTk 0nIfEsrKYeaUe3A/Vtmr7Y9pOvm6dxeYPySRKVQExZWyXnItQ20sGbitkk9ZMw== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TKGCp0V8yz1Q3F; Tue, 23 Jan 2024 18:42:14 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 75F5E1194F; Tue, 23 Jan 2024 19:42:11 +0100 (CET) From: Kristof Provost To: "Herbert J. Skuhra" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 54c62e3e5d8c - main - pf: work around icmp6 packet-too-big not being sent when binat-ing Date: Tue, 23 Jan 2024 19:42:10 +0100 X-Mailer: MailMate (1.14r5937) Message-ID: <1E1C3472-0AF3-457B-A27A-89679770EA62@FreeBSD.org> In-Reply-To: <87v87jkii9.wl-herbert@gojira.at> References: <202401221252.40MCqpf6047526@gitrepo.freebsd.org> <87v87jkii9.wl-herbert@gojira.at> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 23 Jan 2024, at 19:32, Herbert J. Skuhra wrote: > On Mon, 22 Jan 2024 13:52:51 +0100, Kristof Provost wrote: >> >> The branch main has been updated by kp: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=3D54c62e3e5d8cd90c5571a1d= 4c8c5f062d580480e >> >> commit 54c62e3e5d8cd90c5571a1d4c8c5f062d580480e >> Author: Kristof Provost >> AuthorDate: 2024-01-17 17:11:27 +0000 >> Commit: Kristof Provost >> CommitDate: 2024-01-22 11:52:14 +0000 >> >> pf: work around icmp6 packet-too-big not being sent when binat-ing= >> >> If we're applying NPTv6 we pass a packet with a modified source an= d/or >> destination address to the network stack. >> >> If that packet then turns out to be larger than the MTU of the sen= ding >> interface the stack will attempt to generate an icmp6 packet-too-b= ig >> error, but may fail to look up the appropriate source address for = that >> error message. Even if it does, pf would still have to undo the bi= nat >> operation inside the icmp6 packet so the sending host can make sen= se of >> the error. >> >> We can avoid both problems entirely by having pf also perform the = MTU >> check (taking the potential refragmentation into account), and >> generating the icmp6 error directly in pf. >> >> See also: https://redmine.pfsense.org/issues/14290 >> Sponsored by: Rubicon Communications, LLC ("Netgate") >> Differential Revision: https://reviews.freebsd.org/D43499 >> --- >> sys/net/pfvar.h | 1 + >> sys/netpfil/pf/pf.c | 12 ++++++++++++ >> sys/netpfil/pf/pf_norm.c | 15 +++++++++++++++ >> 3 files changed, 28 insertions(+) > > Does this change cause problems for others too? > > - ssh over IPv6 permanently disconnecting > (client_loop: send disconnect: Broken pipe) > - ssh connections over IPv6 hanging > - git pull not working > Fssh_ssh_dispatch_run_fatal: Connection to 2604:1380:4091:a001::24ca:1 = port 22: Permission denied > fatal: Could not read from remote repository. > Can you include your pf.conf and a packet capture demonstrating one of th= ese issues? Best regards, Kristof From nobody Tue Jan 23 18:46:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKGK52Lwfz57tDL; Tue, 23 Jan 2024 18:46:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKGK51wC0z4N4T; Tue, 23 Jan 2024 18:46:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706035609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9N2OwmjHU3Mlqm3uILWzcj2AVycOGsOBLcRAQctbbcg=; b=JIbKE+ZQdleCjBB6lDbUulB+UrESh/Hh/R5pupcgo4NdN0/ju8z1gApKpq0l97p+Ee1UDj vQU1nQa3dmLCNFUjXZDOZm8DajpVRziv7tahJmYmb4L4KwM5dAO1ONMUhq1RsGhvxbEn66 hP83UliLBvDQksELj2k/sJb+1HzCRsOT40GhlP9jvWNhzSVCmwiIsiFQK4lae8lLrQQyvS CxSEdAUJGMHnlXB59n/5UEif62+Xck0dH45LcZ8CbWzMOlhjeHfGqfyAl75CV5rHbqs4RP VKkRUQJ5/WrvwSv+UMjG/YIB08jNTGfT0ecwh/f6cptt8O/xNB7+Q66Eq2Mmbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706035609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9N2OwmjHU3Mlqm3uILWzcj2AVycOGsOBLcRAQctbbcg=; b=P69dBipU7PoA0GX2T5SbQHO50Ydjc06ZWf1IgAsJ/UTLFwVg4fBXUudKX26dMPAWCyH3mu ZS17f39Bco62AvMa+iHK694CCl6+RKNmo1LGXq9GeFbtdmgY7YctQXXjSmSfT08i3RMeBZ aK7sG8dJPG7g0hV3iuUwbMmkbTRY37YudVoWnS8bvtD4gSRhrwvfjKTMT0bczPWxzQso5w g8v3zMpVnI9amGAHkeTJlzzCZ+dzUkg6fcYCRGdra9jZoAXvvGyxmBY8sQ5JjQyb0/cV3O lff5qF45uQk6EvBL4tSIAQuwA+DerKaAJmp+Vo3zNbFr8Fz/qR7lW+gow8NLYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706035609; a=rsa-sha256; cv=none; b=QVeWpdMZhhP4sHGmXRoiwzMRdDgFStpwquF7vEkGAviPzIHuPJhni/vtkhTr8bPS0kYEx7 ea2jHeeXmzRHZTIHgUCysaQVM94Ugrf0PZErPNwEpHMVL/iy0v5X9MidjwEXxxMiC8nJ8U ZN3pSGrxS5bSpLw2GYZytx1QJiQX7P4Wsd/bPPisW1asFi2kCfY4sOKG+wtUssPhBEdvWn L0W51+Ytms/pJj8D7DoZTwcePab7jwrtzmaP41B68CY8kES9knbF1C2I5QgaWvv2+Ja029 fZ2OFKRUC4V3/oXC0t5B5Dq00eOqlioa9ZRVlIxPTkE/ZiG3xq+naH0+ychaFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKGK50yvXzj1h; Tue, 23 Jan 2024 18:46:49 +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 40NIknv6079170; Tue, 23 Jan 2024 18:46:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NIknvw079167; Tue, 23 Jan 2024 18:46:49 GMT (envelope-from git) Date: Tue, 23 Jan 2024 18:46:49 GMT Message-Id: <202401231846.40NIknvw079167@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mike Karels Subject: git: 2e68c5a44c40 - main - tmpfs: increase vfs.tmpfs.memory_percent to 100 as workaround List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: karels X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e68c5a44c40848c43849cc3650331cf82714dfa Auto-Submitted: auto-generated The branch main has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=2e68c5a44c40848c43849cc3650331cf82714dfa commit 2e68c5a44c40848c43849cc3650331cf82714dfa Author: Mike Karels AuthorDate: 2024-01-23 17:23:38 +0000 Commit: Mike Karels CommitDate: 2024-01-23 18:46:31 +0000 tmpfs: increase vfs.tmpfs.memory_percent to 100 as workaround The changes to avoid letting tmpfs use all of memory + swap do not work well with ZFS ARC. The ARC can grow quite large, and will shrink when there is memory pressure, but tmpfs does not allow for that. Pending investigation of the right way to handle this, change the default value of the vfs.tmpfs.memory_percent sysctl to 100 as a workaround. The sysctl can be set to 95 to get back to the previous default. --- sys/fs/tmpfs/tmpfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/fs/tmpfs/tmpfs.h b/sys/fs/tmpfs/tmpfs.h index 5c86a386b9da..c28f3a02a7bf 100644 --- a/sys/fs/tmpfs/tmpfs.h +++ b/sys/fs/tmpfs/tmpfs.h @@ -548,7 +548,7 @@ tmpfs_update(struct vnode *vp) * without a size limit. */ #if !defined(TMPFS_MEM_PERCENT) -#define TMPFS_MEM_PERCENT 95 +#define TMPFS_MEM_PERCENT 100 #endif /* From nobody Tue Jan 23 19:11:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKGs655Pnz57w3p; Tue, 23 Jan 2024 19:11:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKGs64SPsz4QFX; Tue, 23 Jan 2024 19:11:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706037066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FFGnkOqIcxxuXLo5ZtzsNP2CBsexbd4RpQeFJheuTK0=; b=bB6V0Ao3y1MXiN0lNCILI2UcnO3tVSbGP+8VH7fdsfcr7tXVCeH2JWDmvta5I7MUzjmwR4 6UJIRiRnBlavb3ndNWD/IT2YDG6DgiX/afznLJvgoVan7NRf973ZrzjZM2HPhvVQESEhMB jJrT7fUU1ilm1lMAO7yl2NGPeMp4fMtNfbnA7y8+iTswQefJadJZQo3vr2Vxc/o3X0XEhR EyFrJwXRDBKzIye8azamGL165NM2TwSmjVsCnSN8TPNTB7Ovwmv1kQF2321A3FspwQTnx8 NY/bq39pse8FuJCc5/H0Mph1YmVd638S8A5irrGpshaXyHy39L8xAQkmjuyxgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706037066; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FFGnkOqIcxxuXLo5ZtzsNP2CBsexbd4RpQeFJheuTK0=; b=Y8b9EkkthddlhLoEOmRVp8yMXiAoNFCWWy79MdWA85EF6owCIlbAF1X/JBqHOmaOpKDNYW jzRtzygD1Jn95q+dCj2yOcNZF5OFNXkUu0+jqSJ7oHoiERKn2AC7AypjnndDiGTD7RQ7mv lEl1q4LIRPP30iEtnlR1kYVqvWgYrrgypClmQV/+GNEQD5Lp5xfa2ZhQAIaF1hSKN/ny4W UicNqMQTmkZ4iaD5bAoeVwOXSxHzz/u7bcMpxBBsfJO98ywDPMJ/sU1M7poCmh2nlORanS izMlzqCkoxMhciYqLdZc8dTv7Q6xzNz9Ie6hAiCD2B74qbMpXOxFZLx//dBo6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706037066; a=rsa-sha256; cv=none; b=p5RcCjMSnp4LuZlUN/ZtNTOceXsPVID4mnzlMVWPGd1Ypyjeuf6YL9XJyMQpx0pMARQ9W4 PUps0fITyT2C7D0171d/AYu0fjZpFrgHYuFDoSZ9AaGZxjbm84Gzsp0iJt/wfdlebOhxku P96t61+IMRYeZxVWxPctlC0BlevQADrQJuKI6Ut3tG0RYqZEdi+hn3YG8mak4VSAXheK2J djqtTUIOg6T5cR5F4RApK2asTD7cybLlDAv6v4GHBZAxkuSjZELODjGv9S6GTqeF4KZmB6 U56e6g2UmWumVhjVfhIpGYDG++DQoHVkYZaxFKTWahYB+X/qh0TCSsCkEc+Zfg== Received: from [IPV6:2601:644:9381:f410:f853:1fbd:e52f:2b03] (unknown [IPv6:2601:644:9381:f410:f853:1fbd:e52f:2b03]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TKGs60Xghz1RMX; Tue, 23 Jan 2024 19:11:05 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <8e2f70e3-c2b3-4105-90b4-660f0cc1f0f3@FreeBSD.org> Date: Tue, 23 Jan 2024 11:11:04 -0800 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 2acd158d4b0e - main - mtree: stop creating old mixer(8) test directories Content-Language: en-US To: Dimitry Andric , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202401231840.40NIeeGx072723@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202401231840.40NIeeGx072723@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 1/23/24 10:40 AM, Dimitry Andric wrote: > The branch main has been updated by dim: > > URL: https://cgit.FreeBSD.org/src/commit/?id=2acd158d4b0ec832d54f69c7b245a688c612685f > > commit 2acd158d4b0ec832d54f69c7b245a688c612685f > Author: Dimitry Andric > AuthorDate: 2024-01-23 18:40:01 +0000 > Commit: Dimitry Andric > CommitDate: 2024-01-23 18:40:12 +0000 > > mtree: stop creating old mixer(8) test directories > > The tests themselves were added to ObsoleteFiles.inc in commit > f7c4f4964971, but not yet removed from BSD.tests.dist. > > PR: 274602 > Fixes: f7c4f4964971 Sigh, I had removed these once already: commit 7aa3bf6952b2c7d1b02d3a67e7f51b96fcf52b50 Author: John Baldwin Date: Thu Nov 23 12:17:41 2023 -0800 etc/mtree: Remove entry for /usr/tests/usr.sbin/mixer These were removed when the new mixer(3) library was imported, and I missed updating the mtree file when I added the entries to ObsoleteFiles.inc. Fixes: 903873ce1560 Implement and use new mixer(3) library for FreeBSD. It was readded accidentally in a later change: commit b8856bd2d6acb10af236b7b8cd0cf3121da8c994 Author: Jose Luis Duran Date: Wed Dec 27 22:26:23 2023 -0700 mtree: Add missing directories to BSD.tests.dist Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/912 (In particular, emaste@ noticed they were getting recreated during 14.0 testing and ensured the first fixup commit made it into releng/14.0) -- John Baldwin From nobody Tue Jan 23 21:00:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKKGq1x7vz587dH; Tue, 23 Jan 2024 21:00: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 4TKKGq1PYQz4gQd; Tue, 23 Jan 2024 21:00:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706043603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3WaJPeEjjWyqL+BkvgrC+2jTAjAoP/PmFmGQpv/EFE0=; b=JF6i0p/CMDCjKJohSsaRFWy8L2uukCKDfiB/tzgQQ//ZLBIQUl6smAE06RlC1v1OEOAaHv sTs7QDhfMn0eXkJcX6fie0aMg0UHMXRjciODZZeiGlPBgD/POt473ywyQ6o/WrT+V4MOGk ollKbmpYc/nMdl84zEU8miVeQOwrfZlqvnvfjXpob+YswURbaNJiHh3D8vNNN80xDFgaAp 6TqsGHzqatCpMMZ28iaRK2luHg6smHAVD7dAAR+y3NXidA823GZBoHbbvJRGsfJKXtTOsR mY6koCC2EIbL+ooty0lU1fevTtCaEhD2Ga1Hr15Qu3kb5m7z8ljRGIvOTY1dkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706043603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3WaJPeEjjWyqL+BkvgrC+2jTAjAoP/PmFmGQpv/EFE0=; b=AdDeFrP1XWvDRwZYNvOewKShnq6sAiLNYtq4zwAVv+xl6pPu95ILtqcB7fizAWcQXup8ri AE+AnrNR/we7EsWQXITcnNPRLwwt5ocFWZoEdctjqsHK4tADrn9WcJumGMJLF4TfHc/xgb Yb55b5NiufjvjX1GTc9w4jwmejjT757YJePvVrf/mttiyQoFj7iCiCmQS/t4YfHU+Ui0pb 7o00bNUXff0d8Z0gwWSPuDjgnk0786jwXd/JyktHNnbT4Zfah6FT2gATmZxZ7q6ukuSV64 ppNlAknZWoBsb8ALP6vUcvGECZcNwOcTlcnfzkjfpgdqeAWWSf0eWFJ/gTtOMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706043603; a=rsa-sha256; cv=none; b=sm+O4sB/hV5VQCpDwqgfk5ngzvcm2uOrR/iRUS/bqecrcLxRef0bz0ZiEqw1C9OOeqVO3r UxIl5Jb2j2FVl0KOGbXARJKazjA8zPlOpqbWIL+Frnmj1hdCUDn/PDBGnubXmD0g4FGOeK /b7WVT8rEc9BtxZWEb9XaLY5u/G1u0GDzdskPJdUhuyW5XMA2lMCq2R+LUwM4LHqyajmhT jqoqv+QRYQY3ifiwPgbTR2E1WVxQNqBd3vLgH+ISl24H+tBQ/5YnJZikhxGyWbPXWhUUlo eOmcJqIzMyOeSlZ+zRlmZkKdA8gCil2i+U97VUoi6s6ZJyoX5+4raDVQaHWnaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKKGq0SGnzmPq; Tue, 23 Jan 2024 21:00: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 40NL03PJ003684; Tue, 23 Jan 2024 21:00:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NL03fr003677; Tue, 23 Jan 2024 21:00:03 GMT (envelope-from git) Date: Tue, 23 Jan 2024 21:00:03 GMT Message-Id: <202401232100.40NL03fr003677@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: e21c668719a6 - main - tcp: pass positive errno to tcp_drop() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e21c668719a65e119fe916f6bd22a05f33f6e315 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=e21c668719a65e119fe916f6bd22a05f33f6e315 commit e21c668719a65e119fe916f6bd22a05f33f6e315 Author: Gleb Smirnoff AuthorDate: 2024-01-23 20:52:55 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-23 20:59:21 +0000 tcp: pass positive errno to tcp_drop() Fixes: 446ccdd08e2a9f704f6348cd7f679e59183b99b3 --- sys/netinet/tcp_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 125e28134c01..f0eb3bad33cf 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -299,7 +299,7 @@ tcp_output_locked(struct tcpcb *tp) KASSERT(tp->t_fb->tfb_flags & TCP_FUNC_OUTPUT_CANDROP, ("TCP stack %s requested tcp_drop(%p)", tp->t_fb->tfb_tcp_block_name, tp)); - tp = tcp_drop(tp, rv); + tp = tcp_drop(tp, -rv); } return (tp != NULL); From nobody Tue Jan 23 21:00:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKKGr2vLPz587dJ; Tue, 23 Jan 2024 21:00: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 4TKKGr1wD8z4gfC; Tue, 23 Jan 2024 21:00:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706043604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gl/pWXeRz+AsAslKraH9Lj+fyeJN7H7Sk9C+0S0ZB4c=; b=MOUdpFbufDGSgJ29m20zuxUNO0JpLw+FMaX7gjMVcPpBuY+gGw8hzydQBLBiwmvLpWnqB/ aJGwFS2dYTB7C/zvZjgmmtL0hZx3WJBLqxUpCRv2d60+C9MPPt7ixQOk9C2obHBBPqRd+Y aLHVj4woHA0yoIU7IQG8K5DhMX7soFeTpT9wZjRchC8zFZaTT3zoS03RfLOpVimuc8kx8y Jl+rtym+euis+Cl1TkP5yXQeTSOJFJRhSRtcTmaEn4Jnu8fP88aEoDBl5KRJlGaLDtjxGc yqkOj1q7ILGa4x5Bsn9g+IUq9OMFWmjDdQ179afXGIn0vmJG1r4hqw4Awf0soQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706043604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gl/pWXeRz+AsAslKraH9Lj+fyeJN7H7Sk9C+0S0ZB4c=; b=LVz9pnE00N7QGxp1mPa9hFvHFzCXuvStC++ncc9FMZtQ6EYGyun/pPzKIeO0byppLbT9eP Km+p/E4bwRRxVeB2FuoZcEHs/7HykVxuHZg24m2PevXMBWiCr4KjiuJsar7/5f+wZzHSvu 5IeEk0KW+C0mBlz4jSTp66Li/LQXsWOHdcKHhZn76I9R35tnTwPoqeP7fMuWmDrn4AAww/ OwafUAK8Y1HtaGRBMxlrdmYiHSKWeJ763K9rcW5qU389WapJORNE/JgOaf2RS3ag+jD3ML iPG9tBiUVKIoBqtRK9if1pOwCkKAimX/LsYy9lEIDNe9ITKspWEQgXwxs/3fAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706043604; a=rsa-sha256; cv=none; b=V5/Ho5AdBS8WhqJxDn/u5Ge7bLjUPC8qR60lx0dKOhpgarfc9uJ7jc9RBdcWW+i3QNCuW+ RyJydOKwK+SEMoDXUYmFQZfMbSkS7bXRlEEK1q58o/9zb7NUJLLiKtWRNqBe2Aeo9PCoz6 bGxUKGHmKk8w4vxKWNOo874nFBaaft4RK2mwHWjkHk2eBBgq5jynkyR8L7e63Kb6BmsToD P3wY17XTZ3kzXAPo61HQQdd032mamDTqAvP4tykOXbc28A5W2KSaaO2F8mIXmlQBeeOLq0 HXoURxVRmGQ69AJrNNmtY/tn0kMUAVmlTfAtaMCVy9evnhJ8OxVo2RtU16sOeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKKGr0zhNzmWk; Tue, 23 Jan 2024 21:00: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 40NL04Zq004108; Tue, 23 Jan 2024 21:00:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NL04BL004104; Tue, 23 Jan 2024 21:00:04 GMT (envelope-from git) Date: Tue, 23 Jan 2024 21:00:04 GMT Message-Id: <202401232100.40NL04BL004104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: c809435b18a9 - main - tcp: clear outdated comment mentioning T/TCP List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c809435b18a97b7166f1486848a635caaacf892d Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=c809435b18a97b7166f1486848a635caaacf892d commit c809435b18a97b7166f1486848a635caaacf892d Author: Gleb Smirnoff AuthorDate: 2024-01-23 20:54:43 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-23 20:59:21 +0000 tcp: clear outdated comment mentioning T/TCP --- sys/netinet/tcp_output.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 1ff6f5bee39a..43ea6d4b453c 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -651,8 +651,7 @@ after_sack_rexmit: * Don't send an independent window update if a delayed * ACK is pending (it will get piggy-backed on it) or the * remote side already has done a half-close and won't send - * more data. Skip this if the connection is in T/TCP - * half-open state. + * more data. */ if (recwin > 0 && !(tp->t_flags & TF_NEEDSYN) && !(tp->t_flags & TF_DELACK) && From nobody Tue Jan 23 21:17:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKKfb32Cqz589FW; Tue, 23 Jan 2024 21:17:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKKfb2Vw8z4jDs; Tue, 23 Jan 2024 21:17:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706044631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GRSvcBcB4JQ+7B5whgomumyiCmSBZbuFmtic13Fgo/o=; b=SmylYIBrWIJ8m105xamJoFoo2loZnEL4Dw/gr14wQSJBd6tBPHMsJ3/KAXaytxujEoGem8 T7/JVxPfVYun4ST/moqqsi+samQtCPrd4t0YSpTFz3jU9y9uIXyVRe1Ifl9lvfL/sco1c+ LtrsCTAhoAu3d+MN7LL3dy1oODa8wWwJsgPwIZYHgLfvFGBSYNs3d6XDMIw9f/GaYtDL1g 6HLvnlr3pjCKZ5YOrfQ+AC7/hWbvdRuAeh1vFZ1xkJ4tvcT94fV54Wu9vZK0t+2QLgNuoD oBT16mEMb7M+m8W+o7GYW0vTy6C6TrlzVj50y3FYdTB/OqFK2Xdf2RBvZI9sHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706044631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GRSvcBcB4JQ+7B5whgomumyiCmSBZbuFmtic13Fgo/o=; b=oP5692cqfOwoTQhPtk2L/yhlUWGSm5V15YTLIbGJ1jcfxj2rtUJlUsWG+AL9dHyh2/3slc OfHvw1li+mYguMsIt93R5gYAvqURVq0bczhIA0VPEuxwy9HR7eZq3B28U+Uu1Xh0VhM29p Xq0PrJRJa11UDaIQ84cDDGc6cL7pjrq7MkZjcevYtx/mDefqLozwmralw3VSra8gCzhoI1 7YFl7/jzrqqpnc3iiKJDY9LGUBzw+v75ncFpzvIjfbydlAr1EhlCQNGKf38Ole6YSDGUNz DWUKlg3CGTVwwqPeJZFonU9dpRzp48+6d4syfUuv/dFfJ5yH6Jy/AJC/AzeSig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706044631; a=rsa-sha256; cv=none; b=GPBpTqLAH83eEgM6uQO5jw2F+OcrfdUBjgJAc/MTSQuvg3kEYE0fJSt0bWy1KRxULKoV6+ eLTrwI64BgnJZ9mgRix0Zw5vrlt9Qet+aVy8orVi8lz3C8rCcXJ82ywwbMvQgEfKBdLSkE MPJZ7y/RMunslmcqJ87zmA/LvOhXSBb+5JatN8ZkiDJQ7HgnanxFvgP5PGUTbTH9B0fTig 666FysszTFCHiioo/ni+0PD9KG5Np+zRFuqko7B/vGnDaOZVU201bu+NhtgvH9L7/3XsZK 1VvXAnCoWMGcN+e9+ZUlRALds4Imqtgqk46sDUx6NILzQHjex7zJyeDBubKYJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKKfb1Z2vzmqy; Tue, 23 Jan 2024 21:17: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 40NLHBlK033902; Tue, 23 Jan 2024 21:17:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40NLHBM3033899; Tue, 23 Jan 2024 21:17:11 GMT (envelope-from git) Date: Tue, 23 Jan 2024 21:17:11 GMT Message-Id: <202401232117.40NLHBM3033899@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 90ad2dc28747 - main - tcp: remove 20+ year old disabled code from d912c694ee00 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90ad2dc28747a3a5036d68ccc87d2352459f5cb1 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=90ad2dc28747a3a5036d68ccc87d2352459f5cb1 commit 90ad2dc28747a3a5036d68ccc87d2352459f5cb1 Author: Gleb Smirnoff AuthorDate: 2024-01-23 21:16:34 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-23 21:16:34 +0000 tcp: remove 20+ year old disabled code from d912c694ee00 --- sys/netinet/tcp_output.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 43ea6d4b453c..71a50d54d5ee 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1719,16 +1719,6 @@ timer: tp->t_flags &= ~(TF_ACKNOW | TF_DELACK); if (tcp_timer_active(tp, TT_DELACK)) tcp_timer_activate(tp, TT_DELACK, 0); -#if 0 - /* - * This completely breaks TCP if newreno is turned on. What happens - * is that if delayed-acks are turned on on the receiver, this code - * on the transmitter effectively destroys the TCP window, forcing - * it to four packets (1.5Kx4 = 6K window). - */ - if (sendalot && --maxburst) - goto again; -#endif if (sendalot) goto again; return (0); From nobody Wed Jan 24 05:01:01 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKWxp1gy5z57S6Z; Wed, 24 Jan 2024 05:01: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 4TKWxp1BMDz4YD2; Wed, 24 Jan 2024 05:01:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706072462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hE2/9ppCWqVhaQJLTs6snL19Ku+/Kr2MOSOZPtAk/Ps=; b=R7egcurSZvpRPjWP5xQaKV1TqDFUF+Qk0JRzn6AUN/PmXgJ5XpmzcvuXyZ36sCfnm68N6i ELXU24KR5jLBKSI4/A+5YI6zQoq1QfqzfD7qfIvE2BiE0TKaBQFOg4iFki5g1tDl18ujL6 CvE+r70K0e+j0O64TxSMEBqGwFXECZtio2IoQcm8g1eX3GI1gqcjAy3nCSjdQlYjtQTsyT SQJjWZPASN0l/0iTVFi2+6PKaTOV0JvlwwAoI0HcU9omLFkbtXqWuPvB2yw9GMFesnIgac K2RxOayMbJv9tTP7l9+6cwDbcTAdlCZ2CFGzgyLgRNioAVTGtaisOmkLLKYP1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706072462; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hE2/9ppCWqVhaQJLTs6snL19Ku+/Kr2MOSOZPtAk/Ps=; b=w2BQ6SNVYT7KX5aTXl+h8SWlZOIIE9093LtJsAOvAsdBVeW7ZuT/kWPUfu8s9ArjcHD1NQ ghsJzyQrYE+ZMsWWairwu/5wciATF75CvbciJ9gCCbut1D2ZYIgWPazE2BZoVu5JaYrw37 x8jO+ec6o1yQWxe5eNXeEfMIH/g7LB81r6VYUAPsCJ3sXNKY3xcYfkn5KuwL808fLQ5l4d khD8FmehFqth6w/qDKfM9lfPO18EyftEcpnQM6/8RtNLVBo+Fj2tJIXGvE3aDdtaX6bEYy 5s//ooBSPhbO+DPoC1edg+CiMPMOsS1q2aVd2r5JLzW4bfzDKkmNFvUNbdxIjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706072462; a=rsa-sha256; cv=none; b=gcsf43gisg78m3Cn5QKTjBCWda9s8qIMyQlGP/ylZcdgqu5lL+47SQ0me5RNWe531JQucF LdKDobTeKZfxlKX9/0/oL2OFsJ9DLfC5dVkvPl74EKrGQMmhPiy+h2w6216R4nN5KJphot 6hYrrpli4C5ka99doOjGUQaM2OMqWIwwdq5+08nfUmj3GgyV2Iq9ACl3/cruPb3SSQVMoQ sZdjzG5epxdqFYT/x66pFJezvtcQvcRPOF0wtCErGpmfHOqjQOsSQVl1c+gu9uv1pi4zo4 SBnEa4m21nPrV3+eyYyreXF4XhLhEfDeMiQScCC4vDqhf86MzplxITJMKADghw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKWxp0FTsz115G; Wed, 24 Jan 2024 05:01: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 40O511SP018800; Wed, 24 Jan 2024 05:01:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O511ik018797; Wed, 24 Jan 2024 05:01:01 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:01:01 GMT Message-Id: <202401240501.40O511ik018797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 009db0d40c6a - main - ncurses: serialize the tinfo build a little bit List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 009db0d40c6acffe0b9d835cb15a75cc3361173b Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=009db0d40c6acffe0b9d835cb15a75cc3361173b commit 009db0d40c6acffe0b9d835cb15a75cc3361173b Author: Kyle Evans AuthorDate: 2024-01-24 05:00:36 +0000 Commit: Kyle Evans CommitDate: 2024-01-24 05:00:36 +0000 ncurses: serialize the tinfo build a little bit Move ncurses_dll.h to GENHDRS to start with; it's been generated from ncurses_dll.h.in for years, so it's not actually in a different category than all of the other GENHDRS. Slap an .ORDER on it to ensure that we build ncurses_dll.h and curses.h before any *.c gets compiled. This should sufficiently address a build race seen downstream where ncurses_dll.h is present but not yet populated. Reviewed by: bapt Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D43540 --- lib/ncurses/tinfo/Makefile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/ncurses/tinfo/Makefile b/lib/ncurses/tinfo/Makefile index c1ea75d3aacd..a0b191f50785 100644 --- a/lib/ncurses/tinfo/Makefile +++ b/lib/ncurses/tinfo/Makefile @@ -74,6 +74,7 @@ GENHDRS= \ hashsize.h \ init_keytry.h \ ncurses_def.h \ + ncurses_dll.h \ nomacros.h \ parametrized.h \ term.h \ @@ -170,9 +171,8 @@ CWARNFLAGS.comp_parse.c= ${NO_WUNUSED_BUT_SET_VARIABLE} CWARNFLAGS.read_entry.c= ${NO_WUNUSED_BUT_SET_VARIABLE} # Installed -HEADERS= curses.h term.h termcap.h unctrl.h -SRCHDRS= ncurses_dll.h -CLEANFILES+= ncurses_dll.h +HEADERS= curses.h ncurses_dll.h term.h termcap.h unctrl.h +SRCHDRS= INCS= ${HEADERS} ${SRCHDRS} INCSLINKS= curses.h ${INCLUDEDIR}/ncurses.h @@ -214,6 +214,14 @@ FILESGROUPS= DOCS # Generated source .ORDER: names.c codes.c +# Serialize the build just a little bit; there's nothing stopping the build from +# proceeding before ncurses_dll.h and curses.h are actually generated on a clean +# build since we have no dependency information to prevent it. +.ORDER: ncurses_dll.h curses.h +.for f in ${SRCS:M*.c} +.ORDER: curses.h ${f} +.endfor + names.c: MKnames.awk ${AWK} -f ${NCURSES_DIR}/ncurses/tinfo/MKnames.awk bigstrings=${USE_BIG_STRINGS} ${NCURSES_DIR}/include/Caps > names.c From nobody Wed Jan 24 05:12:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKXBj5y1kz57Ssn; Wed, 24 Jan 2024 05:12: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 4TKXBj539Nz4ZSC; Wed, 24 Jan 2024 05:12:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qb/yvHtRCsQqRFWQie43VoTLYiE4CZIlbFx0ttgzWVs=; b=u0a8fFRK5zAhKQz+4TFQ7wBTsDltnU0uceQa485w0Wr9RXEjmJwQjmYoIJ76kF4rM7XT+h +X9cHwP0ptA3y/aRG4Fw4O0w23on2mkM8RAIDgXoSDUYOMVjKy9pTuBk8kNd3hEqcBXlR8 iNrdF64eOAJtts6Sh20e1xWAN/BQOeYWa9oqtb5QsTw1zQzX8pOdacVleN7olpOdgHc50K wzQCSjhR3+BrwL03sArr3tBSXl6fzeMGAj4E6T6ETQeBbrR7s6kIFYhhKwXyZgX8SRP/Pt sUeuALqguDXH0AaOOQhp99FvhdrV/jtg0a8n8UIDZdw81qPdrvin9Q7pGsMLhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qb/yvHtRCsQqRFWQie43VoTLYiE4CZIlbFx0ttgzWVs=; b=fD4xx6BeuzhqPLQO4sYsJEFskwV6YbwuT+Y/LF+Wk1cvuQeB+V9Dy0LF8bP2DWgumR4n3q rbJXCZGPYb4ykibNiyBJEy1dF7FBomY2gZrbVV9ja8Pck8EgkSyVJGAozu3s8OY2NxybVi YUg2p80iHEwn9Ecr0infsvexy/3iLWrC0ja1qIKgQu/EvBrSGO0cmousiOUJi2aIt0dIUj wdyLeKxqFVEaYNk1vUYpY6dUBzHKPLLhiMqpO8DKcOIOXaRmZAnjiTQ9Zfb9EzHfOZLFNp u7igE66yN4tzEAMQ8v1I208x8x7pBbX9tW57LrQkAwIIodmi6oMvukbhtqbQdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706073133; a=rsa-sha256; cv=none; b=cCegJeXUShVoUcoS9MUGgH6gYw23oKhe01o8jIjM3ZLMcvRueu7TAb/2C3Z3sMbQ4m1HO/ qnJOg6n0YxdDWYEA/oFUNBA4scRVp7b2404uITKSlLqbc7HyuoJ/mJOs9Cr8ztWOjnp1V6 LCxmagOIGcSftnsefsGUmiwhFQYoorPGnbu+j5bVimIRlz7vMZ9knxM4D6eACIw2B26Sy6 fky+OkYSrtvCNEtg6xH7lfP9PbYcYUk2bS5amlEOvRVdscISiPSCGsB79rDrIc8rMMGLef sSOnZzULBAEKO0eU65yWcurQBuKVRkY6RDlvRrYq5FBfG/EHT+wTghqYlgwH9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKXBj46Pmz11Sd; Wed, 24 Jan 2024 05:12: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 40O5CDkD039943; Wed, 24 Jan 2024 05:12:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O5CDqo039940; Wed, 24 Jan 2024 05:12:13 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:12:13 GMT Message-Id: <202401240512.40O5CDqo039940@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 24fee9771e0b - main - sys/file.h: style List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 24fee9771e0b1e2f4836b9bb1688cbe8104b403a Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=24fee9771e0b1e2f4836b9bb1688cbe8104b403a commit 24fee9771e0b1e2f4836b9bb1688cbe8104b403a Author: Konstantin Belousov AuthorDate: 2024-01-20 21:49:11 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-24 05:11:25 +0000 sys/file.h: style Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43518 --- sys/sys/file.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/sys/file.h b/sys/sys/file.h index cfa0fc75443f..0bdf7e9baa7b 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -479,8 +479,9 @@ fo_fallocate(struct file *fp, off_t offset, off_t len, struct thread *td) return ((*fp->f_ops->fo_fallocate)(fp, offset, len, td)); } -static __inline int fo_fspacectl(struct file *fp, int cmd, off_t *offset, - off_t *length, int flags, struct ucred *active_cred, struct thread *td) +static __inline int +fo_fspacectl(struct file *fp, int cmd, off_t *offset, off_t *length, + int flags, struct ucred *active_cred, struct thread *td) { if (fp->f_ops->fo_fspacectl == NULL) @@ -489,7 +490,6 @@ static __inline int fo_fspacectl(struct file *fp, int cmd, off_t *offset, active_cred, td)); } - #endif /* _KERNEL */ #endif /* !SYS_FILE_H */ From nobody Wed Jan 24 05:12:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKXBk6cKsz57Sm9; Wed, 24 Jan 2024 05:12: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 4TKXBk61Bpz4ZHt; Wed, 24 Jan 2024 05:12:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D0qppDWaKW06TDqESf1BU5xo5kbEndJbe6WU7ltSCas=; b=N3inqXMZ48ndCkLLFT3nbKcXVxus00uL4fApFy04uKD9qer1TyctOTQRQRjJ4hubQg/Zah YltsysmQCWwFfaDTq2yk+KG/FAdgqynsYmG5y3+DGy89HUX2mEPeJa4JkqZ60OVP8npN2X 3eYwXi6Sr8z4h/FMO/G8MVK1YWI+lZxuyWOmwzFDTcPxSztnQdhAEQqzQgV7HZ49OHQmCB 8ZVu0m5xZ2W8xGoWrrgxmbqdKIuuQAD+c35vILJkTuk8TP+KVwPnKgRuLBe+CsAfGcoiV3 flNDJCzgjedBoHDg673nEwYEq+o3vXsAQ4FCtUclL+KAw9vD13+iAN9g3RxHFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D0qppDWaKW06TDqESf1BU5xo5kbEndJbe6WU7ltSCas=; b=fmum5z6BO+UHwkNmaOQtVVDG0qjlV2cqmclYGoQ1oVABxd6N4cOTSwJ6ZrwBcWBclvNb/Q uWlhtiVoDrvOI7Yk5wJCpXn7YtPjV65T9CH184Y5pKSvJFkijGj6ce4WvvTpAc1+QqLTO5 vdj/vpZZ0OiZVddz+2MZK9DzaLykEQkCifojeuqlP/948AI12q/sbTewJBwuCqC03qwE8t I5PIDP4WprnuHAB0vXPMhXqKvhbhAfUoiNJ1IJ+Vq5YgUATa+MKhM0A2+yEcbzH/1I9Sfd etBIzn11FzHQ4uvzgM6htjSNmm4GJwfnJ7k8rXufqr4nwIYDPaXstk5p3AwLvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706073134; a=rsa-sha256; cv=none; b=LfuHKWPz/SMiItdV7RrnLWNEpNZ3MJg+ZYxEHKrHcJHg0/370j3FcEgdugON0vWsBsHUHm Ix8demD81TpUnYx5/ziMY/UPCYoRNYHW8nZUXeXCub1S/DQxSjHfPnTVlWFjiMoEeOXxr3 TqggtJ3u5JwkSQjjagX53DTZt+UwmusSkq4DXzzfked82jYlsDyrFvc5jZVYR52nmj9pgD CwuCfMnwILIlzKpdh7w/xnNeBnkevtwMTFmKOhTRlX115VwTiSXXq1a83mxorsM7/Cd8Hp vKC3LQq4J2X/yw9lAIyEfAAXaygLdH4p28loFv1DYGnwWZ6E6gML0bcfsytP7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKXBk54Znz11Sf; Wed, 24 Jan 2024 05:12: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 40O5CEJS039976; Wed, 24 Jan 2024 05:12:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O5CEo1039973; Wed, 24 Jan 2024 05:12:14 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:12:14 GMT Message-Id: <202401240512.40O5CEo1039973@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 58d317169834 - main - Add fget_remote() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 58d3171698341c664d7c676541b86385a924ae93 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=58d3171698341c664d7c676541b86385a924ae93 commit 58d3171698341c664d7c676541b86385a924ae93 Author: Konstantin Belousov AuthorDate: 2024-01-22 22:31:55 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-24 05:11:26 +0000 Add fget_remote() The function holds and returns struct file for a file descriptor index in the given process. Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43518 --- sys/kern/kern_descrip.c | 32 ++++++++++++++++++++++++++++++++ sys/sys/file.h | 1 + 2 files changed, 33 insertions(+) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index a0130842aacb..e8e08f57196b 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -2960,6 +2960,38 @@ fget_cap(struct thread *td, int fd, cap_rights_t *needrightsp, } #endif +int +fget_remote(struct thread *td, struct proc *p, int fd, struct file **fpp) +{ + struct filedesc *fdp; + struct file *fp; + int error; + + if (p == td->td_proc) /* curproc */ + return (fget_unlocked(td, fd, &cap_no_rights, fpp)); + + PROC_LOCK(p); + fdp = fdhold(p); + PROC_UNLOCK(p); + if (fdp == NULL) + return (ENOENT); + FILEDESC_SLOCK(fdp); + if (refcount_load(&fdp->fd_refcnt) != 0) { + fp = fget_noref(fdp, fd); + if (fp != NULL && fhold(fp)) { + *fpp = fp; + error = 0; + } else { + error = EBADF; + } + } else { + error = ENOENT; + } + FILEDESC_SUNLOCK(fdp); + fddrop(fdp); + return (error); +} + #ifdef CAPABILITIES int fgetvp_lookup_smr(struct nameidata *ndp, struct vnode **vpp, bool *fsearch) diff --git a/sys/sys/file.h b/sys/sys/file.h index 0bdf7e9baa7b..83da5105ad2b 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -261,6 +261,7 @@ int fget_write(struct thread *td, int fd, cap_rights_t *rightsp, int fget_fcntl(struct thread *td, int fd, cap_rights_t *rightsp, int needfcntl, struct file **fpp); int _fdrop(struct file *fp, struct thread *td); +int fget_remote(struct thread *td, struct proc *p, int fd, struct file **fpp); fo_rdwr_t invfo_rdwr; fo_truncate_t invfo_truncate; From nobody Wed Jan 24 05:12:15 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKXBm2qWnz57SmD; Wed, 24 Jan 2024 05:12: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 4TKXBl6hDGz4ZSQ; Wed, 24 Jan 2024 05:12:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ojjYCzob5kLBdjICvdygbI8/B/6P6C7H1pkykAPR8sM=; b=r0Qems2cAFbuBZ8pKkzhM7ZRRtPto2q4SzqycnsGsSWFN2bjqcyMXe9t74TDd5JLeb/WFp LZzo4h8VhHIbPLwR2r57rqOPOT9yWDidHdYl64brD8Nigk+lxHuctFXG6ROVk1rWqOFfvV UIUDjPTeRHMIqTgcf11qMjtJFU2O9qpNPJ1TGU5nACQ+1BN3lr0Jg/lo3d+D8EMXIt5Hc3 GWH61DZM8zwOyNEcuBdkQRkrn1gUJL5b3d9HuEX2KVEaWg3uxaR82agBBImKwh1MGKXdIT pkmhHh1uvuUAFHzv4R1IlsMq4K0mdRBEC3omBIS70tGYPT/Ps77bx9VvesptnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ojjYCzob5kLBdjICvdygbI8/B/6P6C7H1pkykAPR8sM=; b=e6wLXvR3fFcq4g+qxqeXNel7USmZcFw0jacvobfYOVwP33n1UAla3EprHodkj04/iMj9U0 X1W5FIgU7JR+QOJ83lwraiN05lSHWduWcUzcMoq7Kh1H7tDyvhrt/mo7ZqB3pBXu50mZc/ WQFNDeTz0lQQpau1EeKZj/MC14qlFfg3yNZU3NQ65k6sRLUZafcehilEDVqdnWb3CeyFUF mEmNSkzJIfaldh4Th7ErR3QxXQLd/ztdhm3nttHQi/6K31F3aE0i0kjVweVAXhj/alJeTw iJbyvEfn/KrMKlhQvDOTDPOXw1mgI/mx13OUZoW0G0DeNnKVcu5o5xRuq3TatA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706073136; a=rsa-sha256; cv=none; b=mekV1se67NtIfY+EADLRy43nuBZSc3QeorzzVfoIMcXWhzM5c0+e0GzPfAe2dcxyUfs9cz GgJlbf/Z9rXPeSLTj3i8cE1gMBKdiUibFX/3WlU2UBd3z3qxkur2Ba89/lUMBmj2KEQHpT xfuWggqGgoI7K1NRfknZXgKxpB+v0mby1U85ZsAVr6m9nDNZoWOlNkx8ncR68VeRZPov+x dnx05cpydLxoUsRpspzTqLL2vjIOHLeWDXDmIR2wtycZXeyxf3g5Z82GwnhJjWHv4OShM7 jsgce47iihiD5aXHUUjU5jlOwul2Gpy1SU6mOl6UD44U5Y0gYtRfM4kgII3WBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKXBl5npyz11fx; Wed, 24 Jan 2024 05:12: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 40O5CFhp040020; Wed, 24 Jan 2024 05:12:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O5CFMY040017; Wed, 24 Jan 2024 05:12:15 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:12:15 GMT Message-Id: <202401240512.40O5CFMY040017@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 168c7580c632 - main - file: add fo_cmp method List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 168c7580c6328342945db0e19a0791466bb07624 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=168c7580c6328342945db0e19a0791466bb07624 commit 168c7580c6328342945db0e19a0791466bb07624 Author: Konstantin Belousov AuthorDate: 2024-01-19 21:01:35 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-24 05:11:26 +0000 file: add fo_cmp method The method should return 0 if the file' underlying objects are same. In other words, if 0 is returned, io from either of file causes modifications of the same object. Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43518 --- sys/sys/file.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/sys/file.h b/sys/sys/file.h index 83da5105ad2b..80ed0e2db3bf 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -129,6 +129,7 @@ typedef int fo_fallocate_t(struct file *fp, off_t offset, off_t len, typedef int fo_fspacectl_t(struct file *fp, int cmd, off_t *offset, off_t *length, int flags, struct ucred *active_cred, struct thread *td); +typedef int fo_cmp_t(struct file *fp, struct file *fp1, struct thread *td); typedef int fo_spare_t(struct file *fp); typedef int fo_flags_t; @@ -152,6 +153,7 @@ struct fileops { fo_get_seals_t *fo_get_seals; fo_fallocate_t *fo_fallocate; fo_fspacectl_t *fo_fspacectl; + fo_cmp_t *fo_cmp; fo_spare_t *fo_spares[8]; /* Spare slots */ fo_flags_t fo_flags; /* DFLAG_* below */ }; @@ -491,6 +493,15 @@ fo_fspacectl(struct file *fp, int cmd, off_t *offset, off_t *length, active_cred, td)); } +static __inline int +fo_cmp(struct file *fp1, struct file *fp2, struct thread *td) +{ + + if (fp1->f_ops->fo_cmp == NULL) + return (ENODEV); + return ((*fp1->f_ops->fo_cmp)(fp1, fp2, td)); +} + #endif /* _KERNEL */ #endif /* !SYS_FILE_H */ From nobody Wed Jan 24 05:12:16 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKXBn3Mw4z57THQ; Wed, 24 Jan 2024 05:12: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 4TKXBn0rF4z4ZJR; Wed, 24 Jan 2024 05:12:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zdberss6sO5CxHkk8tyO4PKvPbly0Nqdhz5PEyb2SHA=; b=jSBuikbgcG59BM2C2CbYmEhzUuywBcrrvCJQCp3If+KCa7pDLx/gNY/GI8NvWQEsJPrQZ7 w/GDJDREknpZ2Y/GqKd5XyynjwtWAEDp8rnQhJivUkPhHNvzj7F1IkwMvqeqP4tx+rDyEJ I/x9br490tny6S6C62GyYsw0FpIWKaITZnxfn67dG1WiL2kN5jCCb/hnGv69ic/6pxz+aE xNgP1SMHRjLYxpCAtV/1iSJXVhraaDKJjkgF+FYreXV2JEZONXmg7RTs3Bdc6v1/j7Zm6H xaAwLJKYsHdy5WIQBGTepNsKCIDWIr9KMIQ43FU6IoXWeDfh9F2voYAEmQ4EQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zdberss6sO5CxHkk8tyO4PKvPbly0Nqdhz5PEyb2SHA=; b=cXXLseui6pqYFzOxs4qUhUy1wBXjY+9JACZWSqzuEo3VGXpqztiYOasOi+xlVtB5CTvQHm yM2cSkqfsa1pUUFoub2HMV3lVXYY+7LHqVVQS0XVo3V3Ut+UQ3VQrj1QuYgT/GtS8+q3qp xLH/xHNHmKAGhXYWz+RO0s+cX4882YKjF6UuvfhYriw7Rlmj+KSKDoO4vUdTGCZ/ylFf3e KcK0oXZhBasrxDIuQSFLYg+f5m4+Ivf3AlshZhISzqh2T1DSHhIGISWvyegeK1nrHPZJCS t5EHxjzzPkgW5tH4cSeK3MKyfaq7XGmAfAeclV4UL1k2FxcgC5ABoA5SC8Boug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706073137; a=rsa-sha256; cv=none; b=vaKgiNH4rI/EsutR1T9PLAaCDlpsndfvBsKdTan1p7l4v2erP+O+Ynpav5d1K5+qhEmUCe fHiRblkdnabooB6V61RUlgqxcVkt59njFkCB51yhx84Od6CYM20ySlKYMk75Rmh526WfxM LUXADRN6oTzEExliCxNeVJYIbCiTDMCvfxwwzxfDqvYxKTLtDmxJ2VIOWCvCJM8KzDDWjd EWJbd6Hmj4etuAZxSOkdsWp2VGXE4vW0HlVD0XTYgyAF+7CuBLYHSM1FTwRbprK7HRJhfq ykH3DC7WdrPsa6njlP5RVsQ54SlFD95+CkBpk40hQmK2+GInqvy9YfLwj/fOFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKXBm73fDz11lF; Wed, 24 Jan 2024 05:12: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 40O5CG2j040064; Wed, 24 Jan 2024 05:12:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O5CGGe040061; Wed, 24 Jan 2024 05:12:16 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:12:16 GMT Message-Id: <202401240512.40O5CGGe040061@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: d8decc9ae31a - main - Add kcmp(2) kernel bits List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8decc9ae31af7ffc77276c89639fb13eb1020cc Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d8decc9ae31af7ffc77276c89639fb13eb1020cc commit d8decc9ae31af7ffc77276c89639fb13eb1020cc Author: Konstantin Belousov AuthorDate: 2024-01-19 19:49:36 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-24 05:11:26 +0000 Add kcmp(2) kernel bits This is based purely on reading the Linux kcmp(2) man page. In addition to the Linux set of comparators, I also added KCMP_FILEOBJ to compare underlying file' objects. Tested by: manu Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43518 --- sys/kern/sys_generic.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++ sys/kern/syscalls.master | 10 +++++- sys/sys/syscallsubr.h | 2 ++ sys/sys/systm.h | 2 ++ sys/sys/unistd.h | 7 ++++ 5 files changed, 107 insertions(+), 1 deletion(-) diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 8687bb447251..7698f5d60063 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -65,6 +65,7 @@ #include #include #include +#include #include #include #include @@ -2071,3 +2072,89 @@ kern_posix_error(struct thread *td, int error) td->td_retval[0] = error; return (0); } + +int +kcmp_cmp(uintptr_t a, uintptr_t b) +{ + if (a == b) + return (0); + else if (a < b) + return (1); + return (2); +} + +static int +kcmp_pget(struct thread *td, pid_t pid, struct proc **pp) +{ + if (pid == td->td_proc->p_pid) { + *pp = td->td_proc; + return (0); + } + return (pget(pid, PGET_CANDEBUG | PGET_NOTWEXIT | PGET_HOLD, pp)); +} + +int +kern_kcmp(struct thread *td, pid_t pid1, pid_t pid2, int type, + uintptr_t idx1, uintptr_t idx2) +{ + struct proc *p1, *p2; + struct file *fp1, *fp2; + int error, res; + + res = -1; + p1 = p2 = NULL; + error = kcmp_pget(td, pid1, &p1); + if (error == 0) + error = kcmp_pget(td, pid2, &p2); + if (error != 0) + goto out; + + switch (type) { + case KCMP_FILE: + case KCMP_FILEOBJ: + error = fget_remote(td, p1, idx1, &fp1); + if (error == 0) { + error = fget_remote(td, p2, idx2, &fp2); + if (error == 0) { + if (type == KCMP_FILEOBJ) + res = fo_cmp(fp1, fp2, td); + else + res = kcmp_cmp((uintptr_t)fp1, + (uintptr_t)fp2); + fdrop(fp2, td); + } + fdrop(fp1, td); + } + break; + case KCMP_FILES: + res = kcmp_cmp((uintptr_t)p1->p_fd, (uintptr_t)p2->p_fd); + break; + case KCMP_SIGHAND: + res = kcmp_cmp((uintptr_t)p1->p_sigacts, + (uintptr_t)p2->p_sigacts); + break; + case KCMP_VM: + res = kcmp_cmp((uintptr_t)p1->p_vmspace, + (uintptr_t)p2->p_vmspace); + break; + default: + error = EINVAL; + break; + } + +out: + if (p1 != NULL && p1 != td->td_proc) + PRELE(p1); + if (p2 != NULL && p2 != td->td_proc) + PRELE(p2); + + td->td_retval[0] = res; + return (error); +} + +int +sys_kcmp(struct thread *td, struct kcmp_args *uap) +{ + return (kern_kcmp(td, uap->pid1, uap->pid2, uap->type, + uap->idx1, uap->idx2)); +} diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 709b01f0abbe..2f1bea33ac8f 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -3329,6 +3329,14 @@ _Out_opt_ _Contains_long_timet_ struct itimerspec *old_value ); } - +588 AUE_NULL STD { + int kcmp( + pid_t pid1, + pid_t pid2, + int type, + uintptr_t idx1, + uintptr_t idx2 + ); + } ; vim: syntax=off diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 1eca098365e7..2c3059b27c82 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -198,6 +198,8 @@ int kern_ioctl(struct thread *td, int fd, u_long com, caddr_t data); int kern_jail(struct thread *td, struct jail *j); int kern_jail_get(struct thread *td, struct uio *options, int flags); int kern_jail_set(struct thread *td, struct uio *options, int flags); +int kern_kcmp(struct thread *td, pid_t pid1, pid_t pid2, int type, + uintptr_t idx1, uintptr_t idx2); int kern_kevent(struct thread *td, int fd, int nchanges, int nevents, struct kevent_copyops *k_ops, const struct timespec *timeout); int kern_kevent_anonymous(struct thread *td, int nevents, diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 508690cd639e..c684f3365c35 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -485,6 +485,8 @@ int poll_no_poll(int events); /* XXX: Should be void nanodelay(u_int nsec); */ void DELAY(int usec); +int kcmp_cmp(uintptr_t a, uintptr_t b); + /* Root mount holdback API */ struct root_hold_token { int flags; diff --git a/sys/sys/unistd.h b/sys/sys/unistd.h index 87f79fc8d554..6128aab61877 100644 --- a/sys/sys/unistd.h +++ b/sys/sys/unistd.h @@ -195,6 +195,13 @@ RFPROCDESC | RFSPAWN | RFPPWAIT) #define RFKERNELONLY (RFSTOPPED | RFHIGHPID | RFPROCDESC) +/* kcmp() options. */ +#define KCMP_FILE 100 +#define KCMP_FILEOBJ 101 +#define KCMP_FILES 102 +#define KCMP_SIGHAND 103 +#define KCMP_VM 104 + #define SWAPOFF_FORCE 0x00000001 /* From nobody Wed Jan 24 05:12:17 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKXBp3Bsfz57T0q; Wed, 24 Jan 2024 05:12: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 4TKXBp1Db7z4ZWx; Wed, 24 Jan 2024 05:12:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gs5ffH5XXs3rTs0jk1zpUXsgYCH5kYB1ieI5Xq1iMhk=; b=JmZARLO0Z2ckMtyNykA2JpVL966KrcQbMQwglrBU3KS1APl+N+o33+ZdE4g2MLZSMVJM/n W7dlv2ah44MCa0T5sD04aZxfVs5zk8Jy87mVMJOHMmtRKqBhtxc7ibBhpF5IxxeQoIz7rW +wM7gM7xdGBaD5FVQShQWbFKqDUuVnBsS42dCPLkVGy+UJI38YO3kMq3j8cVyDWvIxqhjc N13CdGZUbLN9TOe09DJGnAVAXaqYBSXh69FeB7IHg/40mbzJhaRcHq9KNmPuO7vseedaU7 c4Xm65wDji+dQNgr96VZusyw6Wq/JJgtsNtTWKw/NysJG2MQQArXxRPuo6eLqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gs5ffH5XXs3rTs0jk1zpUXsgYCH5kYB1ieI5Xq1iMhk=; b=jrfS0iRA+gcYGQ072YZjstQhqMp81cqJt9oqPy4egqClmRiJxAaW95gMT/XPXgHUWlzn+o QohjX9cLDIJJdZ7fm9XcKeswLePu2bYJWWxfIVSZG2re9XhkhOElyb4A9JLtYBEqNo7Fjp vOSlr4qRWyAVSzjyeJ3p5xRW6nipuBkE0BGZouWOZrh071LSKSpcqYKQVM1G3otahoqz4R CI5CD70dDQoaFW0zoVt08R7h2JADZBxAV1vz4WwHUmd2PllKJXNfKFlWi8JIhorVPkebKm BFdg5sbX3zQQdKj5WIUgUAWPulrUhdZQlM8D9IrZbtrA7D9+uo5V8G/dZFjmbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706073138; a=rsa-sha256; cv=none; b=HVyQlVhzJkDLna9doFmcZfXX2tPldi4vgOex/0b9BuvBXMJlH3XsNj/JO4lRmEayvBMe2f aW0dXff0jrm13f8tf8w3nZbed6bCW128gQSQJBylHQRJ5R7NX1GsDZgE3MZ6oBS2R/4aQn XkKqX8aa/KqCIuDg0ynaWstWXHUHw68q4yAARx3pTEb6qlayi+3iirfPsfGZN5j2yNx+i8 rvO5WCQPi4Fd8Ib4a0FfSSvAMlIZxjpB7ChO/Pvf/7CsS44cChjYr9pf3mBQLQfjIomLtW nRCrun5XEL1/IdJga/B98H7a0IlAyP3q5oRdr1X8WUOvbmXDTt0x6rr8LHp5QQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKXBp0Lkxz1176; Wed, 24 Jan 2024 05:12: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 40O5CHQE040103; Wed, 24 Jan 2024 05:12:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O5CHFQ040100; Wed, 24 Jan 2024 05:12:17 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:12:17 GMT Message-Id: <202401240512.40O5CHFQ040100@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 211bdd601ee5 - main - Add kcmp(2) userspace bits List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 211bdd601ee51f90da9b123807ef68ac122116b9 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=211bdd601ee51f90da9b123807ef68ac122116b9 commit 211bdd601ee51f90da9b123807ef68ac122116b9 Author: Konstantin Belousov AuthorDate: 2024-01-19 19:55:11 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-24 05:11:26 +0000 Add kcmp(2) userspace bits Unlike Linux, we do provide libc wrapper. All definitions and prototypes are available from Tested by: manu Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43518 --- include/unistd.h | 1 + lib/libc/sys/Symbol.map | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/include/unistd.h b/include/unistd.h index 8a01d563fe99..e4e5c62fbb67 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -519,6 +519,7 @@ int iruserok(unsigned long, int, const char *, const char *); int iruserok_sa(const void *, int, int, const char *, const char *); int issetugid(void); void __FreeBSD_libc_enter_restricted_mode(void); +int kcmp(pid_t pid1, pid_t pid2, int type, uintptr_t idx1, uintptr_t idx2); long lpathconf(const char *, int); #ifndef _MKDTEMP_DECLARED char *mkdtemp(char *); diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index e9e3c7151c2f..a49229ace995 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -424,6 +424,10 @@ FBSD_1.7 { timerfd_settime; }; +FBSD_1.8 { + kcmp; +}; + FBSDprivate_1.0 { /* System call stubs */ ___acl_aclcheck_fd; From nobody Wed Jan 24 05:12:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKXBq4YpBz57THT; Wed, 24 Jan 2024 05:12:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKXBq2bxYz4ZgP; Wed, 24 Jan 2024 05:12:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3AH0Zkt4RhE2u/gBRKWEfnLZBnFU2+vLJZjSsvOHMkc=; b=VPp5YFaQBXkC9etk7I4dLiVmcwLivp7ZZE9Jdbrd8PIzCZbzqb1Vk5d7BwdQ1zucb4y7+/ lNiDae1Xkaz92eIUCFPaPtOWNgqmR+TYSSsKpXAt81dP3L9NC/+RXNHds7XI40KjSCzhrw hsaNIjTA2ZHMItVH5aHnnHX5p0Atk1Kt9hqx5A7vjW6fDIdZsDXnjL1kMXMR5NDUHrVIRf UqhwEl+j82UfA+UqQklZTNmcvEvQMB+dDKwhxkU5Uxnsc0SHu01ATGNh6cdpTCpBJ+hui7 q6ikZ8eaOjdRSV6MXQSvNm5dDKGdSF3PKGYrMY+kcl7JoJo5lK4GLdt/gsmKfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3AH0Zkt4RhE2u/gBRKWEfnLZBnFU2+vLJZjSsvOHMkc=; b=arvYQ8MifEBR3U/fXmxTneAqkkrlxLvh/ooTMei9/D4b3/NEyVX/xhixj7v2DrSgPPHS1T rOa07TjUVw4E/c50QpqwU4pH9QJeDN9shjpRWF7jpQBMReyXXMxqEYNXt3wFpyZ6Jdb1qr u3KDO7hNXjy7EacYGJ626LTGv5+bVHfC2WhiBEQ428kS1vKxROKn05kAtAyn4/NU0E/tbu qyh8Z8BCE1NmioWNu0AXfPPsqMhhQgtdzrRF/xd2UhA4l9rdq+atoZcTNh2WsExSqG2qnZ gDmZU2uHjAxPKCOWavW5ilf8waW9lGHKF7p7AKwxhYKaWNohf1ZgQ1OU3Kdw3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706073139; a=rsa-sha256; cv=none; b=Uso4yewp7vK+0dFerAjNGFV7+d3qBAFSyYoBAcppHWkVUH6MuWMr+toP8MGm1mNPRWrfbs joe8+ESSA6JzvC4CSyGeIJWzxfUoqO2s7HqldreCgEkKmqeVCW4i+6oheRAzNmcWOlvTAd t0jr9oMNgOBZbJ5pN9uJ6pjE50IROX572+DATKtjqkqwbDZCNtmn0G/gOMG2CBTi98FKNE YGWjrxkwIeZUMP017qoLdcHCXVcxJeKYAnxuC/P/BUylU4iJsRKxN4oB0PzvR5u2y9XIC3 rrDrGyMTZ/rsb+RYWdmZ6/ClqAOFxjoqjyxTdVhY3+sfyROTuLVTeGgVzKY0DA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKXBq1hlMz11g0; Wed, 24 Jan 2024 05:12:19 +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 40O5CJvJ040148; Wed, 24 Jan 2024 05:12:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O5CJ0T040145; Wed, 24 Jan 2024 05:12:19 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:12:19 GMT Message-Id: <202401240512.40O5CJ0T040145@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: f28526e9466c - main - kcmp(2): implement for generic file types List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f28526e9466cd60ed33053e922238ba1c9040341 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f28526e9466cd60ed33053e922238ba1c9040341 commit f28526e9466cd60ed33053e922238ba1c9040341 Author: Konstantin Belousov AuthorDate: 2024-01-19 21:44:37 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-24 05:11:26 +0000 kcmp(2): implement for generic file types Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43518 --- sys/kern/kern_event.c | 1 + sys/kern/sys_eventfd.c | 1 + sys/kern/sys_generic.c | 8 ++++++++ sys/kern/sys_pipe.c | 1 + sys/kern/sys_socket.c | 1 + sys/kern/sys_timerfd.c | 1 + sys/kern/tty_pts.c | 1 + sys/kern/uipc_mqueue.c | 1 + sys/kern/uipc_sem.c | 1 + sys/kern/uipc_shm.c | 1 + sys/sys/file.h | 1 + 11 files changed, 18 insertions(+) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 540fd58d2e2a..41295c374e65 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -139,6 +139,7 @@ static struct fileops kqueueops = { .fo_chmod = invfo_chmod, .fo_chown = invfo_chown, .fo_sendfile = invfo_sendfile, + .fo_cmp = file_kcmp_generic, .fo_fill_kinfo = kqueue_fill_kinfo, }; diff --git a/sys/kern/sys_eventfd.c b/sys/kern/sys_eventfd.c index 50c126f06dc6..4b1230b29b16 100644 --- a/sys/kern/sys_eventfd.c +++ b/sys/kern/sys_eventfd.c @@ -76,6 +76,7 @@ static struct fileops eventfdops = { .fo_chown = invfo_chown, .fo_sendfile = invfo_sendfile, .fo_fill_kinfo = eventfd_fill_kinfo, + .fo_cmp = file_kcmp_generic, .fo_flags = DFLAG_PASSABLE }; diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 7698f5d60063..e185900b93be 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -2158,3 +2158,11 @@ sys_kcmp(struct thread *td, struct kcmp_args *uap) return (kern_kcmp(td, uap->pid1, uap->pid2, uap->type, uap->idx1, uap->idx2)); } + +int +file_kcmp_generic(struct file *fp1, struct file *fp2, struct thread *td) +{ + if (fp1->f_type != fp2->f_type) + return (3); + return (kcmp_cmp((uintptr_t)fp1->f_data, (uintptr_t)fp2->f_data)); +} diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 3169d922cc68..1d48728139c2 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -165,6 +165,7 @@ struct fileops pipeops = { .fo_chown = pipe_chown, .fo_sendfile = invfo_sendfile, .fo_fill_kinfo = pipe_fill_kinfo, + .fo_cmp = file_kcmp_generic, .fo_flags = DFLAG_PASSABLE }; diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index 314576281d6e..7854a4ebdf52 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -109,6 +109,7 @@ struct fileops socketops = { .fo_sendfile = invfo_sendfile, .fo_fill_kinfo = soo_fill_kinfo, .fo_aio_queue = soo_aio_queue, + .fo_cmp = file_kcmp_generic, .fo_flags = DFLAG_PASSABLE }; diff --git a/sys/kern/sys_timerfd.c b/sys/kern/sys_timerfd.c index e245baed88be..d9c0e189baf2 100644 --- a/sys/kern/sys_timerfd.c +++ b/sys/kern/sys_timerfd.c @@ -371,6 +371,7 @@ static struct fileops timerfdops = { .fo_chown = invfo_chown, .fo_sendfile = invfo_sendfile, .fo_fill_kinfo = timerfd_fill_kinfo, + .fo_cmp = file_kcmp_generic, .fo_flags = DFLAG_PASSABLE, }; diff --git a/sys/kern/tty_pts.c b/sys/kern/tty_pts.c index 31122d422a28..4a3b3d77c89e 100644 --- a/sys/kern/tty_pts.c +++ b/sys/kern/tty_pts.c @@ -610,6 +610,7 @@ static struct fileops ptsdev_ops = { .fo_chown = invfo_chown, .fo_sendfile = invfo_sendfile, .fo_fill_kinfo = ptsdev_fill_kinfo, + .fo_cmp = file_kcmp_generic, .fo_flags = DFLAG_PASSABLE, }; diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index f4660be70da8..f7695945fcc4 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -2661,6 +2661,7 @@ static struct fileops mqueueops = { .fo_chown = mqf_chown, .fo_sendfile = invfo_sendfile, .fo_fill_kinfo = mqf_fill_kinfo, + .fo_cmp = file_kcmp_generic, .fo_flags = DFLAG_PASSABLE, }; diff --git a/sys/kern/uipc_sem.c b/sys/kern/uipc_sem.c index d3c77a37400a..b4652e9106ac 100644 --- a/sys/kern/uipc_sem.c +++ b/sys/kern/uipc_sem.c @@ -153,6 +153,7 @@ static struct fileops ksem_ops = { .fo_chown = ksem_chown, .fo_sendfile = invfo_sendfile, .fo_fill_kinfo = ksem_fill_kinfo, + .fo_cmp = file_kcmp_generic, .fo_flags = DFLAG_PASSABLE }; diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index f5803d1d72de..13fb0915cdaa 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -169,6 +169,7 @@ struct fileops shm_ops = { .fo_add_seals = shm_add_seals, .fo_fallocate = shm_fallocate, .fo_fspacectl = shm_fspacectl, + .fo_cmp = file_kcmp_generic, .fo_flags = DFLAG_PASSABLE | DFLAG_SEEKABLE, }; diff --git a/sys/sys/file.h b/sys/sys/file.h index 80ed0e2db3bf..6d1b8b8e1df4 100644 --- a/sys/sys/file.h +++ b/sys/sys/file.h @@ -279,6 +279,7 @@ fo_seek_t vn_seek; fo_fill_kinfo_t vn_fill_kinfo; fo_kqfilter_t vn_kqfilter_opath; int vn_fill_kinfo_vnode(struct vnode *vp, struct kinfo_file *kif); +int file_kcmp_generic(struct file *fp1, struct file *fp2, struct thread *td); void finit(struct file *, u_int, short, void *, struct fileops *); void finit_vnode(struct file *, u_int, void *, struct fileops *); From nobody Wed Jan 24 05:12:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKXBr5MyKz57TFF; Wed, 24 Jan 2024 05:12: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 4TKXBr3f0Wz4ZKB; Wed, 24 Jan 2024 05:12:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BLpTv+/0CoQ5ikqXX9HaKDaq0D3g3WKF00ECklfOGRc=; b=A/QSoH4d+C7dcCKtaPrAHQX6po4mrWWoMOjgGWv4YLOTyhnDF2GYQJqy65t/rnLXfTEVZv 62xlKjoaZJijhJkj1DrnvETG8yZhctcjmylsmRLXqLKa5R69mVIZp4KQEO9uKScJXYrQRU 6Rt8vzEdQKYJHNwyiPeuiFtJY4vQkKLwzQR0zUb1z7m+IfaseENCOSjAd/QTn+Q7WVJdf4 5snaWQiL41UcfBAhxms7T5feXvSd/C//IFetr4Ej1yMRc68dJTFkOGCZ7ktqLSO9znOLjx hgKMMYwwJ6hbQVbfGP7JmZtjsgRldc01RKx0USQXAZ3wZtefVAS9X2Qsz8vCHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BLpTv+/0CoQ5ikqXX9HaKDaq0D3g3WKF00ECklfOGRc=; b=k9eieFASx62pT+DjEQIIMnCnNk5uSYrqNd5r5HpEz2j2DwOEprOndSj50BPt/93Y9RkVTz ljnph2ZpcemTNUxGN5CAkstvUA245WL4Ttxpm76NT+D+YPTd1p+3PB2Q43PHbPHyFoNw/K ffuHa3za0nJe5ccFFQUtN6pGgyDfOsGpT43BLWJBfdiMIWyZCC8sBYcHT147GP+YmFbatv yCUBBL/ViFzAzizl4mraP/pHYtj1UKdrRXvcOL67c+iLHqZNOIhKT+/hzWtB+AgkcSnU9k 00Ywlms70xxtdvXNw+bLfIdgwBANkunD5U1is8fWcj+Znl+QkLAXulKcliZhnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706073140; a=rsa-sha256; cv=none; b=BTUtUVtDKqr+2bnnB/+AP1jnmS9dj9eVH2/7nKG/TQajOV5AI/VkvWbt37IpcwhKXarpTf oaHUCXrzZZq6Wz5FxnJHfupb3SWCGc/YjlO+9VyprK819JbGIEsW+0Z9arZJ2C2aN7LF71 odYaN5JBPc8o6Dl0SDC/MVAg4qFkcGkFZiVubgvrH4VIYS1QTtGNNBToTugoq+wgNpseHv somv9ftMnHHthB6O89NgespGsz8mEcD1q7PKkrqAhBvXbxiEPPAssqAd9ibeQfZfGJSUEG /FcPGbTmR9qQoDjCJrrkSRuirFbun415eopr77wgf6ziKjmLGYq12Gd8FPF3JQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKXBr2lQCz11wX; Wed, 24 Jan 2024 05:12: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 40O5CKrB040190; Wed, 24 Jan 2024 05:12:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O5CKKr040187; Wed, 24 Jan 2024 05:12:20 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:12:20 GMT Message-Id: <202401240512.40O5CKKr040187@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: f04220c1b064 - main - kcmp(2): implement for vnode files List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f04220c1b0641fa68d01dc85d9fef706b02f4079 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f04220c1b0641fa68d01dc85d9fef706b02f4079 commit f04220c1b0641fa68d01dc85d9fef706b02f4079 Author: Konstantin Belousov AuthorDate: 2024-01-19 21:24:31 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-24 05:11:26 +0000 kcmp(2): implement for vnode files Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43518 --- sys/kern/kern_descrip.c | 1 + sys/kern/vfs_vnops.c | 9 +++++++++ sys/sys/vnode.h | 1 + 3 files changed, 11 insertions(+) diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index e8e08f57196b..65b1f74d310b 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -5285,6 +5285,7 @@ struct fileops path_fileops = { .fo_chown = badfo_chown, .fo_sendfile = badfo_sendfile, .fo_fill_kinfo = vn_fill_kinfo, + .fo_cmp = vn_cmp, .fo_flags = DFLAG_PASSABLE, }; diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 40596263d551..dc2efee038bb 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -123,6 +123,7 @@ struct fileops vnops = { .fo_mmap = vn_mmap, .fo_fallocate = vn_fallocate, .fo_fspacectl = vn_fspacectl, + .fo_cmp = vn_cmp, .fo_flags = DFLAG_PASSABLE | DFLAG_SEEKABLE }; @@ -4228,3 +4229,11 @@ vn_lktype_write(struct mount *mp, struct vnode *vp) return (LK_SHARED); return (LK_EXCLUSIVE); } + +int +vn_cmp(struct file *fp1, struct file *fp2, struct thread *td) +{ + if (fp2->f_type != DTYPE_VNODE) + return (3); + return (kcmp_cmp((uintptr_t)fp1->f_vnode, (uintptr_t)fp2->f_vnode)); +} diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index c244eb13294d..987cf995f606 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -818,6 +818,7 @@ int vn_vget_ino_gen(struct vnode *vp, vn_get_ino_t alloc, void *alloc_arg, int lkflags, struct vnode **rvp); int vn_utimes_perm(struct vnode *vp, struct vattr *vap, struct ucred *cred, struct thread *td); +int vn_cmp(struct file *, struct file *, struct thread *td); int vn_io_fault_uiomove(char *data, int xfersize, struct uio *uio); int vn_io_fault_pgmove(vm_page_t ma[], vm_offset_t offset, int xfersize, From nobody Wed Jan 24 05:12:21 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKXBt10PXz57SmV; Wed, 24 Jan 2024 05:12: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 4TKXBs4RQsz4ZXp; Wed, 24 Jan 2024 05:12:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qnJRB7Oh8/wJIakof2al5P3H6hhBUZ+wN8D3cz6hqAA=; b=Crusv6UnitV75wuBWFkqrkZaNpYXuoG/PaoIpx7LxOsnW6ymt0CTCfznwzd6E97kX5hrmc CWJGYx3VMXRtrxBuQdhusN1VakHYEadwqvwT6lNUdtHfQGI5Fuvl+wZRGLqmnoMDCqaNCx O9aX4ftXRMTcnyNtfkyK/uemgGyh1m++6TKZ/DA5O6xbbBqV10k8Zgn3BuNDI6x7tlls8Y rvq/hZRmoJmptEOqGiKCNZMP6tlAAyDgyNNP+qNl6gJ3whBqa8u7uaVqDw6Bn13WWlRBAw Eam7fC3V/NwZV93K+XiS3xxaJ7rUjE2lraVNPzq5udz7Ysdo12F/pq/P2uJHnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qnJRB7Oh8/wJIakof2al5P3H6hhBUZ+wN8D3cz6hqAA=; b=fDckRH3n95i1ICVnGfXM5ItaGDJt61cr+/DjLQn/Sn6tLdp9uwJGsfWvxGW0u4nkIDWTcP cKySBooipvZ4TeOU2t3GRTWzwMot2Ys/4AQAmTTvgXl5DrjosCaHpYBP3BLDz2eHEiJ9bV ytJIF2ILIEK1VKdGrFJwlPmTFmMnqpQ+xnTUONX8pA2Rw+Ekf4FvrsZUEoKIuZ5ohrKYtC /zU9aQBa6zFi52gQZL47CpDPisDtXfGGhIjTAh9hLbjQu8SQ9qhCb+Cz4S/MIoHJas2xe7 1lUs7XBHaYIgwjZjpq/unNyfgPZy5sDkNnRLnSRGyUKOR+3PEFFIWsD+K05N6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706073141; a=rsa-sha256; cv=none; b=g9+Bch6hj/mUv2Wk/oGU+7MHtalBawllIEaTucsdjod1Fuxg5QcHKd4AWeGJoD9qcpyvoj Xc6mBZBVng39SwEJw69xuGlYmT0bhuodiXm+IzCvLhr5LUGOLudBkyT79d0O5/Pndv291N 45tY8MFrFFJfecgY+THvV+tlblG4Q1DfPHt58iMeWij0teI4OETng26VR2EfkCuU/Ixp9S HNipXe6hNBx70e44i4jpj6pnzRiZrBXFRztbqhIRWgFRwoQN3YVizEoqu8VucMm65vIA6U ZBj+kLU+Bjxhdx3DwwqBzTH/pl5F3rz3kIKZkRo9mlfoRKYGH7WoYT8d414EiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKXBs3VVlz11Vv; Wed, 24 Jan 2024 05:12:21 +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 40O5CLAW040232; Wed, 24 Jan 2024 05:12:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O5CLio040229; Wed, 24 Jan 2024 05:12:21 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:12:21 GMT Message-Id: <202401240512.40O5CLio040229@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 5c41d888de1a - main - kcmp(2): implement for devfs files List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c41d888de1aba0e82531fb6df4cc3b6989d37bd Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=5c41d888de1aba0e82531fb6df4cc3b6989d37bd commit 5c41d888de1aba0e82531fb6df4cc3b6989d37bd Author: Konstantin Belousov AuthorDate: 2024-01-19 21:36:50 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-24 05:11:26 +0000 kcmp(2): implement for devfs files Compare not vnodes, which are different between mount points, but actual cdev referenced by the devfs node. Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43518 --- sys/fs/devfs/devfs_vnops.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index fbb314dbbe79..3b8a624fe620 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -2010,6 +2010,14 @@ dev2udev(struct cdev *x) return (cdev2priv(x)->cdp_inode); } +static int +devfs_cmp_f(struct file *fp1, struct file *fp2, struct thread *td) +{ + if (fp2->f_type != DTYPE_VNODE || fp2->f_ops != &devfs_ops_f) + return (3); + return (kcmp_cmp((uintptr_t)fp1->f_data, (uintptr_t)fp2->f_data)); +} + static struct fileops devfs_ops_f = { .fo_read = devfs_read_f, .fo_write = devfs_write_f, @@ -2025,6 +2033,7 @@ static struct fileops devfs_ops_f = { .fo_seek = vn_seek, .fo_fill_kinfo = vn_fill_kinfo, .fo_mmap = devfs_mmap_f, + .fo_cmp = devfs_cmp_f, .fo_flags = DFLAG_PASSABLE | DFLAG_SEEKABLE }; From nobody Wed Jan 24 05:12:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKXBv1TMdz57THX; Wed, 24 Jan 2024 05:12:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKXBt5bbQz4ZdY; Wed, 24 Jan 2024 05:12:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zgHXa+6/qLE/BXQ+gGyxhzfBwEpfy6LHijFGsIeeUsM=; b=uWX3E7Ao8oaNCMQLQq8ZH2IElxgTSti1hun/CxlhxsrPk4uLKDfzHyoFyB+ts9BiSlZVcT eCbcTyeRIGhkO9wrVd5j3rkNy9uQ0dd0FRD1JROWvmWK1h/tSS+Cc57cNGq94Gb0cSjg+x XSoY1GdpwWjA8npomrWl7+2aT9G+M9BHTAG6Ioaih4d8uK7FEnNTyTUfdz3pqMBlrRcVGY L/hNsVSBAFzSqNA3xbxoPxvap15p1pm4WCd0HB9HB4WF7CGRPBBkTZPI5Cwbm12DShxUiN ACXWWRjkAxc5D571wuVV+Tqe2W/SPKqJjAWTZu/GwIRX4uH/VwzlEx1H19mAYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073142; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zgHXa+6/qLE/BXQ+gGyxhzfBwEpfy6LHijFGsIeeUsM=; b=o3rQYM7bcmarFdKKcf9D90YG94Y7y574T+O/xWIVPx9a7s/fsP3TqCG+SEEtUf+ivQwMPR tAO9r7urdJr4FPob6qbSzo4nO9uIoq5L6S1pFLH1AgOrVDAcsKRz0kErvjop5x6ujjO835 Ugo8tMK/XMl6HJWLoi0DNTywhiEXrojmVY8wkTiavhFhZAVWhLYgzTZgQOf4P5JTAlc9fz XNkKPHvP5s4uzPvCrL9zLZH6y7ZIcBxCvTHelRrEC0QU5ciOzkgr3LzzEcf3OfA7rCyGaN 9Yo5jAd9flnXz7ch7gBpTXTknufXSnhsCExyvRCCrxrOvnM9HwNmQWff1TjtWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706073142; a=rsa-sha256; cv=none; b=w6OiZX964+tbUhxOqKZn4j2+/7WVF2sryJcLdC16HW8Kzvi0aSKNstVZ3zZRpOaqkHowM3 JxUYbh+tRId5ZQojTKHA0/nqvKfUHJjzpd+P6mArHmT3+rYtlQlkRkTIhVQgZl6RbxxR5I KQWcb916f+MHf3xzfuYNVGQ3t6EXG8vnvGNkmWw9SWXuyfuxW3D5/a8xHMcRs77LA+gPvT fOP3WYjMuj07Jr3pMrA1Y+2V4SB6aBAbl+c4Idtm9PptRkP0bQN4/rr7PBAabCFWaNL/Bw 5mAfU+GFApIllne9T+wPLyFq5oMJMR+1O/IyMiTx9np5jcAddphr2qlgksWJPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKXBt4jTkz11Sj; Wed, 24 Jan 2024 05:12: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 40O5CMYv041090; Wed, 24 Jan 2024 05:12:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O5CMuL041082; Wed, 24 Jan 2024 05:12:22 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:12:22 GMT Message-Id: <202401240512.40O5CMuL041082@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 41fb6dc3d4df - main - kcmp(2): implement for linuxkpi cdevs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 41fb6dc3d4df632ffacf91b5631a718442d129d5 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=41fb6dc3d4df632ffacf91b5631a718442d129d5 commit 41fb6dc3d4df632ffacf91b5631a718442d129d5 Author: Konstantin Belousov AuthorDate: 2024-01-19 21:54:03 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-24 05:11:27 +0000 kcmp(2): implement for linuxkpi cdevs Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43518 --- sys/compat/linuxkpi/common/src/linux_compat.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 4a998a557514..36ed7b84cc94 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -1721,6 +1721,19 @@ linux_iminor(struct inode *inode) return (minor(ldev->dev)); } +static int +linux_file_kcmp(struct file *fp1, struct file *fp2, struct thread *td) +{ + struct linux_file *filp1, *filp2; + + if (fp2->f_type != DTYPE_DEV) + return (3); + + filp1 = fp1->f_data; + filp2 = fp2->f_data; + return (kcmp_cmp((uintptr_t)filp1->f_cdev, (uintptr_t)filp2->f_cdev)); +} + struct fileops linuxfileops = { .fo_read = linux_file_read, .fo_write = linux_file_write, @@ -1735,6 +1748,7 @@ struct fileops linuxfileops = { .fo_chmod = invfo_chmod, .fo_chown = invfo_chown, .fo_sendfile = invfo_sendfile, + .fo_cmp = linux_file_kcmp, .fo_flags = DFLAG_PASSABLE, }; From nobody Wed Jan 24 05:12:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKXBw1XSyz57TKf; Wed, 24 Jan 2024 05:12:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKXBv6Qz7z4ZH8; Wed, 24 Jan 2024 05:12:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0iKht9BB2olDfEUmQQGo+qrR8qqOyoxe6gJDNNL35Xs=; b=OC9ugUuyApbzANoXCwduhM+/I5gKPqCw58dH0UTGYF2E2yHWv1iSe6VdHc/gD9Nk40EW7Y aRyMG7oWwpjquHL1F7+LLPfbP/ShMxzvql6yh1Xt76llgOWdPSUXAotrcK7vvBpPQurdN9 dhjl24P8aM7f73Cpo3YC3pNAj+0CdV3cPgE0CEoGNlf4F60vLJcc0sjkbIW2jdQHyw+bI/ 6xVZhOK3BGTnD6CPyXvrfsPtCKHwc6F5nYOEN9JQGVgYGpkTF08y+NtE5UWgl33xCkH7pi IGw+UWZv8nOiYrtVt9ow7utUtsXM6TwDvQUIiLC6kIZY52KzxvH5L2mUOXDAiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0iKht9BB2olDfEUmQQGo+qrR8qqOyoxe6gJDNNL35Xs=; b=b90BBEgUKW5kSdOFDWFsNzXt9QPbKlbJfpt/uFbr1B/z9P+Q89MxMMKaRf0IyqXDMCAmxX ysLmkSAOMKuB5bdXA4aphhaxWM4kVNheSFO85xvqH1fTAtvZS5GphrKgyV1hENLBeIQxDG uvnz5jM77ggan9ldQ1EAcdu9KlLX1gX1Q+VEGGKgC6mp0eFUOOHM/gtIVvaf8EXQh4aB/m UoOsbxO9ZExaNwOjSK2IGojF7H4eWefcZvSUDOBrcMbfS8mrJAicijGI3crKS3LlCN9aue 0TU2gz3X4Vs9jAWSEFbrLW1DsAXklsy1PCaPgqXb/+4C4h9Bp/We1mO40sjVMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706073143; a=rsa-sha256; cv=none; b=KkkT2UWV6DVKvkmGfWoRLh+4ylr9RgvUq3pk/7E9+hIcYCvuPNJljeemQjZ/CC3/th+q9k koC4lEyrns7yMaykPKmU2XtDFIcywrFti5XrXnm+EJ/IJU2jQUntfJg44TqcaJJriT17WG 2vdEHH6kQ/IhSj11/DEOlwkVeg92Q4BRzKuWLzpmSjTa3CCgucWZkC/o3ggnvvwo2uswlW 7SsCvn6bJRBTtF7Iu8Gt6seBOJDcQiNsM7qfxBXKCj/8+0eazvSltL751QS75zgL/AvKso /lQszIfywnT4NShGB+VO+HVtlXH6630KZGl3ZRDe9AVNonvVPNR1pxWjSiAeeQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKXBv5Vzgz11Vx; Wed, 24 Jan 2024 05:12:23 +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 40O5CNig041300; Wed, 24 Jan 2024 05:12:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O5CNWQ041297; Wed, 24 Jan 2024 05:12:23 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:12:23 GMT Message-Id: <202401240512.40O5CNWQ041297@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: f006524d6d69 - main - kcmp(2): implement for procdesc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f006524d6d696cc2a10b9e90a9a6ea412f1839eb Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f006524d6d696cc2a10b9e90a9a6ea412f1839eb commit f006524d6d696cc2a10b9e90a9a6ea412f1839eb Author: Konstantin Belousov AuthorDate: 2024-01-19 22:37:39 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-24 05:11:27 +0000 kcmp(2): implement for procdesc Reviewed by: brooks, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43518 --- sys/kern/sys_procdesc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/kern/sys_procdesc.c b/sys/kern/sys_procdesc.c index 419ff928a8a2..90022186d1ff 100644 --- a/sys/kern/sys_procdesc.c +++ b/sys/kern/sys_procdesc.c @@ -94,6 +94,7 @@ static fo_kqfilter_t procdesc_kqfilter; static fo_stat_t procdesc_stat; static fo_close_t procdesc_close; static fo_fill_kinfo_t procdesc_fill_kinfo; +static fo_cmp_t procdesc_cmp; static struct fileops procdesc_ops = { .fo_read = invfo_rdwr, @@ -108,6 +109,7 @@ static struct fileops procdesc_ops = { .fo_chown = invfo_chown, .fo_sendfile = invfo_sendfile, .fo_fill_kinfo = procdesc_fill_kinfo, + .fo_cmp = procdesc_cmp, .fo_flags = DFLAG_PASSABLE, }; @@ -552,3 +554,15 @@ procdesc_fill_kinfo(struct file *fp, struct kinfo_file *kif, kif->kf_un.kf_proc.kf_pid = pdp->pd_pid; return (0); } + +static int +procdesc_cmp(struct file *fp1, struct file *fp2, struct thread *td) +{ + struct procdesc *pdp1, *pdp2; + + if (fp2->f_type != DTYPE_PROCDESC) + return (3); + pdp1 = fp1->f_data; + pdp2 = fp2->f_data; + return (kcmp_cmp((uintptr_t)pdp1->pd_pid, (uintptr_t)pdp2->pd_pid)); +} From nobody Wed Jan 24 05:12:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKXBx45Zgz57T11; Wed, 24 Jan 2024 05:12:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKXBx1DDpz4ZYf; Wed, 24 Jan 2024 05:12:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DvFyP4oCgukcHTqWxeOnLhfjZA6WxkOHOhuUvgLAYdA=; b=mnm+WYRAzU5A5iDNEYeqCRAlepUVxvWJU27C2o6wJc1zcifYDGJ5bM6u6ZeiK7UnI2r6V6 rZ2Id8+Q0Wu9xvd4m7EJIxVGAsqsDIDeTU/6XiVDvKIwROv5aP4Wo7Xp+XQ94TWjDOlsF9 u/7Aw4KKVpKEknqnHyDF0PS2M1cHjKfZN38sO9ZdwkZHHw3aL3vj8kZIkOPiG6s3q2Mo5j FMUiKdXWyZt1KY4zb+4STwhhYI+8VrbbBFC0S3m/+QQdhF7NKMsDMLvRwuiakbGoblctCX o1kJ9nwraadgvsicqutq4BgF3JDQNF0bHTfNZRgOe/ZkDEaE/TbpEGwRJHgk9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DvFyP4oCgukcHTqWxeOnLhfjZA6WxkOHOhuUvgLAYdA=; b=HsENDgx1febIIKYaI3OCy3xR4WERT1GfRn2q6tSUcGlD5NEKEzsTkK/fvFLkI4bg0HtVnh m04z/n60D0GOGAg1nwm9KEaht7R9sEcdTUI11xVg8ABT2QI7idJy/BKiaGMJmKr7eUgDpX svHHGfDvROQXnjeyrCIWcxs1f3+49ZFILyDaG/qGDw51hhxyilsvDK1vkxO7rmPGD9AZ0U vpflJPsR6G0moFuaoQjH50SAUzm6JvTYMPP+ET2eynol1xaUTUWHX4bDUdYQdiRsMA5AqA 88F8bLN9iKMrey2EOXutAKoWH/l6hI27i59TmxqTzhZMjRajMuefjvuOWCPVhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706073145; a=rsa-sha256; cv=none; b=n6B3ZvUkx4PHbl93uG1ci+N6UUj5W8iUU5u+P5eK9jpRy2yMJAw+JEoDGZW8l7B+X8f4gr cnqFX3vbr7gBosn6uqV96watHLTQADMkpkLQ5HgaIC0mz96WrcJC6qxz05txLRw5qdPTlZ CR5OjySJ4gBeyRNFk4tNzLo5r3UmAk8dgVefIW8qBVBLgiolKn7Zusw1WyJkKGV/HERe2G wcpKTdAayHM6CReMOQMF+UbEebQZgT2lCao1wfXy2CTaDKJThZLvZAxs8jqyNbyxs3S8UO GzYT3G0eFoPn/CL+PSGoa0mWaDTWdjHRkgLLOjIAqc23H2EhNV9vX4OGmbzsyQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKXBw6b8gz11lH; Wed, 24 Jan 2024 05:12:24 +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 40O5CO5N041330; Wed, 24 Jan 2024 05:12:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O5COYX041327; Wed, 24 Jan 2024 05:12:24 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:12:24 GMT Message-Id: <202401240512.40O5COYX041327@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 38bfddf597b1 - main - regen List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 38bfddf597b18615ad07accd923ce29a951eaab9 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=38bfddf597b18615ad07accd923ce29a951eaab9 commit 38bfddf597b18615ad07accd923ce29a951eaab9 Author: Konstantin Belousov AuthorDate: 2024-01-19 19:55:42 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-24 05:11:27 +0000 regen --- sys/compat/freebsd32/freebsd32_syscall.h | 3 +- sys/compat/freebsd32/freebsd32_syscalls.c | 1 + sys/compat/freebsd32/freebsd32_sysent.c | 1 + sys/compat/freebsd32/freebsd32_systrace_args.c | 38 ++++++++++++++++++++++++++ sys/kern/init_sysent.c | 1 + sys/kern/syscalls.c | 1 + sys/kern/systrace_args.c | 38 ++++++++++++++++++++++++++ sys/sys/syscall.h | 3 +- sys/sys/syscall.mk | 3 +- sys/sys/sysproto.h | 9 ++++++ 10 files changed, 95 insertions(+), 3 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h index bc824b8e04be..662947c330d4 100644 --- a/sys/compat/freebsd32/freebsd32_syscall.h +++ b/sys/compat/freebsd32/freebsd32_syscall.h @@ -506,4 +506,5 @@ #define FREEBSD32_SYS_timerfd_create 585 #define FREEBSD32_SYS_freebsd32_timerfd_gettime 586 #define FREEBSD32_SYS_freebsd32_timerfd_settime 587 -#define FREEBSD32_SYS_MAXSYSCALL 588 +#define FREEBSD32_SYS_kcmp 588 +#define FREEBSD32_SYS_MAXSYSCALL 589 diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c index 3e7656cace72..b4c41fdbbc12 100644 --- a/sys/compat/freebsd32/freebsd32_syscalls.c +++ b/sys/compat/freebsd32/freebsd32_syscalls.c @@ -593,4 +593,5 @@ const char *freebsd32_syscallnames[] = { "timerfd_create", /* 585 = timerfd_create */ "freebsd32_timerfd_gettime", /* 586 = freebsd32_timerfd_gettime */ "freebsd32_timerfd_settime", /* 587 = freebsd32_timerfd_settime */ + "kcmp", /* 588 = kcmp */ }; diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c index 179d83186b41..13d80c695169 100644 --- a/sys/compat/freebsd32/freebsd32_sysent.c +++ b/sys/compat/freebsd32/freebsd32_sysent.c @@ -649,4 +649,5 @@ struct sysent freebsd32_sysent[] = { { .sy_narg = AS(timerfd_create_args), .sy_call = (sy_call_t *)sys_timerfd_create, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 585 = timerfd_create */ { .sy_narg = AS(freebsd32_timerfd_gettime_args), .sy_call = (sy_call_t *)freebsd32_timerfd_gettime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 586 = freebsd32_timerfd_gettime */ { .sy_narg = AS(freebsd32_timerfd_settime_args), .sy_call = (sy_call_t *)freebsd32_timerfd_settime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 587 = freebsd32_timerfd_settime */ + { .sy_narg = AS(kcmp_args), .sy_call = (sy_call_t *)sys_kcmp, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 588 = kcmp */ }; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 0d263b57bf0f..f2617872a952 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -3357,6 +3357,17 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 4; break; } + /* kcmp */ + case 588: { + struct kcmp_args *p = params; + iarg[a++] = p->pid1; /* pid_t */ + iarg[a++] = p->pid2; /* pid_t */ + iarg[a++] = p->type; /* int */ + uarg[a++] = (intptr_t)p->idx1; /* uintptr_t */ + uarg[a++] = (intptr_t)p->idx2; /* uintptr_t */ + *n_args = 5; + break; + } default: *n_args = 0; break; @@ -9067,6 +9078,28 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* kcmp */ + case 588: + switch (ndx) { + case 0: + p = "pid_t"; + break; + case 1: + p = "pid_t"; + break; + case 2: + p = "int"; + break; + case 3: + p = "uintptr_t"; + break; + case 4: + p = "uintptr_t"; + break; + default: + break; + }; + break; default: break; }; @@ -10945,6 +10978,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* kcmp */ + case 588: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index 74b96a27b3fa..467ea391ef23 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -648,4 +648,5 @@ struct sysent sysent[] = { { .sy_narg = AS(timerfd_create_args), .sy_call = (sy_call_t *)sys_timerfd_create, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 585 = timerfd_create */ { .sy_narg = AS(timerfd_gettime_args), .sy_call = (sy_call_t *)sys_timerfd_gettime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 586 = timerfd_gettime */ { .sy_narg = AS(timerfd_settime_args), .sy_call = (sy_call_t *)sys_timerfd_settime, .sy_auevent = AUE_TIMERFD, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 587 = timerfd_settime */ + { .sy_narg = AS(kcmp_args), .sy_call = (sy_call_t *)sys_kcmp, .sy_auevent = AUE_NULL, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 588 = kcmp */ }; diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index 323669158ac4..0e6e3a3dd1f1 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -593,4 +593,5 @@ const char *syscallnames[] = { "timerfd_create", /* 585 = timerfd_create */ "timerfd_gettime", /* 586 = timerfd_gettime */ "timerfd_settime", /* 587 = timerfd_settime */ + "kcmp", /* 588 = kcmp */ }; diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index 5166223fe8c6..a7320cbe9377 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -3444,6 +3444,17 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 4; break; } + /* kcmp */ + case 588: { + struct kcmp_args *p = params; + iarg[a++] = p->pid1; /* pid_t */ + iarg[a++] = p->pid2; /* pid_t */ + iarg[a++] = p->type; /* int */ + uarg[a++] = (intptr_t)p->idx1; /* uintptr_t */ + uarg[a++] = (intptr_t)p->idx2; /* uintptr_t */ + *n_args = 5; + break; + } default: *n_args = 0; break; @@ -9212,6 +9223,28 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* kcmp */ + case 588: + switch (ndx) { + case 0: + p = "pid_t"; + break; + case 1: + p = "pid_t"; + break; + case 2: + p = "int"; + break; + case 3: + p = "uintptr_t"; + break; + case 4: + p = "uintptr_t"; + break; + default: + break; + }; + break; default: break; }; @@ -11180,6 +11213,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* kcmp */ + case 588: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index cdc09a0edc29..1fa5878c6ff6 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -524,4 +524,5 @@ #define SYS_timerfd_create 585 #define SYS_timerfd_gettime 586 #define SYS_timerfd_settime 587 -#define SYS_MAXSYSCALL 588 +#define SYS_kcmp 588 +#define SYS_MAXSYSCALL 589 diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index 8c85dc4c349c..31e698ea2beb 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -427,4 +427,5 @@ MIASM = \ membarrier.o \ timerfd_create.o \ timerfd_gettime.o \ - timerfd_settime.o + timerfd_settime.o \ + kcmp.o diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index 803144745a76..afec9d186a7a 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -1870,6 +1870,13 @@ struct timerfd_settime_args { char new_value_l_[PADL_(const struct itimerspec *)]; const struct itimerspec * new_value; char new_value_r_[PADR_(const struct itimerspec *)]; char old_value_l_[PADL_(struct itimerspec *)]; struct itimerspec * old_value; char old_value_r_[PADR_(struct itimerspec *)]; }; +struct kcmp_args { + char pid1_l_[PADL_(pid_t)]; pid_t pid1; char pid1_r_[PADR_(pid_t)]; + char pid2_l_[PADL_(pid_t)]; pid_t pid2; char pid2_r_[PADR_(pid_t)]; + char type_l_[PADL_(int)]; int type; char type_r_[PADR_(int)]; + char idx1_l_[PADL_(uintptr_t)]; uintptr_t idx1; char idx1_r_[PADR_(uintptr_t)]; + char idx2_l_[PADL_(uintptr_t)]; uintptr_t idx2; char idx2_r_[PADR_(uintptr_t)]; +}; int sys_exit(struct thread *, struct exit_args *); int sys_fork(struct thread *, struct fork_args *); int sys_read(struct thread *, struct read_args *); @@ -2268,6 +2275,7 @@ int sys_membarrier(struct thread *, struct membarrier_args *); int sys_timerfd_create(struct thread *, struct timerfd_create_args *); int sys_timerfd_gettime(struct thread *, struct timerfd_gettime_args *); int sys_timerfd_settime(struct thread *, struct timerfd_settime_args *); +int sys_kcmp(struct thread *, struct kcmp_args *); #ifdef COMPAT_43 @@ -3246,6 +3254,7 @@ int freebsd13_swapoff(struct thread *, struct freebsd13_swapoff_args *); #define SYS_AUE_timerfd_create AUE_TIMERFD #define SYS_AUE_timerfd_gettime AUE_TIMERFD #define SYS_AUE_timerfd_settime AUE_TIMERFD +#define SYS_AUE_kcmp AUE_NULL #undef PAD_ #undef PADL_ From nobody Wed Jan 24 05:13:34 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKXDG4G5Xz57T1d; Wed, 24 Jan 2024 05: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 4TKXDG3Nsyz4dwG; Wed, 24 Jan 2024 05: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=1706073214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M3oHtDGoexQKgVnnHlXZi0cPrSJcCDa2AWZwLqfslpI=; b=j7fc89NPF+tSOXYBTWynd7lsGg4Sjri8B8FuEtXb5kdkFTPcIzoj0PXFIG/TCW2Yl20Z27 cfe9el4vNXSHgj4VFjFz5MXmynWhEt8ABOjZU+J3mwPWbqIDKsHBH294Pr+wV9JvbXe2wq udDMha5ZY9g6o5594GFhxqDBpx4rw4Q4uFuxpHnoyT2XKYRtZkKqJlyFcvsz+Es9iKElXs 0NVLsd5cnowQ6rLwb13N9kHpeJKLAzSHWlOo9I1tVxfQvZHSmkKa6IIDiiZeaxV/UBt0MI /AHymlHDyV8tygbXsq3boy46k3cdEmB0DTFuyxcp/3XodZDeEew+yrRyWv+BTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=M3oHtDGoexQKgVnnHlXZi0cPrSJcCDa2AWZwLqfslpI=; b=lVlNXZnInAXsovRRwJGa7nEfQYj8mFxEOGauOf0QUSG60WLNKKstJsqXuPoe4NEBAsPkEr 2Kk8Vu+Oe6LofTgwoIq0/OCzvobXEhZEwKn2GHjDiIEhzbIajNjE0efH+NAiGYSgBWt8eT 8qmtUbK7JDOiNCehW/pXA5vnvTwqQchwZC/0FBmyK+FZpVw1T03McRrREUaO9S7pVPsWL9 rkE9zVEA53qENMNgTPULFswVYDmHnh3RJsVQ8xyY2rKfrnPLGk3sSvjOKuITpXgirhKJEq WbCaJOVhfOety3WwNzD4Fxbke5sPFf8NaC9pW+X1ULrplshM5JuwLrMg+Z+nZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706073214; a=rsa-sha256; cv=none; b=kstX1Ni0+F3aDfsoovFz/wn+CXb3dLCdZ0HknJB3cO6SO7gyUwZEVoAFO3nZY8UupWE6+V OK34RfI1lxnwPZOl5NZUdu3CFK0M1dLrlB0uDTQbnUowsJpJBoSqALuXEBMgUoPn9tN4By tx26qG5yR8E9uL6GfqoQl/LFBw9Ks0B7x4Cl0C0inauhq2ldIsbLs7HEWkcviQUdhmRXOG 4zwuEfHg+f4W0RsLMEIEeVx8OJbe9huOLpgJTK8zH0F+gjGZdejAWOxxy+J/Ob5XK2JNtT iwO7z6ChnhNStNi3CjVyMGbowh42GVNrfxyve3b6Lqvw1gyjkD9cjackU3bh6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKXDG2S4yz110p; Wed, 24 Jan 2024 05:13: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 40O5DYmT041718; Wed, 24 Jan 2024 05:13:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O5DYkV041715; Wed, 24 Jan 2024 05:13:34 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:13:34 GMT Message-Id: <202401240513.40O5DYkV041715@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 2a284076ecb4 - main - kern_openat(): rename fd argument to dirfd List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a284076ecb4d22928b78249070efa46153666ff Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2a284076ecb4d22928b78249070efa46153666ff commit 2a284076ecb4d22928b78249070efa46153666ff Author: Konstantin Belousov AuthorDate: 2024-01-20 21:41:12 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-24 05:13:25 +0000 kern_openat(): rename fd argument to dirfd Reviewed by: markj, pjd Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43529 --- sys/kern/vfs_syscalls.c | 6 +++--- sys/sys/syscallsubr.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index c739b5d5beaa..cccb24257e11 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1111,8 +1111,8 @@ sys_openat(struct thread *td, struct openat_args *uap) } int -kern_openat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, - int flags, int mode) +kern_openat(struct thread *td, int dirfd, const char *path, + enum uio_seg pathseg, int flags, int mode) { struct proc *p = td->td_proc; struct filedesc *fdp; @@ -1159,7 +1159,7 @@ kern_openat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, fp->f_flag = flags & FMASK; cmode = ((mode & ~pdp->pd_cmask) & ALLPERMS) & ~S_ISTXT; NDINIT_ATRIGHTS(&nd, LOOKUP, FOLLOW | AUDITVNODE1 | WANTIOCTLCAPS, - pathseg, path, fd, &rights); + pathseg, path, dirfd, &rights); td->td_dupfd = -1; /* XXX check for fdopen */ error = vn_open_cred(&nd, &flags, cmode, VN_OPEN_WANTIOCTLCAPS, td->td_ucred, fp); diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 2c3059b27c82..50dc3ad7d126 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -251,7 +251,7 @@ int kern_ogetdirentries(struct thread *td, struct ogetdirentries_args *uap, long *ploff); int kern_ommap(struct thread *td, uintptr_t hint, int len, int oprot, int oflags, int fd, long pos); -int kern_openat(struct thread *td, int fd, const char *path, +int kern_openat(struct thread *td, int dirfd, const char *path, enum uio_seg pathseg, int flags, int mode); int kern_pathconf(struct thread *td, const char *path, enum uio_seg pathseg, int name, u_long flags, long *valuep); From nobody Wed Jan 24 05:13:35 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKXDH5SqCz57SxH; Wed, 24 Jan 2024 05:13: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 4TKXDH4Wswz4dwJ; Wed, 24 Jan 2024 05:13:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fJvULpIFiaWipNHFRJQv6lBSxtQtc3vseaavSRzFqtw=; b=JrCVtX4z3AfHqK++/N6R7gX+Phtj7u3ID79dfGX9HNA1zojR+XWwLjZ6UlWljS8BddhNSf i379Sy+XCqTdMuSKxT3Db1DzglAscOF8fTs6zxiOLBcQoitLbnIQXmoozAXVRgKllMch6g 1UEuS3+L8FaOdsVg7ct5WT0M4WJDiSyDjWTGf9Z1Q9wdXSikl96lePK0AHWCi3y7LGfi7F QBuW+tTGkv1W0sMd0xZub3gENBI7OLYPhcJV/INl1H6aeJhkwgqcV/5I2EjTeZsGzsSKU7 qEm3qe2Wfu4j9BOq09hchadtjVyZIGBQ0UY0gy6bwHK3xmk6VRy1zS2P6/v6kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fJvULpIFiaWipNHFRJQv6lBSxtQtc3vseaavSRzFqtw=; b=FqL9dhynll4O4z9UfR/A2nghmSeP3ZncpkbBq1MxqL4uZDv9YzZe1y3JXPZFOcrKkoeZg9 cAXyQz/asfJlM0b3A7H9ToscYeSJiCaoMuP8W9BXTyuD0ABDEi7OhXQvCqmfCjoZDrhf8S yzpEgxifnPaXvELA/nBLGDgo9oZkJFh0qEGT+4S6oso6JNOEgi1bz4xz+puW6zAZBQ2zFJ 1VibHTPTEzco0HdhSHcAKSTHzNIAJgFzSsKj1YnOZAjVavCE/l5HUJzRSB7nKp7G2A7WkO zCLKGNlt7TRCReikcK+eUM7BJ5Mrv1KhQigdyyU/XkswPZI/Rk+dC8XUbffOVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706073215; a=rsa-sha256; cv=none; b=U3sCzA/cpRdrU1SE+UuFMnfpQZjrwYl5QUNZqO7Z8pDImkTw2AiAwYEsNeL5Mrh88BCLoy 73AX/31NBlNVAcARQkLQgPKxC17KoecHITnsj/oQyAZf0gRByzxfqQ6dM9AGbuEWnGqdhi R+cNP5Xvarei87Wv4fQ9C9mht/9rumcfb807yKjqkxHBVdgobnW79pRpqhXtwtJdxm54dD ZOkV0n9NlhZ+hsV1EdYO2Lc5Yp5ucAvKjIj2n7LnnBOFxno2g2Iww1QSdCqo7n1kwiUC1X Lx/rbinkyRZqOeBREpgO5/vytTyMXu5gLO+9tJc0ps9JRpyicb9md7RUU3gzdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKXDH3cwlz11W3; Wed, 24 Jan 2024 05:13: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 40O5DZkn041763; Wed, 24 Jan 2024 05:13:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O5DZsk041760; Wed, 24 Jan 2024 05:13:35 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:13:35 GMT Message-Id: <202401240513.40O5DZsk041760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 3d59b93b207e - main - kern_openat(): minor style fixes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3d59b93b207e5008ea0b79b38268243abf225546 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3d59b93b207e5008ea0b79b38268243abf225546 commit 3d59b93b207e5008ea0b79b38268243abf225546 Author: Konstantin Belousov AuthorDate: 2024-01-20 21:42:39 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-24 05:13:25 +0000 kern_openat(): minor style fixes Reviewed by: markj, pjd Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43529 --- sys/kern/vfs_syscalls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index cccb24257e11..5d065e638203 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1114,16 +1114,18 @@ int kern_openat(struct thread *td, int dirfd, const char *path, enum uio_seg pathseg, int flags, int mode) { - struct proc *p = td->td_proc; + struct proc *p; struct filedesc *fdp; struct pwddesc *pdp; struct file *fp; struct vnode *vp; + struct filecaps *fcaps; struct nameidata nd; cap_rights_t rights; int cmode, error, indx; indx = -1; + p = td->td_proc; fdp = p->p_fd; pdp = p->p_pd; @@ -1229,8 +1231,6 @@ success: * If we haven't already installed the FD (for dupfdopen), do so now. */ if (indx == -1) { - struct filecaps *fcaps; - #ifdef CAPABILITIES if ((nd.ni_resflags & NIRES_STRICTREL) != 0) fcaps = &nd.ni_filecaps; From nobody Wed Jan 24 05:13:36 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKXDJ6wKVz57T3q; Wed, 24 Jan 2024 05:13: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 4TKXDJ5VX3z4dsw; Wed, 24 Jan 2024 05:13:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pa7E+lbHW8cbmeBA/YjU+U0PUW+r6nwNGU2RTQytfLs=; b=oqEuXS5HdCps+sREN2P8gX3fSZXNGC1f8YPcxVchhM17xii9GhD30Vf+vUmq6vGVt3nne/ 69cuOn2tBlUttiGMxRDv94nAAdrF8xeq5BnvoSisXTQJ++VXjjrV/F91K7oc7pD0oiSzcm We0C85Oh6lbfrd1nd5Yr2YHD10oOAYmDDv9DdBYQ/gFFGG02TpAUhPN/6vJmCUUMH6prlr hp6sfzkBq2H2wo9Dn7YvEgT93R0sT2Fw/I1OuMMI0j14xmo6UuVV1Ky6BOhXHjhxJccM5B Ao4r3kY2kxJZx/KuiO91i8Gj/olgPvqHIdd0JFncrUooUwAWB4mUu0aoAeSSgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073216; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Pa7E+lbHW8cbmeBA/YjU+U0PUW+r6nwNGU2RTQytfLs=; b=giPjvjt3t19dJX6bDWIUI4yq+P5Hvtowu3e0/EhZNLEiET3kRh3y07ocGbG4UhUkuKGwv1 56KNWQ296CTAKguCbprTeNJj67wdqeJwnyFdNjG3fDYSa72sxoPt9/gyI9zOprNl+NmA23 4LiFOSwnhbicaBVU7exDqF0dviVkRs2ypvVwvyIuP/v66XsbjU2lqMNl0GOjHlnoUOcyaK rHaIo+KDsJkvJMSVSiZlGJHQmkz/I+kpuQ0IeSE3BXrYUVdnt/PsEvTq2+zbHzbnJUHMs5 AXpukSAhggYMqWawsACCirM0WNAW/T5bb/kjSN/kr9+C5jDq26mApgbcRVcw3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706073216; a=rsa-sha256; cv=none; b=sqOrLmUngqPTt6Z7/DWkni0Tc789eJnQHwvQ9TnZUuBWoE5YX7bDk3uh7lFpm+Qf6oOTO8 ctz/FdMqUp7hy2a3uRUCQAYNjJf9QA8B7lq3jcOrXLyqtoFNj6xxovQwPeXTRZx3AbUoVm qjtAiVAkXzBhfz+ymKJEISWA4qjbUs+J1iTXkYTTVOBw5oAmbyUF9FcrMPREK1/yCFngZ1 W9WJE+u1pzWT19YFL6VKm65do6/+8PIRI1a42PFSGu2yVIlWTl+e0v4Xt0iAd7PvmUlF+8 FoN4AzFJZZUfwHMmS/1rnHVqmCatOV960RyMyx9R4jNfCGGDmqjlWiFobKqfzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKXDJ4ZvZz11Sw; Wed, 24 Jan 2024 05:13: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 40O5DaJ4041805; Wed, 24 Jan 2024 05:13:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O5Daih041802; Wed, 24 Jan 2024 05:13:36 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:13:36 GMT Message-Id: <202401240513.40O5Daih041802@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: c662306e19ce - main - Add kern_openatfp(9) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c662306e19ce60d0f5e5e32a22ddcd5c79a90849 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c662306e19ce60d0f5e5e32a22ddcd5c79a90849 commit c662306e19ce60d0f5e5e32a22ddcd5c79a90849 Author: Konstantin Belousov AuthorDate: 2024-01-20 20:34:46 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-24 05:13:26 +0000 Add kern_openatfp(9) Reviewed by: markj, pjd Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43529 --- sys/kern/vfs_syscalls.c | 39 ++++++++++++++++++++++++++++++++++++--- sys/sys/syscallsubr.h | 2 ++ 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 5d065e638203..c9a039515a77 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1110,9 +1110,14 @@ sys_openat(struct thread *td, struct openat_args *uap) uap->mode)); } -int -kern_openat(struct thread *td, int dirfd, const char *path, - enum uio_seg pathseg, int flags, int mode) +/* + * If fpp != NULL, opened file is not installed into the file + * descriptor table, instead it is returned in *fpp. This is + * incompatible with fdopen(), in which case we return EINVAL. + */ +static int +openatfp(struct thread *td, int dirfd, const char *path, + enum uio_seg pathseg, int flags, int mode, struct file **fpp) { struct proc *p; struct filedesc *fdp; @@ -1186,6 +1191,7 @@ kern_openat(struct thread *td, int dirfd, const char *path, if ((nd.ni_resflags & NIRES_STRICTREL) == 0 && (error == ENODEV || error == ENXIO) && td->td_dupfd >= 0) { + MPASS(fpp == NULL); error = dupfdopen(td, fdp, td->td_dupfd, flags, error, &indx); if (error == 0) @@ -1227,6 +1233,13 @@ kern_openat(struct thread *td, int dirfd, const char *path, goto bad; } success: + if (fpp != NULL) { + MPASS(error == 0); + NDFREE_IOCTLCAPS(&nd); + *fpp = fp; + return (0); + } + /* * If we haven't already installed the FD (for dupfdopen), do so now. */ @@ -1256,6 +1269,26 @@ bad: return (error); } +int +kern_openat(struct thread *td, int dirfd, const char *path, + enum uio_seg pathseg, int flags, int mode) +{ + return (openatfp(td, dirfd, path, pathseg, flags, mode, NULL)); +} + +int +kern_openatfp(struct thread *td, int dirfd, const char *path, + enum uio_seg pathseg, int flags, int mode, struct file **fpp) +{ + int error, old_dupfd; + + old_dupfd = td->td_dupfd; + td->td_dupfd = -1; + error = openatfp(td, dirfd, path, pathseg, flags, mode, fpp); + td->td_dupfd = old_dupfd; + return (error); +} + #ifdef COMPAT_43 /* * Create a file. diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 50dc3ad7d126..c99eebd6d5d4 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -253,6 +253,8 @@ int kern_ommap(struct thread *td, uintptr_t hint, int len, int oprot, int oflags, int fd, long pos); int kern_openat(struct thread *td, int dirfd, const char *path, enum uio_seg pathseg, int flags, int mode); +int kern_openatfp(struct thread *td, int dirfd, const char *path, + enum uio_seg pathseg, int flags, int mode, struct file **fpp); int kern_pathconf(struct thread *td, const char *path, enum uio_seg pathseg, int name, u_long flags, long *valuep); int kern_pipe(struct thread *td, int fildes[2], int flags, From nobody Wed Jan 24 05:13:37 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKXDL0MJ3z57SxQ; Wed, 24 Jan 2024 05:13: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 4TKXDK6Dd0z4dr1; Wed, 24 Jan 2024 05:13:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uLszs25+0AysWCfXxYEL+EHC2TZCdhSYGO/JbElbmA8=; b=q7fvU6oKkIrdJ5BzxJmqKBD6hEO0Dy1QKnZaXPFqOb7/wlLC5PVgQS9UCCo1YUUuNeoOGh PJGDXi+KIKNB6cXISfwSyh2Y3QAcJArbT8xkEsJT71yJB6Uqa8ZTAI2gxiTNXQ3SclWvtB rCSAt7d5xnbOdf89JySLW3/zxOvqR0t1BW8OVDJtsfkI30D3uHju3+VTMLeJ7He75srfKJ Z4BrENZxFcG1l3lmmUTsIrVXORsIUP+3h4xKa9zKS7w0tJGaMl4WorwXDd6vvy/mWYWv73 LCnFFcEMr1dOwPxsjDWzN5mNxu3auzMFKi+Eeqpjhg/1VYtiOSEo1vHxDbY4IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706073217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uLszs25+0AysWCfXxYEL+EHC2TZCdhSYGO/JbElbmA8=; b=gKYYsVfbg5Y9kss+BwCtLqKwok97EPLbyvgS6tK2hrDAe0UuWkYLDDc8pCSxNx3+GS0AH+ MpSa8FkOorOnsNIapeHuBFPIKsxRxlIwvPHINoUclgNrKNVzOwsM4D7xvFiJXPEN5gpS3P wOov9wt+HWud3vB2bIYxtCgYfV/1KsDYrsGSxtG3pqpm7Sx0bMwCVhZexwzrpC0TLdbjeH YKbXdxDD0IaW9uTJVAaUE9+zt5yTc4YBB2VjaoiaUMMlfWuM8PA42x9ZXwtFHaxtuNXia6 iKktbeunXXSj9JkzmuSEp8MW2AsXyMPzud1SVBJJLaUcpCaS4cDmegkSJxnNjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706073217; a=rsa-sha256; cv=none; b=JQEq/TmLhgVdggwKmnAaUieTRhRWr6ln35FbfGUjQQr96zpv68vnULjLcQ3i2Q6GNElAJr BSnW55yzGhFixFx17YDcwXrW/h+K5N/MCjvtOQrxRXeDGkuqUegMgEq/ooOyVQwCodn7dj 5RbjvZYWSWXRg0zb0z5EAl9VRaiEJx1OADQE7HggyuOuww9SqV3/preZ1mDniVBdgF4lXR b1/w2gdc2zQLTBTBBAz5ZXqLA1U96c93TEV+djPbnH0hb8q/zoccgjG2rM3yDUs1+4d0X4 E8wpbU4dqEG0E3wFf93Y0oByzUv7bH6FpoHfnfTuCMdrTJ97oZfW7ejCwKPagg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKXDK5LKfz11W4; Wed, 24 Jan 2024 05:13: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 40O5DbeV041850; Wed, 24 Jan 2024 05:13:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O5Dbco041847; Wed, 24 Jan 2024 05:13:37 GMT (envelope-from git) Date: Wed, 24 Jan 2024 05:13:37 GMT Message-Id: <202401240513.40O5Dbco041847@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 120ceebab5d4 - main - Bump __FreeBSD_version for kern_openatfp(9) and kcmp(2) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 120ceebab5d4947dfc80d7492effa034a925d43e Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=120ceebab5d4947dfc80d7492effa034a925d43e commit 120ceebab5d4947dfc80d7492effa034a925d43e Author: Konstantin Belousov AuthorDate: 2024-01-23 22:57:02 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-24 05:13:26 +0000 Bump __FreeBSD_version for kern_openatfp(9) and kcmp(2) --- sys/sys/param.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/param.h b/sys/sys/param.h index b5a5398497e0..3f99ee36e4af 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -73,7 +73,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500011 +#define __FreeBSD_version 1500012 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Wed Jan 24 08:56:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKd974dQfz57q2L; Wed, 24 Jan 2024 08:56:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKd9742VDz4vwb; Wed, 24 Jan 2024 08:56:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706086571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6RHKnNJY0fCdHftPlpWXeXAmNO+JB2nd+VsdgOnQsSY=; b=SkqP0tlUwvif1R2++7BYj0uZ0DaYguSGHO0IT2hpyM6i4nkH9eGpyygw438dytwwBO0P8d 2ctFUIGmouZ+tVUJdHVjjlUWS3xbJmvC7m3OZmcGfykfEr0mDH1/ewKd/JU7MeulxYCAN2 imgJ+nYuPdWgv7MvWtdEfaTcip6RjkmX46tpihgc/bgcLqveY/eVmRPaAIdwxcRUsIEzXm RAmRzYBN+GHQwpYotbIYRTvSa3RFn/r1xuMePElnetTmDbgmMbitPyP3qV9JI2ybwwyDQu YYjVNU9whYB2S2HhAENk3gA+a/kJ8wSunp7znBDkZI7ovQengRKcPUr9zspd5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706086571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6RHKnNJY0fCdHftPlpWXeXAmNO+JB2nd+VsdgOnQsSY=; b=PB+2ir5pV4AVoWQufhDyi7y1O6kkLhwfi2ythZkPw0pbyf+l95bmCXth4DcpRS0Uv0R3Bz lP55kBTCI8jR4jC8bx4UgFfM5SmRTzb2X3jNeDGSL3Ndm8UCK6jNHTp+jLRZV9TrjQDDQb xVT3jWmzFNNN3ncVeJIZjDAmqAgL55xF5x3gJrT/QrcqDi+CC5+VV8cGZjwqBLM2oGROxx mBk7CJps/VF4O+wxKiVrXQgZEQiKESymMY9JXHW2Da7tJ/ELG1Uv5DdOzot+CtE+kIETlX 7ndCM5deHvq1tCi+zYGhbGdkdGA0F+WPzgHMctgke0gyn9ERHncqtN69MMWpQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706086571; a=rsa-sha256; cv=none; b=hox0vaiuS1SyCXs2YcnMBK1bx8B4SBl+kEazvASPpSnuquANSksP48J3XWdPG+TfioUorX 76ASzNZITELIlW6elyDDGdkkavAluQ/z/iXbjlIK5/Bagtw5iU3g/bTqKprLhk7G0UlUXz rCZP2USB4RwYhcK9F7XscutD9mNZ7J/jIrkPje3pS+Yn5dMldZk4aYRkJR98HAamyQ3ILY ZofsuwXwkzSDdzoLk4RmFuyp+xiC1BAmeNVu0XwMAKMoy5d8doWL0XMSStP94soGBK3ZTl 4xT6y+8JYJdjVOnLADPk/NnTEP3GLagdgaOyijWGoMP8mOVArng2B+ds3TuJ9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKd9735pRz16V2; Wed, 24 Jan 2024 08:56: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 40O8uBwh010155; Wed, 24 Jan 2024 08:56:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O8uBv3010152; Wed, 24 Jan 2024 08:56:11 GMT (envelope-from git) Date: Wed, 24 Jan 2024 08:56:11 GMT Message-Id: <202401240856.40O8uBv3010152@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: d7e45d5b9002 - main - stress2: remove the usage of fdisk(8) as this is soon to be removed List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d7e45d5b90025aa1c275fdfa783051006ac4b0f9 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=d7e45d5b90025aa1c275fdfa783051006ac4b0f9 commit d7e45d5b90025aa1c275fdfa783051006ac4b0f9 Author: Peter Holm AuthorDate: 2024-01-24 08:54:17 +0000 Commit: Peter Holm CommitDate: 2024-01-24 08:54:17 +0000 stress2: remove the usage of fdisk(8) as this is soon to be removed --- tools/test/stress2/misc/fork2.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/test/stress2/misc/fork2.sh b/tools/test/stress2/misc/fork2.sh index 1cb66fff34c7..4dbe2de3f6d1 100755 --- a/tools/test/stress2/misc/fork2.sh +++ b/tools/test/stress2/misc/fork2.sh @@ -49,9 +49,8 @@ set -e mount | grep "on $mntpoint " | grep -q /dev/md && umount -f $mntpoint [ -c /dev/md$mdstart ] && mdconfig -d -u $mdstart mdconfig -a -t swap -s 2g -u $mdstart -bsdlabel -w md$mdstart auto -newfs $newfs_flags md${mdstart}$part > /dev/null -mount /dev/md${mdstart}$part $mntpoint +newfs $newfs_flags md$mdstart > /dev/null +mount /dev/md$mdstart $mntpoint set +e cd $mntpoint From nobody Wed Jan 24 08:56:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKd985KQqz57qD1; Wed, 24 Jan 2024 08:56: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 4TKd984nDwz4vwd; Wed, 24 Jan 2024 08:56:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706086572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wInMDw7RYbHc5H9VyFg7sTDtjEQ6pS6WwcHFzber+4I=; b=K7r6xFYGOqSaMxNCPG6vf7Tqqf+n4BgtqlKNO31EfmtMGnKFIDrGJW/HauAH5X42n4/SHr bGN7/VUdbLwPT29UZMAazKgc88RFh+YFGretBnh9aKNyfo9ms70pqf0BLHR0SkM/Bqa2rn l5brFAoEbe9u7zM3KbWEwJwOyeVxjNnRgiqQGXjODGLnblINpuJRkLAod7LmPZmnnwTtU7 LlrstuCuKO87bIemZv6ComPx3GQu5xyzdqTMeyivZ5uEQ08TTJCpSjIjkwuIGtHcJB3cqy iWZHtviucWRj8HJATcxnAV0dd4WiXVuLFmEdzeZUesqPLIc2He0jMpNJob6AFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706086572; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wInMDw7RYbHc5H9VyFg7sTDtjEQ6pS6WwcHFzber+4I=; b=CbAN2TDzXqu7NDfBU8FLtxIAEJUKjTelZvJVURgZpD/TOHPYHHp6HmP+5NiXNIp+RzakYR PK0tR8tLDmOWKpRKuYPHHCfhRk+89YjnHlrZ+2IFNDYTUil4bqzMTA7EoRc9UqyADyTJaZ +wab3iPAL4+TXyk/7H5wsqGQBnw5KIFBhgRmmk7AXTA5JcllJlZc+XzQF1JQxuJJ7+UP0F 4WRRTCUnZohesaNTYsYCe8LT+1B6y/6AY7xFdhdBgc+0rQ7Cy/x0I2tq66YhWhYruw/KGN KA3No+jiSJhAI59JF9hu1ovar+l2ulme1zk6kRHYvIMXIzgwRTldO85v2obHKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706086572; a=rsa-sha256; cv=none; b=XnG7Ab7/bXKCRiRPoctXFR37rstZCx44dHU7I/HkyrrzdcLvY+ap4WswtqCGJmPvobf7B8 6NQELs4vOBPJ3zkW5VITC4F2JrYPJT7LzCmKbTQenhQ7OjB8WTlD3kw3fhrPncu5JJfJJu S3OtQcJQ8OSLPcmSLBhTqVX/T2jLt0M7mG2EeK6R9zho+X+sChlGOQTI/8ym2Jq2WZPext ScXcBiNtMAgcVWX+MeyjyWc9+bPNYR41MK4bIqt+yTmmKEGkQjemlYWlA48Xvprq/v7BtT 3D4J3ff6GI3TH5M1tlHIKeSO9FnFp7pc5gONLOW/EWDZdn+RMgKsXTyKmhkb3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKd983rGYz16V3; Wed, 24 Jan 2024 08:56: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 40O8uCnM010197; Wed, 24 Jan 2024 08:56:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40O8uCiw010194; Wed, 24 Jan 2024 08:56:12 GMT (envelope-from git) Date: Wed, 24 Jan 2024 08:56:12 GMT Message-Id: <202401240856.40O8uCiw010194@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 7304bd7a526c - main - stress2: Remove fdisk(8) regression test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7304bd7a526cbfc049d0348fe72c93f5309065d0 Auto-Submitted: auto-generated The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=7304bd7a526cbfc049d0348fe72c93f5309065d0 commit 7304bd7a526cbfc049d0348fe72c93f5309065d0 Author: Peter Holm AuthorDate: 2024-01-24 08:55:34 +0000 Commit: Peter Holm CommitDate: 2024-01-24 08:55:34 +0000 stress2: Remove fdisk(8) regression test --- tools/test/stress2/misc/md4.sh | 44 ------------------------------------------ 1 file changed, 44 deletions(-) diff --git a/tools/test/stress2/misc/md4.sh b/tools/test/stress2/misc/md4.sh deleted file mode 100755 index 0d760b99b058..000000000000 --- a/tools/test/stress2/misc/md4.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -# -# Copyright (c) 2013 Peter Holm -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# - -# Demonstrate data corruption on the swap-backed md. -# Test scenario by Nigel Williams . -# Fixed in r250966. - -[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 -[ -z "`which bsdlabel`" ] && exit 0 - -status=0 -MD_DEV=`mdconfig -an -t swap -s 1m -x 63 -y 16` -fdisk -I md$MD_DEV > /dev/null 2>&1 -bsdlabel -w -B md${MD_DEV}s1 || exit 1 -dd if=/dev/md$MD_DEV of=/dev/null bs=64k status=none -bsdlabel md${MD_DEV}s1 > /dev/null || - { echo FAIL; status=1; } -mdconfig -d -u $MD_DEV -exit $status From nobody Wed Jan 24 10:05:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKfjg0ncdz57x71; Wed, 24 Jan 2024 10:05:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKfjg07hbz4634; Wed, 24 Jan 2024 10:05:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706090759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZxNvih30DzHq7wfgbfjzE4jLee5zGTDLmfzxcl9m11A=; b=J8tGLEP5OQTBa27eH1zx+7ikjBdLTM3d4H2QyIKvQ+A5VAdxYGQ7lfM8sS2a8xDFqsNucH Q1OnIUJwkwSB+u15htsjvHgdoPnLJiolPdaY7JlzJQQWMMx9bPss+WIVizDTflYq2K9PfP 5B4n6Mfczkpkh+m3mQswM4+AlDnpfA5T5XE+OYnnCoitBiu4teK55qwgIUJz11wDIBJdbd zjqaqTUj0V9/7jUU/wf40YNUwwkiUJ6wkExr+H41dMpj2veGYScnLIwlS3txO2smOCLQ2W YSAFzrHktTkBqSxzA6A/7PtqYZnsz5ru09V85Up1xsDVDwUZjN5hwuypag3AdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706090759; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZxNvih30DzHq7wfgbfjzE4jLee5zGTDLmfzxcl9m11A=; b=he6bkg91LPfN7rRKBTSgDND5aTyNCtLwaqpplYWGLnmIdgbVoXmV4IDx6Xt9Pyeond4qr0 8kzEcvSFhUo+WXp2GsoDgrUxYTY24zyf+K5UXNhN8hehGj+tW/Z9+Y2myJ5hVT92CQ98oa 0MutGq5dE37LLxhmvd7UXc7qRZIKzfS/Ccepp4vh3h8aCQa+2WAM+clEBAfu2BlykHPT68 1U58zBmXj5tKoEwO90hn5KYowV9KPxKuJ+o0AgyDGCVyjXYCbz9kvdMtTNuWhaLd57UEFM EueiU4LJ4Fp1M99aO4JCjaLUQLi5G8PE3Ul4/vNW70i5E59cTf5vq+GGjoYwvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706090759; a=rsa-sha256; cv=none; b=A60jb6EulZVWt9kl7RyKGvdYoxuQYGvakQF/y3Zphlt1MF0U42AWhvDOmpO98/dQTJTnp2 VRBakN4OEFg1sMX6JlNpM/o05bs13pOOjqxeH4Ov1Dgnyz4mtiStjVHkcgEO93zIU9AsTQ 1vV4ev72PxeTmFeWxBFYX6cd0OXZa62mbLPgSGTFI1gwxpltrOOysBCfJXbnCymcklRa9w h81ERifn2EgSgLooBA+wW3uPNssZaQydKOulQgKy6qcI/uD+/+vYXRQB0KU3FdM8BgBcNQ LDHGvKREiWXb4HzMWISuNC3kC0RawAsqmrq7vI2hCWoQdgA18/vZK8gDVfczYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKfjf63Rlz18Qd; Wed, 24 Jan 2024 10:05: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 40OA5w5r029145; Wed, 24 Jan 2024 10:05:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40OA5wob029142; Wed, 24 Jan 2024 10:05:58 GMT (envelope-from git) Date: Wed, 24 Jan 2024 10:05:58 GMT Message-Id: <202401241005.40OA5wob029142@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Tijl Coosemans Subject: git: 95bf75895ddc - main - join(1): Fix ordering in case of missing fields List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tijl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 95bf75895ddcf17402b1f69dce26cb821c922476 Auto-Submitted: auto-generated The branch main has been updated by tijl: URL: https://cgit.FreeBSD.org/src/commit/?id=95bf75895ddcf17402b1f69dce26cb821c922476 commit 95bf75895ddcf17402b1f69dce26cb821c922476 Author: Tijl Coosemans AuthorDate: 2024-01-22 10:35:31 +0000 Commit: Tijl Coosemans CommitDate: 2024-01-24 09:58:00 +0000 join(1): Fix ordering in case of missing fields The comparison function had the ordering reversed causing join(1) to miss some matching lines. PR: 232405 Submitted by: Martijn van Duren MFC after: 1 week --- usr.bin/join/join.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/join/join.c b/usr.bin/join/join.c index 09263ea16c22..b1be8cd81690 100644 --- a/usr.bin/join/join.c +++ b/usr.bin/join/join.c @@ -380,9 +380,9 @@ static int cmp(LINE *lp1, u_long fieldno1, LINE *lp2, u_long fieldno2) { if (lp1->fieldcnt <= fieldno1) - return (lp2->fieldcnt <= fieldno2 ? 0 : 1); + return (lp2->fieldcnt <= fieldno2 ? 0 : -1); if (lp2->fieldcnt <= fieldno2) - return (-1); + return (1); return (mbscoll(lp1->fields[fieldno1], lp2->fields[fieldno2])); } From nobody Wed Jan 24 10:06:34 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKfkv4jJ8z57xLJ; Wed, 24 Jan 2024 10:07:03 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from mail.bsd4all.net (mail.bsd4all.net [94.130.200.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail.bsd4all.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKfkv2ZQzz46Zl; Wed, 24 Jan 2024 10:07:03 +0000 (UTC) (envelope-from herbert@gojira.at) Authentication-Results: mx1.freebsd.org; none Date: Wed, 24 Jan 2024 11:06:34 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gojira.at; s=mail202005; t=1706090820; bh=wy+KS0UiUiz4P97a8O1Birnrz6rg3D1nG3qhiUPlqQU=; h=Date:Message-ID:From:To:Cc:Subject:MIME-Version:Content-Type; b=ctTNEWclz/gnrPF786MyO3jvx8/MCtSgKi9FARkeka7xu67t1a/bj1RcITimh+fjg MOph2BdMMmc8xCRbL176ZJe305WOyenEPoRbDYH3q3r5+XiPz1yv/Fh5GQXzQVLkp2 qHGbROTdL96Bn1z7usWZNJIrnM9pBDboZVvR3g04DuJHBuKxObWLh6ZuQylMhAWwVG JJPNwQXYqhrRe2tjHHF9AhZuhZk2WF5oWyBpEkaASDwql/25ZtZM+N9HrjoDkua40t 7DJ90gno0O7OH2YTvQB8ccawADuaIawGAWSJKHRmMz9bFH971QpspoK5MJ0IsRjU7t sXdPNxxkbQryA== Message-ID: <87sf2nm4et.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: Kristof Provost Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 54c62e3e5d8c - main - pf: work around icmp6 packet-too-big not being sent when binat-ing In-Reply-To: <1E1C3472-0AF3-457B-A27A-89679770EA62@FreeBSD.org> References: <202401221252.40MCqpf6047526@gitrepo.freebsd.org> <87v87jkii9.wl-herbert@gojira.at> <1E1C3472-0AF3-457B-A27A-89679770EA62@FreeBSD.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/29.2 Mule/6.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4TKfkv2ZQzz46Zl X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:94.130.0.0/16, country:DE] On Tue, 23 Jan 2024 19:42:10 +0100, Kristof Provost wrote: > > On 23 Jan 2024, at 19:32, Herbert J. Skuhra wrote: > > On Mon, 22 Jan 2024 13:52:51 +0100, Kristof Provost wrote: > >> > >> The branch main has been updated by kp: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=54c62e3e5d8cd90c5571a1d4c8c5f062d580480e > >> > >> commit 54c62e3e5d8cd90c5571a1d4c8c5f062d580480e > >> Author: Kristof Provost > >> AuthorDate: 2024-01-17 17:11:27 +0000 > >> Commit: Kristof Provost > >> CommitDate: 2024-01-22 11:52:14 +0000 > >> > >> pf: work around icmp6 packet-too-big not being sent when binat-ing > >> > >> If we're applying NPTv6 we pass a packet with a modified source and/or > >> destination address to the network stack. > >> > >> If that packet then turns out to be larger than the MTU of the sending > >> interface the stack will attempt to generate an icmp6 packet-too-big > >> error, but may fail to look up the appropriate source address for that > >> error message. Even if it does, pf would still have to undo the binat > >> operation inside the icmp6 packet so the sending host can make sense of > >> the error. > >> > >> We can avoid both problems entirely by having pf also perform the MTU > >> check (taking the potential refragmentation into account), and > >> generating the icmp6 error directly in pf. > >> > >> See also: https://redmine.pfsense.org/issues/14290 > >> Sponsored by: Rubicon Communications, LLC ("Netgate") > >> Differential Revision: https://reviews.freebsd.org/D43499 > >> --- > >> sys/net/pfvar.h | 1 + > >> sys/netpfil/pf/pf.c | 12 ++++++++++++ > >> sys/netpfil/pf/pf_norm.c | 15 +++++++++++++++ > >> 3 files changed, 28 insertions(+) > > > > Does this change cause problems for others too? > > > > - ssh over IPv6 permanently disconnecting > > (client_loop: send disconnect: Broken pipe) > > - ssh connections over IPv6 hanging > > - git pull not working > > Fssh_ssh_dispatch_run_fatal: Connection to 2604:1380:4091:a001::24ca:1 port 22: Permission denied > > fatal: Could not read from remote repository. > > > Can you include your pf.conf and a packet capture demonstrating one of these issues? So I assume this issue affects only me or this server (igb nic). Disabling tso6 seems to resolve the issue. I also have an issue with rack enabled. I only works with lro disabled or net.inet.tcp.rack.features.cmpack=0. I'll check pf.conf and packet capture later. Thanks. -- Herbert From nobody Wed Jan 24 10:16:43 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKfy93RNgz57y7v; Wed, 24 Jan 2024 10:16:49 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "Sectigo RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKfy9022tz472q; Wed, 24 Jan 2024 10:16:49 +0000 (UTC) (envelope-from tuexen@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from smtpclient.apple (unknown [IPv6:2a02:8109:1140:c3d:e94b:5726:154f:104e]) (Authenticated sender: micmac) by drew.franken.de (Postfix) with ESMTPSA id E6F85721E280D; Wed, 24 Jan 2024 11:16:43 +0100 (CET) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.400.31\)) Subject: Re: git: 54c62e3e5d8c - main - pf: work around icmp6 packet-too-big not being sent when binat-ing From: tuexen@freebsd.org In-Reply-To: <87sf2nm4et.wl-herbert@gojira.at> Date: Wed, 24 Jan 2024 11:16:43 +0100 Cc: Kristof Provost , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <413C7C6F-8B6F-4EAD-8EF7-7C9245BE78BF@freebsd.org> References: <202401221252.40MCqpf6047526@gitrepo.freebsd.org> <87v87jkii9.wl-herbert@gojira.at> <1E1C3472-0AF3-457B-A27A-89679770EA62@FreeBSD.org> <87sf2nm4et.wl-herbert@gojira.at> To: "Herbert J. Skuhra" X-Mailer: Apple Mail (2.3774.400.31) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_SCC_BODY_TEXT_LINE autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 4TKfy9022tz472q X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:680, ipnet:193.174.0.0/15, country:DE] > On Jan 24, 2024, at 11:06, Herbert J. Skuhra = wrote: >=20 > On Tue, 23 Jan 2024 19:42:10 +0100, Kristof Provost wrote: >>=20 >> On 23 Jan 2024, at 19:32, Herbert J. Skuhra wrote: >>> On Mon, 22 Jan 2024 13:52:51 +0100, Kristof Provost wrote: >>>>=20 >>>> The branch main has been updated by kp: >>>>=20 >>>> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D54c62e3e5d8cd90c5571a1d4c8c5f062= d580480e >>>>=20 >>>> commit 54c62e3e5d8cd90c5571a1d4c8c5f062d580480e >>>> Author: Kristof Provost >>>> AuthorDate: 2024-01-17 17:11:27 +0000 >>>> Commit: Kristof Provost >>>> CommitDate: 2024-01-22 11:52:14 +0000 >>>>=20 >>>> pf: work around icmp6 packet-too-big not being sent when = binat-ing >>>>=20 >>>> If we're applying NPTv6 we pass a packet with a modified source = and/or >>>> destination address to the network stack. >>>>=20 >>>> If that packet then turns out to be larger than the MTU of the = sending >>>> interface the stack will attempt to generate an icmp6 = packet-too-big >>>> error, but may fail to look up the appropriate source address for = that >>>> error message. Even if it does, pf would still have to undo the = binat >>>> operation inside the icmp6 packet so the sending host can make = sense of >>>> the error. >>>>=20 >>>> We can avoid both problems entirely by having pf also perform the = MTU >>>> check (taking the potential refragmentation into account), and >>>> generating the icmp6 error directly in pf. >>>>=20 >>>> See also: https://redmine.pfsense.org/issues/14290 >>>> Sponsored by: Rubicon Communications, LLC ("Netgate") >>>> Differential Revision: https://reviews.freebsd.org/D43499 >>>> --- >>>> sys/net/pfvar.h | 1 + >>>> sys/netpfil/pf/pf.c | 12 ++++++++++++ >>>> sys/netpfil/pf/pf_norm.c | 15 +++++++++++++++ >>>> 3 files changed, 28 insertions(+) >>>=20 >>> Does this change cause problems for others too? >>>=20 >>> - ssh over IPv6 permanently disconnecting >>> (client_loop: send disconnect: Broken pipe) >>> - ssh connections over IPv6 hanging >>> - git pull not working >>> Fssh_ssh_dispatch_run_fatal: Connection to = 2604:1380:4091:a001::24ca:1 port 22: Permission denied >>> fatal: Could not read from remote repository. >>>=20 >> Can you include your pf.conf and a packet capture demonstrating one = of these issues? >=20 > So I assume this issue affects only me or this server (igb nic).=20 > Disabling tso6 seems to resolve the issue. >=20 > I also have an issue with rack enabled. I only works with lro disabled > or net.inet.tcp.rack.features.cmpack=3D0. I think I know what the issue is (some hooks are not called when in the = compressed ack code path), some dtrace probes are also affected. I'm working on a fix for that. Best regards Michael >=20 > I'll check pf.conf and packet capture later. >=20 > Thanks. >=20 > -- > Herbert From nobody Wed Jan 24 11:42:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKhrl1J7Zz586Cn; Wed, 24 Jan 2024 11:42: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 4TKhrl0FSfz4LZF; Wed, 24 Jan 2024 11:42:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706096535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y39kBpdhLkSIi2i97VJnBzaKiZPR3Gruix+vuztRHR8=; b=SsjGQy3YySgLRN1yN9RpL0Rpz4OPHc+qXCHpnstKk3XP9X0KoQ/M1g6TT2XAElI4RwekxY oTilLSnZdov37aszwYCRWp2QpaNBuVcIGaeZFHMKDIQZRfgao/f+VC9BHe6QDQAsoh9DzL rJA4c5XIeqk6loZvMdiJFEBqrsfoF7QFioclqJtV3DOXh5wtFf6SRhRmACI7VPmLLdI0u8 YtHraNuZuYvbBF1eYpvtXoV20WqOeOYcfvqf9++4ectOuLGa2Hptvd4vOYv/1fPvBLPhrY npM6oWXLvQG5KjcEthVNKBdcbjcLCnPkBIdIcjplD95T+MMbD2OPIMPOpx48ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706096535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Y39kBpdhLkSIi2i97VJnBzaKiZPR3Gruix+vuztRHR8=; b=nFRme+b5t3RI8HO9PT6PT0yxnZspKW1S9fnT+nugdDfayK62g5PvlMlUJBsmyFcpRzcTpP 7ll7woqGA2HD90A5cOThnSqqzbCzRf5ls2vruY7srz4omwM+H1/Cisvyvc0FZgF2zxH7Hz KHmc+BXMlCrpEcDFELsiN5qyD/2Ta1MVoIguMLWn51aFJjswu+SuO8tzpFKbHQwM8r8zAf jHzqwO46SnbXYR5MrU9fFbrhCR8cKZNAyEqvkhUyXm+3dAZkcp2eJtCxGg+wuwiED3Onlw DOpATjOFDm/Vn5BKGz2F8lgagA1okjNVXwpZllwvDhLHyGFQ2LfW62ykZKcWug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706096535; a=rsa-sha256; cv=none; b=aBWT+DK5FMtBS4epBnYJP6wLofC8g9srCX43rm9C3qufaqNGxQLrfRf5BheuWNCQ68Clnf 4fkf9CuEc1xIMwaFm2rM55YkFdb8m4QR5gO90MvUwOOtu+hYV7yzD6ABX1k8jyy9MMaxdq bpMQHC3KWN2JWPsffAUS7v0939RD6IndyxSHXT3yjc2ZZ2mIuZnsCeZfdfmEadLQs5Nid/ a9TTK4WgueBM9BS87Fqkwm7jbkt5CgWu6+okZdjWxEw4NkC/A+sfGW5HY+qDDgsGK8UaOQ 3ZSxJwMjh9FQthWtpVdOrAsTlIEE+7BPgxuDtk7+wVUJFf8b7gwj5amLf4HLzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKhrk6QXNz1Bt2; Wed, 24 Jan 2024 11:42: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 40OBgELW095834; Wed, 24 Jan 2024 11:42:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40OBgC6M095825; Wed, 24 Jan 2024 11:42:12 GMT (envelope-from git) Date: Wed, 24 Jan 2024 11:42:12 GMT Message-Id: <202401241142.40OBgC6M095825@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: fedf5b965fd6 - main - zfs: merge openzfs/zfs@a4bf6baae List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fedf5b965fd623957a9b851418ba3301ac122e27 Auto-Submitted: auto-generated The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=fedf5b965fd623957a9b851418ba3301ac122e27 commit fedf5b965fd623957a9b851418ba3301ac122e27 Merge: 95bf75895ddc a4bf6baaeb70 Author: Martin Matuska AuthorDate: 2024-01-24 11:41:22 +0000 Commit: Martin Matuska CommitDate: 2024-01-24 11:41:51 +0000 zfs: merge openzfs/zfs@a4bf6baae Notable upstream pull request merges: #15630 a4bf6baae FreeBSD: Fix file descriptor leak on pool import #15780 d9cb42da9 FreeBSD: Fix bootstrapping tools under Linux/musl Obtained from: OpenZFS OpenZFS commit: a4bf6baaeb70a01a4c13fd6139ebdc97bad172e9 .../lib/libspl/include/os/freebsd/sys/stat.h | 6 ++- .../openzfs/module/os/freebsd/zfs/zfs_file_os.c | 63 +++++++++++++++++----- .../zfs-tests/tests/functional/bclone/cleanup.ksh | 9 +++- .../zfs-tests/tests/functional/bclone/setup.ksh | 5 ++ sys/modules/zfs/zfs_config.h | 4 +- sys/modules/zfs/zfs_gitrev.h | 2 +- 6 files changed, 72 insertions(+), 17 deletions(-) diff --cc sys/modules/zfs/zfs_config.h index 70eea47ba127,000000000000..f248e896babb mode 100644,000000..100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@@ -1,1176 -1,0 +1,1176 @@@ +/* + */ + +/* zfs_config.h. Generated from zfs_config.h.in by configure. */ +/* zfs_config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +/* #undef ENABLE_NLS */ + +/* bio_end_io_t wants 1 arg */ +/* #undef HAVE_1ARG_BIO_END_IO_T */ + +/* lookup_bdev() wants 1 arg */ +/* #undef HAVE_1ARG_LOOKUP_BDEV */ + +/* submit_bio() wants 1 arg */ +/* #undef HAVE_1ARG_SUBMIT_BIO */ + +/* bdi_setup_and_register() wants 2 args */ +/* #undef HAVE_2ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 2 args */ +/* #undef HAVE_2ARGS_VFS_GETATTR */ + +/* zlib_deflate_workspacesize() wants 2 args */ +/* #undef HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE */ + +/* bdi_setup_and_register() wants 3 args */ +/* #undef HAVE_3ARGS_BDI_SETUP_AND_REGISTER */ + +/* vfs_getattr wants 3 args */ +/* #undef HAVE_3ARGS_VFS_GETATTR */ + +/* vfs_getattr wants 4 args */ +/* #undef HAVE_4ARGS_VFS_GETATTR */ + +/* kernel has access_ok with 'type' parameter */ +/* #undef HAVE_ACCESS_OK_TYPE */ + +/* posix_acl has refcount_t */ +/* #undef HAVE_ACL_REFCOUNT */ + +/* add_disk() returns int */ +/* #undef HAVE_ADD_DISK_RET */ + +/* Define if host toolchain supports AES */ +#define HAVE_AES 1 + +/* Define if you have [rt] */ +#define HAVE_AIO_H 1 + +#ifdef __amd64__ +#ifndef RESCUE +/* Define if host toolchain supports AVX */ +#define HAVE_AVX 1 +#endif + +/* Define if host toolchain supports AVX2 */ +#define HAVE_AVX2 1 + +/* Define if host toolchain supports AVX512BW */ +#define HAVE_AVX512BW 1 + +/* Define if host toolchain supports AVX512CD */ +#define HAVE_AVX512CD 1 + +/* Define if host toolchain supports AVX512DQ */ +#define HAVE_AVX512DQ 1 + +/* Define if host toolchain supports AVX512ER */ +#define HAVE_AVX512ER 1 + +/* Define if host toolchain supports AVX512F */ +#define HAVE_AVX512F 1 + +/* Define if host toolchain supports AVX512IFMA */ +#define HAVE_AVX512IFMA 1 + +/* Define if host toolchain supports AVX512PF */ +#define HAVE_AVX512PF 1 + +/* Define if host toolchain supports AVX512VBMI */ +#define HAVE_AVX512VBMI 1 + +/* Define if host toolchain supports AVX512VL */ +#define HAVE_AVX512VL 1 +#endif + +/* bdevname() is available */ +/* #undef HAVE_BDEVNAME */ + +/* bdev_check_media_change() exists */ +/* #undef HAVE_BDEV_CHECK_MEDIA_CHANGE */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_63 */ + +/* bdev_*_io_acct() available */ +/* #undef HAVE_BDEV_IO_ACCT_OLD */ + +/* bdev_kobj() exists */ +/* #undef HAVE_BDEV_KOBJ */ + +/* bdev_max_discard_sectors() is available */ +/* #undef HAVE_BDEV_MAX_DISCARD_SECTORS */ + +/* bdev_max_secure_erase_sectors() is available */ +/* #undef HAVE_BDEV_MAX_SECURE_ERASE_SECTORS */ + +/* block_device_operations->submit_bio() returns void */ +/* #undef HAVE_BDEV_SUBMIT_BIO_RETURNS_VOID */ + +/* bdev_whole() is available */ +/* #undef HAVE_BDEV_WHOLE */ + +/* bio_alloc() takes 4 arguments */ +/* #undef HAVE_BIO_ALLOC_4ARG */ + +/* bio->bi_bdev->bd_disk exists */ +/* #undef HAVE_BIO_BDEV_DISK */ + +/* bio->bi_opf is defined */ +/* #undef HAVE_BIO_BI_OPF */ + +/* bio->bi_status exists */ +/* #undef HAVE_BIO_BI_STATUS */ + +/* bio has bi_iter */ +/* #undef HAVE_BIO_BVEC_ITER */ + +/* bio_*_io_acct() available */ +/* #undef HAVE_BIO_IO_ACCT */ + +/* bio_max_segs() is implemented */ +/* #undef HAVE_BIO_MAX_SEGS */ + +/* bio_set_dev() is available */ +/* #undef HAVE_BIO_SET_DEV */ + +/* bio_set_dev() GPL-only */ +/* #undef HAVE_BIO_SET_DEV_GPL_ONLY */ + +/* bio_set_dev() is a macro */ +/* #undef HAVE_BIO_SET_DEV_MACRO */ + +/* bio_set_op_attrs is available */ +/* #undef HAVE_BIO_SET_OP_ATTRS */ + +/* blkdev_get_by_path() exists and takes 4 args */ +/* #undef HAVE_BLKDEV_GET_BY_PATH_4ARG */ + +/* blkdev_get_by_path() handles ERESTARTSYS */ +/* #undef HAVE_BLKDEV_GET_ERESTARTSYS */ + +/* blkdev_issue_discard() is available */ +/* #undef HAVE_BLKDEV_ISSUE_DISCARD */ + +/* blkdev_issue_secure_erase() is available */ +/* #undef HAVE_BLKDEV_ISSUE_SECURE_ERASE */ + +/* blkdev_put() accepts void* as arg 2 */ +/* #undef HAVE_BLKDEV_PUT_HOLDER */ + +/* blkdev_reread_part() exists */ +/* #undef HAVE_BLKDEV_REREAD_PART */ + +/* blkg_tryget() is available */ +/* #undef HAVE_BLKG_TRYGET */ + +/* blkg_tryget() GPL-only */ +/* #undef HAVE_BLKG_TRYGET_GPL_ONLY */ + +/* blk_alloc_disk() exists */ +/* #undef HAVE_BLK_ALLOC_DISK */ + +/* blk_alloc_queue() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN */ + +/* blk_alloc_queue_rh() expects request function */ +/* #undef HAVE_BLK_ALLOC_QUEUE_REQUEST_FN_RH */ + +/* blk_cleanup_disk() exists */ +/* #undef HAVE_BLK_CLEANUP_DISK */ + +/* blk_mode_t is defined */ +/* #undef HAVE_BLK_MODE_T */ + +/* block multiqueue is available */ +/* #undef HAVE_BLK_MQ */ + +/* blk queue backing_dev_info is dynamic */ +/* #undef HAVE_BLK_QUEUE_BDI_DYNAMIC */ + +/* blk_queue_discard() is available */ +/* #undef HAVE_BLK_QUEUE_DISCARD */ + +/* blk_queue_flag_clear() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_CLEAR */ + +/* blk_queue_flag_set() exists */ +/* #undef HAVE_BLK_QUEUE_FLAG_SET */ + +/* blk_queue_flush() is available */ +/* #undef HAVE_BLK_QUEUE_FLUSH */ + +/* blk_queue_flush() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_FLUSH_GPL_ONLY */ + +/* blk_queue_secdiscard() is available */ +/* #undef HAVE_BLK_QUEUE_SECDISCARD */ + +/* blk_queue_secure_erase() is available */ +/* #undef HAVE_BLK_QUEUE_SECURE_ERASE */ + +/* blk_queue_update_readahead() exists */ +/* #undef HAVE_BLK_QUEUE_UPDATE_READAHEAD */ + +/* blk_queue_write_cache() exists */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE */ + +/* blk_queue_write_cache() is GPL-only */ +/* #undef HAVE_BLK_QUEUE_WRITE_CACHE_GPL_ONLY */ + +/* BLK_STS_RESV_CONFLICT is defined */ +/* #undef HAVE_BLK_STS_RESV_CONFLICT */ + +/* Define if release() in block_device_operations takes 1 arg */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG */ + +/* Define if revalidate_disk() in block_device_operations */ +/* #undef HAVE_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK */ + +/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the + CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYCURRENT */ + +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +/* #undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES */ + +/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in + the CoreFoundation framework. */ +/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */ + +/* check_disk_change() exists */ +/* #undef HAVE_CHECK_DISK_CHANGE */ + +/* clear_inode() is available */ +/* #undef HAVE_CLEAR_INODE */ + +/* dentry uses const struct dentry_operations */ +/* #undef HAVE_CONST_DENTRY_OPERATIONS */ + +/* copy_from_iter() is available */ +/* #undef HAVE_COPY_FROM_ITER */ + +/* copy_splice_read exists */ +/* #undef HAVE_COPY_SPLICE_READ */ + +/* copy_to_iter() is available */ +/* #undef HAVE_COPY_TO_ITER */ + +/* cpu_has_feature() is GPL-only */ +/* #undef HAVE_CPU_HAS_FEATURE_GPL_ONLY */ + +/* yes */ +/* #undef HAVE_CPU_HOTPLUG */ + +/* current_time() exists */ +/* #undef HAVE_CURRENT_TIME */ + +/* Define if the GNU dcgettext() function is already present or preinstalled. + */ +/* #undef HAVE_DCGETTEXT */ + +/* DECLARE_EVENT_CLASS() is available */ +/* #undef HAVE_DECLARE_EVENT_CLASS */ + +/* dentry aliases are in d_u member */ +/* #undef HAVE_DENTRY_D_U_ALIASES */ + +/* dequeue_signal() takes 4 arguments */ +/* #undef HAVE_DEQUEUE_SIGNAL_4ARG */ + +/* lookup_bdev() wants dev_t arg */ +/* #undef HAVE_DEVT_LOOKUP_BDEV */ + +/* sops->dirty_inode() wants flags */ +/* #undef HAVE_DIRTY_INODE_WITH_FLAGS */ + +/* disk_check_media_change() exists */ +/* #undef HAVE_DISK_CHECK_MEDIA_CHANGE */ + +/* disk_*_io_acct() available */ +/* #undef HAVE_DISK_IO_ACCT */ + +/* disk_update_readahead() exists */ +/* #undef HAVE_DISK_UPDATE_READAHEAD */ + +/* Define to 1 if you have the header file. */ +#define HAVE_DLFCN_H 1 + +/* d_make_root() is available */ +/* #undef HAVE_D_MAKE_ROOT */ + +/* d_prune_aliases() is available */ +/* #undef HAVE_D_PRUNE_ALIASES */ + +/* dops->d_revalidate() operation takes nameidata */ +/* #undef HAVE_D_REVALIDATE_NAMEIDATA */ + +/* eops->encode_fh() wants child and parent inodes */ +/* #undef HAVE_ENCODE_FH_WITH_INODE */ + +/* sops->evict_inode() exists */ +/* #undef HAVE_EVICT_INODE */ + +/* Define to 1 if you have the `execvpe' function. */ +/* #undef HAVE_EXECVPE */ + +/* FALLOC_FL_ZERO_RANGE is defined */ +/* #undef HAVE_FALLOC_FL_ZERO_RANGE */ + +/* fault_in_iov_iter_readable() is available */ +/* #undef HAVE_FAULT_IN_IOV_ITER_READABLE */ + +/* filemap_range_has_page() is available */ +/* #undef HAVE_FILEMAP_RANGE_HAS_PAGE */ + +/* fops->aio_fsync() exists */ +/* #undef HAVE_FILE_AIO_FSYNC */ + +/* file_dentry() is available */ +/* #undef HAVE_FILE_DENTRY */ + +/* fops->fadvise() exists */ +/* #undef HAVE_FILE_FADVISE */ + +/* file_inode() is available */ +/* #undef HAVE_FILE_INODE */ + +/* flush_dcache_page() is GPL-only */ +/* #undef HAVE_FLUSH_DCACHE_PAGE_GPL_ONLY */ + +/* iops->follow_link() cookie */ +/* #undef HAVE_FOLLOW_LINK_COOKIE */ + +/* iops->follow_link() nameidata */ +/* #undef HAVE_FOLLOW_LINK_NAMEIDATA */ + +/* Define if compiler supports -Wformat-overflow */ +/* #undef HAVE_FORMAT_OVERFLOW */ + +/* fsync_bdev() is declared in include/blkdev.h */ +/* #undef HAVE_FSYNC_BDEV */ + +/* fops->fsync() with range */ +/* #undef HAVE_FSYNC_RANGE */ + +/* fops->fsync() without dentry */ +/* #undef HAVE_FSYNC_WITHOUT_DENTRY */ + +/* yes */ +/* #undef HAVE_GENERIC_FADVISE */ + +/* generic_fillattr requires struct mnt_idmap* */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP */ + +/* generic_fillattr requires struct mnt_idmap* and u32 request_mask */ +/* #undef HAVE_GENERIC_FILLATTR_IDMAP_REQMASK */ + +/* generic_fillattr requires struct user_namespace* */ +/* #undef HAVE_GENERIC_FILLATTR_USERNS */ + +/* generic_*_io_acct() 3 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_3ARG */ + +/* generic_*_io_acct() 4 arg available */ +/* #undef HAVE_GENERIC_IO_ACCT_4ARG */ + +/* generic_readlink is global */ +/* #undef HAVE_GENERIC_READLINK */ + +/* generic_setxattr() exists */ +/* #undef HAVE_GENERIC_SETXATTR */ + +/* generic_write_checks() takes kiocb */ +/* #undef HAVE_GENERIC_WRITE_CHECKS_KIOCB */ + +/* Define if the GNU gettext() function is already present or preinstalled. */ +/* #undef HAVE_GETTEXT */ + +/* iops->get_acl() exists */ +/* #undef HAVE_GET_ACL */ + +/* iops->get_acl() takes rcu */ +/* #undef HAVE_GET_ACL_RCU */ + +/* has iops->get_inode_acl() */ +/* #undef HAVE_GET_INODE_ACL */ + +/* iops->get_link() cookie */ +/* #undef HAVE_GET_LINK_COOKIE */ + +/* iops->get_link() delayed */ +/* #undef HAVE_GET_LINK_DELAYED */ + +/* group_info->gid exists */ +/* #undef HAVE_GROUP_INFO_GID */ + +/* has_capability() is available */ +/* #undef HAVE_HAS_CAPABILITY */ + +/* iattr->ia_vfsuid and iattr->ia_vfsgid exist */ +/* #undef HAVE_IATTR_VFSID */ + +/* Define if you have the iconv() function and it works. */ +#define HAVE_ICONV 1 + +/* iops->getattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_GETATTR */ + +/* iops->setattr() takes struct mnt_idmap* */ +/* #undef HAVE_IDMAP_IOPS_SETATTR */ + +/* APIs for idmapped mount are present */ +/* #undef HAVE_IDMAP_MNT_API */ + +/* Define if compiler supports -Wimplicit-fallthrough */ +/* #undef HAVE_IMPLICIT_FALLTHROUGH */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_INFINITE_RECURSION */ + +/* inode_get_atime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_ATIME */ + +/* inode_get_ctime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_CTIME */ + +/* inode_get_mtime() exists in linux/fs.h */ +/* #undef HAVE_INODE_GET_MTIME */ + +/* yes */ +/* #undef HAVE_INODE_LOCK_SHARED */ + +/* inode_owner_or_capable() exists */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE */ + +/* inode_owner_or_capable() takes mnt_idmap */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_IDMAP */ + +/* inode_owner_or_capable() takes user_ns */ +/* #undef HAVE_INODE_OWNER_OR_CAPABLE_USERNS */ + +/* inode_set_atime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_ATIME_TO_TS */ + +/* inode_set_ctime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_CTIME_TO_TS */ + +/* inode_set_flags() exists */ +/* #undef HAVE_INODE_SET_FLAGS */ + +/* inode_set_iversion() exists */ +/* #undef HAVE_INODE_SET_IVERSION */ + +/* inode_set_mtime_to_ts() exists in linux/fs.h */ +/* #undef HAVE_INODE_SET_MTIME_TO_TS */ + +/* inode->i_*time's are timespec64 */ +/* #undef HAVE_INODE_TIMESPEC64_TIMES */ + +/* timestamp_truncate() exists */ +/* #undef HAVE_INODE_TIMESTAMP_TRUNCATE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* in_compat_syscall() is available */ +/* #undef HAVE_IN_COMPAT_SYSCALL */ + +/* iops->create() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_CREATE_IDMAP */ + +/* iops->create() takes struct user_namespace* */ +/* #undef HAVE_IOPS_CREATE_USERNS */ + +/* iops->mkdir() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKDIR_IDMAP */ + +/* iops->mkdir() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKDIR_USERNS */ + +/* iops->mknod() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_MKNOD_IDMAP */ + +/* iops->mknod() takes struct user_namespace* */ +/* #undef HAVE_IOPS_MKNOD_USERNS */ + +/* iops->permission() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_PERMISSION_IDMAP */ + +/* iops->permission() takes struct user_namespace* */ +/* #undef HAVE_IOPS_PERMISSION_USERNS */ + +/* iops->rename() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_RENAME_IDMAP */ + +/* iops->rename() takes struct user_namespace* */ +/* #undef HAVE_IOPS_RENAME_USERNS */ + +/* iops->setattr() exists */ +/* #undef HAVE_IOPS_SETATTR */ + +/* iops->symlink() takes struct mnt_idmap* */ +/* #undef HAVE_IOPS_SYMLINK_IDMAP */ + +/* iops->symlink() takes struct user_namespace* */ +/* #undef HAVE_IOPS_SYMLINK_USERNS */ + +/* iov_iter_advance() is available */ +/* #undef HAVE_IOV_ITER_ADVANCE */ + +/* iov_iter_count() is available */ +/* #undef HAVE_IOV_ITER_COUNT */ + +/* iov_iter_fault_in_readable() is available */ +/* #undef HAVE_IOV_ITER_FAULT_IN_READABLE */ + +/* iov_iter_revert() is available */ +/* #undef HAVE_IOV_ITER_REVERT */ + +/* iov_iter_type() is available */ +/* #undef HAVE_IOV_ITER_TYPE */ + +/* iov_iter types are available */ +/* #undef HAVE_IOV_ITER_TYPES */ + +/* yes */ +/* #undef HAVE_IO_SCHEDULE_TIMEOUT */ + +/* Define to 1 if you have the `issetugid' function. */ +#define HAVE_ISSETUGID 1 + +/* iter_iov() is available */ +/* #undef HAVE_ITER_IOV */ + +/* kernel has kernel_fpu_* functions */ +/* #undef HAVE_KERNEL_FPU */ + +/* kernel has asm/fpu/api.h */ +/* #undef HAVE_KERNEL_FPU_API_HEADER */ + +/* kernel fpu internal */ +/* #undef HAVE_KERNEL_FPU_INTERNAL */ + +/* kernel has asm/fpu/internal.h */ +/* #undef HAVE_KERNEL_FPU_INTERNAL_HEADER */ + +/* uncached_acl_sentinel() exists */ +/* #undef HAVE_KERNEL_GET_ACL_HANDLE_CACHE */ + +/* Define if compiler supports -Winfinite-recursion */ +/* #undef HAVE_KERNEL_INFINITE_RECURSION */ + +/* kernel has kernel_neon_* functions */ +/* #undef HAVE_KERNEL_NEON */ + +/* kernel does stack verification */ +/* #undef HAVE_KERNEL_OBJTOOL */ + +/* kernel has linux/objtool.h */ +/* #undef HAVE_KERNEL_OBJTOOL_HEADER */ + +/* kernel_read() take loff_t pointer */ +/* #undef HAVE_KERNEL_READ_PPOS */ + +/* timer_list.function gets a timer_list */ +/* #undef HAVE_KERNEL_TIMER_FUNCTION_TIMER_LIST */ + +/* struct timer_list has a flags member */ +/* #undef HAVE_KERNEL_TIMER_LIST_FLAGS */ + +/* timer_setup() is available */ +/* #undef HAVE_KERNEL_TIMER_SETUP */ + +/* kernel_write() take loff_t pointer */ +/* #undef HAVE_KERNEL_WRITE_PPOS */ + +/* kmem_cache_create_usercopy() exists */ +/* #undef HAVE_KMEM_CACHE_CREATE_USERCOPY */ + +/* kstrtoul() exists */ +/* #undef HAVE_KSTRTOUL */ + +/* ktime_get_coarse_real_ts64() exists */ +/* #undef HAVE_KTIME_GET_COARSE_REAL_TS64 */ + +/* ktime_get_raw_ts64() exists */ +/* #undef HAVE_KTIME_GET_RAW_TS64 */ + +/* kvmalloc exists */ +/* #undef HAVE_KVMALLOC */ + +/* Define if you have [aio] */ +/* #undef HAVE_LIBAIO */ + +/* Define if you have [blkid] */ +/* #undef HAVE_LIBBLKID */ + +/* Define if you have [crypto] */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have [tirpc] */ +/* #undef HAVE_LIBTIRPC */ + +/* Define if you have [udev] */ +/* #undef HAVE_LIBUDEV */ + +/* Define if you have [uuid] */ +/* #undef HAVE_LIBUUID */ + +/* linux/blk-cgroup.h exists */ +/* #undef HAVE_LINUX_BLK_CGROUP_HEADER */ + +/* lseek_execute() is available */ +/* #undef HAVE_LSEEK_EXECUTE */ + +/* makedev() is declared in sys/mkdev.h */ +/* #undef HAVE_MAKEDEV_IN_MKDEV */ + +/* makedev() is declared in sys/sysmacros.h */ +/* #undef HAVE_MAKEDEV_IN_SYSMACROS */ + +/* Noting that make_request_fn() returns blk_qc_t */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_QC */ + +/* Noting that make_request_fn() returns void */ +/* #undef HAVE_MAKE_REQUEST_FN_RET_VOID */ + +/* iops->mkdir() takes umode_t */ +/* #undef HAVE_MKDIR_UMODE_T */ + +/* Define to 1 if you have the `mlockall' function. */ +#define HAVE_MLOCKALL 1 + +/* lookup_bdev() wants mode arg */ +/* #undef HAVE_MODE_LOOKUP_BDEV */ + +/* Define if host toolchain supports MOVBE */ +#define HAVE_MOVBE 1 + +/* new_sync_read()/new_sync_write() are available */ +/* #undef HAVE_NEW_SYNC_READ */ + +/* folio_wait_bit() exists */ +/* #undef HAVE_PAGEMAP_FOLIO_WAIT_BIT */ + +/* part_to_dev() exists */ +/* #undef HAVE_PART_TO_DEV */ + +/* iops->getattr() takes a path */ +/* #undef HAVE_PATH_IOPS_GETATTR */ + +/* Define if host toolchain supports PCLMULQDQ */ +#define HAVE_PCLMULQDQ 1 + +/* percpu_counter_add_batch() is defined */ +/* #undef HAVE_PERCPU_COUNTER_ADD_BATCH */ + +/* percpu_counter_init() wants gfp_t */ +/* #undef HAVE_PERCPU_COUNTER_INIT_WITH_GFP */ + +/* posix_acl_chmod() exists */ +/* #undef HAVE_POSIX_ACL_CHMOD */ + +/* posix_acl_from_xattr() needs user_ns */ +/* #undef HAVE_POSIX_ACL_FROM_XATTR_USERNS */ + +/* posix_acl_release() is available */ +/* #undef HAVE_POSIX_ACL_RELEASE */ + +/* posix_acl_release() is GPL-only */ +/* #undef HAVE_POSIX_ACL_RELEASE_GPL_ONLY */ + +/* posix_acl_valid() wants user namespace */ +/* #undef HAVE_POSIX_ACL_VALID_WITH_NS */ + +/* proc_ops structure exists */ +/* #undef HAVE_PROC_OPS_STRUCT */ + +/* iops->put_link() cookie */ +/* #undef HAVE_PUT_LINK_COOKIE */ + +/* iops->put_link() delayed */ +/* #undef HAVE_PUT_LINK_DELAYED */ + +/* iops->put_link() nameidata */ +/* #undef HAVE_PUT_LINK_NAMEIDATA */ + +/* If available, contains the Python version number currently in use. */ +#define HAVE_PYTHON "3.7" + +/* qat is enabled and existed */ +/* #undef HAVE_QAT */ + +/* struct reclaim_state has reclaimed */ +/* #undef HAVE_RECLAIM_STATE_RECLAIMED */ + +/* register_shrinker is vararg */ +/* #undef HAVE_REGISTER_SHRINKER_VARARG */ + +/* register_sysctl_table exists */ +/* #undef HAVE_REGISTER_SYSCTL_TABLE */ + +/* iops->rename2() exists */ +/* #undef HAVE_RENAME2 */ + +/* struct inode_operations_wrapper takes .rename2() */ +/* #undef HAVE_RENAME2_OPERATIONS_WRAPPER */ + +/* iops->rename() wants flags */ +/* #undef HAVE_RENAME_WANTS_FLAGS */ + +/* REQ_DISCARD is defined */ +/* #undef HAVE_REQ_DISCARD */ + +/* REQ_FLUSH is defined */ +/* #undef HAVE_REQ_FLUSH */ + +/* REQ_OP_DISCARD is defined */ +/* #undef HAVE_REQ_OP_DISCARD */ + +/* REQ_OP_FLUSH is defined */ +/* #undef HAVE_REQ_OP_FLUSH */ + +/* REQ_OP_SECURE_ERASE is defined */ +/* #undef HAVE_REQ_OP_SECURE_ERASE */ + +/* REQ_PREFLUSH is defined */ +/* #undef HAVE_REQ_PREFLUSH */ + +/* revalidate_disk() is available */ +/* #undef HAVE_REVALIDATE_DISK */ + +/* revalidate_disk_size() is available */ +/* #undef HAVE_REVALIDATE_DISK_SIZE */ + +/* struct rw_semaphore has member activity */ +/* #undef HAVE_RWSEM_ACTIVITY */ + +/* struct rw_semaphore has atomic_long_t member count */ +/* #undef HAVE_RWSEM_ATOMIC_LONG_COUNT */ + +/* linux/sched/signal.h exists */ +/* #undef HAVE_SCHED_SIGNAL_HEADER */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SECURITY_PAM_MODULES_H 1 + +/* setattr_prepare() accepts mnt_idmap */ +/* #undef HAVE_SETATTR_PREPARE_IDMAP */ + +/* setattr_prepare() is available, doesn't accept user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_NO_USERNS */ + +/* setattr_prepare() accepts user_namespace */ +/* #undef HAVE_SETATTR_PREPARE_USERNS */ + +/* iops->set_acl() exists, takes 3 args */ +/* #undef HAVE_SET_ACL */ + +/* iops->set_acl() takes 4 args, arg1 is struct mnt_idmap * */ +/* #undef HAVE_SET_ACL_IDMAP_DENTRY */ + +/* iops->set_acl() takes 4 args */ +/* #undef HAVE_SET_ACL_USERNS */ + +/* iops->set_acl() takes 4 args, arg2 is struct dentry * */ +/* #undef HAVE_SET_ACL_USERNS_DENTRY_ARG2 */ + +/* set_cached_acl() is usable */ +/* #undef HAVE_SET_CACHED_ACL_USABLE */ + +/* set_special_state() exists */ +/* #undef HAVE_SET_SPECIAL_STATE */ + +/* shrinker_register exists */ +/* #undef HAVE_SHRINKER_REGISTER */ + +/* struct shrink_control exists */ +/* #undef HAVE_SHRINK_CONTROL_STRUCT */ + +/* kernel_siginfo_t exists */ +/* #undef HAVE_SIGINFO */ + +/* signal_stop() exists */ +/* #undef HAVE_SIGNAL_STOP */ + +/* new shrinker callback wants 2 args */ +/* #undef HAVE_SINGLE_SHRINKER_CALLBACK */ + +/* cs->count_objects exists */ +/* #undef HAVE_SPLIT_SHRINKER_CALLBACK */ + +#if defined(__amd64__) || defined(__i386__) +/* Define if host toolchain supports SSE */ +#define HAVE_SSE 1 + +/* Define if host toolchain supports SSE2 */ +#define HAVE_SSE2 1 + +/* Define if host toolchain supports SSE3 */ +#define HAVE_SSE3 1 + +/* Define if host toolchain supports SSE4.1 */ +#define HAVE_SSE4_1 1 + +/* Define if host toolchain supports SSE4.2 */ +#define HAVE_SSE4_2 1 + +/* Define if host toolchain supports SSSE3 */ +#define HAVE_SSSE3 1 +#endif + +/* STACK_FRAME_NON_STANDARD is defined */ +/* #undef HAVE_STACK_FRAME_NON_STANDARD */ + +/* standalone exists */ +/* #undef HAVE_STANDALONE_LINUX_STDARG */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcat' function. */ +#define HAVE_STRLCAT 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* submit_bio is member of struct block_device_operations */ +/* #undef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */ + +/* have super_block s_shrink */ +/* #undef HAVE_SUPER_BLOCK_S_SHRINK */ + +/* have super_block s_shrink pointer */ +/* #undef HAVE_SUPER_BLOCK_S_SHRINK_PTR */ + +/* super_setup_bdi_name() exits */ +/* #undef HAVE_SUPER_SETUP_BDI_NAME */ + +/* super_block->s_user_ns exists */ +/* #undef HAVE_SUPER_USER_NS */ + +/* sync_blockdev() is declared in include/blkdev.h */ +/* #undef HAVE_SYNC_BLOCKDEV */ + +/* struct kobj_type has default_groups */ +/* #undef HAVE_SYSFS_DEFAULT_GROUPS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* i_op->tmpfile() exists */ +/* #undef HAVE_TMPFILE */ + +/* i_op->tmpfile() uses old dentry signature */ +/* #undef HAVE_TMPFILE_DENTRY */ + +/* i_op->tmpfile() has mnt_idmap */ +/* #undef HAVE_TMPFILE_IDMAP */ + +/* i_op->tmpfile() has userns */ +/* #undef HAVE_TMPFILE_USERNS */ + +/* totalhigh_pages() exists */ +/* #undef HAVE_TOTALHIGH_PAGES */ + +/* kernel has totalram_pages() */ +/* #undef HAVE_TOTALRAM_PAGES_FUNC */ + +/* Define to 1 if you have the `udev_device_get_is_initialized' function. */ +/* #undef HAVE_UDEV_DEVICE_GET_IS_INITIALIZED */ + +/* kernel has __kernel_fpu_* functions */ +/* #undef HAVE_UNDERSCORE_KERNEL_FPU */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* iops->getattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_GETATTR */ + +/* iops->setattr() takes struct user_namespace* */ +/* #undef HAVE_USERNS_IOPS_SETATTR */ + +/* user_namespace->ns.inum exists */ +/* #undef HAVE_USER_NS_COMMON_INUM */ + +/* iops->getattr() takes a vfsmount */ +/* #undef HAVE_VFSMOUNT_IOPS_GETATTR */ + +/* fops->clone_file_range() is available */ +/* #undef HAVE_VFS_CLONE_FILE_RANGE */ + +/* fops->copy_file_range() is available */ +/* #undef HAVE_VFS_COPY_FILE_RANGE */ + +/* fops->dedupe_file_range() is available */ +/* #undef HAVE_VFS_DEDUPE_FILE_RANGE */ + +/* aops->direct_IO() uses iovec */ +/* #undef HAVE_VFS_DIRECT_IO_IOVEC */ + +/* aops->direct_IO() uses iov_iter without rw */ +/* #undef HAVE_VFS_DIRECT_IO_ITER */ + +/* aops->direct_IO() uses iov_iter with offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_OFFSET */ + +/* aops->direct_IO() uses iov_iter with rw and offset */ +/* #undef HAVE_VFS_DIRECT_IO_ITER_RW_OFFSET */ + +/* filemap_dirty_folio exists */ +/* #undef HAVE_VFS_FILEMAP_DIRTY_FOLIO */ + +/* file_operations_extend takes .copy_file_range() and .clone_file_range() */ +/* #undef HAVE_VFS_FILE_OPERATIONS_EXTEND */ + +/* generic_copy_file_range() is available */ +/* #undef HAVE_VFS_GENERIC_COPY_FILE_RANGE */ + +/* All required iov_iter interfaces are available */ +/* #undef HAVE_VFS_IOV_ITER */ + *** 233 LINES SKIPPED *** From nobody Wed Jan 24 13:27:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKlB26v2lz58GJM; Wed, 24 Jan 2024 13:27:22 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKlB26K7xz4Z86; Wed, 24 Jan 2024 13:27:22 +0000 (UTC) (envelope-from kp@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706102842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vBs9/LnhFF35E+9r6CPKScxbrDKob4NOa5erLXgFL0c=; b=DrloTmUGZ/wNODHtuqCw00/YJ2aDF806NGmVnM3V4VTJhdy2RMmI0TjNy0MyKXFXstP+UG DQVbMsqwlGjr/WTPB7ysYR7vwTTgHJArmObwvvcZnaqNi1L52ZrSM1lmjLBrR1qs7OqSHi OlcX0mNjQE4g7Dw8a/u/P15rGxB7L9QC2J5HGHcYh2pixPfhqVjSylysoebv4V0aT4xuqB UzXpV5QrNDN1IialW5sfy/rYZEumjcCM6qDuCHPsJesjfR61pMdVb1c0yLF1vuO7trnveY 51aEPyDpIfFsjmImw8OLv6lSZ8oh8aMMnh8FyUIr+bgDDXV90KcPs594YSXAhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706102842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vBs9/LnhFF35E+9r6CPKScxbrDKob4NOa5erLXgFL0c=; b=yVbxA0RoFtHC6LDQG4B01TZYvearhoPxGypieBk280fQGe7d3lMpsHOcS09Z3REpnOQZIQ NEZEu0lqGjCkpeHofGzvNYVEAXgdDIc5QEthulDfku+6G7pif9y8H5fGUl4iO25olH6SGJ 9pZKjWOWOu6paLRQUl8piXiB2brYrH4JgZ9Mx74FqkinnVWUIH1357fW+LjzpfBaSvi+S7 vxWchbaHlSa/HeIIe7Mo0mqp/Ej8yH//MLS+0YyteITLWb5SuRPbUnRxFKVbFpkYltk9ho 2DqOkjptG78HiqBcSEOPp6IpeVVtUyAIve65mnjqHmY/JAjDBtAteI3sWoZFUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706102842; a=rsa-sha256; cv=none; b=DzCPEaWSwJzvPkNrkL7QFvbaNBqEDq5p8FNeYTdKPYKx85bP79uUKFpLHyJbkOaF6qJuHb +tPZkhvtV8Cdp2IUU6gEnkAWPk1gj1v6tv2XuBFEVRWgpL+4c8oVjvHeRb8wn6wwyeI70x CDPu3vX5I/FgIXmxUI0sD4nHJ5mKLFOJ+HdTK/F2fneZvRDr6/oWC6zy3cjSB+6fCcnv1f 1v2eYzbTIWK6FMnvMko7/dM5Bz5TlyULgFNjmvy4XYObTgG8vbydAVFkSCW5K95nO+UAsP YBA6khAYup1jM+CGIXMFxthcweTdryAeCv84olOtxA7vG4k0wLSqLoOtLA2ehQ== Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TKlB23mKSzXMd; Wed, 24 Jan 2024 13:27:22 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id B1FE5138E4; Wed, 24 Jan 2024 14:27:20 +0100 (CET) From: Kristof Provost To: "Herbert J. Skuhra" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 54c62e3e5d8c - main - pf: work around icmp6 packet-too-big not being sent when binat-ing Date: Wed, 24 Jan 2024 14:27:19 +0100 X-Mailer: MailMate (1.14r5937) Message-ID: <880FAE40-9D91-4AA6-92BA-2D582D23B745@FreeBSD.org> In-Reply-To: <87sf2nm4et.wl-herbert@gojira.at> References: <202401221252.40MCqpf6047526@gitrepo.freebsd.org> <87v87jkii9.wl-herbert@gojira.at> <1E1C3472-0AF3-457B-A27A-89679770EA62@FreeBSD.org> <87sf2nm4et.wl-herbert@gojira.at> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_MailMate_8499D0A2-F28D-49C8-9CAD-F3540B67C559_=" --=_MailMate_8499D0A2-F28D-49C8-9CAD-F3540B67C559_= Content-Type: text/plain; format=flowed Content-Transfer-Encoding: quoted-printable On 24 Jan 2024, at 11:06, Herbert J. Skuhra wrote: > On Tue, 23 Jan 2024 19:42:10 +0100, Kristof Provost wrote: >> On 23 Jan 2024, at 19:32, Herbert J. Skuhra wrote: >>> On Mon, 22 Jan 2024 13:52:51 +0100, Kristof Provost wrote: >>>> >>>> The branch main has been updated by kp: >>>> >>>> URL: = >>>> https://cgit.FreeBSD.org/src/commit/?id=3D54c62e3e5d8cd90c5571a1d4c8= c5f062d580480e >>>> >>>> commit 54c62e3e5d8cd90c5571a1d4c8c5f062d580480e >>>> Author: Kristof Provost >>>> AuthorDate: 2024-01-17 17:11:27 +0000 >>>> Commit: Kristof Provost >>>> CommitDate: 2024-01-22 11:52:14 +0000 >>>> >>>> pf: work around icmp6 packet-too-big not being sent when = >>>> binat-ing >>>> >>>> If we're applying NPTv6 we pass a packet with a modified source = >>>> and/or >>>> destination address to the network stack. >>>> >>>> If that packet then turns out to be larger than the MTU of the = >>>> sending >>>> interface the stack will attempt to generate an icmp6 = >>>> packet-too-big >>>> error, but may fail to look up the appropriate source address = >>>> for that >>>> error message. Even if it does, pf would still have to undo the = >>>> binat >>>> operation inside the icmp6 packet so the sending host can make = >>>> sense of >>>> the error. >>>> >>>> We can avoid both problems entirely by having pf also perform = >>>> the MTU >>>> check (taking the potential refragmentation into account), and >>>> generating the icmp6 error directly in pf. >>>> >>>> See also: https://redmine.pfsense.org/issues/14290 >>>> Sponsored by: Rubicon Communications, LLC ("Netgate") >>>> Differential Revision: https://reviews.freebsd.org/D43499 >>>> --- >>>> sys/net/pfvar.h | 1 + >>>> sys/netpfil/pf/pf.c | 12 ++++++++++++ >>>> sys/netpfil/pf/pf_norm.c | 15 +++++++++++++++ >>>> 3 files changed, 28 insertions(+) >>> >>> Does this change cause problems for others too? >>> >>> - ssh over IPv6 permanently disconnecting >>> (client_loop: send disconnect: Broken pipe) >>> - ssh connections over IPv6 hanging >>> - git pull not working >>> Fssh_ssh_dispatch_run_fatal: Connection to = >>> 2604:1380:4091:a001::24ca:1 port 22: Permission denied >>> fatal: Could not read from remote repository. >>> >> Can you include your pf.conf and a packet capture demonstrating one = >> of these issues? > > So I assume this issue affects only me or this server (igb nic). > Disabling tso6 seems to resolve the issue. > Ah. A Clue(tm)! Try this: diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 38a5a45d7991..2dc6d02d330a 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -8515,7 +8515,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, = struct mbuf **m0, struct inpcb * confused and fail to send the icmp6 packet too big error. = Just send * it here, before we do any NAT. */ - if (dir =3D=3D PF_OUT && IN6_LINKMTU(ifp) < pf_max_frag_size(m))= { + if (dir =3D=3D PF_OUT && pflags & PFIL_FWD && IN6_LINKMTU(ifp) <= = pf_max_frag_size(m)) { PF_RULES_RUNLOCK(); *m0 =3D NULL; icmp6_error(m, ICMP6_PACKET_TOO_BIG, 0, = IN6_LINKMTU(ifp)); Best regards, Kristof --=_MailMate_8499D0A2-F28D-49C8-9CAD-F3540B67C559_= Content-Type: text/html Content-Transfer-Encoding: quoted-printable

On 24 Jan 2024, at 11:06, Herbert J. Skuhra wrote:

On Tue, 23 Jan 2024 19:42:10 +0100,= Kristof Provost wrote:

On 23 Jan 2024, at 19:32, Herbert J. Skuhra wrote:

On Mon, 22 Jan 2024 13:52:51 +0100, Kristof Provost wrote:

The branch main has been updated by kp:

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

commit 54c62e3e5d8cd90c5571a1d4c8c5f062d580480e
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2024-01-17 17:11:27 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2024-01-22 11:52:14 +0000

pf: work around icmp6 packet-too-big not being sent w= hen binat-ing

If we're applying NPTv6 we pass a packet with a modif= ied source and/or
destination address to the network stack.

If that packet then turns out to be larger than the M= TU of the sending
interface the stack will attempt to generate an icmp6 packet-too-big
error, but may fail to look up the appropriate source address for tha= t
error message. Even if it does, pf would still have to undo the binat=
operation inside the icmp6 packet so the sending host can make sense = of
the error.

We can avoid both problems entirely by having pf also= perform the MTU
check (taking the potential refragmentation into account), and
generating the icmp6 error directly in pf.

See also: https://redmine.pfsense.org/issues/14290
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D43499
---
sys/net/pfvar.h | 1 +
sys/netpfil/pf/pf.c | 12 ++++++++++++
sys/netpfil/pf/pf_norm.c | 15 +++++++++++++++
3 files changed, 28 insertions(+)

Does this change cause problems for others t= oo?

- ssh over IPv6 permanently disconnecting
(client_loop: send disconnect: Broken pipe)
- ssh connections over IPv6 hanging
- git pull not working
Fssh_ssh_dispatch_run_fatal: Connection to 2604:1380:4091:a001::24ca:1 po= rt 22: Permission denied
fatal: Could not read from remote repository.

Can you include your pf.conf and a packet ca= pture demonstrating one of these issues?

So I assume this issue affects only me or th= is server (igb nic).
Disabling tso6 seems to resolve the issue.


Ah. A Clue(tm)!

Try this:

di=
ff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 38a5a45d7991..2dc6d02d330a 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -8515,7 +8515,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, st=
ruct mbuf **m0, struct inpcb
         * confused and fail to send the icmp6 packet too big error. Just=
 send
         * it here, before we do any NAT.
         */
-       if (dir =3D=3D PF_OUT && IN6_LINKMTU(ifp) < pf_max_fra=
g_size(m)) {
+       if (dir =3D=3D PF_OUT && pflags & PFIL_FWD &&=
 IN6_LINKMTU(ifp) < pf_max_frag_size(m)) {
                PF_RULES_RUNLOCK();
                *m0 =3D NULL;
                icmp6_error(m, ICMP6_PACKET_TOO_BIG, 0, IN6_LINKMTU(ifp))=
;

Best regards,
Kristof

--=_MailMate_8499D0A2-F28D-49C8-9CAD-F3540B67C559_=-- From nobody Wed Jan 24 14:14:07 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKmD00Fk1z585gQ; Wed, 24 Jan 2024 14:14: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 4TKmCz6Hz0z4dwb; Wed, 24 Jan 2024 14:14:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706105647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9y2LJ+82oAEDWf0D675gSyOO+lBMLtMwjoO36X7cEFU=; b=scKk7mBi/cMS6pvmYaqZusZZ9fStxdi/tY6tNAQKVXM3UMFFmWlTvIvpVfwJe81SAi/f4n e8NYsxJPRXn2UgQ4KunzEe0GYQR2y3p/cWgpXmwYp38F2ZZX6mNV8yHHLXuY3FS6RFf120 HetOCNWnOJ9O4ndFmHsoo3dg+qmoEXj4hjvka15Id86L0rwT7DfVRzkt7SXoj22Y8+vFX8 KjpzUS5sq9/l5UCKuaBNd4GquRF/DdGh4LYHIA1qUr+GfG7c/At50yW78zTuXxYme0M4ik 2NE4TvJPbBFuN8CCKgaqyq61XuJZEKJNEVlv+B0FpJsOLMsx9qOd14j/BzgzJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706105647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9y2LJ+82oAEDWf0D675gSyOO+lBMLtMwjoO36X7cEFU=; b=ArE/7+IavuToPwGdstxQDeSCrZG+U6mjwSOqN4PY/gmUeypAuwZltrpdGt5a0YslzExsDC HRskiLGJPz9uNIeJ14/KsmCYAbWwIfGyz6NmrQapm6Gdu5tNKWTAoO+cs/n15xEY/1Yj19 nxbi2jIq3Ua+C+kjgNzVQqg999P0xngfOIN4s6/s8nhpPOylxARPRwOx8P+GxfOLN1Ha+1 EoE35LM2HZJrxB1rz1jAE28An1fZFGCC8M80gHN46Wqi8Vmt1etcuDSzQ1pGxu1bO4tely W4xgmQLTW1EZQX3PEqyXAFKGGd8ndrcBJui9Ka+YLT0iby+ib9Y3UmqyBUTdrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706105647; a=rsa-sha256; cv=none; b=HA9VxnxGj6WbjB6UfDamnzjbG8oPoDgzy/seN+hNUIHqURKkG97y+L+QOnrulYE/y/qW4A qfE458ohXUN0jzuSV5SXekL97l2w/XIFJ2D5RpjRv/yWJ+BcC/dwtL7Q6wsDXrO5AcxgDt QCNnpXlyiwvwQ1mzMaLqJvbBIMDCRpvkvCOcdfj9gSPvDXSKr5qL00x28tmO/GGyxQVVfG vnFU/czFjFAAgM6xNnCH8qxVuirXOX1d1QL+vWAJuDpXXON1MvSjS7ji9UVWOmijSo0rXZ QEmmLA2BHUFV0fmc4ADYGrL2i5IPKNJADxo0h09hMx7ajAwgqkG9xGj34Y1Rng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKmCz5LPczHW0; Wed, 24 Jan 2024 14:14: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 40OEE7FN049737; Wed, 24 Jan 2024 14:14:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40OEE7sD049734; Wed, 24 Jan 2024 14:14:07 GMT (envelope-from git) Date: Wed, 24 Jan 2024 14:14:07 GMT Message-Id: <202401241414.40OEE7sD049734@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 1f41c1c1a3a9 - main - crunch: remove fdisk from examples List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f41c1c1a3a9883ed4b239ed3ec2f4cf183ce1e8 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1f41c1c1a3a9883ed4b239ed3ec2f4cf183ce1e8 commit 1f41c1c1a3a9883ed4b239ed3ec2f4cf183ce1e8 Author: Ed Maste AuthorDate: 2024-01-23 18:28:07 +0000 Commit: Ed Maste CommitDate: 2024-01-24 14:12:19 +0000 crunch: remove fdisk from examples It has been deprecated for a long time; gpart should be used instead. The man page was updated in 2015 to declare it obsolete (b8c19fd719945). --- usr.sbin/crunch/examples/filesystem.conf | 2 +- usr.sbin/crunch/examples/fixit.conf | 2 +- usr.sbin/crunch/examples/really-big.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/crunch/examples/filesystem.conf b/usr.sbin/crunch/examples/filesystem.conf index 5be30f528cce..c9a6cf0ce018 100644 --- a/usr.sbin/crunch/examples/filesystem.conf +++ b/usr.sbin/crunch/examples/filesystem.conf @@ -12,7 +12,7 @@ ln sh - ln sh -sh # /sbin -progs disklabel fdisk init mount newfs reboot umount +progs disklabel init mount newfs reboot umount ln reboot halt ln reboot fastboot ln reboot fasthalt diff --git a/usr.sbin/crunch/examples/fixit.conf b/usr.sbin/crunch/examples/fixit.conf index 5596d58c45f1..7c6539cf8aa5 100644 --- a/usr.sbin/crunch/examples/fixit.conf +++ b/usr.sbin/crunch/examples/fixit.conf @@ -21,7 +21,7 @@ ln sh -sh # init invokes the shell this way # /sbin stuff -progs chown clri disklabel dump dmesg fdisk fsck ifconfig init +progs chown clri disklabel dump dmesg fsck ifconfig init progs mknod mount newfs ping reboot restore swapon umount ln dump rdump ln restore rrestore diff --git a/usr.sbin/crunch/examples/really-big.conf b/usr.sbin/crunch/examples/really-big.conf index e6624a1ad836..12c08b73936f 100644 --- a/usr.sbin/crunch/examples/really-big.conf +++ b/usr.sbin/crunch/examples/really-big.conf @@ -22,7 +22,7 @@ ln sh -sh srcdirs /usr/src/sbin -progs bim clri disklabel dmesg dump dumpfs fdisk fsck halt +progs bim clri disklabel dmesg dump dumpfs fsck halt progs ifconfig init mknod modload modunload mount mount_isofs progs mount_lofs mount_msdosfs mountd progs newfs nfsd nfsiod ping quotacheck reboot restore route routed savecore From nobody Wed Jan 24 14:38:39 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKmmH6Hwsz58739; Wed, 24 Jan 2024 14:38: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 4TKmmH5lpyz4hWT; Wed, 24 Jan 2024 14:38:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706107119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WlluVM/yq3t32HMGK4a0PSUY9YFzYHFhfm84svSrR7g=; b=wC0XHV7K7GMkC1PTC/tQMm1dWKwTnA/vhsi5+HHyfFfHNgtpwqvaf9Uti10xHZ+ocYfcHf qnDsSOur+/L/4ktMl/eMxWdyO4gWhRW+4UoZfH9xQxmCKAgoU0EFnwo7SFElWxCrfhP7gp 0s2QvVM5oKVOqsbXJkPSfBaYmPhhKD4s3WahDKksvUqXElS3Hyp7mFN4OyRaHT7Pc3wLix HRZ/tQEawJR/9ou7kiCmqnID43YDE1+ZhY+6rsH7Jje0nKDe5E7QhpvKFAEglHuXInieYU 0u193qit3GbmNvctVK/hxPe4VjuwaU5vlbdpvS4VUypPHAnpuTATZ2NnVipqEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706107119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WlluVM/yq3t32HMGK4a0PSUY9YFzYHFhfm84svSrR7g=; b=yOF0pmdxxwqF8NkoLJ/0pXLZe0103zBlvXpF+Xl2nxUSTd2nOTAHhGkJdEAi22KX/MjepC n3cMTijfD01zoDa0psj0nASjxVqmjD3dWQZo9D7OQm0OoKDOLusBZIN01ux6fnLhbQue9/ YRTr8+4tYor4gZjh8ccprTNkbLJD+4eKuwxlDPzHBB2J9pKG1nxYcrHUfxIY1FYW5E1HoA zLRUu1O5yrQfAHKGTmV3e7Z3WkjZ+230I6O9lahObUWJaPRH6kajLR5rnezHf3NvkgYS7R IAfuilgLgfp70zDGp2OtnTZBnoCTmCHqP/wLIHMcjh4a5FGC1etXv5bmFsX/tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706107119; a=rsa-sha256; cv=none; b=MV+3izrkUQVc96fP3IJPf+iFNI0aUnE+Xgl8Z4N7beegGCKrz1Y2JcRROnmRAsaP3Y8hbA imSKnyNg6FDg7uMMJI4hw+2qk8MQSVmvvT44P0Qqv6KpULPKajxDjXhawWWstx/ZGQDFnS vtoToNa613Apyt0Ul4kLIAADaxmTZsHh0MFOhgpFwIVLkrh2Q2QRERQG/ufXxzT0d0mtuH z8zOFIYx+Z+r/MerrQ+STVzrSSunTlHBN5+HgFPuofbDsh31MICMvlQRO0C3eOZdyMeE95 78JX7svIHtBsK+5CQbww8BFgsEacgXyedsPnyevu0vbKyUxo1C7znJxiVTFr8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKmmH4j34zJFk; Wed, 24 Jan 2024 14:38: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 40OEcdMl083065; Wed, 24 Jan 2024 14:38:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40OEcdul083062; Wed, 24 Jan 2024 14:38:39 GMT (envelope-from git) Date: Wed, 24 Jan 2024 14:38:39 GMT Message-Id: <202401241438.40OEcdul083062@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 2e9b8c8c1e39 - main - release: rework distributions list List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e9b8c8c1e3938335e17e63049887f8e8c6e11bc Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=2e9b8c8c1e3938335e17e63049887f8e8c6e11bc commit 2e9b8c8c1e3938335e17e63049887f8e8c6e11bc Author: Ed Maste AuthorDate: 2024-01-22 14:49:02 +0000 Commit: Ed Maste CommitDate: 2024-01-24 14:13:51 +0000 release: rework distributions list Components like base.txz and ports.txz are called distributions in the installer, and with the introduction of pkgbase we will start dealing with normal pkg packages in the installer. Rename EXTRA_PACKAGES to DISTRIBUTIONS, and move base.txz and kernel.txz to that list. This introduces no functional change but is a small cleanup in advance of some pkgbase experimentation. Reviewed by: cperciva Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43544 --- release/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/release/Makefile b/release/Makefile index 3af7825c2684..3bfdde407cec 100644 --- a/release/Makefile +++ b/release/Makefile @@ -75,12 +75,12 @@ VOLUME_LABEL= FreeBSD_Install NOPORTS= true .endif -EXTRA_PACKAGES= +DISTRIBUTIONS= base.txz kernel.txz .if !defined(NOPORTS) -EXTRA_PACKAGES+= ports.txz +DISTRIBUTIONS+= ports.txz .endif .if !defined(NOSRC) -EXTRA_PACKAGES+= src.txz +DISTRIBUTIONS+= src.txz .endif RELEASE_TARGETS= ftp @@ -284,7 +284,7 @@ mini-memstick: mini-memstick.img mini-memstick.img: bootonly cd bootonly && sh ${.CURDIR}/${TARGET}/make-memstick.sh .${NO_ROOT:D/METALOG} ../${.TARGET} -packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} +packagesystem: ${DISTRIBUTIONS} sh ${.CURDIR}/scripts/make-manifest.sh *.txz > MANIFEST touch ${.TARGET} From nobody Wed Jan 24 14:43:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKmsM53Crz587sG; Wed, 24 Jan 2024 14:43: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 4TKmsM4cTQz4jKq; Wed, 24 Jan 2024 14:43:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706107383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YsOunRQdzi+AMzA9iARS0SNTevZl9SzYoVANgX38RME=; b=cgOdQ8cFO7TUuY0UuvIzBD2SwqgMpsJ3ABJpQQ/Y+N4JRg0AdzhmtG1xDx4haE53zngH65 vTmRmuFPGJDddO4ApTU56qbEai3dq5X4y5qCrhOH6+4izV3ll2A0nj0jjOzpHEUI4icteB y5ISUz0VAo8hpRAOabdx8lKP6cLi0TH6UT6DG8sdFclwAVVs/wVfwB8lthmFjGGKz1Tgvy 0Ug6MHxww3JKTF2oQi/CLiYxa7AIKuQLtqElmA4Ei0KiSRUSvz9wD4UMgV1JJ29pN+1vPZ c+k3lXfAeKFIxyhQpYeQmR213PrcTY1WFV7peEotxJmxD+tmXBfV0dXvD0zs8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706107383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YsOunRQdzi+AMzA9iARS0SNTevZl9SzYoVANgX38RME=; b=ZkJjE1OgATahzu+paYXOGvbJ8QPZ4DKpCkqib0CvtmN3otnsSXhjwxLLDPY3Y/3vILvERC xxZGlWZ3kPWzy4LwkmeWKJWEV09gFIvI+2VxXX/iMOgb2jgxlvlI4s6kLU2wCYkq7+dVGx /wqXjujFddTKomRjuGqRcGlOaQbP/xop+napZcYFRq0k/6MAsttRUPjal5GGhS8qbOlYm9 fnAsp7sNJzyeyZtl6fiiGjz/2fqUBpNgRGesIaPOz+ucDFyjL/hy/QRd6/C0rvrdN2AA+P qadAfwHg4wTuWYxz+039MWDaP2iDKYrGzxsqILNSykyr9cQfvTI2K1cXgBxS0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706107383; a=rsa-sha256; cv=none; b=WYToBsCOWLDH4V3syE4/kmOyU/NG85oiNcILME5fG0MsX5SrakbEP0TnwQprC4RT85TuIf 6sHYjcykHjlC10pTT7mA2np3FqahnppXddxyagYLRmqTz5byucjcVE9bZM9IXH8qBmAgmL xXI6B9hB1hEazK+DaY18pu/Ks3J/dnm3mr0oXKm9/vHaUkkIz1PZmYo9QPNDk0GaNWstb2 //u9oX0iqRuXLt83NaYZbiH8NyJEeH061d05KGq8L3zGWqJvmazxXPSNrCZ+kX9jDD1js9 KmhaHaAkQ1ET5rLoKn8a7HO1WwkqOHclBRxCYDL0/V6k+cLgN002SLfplnSIdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKmsM3jZPzJN9; Wed, 24 Jan 2024 14:43: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 40OEh3tg098822; Wed, 24 Jan 2024 14:43:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40OEh3b4098819; Wed, 24 Jan 2024 14:43:03 GMT (envelope-from git) Date: Wed, 24 Jan 2024 14:43:03 GMT Message-Id: <202401241443.40OEh3b4098819@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: af0d437dd31f - main - kcmp: Add a manual page List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af0d437dd31f71726f7eb5e9aca9fbd374a8277a Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=af0d437dd31f71726f7eb5e9aca9fbd374a8277a commit af0d437dd31f71726f7eb5e9aca9fbd374a8277a Author: Mark Johnston AuthorDate: 2024-01-24 14:41:31 +0000 Commit: Mark Johnston CommitDate: 2024-01-24 14:42:15 +0000 kcmp: Add a manual page Reviewed by: kib, emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43562 --- lib/libc/sys/Makefile.inc | 1 + lib/libc/sys/kcmp.2 | 230 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 231 insertions(+) diff --git a/lib/libc/sys/Makefile.inc b/lib/libc/sys/Makefile.inc index 4137699bb741..b533443f96b2 100644 --- a/lib/libc/sys/Makefile.inc +++ b/lib/libc/sys/Makefile.inc @@ -215,6 +215,7 @@ MAN+= abort2.2 \ ioctl.2 \ issetugid.2 \ jail.2 \ + kcmp.2 \ kenv.2 \ kill.2 \ kldfind.2 \ diff --git a/lib/libc/sys/kcmp.2 b/lib/libc/sys/kcmp.2 new file mode 100644 index 000000000000..5491e09b918b --- /dev/null +++ b/lib/libc/sys/kcmp.2 @@ -0,0 +1,230 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2024 The FreeBSD Foundation +.\" +.\" This documentation was written by +.\" Mark Johnston under sponsorship +.\" from the FreeBSD Foundation. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.Dd January 23, 2024 +.Dt KCMP 2 +.Os +.Sh NAME +.Nm kcmp +.Nd compare two kernel objects +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In unistd.h +.Ft int +.Fn kcmp "pid_t pid1" "pid_t pid2" "int type" "uintptr_t idx1" "uintptr_t idx2" +.Sh DESCRIPTION +The +.Nm +system call allows the caller to determine whether the two processes with +PIDs +.Fa pid1 +and +.Fa pid2 +reference the same kernel object. +The +.Fa type +parameter specifies the type of object, and +.Fa idx1 +and +.Fa idx2 +are identifiers which refer to some object in the context of process +.Fa pid1 +and +.Fa pid2 , +respectively. +.Pp +The following values for +.Fa type +may be specified: +.Bl -tag -width KCMP_FILE +.It Dv KCMP_FILE +Compare two file descriptions referred to by file descriptors +.Fa idx1 +and +.Fa idx2 . +They may be equivalent if, for example, one of the descriptors was +created by applying +.Xr dup 2 +to the other descriptor. +.It Dv KCMP_FILEOBJ +Perform a +.Dq deep comparison +of the file descriptions referred to by file descriptors +.Fa idx1 +and +.Fa idx2 . +This tests whether the underlying object referred to by the file descriptions +is the same. +For example, if the same filesystem path is opened twice, the kernel will create +two separate file descriptions to back the two file descriptors, but they will +refer to the same underlying object, a +.Xr vnode 9 . +When compared using the +.Dv KCMP_FILE +type, these descriptors will be different, but using the +.Dv KCMP_FILEOBJ +type, they will be equal (assuming that the path was not unlinked in between +the two opens). +.It Dv KCMP_FILES +Determine whether the two processes share the same file descriptor table. +This will be the case if one of the processes was created by +.Xr rfork 2 +without specifying the +.Dv RFFDG +flag. +The +.Fa idx1 +and +.Fa idx2 +parameters are ignored. +.It Dv KCMP_SIGHAND +Determine whether the two processes share the same signal handler table. +This will be the case if one of the processes was created using the +.Dv RFSIGSHARE +flag to +.Xr rfork 2 . +The +.Fa idx1 +and +.Fa idx2 +parameters are ignored. +.It Dv KCMP_VM +Determine whether the two processes share a virtual memory address space. +This may be the case if one of the processes created the other using +.Xr vfork 2 +or +.Xr rfork 2 +with the +.Dv RFMEM +flag. +The +.Fa idx1 +and +.Fa idx2 +parameters are ignored. +.El +The caller of +.Nm +must have permission to debug both processes, otherwise the system call +will fail. +.Sh RETURN VALUES +If +.Fa idx1 +and +.Fa idx2 +refer to the same object, +.Nm +returns 0. +If the object referred to by +.Fa pid1 +and +.Fa idx1 +is less or greater than the object referred to by +.Fa pid2 +and +.Fa idx2 , +.Nm +returns the values 1 and 2, respectively. +The order is defined internally by the kernel and is stable until the system +reboots. +If the two objects cannot be compared for some reason, +.Nm +returns 3. +For example, if +.Fa type +is +.Dv KCMP_FILEOBJ +and +.Fa idx1 +and +.Fa idx2 +are different descriptor types, e.g., a socket and a file, then +.Nm +will return 3. +.Pp +If an error occurs, the value -1 is returned and the global variable +.Va errno +is set to indicate the error. +.Sh ERRORS +.Nm +may fail with the following errors: +.Bl -tag -width Er +.It Bq Er ENODEV +.Dv KCMP_FILEOBJ +was specified and +.Fa idx1 +refers to a file descriptor which does not implement a comparison operator. +.It Bq Er EINVAL +The value of +.Fa type +is invalid. +.It Bq Er EBADF +One of the file descriptors referred to by +.Fa idx1 +or +.Fa idx2 +is not valid. +.It Bq Er ESRCH +One of the processes referred to by +.Fa pid1 +or +.Fa pid2 +does not exist or is not visible (e.g., due to jail restrictions). +.It Bq Er EPERM +The caller does not have permission to access one of the processes referred to +by +.Fa pid1 +or +.Fa pid2 . +.El +.Sh SEE ALSO +.Xr dup 2 , +.Xr fcntl 2 , +.Xr fork 2 , +.Xr rfork 2 , +.Xr vfork 2 +.Sh STANDARDS +The +.Nm +system call originated in Linux. +This implementation aims to be source-compatible with the Linux implementation. +.Fx +implements only a subset of the possible values for +.Fa type +supported in Linux. +More values may be added in the future. +The +.Dv KCMP_FILEOBJ +type is a FreeBSD extension. +.Sh HISTORY +The +.Nm +function was introduced in +.Fx 14.1 . From nobody Wed Jan 24 16:28:38 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKqD95HrZz58Jph; Wed, 24 Jan 2024 16:29:29 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from mail.bsd4all.net (mail.bsd4all.net [94.130.200.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail.bsd4all.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKqD92k7jz4v1Q; Wed, 24 Jan 2024 16:29:29 +0000 (UTC) (envelope-from herbert@gojira.at) Authentication-Results: mx1.freebsd.org; none Date: Wed, 24 Jan 2024 17:28:38 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gojira.at; s=mail202005; t=1706113767; bh=rP0lzA1yaXhB06G/N9KZuNiV72P6EGWrdrvMozFNEbE=; h=Date:Message-ID:From:To:Cc:Subject:MIME-Version:Content-Type; b=kieNowSaKHw5RIeRofZonS2wumGt0GrHhngVAwCoQm9lB9OG2UFlPGpunPuk5CY9C izxH0jnGPnFx3nvMixNacnk+pLmKny2byPXRtNQr5zx3ThXfwjbgMQSIXIE1GI7nrP F/2DiJRf6tQOObuZNskPEc9RGhj4nMYCumD09MmaN49pabFyxRJzGs3gliO4uAhX5f LjJcwNcbkN3+pNloCLe8Mp8tL3OFcrF6PJlEaqi/CCvGFWGxF4U+lbkMhjbS1bWOBV 37jHb8hY6Mf4OjKVItNOLfF8jKvQirFvbxjYWoigN9Zh6TGIfhkfJGyYtfKqRjHy1u /Zh428NK/j2Qg== Message-ID: <87jznylmq1.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: Kristof Provost Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 54c62e3e5d8c - main - pf: work around icmp6 packet-too-big not being sent when binat-ing In-Reply-To: <880FAE40-9D91-4AA6-92BA-2D582D23B745@FreeBSD.org> References: <202401221252.40MCqpf6047526@gitrepo.freebsd.org> <87v87jkii9.wl-herbert@gojira.at> <1E1C3472-0AF3-457B-A27A-89679770EA62@FreeBSD.org> <87sf2nm4et.wl-herbert@gojira.at> <880FAE40-9D91-4AA6-92BA-2D582D23B745@FreeBSD.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/29.2 Mule/6.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4TKqD92k7jz4v1Q X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:24940, ipnet:94.130.0.0/16, country:DE] On Wed, 24 Jan 2024 14:27:19 +0100, Kristof Provost wrote: > On 24 Jan 2024, at 11:06, Herbert J. Skuhra wrote: > > On Tue, 23 Jan 2024 19:42:10 +0100, Kristof Provost wrote: > >> On 23 Jan 2024, at 19:32, Herbert J. Skuhra wrote: > >>> On Mon, 22 Jan 2024 13:52:51 +0100, Kristof Provost wrote: > >>>> > >>>> The branch main has been updated by kp: > >>>> > >>>> URL: > >>>> https://cgit.FreeBSD.org/src/commit/?id=54c62e3e5d8cd90c5571a1d4c8c5f062d580480e > >>>> > >>>> commit 54c62e3e5d8cd90c5571a1d4c8c5f062d580480e > >>>> Author: Kristof Provost > >>>> AuthorDate: 2024-01-17 17:11:27 +0000 > >>>> Commit: Kristof Provost > >>>> CommitDate: 2024-01-22 11:52:14 +0000 > >>>> > >>>> pf: work around icmp6 packet-too-big not being sent when > >>>> binat-ing > >>>> > >>>> If we're applying NPTv6 we pass a packet with a modified > >>>> source and/or > >>>> destination address to the network stack. > >>>> > >>>> If that packet then turns out to be larger than the MTU of > >>>> the sending > >>>> interface the stack will attempt to generate an icmp6 > >>>> packet-too-big > >>>> error, but may fail to look up the appropriate source address > >>>> for that > >>>> error message. Even if it does, pf would still have to undo > >>>> the binat > >>>> operation inside the icmp6 packet so the sending host can > >>>> make sense of > >>>> the error. > >>>> > >>>> We can avoid both problems entirely by having pf also perform > >>>> the MTU > >>>> check (taking the potential refragmentation into account), and > >>>> generating the icmp6 error directly in pf. > >>>> > >>>> See also: https://redmine.pfsense.org/issues/14290 > >>>> Sponsored by: Rubicon Communications, LLC ("Netgate") > >>>> Differential Revision: https://reviews.freebsd.org/D43499 > >>>> --- > >>>> sys/net/pfvar.h | 1 + > >>>> sys/netpfil/pf/pf.c | 12 ++++++++++++ > >>>> sys/netpfil/pf/pf_norm.c | 15 +++++++++++++++ > >>>> 3 files changed, 28 insertions(+) > >>> > >>> Does this change cause problems for others too? > >>> > >>> - ssh over IPv6 permanently disconnecting > >>> (client_loop: send disconnect: Broken pipe) > >>> - ssh connections over IPv6 hanging > >>> - git pull not working > >>> Fssh_ssh_dispatch_run_fatal: Connection to > >>> 2604:1380:4091:a001::24ca:1 port 22: Permission denied > >>> fatal: Could not read from remote repository. > >>> > >> Can you include your pf.conf and a packet capture demonstrating one > >> of these issues? > > > > So I assume this issue affects only me or this server (igb nic). > > Disabling tso6 seems to resolve the issue. > > > Ah. A Clue(tm)! > > Try this: > > diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c > index 38a5a45d7991..2dc6d02d330a 100644 > --- a/sys/netpfil/pf/pf.c > +++ b/sys/netpfil/pf/pf.c > @@ -8515,7 +8515,7 @@ pf_test6(int dir, int pflags, struct > ifnet *ifp, struct mbuf **m0, struct inpcb > * confused and fail to send the icmp6 packet too big > error. Just send > * it here, before we do any NAT. > */ > - if (dir == PF_OUT && IN6_LINKMTU(ifp) < pf_max_frag_size(m)) { > + if (dir == PF_OUT && pflags & PFIL_FWD && > IN6_LINKMTU(ifp) < pf_max_frag_size(m)) { > PF_RULES_RUNLOCK(); > *m0 = NULL; > icmp6_error(m, ICMP6_PACKET_TOO_BIG, 0, > IN6_LINKMTU(ifp)); This patch fixes the issue. Thanks a lot. -- Herbert From nobody Wed Jan 24 16:41:17 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKqTp1XGYz58KVY; Wed, 24 Jan 2024 16:41: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 4TKqTn5p9qz4wZp; Wed, 24 Jan 2024 16:41:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706114477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYHYCAShoa6xiIe9VY9FKbPSrmp6G31to9rWy1mksmg=; b=sCbzBrYyP6pFPzXMBJlMhdRgLEJunynvPYYJsbjYe8U291/YSvn/wyx2XWIcInjQCWGkTv dAMPpdAh5mEITgGKBDB+ECoi/roBfliQ64sR0iLSYyoROwDqfOUtDDpZgzPruJTqJh4fPf VvfOW3vBitHy0hc61cVyGsCcE/us6HXeAwt+MOCFjG2t4CMCbcyI22bSv/XsqZjpL4sOQu 1fnqyIRCQU00eEgTfKRqJCU63p3GW6RYqNoxoABth3Mihi6tHu+TdebiM2ZByGreJSKUzU 7HdP2NH6dQXI/xHT8IJeC6q6fwyJAqCTZwbxDCa4bj9VcxwukFHYLFaFWMnpLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706114477; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CYHYCAShoa6xiIe9VY9FKbPSrmp6G31to9rWy1mksmg=; b=JX3SVu31cBjHF3cOImKnVpYI2zl68J4xNoTeu2WWg+gChFviPt6+FSBYT8xfTfeoduGYWl djybp5CBmeBII8wr7GG1rIRWaHr4Rzrr+nHerfac+BUBoUlqqksCCv1VLxOGTJGVHxdrCC oX0gs19Hg2kJ7Eq/SpXr9Mbjy26o0Uoa2L3hIa1Xp79fci6bIE7eJy7gIM6YjBgew58TTp 2HkC/iGoaAwmGlOlTszwkP3lgiqbNY2J68/hHaCcPo2NPMtJUTL97yEZwgTWRlsHYuMZQT rYHZbBKkavMsX5mj20ra8bzKvMeROZMlIq1BuRJkrfIvZhy11gGc2L+4UsQVdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706114477; a=rsa-sha256; cv=none; b=PnVqIvPv9POzkk6FmQfi7lWncWBdMMNVB4yjoXGpkmgrp1YqDjpmJhqiYiUJsdSAd5W24N mo2dEjpbCCab1geJAzt4a7QRzV2qNrVxdzSH/XcPFDRIK0dJwuAEb3jS3MFjmLQHHb7bAZ UAg3/7yWa6cJiZZDiOHOirrwrIij1paXshk8xf0q8wf10ZL9Le6/qYyA+2buIM6SrMSIty rIaANMPBeb9nFKsIil+kTx8lqqrTQfMF5/1bEcz12twoWvZXb/7aujWO/uTV55u5LkjF9E gLnMjNdJO6+MUozHsTRJPSsVcCLnSihLbwctaGyFjkv0uMmn3rrrY3wjltF1mQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKqTn3mRRzMQd; Wed, 24 Jan 2024 16:41: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 40OGfH0g095846; Wed, 24 Jan 2024 16:41:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40OGfH1O095843; Wed, 24 Jan 2024 16:41:17 GMT (envelope-from git) Date: Wed, 24 Jan 2024 16:41:17 GMT Message-Id: <202401241641.40OGfH1O095843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: c7c325d01de4 - main - tcp: pass maxseg around instead of calculating locally List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7c325d01de4a1509e0a978f28275279de692130 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=c7c325d01de4a1509e0a978f28275279de692130 commit c7c325d01de4a1509e0a978f28275279de692130 Author: Richard Scheffenegger AuthorDate: 2024-01-24 15:42:29 +0000 Commit: Richard Scheffenegger CommitDate: 2024-01-24 15:43:29 +0000 tcp: pass maxseg around instead of calculating locally Improve slowpath processing (reordering, retransmissions) slightly by calculating maxseg only once. This typically saves one of two calls to tcp_maxseg(). Reviewed By: glebius, tuexen, cc, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43536 --- sys/netinet/tcp_input.c | 37 +++++++++++++++++++++++++------------ sys/netinet/tcp_sack.c | 9 +++++++-- sys/netinet/tcp_var.h | 8 +++++--- 3 files changed, 37 insertions(+), 17 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index ed5f28490852..02b042fd3273 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1529,7 +1529,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, struct mbuf *mfree; struct tcpopt to; int tfo_syn; - u_int maxseg; + u_int maxseg = 0; thflags = tcp_get_flags(th); tp->sackhint.last_sack_ack = 0; @@ -2596,7 +2596,8 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, if (V_tcp_do_prr && IN_FASTRECOVERY(tp->t_flags) && (tp->t_flags & TF_SACK_PERMIT)) { - tcp_do_prr_ack(tp, th, &to, sack_changed); + tcp_do_prr_ack(tp, th, &to, + sack_changed, &maxseg); } else if (tcp_is_sack_recovery(tp, &to) && IN_FASTRECOVERY(tp->t_flags)) { int awnd; @@ -2801,19 +2802,24 @@ resume_partialack: */ if (IN_FASTRECOVERY(tp->t_flags)) { if (SEQ_LT(th->th_ack, tp->snd_recover)) { - if (tp->t_flags & TF_SACK_PERMIT) + if (tp->t_flags & TF_SACK_PERMIT) { if (V_tcp_do_prr && to.to_flags & TOF_SACK) { tcp_timer_activate(tp, TT_REXMT, 0); tp->t_rtttime = 0; - tcp_do_prr_ack(tp, th, &to, sack_changed); + tcp_do_prr_ack(tp, th, &to, + sack_changed, &maxseg); tp->t_flags |= TF_ACKNOW; (void) tcp_output(tp); - } else - tcp_sack_partialack(tp, th); - else + } else { + tcp_sack_partialack(tp, th, + &maxseg); + } + } else { tcp_newreno_partial_ack(tp, th); - } else + } + } else { cc_post_recovery(tp, th); + } } else if (IN_CONGRECOVERY(tp->t_flags)) { if (SEQ_LT(th->th_ack, tp->snd_recover)) { if (V_tcp_do_prr) { @@ -2823,11 +2829,13 @@ resume_partialack: * During ECN cwnd reduction * always use PRR-SSRB */ - tcp_do_prr_ack(tp, th, &to, SACK_CHANGE); + tcp_do_prr_ack(tp, th, &to, SACK_CHANGE, + &maxseg); (void) tcp_output(tp); } - } else + } else { cc_post_recovery(tp, th); + } } /* * If we reach this point, ACK is not a duplicate, @@ -3946,13 +3954,18 @@ tcp_mssopt(struct in_conninfo *inc) } void -tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to, sackstatus_t sack_changed) +tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to, + sackstatus_t sack_changed, u_int *maxsegp) { int snd_cnt = 0, limit = 0, del_data = 0, pipe = 0; - int maxseg = tcp_maxseg(tp); + u_int maxseg; INP_WLOCK_ASSERT(tptoinpcb(tp)); + if (*maxsegp == 0) { + *maxsegp = tcp_maxseg(tp); + } + maxseg = *maxsegp; /* * Compute the amount of data that this ACK is indicating * (del_data) and an estimate of how many bytes are in the diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index f9ca83850c09..f517bb9fcdb7 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -936,13 +936,18 @@ tcp_resend_sackholes(struct tcpcb *tp) * the midst of sack recovery. */ void -tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th) +tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th, u_int *maxsegp) { struct sackhole *temp; int num_segs = 1; - u_int maxseg = tcp_maxseg(tp); + u_int maxseg; INP_WLOCK_ASSERT(tptoinpcb(tp)); + + if (*maxsegp == 0) { + *maxsegp = tcp_maxseg(tp); + } + maxseg = *maxsegp; tcp_timer_activate(tp, TT_REXMT, 0); tp->t_rtttime = 0; /* Send one or 2 segments based on how much new data was acked. */ diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index f9b3d1a5c3ee..cbe8de7988c7 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1481,14 +1481,16 @@ sackstatus_t tcp_sack_doack(struct tcpcb *, struct tcpopt *, tcp_seq); int tcp_dsack_block_exists(struct tcpcb *); void tcp_update_dsack_list(struct tcpcb *, tcp_seq, tcp_seq); -void tcp_update_sack_list(struct tcpcb *tp, tcp_seq rcv_laststart, tcp_seq rcv_lastend); +void tcp_update_sack_list(struct tcpcb *tp, tcp_seq rcv_laststart, + tcp_seq rcv_lastend); void tcp_clean_dsack_blocks(struct tcpcb *tp); void tcp_clean_sackreport(struct tcpcb *tp); void tcp_sack_adjust(struct tcpcb *tp); struct sackhole *tcp_sack_output(struct tcpcb *tp, int *sack_bytes_rexmt); -void tcp_do_prr_ack(struct tcpcb *, struct tcphdr *, struct tcpopt *, sackstatus_t); +void tcp_do_prr_ack(struct tcpcb *, struct tcphdr *, struct tcpopt *, + sackstatus_t, u_int *); void tcp_lost_retransmission(struct tcpcb *, struct tcphdr *); -void tcp_sack_partialack(struct tcpcb *, struct tcphdr *); +void tcp_sack_partialack(struct tcpcb *, struct tcphdr *, u_int *); void tcp_resend_sackholes(struct tcpcb *tp); void tcp_free_sackholes(struct tcpcb *tp); void tcp_sack_lost_retransmission(struct tcpcb *, struct tcphdr *); From nobody Wed Jan 24 17:34:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKrgk23bpz58QC7; Wed, 24 Jan 2024 17:34: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 4TKrgk1qRcz52s4; Wed, 24 Jan 2024 17:34:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706117698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZvpO3YJn38KRgRqTGe7Wn+sV46rtjLmVA401xBugJ6o=; b=WTzk8lmksRRVYfiTZe+IbVRXjcDqcveGQ3BMrBRu3JFOM5GGLwWpucG6nVUmoGv3JDZGL3 eEd1Rrsrj/TluPepVSLJGQf6rNY3YnzJonGs7ql9gZ2B1R/juRMvkyodCMmooifbP1Rfsz 1Lp6ecZlR+na1suJ8DJRmwBWWSCI4CZXizpQ31G13bd/pNfVS2r3GbAs2z+VOPyhdgqaIa aOdUYh0K4wCdZLC/ClrD+w68BBysKZ9JtK6EecIUy2GdTwweOFfE1a+XsBOL7Pn/ogXlKC P9Huojh+sE1ZDWbiYInDQ9t79GKeiUbp3kikRyF2qkYaPg3ItkDt0NSI2iJrzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706117698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZvpO3YJn38KRgRqTGe7Wn+sV46rtjLmVA401xBugJ6o=; b=ZPpy4E84guA6zCvCZEs3YVCdEWWV8Bhc2EGXuD7p3SU1n9it60U20XTSNRqSVCH6Dp6uhA DnY4SuBlPkCUtJSFodlVf4ntOmP5oD689khumLCKZhCSE46FgatvaxcA4AxD0uj2nDL+hI vcefhyr0+9M9NSyLqTpWjJ64ArAIP3CL+70gLjJNEoYvr+hxfaReLag1wn8HVXnspC4Eft Ml93tdFXB+udAaxG7N5PTcWrHRubOcygIimTFGxhOwzny3ERL7OdvzVF62hu0Ppm3U8fH8 QDv7m/DhAwT2soW+sliIN4cq6OP0K2DW9FAVwnjJQ49fkRBu2CXlCyCPfpJA9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706117698; a=rsa-sha256; cv=none; b=H7W87a7Yo3bwbD0RvNWxh9f0phz2MEV4gtGqmWKukOSqAQ3y/sX0e2b+L9yYHrdmiPg31s vSn2Gwg9L3n83DBlqLsnf8J57s6VruB5gUzUj0kVB+Bept+aziErHlbts6Q89GjPQa3LFX lO0T8BwFrmtxre32e0HH4C97JKBOlECu3+tp8duRVMBJGq6oObAd/SyvqnyjvYbaDbu7wI xCXqhcue652sIoKbOOKW1zOhdS8y4kq4rBxzp7tUVbuGK/M2y8tELdG/BkFj2QCtej48ky 3+9n7E4msgmy9gZ3+Axam7/hDOpOJRbz/UVVg63LT1zbKNKtXDngveynWfs4YA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKrgk0m24zNxW; Wed, 24 Jan 2024 17:34: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 40OHYwt0086197; Wed, 24 Jan 2024 17:34:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40OHYvCK086194; Wed, 24 Jan 2024 17:34:57 GMT (envelope-from git) Date: Wed, 24 Jan 2024 17:34:57 GMT Message-Id: <202401241734.40OHYvCK086194@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 5fc3104ae738 - main - callout: retire callout_async_drain() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fc3104ae7389a0937f55af5157761c64b8a0668 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=5fc3104ae7389a0937f55af5157761c64b8a0668 commit 5fc3104ae7389a0937f55af5157761c64b8a0668 Author: Gleb Smirnoff AuthorDate: 2024-01-24 17:33:27 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-24 17:33:27 +0000 callout: retire callout_async_drain() This function was used only in TCP before 446ccdd08e2a. It was born in pain in 2016 to plug different complex panics in TCP timers. It wasn't warmly accepted in phabricator by all of the reviewers and my recollection of overall agreement was that "if you need this KPI, then you'd better fix your code to not need it". However, the function served its duty well all the way to FreeBSD 14. But now that TCP doesn't need it anymore, let's retire it to reduce complexity of callout code and also to avoid its further use. Reviewed by: jhb, markj, kib, rrs Differential Revision: https://reviews.freebsd.org/D43546 --- ObsoleteFiles.inc | 3 + share/man/man9/Makefile | 1 - share/man/man9/callout.9 | 29 +--- sys/kern/kern_timeout.c | 37 +---- sys/modules/tests/Makefile | 1 - sys/modules/tests/callout_test/Makefile | 14 -- sys/sys/callout.h | 8 +- sys/tests/callout_test.h | 32 ---- sys/tests/callout_test/callout_test.c | 282 -------------------------------- 9 files changed, 12 insertions(+), 395 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index a6c15187e847..2ba4e487ad0b 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20240122: callout_async_drain() removed +OLD_FILES+=usr/share/man/man9/callout_async_drain.9.gz + # 20240114: Removal of geom_map(4) OLD_FILES+=usr/share/man/man4/geom_map.4 diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 3f9572796fa1..c98849b42a7b 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -810,7 +810,6 @@ MLINKS+=byteorder.9 be16dec.9 \ byteorder.9 le64enc.9 \ byteorder.9 le64toh.9 MLINKS+=callout.9 callout_active.9 \ - callout.9 callout_async_drain.9 \ callout.9 callout_deactivate.9 \ callout.9 callout_drain.9 \ callout.9 callout_init.9 \ diff --git a/share/man/man9/callout.9 b/share/man/man9/callout.9 index 96b93283bfc2..0e59ef8ab2b1 100644 --- a/share/man/man9/callout.9 +++ b/share/man/man9/callout.9 @@ -27,13 +27,12 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd September 1, 2021 +.Dd January 22, 2024 .Dt CALLOUT 9 .Os .Sh NAME .Nm callout_active , .Nm callout_deactivate , -.Nm callout_async_drain , .Nm callout_drain , .Nm callout_init , .Nm callout_init_mtx , @@ -66,8 +65,6 @@ typedef void callout_func_t (void *); .Ft void .Fn callout_deactivate "struct callout *c" .Ft int -.Fn callout_async_drain "struct callout *c" "callout_func_t *drain" -.Ft int .Fn callout_drain "struct callout *c" .Ft void .Fn callout_init "struct callout *c" "int mpsafe" @@ -293,30 +290,6 @@ If the callout has an associated lock, then that lock must be held when this function is called. .Pp The function -.Fn callout_async_drain -is identical to -.Fn callout_stop -with one difference. -When -.Fn callout_async_drain -returns zero it will arrange for the function -.Fa drain -to be called using the same argument given to the -.Fn callout_reset -function. -.Fn callout_async_drain -If the callout has an associated lock, -then that lock must be held when this function is called. -Note that when stopping multiple callouts that use the same lock it is possible -to get multiple return's of zero and multiple calls to the -.Fa drain -function, depending upon which CPU's the callouts are running. -The -.Fa drain -function itself is called from the context of the completing callout -i.e. softclock or hardclock, just like a callout itself. -.Pp -The function .Fn callout_drain is identical to .Fn callout_stop diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index dbe7ec0a4a76..5f2d78285c66 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -142,7 +142,6 @@ static u_int __read_mostly callwheelmask; */ struct cc_exec { struct callout *cc_curr; - callout_func_t *cc_drain; void *cc_last_func; void *cc_last_arg; #ifdef SMP @@ -180,7 +179,6 @@ struct callout_cpu { #define cc_exec_curr(cc, dir) cc->cc_exec_entity[dir].cc_curr #define cc_exec_last_func(cc, dir) cc->cc_exec_entity[dir].cc_last_func #define cc_exec_last_arg(cc, dir) cc->cc_exec_entity[dir].cc_last_arg -#define cc_exec_drain(cc, dir) cc->cc_exec_entity[dir].cc_drain #define cc_exec_next(cc) cc->cc_next #define cc_exec_cancel(cc, dir) cc->cc_exec_entity[dir].cc_cancel #define cc_exec_waiting(cc, dir) cc->cc_exec_entity[dir].cc_waiting @@ -631,7 +629,7 @@ softclock_call_cc(struct callout *c, struct callout_cpu *cc, int direct) { struct rm_priotracker tracker; - callout_func_t *c_func, *drain; + callout_func_t *c_func; void *c_arg; struct lock_class *class; struct lock_object *c_lock; @@ -673,7 +671,6 @@ softclock_call_cc(struct callout *c, struct callout_cpu *cc, cc_exec_last_func(cc, direct) = c_func; cc_exec_last_arg(cc, direct) = c_arg; cc_exec_cancel(cc, direct) = false; - cc_exec_drain(cc, direct) = NULL; CC_UNLOCK(cc); if (c_lock != NULL) { class->lc_lock(c_lock, lock_status); @@ -739,13 +736,6 @@ skip: CC_LOCK(cc); KASSERT(cc_exec_curr(cc, direct) == c, ("mishandled cc_curr")); cc_exec_curr(cc, direct) = NULL; - if (cc_exec_drain(cc, direct)) { - drain = cc_exec_drain(cc, direct); - cc_exec_drain(cc, direct) = NULL; - CC_UNLOCK(cc); - drain(c_arg); - CC_LOCK(cc); - } if (cc_exec_waiting(cc, direct)) { /* * There is someone waiting for the @@ -969,7 +959,7 @@ callout_reset_sbt_on(struct callout *c, sbintime_t sbt, sbintime_t prec, */ if (c->c_lock != NULL && !cc_exec_cancel(cc, direct)) cancelled = cc_exec_cancel(cc, direct) = true; - if (cc_exec_waiting(cc, direct) || cc_exec_drain(cc, direct)) { + if (cc_exec_waiting(cc, direct)) { /* * Someone has called callout_drain to kill this * callout. Don't reschedule. @@ -1080,7 +1070,7 @@ callout_schedule(struct callout *c, int to_ticks) } int -_callout_stop_safe(struct callout *c, int flags, callout_func_t *drain) +_callout_stop_safe(struct callout *c, int flags) { struct callout_cpu *cc, *old_cc; struct lock_class *class; @@ -1091,9 +1081,6 @@ _callout_stop_safe(struct callout *c, int flags, callout_func_t *drain) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, c->c_lock, "calling %s", __func__); - KASSERT((flags & CS_DRAIN) == 0 || drain == NULL, - ("Cannot set drain callback and CS_DRAIN flag at the same time")); - /* * Some old subsystems don't hold Giant while running a callout_stop(), * so just discard this check for the moment. @@ -1228,8 +1215,7 @@ again: goto again; } c->c_flags &= ~CALLOUT_ACTIVE; - } else if (use_lock && - !cc_exec_cancel(cc, direct) && (drain == NULL)) { + } else if (use_lock && !cc_exec_cancel(cc, direct)) { /* * The current callout is waiting for its @@ -1237,8 +1223,7 @@ again: * and return. After our caller drops the * lock, the callout will be skipped in * softclock(). This *only* works with a - * callout_stop() *not* callout_drain() or - * callout_async_drain(). + * callout_stop() *not* with callout_drain(). */ cc_exec_cancel(cc, direct) = true; CTR3(KTR_CALLOUT, "cancelled %p func %p arg %p", @@ -1284,23 +1269,11 @@ again: #endif CTR3(KTR_CALLOUT, "postponing stop %p func %p arg %p", c, c->c_func, c->c_arg); - if (drain) { - KASSERT(cc_exec_drain(cc, direct) == NULL, - ("callout drain function already set to %p", - cc_exec_drain(cc, direct))); - cc_exec_drain(cc, direct) = drain; - } CC_UNLOCK(cc); return (0); } else { CTR3(KTR_CALLOUT, "failed to stop %p func %p arg %p", c, c->c_func, c->c_arg); - if (drain) { - KASSERT(cc_exec_drain(cc, direct) == NULL, - ("callout drain function already set to %p", - cc_exec_drain(cc, direct))); - cc_exec_drain(cc, direct) = drain; - } } KASSERT(!sq_locked, ("sleepqueue chain still locked")); cancelled = 0; diff --git a/sys/modules/tests/Makefile b/sys/modules/tests/Makefile index abc077ffa2df..7481a0a3a4b4 100644 --- a/sys/modules/tests/Makefile +++ b/sys/modules/tests/Makefile @@ -1,7 +1,6 @@ SUBDIR+= framework SUBDIR+= .WAIT -SUBDIR+= callout_test SUBDIR_PARALLEL= diff --git a/sys/modules/tests/callout_test/Makefile b/sys/modules/tests/callout_test/Makefile deleted file mode 100644 index 7cab464b8fc4..000000000000 --- a/sys/modules/tests/callout_test/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -# -# - -.PATH: ${SRCTOP}/sys/tests/callout_test - -KMOD= callout_test -SRCS= callout_test.c - -# -# Enable full debugging -# -#CFLAGS += -g - -.include diff --git a/sys/sys/callout.h b/sys/sys/callout.h index 2e2b835fcc43..f2a5bf92ab46 100644 --- a/sys/sys/callout.h +++ b/sys/sys/callout.h @@ -81,7 +81,7 @@ */ #define callout_active(c) ((c)->c_flags & CALLOUT_ACTIVE) #define callout_deactivate(c) ((c)->c_flags &= ~CALLOUT_ACTIVE) -#define callout_drain(c) _callout_stop_safe(c, CS_DRAIN, NULL) +#define callout_drain(c) _callout_stop_safe(c, CS_DRAIN) void callout_init(struct callout *, int); void _callout_init_lock(struct callout *, struct lock_object *, int); #define callout_init_mtx(c, mtx, flags) \ @@ -119,11 +119,9 @@ int callout_schedule(struct callout *, int); int callout_schedule_on(struct callout *, int, int); #define callout_schedule_curcpu(c, on_tick) \ callout_schedule_on((c), (on_tick), PCPU_GET(cpuid)) -#define callout_stop(c) _callout_stop_safe(c, 0, NULL) -int _callout_stop_safe(struct callout *, int, void (*)(void *)); +#define callout_stop(c) _callout_stop_safe(c, 0) +int _callout_stop_safe(struct callout *, int); void callout_process(sbintime_t now); -#define callout_async_drain(c, d) \ - _callout_stop_safe(c, 0, d) void callout_when(sbintime_t sbt, sbintime_t precision, int flags, sbintime_t *sbt_res, sbintime_t *prec_res); #endif diff --git a/sys/tests/callout_test.h b/sys/tests/callout_test.h deleted file mode 100644 index 60a02f0c7b56..000000000000 --- a/sys/tests/callout_test.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef __callout_test_h__ -#define __callout_test_h__ -/*- - * Copyright (c) 2015 Netflix, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - */ -struct callout_test { - int number_of_callouts; - int test_number; -}; -#endif diff --git a/sys/tests/callout_test/callout_test.c b/sys/tests/callout_test/callout_test.c deleted file mode 100644 index 059d6a728fb6..000000000000 --- a/sys/tests/callout_test/callout_test.c +++ /dev/null @@ -1,282 +0,0 @@ -/*- - * Copyright (c) 2015 Netflix, Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -MALLOC_DEFINE(M_CALLTMP, "Temp callout Memory", "CalloutTest"); - -struct callout_run { - struct mtx lock; - struct callout *co_array; - int co_test; - int co_number_callouts; - int co_return_npa; - int co_completed; - int callout_waiting; - int drain_calls; - int cnt_zero; - int cnt_one; - int index; -}; - -static struct callout_run *comaster[MAXCPU]; - -uint64_t callout_total = 0; - -static void execute_the_co_test(struct callout_run *rn); - -static void -co_saydone(void *arg) -{ - struct callout_run *rn; - - rn = (struct callout_run *)arg; - printf("The callout test is now complete for thread %d\n", - rn->index); - printf("number_callouts:%d\n", - rn->co_number_callouts); - printf("Callouts that bailed (Not PENDING or ACTIVE cleared):%d\n", - rn->co_return_npa); - printf("Callouts that completed:%d\n", rn->co_completed); - printf("Drain calls:%d\n", rn->drain_calls); - printf("Zero returns:%d non-zero:%d\n", - rn->cnt_zero, - rn->cnt_one); - -} - -static void -drainit(void *arg) -{ - struct callout_run *rn; - - rn = (struct callout_run *)arg; - mtx_lock(&rn->lock); - rn->drain_calls++; - mtx_unlock(&rn->lock); -} - -static void -test_callout(void *arg) -{ - struct callout_run *rn; - int cpu; - - critical_enter(); - cpu = curcpu; - critical_exit(); - rn = (struct callout_run *)arg; - atomic_add_int(&rn->callout_waiting, 1); - mtx_lock(&rn->lock); - if (callout_pending(&rn->co_array[cpu]) || - !callout_active(&rn->co_array[cpu])) { - rn->co_return_npa++; - atomic_subtract_int(&rn->callout_waiting, 1); - mtx_unlock(&rn->lock); - return; - } - callout_deactivate(&rn->co_array[cpu]); - rn->co_completed++; - mtx_unlock(&rn->lock); - atomic_subtract_int(&rn->callout_waiting, 1); -} - -void -execute_the_co_test(struct callout_run *rn) -{ - int i, ret, cpu; - uint32_t tk_s, tk_e, tk_d; - - mtx_lock(&rn->lock); - rn->callout_waiting = 0; - for (i = 0; i < rn->co_number_callouts; i++) { - if (rn->co_test == 1) { - /* start all on spread out cpu's */ - cpu = i % mp_ncpus; - callout_reset_sbt_on(&rn->co_array[i], 3, 0, test_callout, rn, - cpu, 0); - } else { - /* Start all on the same CPU */ - callout_reset_sbt_on(&rn->co_array[i], 3, 0, test_callout, rn, - rn->index, 0); - } - } - tk_s = ticks; - while (rn->callout_waiting != rn->co_number_callouts) { - cpu_spinwait(); - tk_e = ticks; - tk_d = tk_e - tk_s; - if (tk_d > 100) { - break; - } - } - /* OK everyone is waiting and we have the lock */ - for (i = 0; i < rn->co_number_callouts; i++) { - ret = callout_async_drain(&rn->co_array[i], drainit); - if (ret) { - rn->cnt_one++; - } else { - rn->cnt_zero++; - } - } - rn->callout_waiting -= rn->cnt_one; - mtx_unlock(&rn->lock); - /* Now wait until all are done */ - tk_s = ticks; - while (rn->callout_waiting > 0) { - cpu_spinwait(); - tk_e = ticks; - tk_d = tk_e - tk_s; - if (tk_d > 100) { - break; - } - } - co_saydone((void *)rn); -} - - -static void -run_callout_test(struct kern_test *test) -{ - struct callout_test *u; - size_t sz; - int i; - struct callout_run *rn; - int index = test->tot_threads_running; - - u = (struct callout_test *)test->test_options; - if (comaster[index] == NULL) { - rn = comaster[index] = malloc(sizeof(struct callout_run), M_CALLTMP, M_WAITOK); - memset(comaster[index], 0, sizeof(struct callout_run)); - mtx_init(&rn->lock, "callouttest", NULL, MTX_DUPOK); - rn->index = index; - } else { - rn = comaster[index]; - rn->co_number_callouts = rn->co_return_npa = 0; - rn->co_completed = rn->callout_waiting = 0; - rn->drain_calls = rn->cnt_zero = rn->cnt_one = 0; - if (rn->co_array) { - free(rn->co_array, M_CALLTMP); - rn->co_array = NULL; - } - } - rn->co_number_callouts = u->number_of_callouts; - rn->co_test = u->test_number; - sz = sizeof(struct callout) * rn->co_number_callouts; - rn->co_array = malloc(sz, M_CALLTMP, M_WAITOK); - for (i = 0; i < rn->co_number_callouts; i++) { - callout_init(&rn->co_array[i], CALLOUT_MPSAFE); - } - execute_the_co_test(rn); -} - -int callout_test_is_loaded = 0; - -static void -cocleanup(void) -{ - int i; - - for (i = 0; i < MAXCPU; i++) { - if (comaster[i]) { - if (comaster[i]->co_array) { - free(comaster[i]->co_array, M_CALLTMP); - comaster[i]->co_array = NULL; - } - free(comaster[i], M_CALLTMP); - comaster[i] = NULL; - } - } -} - -static int -callout_test_modevent(module_t mod, int type, void *data) -{ - int err = 0; - - switch (type) { - case MOD_LOAD: - err = kern_testframework_register("callout_test", - run_callout_test); - if (err) { - printf("Can't load callout_test err:%d returned\n", - err); - } else { - memset(comaster, 0, sizeof(comaster)); - callout_test_is_loaded = 1; - } - break; - case MOD_QUIESCE: - err = kern_testframework_deregister("callout_test"); - if (err == 0) { - callout_test_is_loaded = 0; - cocleanup(); - } - break; - case MOD_UNLOAD: - if (callout_test_is_loaded) { - err = kern_testframework_deregister("callout_test"); - if (err == 0) { - cocleanup(); - callout_test_is_loaded = 0; - } - } - break; - default: - return (EOPNOTSUPP); - } - return (err); -} - -static moduledata_t callout_test_mod = { - .name = "callout_test", - .evhand = callout_test_modevent, - .priv = 0 -}; - -MODULE_DEPEND(callout_test, kern_testframework, 1, 1, 1); -DECLARE_MODULE(callout_test, callout_test_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); From nobody Wed Jan 24 17:51:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKs3M0msKz58RGd; Wed, 24 Jan 2024 17:51:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKs3M0FFbz54fH; Wed, 24 Jan 2024 17:51:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706118719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NRBEl3M3sQpt2dKDSAEcbg/lSLknXYEc/i/cQuhh9bQ=; b=SZEHPoBg1RkjM6qkRgOkY88SM/7psWABTIub1n4MP+/dLp26r0kn54KTj/6OGlX69sP0TL Kou3YNcbondU27ojEQW8HzOvQ3RdWuvXRC7sAmpt9zjkw9FMCFsjzJ3g0cNmy3kYHa/YdB hiF2pgBWUQqWXEYOwDL69q6WR1o43VoEsiWdpChow8aYzqaQj6zLrMLoIAE0iPbx7XH0RT 97ilwbgET0mEUvxOt4UABtQS879sizuVBmpXuzdozsRSDnLrdSwtee1FEWmsQ9z9nxj/wN x3h12JoWd/aYi9RZ/OdvB6Ef/m6saOaGsixwr/sRBeagqReXxPaoH6HRuRaj9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706118719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NRBEl3M3sQpt2dKDSAEcbg/lSLknXYEc/i/cQuhh9bQ=; b=EW6xivQbTTrcGjbgv6gZPWVKLKPUtHw5Igx8Rze0hn82fVNlOMjKng1mckCvIK1K3J+8FF 6lAcB51fr6+QR69X4xTCDF3obQ/OWJgnmTWzuMqMDvBgwNhGarPbqC7PHE3Y0sWf31+bDq fgczvEhg8rLuI936RhGw2Vec20i+JMkabUdGd/P2JyVYh2VXG8Zg/Y0CO6KL/76nbtCRv8 hpcZDUnCyBiFtMaYzGPz3bkKBFF7xQKm014XQmfRxYOpXTMhsT73xnbBnJePnyedxkmRsT CmUcjfyjVFBHpC6G7mzRAkGP4cyi1aPnTnYExQda2j9lyZdi3sXW9qZurHccNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706118719; a=rsa-sha256; cv=none; b=cs9NbMfqmfWISPf14t9uSzZ5gFN2IR5yc98z5Fxq8vCqYR/zBHM0q2e6D0rO8HgCk86YWG S8N02noLLsjecKo5RBKlsiXLmfapbfPR2A1svGwBZKM5X6PrbeY/cwzywcxyVVN2RcC1R+ aLUpIA8oF4/f5UKdVTDksxYRCl25/QBA57JmU0mb0oVgIrvA+RWJfMyFD1WnBfqf8TR8F7 g7wTthNvyNJ+xRbvi9v0apPeWGbNUQjdc0PJk9MET0I+eIghIuNEN3kNRpn1GSnGAMLlXc /6dJAOwOF/8UHfheKOrYrEvuvenMKQJdGMBA++Upb3kipRiOyvgMT26+92hEGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKs3L67YnzNPM; Wed, 24 Jan 2024 17: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 40OHpwj7018463; Wed, 24 Jan 2024 17:51:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40OHpwWL018460; Wed, 24 Jan 2024 17:51:58 GMT (envelope-from git) Date: Wed, 24 Jan 2024 17:51:58 GMT Message-Id: <202401241751.40OHpwWL018460@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: a3ed434a69c9 - main - ccdconfig: remove obsolete references to BSD disklabels List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3ed434a69c903fa58ef001c11c9466166d67c92 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=a3ed434a69c903fa58ef001c11c9466166d67c92 commit a3ed434a69c903fa58ef001c11c9466166d67c92 Author: Ed Maste AuthorDate: 2024-01-24 15:05:09 +0000 Commit: Ed Maste CommitDate: 2024-01-24 17:51:45 +0000 ccdconfig: remove obsolete references to BSD disklabels ccd(4) previoulsy had knowledge of BSD disklabels, and relied on their use on the underlying disks, but this hasn't been the case since 2003 (commit 0f76d6d822f4). Remove disklabel references from the man page. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43574 --- sbin/ccdconfig/ccdconfig.8 | 42 +----------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/sbin/ccdconfig/ccdconfig.8 b/sbin/ccdconfig/ccdconfig.8 index 2c7460f291f6..4014a36b0771 100644 --- a/sbin/ccdconfig/ccdconfig.8 +++ b/sbin/ccdconfig/ccdconfig.8 @@ -27,7 +27,7 @@ .\" .\" $NetBSD: ccdconfig.8,v 1.4 1996/02/28 01:01:17 thorpej Exp $ .\" -.Dd March 17, 2022 +.Dd January 24, 2024 .Dt CCDCONFIG 8 .Os .Sh NAME @@ -122,13 +122,6 @@ argument is optional. ccd0 16 none /dev/da2s1 /dev/da3s1 .Ed .Pp -The component devices need to name partitions of type -.Li FS_BSDFFS -(or -.Dq 4.2BSD -as shown by -.Xr disklabel 8 ) . -.Pp If you want to use the .Tn Linux .Xr md 4 @@ -187,30 +180,6 @@ When you create a new ccd disk you generally want to and .Xr disklabel 8 it before doing anything else. -Once you create the initial label you can -edit it, adding additional partitions. -The label itself takes up the first -16 sectors of the ccd disk. -If all you are doing is creating file systems -with newfs, you do not have to worry about this as newfs will skip the -label area. -However, if you intend to -.Xr dd 1 -to or from a ccd partition it is usually a good idea to construct the -partition such that it does not overlap the label area. -For example, if -you have A ccd disk with 10000 sectors you might create a 'd' partition -with offset 16 and size 9984. -.Bd -literal -# disklabel ccd0 > /tmp/disklabel.ccd0 -# disklabel -R ccd0 /tmp/disklabel.ccd0 -# disklabel -e ccd0 -.Ed -.Pp -The disklabeling of a ccd disk is usually a one-time affair. -If you reboot the machine and reconfigure the ccd disk, -the disklabel you -had created before will still be there and not require reinitialization. Beware that changing any ccd parameters: interleave, flags, or the device list making up the ccd disk, will usually destroy any prior data on that ccd disk. @@ -246,12 +215,3 @@ The .Nm utility first appeared in .Nx 1.1 . -.Sh BUGS -The initial disklabel returned by -.Xr ccd 4 -specifies only 3 partitions. -One needs to change the number of partitions to 8 using -.Dq Nm disklabel Fl e -to get the usual -.Bx -expectations. From nobody Wed Jan 24 18:09:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKsR96MBQz58SwX; Wed, 24 Jan 2024 18:09: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 4TKsR95hXDz57K9; Wed, 24 Jan 2024 18:09:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706119749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ENMwg8zWsXo68/8Sdc6kfWyRv0DC37PW2LJJMRU3S+g=; b=IVfl00t9/gJByZ0K3ZbKrcz0KkixzQOGN/XKJog8M3KQy/c9dAId1AzQ03He812hWw6+XH SV24MBSoReWQ7U1gyib3kFSbApAD9XULxJDE54gh0N9VAVefspLBY2Br2weQ9k5IpnzNxU 3J5EueIbAM5Yev4Gwb5puRW2de1cJWLvagebS4JMxFhMW4eF0NZlkMXzHeJhWLRq2W9L19 YB2Y+cUzB6BEYZq3DX+9rSOidyO/LUgnCc5xXjRTvfDzsEPckytO7dv8LiCHBr+oJfMiXY HFWqE6q7Gpwodnfrv8s5cKK9PNtE/SLcMtQCWewTFHzgxLZVBIpOt51e8Q/xvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706119749; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ENMwg8zWsXo68/8Sdc6kfWyRv0DC37PW2LJJMRU3S+g=; b=nvEl12umUEFkFLfTugAkPsNa9vQ8XUhw2ZlkoPHy/lpMtovcY/EIfpgm1LHgUaDZj/m7sp wj4T5aoOYCX+4FFO/VLf9pvPgwU+krS4DOoeaiHL+WxpdB9eEyzn5eA4zC9iVDwnPObKWa L+0vy67jpPhTBdb6pTm9oqVuztGX2AtOr/3tVu0io/fyjvcYpDridgYN8974VJj7Ow7+Gb tEQj5f+hWs/f+fuMTUhE80IRMoaJMclxoSUjMvdKHxphOYV0hpA2HigOKXV6nmm0wOcYL5 AWo39T1aTs8YvAX1ZCRhO8I9cIcd8hRTDqyRK6CtiAtTfLCTKKso0p6O/tQ4EA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706119749; a=rsa-sha256; cv=none; b=GcQw3l/FewY6hluR+57TGGdCe/JpJOIA0P/SvYASARIIb24WWTRCGdocpVDROIaerDkcRT 84TlKkCsg8qqHSgOAqkUZVjG8jNEl6agVqnGloYPpKsjkpLoUFN0bEAAJgyr1LWYLbq5KO ZeV7PsGoE8OmF8yExhF6oX8LGxRxB+vR8vx612X6VcCLW1brPoSTN/azVWAlKFusvbHZKI riOAY8CVhi0NcHJQLiY3T5mQGyXHCBmWpJTfmnkcO7P+C0KupQ/f8rpJ64+PknU3jkuk/A 0dJwF/hbsARX6l8ewofGfm2EM5lx9TErO0N/TJ+6LN4i2yFbHKTYdejAwoIHEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKsR94fq9zPj5; Wed, 24 Jan 2024 18:09: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 40OI99hu038214; Wed, 24 Jan 2024 18:09:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40OI9908038211; Wed, 24 Jan 2024 18:09:09 GMT (envelope-from git) Date: Wed, 24 Jan 2024 18:09:09 GMT Message-Id: <202401241809.40OI9908038211@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: f1c0030bb05c - main - pf: only check MTU for IPv6 packets when forwarding List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1c0030bb05cfa01bdd500e50befbb425fecc4c4 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f1c0030bb05cfa01bdd500e50befbb425fecc4c4 commit f1c0030bb05cfa01bdd500e50befbb425fecc4c4 Author: Kristof Provost AuthorDate: 2024-01-24 16:34:01 +0000 Commit: Kristof Provost CommitDate: 2024-01-24 18:08:29 +0000 pf: only check MTU for IPv6 packets when forwarding When the packets are generated locally (i.e. PFIL_FWD is not set) we might generate overly large packets and rely on the NIC to fragment it for us. In that case we'd reject a valid packet. Reported by: Herbert J. Skuhra Tested by: Herbert J. Skuhra Fixes: 54c62e3e5d8cd90c5571a1d4c8c5f062d580480e Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 38a5a45d7991..2dc6d02d330a 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -8515,7 +8515,7 @@ pf_test6(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, struct inpcb * confused and fail to send the icmp6 packet too big error. Just send * it here, before we do any NAT. */ - if (dir == PF_OUT && IN6_LINKMTU(ifp) < pf_max_frag_size(m)) { + if (dir == PF_OUT && pflags & PFIL_FWD && IN6_LINKMTU(ifp) < pf_max_frag_size(m)) { PF_RULES_RUNLOCK(); *m0 = NULL; icmp6_error(m, ICMP6_PACKET_TOO_BIG, 0, IN6_LINKMTU(ifp)); From nobody Wed Jan 24 19:36:53 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKvNQ0tMhz58ZrQ; Wed, 24 Jan 2024 19:36:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKvNQ09Fzz44N2; Wed, 24 Jan 2024 19:36:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706125014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D2zdc27Yv9qJuE+zcArYFhg71b3MoJybpNs/ajh4lbs=; b=ZFD8LVzTQmQd+Orz7gTKeL0oGfnW4cpCyNgQZ6CPjfrszw5WmtlYVEBTEOFYVyRVZLL9+x i/xDgzevulB+Zf6ZruzaYC1xaZqmTMNHHXIGlfj1MzA7oyG0en+alinGhQWRqBxbuFGaxY GF0oSK/NhAn2krxJ11fkogt8SZhqGhiq5OcbN3nnKGkd93e/Q8AIl06PucspKmDI5RI2NZ txOUjLoI6yGw16A/il0aohfNSipGaiEa7OGnqexbTOPMmi1E+HAlAGJgGkYqKwBU6YGcd4 rl8GOklahmTpA3kn+IonY9evZ41f0J/sNgws+YywnFbZAg9mj+Axaak0UvnKzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706125014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D2zdc27Yv9qJuE+zcArYFhg71b3MoJybpNs/ajh4lbs=; b=xXvUBBYKDxhxglrCmWB78Qe/eK/btvxofbw32TJIOOWZrmohh4/hFJn5BCWJVS7L/t88JG NLVhlOwoHCWSKrHA9cSi8am7TmTXaeDaA3/2lMJ+ho7lDQ8GcQgME5hXFONeurkP1lfaqp WO75jmGduWjQkoFS4n8H4GKDFwJ1/jQA9ockigBlj+WixU+LkiifNNTR9enX2Qd1zARcTA K+epSmhfEvU44EzjAlmcGpt8JWArnVYy1mHOkLIGpO1cwY0qEg+xakhjf1UDhPnUbzdoTA dKpN1kQqn0tGCeQ2R4satmCBwgt+3IEMwhQqmPmq0NhK5vWhD2Qnuuedjm+8uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706125014; a=rsa-sha256; cv=none; b=QeFUu3bSZoagh1ei6GytxbGRHKJP9VOEvV3v7xFysfzfyMPNTFTDAjBixJrkXczvfTGiqT BjhTOjMs9vcOud5qXAmZfIE6lGhigFXH8/jTPxY+CU4L+Rkf6oMIAXM968AwjzEyxERQWU QCIjYWFfbdyj62WnbshRou+Ud5/saNBRuTWftDf9zoPR9uSkqrvxpD9VHd2SBuErbShZF1 ZyfIWCIEOtOT+uJN+nCO7JGB8KJ0IQimUyQJMQ1jbgt9ZU1c7ylK+o3jFkDrOJvP7sWWB3 2yMClVczOd9AgrLSxAgun9NUqf9wJEDEqO688qucMex71uszqsAvGX+GQGpB1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKvNP6KmGzRXh; Wed, 24 Jan 2024 19:36: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 40OJarSF088568; Wed, 24 Jan 2024 19:36:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40OJarnb088565; Wed, 24 Jan 2024 19:36:53 GMT (envelope-from git) Date: Wed, 24 Jan 2024 19:36:53 GMT Message-Id: <202401241936.40OJarnb088565@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 8b82f36f8903 - main - pflowctl: fix usage message List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b82f36f890391e063ad64746ec612aeabfc2c41 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8b82f36f890391e063ad64746ec612aeabfc2c41 commit 8b82f36f890391e063ad64746ec612aeabfc2c41 Author: Kristof Provost AuthorDate: 2024-01-24 19:35:35 +0000 Commit: Kristof Provost CommitDate: 2024-01-24 19:36:32 +0000 pflowctl: fix usage message Reported by: Jim Pingle Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pflowctl/pflowctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/pflowctl/pflowctl.c b/sbin/pflowctl/pflowctl.c index 4186598dd9bc..e5dd3df7e6a7 100644 --- a/sbin/pflowctl/pflowctl.c +++ b/sbin/pflowctl/pflowctl.c @@ -53,7 +53,7 @@ static void usage(void) { fprintf(stderr, -"usage: %s [-la] [-d id]\n", +"usage: %s [-lc] [-d id] [-s id ...]\n", __progname); exit(1); From nobody Wed Jan 24 19:48:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKvf02tqGz58cPn; Wed, 24 Jan 2024 19:48: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 4TKvf02Krmz4Gt7; Wed, 24 Jan 2024 19:48:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706125720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gj9wbsUswnDuSUggRKe8MaL8uLetPdQvV5U9SVywkmM=; b=SurTIHRuiQqDa/eqTV9ZzrPzhGh+AYqLxuV5JMiSpDkzTYVVjFGlZvupBY5xmxNdcL5go7 Hh0JulivFZWXC4nbWtheWgF8CayqkaszRR+VCozazFe9hMi2H2fqQMArOgLyC7lnhlax1M zoQM+Zq4mnoN2ADpYI6falyhNzBAF7Lot8YZ4kqBcI6TtV37ZywbN5CW7BceD/QKSo2yFg x3V18WHFlIMKQvFzl0Vlj9Jgm5JEBp3osUnqDaUsKaV/aXfiuO+HMxehI7HS9TNO7AFP6G c8Am6Z90K9yLAVignOCluJSPaI8QlU6kL+D+e+NJNspDmSfDK6edqgope7VIJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706125720; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Gj9wbsUswnDuSUggRKe8MaL8uLetPdQvV5U9SVywkmM=; b=HBFeiPUKgRR90jPydK2r/D4odVYZKL9Bc7inhqrRSk8OdYb6VfYZQx25LCpo+8g69rNL2C xGEYSAOTu5m20PEHiOZhlBvyDClE1LNWjRuZLSjWQAakbtAcHm/ggPS2zESr0rsXcK2JRQ 3pFXeEbwTL0/6jqcY8nogLsV4Nx0M9Lh20AtjR1sI4uKgiSdmTZcqeUARIBaYPyqed3Wdw olz3GxWI53n4Agq2ORV0OINDu0u7TSB/QRABtMS8IEx35tQs0GvXzDpB4ZADT6lPjVUO1s c+7kwft9Y6BFMCFiIszH8HYipRwd7yzBh81WLx6Mqy8gfJ2vkS/wttQea1i5Uw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706125720; a=rsa-sha256; cv=none; b=plZ42NcNci0jFCk+ic8LIBVnI4P0Nvv6AFUV7W0ehWxpFNGuK4KYZ/5MjoYYFAYtC5saJK oxNG3vhxr9p7VZxrwopheOXE07rp+3BQKB88wIZMI1qTpRMHekeGJ4kujs7Ymw4+pB+q3h K0GzfPxp3+bwZJvgDUWM+wCqZX59ECjQ64WeZuEFcv3ANYcri4h+616rSaAGp2S6BZ39zo FBoag2qFviGBb58in7VQpHB6s2LeC4eQv7Vp622efNhGMAn0rCkwtY4iUU4nfNg/dxlkfw 4J5SNTVjkxxjx6j68M5H/uAWLoN4MI9D9LvWSRssUgDbrs5723ztrqvd/c1dww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKvf01N9RzRyP; Wed, 24 Jan 2024 19:48: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 40OJmekF007134; Wed, 24 Jan 2024 19:48:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40OJmeWQ007131; Wed, 24 Jan 2024 19:48:40 GMT (envelope-from git) Date: Wed, 24 Jan 2024 19:48:40 GMT Message-Id: <202401241948.40OJmeWQ007131@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 5738d741fb79 - main - kern: tty: fix recanonicalization List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5738d741fb796c1f0a6b5c2157af7de58104ac97 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=5738d741fb796c1f0a6b5c2157af7de58104ac97 commit 5738d741fb796c1f0a6b5c2157af7de58104ac97 Author: Kyle Evans AuthorDate: 2024-01-24 19:36:26 +0000 Commit: Kyle Evans CommitDate: 2024-01-24 19:48:31 +0000 kern: tty: fix recanonicalization `ti->ti_begin` is actually the offset within the first block that is unread, so we must use that for our lower bound. Moving to the previous block has to be done at the end of the loop in order to correctly handle the case of ti_begin == TTYINQ_DATASIZE. At that point, lastblock is still the last one with data written and the next write into the queue would advance lastblock. If we move to the previous block at the beginning, then we're essentially off by one block for the entire scan and run the risk of running off the end of the block queue. The ti_begin == 0 case is still handled correctly, as we skip the loop entirely and the linestart gets recorded as the first byte available for writing. The bit after the loop about moving to the next block is also still correct, even with both previous fixes in mind: we skipped moving to the previous block if we hit ti_begin, and `off + 1` would in-fact be a member of the next block from where we're reading if it falls on a block boundary. Reported by: dim Fixes: 522083ffbd1ab ("kern: tty: recanonicalize the buffer on [...]") --- sys/kern/tty_inq.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sys/kern/tty_inq.c b/sys/kern/tty_inq.c index 533fdfd30ce9..589d958e59fa 100644 --- a/sys/kern/tty_inq.c +++ b/sys/kern/tty_inq.c @@ -371,12 +371,9 @@ ttyinq_canonicalize_break(struct ttyinq *ti, const char *breakc) /* Start just past the end... */ off = ti->ti_end; - canon = 0; - - while (off > 0) { - if ((off % TTYINQ_DATASIZE) == 0) - tib = tib->tib_prev; + canon = ti->ti_begin; + while (off > ti->ti_begin) { off--; boff = off % TTYINQ_DATASIZE; @@ -384,20 +381,23 @@ ttyinq_canonicalize_break(struct ttyinq *ti, const char *breakc) canon = off + 1; break; } + + if (off != ti->ti_begin && boff == 0) + tib = tib->tib_prev; } - MPASS(canon > 0 || off == 0); + MPASS(canon > ti->ti_begin || off == ti->ti_begin); /* - * We should only be able to hit bcanon == 0 if we walked everything we - * have and didn't find any of the break characters, so if bcanon == 0 - * then tib is already the correct block and we should avoid touching - * it. + * We should only be able to hit canon == ti_begin if we walked + * everything we have and didn't find any of the break characters, so + * if canon == ti_begin then tib is already the correct block and we + * should avoid touching it. * * For all other scenarios, if canon lies on a block boundary then tib * has already advanced to the previous block. */ - if (canon != 0 && (canon % TTYINQ_DATASIZE) == 0) + if (canon != ti->ti_begin && (canon % TTYINQ_DATASIZE) == 0) tib = tib->tib_next; ti->ti_linestart = ti->ti_reprint = canon; ti->ti_startblock = ti->ti_reprintblock = tib; From nobody Wed Jan 24 19:56:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKvpk23g2z58d3S; Wed, 24 Jan 2024 19:56: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 4TKvpk1YNsz4HQ2; Wed, 24 Jan 2024 19:56:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706126174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E5wxZGzKaRY28H7W4sFrVsQQiryjhqs+Pc52HF445CA=; b=mYOJn40UIcVe19G6zyrThDudUOanh+GmVKTYIyvhbO0jOrjvhAkHIh7onaMuqz+Yf72Czh BTZDMP/zycJa2+IXJ79MxPwezDfiFga4N/5lFMlGB597/IxDnoudWDKq9rP3ev3gCbHcmJ HqPzJajegZX8mhkfRBH0xLNZ0+5MVpEvV4Ep5BhOW4eVK434bsEDq+LvIEsC6cjcuzrTTi auoYrQuKXaQTNp/6hMjHlUcqp8PDkqAShT9p6Zpol+6SqJLsex6fUAL/N3Oa6SD26tOrIy 1cPR4ykc4x4JyEnPrm8JJOX4HD/ucyDYMZn67uW7LHg1JQtbXkaRH8GBfvgeHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706126174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E5wxZGzKaRY28H7W4sFrVsQQiryjhqs+Pc52HF445CA=; b=av31rRHzGUdCAJz/yNRpG52bbs3KW3bh0i1maz+TcAznwrl4OwrnLUXWnrb9Z1hIK/UAN7 MzgGySeSs18CJC+Jrm5FKoVPRiZ0gL8XMzNTXanbbwSBp0Ze2u8+b1FIy4mz8aJ2pzPuJH hsc6ZAjgkzC6sluLJlRvdkqSFXbiN1GQtJQ23GibeE8iOe6CT4ZK1HRvenuFSS6vKyaSlo nwZYpUCBRVseu470vIrJC1iK3A8sz3yR8O96c3n1YTZfaNa1XzmfRuwhrNM5Rtel22qNgV 3Cul1/7YDA2zUsYSKTXW1PtrMoSnvV4WVtpyZxUSuOsuPP5xgPgbnASypz8QmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706126174; a=rsa-sha256; cv=none; b=d/X7MmRyZt0EV+zHggylsJrwAXnPQ4OElKogss2MsLP7J7TVB+vYTRdPk7ig8JA71CbRYH CWbvLijzzjXsuVjI3VRqg2fS6A0bx52CHEqUNkrE4Fmh4hMghHGddPI14NScTScg02gfI7 xegRcbRrwZIOcbrmwl7kc7ABN5dsMbd8kVlbBbxdZ/HtvPGdFUZmPP7d5THoSkHrUL2Wkt xCUEdxw7OdYApy+mC33faES1naNCZIg+CgCGZqd+4nLp9msq1LGzTMiYE4DfkO6ngs+YMR ruSQi/S61TkKQk+RPjyTnsc/KxkSPOpB0JIBb8w52JPjp7vxbAuoTq9vbWzQFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKvpk0cFLzSGk; Wed, 24 Jan 2024 19:56: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 40OJuDL1023571; Wed, 24 Jan 2024 19:56:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40OJuD8e023568; Wed, 24 Jan 2024 19:56:13 GMT (envelope-from git) Date: Wed, 24 Jan 2024 19:56:13 GMT Message-Id: <202401241956.40OJuD8e023568@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 54d31cfb2789 - main - mount: document atime option List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 54d31cfb278982ff8c2af97a13e40b1a3ebd838e Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=54d31cfb278982ff8c2af97a13e40b1a3ebd838e commit 54d31cfb278982ff8c2af97a13e40b1a3ebd838e Author: Ed Maste AuthorDate: 2024-01-24 16:26:23 +0000 Commit: Ed Maste CommitDate: 2024-01-24 19:55:54 +0000 mount: document atime option atime is enabled by default, but may be specified explicitly so that any future change in the default would not have an effect on a given mount. Reviewed by: olce, rgrimes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43580 --- sbin/mount/mount.8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sbin/mount/mount.8 b/sbin/mount/mount.8 index 883e0bb5caf0..e8e604ba4088 100644 --- a/sbin/mount/mount.8 +++ b/sbin/mount/mount.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 15, 2024 +.Dd January 24, 2024 .Dt MOUNT 8 .Os .Sh NAME @@ -155,6 +155,9 @@ For this reason, the .Cm async flag should be used sparingly, and only when some data recovery mechanism is present. +.It Cm atime +Update the file access time when reading from a file. +This is the default. .It Cm automounted This flag indicates that the file system was mounted by .Xr automountd 8 . From nobody Wed Jan 24 22:03:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKyfS4gmwz58pGF; Wed, 24 Jan 2024 22:04:16 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKyfS17Rsz4ZFL; Wed, 24 Jan 2024 22:04:16 +0000 (UTC) (envelope-from rick.macklem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-2906dffd8ddso3716491a91.3; Wed, 24 Jan 2024 14:04:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706133854; x=1706738654; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kuXdNwfY7z6e4OVadjn0QTtO8oZYe0OiOgkVLtaaDE8=; b=LNKNWxty/KDJ5L+Bs9FJDkyFDn2tRWIFXWeGvHTtjd1kR6qDziaKEyjf/JwJO8RgIR u1TXrEPAgjsTXpyX/etKrvprune+l3AoMOosyHrHVDHxfT2P7yqtygxqL/c6T56So6Fd n8ux3+FwY2JqgXGna1rMhkN0BXgvhn/qbJ9TmerP6ey5QQ7oqYHxvZbhWiPD+XG4+dQD 8jYGL7rT0vJIQAPFQUEWLTGGZpSUL8IfrI8Mg8OjT8eCM6flZ69tj1lAtC9I4o4jyrGg eS0fkMjNn9s0Z2v1neb7S/Iz/XyCgTwms3LBAE+cKJnarlAo6yP1tR2aY7DUpkXD+AaE NWUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706133854; x=1706738654; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kuXdNwfY7z6e4OVadjn0QTtO8oZYe0OiOgkVLtaaDE8=; b=v3b33GJ5EH4vra+iuy0E9PP6HD6jV3Ko8Z7jbW5G6EnSp4QMP85mNNAfh+tAurc1MO gdcSP0ZhsXY5sRNjfBXAMxG/Gd80CGPxB5TZe3IC4jULCidCl3WK83rGcNlz5Lw6fv4W JApSIRo0h2RWOI+xTfp9vA+TSSX4mnYqeJks//NDv0kuGckBvKJcEncldXMS1Nj7bewa HvVXmyMqMDkiW+p811tNErCC42AhQKOnY28v9w5xSUirReEOTiOGxZN5EqBPMXVm4FLI 4UYlzjf8NpEULA0y8iloHZf1OQdqIyCTt3fqra3HXjbdAJh/CIt5d76OIPmvhggpcfq8 rUIQ== X-Gm-Message-State: AOJu0YxJV0IyHyFhNhcvXrwH090lf8KRIw1gNTmARibcLwQ5yaOX9bCB lU1gkGc4GMZZ7emUhIJwXMlpGBGXW6sRax8hGAHe5bMmDBR1gy9QoYhQPRcMZvWBWVUWqHjSib3 XfCrmP2oavDASXDNKwgCSArvqTmc0QBw= X-Google-Smtp-Source: AGHT+IFUmpyU92w7nf/FjJP7SbiJXcUh02+xKTwLd8V1kIzdd6eGCPWH/AOTkUsJVS14hd3ATbln1lHm+bFp5m05dHA= X-Received: by 2002:a17:90a:5895:b0:290:1f0c:b742 with SMTP id j21-20020a17090a589500b002901f0cb742mr24549pji.28.1706133853693; Wed, 24 Jan 2024 14:04:13 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202401241956.40OJuD8e023568@gitrepo.freebsd.org> In-Reply-To: <202401241956.40OJuD8e023568@gitrepo.freebsd.org> From: Rick Macklem Date: Wed, 24 Jan 2024 14:03:58 -0800 Message-ID: Subject: Re: git: 54d31cfb2789 - main - mount: document atime option To: Ed Maste Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4TKyfS17Rsz4ZFL X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] On Wed, Jan 24, 2024 at 11:56=E2=80=AFAM Ed Maste wrot= e: > > CAUTION: This email originated from outside of the University of Guelph. = Do not click links or open attachments unless you recognize the sender and = know the content is safe. If in doubt, forward suspicious emails to IThelp@= uoguelph.ca. > > > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3D54d31cfb278982ff8c2af97a13= e40b1a3ebd838e > > commit 54d31cfb278982ff8c2af97a13e40b1a3ebd838e > Author: Ed Maste > AuthorDate: 2024-01-24 16:26:23 +0000 > Commit: Ed Maste > CommitDate: 2024-01-24 19:55:54 +0000 > > mount: document atime option > > atime is enabled by default, but may be specified explicitly so that = any > future change in the default would not have an effect on a given moun= t. > > Reviewed by: olce, rgrimes > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D43580 > --- > sbin/mount/mount.8 | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/sbin/mount/mount.8 b/sbin/mount/mount.8 > index 883e0bb5caf0..e8e604ba4088 100644 > --- a/sbin/mount/mount.8 > +++ b/sbin/mount/mount.8 > @@ -25,7 +25,7 @@ > .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY = OF > .\" SUCH DAMAGE. > .\" > -.Dd January 15, 2024 > +.Dd January 24, 2024 > .Dt MOUNT 8 > .Os > .Sh NAME > @@ -155,6 +155,9 @@ For this reason, the > .Cm async > flag should be used sparingly, and only when some data recovery > mechanism is present. > +.It Cm atime > +Update the file access time when reading from a file. > +This is the default. I'll note that, for an NFS mount, atime is not implemented. I found out recently when Mike Karels asked. The NFS client does not do a Setattr/atime upon every read from the buffer cache. As such, the behaviour w.r.t. atime is largely undefined (and ahs been for decades) and depends on the NFS server's file system configuration. (I don't know if a "works for most file systems, but not NFS" is needed her= e? rick > .It Cm automounted > This flag indicates that the file system was mounted by > .Xr automountd 8 . From nobody Wed Jan 24 22:05:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TKygg6BMkz58pR7; Wed, 24 Jan 2024 22:05:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TKygg5jGmz4ZdT; Wed, 24 Jan 2024 22:05:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706133919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7Ts4dOqPvaV6MP7+28D0KPbdDB2eTPm+TlUtAIIfxu8=; b=Mz+IkVWMirQ5GmarpiEfl77Dm345udtUgKbesb70XB61kRcUYdsjuh3t1wDj5Eg1SCZPZK ETyNTftJvGGwqRCSpnYBIRFbXImGNDQKoeWjpv1sAIs3Yy7kY4VCEwCRFuB1gg71NcLUeg 0kjL9KrbxcCUYbrGeERVNNWUUqEecbfEWRzuiPi6inTbIYTDiTmtJKZb2KA1Nd+y3inSYu G/gzNrSFnprTn0skXq7+EMtQbf4zvWPU50fefEkPoWtvphECRDm8Nmsy+RkzTdNIv/d3Dq 0gxnwTyzWM59naUa1diJjRlrVgrdYQUZu0ZwpQ1n4fCWbNFfdFfNu2oNNOqP3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706133919; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7Ts4dOqPvaV6MP7+28D0KPbdDB2eTPm+TlUtAIIfxu8=; b=dPOD4yMYpBAFmsppFCxm2Qduvei7Xu3Pgf9eWbZXtZzXVE12iBfPDY16y6WC8JA2chBkPF bqWhU311kW5nBW/OmS3g0oIXJowHO+rLkJh41go79YjAKK3j7RfqYzlFwvnO+Y474HI5Vo dWHFyLzGQtc+KBi44EkF5ZYBuk2GxuJo+m4MWb+/05Fg6ZrNFQjfkYZltWKYoKpQkGxiEs nxCYeEFNf7JcEP0999shhKgTyXydHpe2BNxHwtzpqg7HV9xOVsNZhnlTdT0e5pyd/YMlHP F6eZEkmr9Pqqy3ohx76hpUegul4lBTXvBC+W3GzpgwSxInGuA4e8raxNs/xedA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706133919; a=rsa-sha256; cv=none; b=ZwQeBFGx1KtAmWbVPGdYb/89zs/OTpwoT6rfODMUgNAgYgy9IQnfDtMTl430hJ+jPk+26e 0zVCOZG0IRV36rx7Sq8x0q9hbzm0Z9/K+SStEJClf6udKV0Jkpii1N1rlCK09ySATwcG9l meilPlCpRlvUSVDFvfxq/QyuMbT6xpZ/FWNvzNlCG779TtMWoLqDfoXmbqJvVmGGep1GuY 4KJlCn8q9yotEiHzJtatCrrxNYx7wjULv1KfHMmU0oBaFBbK5sjxD2+iWPHBDAJz4pYVAa lQTtjnvq3um/MvBQB8PL4D+1d4TYo1qOvEhRBrM7IBGluSThP9i4dcj5A/TNKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TKygg4nnvzXPf; Wed, 24 Jan 2024 22:05:19 +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 40OM5Jnv042679; Wed, 24 Jan 2024 22:05:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40OM5Jiq042676; Wed, 24 Jan 2024 22:05:19 GMT (envelope-from git) Date: Wed, 24 Jan 2024 22:05:19 GMT Message-Id: <202401242205.40OM5Jiq042676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 820401bf1769 - main - nl_types.h: explicitly include cdefs.h List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 820401bf176996e41091d2e4190aded12a966b1d Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=820401bf176996e41091d2e4190aded12a966b1d commit 820401bf176996e41091d2e4190aded12a966b1d Author: Val Packett AuthorDate: 2024-01-16 18:42:26 +0000 Commit: Ed Maste CommitDate: 2024-01-24 21:59:18 +0000 nl_types.h: explicitly include cdefs.h This file uses __BEGIN_DECLS/__END_DECLS. When bootstrapping from Linux/musl, they were missing. Sponsored by: https://www.patreon.com/valpackett Pull Request: https://github.com/freebsd/freebsd-src/pull/1066 --- include/nl_types.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/nl_types.h b/include/nl_types.h index 120d1911631f..6ba15132126d 100644 --- a/include/nl_types.h +++ b/include/nl_types.h @@ -34,6 +34,7 @@ #ifndef _NL_TYPES_H_ #define _NL_TYPES_H_ +#include #include #ifdef _NLS_PRIVATE From nobody Wed Jan 24 23:06:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TL01v6x8Gz58tJ7; Wed, 24 Jan 2024 23:06:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TL01v6PPLz4jCQ; Wed, 24 Jan 2024 23:06:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706137571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0yNr3YHHv+XF62l9mLf5qIR/7LRFdAr6VM/Whf22gDE=; b=q6NBx92uWyLfZQfiYdHwNfoRvh4bEApEIOLn+Rh1qA7vpUuvjMVxC+MLpdPX5kfObfYJsG MTgdRcTNgH+cF6Cy7Sdxu14BSopDGpHj+dOWUcM6ylD28gC+KDKqwkWFw4Wow6bcywRHuo DavgSo78mu/0BvML1pdaAesQPmc73+6AYe0Hk4udiAGtrDGO362KVn4k3kVyqWyFAbu2jY qO0i2JpD4BJOYoHClkWt3WkPuvbLpVjWGi9jgV+4WR7ltqTeIjP1l78twujLUhb+/sWB6D dYrHg0m5jyASfsW4/D73PuMJFOTocd8kSLgs4yO42W+gNr1Z0LLtvKaNVdLxug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706137571; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0yNr3YHHv+XF62l9mLf5qIR/7LRFdAr6VM/Whf22gDE=; b=OuFx85hUk5y281jfOHJpyFU9wqcdktsZsJKgn+AF9NU3TvhnO8XLqHQs5ebD4oBeKNHzpF yj1iphz6FD4LW2UDXoDiEdfL8Rs2XJsHur0YVckG/0rKehgGVb2cCOg4tpQhaJG+ZXqCsL pdYl5RzXvVRmk+JAjYdUKdkTz0kzlUYoFeQt3x6v2QJPUjFkPe+OY04MB8oopphvolA+bE hHqmhY3+wKtJWOCg+YJGMODbZx7Wjpe3cOh4knkSge6M3QRwzMC/K4tbigvy2xTWIE0eUp LPofLFg82raO8uuQimSFZhRvknLUJ0zAtwCmzX6N8sU1WUEjkGs8SVyJtIqAuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706137571; a=rsa-sha256; cv=none; b=p6mV8TEFl3jWU/sQO6Qs2mMhqhzKfuqAjX7cJ1Eto4Nqz2VRmGM2K4SEchega3uFsQZyuV tgwhGAwmPMEZbg6QGwD92lMwvFSj+ni81wjybtof5VaI0D3ggVFoSUMAscf642wAUya+Zg Iwu+zcvT/jzTFHweNesfE4bLsRrTcCyESWDtC0dA2ZlR1zOUog3TZdEJ6s4/KuNi00csei 5rl6gcT9UrVoAfzxBA6p5l4ZXsejDfZMAXvKVGLxliOiAewRyjJz/PUk+hlLi9VrxCAhNF 7FoFi5Lb2xYdQhWNqIHyuIQLJ7xHHWnJr/1iXQvSiFpZMoAmcTfS7rSRglGkKg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TL01v5S1fzZKV; Wed, 24 Jan 2024 23:06: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 40ON6B3P042971; Wed, 24 Jan 2024 23:06:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ON6BZu042968; Wed, 24 Jan 2024 23:06:11 GMT (envelope-from git) Date: Wed, 24 Jan 2024 23:06:11 GMT Message-Id: <202401242306.40ON6BZu042968@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d56ce5915c41 - main - mpsutil: Clean up libutil deps List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d56ce5915c41517ccc7de2510daec200e100ef68 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d56ce5915c41517ccc7de2510daec200e100ef68 commit d56ce5915c41517ccc7de2510daec200e100ef68 Author: Mark Johnston AuthorDate: 2024-01-24 19:47:56 +0000 Commit: Mark Johnston CommitDate: 2024-01-24 22:10:24 +0000 mpsutil: Clean up libutil deps mpsutil doesn't use libutil, so doesn't need to include libutil.h. See commit 76103694a051335bec1da318f9c6e3a676dc0145. No functional change intended. MFC after: 1 week --- usr.sbin/mpsutil/Makefile | 4 ---- usr.sbin/mpsutil/mps_debug.c | 1 - usr.sbin/mpsutil/mps_set.c | 1 - usr.sbin/mpsutil/mps_show.c | 1 - 4 files changed, 7 deletions(-) diff --git a/usr.sbin/mpsutil/Makefile b/usr.sbin/mpsutil/Makefile index a19c2f310167..aa59d8cddf76 100644 --- a/usr.sbin/mpsutil/Makefile +++ b/usr.sbin/mpsutil/Makefile @@ -1,17 +1,13 @@ - PROG= mpsutil SRCS= mps_cmd.c mps_debug.c mps_flash.c mps_set.c mps_show.c mps_slot.c mpsutil.c MAN= mpsutil.8 WARNS?= 3 -#LIBADD= cam util LINKS= ${BINDIR}/mpsutil ${BINDIR}/mprutil MLINKS= mpsutil.8 mprutil.8 CFLAGS+= -I${SRCTOP}/sys -I. -DUSE_MPT_IOCTLS -# Avoid dirdep dependency on libutil -CFLAGS+= -I${SRCTOP}/lib/libutil # Here be dragons .ifdef DEBUG diff --git a/usr.sbin/mpsutil/mps_debug.c b/usr.sbin/mpsutil/mps_debug.c index c1eb57f7150d..68394de50143 100644 --- a/usr.sbin/mpsutil/mps_debug.c +++ b/usr.sbin/mpsutil/mps_debug.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/usr.sbin/mpsutil/mps_set.c b/usr.sbin/mpsutil/mps_set.c index 603c529b8696..a1b61356e4ec 100644 --- a/usr.sbin/mpsutil/mps_set.c +++ b/usr.sbin/mpsutil/mps_set.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include diff --git a/usr.sbin/mpsutil/mps_show.c b/usr.sbin/mpsutil/mps_show.c index bbb2b22c8c73..378d5380aa76 100644 --- a/usr.sbin/mpsutil/mps_show.c +++ b/usr.sbin/mpsutil/mps_show.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include From nobody Wed Jan 24 23:50:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TL10r1RLZz58xWS; Wed, 24 Jan 2024 23:50: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 4TL10r0wxSz4ql2; Wed, 24 Jan 2024 23:50:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706140220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qgtP6U1YTBXem3dr2K45qPhyD1n+HcKzIsyN+0jebj8=; b=WiNdB8bKZWkm1jTbqugp8Zo9gT7RNFPpWqQz5C7RUNcGV+gNtazBaFJcqgfR69YrhMarBX IMIVoHEOiDmExPe+LGjvYBxVSYWlBTKMQiKRRJJ/tZEpJvg7voxgaYMdWleJ9SQxTCDaYp XBLh7TaN7gN06QuR7LKDZyJAqcQCUYK6V3ndIPPj+utWD+hnMcO0cy4ujlUz/eKbxLhlT2 razTHFX3d67uAn1oU2n01WFVXKkTtSNSFPPcXsrz4NgXOv2RpmoDwS8GYAU+aIEYkpsrdi ZuYaqE5liAQ7rCiFs0wzjYzYfE5U81osEWcyV9xKQOw6JERHNBABh9gjwJPwdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706140220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qgtP6U1YTBXem3dr2K45qPhyD1n+HcKzIsyN+0jebj8=; b=AtqL7natoFjm/AweGiJqBqAkgIiQVG2dYxUTN9ArSPAUBpwAh8be/29PjU7VkD8ScNXzxK irQ0fUdtCq773lET9BJrgq4ufz1GC4fqmM1npDTXD5sIxYm5Txnoix2np3AkW0IoBWv+9b aJeLBPu/mBrLMtIppDzK7+WVPNuxvTiDrmUOWaGIo9Inel1LYmvsnWECY5/FUxmwXGUDVP dGRxHVwq5ckeVj/cDPPAP6VZqVnkqEglBlGKHmf0+Hx4SCEzsWnc19PvT+x5+vUbF3OOBW 0qbJ+mpj698nwnwnGssMLH9RwreB7nUUy5phEs6cNlSL+66r9TYgTFq31VGWWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706140220; a=rsa-sha256; cv=none; b=WC5Wqw4K4cDakCFiCPQ9Q1O929W9bRyhy+35q+W8J5ZKX/G1VBG6WXiZov7QDjLq1tq5h9 nAm3/2qKSX/NdqHX1HjI9TJFbcfYUU7exE7hve4d0Bu3Dlo9pRxTpb/2VXR+agOL2uBp1y O6JWH6u6quX6nYxI74a70rxw1hfYxSvqv32yTzWzrFn5NdbbVVHPVqq1JJUIT/NymhOaxE XlUR8YPEkx5UUpB/AbzYoyffA/2Hc1FFzjxLNzHDVk1ONT/5Q+9pEuGn2DGEjvKwoHt066 e7L41VDmUb3rNLwRorImo7E75ol0YyZpz3SG/UBrE3P3Ajn8Xzrh0fuM24qwXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TL10q75ZXzbHy; Wed, 24 Jan 2024 23:50:19 +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 40ONoJBl018466; Wed, 24 Jan 2024 23:50:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ONoJf9018463; Wed, 24 Jan 2024 23:50:19 GMT (envelope-from git) Date: Wed, 24 Jan 2024 23:50:19 GMT Message-Id: <202401242350.40ONoJf9018463@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: e06afdb28569 - main - intrng: Remove irq_root_ipicount and corresponding intr_pic_claim_root arg List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e06afdb2856944d6db4e33d4bbe0e2dbbd057eb4 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=e06afdb2856944d6db4e33d4bbe0e2dbbd057eb4 commit e06afdb2856944d6db4e33d4bbe0e2dbbd057eb4 Author: Jessica Clarke AuthorDate: 2024-01-24 23:49:53 +0000 Commit: Jessica Clarke CommitDate: 2024-01-24 23:49:53 +0000 intrng: Remove irq_root_ipicount and corresponding intr_pic_claim_root arg The static irq_root_ipicount variable is only ever written to (with the value passed to irq_root_ipicount), never read. Moreover, the bcm2836 driver, as used by the Raspberry Pi 2B and 3A/B (but not 4, which uses a GIC-400, though does have the legacy interrupt controller present too) passes 0 as ipicount, despite implementing IPIs. It's thus inaccurate and serves no purpose, so should be removed. Reviewed by: mmel, imp, mhorne MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D35897 --- sys/arm/allwinner/a10/a10_intc.c | 2 +- sys/arm/arm/gic_acpi.c | 3 +-- sys/arm/arm/gic_fdt.c | 3 +-- sys/arm/broadcom/bcm2835/bcm2835_intr.c | 2 +- sys/arm/broadcom/bcm2835/bcm2836.c | 2 +- sys/arm/ti/aintc.c | 2 +- sys/arm64/arm64/gic_v3_acpi.c | 4 ++-- sys/arm64/arm64/gic_v3_fdt.c | 3 +-- sys/kern/subr_intr.c | 4 +--- sys/riscv/riscv/plic.c | 2 +- sys/sys/intr.h | 2 +- 11 files changed, 12 insertions(+), 17 deletions(-) diff --git a/sys/arm/allwinner/a10/a10_intc.c b/sys/arm/allwinner/a10/a10_intc.c index 22b29ececac5..410fba4b4728 100644 --- a/sys/arm/allwinner/a10/a10_intc.c +++ b/sys/arm/allwinner/a10/a10_intc.c @@ -236,7 +236,7 @@ a10_intr_pic_attach(struct a10_aintc_softc *sc) if (pic == NULL) return (ENXIO); - return (intr_pic_claim_root(sc->sc_dev, xref, a10_intr, sc, 0)); + return (intr_pic_claim_root(sc->sc_dev, xref, a10_intr, sc)); } static void diff --git a/sys/arm/arm/gic_acpi.c b/sys/arm/arm/gic_acpi.c index 22d8c9f06349..cdd2fc72a224 100644 --- a/sys/arm/arm/gic_acpi.c +++ b/sys/arm/arm/gic_acpi.c @@ -227,8 +227,7 @@ gic_acpi_attach(device_t dev) /* * Controller is root: */ - if (intr_pic_claim_root(dev, xref, arm_gic_intr, sc, - GIC_LAST_SGI - GIC_FIRST_SGI + 1) != 0) { + if (intr_pic_claim_root(dev, xref, arm_gic_intr, sc) != 0) { device_printf(dev, "could not set PIC as a root\n"); intr_pic_deregister(dev, xref); goto cleanup; diff --git a/sys/arm/arm/gic_fdt.c b/sys/arm/arm/gic_fdt.c index f59c9ad79640..c51522b0d58c 100644 --- a/sys/arm/arm/gic_fdt.c +++ b/sys/arm/arm/gic_fdt.c @@ -153,8 +153,7 @@ gic_fdt_attach(device_t dev) */ pxref = ofw_bus_find_iparent(ofw_bus_get_node(dev)); if (pxref == 0 || xref == pxref) { - if (intr_pic_claim_root(dev, xref, arm_gic_intr, sc, - GIC_LAST_SGI - GIC_FIRST_SGI + 1) != 0) { + if (intr_pic_claim_root(dev, xref, arm_gic_intr, sc) != 0) { device_printf(dev, "could not set PIC as a root\n"); intr_pic_deregister(dev, xref); goto cleanup; diff --git a/sys/arm/broadcom/bcm2835/bcm2835_intr.c b/sys/arm/broadcom/bcm2835/bcm2835_intr.c index b49c9041810d..5a8457bc4b67 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_intr.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_intr.c @@ -405,7 +405,7 @@ bcm_intc_attach(device_t dev) sc->intc_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); if (sc->intc_irq_res == NULL) { - if (intr_pic_claim_root(dev, xref, bcm2835_intc_intr, sc, 0) != 0) { + if (intr_pic_claim_root(dev, xref, bcm2835_intc_intr, sc) != 0) { /* XXX clean up */ device_printf(dev, "could not set PIC as a root\n"); return (ENXIO); diff --git a/sys/arm/broadcom/bcm2835/bcm2836.c b/sys/arm/broadcom/bcm2835/bcm2836.c index 60734abb40e3..f72bd9075982 100644 --- a/sys/arm/broadcom/bcm2835/bcm2836.c +++ b/sys/arm/broadcom/bcm2835/bcm2836.c @@ -646,7 +646,7 @@ bcm_lintc_pic_attach(struct bcm_lintc_softc *sc) if (pic == NULL) return (ENXIO); - return (intr_pic_claim_root(sc->bls_dev, xref, bcm_lintc_intr, sc, 0)); + return (intr_pic_claim_root(sc->bls_dev, xref, bcm_lintc_intr, sc)); } static int diff --git a/sys/arm/ti/aintc.c b/sys/arm/ti/aintc.c index ce986b2d38bc..776d231c3c48 100644 --- a/sys/arm/ti/aintc.c +++ b/sys/arm/ti/aintc.c @@ -230,7 +230,7 @@ ti_aintc_pic_attach(struct ti_aintc_softc *sc) if (pic == NULL) return (ENXIO); - return (intr_pic_claim_root(sc->sc_dev, xref, ti_aintc_intr, sc, 0)); + return (intr_pic_claim_root(sc->sc_dev, xref, ti_aintc_intr, sc)); } static int diff --git a/sys/arm64/arm64/gic_v3_acpi.c b/sys/arm64/arm64/gic_v3_acpi.c index 3dff49f6214f..e55aea86157e 100644 --- a/sys/arm64/arm64/gic_v3_acpi.c +++ b/sys/arm64/arm64/gic_v3_acpi.c @@ -345,8 +345,8 @@ gic_v3_acpi_attach(device_t dev) } } - if (intr_pic_claim_root(dev, ACPI_INTR_XREF, arm_gic_v3_intr, sc, - GIC_LAST_SGI - GIC_FIRST_SGI + 1) != 0) { + if (intr_pic_claim_root(dev, ACPI_INTR_XREF, arm_gic_v3_intr, sc) + != 0) { err = ENXIO; goto error; } diff --git a/sys/arm64/arm64/gic_v3_fdt.c b/sys/arm64/arm64/gic_v3_fdt.c index e48e7b36a649..8adb0497771e 100644 --- a/sys/arm64/arm64/gic_v3_fdt.c +++ b/sys/arm64/arm64/gic_v3_fdt.c @@ -161,8 +161,7 @@ gic_v3_fdt_attach(device_t dev) /* Register xref */ OF_device_register_xref(xref, dev); - if (intr_pic_claim_root(dev, xref, arm_gic_v3_intr, sc, - GIC_LAST_SGI - GIC_FIRST_SGI + 1) != 0) { + if (intr_pic_claim_root(dev, xref, arm_gic_v3_intr, sc) != 0) { err = ENXIO; goto error; } diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index 49fe20cdc890..fb75b2e1773b 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -100,7 +100,6 @@ void intr_irq_handler(struct trapframe *tf); device_t intr_irq_root_dev; static intr_irq_filter_t *irq_root_filter; static void *irq_root_arg; -static u_int irq_root_ipicount; struct intr_pic_child { SLIST_ENTRY(intr_pic_child) pc_next; @@ -884,7 +883,7 @@ intr_pic_deregister(device_t dev, intptr_t xref) */ int intr_pic_claim_root(device_t dev, intptr_t xref, intr_irq_filter_t *filter, - void *arg, u_int ipicount) + void *arg) { struct intr_pic *pic; @@ -916,7 +915,6 @@ intr_pic_claim_root(device_t dev, intptr_t xref, intr_irq_filter_t *filter, intr_irq_root_dev = dev; irq_root_filter = filter; irq_root_arg = arg; - irq_root_ipicount = ipicount; debugf("irq root set to %s\n", device_get_nameunit(dev)); return (0); diff --git a/sys/riscv/riscv/plic.c b/sys/riscv/riscv/plic.c index 90f79cf9b3aa..1e8a03127038 100644 --- a/sys/riscv/riscv/plic.c +++ b/sys/riscv/riscv/plic.c @@ -368,7 +368,7 @@ plic_attach(device_t dev) csr_set(sie, SIE_SEIE); - return (intr_pic_claim_root(sc->dev, xref, plic_intr, sc, 0)); + return (intr_pic_claim_root(sc->dev, xref, plic_intr, sc)); } static void diff --git a/sys/sys/intr.h b/sys/sys/intr.h index e91a661673d0..bdc693e6cb60 100644 --- a/sys/sys/intr.h +++ b/sys/sys/intr.h @@ -110,7 +110,7 @@ u_int intr_irq_next_cpu(u_int current_cpu, cpuset_t *cpumask); struct intr_pic *intr_pic_register(device_t, intptr_t); int intr_pic_deregister(device_t, intptr_t); -int intr_pic_claim_root(device_t, intptr_t, intr_irq_filter_t *, void *, u_int); +int intr_pic_claim_root(device_t, intptr_t, intr_irq_filter_t *, void *); int intr_pic_add_handler(device_t, struct intr_pic *, intr_child_irq_filter_t *, void *, uintptr_t, uintptr_t); bool intr_is_per_cpu(struct resource *); From nobody Wed Jan 24 23:50:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TL10s3BmWz58xnB; Wed, 24 Jan 2024 23:50:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TL10s1GqPz4qhb; Wed, 24 Jan 2024 23:50:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706140221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K/MuS/+AvvFNN7QMOZoX7r0MyZoDK1Q0RP89K4DI7OU=; b=T1y0Ze0wKxO0gbEUwY95FFARbVnvYrPHjXWbjgAVex/6WD0sIRlDn53mxElhtG+Zr5ncmL Cen9giWhSrQpJ0KIYgszm46Qpw+IVBmgBvAXcF/z3euD1tmWGRzRgqHMKfvsaucGDC78gB /TKclgXByS3YO74YwQrBf2MqVTdwklE+9QpignjFfE3nUzk7jTe2vNaq1Ry0LkFoo8iIJd UfHrFoDE0h7616+GFvagEaVQrk+rfsR/CaV1Evw0Ql4Iacf2HtgTLEUGessWv90OkJ4CxP Vlpx7qq5Nus+TkmSENlERPjOxFmhuLjKEdRdyvn6BZSwBiUIUNSwq0xlZ0gtAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706140221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K/MuS/+AvvFNN7QMOZoX7r0MyZoDK1Q0RP89K4DI7OU=; b=bU8k0fGOjR7pY19f2biHnWHzOvF48f+XhSplzPaavShr7a49TAD/+DPjXml0H7x3A5mdiO OArrYZovrPc1iNRi3znlka+RaIkabKgr0qz3XxIpQIoBlHcxsPZXkHTulDTT8ZPwNYM2Bp yNre7YRzxrQgpOokIdKWGJK32OWa0Y/KAIWxoYHPyxaKHBOyo+DJZq3ISzQUe/AsvHMLk/ +nQ1CXdOBCymnIbcSQSjempXHL2mDqJpeFiltwF6g4zhz1NJVF1tsir+avTApxw+aGairk AShy7lhdRIEmK6MrATcE6lEFR2CWIs71NpidkcCy9CorO4AZPZtn69UHPz0r+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706140221; a=rsa-sha256; cv=none; b=Y+1HzE2r6MhzoD2QXRw6Qspn6KpGLk1ef2LIHnzCBaK3v0zgGhQmTlImakql5Za9NcGWML 1DKWNTVUnRyFCyLAQ58JOuhSk8Vw/CmbUGs0IVgeaVl16S4nNdiS5+UK0/J7XqxRGxXgjW TP7vkn0zLiwYMv+PSHdazrlkpq0s8RIxfkk/UZ6+LjySiQbnJBCYvgBIab4QBE047R88/J 55xKQzZ6Uv+zGCRbwkkNgCAnZUc+EGvSWvRNpMGfP5bOarTMc2yeRfIA+7hAE4e6n9mcv+ ulzw2gTfHhf/oQqhVry1b/Tt0mq6Nia4iM9nFhFMHx4aR+z8dw/qPBt27cBOww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TL10s0McczbNd; Wed, 24 Jan 2024 23:50:21 +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 40ONoLBL018524; Wed, 24 Jan 2024 23:50:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ONoKsU018521; Wed, 24 Jan 2024 23:50:20 GMT (envelope-from git) Date: Wed, 24 Jan 2024 23:50:20 GMT Message-Id: <202401242350.40ONoKsU018521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: fae8755f16ff - main - intrng: Extract arm/arm64 IPI->PIC glue code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fae8755f16ff5b9bdc32df046e0f16c0cbb48a29 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=fae8755f16ff5b9bdc32df046e0f16c0cbb48a29 commit fae8755f16ff5b9bdc32df046e0f16c0cbb48a29 Author: Jessica Clarke AuthorDate: 2024-01-24 23:49:53 +0000 Commit: Jessica Clarke CommitDate: 2024-01-24 23:49:53 +0000 intrng: Extract arm/arm64 IPI->PIC glue code The arm and arm64 implementations of dispatching IPIs via PIC_IPI_SEND are almost identical, and entirely MI with the lone exception of a single store barrier on arm64 (that is likely either redundant or needed on arm too). Thus, de-duplicate this code by moving it to INTRNG as a generic IPI glue framework. The ipi_* functions remain declared in MD smp.h headers and implemented in MD code, but are trivial wrappers around intr_ipi_send that could be made MI, at least for INTRNG ports, at a later date. Note that, whilst both arm and arm64 had an ii_send member in intr_ipi to abstract over how to send interrupts,, they were always ultimately using PIC_IPI_SEND, and so this complexity has been removed. A follow-up commit will re-introduce the same flexibility by instead allowing a device other than the root PIC to be registered as the IPI sender. As part of this, strengthen a MAXCPU assertion that was missed in commit 2f0b059eeafc ("intrng: switch from MAXCPU to mp_ncpus") (which itself is mis-titled). Reviewed by: mmel, mhorne MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D35898 --- sys/arm/arm/machdep_intr.c | 126 +------------------------- sys/arm/arm/mp_machdep.c | 10 +-- sys/arm/include/intr.h | 13 --- sys/arm64/arm64/mp_machdep.c | 204 ++----------------------------------------- sys/arm64/include/intr.h | 4 - sys/kern/subr_intr.c | 188 ++++++++++++++++++++++++++++++++------- sys/sys/intr.h | 21 ++--- 7 files changed, 177 insertions(+), 389 deletions(-) diff --git a/sys/arm/arm/machdep_intr.c b/sys/arm/arm/machdep_intr.c index fc16741a49fa..712336e7c048 100644 --- a/sys/arm/arm/machdep_intr.c +++ b/sys/arm/arm/machdep_intr.c @@ -29,39 +29,10 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include - -#include "pic_if.h" - -#ifdef SMP -#define INTR_IPI_NAMELEN (MAXCOMLEN + 1) - -struct intr_ipi { - intr_ipi_handler_t * ii_handler; - void * ii_handler_arg; - intr_ipi_send_t * ii_send; - void * ii_send_arg; - char ii_name[INTR_IPI_NAMELEN]; - u_long * ii_count; -}; - -static struct intr_ipi ipi_sources[INTR_IPI_COUNT]; -#endif +#include +#include /* * arm_irq_memory_barrier() @@ -125,96 +96,3 @@ arm_irq_memory_barrier(uintptr_t irq) dsb(); cpu_l2cache_drain_writebuf(); } - -#ifdef SMP -static inline struct intr_ipi * -intr_ipi_lookup(u_int ipi) -{ - - if (ipi >= INTR_IPI_COUNT) - panic("%s: no such IPI %u", __func__, ipi); - - return (&ipi_sources[ipi]); -} - -void -intr_ipi_dispatch(u_int ipi) -{ - struct intr_ipi *ii; - - ii = intr_ipi_lookup(ipi); - if (ii->ii_count == NULL) - panic("%s: not setup IPI %u", __func__, ipi); - - intr_ipi_increment_count(ii->ii_count, PCPU_GET(cpuid)); - - ii->ii_handler(ii->ii_handler_arg); -} - -void -intr_ipi_send(cpuset_t cpus, u_int ipi) -{ - struct intr_ipi *ii; - - ii = intr_ipi_lookup(ipi); - if (ii->ii_count == NULL) - panic("%s: not setup IPI %u", __func__, ipi); - - ii->ii_send(ii->ii_send_arg, cpus, ipi); -} - -void -intr_ipi_setup(u_int ipi, const char *name, intr_ipi_handler_t *hand, - void *h_arg, intr_ipi_send_t *send, void *s_arg) -{ - struct intr_ipi *ii; - - ii = intr_ipi_lookup(ipi); - - KASSERT(hand != NULL, ("%s: ipi %u no handler", __func__, ipi)); - KASSERT(send != NULL, ("%s: ipi %u no sender", __func__, ipi)); - KASSERT(ii->ii_count == NULL, ("%s: ipi %u reused", __func__, ipi)); - - ii->ii_handler = hand; - ii->ii_handler_arg = h_arg; - ii->ii_send = send; - ii->ii_send_arg = s_arg; - strlcpy(ii->ii_name, name, INTR_IPI_NAMELEN); - ii->ii_count = intr_ipi_setup_counters(name); -} - -/* - * Send IPI thru interrupt controller. - */ -static void -pic_ipi_send(void *arg, cpuset_t cpus, u_int ipi) -{ - - KASSERT(intr_irq_root_dev != NULL, ("%s: no root attached", __func__)); - PIC_IPI_SEND(intr_irq_root_dev, arg, cpus, ipi); -} - -/* - * Setup IPI handler on interrupt controller. - * - * Not SMP coherent. - */ -int -intr_pic_ipi_setup(u_int ipi, const char *name, intr_ipi_handler_t *hand, - void *arg) -{ - int error; - struct intr_irqsrc *isrc; - - KASSERT(intr_irq_root_dev != NULL, ("%s: no root attached", __func__)); - - error = PIC_IPI_SETUP(intr_irq_root_dev, ipi, &isrc); - if (error != 0) - return (error); - - isrc->isrc_handlers++; - intr_ipi_setup(ipi, name, hand, arg, pic_ipi_send, isrc); - PIC_ENABLE_INTR(intr_irq_root_dev, isrc); - return (0); -} -#endif diff --git a/sys/arm/arm/mp_machdep.c b/sys/arm/arm/mp_machdep.c index 0d78ef789d6e..01b02d9520ca 100644 --- a/sys/arm/arm/mp_machdep.c +++ b/sys/arm/arm/mp_machdep.c @@ -300,11 +300,11 @@ release_aps(void *dummy __unused) if (mp_ncpus == 1) return; - intr_pic_ipi_setup(IPI_RENDEZVOUS, "rendezvous", ipi_rendezvous, NULL); - intr_pic_ipi_setup(IPI_AST, "ast", ipi_ast, NULL); - intr_pic_ipi_setup(IPI_STOP, "stop", ipi_stop, NULL); - intr_pic_ipi_setup(IPI_PREEMPT, "preempt", ipi_preempt, NULL); - intr_pic_ipi_setup(IPI_HARDCLOCK, "hardclock", ipi_hardclock, NULL); + intr_ipi_setup(IPI_RENDEZVOUS, "rendezvous", ipi_rendezvous, NULL); + intr_ipi_setup(IPI_AST, "ast", ipi_ast, NULL); + intr_ipi_setup(IPI_STOP, "stop", ipi_stop, NULL); + intr_ipi_setup(IPI_PREEMPT, "preempt", ipi_preempt, NULL); + intr_ipi_setup(IPI_HARDCLOCK, "hardclock", ipi_hardclock, NULL); atomic_store_rel_int(&aps_ready, 1); /* Wake the other threads up */ diff --git a/sys/arm/include/intr.h b/sys/arm/include/intr.h index 21829c5782bc..d0d0ff9fc32a 100644 --- a/sys/arm/include/intr.h +++ b/sys/arm/include/intr.h @@ -49,19 +49,6 @@ #include -#ifdef SMP -typedef void intr_ipi_send_t(void *, cpuset_t, u_int); -typedef void intr_ipi_handler_t(void *); - -void intr_ipi_dispatch(u_int); -void intr_ipi_send(cpuset_t, u_int); - -void intr_ipi_setup(u_int, const char *, intr_ipi_handler_t *, void *, - intr_ipi_send_t *, void *); - -int intr_pic_ipi_setup(u_int, const char *, intr_ipi_handler_t *, void *); -#endif - void arm_irq_memory_barrier(uintptr_t); #endif /* _MACHINE_INTR_H */ diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c index c2b30930fd91..9c6175445572 100644 --- a/sys/arm64/arm64/mp_machdep.c +++ b/sys/arm64/arm64/mp_machdep.c @@ -77,8 +77,6 @@ #include -#include "pic_if.h" - #define MP_BOOTSTACK_SIZE (kstack_pages * PAGE_SIZE) #define MP_QUIRK_CPULIST 0x01 /* The list of cpus may be wrong, */ @@ -98,25 +96,6 @@ static struct { }; #endif -typedef void intr_ipi_send_t(void *, cpuset_t, u_int); -typedef void intr_ipi_handler_t(void *); - -#define INTR_IPI_NAMELEN (MAXCOMLEN + 1) -struct intr_ipi { - intr_ipi_handler_t * ii_handler; - void * ii_handler_arg; - intr_ipi_send_t * ii_send; - void * ii_send_arg; - char ii_name[INTR_IPI_NAMELEN]; - u_long * ii_count; -}; - -static struct intr_ipi ipi_sources[INTR_IPI_COUNT]; - -static struct intr_ipi *intr_ipi_lookup(u_int); -static void intr_pic_ipi_setup(u_int, const char *, intr_ipi_handler_t *, - void *); - static void ipi_ast(void *); static void ipi_hardclock(void *); static void ipi_preempt(void *); @@ -165,12 +144,12 @@ release_aps(void *dummy __unused) if (mp_ncpus == 1) return; - intr_pic_ipi_setup(IPI_AST, "ast", ipi_ast, NULL); - intr_pic_ipi_setup(IPI_PREEMPT, "preempt", ipi_preempt, NULL); - intr_pic_ipi_setup(IPI_RENDEZVOUS, "rendezvous", ipi_rendezvous, NULL); - intr_pic_ipi_setup(IPI_STOP, "stop", ipi_stop, NULL); - intr_pic_ipi_setup(IPI_STOP_HARD, "stop hard", ipi_stop, NULL); - intr_pic_ipi_setup(IPI_HARDCLOCK, "hardclock", ipi_hardclock, NULL); + intr_ipi_setup(IPI_AST, "ast", ipi_ast, NULL); + intr_ipi_setup(IPI_PREEMPT, "preempt", ipi_preempt, NULL); + intr_ipi_setup(IPI_RENDEZVOUS, "rendezvous", ipi_rendezvous, NULL); + intr_ipi_setup(IPI_STOP, "stop", ipi_stop, NULL); + intr_ipi_setup(IPI_STOP_HARD, "stop hard", ipi_stop, NULL); + intr_ipi_setup(IPI_HARDCLOCK, "hardclock", ipi_hardclock, NULL); atomic_store_rel_int(&aps_ready, 1); /* Wake up the other CPUs */ @@ -315,71 +294,6 @@ smp_after_idle_runnable(void *arg __unused) SYSINIT(smp_after_idle_runnable, SI_SUB_SMP, SI_ORDER_ANY, smp_after_idle_runnable, NULL); -/* - * Send IPI thru interrupt controller. - */ -static void -pic_ipi_send(void *arg, cpuset_t cpus, u_int ipi) -{ - - KASSERT(intr_irq_root_dev != NULL, ("%s: no root attached", __func__)); - - /* - * Ensure that this CPU's stores will be visible to IPI - * recipients before starting to send the interrupts. - */ - dsb(ishst); - - PIC_IPI_SEND(intr_irq_root_dev, arg, cpus, ipi); -} - -/* - * Setup IPI handler on interrupt controller. - * - * Not SMP coherent. - */ -static void -intr_pic_ipi_setup(u_int ipi, const char *name, intr_ipi_handler_t *hand, - void *arg) -{ - struct intr_irqsrc *isrc; - struct intr_ipi *ii; - int error; - - KASSERT(intr_irq_root_dev != NULL, ("%s: no root attached", __func__)); - KASSERT(hand != NULL, ("%s: ipi %u no handler", __func__, ipi)); - - error = PIC_IPI_SETUP(intr_irq_root_dev, ipi, &isrc); - if (error != 0) - return; - - isrc->isrc_handlers++; - - ii = intr_ipi_lookup(ipi); - KASSERT(ii->ii_count == NULL, ("%s: ipi %u reused", __func__, ipi)); - - ii->ii_handler = hand; - ii->ii_handler_arg = arg; - ii->ii_send = pic_ipi_send; - ii->ii_send_arg = isrc; - strlcpy(ii->ii_name, name, INTR_IPI_NAMELEN); - ii->ii_count = intr_ipi_setup_counters(name); - - PIC_ENABLE_INTR(intr_irq_root_dev, isrc); -} - -static void -intr_ipi_send(cpuset_t cpus, u_int ipi) -{ - struct intr_ipi *ii; - - ii = intr_ipi_lookup(ipi); - if (ii->ii_count == NULL) - panic("%s: not setup IPI %u", __func__, ipi); - - ii->ii_send(ii->ii_send_arg, cpus, ipi); -} - static void ipi_ast(void *dummy __unused) { @@ -888,112 +802,6 @@ cpu_mp_setmaxid(void) } } -/* - * Lookup IPI source. - */ -static struct intr_ipi * -intr_ipi_lookup(u_int ipi) -{ - - if (ipi >= INTR_IPI_COUNT) - panic("%s: no such IPI %u", __func__, ipi); - - return (&ipi_sources[ipi]); -} - -/* - * interrupt controller dispatch function for IPIs. It should - * be called straight from the interrupt controller, when associated - * interrupt source is learned. Or from anybody who has an interrupt - * source mapped. - */ -void -intr_ipi_dispatch(u_int ipi) -{ - struct intr_ipi *ii; - - ii = intr_ipi_lookup(ipi); - if (ii->ii_count == NULL) - panic("%s: not setup IPI %u", __func__, ipi); - - intr_ipi_increment_count(ii->ii_count, PCPU_GET(cpuid)); - - ii->ii_handler(ii->ii_handler_arg); -} - -#ifdef notyet -/* - * Map IPI into interrupt controller. - * - * Not SMP coherent. - */ -static int -ipi_map(struct intr_irqsrc *isrc, u_int ipi) -{ - boolean_t is_percpu; - int error; - - if (ipi >= INTR_IPI_COUNT) - panic("%s: no such IPI %u", __func__, ipi); - - KASSERT(intr_irq_root_dev != NULL, ("%s: no root attached", __func__)); - - isrc->isrc_type = INTR_ISRCT_NAMESPACE; - isrc->isrc_nspc_type = INTR_IRQ_NSPC_IPI; - isrc->isrc_nspc_num = ipi_next_num; - - error = PIC_REGISTER(intr_irq_root_dev, isrc, &is_percpu); - if (error == 0) { - isrc->isrc_dev = intr_irq_root_dev; - ipi_next_num++; - } - return (error); -} - -/* - * Setup IPI handler to interrupt source. - * - * Note that there could be more ways how to send and receive IPIs - * on a platform like fast interrupts for example. In that case, - * one can call this function with ASIF_NOALLOC flag set and then - * call intr_ipi_dispatch() when appropriate. - * - * Not SMP coherent. - */ -int -intr_ipi_set_handler(u_int ipi, const char *name, intr_ipi_filter_t *filter, - void *arg, u_int flags) -{ - struct intr_irqsrc *isrc; - int error; - - if (filter == NULL) - return(EINVAL); - - isrc = intr_ipi_lookup(ipi); - if (isrc->isrc_ipifilter != NULL) - return (EEXIST); - - if ((flags & AISHF_NOALLOC) == 0) { - error = ipi_map(isrc, ipi); - if (error != 0) - return (error); - } - - isrc->isrc_ipifilter = filter; - isrc->isrc_arg = arg; - isrc->isrc_handlers = 1; - isrc->isrc_count = intr_ipi_setup_counters(name); - isrc->isrc_index = 0; /* it should not be used in IPI case */ - - if (isrc->isrc_dev != NULL) { - PIC_ENABLE_INTR(isrc->isrc_dev, isrc); - PIC_ENABLE_SOURCE(isrc->isrc_dev, isrc); - } - return (0); -} -#endif - /* Sending IPI */ void ipi_all_but_self(u_int ipi) diff --git a/sys/arm64/include/intr.h b/sys/arm64/include/intr.h index 8d9c35e81cd7..3cdbc83ff109 100644 --- a/sys/arm64/include/intr.h +++ b/sys/arm64/include/intr.h @@ -42,10 +42,6 @@ arm_irq_memory_barrier(uintptr_t irq) { } -#ifdef SMP -void intr_ipi_dispatch(u_int); -#endif - #ifdef DEV_ACPI #define ACPI_INTR_XREF 1 #define ACPI_MSI_XREF 2 diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index fb75b2e1773b..c89f12a30ec9 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -2,6 +2,11 @@ * Copyright (c) 2015-2016 Svatopluk Kraus * Copyright (c) 2015-2016 Michal Meloun * All rights reserved. + * Copyright (c) 2015-2016 The FreeBSD Foundation + * Copyright (c) 2021 Jessica Clarke + * + * Portions of this software were developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -124,6 +129,18 @@ struct intr_pic { SLIST_HEAD(, intr_pic_child) pic_children; }; +#ifdef SMP +#define INTR_IPI_NAMELEN (MAXCOMLEN + 1) + +struct intr_ipi { + intr_ipi_handler_t *ii_handler; + void *ii_handler_arg; + struct intr_irqsrc *ii_isrc; + char ii_name[INTR_IPI_NAMELEN]; + u_long *ii_count; +}; +#endif + static struct mtx pic_list_lock; static SLIST_HEAD(, intr_pic) pic_list; @@ -140,6 +157,8 @@ static bool irq_assign_cpu = true; #else static bool irq_assign_cpu = false; #endif + +static struct intr_ipi ipi_sources[INTR_IPI_COUNT]; #endif u_int intr_nirq = NIRQ; @@ -298,39 +317,6 @@ isrc_release_counters(struct intr_irqsrc *isrc) bit_nclear(intrcnt_bitmap, idx, idx + 1); } -#ifdef SMP -/* - * Virtualization for interrupt source IPI counters setup. - */ -u_long * -intr_ipi_setup_counters(const char *name) -{ - u_int index, i; - char str[INTRNAME_LEN]; - - mtx_lock(&isrc_table_lock); - - /* - * We should never have a problem finding mp_maxid + 1 contiguous - * counters, in practice. Interrupts will be allocated sequentially - * during boot, so the array should fill from low to high index. Once - * reserved, the IPI counters will never be released. Similarly, we - * will not need to allocate more IPIs once the system is running. - */ - bit_ffc_area(intrcnt_bitmap, nintrcnt, mp_maxid + 1, &index); - if (index == -1) - panic("Failed to allocate %d counters. Array exhausted?", - mp_maxid + 1); - bit_nset(intrcnt_bitmap, index, index + mp_maxid); - for (i = 0; i < mp_maxid + 1; i++) { - snprintf(str, INTRNAME_LEN, "cpu%d:%s", i, name); - intrcnt_setname(str, index + i); - } - mtx_unlock(&isrc_table_lock); - return (&intrcnt[index]); -} -#endif - /* * Main interrupt dispatch handler. It's called straight * from the assembler, where CPU interrupt is served. @@ -1774,3 +1760,139 @@ intr_map_init(void *dummy __unused) M_INTRNG, M_WAITOK | M_ZERO); } SYSINIT(intr_map_init, SI_SUB_INTR, SI_ORDER_FIRST, intr_map_init, NULL); + +#ifdef SMP +/* Virtualization for interrupt source IPI counter increment. */ +static inline void +intr_ipi_increment_count(u_long *counter, u_int cpu) +{ + + KASSERT(cpu < mp_maxid + 1, ("%s: too big cpu %u", __func__, cpu)); + counter[cpu]++; +} + +/* + * Virtualization for interrupt source IPI counters setup. + */ +static u_long * +intr_ipi_setup_counters(const char *name) +{ + u_int index, i; + char str[INTRNAME_LEN]; + + mtx_lock(&isrc_table_lock); + + /* + * We should never have a problem finding mp_maxid + 1 contiguous + * counters, in practice. Interrupts will be allocated sequentially + * during boot, so the array should fill from low to high index. Once + * reserved, the IPI counters will never be released. Similarly, we + * will not need to allocate more IPIs once the system is running. + */ + bit_ffc_area(intrcnt_bitmap, nintrcnt, mp_maxid + 1, &index); + if (index == -1) + panic("Failed to allocate %d counters. Array exhausted?", + mp_maxid + 1); + bit_nset(intrcnt_bitmap, index, index + mp_maxid); + for (i = 0; i < mp_maxid + 1; i++) { + snprintf(str, INTRNAME_LEN, "cpu%d:%s", i, name); + intrcnt_setname(str, index + i); + } + mtx_unlock(&isrc_table_lock); + return (&intrcnt[index]); +} + +/* + * Lookup IPI source. + */ +static struct intr_ipi * +intr_ipi_lookup(u_int ipi) +{ + + if (ipi >= INTR_IPI_COUNT) + panic("%s: no such IPI %u", __func__, ipi); + + return (&ipi_sources[ipi]); +} + +/* + * Setup IPI handler on interrupt controller. + * + * Not SMP coherent. + */ +void +intr_ipi_setup(u_int ipi, const char *name, intr_ipi_handler_t *hand, + void *arg) +{ + struct intr_irqsrc *isrc; + struct intr_ipi *ii; + int error; + + KASSERT(intr_irq_root_dev != NULL, ("%s: no root attached", __func__)); + KASSERT(hand != NULL, ("%s: ipi %u no handler", __func__, ipi)); + + error = PIC_IPI_SETUP(intr_irq_root_dev, ipi, &isrc); + if (error != 0) + return; + + isrc->isrc_handlers++; + + ii = intr_ipi_lookup(ipi); + KASSERT(ii->ii_count == NULL, ("%s: ipi %u reused", __func__, ipi)); + + ii->ii_handler = hand; + ii->ii_handler_arg = arg; + ii->ii_isrc = isrc; + strlcpy(ii->ii_name, name, INTR_IPI_NAMELEN); + ii->ii_count = intr_ipi_setup_counters(name); + + PIC_ENABLE_INTR(intr_irq_root_dev, isrc); +} + +void +intr_ipi_send(cpuset_t cpus, u_int ipi) +{ + struct intr_ipi *ii; + + KASSERT(intr_irq_root_dev != NULL, ("%s: no root attached", __func__)); + + ii = intr_ipi_lookup(ipi); + if (ii->ii_count == NULL) + panic("%s: not setup IPI %u", __func__, ipi); + + /* + * XXX: Surely needed on other architectures too? Either way should be + * some kind of MI hook defined in an MD header, or the responsibility + * of the MD caller if not widespread. + */ +#ifdef __aarch64__ + /* + * Ensure that this CPU's stores will be visible to IPI + * recipients before starting to send the interrupts. + */ + dsb(ishst); +#endif + + PIC_IPI_SEND(intr_irq_root_dev, ii->ii_isrc, cpus, ipi); +} + +/* + * interrupt controller dispatch function for IPIs. It should + * be called straight from the interrupt controller, when associated + * interrupt source is learned. Or from anybody who has an interrupt + * source mapped. + */ +void +intr_ipi_dispatch(u_int ipi) +{ + struct intr_ipi *ii; + + ii = intr_ipi_lookup(ipi); + if (ii->ii_count == NULL) + panic("%s: not setup IPI %u", __func__, ipi); + + intr_ipi_increment_count(ii->ii_count, PCPU_GET(cpuid)); + + ii->ii_handler(ii->ii_handler_arg); +} +#endif diff --git a/sys/sys/intr.h b/sys/sys/intr.h index bdc693e6cb60..57b0ca393912 100644 --- a/sys/sys/intr.h +++ b/sys/sys/intr.h @@ -148,21 +148,18 @@ int intr_release_msix(device_t, device_t, intptr_t, int); int intr_bind_irq(device_t, struct resource *, int); void intr_pic_init_secondary(void); +#endif -/* Virtualization for interrupt source IPI counter increment. */ -static inline void -intr_ipi_increment_count(u_long *counter, u_int cpu) -{ - - KASSERT(cpu < MAXCPU, ("%s: too big cpu %u", __func__, cpu)); - counter[cpu]++; -} +extern u_int intr_nirq; /* number of IRQs on intrng platforms */ -/* Virtualization for interrupt source IPI counters setup. */ -u_long * intr_ipi_setup_counters(const char *name); +/* Intr interface for IPIs. */ +#ifdef SMP +typedef void intr_ipi_handler_t(void *); +void intr_ipi_setup(u_int ipi, const char *name, intr_ipi_handler_t *hand, + void *arg); +void intr_ipi_send(cpuset_t cpus, u_int ipi); +void intr_ipi_dispatch(u_int ipi); #endif -extern u_int intr_nirq; /* number of IRQs on intrng platforms */ - #endif /* _SYS_INTR_H */ From nobody Wed Jan 24 23:50:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TL10t4RjVz58xbm; Wed, 24 Jan 2024 23:50: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 4TL10t2PFLz4qhg; Wed, 24 Jan 2024 23:50:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706140222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hJNJ9fAh3KWF6YkvHKnJfM4idjQlEyc3SJcR2r6ifwc=; b=XbVr0umDnQE7UGgz/tMkw68nO/JF0Uqgt+J5xwpdO+nUoNzQ+LwnlqaLerAxIIXIv7uzIc f3cTc3koLMcffURH8n8APZIBBxMe7M8mJ2Uj41sVo3cOGy1YIgUsnVDyuH83H7OatA5P6Y byUehIAy4TwFcwAZjzLHAldSz5ra13iTUp7TwPbA0TGWAOszCrtlsojavzd7LJ4jvBEf4j PQAYtEWqRNUvjQVdqDYEVqTUfLPPZdaHuMPTDmcAodHC0QyqK9SQhcMGaGNpJoE6qU4lMJ xlCNDgGk4QjILx1DJDNVwC2bnJvMxhpSh/BEwfCeWimpsbdcSNZZnSt6FHP+jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706140222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hJNJ9fAh3KWF6YkvHKnJfM4idjQlEyc3SJcR2r6ifwc=; b=cW1u6+9qUz1he3hqViP9p8Kkga/AypsSqQh97p5VuRwS6iexg58CvJ4kSgn9VZ9Vlgiuy4 cYqTGsnIEl74b64q0cjwbEC5Al6d1o9WTEuCO2Z7TXy4DXb6YMN4t5wtPRceabcD40PgFz XZ0Nh05GHMwl01xzdSFhUc7iKCCcuGZ/HIwl2olrae5tNDzLuMxDyVKYSfrlHZZPQtdPBR 1V4Fvycw5ePZvcRrErY+bVxpANNYcFPyaFyGv43fpvY1NSvrAXynkCdkQwhkk3fQvANSrM TccdEpIaj3WGftf82r7HhlDHxa6MNlZi5yz0N5Cm/KPP2ZSu8fInvd+Br2OVzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706140222; a=rsa-sha256; cv=none; b=doS++zQPHIPXx72KPQCJq2FAJoH0s0Bbc+z6m9dafUKa3bCTWCYd86xT9Ly2JXtdQd6s0h x9vRUfkXNVKsfzGqAI+v8L0GxLmCMOtbhMR0n5HZLvq2s9Imsrh0q7kBIuJmquKjHyB0FV mIq2nJIslwNSCRPWn+OxT5cOASjvRropkftXX3VT1j8uXBC8sqe5VWPLmKcER7ZSShhuQU V2agNxBMEsdRG9rkJnz00O+e/AZvH2EcqazO3EQsbsiv6og6f2FMbFyj420/8k2rK+w7eK M1Rvt3zR05z173O5XzDCF3qdV9qrHmSCvJjlcatGOCyPQQfGys3dm34HfBsvgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TL10t1ShwzbJ0; Wed, 24 Jan 2024 23:50: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 40ONoM6p018581; Wed, 24 Jan 2024 23:50:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ONoM8Z018578; Wed, 24 Jan 2024 23:50:22 GMT (envelope-from git) Date: Wed, 24 Jan 2024 23:50:22 GMT Message-Id: <202401242350.40ONoM8Z018578@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 103d39efe0c6 - main - intrng: Allow alternative IPI PICs to be registered and used List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 103d39efe0c68cb2a808c306b14c3f473a02535d Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=103d39efe0c68cb2a808c306b14c3f473a02535d commit 103d39efe0c68cb2a808c306b14c3f473a02535d Author: Jessica Clarke AuthorDate: 2024-01-24 23:49:54 +0000 Commit: Jessica Clarke CommitDate: 2024-01-24 23:49:54 +0000 intrng: Allow alternative IPI PICs to be registered and used On RISC-V, the root PIC (whether the PLIC or, as will be the case in future, the local interrupt controller) cannot send IPIs, relying on another means to trigger the necessary software interrupts (firmware calls), but there are upcoming standard devices that will be able to inject them, so we can't just put the firmware calls in the root PIC driver. Thus, split out a new intr_ipi_dev from intr_irq_root_dev to use for sending IPIs. New devices can be registered with a given priority up until the first IPI is set up, when the best device seen so far gets frozen as the IPI device to use. Reviewed by: mhorne MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D35899 --- sys/arm/arm/gic_acpi.c | 8 ++++++++ sys/arm/arm/gic_fdt.c | 7 +++++++ sys/arm/broadcom/bcm2835/bcm2836.c | 12 ++++++++++- sys/arm64/arm64/gic_v3_acpi.c | 8 ++++++++ sys/arm64/arm64/gic_v3_fdt.c | 8 ++++++++ sys/kern/subr_intr.c | 42 +++++++++++++++++++++++++++++++------- sys/sys/intr.h | 1 + 7 files changed, 78 insertions(+), 8 deletions(-) diff --git a/sys/arm/arm/gic_acpi.c b/sys/arm/arm/gic_acpi.c index cdd2fc72a224..8b79558da6e8 100644 --- a/sys/arm/arm/gic_acpi.c +++ b/sys/arm/arm/gic_acpi.c @@ -232,6 +232,14 @@ gic_acpi_attach(device_t dev) intr_pic_deregister(dev, xref); goto cleanup; } + +#ifdef SMP + if (intr_ipi_pic_register(dev, 0) != 0) { + device_printf(dev, "could not register for IPIs\n"); + goto cleanup; + } +#endif + /* If we have children probe and attach them */ if (arm_gic_add_children(dev)) { bus_generic_probe(dev); diff --git a/sys/arm/arm/gic_fdt.c b/sys/arm/arm/gic_fdt.c index c51522b0d58c..a8886abf1c18 100644 --- a/sys/arm/arm/gic_fdt.c +++ b/sys/arm/arm/gic_fdt.c @@ -158,6 +158,13 @@ gic_fdt_attach(device_t dev) intr_pic_deregister(dev, xref); goto cleanup; } + +#ifdef SMP + if (intr_ipi_pic_register(dev, 0) != 0) { + device_printf(dev, "could not register for IPIs\n"); + goto cleanup; + } +#endif } else { if (sc->base.gic_res[2] == NULL) { device_printf(dev, diff --git a/sys/arm/broadcom/bcm2835/bcm2836.c b/sys/arm/broadcom/bcm2835/bcm2836.c index f72bd9075982..8ff824d34521 100644 --- a/sys/arm/broadcom/bcm2835/bcm2836.c +++ b/sys/arm/broadcom/bcm2835/bcm2836.c @@ -646,7 +646,17 @@ bcm_lintc_pic_attach(struct bcm_lintc_softc *sc) if (pic == NULL) return (ENXIO); - return (intr_pic_claim_root(sc->bls_dev, xref, bcm_lintc_intr, sc)); + error = intr_pic_claim_root(sc->bls_dev, xref, bcm_lintc_intr, sc); + if (error != 0) + return (error); + +#ifdef SMP + error = intr_ipi_pic_register(sc->bls_dev, 0); + if (error != 0) + return (error); +#endif + + return (0); } static int diff --git a/sys/arm64/arm64/gic_v3_acpi.c b/sys/arm64/arm64/gic_v3_acpi.c index e55aea86157e..f91a8f6078d9 100644 --- a/sys/arm64/arm64/gic_v3_acpi.c +++ b/sys/arm64/arm64/gic_v3_acpi.c @@ -351,6 +351,14 @@ gic_v3_acpi_attach(device_t dev) goto error; } +#ifdef SMP + err = intr_ipi_pic_register(dev, 0); + if (err != 0) { + device_printf(dev, "could not register for IPIs\n"); + goto error; + } +#endif + /* * Try to register the ITS driver to this GIC. The GIC will act as * a bus in that case. Failure here will not affect the main GIC diff --git a/sys/arm64/arm64/gic_v3_fdt.c b/sys/arm64/arm64/gic_v3_fdt.c index 8adb0497771e..3a3647fc89a5 100644 --- a/sys/arm64/arm64/gic_v3_fdt.c +++ b/sys/arm64/arm64/gic_v3_fdt.c @@ -166,6 +166,14 @@ gic_v3_fdt_attach(device_t dev) goto error; } +#ifdef SMP + err = intr_ipi_pic_register(dev, 0); + if (err != 0) { + device_printf(dev, "could not register for IPIs\n"); + goto error; + } +#endif + /* * Try to register ITS to this GIC. * GIC will act as a bus in that case. diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index c89f12a30ec9..a03607c781b2 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -139,6 +139,10 @@ struct intr_ipi { char ii_name[INTR_IPI_NAMELEN]; u_long *ii_count; }; + +static device_t intr_ipi_dev; +static u_int intr_ipi_dev_priority; +static bool intr_ipi_dev_frozen; #endif static struct mtx pic_list_lock; @@ -380,7 +384,8 @@ intr_isrc_dispatch(struct intr_irqsrc *isrc, struct trapframe *tf) KASSERT(isrc != NULL, ("%s: no source", __func__)); - isrc_increment_count(isrc); + if ((isrc->isrc_flags & INTR_ISRCF_IPI) == 0) + isrc_increment_count(isrc); #ifdef INTR_SOLO if (isrc->isrc_filter != NULL) { @@ -396,7 +401,8 @@ intr_isrc_dispatch(struct intr_irqsrc *isrc, struct trapframe *tf) return (0); } - isrc_increment_straycount(isrc); + if ((isrc->isrc_flags & INTR_ISRCF_IPI) == 0) + isrc_increment_straycount(isrc); return (EINVAL); } @@ -1815,6 +1821,20 @@ intr_ipi_lookup(u_int ipi) return (&ipi_sources[ipi]); } +int +intr_ipi_pic_register(device_t dev, u_int priority) +{ + if (intr_ipi_dev_frozen) { + device_printf(dev, "IPI device already frozen"); + return (EBUSY); + } + + if (intr_ipi_dev == NULL || priority > intr_ipi_dev_priority) + intr_ipi_dev = dev; + + return (0); +} + /* * Setup IPI handler on interrupt controller. * @@ -1828,10 +1848,17 @@ intr_ipi_setup(u_int ipi, const char *name, intr_ipi_handler_t *hand, struct intr_ipi *ii; int error; - KASSERT(intr_irq_root_dev != NULL, ("%s: no root attached", __func__)); + if (!intr_ipi_dev_frozen) { + if (intr_ipi_dev == NULL) + panic("%s: no IPI PIC attached", __func__); + + intr_ipi_dev_frozen = true; + device_printf(intr_ipi_dev, "using for IPIs\n"); + } + KASSERT(hand != NULL, ("%s: ipi %u no handler", __func__, ipi)); - error = PIC_IPI_SETUP(intr_irq_root_dev, ipi, &isrc); + error = PIC_IPI_SETUP(intr_ipi_dev, ipi, &isrc); if (error != 0) return; @@ -1846,7 +1873,7 @@ intr_ipi_setup(u_int ipi, const char *name, intr_ipi_handler_t *hand, strlcpy(ii->ii_name, name, INTR_IPI_NAMELEN); ii->ii_count = intr_ipi_setup_counters(name); - PIC_ENABLE_INTR(intr_irq_root_dev, isrc); + PIC_ENABLE_INTR(intr_ipi_dev, isrc); } void @@ -1854,7 +1881,8 @@ intr_ipi_send(cpuset_t cpus, u_int ipi) { struct intr_ipi *ii; - KASSERT(intr_irq_root_dev != NULL, ("%s: no root attached", __func__)); + KASSERT(intr_ipi_dev_frozen, + ("%s: IPI device not yet frozen", __func__)); ii = intr_ipi_lookup(ipi); if (ii->ii_count == NULL) @@ -1873,7 +1901,7 @@ intr_ipi_send(cpuset_t cpus, u_int ipi) dsb(ishst); #endif - PIC_IPI_SEND(intr_irq_root_dev, ii->ii_isrc, cpus, ipi); + PIC_IPI_SEND(intr_ipi_dev, ii->ii_isrc, cpus, ipi); } /* diff --git a/sys/sys/intr.h b/sys/sys/intr.h index 57b0ca393912..f6957864c639 100644 --- a/sys/sys/intr.h +++ b/sys/sys/intr.h @@ -156,6 +156,7 @@ extern u_int intr_nirq; /* number of IRQs on intrng platforms */ #ifdef SMP typedef void intr_ipi_handler_t(void *); +int intr_ipi_pic_register(device_t dev, u_int priority); void intr_ipi_setup(u_int ipi, const char *name, intr_ipi_handler_t *hand, void *arg); void intr_ipi_send(cpuset_t cpus, u_int ipi); From nobody Wed Jan 24 23:50:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TL10v502sz58xqC; Wed, 24 Jan 2024 23:50:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TL10v3B44z4qyH; Wed, 24 Jan 2024 23:50:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706140223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=77m49LqiE6WfweHtyxFO8gLHyriEYjGZ3aDGpI+5ug0=; b=x6vqE8G57CE1otCu6proPk4ejUia+cKvJuyQ2ryvAs6N1aF5uw1Y4Ch2JdaE5guO4iGBoJ 4jSoLTY0uWJ4ZPQ7MfX6VI6B0gVnQXgwDDy7Ax5KNOEq3Bp867rEYTnBL0YZFwxfmc2WFk 2FZTvEZk7bhm7i3u94a6Yj3t0PTtusjuOTzBEZBZbhvDgRJ0GHtoR7iUPsS8WedaG4unLX GYtsET9fSKUpjPHgFUogbGRA0afQQJBNv6Vc7+eaJZmjAWPxxLENXa0KwkhvVIw7v5/jTF 0ouBaQ4tqXMU+KWpZ9yWE8cfY6VGJCWPyTaDjDyriLg4lPBR+q+0ykwZepkysQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706140223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=77m49LqiE6WfweHtyxFO8gLHyriEYjGZ3aDGpI+5ug0=; b=RzIyM4gfLe5Lp71LgvpMQt0RuqK3et6+Zs6ViHG1g7WRuGLBVOd/q7tG9rbnu9WW56ebFd yOQWdZItbIg9qSqUj2mun50GNT9a3NMiqh47EKPu2FJTMasyQICJ6pBwmaoZabRcQz8k7z LENzWp14JEk1Iars9/NLcuNCu15RsH3pc02sEj4rCrQ+5mT6NLQvlIO14j1YZAY5snsjBZ vgKrb4XHbhxtJwLH36Kwfh2jauzY94jgZkRjIhfIjeFtj86CZDeywPRm2jY4aAv8WDagwK OL0tQSLMHXUOSJw+A9SH+PDMvWSKQwPza8sioJ7F6XzKMpJfpjdED+hETCRO8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706140223; a=rsa-sha256; cv=none; b=XwyV8FsUGOhEFqUrNInQeVNASbD4cdgFt0XGScaMHs04SpDnAN9eVOCQC/p4TdzxxOpi0l hX/IxlVCu8+7A7w1Z9OBE9+ETHH3WI99Ud2e1kDRxC+6B+8hvltJGUwTiTISgeZlaBP6ZE iUdb6YtTQX2gmT8N3kuEDl/3tBfX3KVuasZzpEMYXRfpwv06/VtzAP7irlHP8MxEg6/4/y GjrvsM+aYDziocBnesFjfu7rzVBAl0poT1jJ8TBBqM2rg2+zW1AfZZHE9gMEl/fovXyHhj yOnzGe35wtDRZaPJWLmo62iCtR+l2PzgqSKYU0zzvE4p82RNXgrUe7HJ1LjWkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TL10v2HD3zbJ1; Wed, 24 Jan 2024 23:50:23 +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 40ONoNXn018636; Wed, 24 Jan 2024 23:50:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ONoN1J018633; Wed, 24 Jan 2024 23:50:23 GMT (envelope-from git) Date: Wed, 24 Jan 2024 23:50:23 GMT Message-Id: <202401242350.40ONoN1J018633@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: c55272fdf857 - main - riscv: Create a newbus device for the SBI driver List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c55272fdf8570b4e15112009ad0066ed156f21a7 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=c55272fdf8570b4e15112009ad0066ed156f21a7 commit c55272fdf8570b4e15112009ad0066ed156f21a7 Author: Jessica Clarke AuthorDate: 2024-01-24 23:49:54 +0000 Commit: Jessica Clarke CommitDate: 2024-01-24 23:49:54 +0000 riscv: Create a newbus device for the SBI driver This approach is based on the Arm PSCI driver, though that makes more extensive use of its softc than we do here. This will be used to extract the SBI IPI code as a real PIC. Reviewed by: mhorne, imp MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D35900 --- sys/riscv/include/sbi.h | 6 +---- sys/riscv/riscv/sbi.c | 65 +++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 59 insertions(+), 12 deletions(-) diff --git a/sys/riscv/include/sbi.h b/sys/riscv/include/sbi.h index 4fbdd598ec4d..bd3991e0a89f 100644 --- a/sys/riscv/include/sbi.h +++ b/sys/riscv/include/sbi.h @@ -159,11 +159,7 @@ sbi_call(uint64_t arg7, uint64_t arg6, uint64_t arg0, uint64_t arg1, return (ret); } -/* Base extension functions and variables. */ -extern u_long sbi_spec_version; -extern u_long sbi_impl_id; -extern u_long sbi_impl_version; - +/* Base extension functions. */ static __inline long sbi_probe_extension(long id) { diff --git a/sys/riscv/riscv/sbi.c b/sys/riscv/riscv/sbi.c index 630b9bbd9727..7c6d19064456 100644 --- a/sys/riscv/riscv/sbi.c +++ b/sys/riscv/riscv/sbi.c @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2019 Mitchell Horne + * Copyright (c) 2021 Jessica Clarke * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,10 +27,11 @@ */ #include -#include #include -#include +#include #include +#include +#include #include #include @@ -39,9 +41,15 @@ #define OPENSBI_VERSION_MAJOR_OFFSET 16 #define OPENSBI_VERSION_MINOR_MASK 0xFFFF -u_long sbi_spec_version; -u_long sbi_impl_id; -u_long sbi_impl_version; +struct sbi_softc { + device_t dev; +}; + +static struct sbi_softc *sbi_softc = NULL; + +static u_long sbi_spec_version; +static u_long sbi_impl_id; +static u_long sbi_impl_version; static bool has_time_extension = false; static bool has_ipi_extension = false; @@ -315,10 +323,53 @@ sbi_init(void) } static void -sbi_late_init(void *dummy __unused) +sbi_identify(driver_t *driver, device_t parent) +{ + device_t dev; + + if (device_find_child(parent, "sbi", -1) != NULL) + return; + + dev = BUS_ADD_CHILD(parent, 0, "sbi", -1); + if (dev == NULL) + device_printf(parent, "Can't add sbi child\n"); +} + +static int +sbi_probe(device_t dev) { + device_set_desc(dev, "RISC-V Supervisor Binary Interface"); + + return (BUS_PROBE_NOWILDCARD); +} + +static int +sbi_attach(device_t dev) +{ + struct sbi_softc *sc; + + if (sbi_softc != NULL) + return (ENXIO); + + sc = device_get_softc(dev); + sc->dev = dev; + sbi_softc = sc; + EVENTHANDLER_REGISTER(shutdown_final, sbi_shutdown_final, NULL, SHUTDOWN_PRI_LAST); + + return (0); } -SYSINIT(sbi, SI_SUB_KLD, SI_ORDER_ANY, sbi_late_init, NULL); +static device_method_t sbi_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, sbi_identify), + DEVMETHOD(device_probe, sbi_probe), + DEVMETHOD(device_attach, sbi_attach), + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(sbi, sbi_driver, sbi_methods, sizeof(struct sbi_softc)); +EARLY_DRIVER_MODULE(sbi, nexus, sbi_driver, 0, 0, + BUS_PASS_CPU + BUS_PASS_ORDER_FIRST); From nobody Wed Jan 24 23:50:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TL10w4w7vz58xfJ; Wed, 24 Jan 2024 23:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TL10w41Grz4qqX; Wed, 24 Jan 2024 23:50:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706140224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zp896zkDlwLh3r7wV+C6ZWnKZXVig1/IhOr5LZh+q7k=; b=whyrFHAefaZcsU6Xrxu4/Z1vOZkRttt0zlUEjo/WMnbi4rQzew0c2eL3/Y1mt11l8abbvD xNXu6pgsxX5Sugs79u+DxAfvVatKuFITGu2xlLLyuznuDGWFVyMj6afZSK9qx/BAztup0a 17whr2up/2TkUNxrviye173gszWE7U2+1zIqpLIzhe50eIb7OullGaendo8cMBQV9/zaik GRuJwWZiwSde1svVioig3NENiRqFrBMiQrNM296ayjkPdtsZlRRUzy+MBEePoLzm1zSztw x/gllnHrs8IPeNZ5EO7YUyxq2T6ZDVZzROYCEQDJKrWDApLqEL8YiNXPpjMJkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706140224; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zp896zkDlwLh3r7wV+C6ZWnKZXVig1/IhOr5LZh+q7k=; b=RUg5NecZgll4b/KDjwapmiS68do5jbC9MGV4DRShoE4iM9SFbLYyiovL8PUPmLwbhQwDfP uFkxVSSx2nwKJLp73pJ0zyRPAh8fYGentloVuxKhJMwVbr2y/6Vfm+AHL8UvBW/8hut9mC sFQ9ulxEnC7+n9AIMzQ1T/0p32pHDcfxa2CcJm9okCkePp2gj2FZcmxU+zrywQGJZ/vcsa Yu+X0ixwhQuXYrfn9ciD76vIi58g3bf7RZMtH92ZBy/rhalRSUuch2z35MQqgQkThw0nFP /sy91oLGazF8+KH1CUn/4KKTCPiNt8GGMT8yA5JxKDPQuz2n5eXmvZpNpIZVTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706140224; a=rsa-sha256; cv=none; b=wRUsERVj6sPxMv5z7pwON/lChj3IYx1Wqo5hu9NkAQLYGKEWMsqmOF2O/VHerWlIeMX8YN fNAeVNWSfPIhDVr+bQltlA1RLjX6os4s1MzLv+YHbmHvSK4Shb1L5ivZIzjjYkVEkV/d/z qI+QVT3fUTjnvIHRo6qvgUe/NqoKa3mfwB/slYI0vOvyXJU/A4KkrE/CA77fObDAc8kwXD JB3G/emgQoA7qDex8zQO1O2AydV952D0IxSjTbuB1YSBbjgTQaArFqvBZHdLZTB7le/0HD EsgwuUWgyj72GbY7OiRMOPJO8rqw8LvgvwKxlQ7UG85zy0vrTnT/3CfnV09M/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 4TL10w372NzZft; Wed, 24 Jan 2024 23:50:24 +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 40ONoOrH018690; Wed, 24 Jan 2024 23:50:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40ONoOti018687; Wed, 24 Jan 2024 23:50:24 GMT (envelope-from git) Date: Wed, 24 Jan 2024 23:50:24 GMT Message-Id: <202401242350.40ONoOti018687@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 6ec8bf9f3d17 - main - riscv: Convert local interrupt controller to a newbus PIC List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ec8bf9f3d17b712d657c42f74fba936dd284d04 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=6ec8bf9f3d17b712d657c42f74fba936dd284d04 commit 6ec8bf9f3d17b712d657c42f74fba936dd284d04 Author: Jessica Clarke AuthorDate: 2024-01-24 23:49:54 +0000 Commit: Jessica Clarke CommitDate: 2024-01-24 23:49:54 +0000 riscv: Convert local interrupt controller to a newbus PIC Currently the local interrupt controller implementation is based on pre-INTRNG arm/arm64 code, using hand-rolled event code rather than INTRNG. This then interacts weirdly with the PLIC, and other future interrupt controllers like the APLIC and IMSICs in the upcoming AIA specification, since they become the root PIC despite not being the logical root. Instead, use a real newbus device for it and register it as the root PIC. This also adapts the IPI code to make use of the newly-added INTRNG generic IPI handling framework, adding a new sbi_ipi as the PIC. In future there will be alternative devices for sending IPIs that will register with higher priorities, such as the proposed AIA IMSIC and ACLINT SSWI. Reviewed by: mhorne MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D35901 --- sys/conf/files.riscv | 3 +- sys/riscv/include/intr.h | 24 +--- sys/riscv/include/smp.h | 17 +-- sys/riscv/riscv/intc.c | 311 ++++++++++++++++++++++++++++++++++++++++ sys/riscv/riscv/intr_machdep.c | 274 ----------------------------------- sys/riscv/riscv/mp_machdep.c | 162 ++++++++++++--------- sys/riscv/riscv/plic.c | 49 +++++-- sys/riscv/riscv/riscv_console.c | 2 - sys/riscv/riscv/sbi.c | 43 ++++++ sys/riscv/riscv/sbi_ipi.c | 208 +++++++++++++++++++++++++++ sys/riscv/riscv/timer.c | 33 ++++- sys/riscv/riscv/trap.c | 6 +- 12 files changed, 735 insertions(+), 397 deletions(-) diff --git a/sys/conf/files.riscv b/sys/conf/files.riscv index 975f9d3f576e..b6a87c63422b 100644 --- a/sys/conf/files.riscv +++ b/sys/conf/files.riscv @@ -43,7 +43,7 @@ riscv/riscv/elf_machdep.c standard riscv/riscv/exception.S standard riscv/riscv/exec_machdep.c standard riscv/riscv/gdb_machdep.c optional gdb -riscv/riscv/intr_machdep.c standard +riscv/riscv/intc.c standard riscv/riscv/identcpu.c standard riscv/riscv/locore.S standard no-obj riscv/riscv/machdep.c standard @@ -58,6 +58,7 @@ riscv/riscv/ptrace_machdep.c standard riscv/riscv/riscv_console.c optional rcons riscv/riscv/riscv_syscon.c optional syscon riscv_syscon fdt riscv/riscv/sbi.c standard +riscv/riscv/sbi_ipi.c optional smp riscv/riscv/stack_machdep.c optional ddb | stack riscv/riscv/support.S standard riscv/riscv/swtch.S standard diff --git a/sys/riscv/include/intr.h b/sys/riscv/include/intr.h index a4e3a7093492..ad811dcbc449 100644 --- a/sys/riscv/include/intr.h +++ b/sys/riscv/include/intr.h @@ -35,32 +35,11 @@ #ifndef _MACHINE_INTR_MACHDEP_H_ #define _MACHINE_INTR_MACHDEP_H_ -#define RISCV_NIRQ 1024 - #ifndef NIRQ -#define NIRQ RISCV_NIRQ +#define NIRQ 1024 #endif -#ifdef INTRNG #include -#endif - -struct trapframe; - -int riscv_teardown_intr(void *); -int riscv_setup_intr(const char *, driver_filter_t *, driver_intr_t *, - void *, int, int, void **); -void riscv_cpu_intr(struct trapframe *); - -typedef unsigned long * riscv_intrcnt_t; - -riscv_intrcnt_t riscv_intrcnt_create(const char *); -void riscv_intrcnt_setname(riscv_intrcnt_t, const char *); - -#ifdef SMP -void riscv_setup_ipihandler(driver_filter_t *); -void riscv_unmask_ipi(void); -#endif enum { IRQ_SOFTWARE_USER, @@ -75,7 +54,6 @@ enum { IRQ_EXTERNAL_SUPERVISOR, IRQ_EXTERNAL_HYPERVISOR, IRQ_EXTERNAL_MACHINE, - INTC_NIRQS }; #endif /* !_MACHINE_INTR_MACHDEP_H_ */ diff --git a/sys/riscv/include/smp.h b/sys/riscv/include/smp.h index 8bafc1ac6a3a..863f0bbd6d21 100644 --- a/sys/riscv/include/smp.h +++ b/sys/riscv/include/smp.h @@ -37,14 +37,15 @@ #include -#define IPI_AST (1 << 0) -#define IPI_PREEMPT (1 << 1) -#define IPI_RENDEZVOUS (1 << 2) -#define IPI_STOP (1 << 3) -#define IPI_STOP_HARD (1 << 4) -#define IPI_HARDCLOCK (1 << 5) - -#define INTR_IPI_COUNT 1 +enum { + IPI_AST, + IPI_PREEMPT, + IPI_RENDEZVOUS, + IPI_STOP, + IPI_STOP_HARD, + IPI_HARDCLOCK, + INTR_IPI_COUNT +}; void ipi_all_but_self(u_int ipi); void ipi_cpu(int cpu, u_int ipi); diff --git a/sys/riscv/riscv/intc.c b/sys/riscv/riscv/intc.c new file mode 100644 index 000000000000..399bb05bbcfe --- /dev/null +++ b/sys/riscv/riscv/intc.c @@ -0,0 +1,311 @@ +/*- + * Copyright (c) 2015-2017 Ruslan Bukin + * All rights reserved. + * Copyright (c) 2021 Jessica Clarke + * + * Portions of this software were developed by SRI International and the + * University of Cambridge Computer Laboratory under DARPA/AFRL contract + * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Portions of this software were developed by the University of Cambridge + * Computer Laboratory as part of the CTSRD Project, with support from the + * UK Higher Education Innovation Fund (HEIF). + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include +#include + +#include "pic_if.h" + +#define INTC_NIRQS 16 + +struct intc_irqsrc { + struct intr_irqsrc isrc; + u_int irq; +}; + +struct intc_softc { + device_t dev; + struct intc_irqsrc isrcs[INTC_NIRQS]; +}; + +static int intc_intr(void *arg); + +static phandle_t +intc_ofw_find(device_t dev, uint32_t hartid) +{ + phandle_t node; + pcell_t reg; + + node = OF_finddevice("/cpus"); + if (node == -1) { + device_printf(dev, "Can't find cpus node\n"); + return ((phandle_t)-1); + } + + for (node = OF_child(node); node != 0; node = OF_peer(node)) { + if (!ofw_bus_node_status_okay(node)) + continue; + + if (!ofw_bus_node_is_compatible(node, "riscv")) + continue; + + if (OF_searchencprop(node, "reg", ®, sizeof(reg)) == -1) + continue; + + if (reg == hartid) + break; + } + + if (node == 0) { + device_printf(dev, "Can't find boot cpu node\n"); + return ((phandle_t)-1); + } + + for (node = OF_child(node); node != 0; node = OF_peer(node)) { + if (!ofw_bus_node_status_okay(node)) + continue; + + if (ofw_bus_node_is_compatible(node, "riscv,cpu-intc")) + break; + } + + if (node == 0) { + device_printf(dev, + "Can't find boot cpu local interrupt controller\n"); + return ((phandle_t)-1); + } + + return (node); +} + +static void +intc_identify(driver_t *driver, device_t parent) +{ + device_t dev; + phandle_t node; + + if (device_find_child(parent, "intc", -1) != NULL) + return; + + node = intc_ofw_find(parent, PCPU_GET(hart)); + if (node == -1) + return; + + dev = simplebus_add_device(parent, node, 0, "intc", -1, NULL); + if (dev == NULL) + device_printf(parent, "Can't add intc child\n"); +} + +static int +intc_probe(device_t dev) +{ + device_set_desc(dev, "RISC-V Local Interrupt Controller"); + + return (BUS_PROBE_NOWILDCARD); +} + +static int +intc_attach(device_t dev) +{ + struct intc_irqsrc *isrcs; + struct intc_softc *sc; + struct intr_pic *pic; + const char *name; + phandle_t xref; + u_int flags; + int i, error; + + sc = device_get_softc(dev); + sc->dev = dev; + + name = device_get_nameunit(dev); + xref = OF_xref_from_node(ofw_bus_get_node(dev)); + + isrcs = sc->isrcs; + for (i = 0; i < INTC_NIRQS; i++) { + isrcs[i].irq = i; + flags = i == IRQ_SOFTWARE_SUPERVISOR + ? INTR_ISRCF_IPI : INTR_ISRCF_PPI; + error = intr_isrc_register(&isrcs[i].isrc, sc->dev, flags, + "%s,%u", name, i); + if (error != 0) { + device_printf(dev, "Can't register interrupt %d\n", i); + return (error); + } + } + + pic = intr_pic_register(sc->dev, xref); + if (pic == NULL) + return (ENXIO); + + return (intr_pic_claim_root(sc->dev, xref, intc_intr, sc)); +} + +static void +intc_disable_intr(device_t dev, struct intr_irqsrc *isrc) +{ + u_int irq; + + irq = ((struct intc_irqsrc *)isrc)->irq; + if (irq >= INTC_NIRQS) + panic("%s: Unsupported IRQ %u", __func__, irq); + + csr_clear(sie, 1ul << irq); +} + +static void +intc_enable_intr(device_t dev, struct intr_irqsrc *isrc) +{ + u_int irq; + + irq = ((struct intc_irqsrc *)isrc)->irq; + if (irq >= INTC_NIRQS) + panic("%s: Unsupported IRQ %u", __func__, irq); + + csr_set(sie, 1ul << irq); +} + +static int +intc_map_intr(device_t dev, struct intr_map_data *data, + struct intr_irqsrc **isrcp) +{ + struct intr_map_data_fdt *daf; + struct intc_softc *sc; + + sc = device_get_softc(dev); + + if (data->type != INTR_MAP_DATA_FDT) + return (ENOTSUP); + + daf = (struct intr_map_data_fdt *)data; + if (daf->ncells != 1 || daf->cells[0] >= INTC_NIRQS) + return (EINVAL); + + *isrcp = &sc->isrcs[daf->cells[0]].isrc; + + return (0); +} + +static int +intc_setup_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + if (isrc->isrc_flags & INTR_ISRCF_PPI) + CPU_SET(PCPU_GET(cpuid), &isrc->isrc_cpu); + + return (0); +} + +#ifdef SMP +static void +intc_init_secondary(device_t dev) +{ + struct intc_softc *sc; + struct intr_irqsrc *isrc; + u_int cpu, irq; + + sc = device_get_softc(dev); + cpu = PCPU_GET(cpuid); + + /* Unmask attached interrupts */ + for (irq = 0; irq < INTC_NIRQS; irq++) { + isrc = &sc->isrcs[irq].isrc; + if (intr_isrc_init_on_cpu(isrc, cpu)) + intc_enable_intr(dev, isrc); + } +} +#endif + +static int +intc_intr(void *arg) +{ + struct trapframe *frame; + struct intc_softc *sc; + uint64_t active_irq; + struct intc_irqsrc *src; + + sc = arg; + frame = curthread->td_intr_frame; + + KASSERT((frame->tf_scause & SCAUSE_INTR) != 0, + ("%s: not an interrupt frame", __func__)); + + active_irq = frame->tf_scause & SCAUSE_CODE; + + if (active_irq >= INTC_NIRQS) + return (FILTER_HANDLED); + + src = &sc->isrcs[active_irq]; + if (intr_isrc_dispatch(&src->isrc, frame) != 0) { + intc_disable_intr(sc->dev, &src->isrc); + device_printf(sc->dev, "Stray irq %lu disabled\n", + active_irq); + } + + return (FILTER_HANDLED); +} + +static device_method_t intc_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, intc_identify), + DEVMETHOD(device_probe, intc_probe), + DEVMETHOD(device_attach, intc_attach), + + /* Interrupt controller interface */ + DEVMETHOD(pic_disable_intr, intc_disable_intr), + DEVMETHOD(pic_enable_intr, intc_enable_intr), + DEVMETHOD(pic_map_intr, intc_map_intr), + DEVMETHOD(pic_setup_intr, intc_setup_intr), +#ifdef SMP + DEVMETHOD(pic_init_secondary, intc_init_secondary), +#endif + + DEVMETHOD_END +}; + +DEFINE_CLASS_0(intc, intc_driver, intc_methods, sizeof(struct intc_softc)); +EARLY_DRIVER_MODULE(intc, ofwbus, intc_driver, 0, 0, + BUS_PASS_INTERRUPT + BUS_PASS_ORDER_FIRST); diff --git a/sys/riscv/riscv/intr_machdep.c b/sys/riscv/riscv/intr_machdep.c deleted file mode 100644 index 6c00b29c120d..000000000000 --- a/sys/riscv/riscv/intr_machdep.c +++ /dev/null @@ -1,274 +0,0 @@ -/*- - * Copyright (c) 2015-2017 Ruslan Bukin - * All rights reserved. - * - * Portions of this software were developed by SRI International and the - * University of Cambridge Computer Laboratory under DARPA/AFRL contract - * FA8750-10-C-0237 ("CTSRD"), as part of the DARPA CRASH research programme. - * - * Portions of this software were developed by the University of Cambridge - * Computer Laboratory as part of the CTSRD Project, with support from the - * UK Higher Education Innovation Fund (HEIF). - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#ifdef SMP -#include -#endif - -void intr_irq_handler(struct trapframe *tf); - -struct intc_irqsrc { - struct intr_irqsrc isrc; - u_int irq; -}; - -struct intc_irqsrc isrcs[INTC_NIRQS]; - -static void -riscv_mask_irq(void *source) -{ - int irq; - - irq = (int)(uintptr_t)source; - - switch (irq) { - case IRQ_TIMER_SUPERVISOR: - csr_clear(sie, SIE_STIE); - break; - case IRQ_SOFTWARE_USER: - csr_clear(sie, SIE_USIE); - break; - case IRQ_SOFTWARE_SUPERVISOR: - csr_clear(sie, SIE_SSIE); - break; - default: - panic("Unknown irq %d\n", irq); - } -} - -static void -riscv_unmask_irq(void *source) -{ - int irq; - - irq = (int)(uintptr_t)source; - - switch (irq) { - case IRQ_TIMER_SUPERVISOR: - csr_set(sie, SIE_STIE); - break; - case IRQ_SOFTWARE_USER: - csr_set(sie, SIE_USIE); - break; - case IRQ_SOFTWARE_SUPERVISOR: - csr_set(sie, SIE_SSIE); - break; - default: - panic("Unknown irq %d\n", irq); - } -} - -int -riscv_setup_intr(const char *name, driver_filter_t *filt, - void (*handler)(void*), void *arg, int irq, int flags, void **cookiep) -{ - struct intr_irqsrc *isrc; - int error; - - if (irq < 0 || irq >= INTC_NIRQS) - panic("%s: unknown intr %d", __func__, irq); - - isrc = &isrcs[irq].isrc; - if (isrc->isrc_event == NULL) { - error = intr_event_create(&isrc->isrc_event, isrc, 0, irq, - riscv_mask_irq, riscv_unmask_irq, NULL, NULL, "int%d", irq); - if (error) - return (error); - riscv_unmask_irq((void*)(uintptr_t)irq); - } - - error = intr_event_add_handler(isrc->isrc_event, name, - filt, handler, arg, intr_priority(flags), flags, cookiep); - if (error) { - printf("Failed to setup intr: %d\n", irq); - return (error); - } - - return (0); -} - -int -riscv_teardown_intr(void *ih) -{ - - /* TODO */ - - return (0); -} - -void -riscv_cpu_intr(struct trapframe *frame) -{ - struct intr_irqsrc *isrc; - int active_irq; - - KASSERT((frame->tf_scause & SCAUSE_INTR) != 0, - ("riscv_cpu_intr: wrong frame passed")); - - active_irq = frame->tf_scause & SCAUSE_CODE; - - CTR3(KTR_TRAP, "%s: irq=%d, umode=%d", __func__, active_irq, - TRAPF_USERMODE(frame)); - - switch (active_irq) { - case IRQ_SOFTWARE_USER: - case IRQ_SOFTWARE_SUPERVISOR: - case IRQ_TIMER_SUPERVISOR: - critical_enter(); - isrc = &isrcs[active_irq].isrc; - if (intr_isrc_dispatch(isrc, frame) != 0) - printf("stray interrupt %d\n", active_irq); - critical_exit(); - break; - case IRQ_EXTERNAL_SUPERVISOR: - intr_irq_handler(frame); - break; - } -} - -#ifdef SMP -void -riscv_setup_ipihandler(driver_filter_t *filt) -{ - - riscv_setup_intr("ipi", filt, NULL, NULL, IRQ_SOFTWARE_SUPERVISOR, - INTR_TYPE_MISC, NULL); -} - -void -riscv_unmask_ipi(void) -{ - - csr_set(sie, SIE_SSIE); -} - -/* Sending IPI */ -static void -ipi_send(struct pcpu *pc, int ipi) -{ - u_long mask; - - CTR3(KTR_SMP, "%s: cpu: %d, ipi: %x", __func__, pc->pc_cpuid, ipi); - - atomic_set_32(&pc->pc_pending_ipis, ipi); - mask = (1 << pc->pc_hart); - - sbi_send_ipi(&mask); - - CTR1(KTR_SMP, "%s: sent", __func__); -} - -void -ipi_all_but_self(u_int ipi) -{ - cpuset_t other_cpus; - - other_cpus = all_cpus; - CPU_CLR(PCPU_GET(cpuid), &other_cpus); - - CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - ipi_selected(other_cpus, ipi); -} - -void -ipi_cpu(int cpu, u_int ipi) -{ - cpuset_t cpus; - - CPU_ZERO(&cpus); - CPU_SET(cpu, &cpus); - - ipi_send(cpuid_to_pcpu[cpu], ipi); -} - -void -ipi_selected(cpuset_t cpus, u_int ipi) -{ - struct pcpu *pc; - u_long mask; - - CTR1(KTR_SMP, "ipi_selected: ipi: %x", ipi); - - mask = 0; - STAILQ_FOREACH(pc, &cpuhead, pc_allcpu) { - if (CPU_ISSET(pc->pc_cpuid, &cpus)) { - CTR3(KTR_SMP, "%s: pc: %p, ipi: %x\n", __func__, pc, - ipi); - atomic_set_32(&pc->pc_pending_ipis, ipi); - mask |= (1 << pc->pc_hart); - } - } - sbi_send_ipi(&mask); -} -#endif - -/* Interrupt machdep initialization routine. */ -static void -intc_init(void *dummy __unused) -{ - int error; - int i; - - for (i = 0; i < INTC_NIRQS; i++) { - isrcs[i].irq = i; - error = intr_isrc_register(&isrcs[i].isrc, NULL, - 0, "intc,%u", i); - if (error != 0) - printf("Can't register interrupt %d\n", i); - } -} - -SYSINIT(intc_init, SI_SUB_INTR, SI_ORDER_MIDDLE, intc_init, NULL); diff --git a/sys/riscv/riscv/mp_machdep.c b/sys/riscv/riscv/mp_machdep.c index 2c144e457b4e..be5c50485bf4 100644 --- a/sys/riscv/riscv/mp_machdep.c +++ b/sys/riscv/riscv/mp_machdep.c @@ -83,7 +83,11 @@ static device_identify_t riscv64_cpu_identify; static device_probe_t riscv64_cpu_probe; static device_attach_t riscv64_cpu_attach; -static int ipi_handler(void *); +static void ipi_ast(void *); +static void ipi_hardclock(void *); +static void ipi_preempt(void *); +static void ipi_rendezvous(void *); +static void ipi_stop(void *); extern uint32_t boot_hart; extern cpuset_t all_harts; @@ -191,8 +195,13 @@ release_aps(void *dummy __unused) if (mp_ncpus == 1) return; - /* Setup the IPI handler */ - riscv_setup_ipihandler(ipi_handler); + /* Setup the IPI handlers */ + intr_ipi_setup(IPI_AST, "ast", ipi_ast, NULL); + intr_ipi_setup(IPI_PREEMPT, "preempt", ipi_preempt, NULL); + intr_ipi_setup(IPI_RENDEZVOUS, "rendezvous", ipi_rendezvous, NULL); + intr_ipi_setup(IPI_STOP, "stop", ipi_stop, NULL); + intr_ipi_setup(IPI_STOP_HARD, "stop hard", ipi_stop, NULL); + intr_ipi_setup(IPI_HARDCLOCK, "hardclock", ipi_hardclock, NULL); atomic_store_rel_int(&aps_ready, 1); @@ -244,17 +253,14 @@ init_secondary(uint64_t hart) pcpup->pc_curthread = pcpup->pc_idlethread; schedinit_ap(); - /* Enable software interrupts */ - riscv_unmask_ipi(); + /* Setup and enable interrupts */ + intr_pic_init_secondary(); #ifndef EARLY_AP_STARTUP /* Start per-CPU event timers. */ cpu_initclocks_ap(); #endif - /* Enable external (PLIC) interrupts */ - csr_set(sie, SIE_SEIE); - /* Activate this hart in the kernel pmap. */ CPU_SET_ATOMIC(hart, &kernel_pmap->pm_active); @@ -308,74 +314,59 @@ smp_after_idle_runnable(void *arg __unused) SYSINIT(smp_after_idle_runnable, SI_SUB_SMP, SI_ORDER_ANY, smp_after_idle_runnable, NULL); -static int -ipi_handler(void *arg) +static void +ipi_ast(void *dummy __unused) +{ + CTR0(KTR_SMP, "IPI_AST"); +} + +static void +ipi_preempt(void *dummy __unused) +{ + CTR1(KTR_SMP, "%s: IPI_PREEMPT", __func__); + sched_preempt(curthread); +} + +static void +ipi_rendezvous(void *dummy __unused) { - u_int ipi_bitmap; - u_int cpu, ipi; - int bit; + CTR0(KTR_SMP, "IPI_RENDEZVOUS"); + smp_rendezvous_action(); +} + +static void +ipi_stop(void *dummy __unused) +{ + u_int cpu; - csr_clear(sip, SIP_SSIP); + CTR0(KTR_SMP, "IPI_STOP"); cpu = PCPU_GET(cpuid); + savectx(&stoppcbs[cpu]); - mb(); - - ipi_bitmap = atomic_readandclear_int(PCPU_PTR(pending_ipis)); - if (ipi_bitmap == 0) - return (FILTER_HANDLED); - - while ((bit = ffs(ipi_bitmap))) { - bit = (bit - 1); - ipi = (1 << bit); - ipi_bitmap &= ~ipi; - - mb(); - - switch (ipi) { - case IPI_AST: - CTR0(KTR_SMP, "IPI_AST"); - break; - case IPI_PREEMPT: - CTR1(KTR_SMP, "%s: IPI_PREEMPT", __func__); - sched_preempt(curthread); - break; - case IPI_RENDEZVOUS: - CTR0(KTR_SMP, "IPI_RENDEZVOUS"); - smp_rendezvous_action(); - break; - case IPI_STOP: - case IPI_STOP_HARD: - CTR0(KTR_SMP, (ipi == IPI_STOP) ? "IPI_STOP" : "IPI_STOP_HARD"); - savectx(&stoppcbs[cpu]); - - /* Indicate we are stopped */ - CPU_SET_ATOMIC(cpu, &stopped_cpus); - - /* Wait for restart */ - while (!CPU_ISSET(cpu, &started_cpus)) - cpu_spinwait(); - - CPU_CLR_ATOMIC(cpu, &started_cpus); - CPU_CLR_ATOMIC(cpu, &stopped_cpus); - CTR0(KTR_SMP, "IPI_STOP (restart)"); - - /* - * The kernel debugger might have set a breakpoint, - * so flush the instruction cache. - */ - fence_i(); - break; - case IPI_HARDCLOCK: - CTR1(KTR_SMP, "%s: IPI_HARDCLOCK", __func__); - hardclockintr(); - break; - default: - panic("Unknown IPI %#0x on cpu %d", ipi, curcpu); - } - } + /* Indicate we are stopped */ + CPU_SET_ATOMIC(cpu, &stopped_cpus); + + /* Wait for restart */ + while (!CPU_ISSET(cpu, &started_cpus)) + cpu_spinwait(); - return (FILTER_HANDLED); + CPU_CLR_ATOMIC(cpu, &started_cpus); + CPU_CLR_ATOMIC(cpu, &stopped_cpus); + CTR0(KTR_SMP, "IPI_STOP (restart)"); + + /* + * The kernel debugger might have set a breakpoint, + * so flush the instruction cache. + */ + fence_i(); +} + +static void +ipi_hardclock(void *dummy __unused) +{ + CTR1(KTR_SMP, "%s: IPI_HARDCLOCK", __func__); + hardclockintr(); } struct cpu_group * @@ -574,3 +565,34 @@ cpu_mp_setmaxid(void) } } } + +void +ipi_all_but_self(u_int ipi) +{ + cpuset_t other_cpus; + + other_cpus = all_cpus; + CPU_CLR(PCPU_GET(cpuid), &other_cpus); + + CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); + intr_ipi_send(other_cpus, ipi); +} + +void +ipi_cpu(int cpu, u_int ipi) +{ + cpuset_t cpus; + + CPU_ZERO(&cpus); + CPU_SET(cpu, &cpus); + + CTR3(KTR_SMP, "%s: cpu: %d, ipi: %x", __func__, cpu, ipi); + intr_ipi_send(cpus, ipi); +} + +void +ipi_selected(cpuset_t cpus, u_int ipi) +{ + CTR1(KTR_SMP, "ipi_selected: ipi: %x", ipi); + intr_ipi_send(cpus, ipi); +} diff --git a/sys/riscv/riscv/plic.c b/sys/riscv/riscv/plic.c index 1e8a03127038..406aff5bbff0 100644 --- a/sys/riscv/riscv/plic.c +++ b/sys/riscv/riscv/plic.c @@ -91,16 +91,18 @@ struct plic_context { struct plic_softc { device_t dev; - struct resource * intc_res; + struct resource *mem_res; + struct resource *irq_res; + void *ih; struct plic_irqsrc isrcs[PLIC_MAX_IRQS]; struct plic_context contexts[MAXCPU]; int ndev; }; #define RD4(sc, reg) \ - bus_read_4(sc->intc_res, (reg)) + bus_read_4(sc->mem_res, (reg)) #define WR4(sc, reg, val) \ - bus_write_4(sc->intc_res, (reg), (val)) + bus_write_4(sc->mem_res, (reg), (val)) static u_int plic_irq_cpu; @@ -276,9 +278,9 @@ plic_attach(device_t dev) /* Request memory resources */ rid = 0; - sc->intc_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); - if (sc->intc_res == NULL) { + if (sc->mem_res == NULL) { device_printf(dev, "Error: could not allocate memory resources\n"); return (ENXIO); @@ -302,7 +304,7 @@ plic_attach(device_t dev) * *** 503 LINES SKIPPED *** From nobody Thu Jan 25 00:38:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TL24t6JMdz592CP; Thu, 25 Jan 2024 00:38:54 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TL24t0Nn9z419Y; Thu, 25 Jan 2024 00:38:54 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.208.172 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-2cf1524cb17so28042271fa.2; Wed, 24 Jan 2024 16:38:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706143132; x=1706747932; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xE5T6/zBUYMrGvtGRbDR75KLcB67zzD7PF5zwlpgsqw=; b=HithtMiEZ11a9Mom2Olw1FDRrCF3eXBJ9ACijanC59mMnUcpIto2qKrfbfWiv5H86a G/d/rmyTfk3FOYhLBwVway4gPzN9iyVsC2ehZ+Y4Y+cajqDOX4N6VLMk0LAUV8/x07Nr Se4sTKG5EiNCl/3OdEJ6rBS3kmD6rmbrEYfPY45y/q4UyCKYoTO+3SDC9/TjGQeRzn8f 0v5Pa/xtB5QcR3uB1dmIINg20q8VuvmV/+S423dNz9DKgqxvWx/5UllPpAoQk8/WB4+D qqfyxHpnFDZjV6fnZJxkfuD+KccX3g+nkL48FEcb5p+f0uIVrewpq9eJid/pkl6pbrib D/Eg== X-Gm-Message-State: AOJu0Ywf3ck1KeexO/rztNYBwuCuJvKSFGUltObzwZW7a9oyfIbmHdSH rz8+dXD0sg+2yL3yr+R1pOLQCPc+9uWBcKFci0tZFDiaGM68AYQ1+jB5Kv2NoXAVtPPuYYdypmu I97+iYnWiMtEUvfig7IDcJ9M/mJVwqhADWxA= X-Google-Smtp-Source: AGHT+IHjG87qolCNRPmMhQIXNSz/HoiQD21u8ZC1ZcBGE+g6kVJrQ/+L2ymve3otQh3M45XayJeSOAirTAovNtvEg0c= X-Received: by 2002:a2e:819a:0:b0:2cf:20f5:efdb with SMTP id e26-20020a2e819a000000b002cf20f5efdbmr87746ljg.38.1706143132005; Wed, 24 Jan 2024 16:38:52 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202401241956.40OJuD8e023568@gitrepo.freebsd.org> In-Reply-To: From: Ed Maste Date: Wed, 24 Jan 2024 19:38:40 -0500 Message-ID: Subject: Re: git: 54d31cfb2789 - main - mount: document atime option To: Rick Macklem Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: - X-Spamd-Result: default: False [-1.58 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_SPAM_SHORT(0.32)[0.315]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; MISSING_XM_UA(0.00)[]; FREEFALL_USER(0.00)[carpeddiem]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; RCVD_COUNT_ONE(0.00)[1]; R_DKIM_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.172:from]; TAGGED_RCPT(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.172:from] X-Rspamd-Queue-Id: 4TL24t0Nn9z419Y On Wed, 24 Jan 2024 at 17:04, Rick Macklem wrote: > > I'll note that, for an NFS mount, atime is not implemented. I found > out recently when Mike Karels asked. The NFS client does not > do a Setattr/atime upon every read from the buffer cache. As such, > the behaviour w.r.t. atime is largely undefined (and ahs been for decades) > and depends on the NFS server's file system configuration. Ah, maybe I should just mirror the text from noatime, something like: This is the default for local file systems. From nobody Thu Jan 25 00:49:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TL2KH5VKnz592tk; Thu, 25 Jan 2024 00:49:39 +0000 (UTC) (envelope-from dtf@shxd.cx) Received: from shxd.cx (shxd.cx [64.201.244.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4TL2KH52glz42Bm; Thu, 25 Jan 2024 00:49:39 +0000 (UTC) (envelope-from dtf@shxd.cx) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=shxd.cx; s=shxd2024; h=Sender:To:References:Message-Id:Content-Transfer-Encoding:Cc: Date:In-Reply-To:From:Subject:Mime-Version:Content-Type:Reply-to:Content-ID: Content-Description; bh=m4NxNPpUcMl3Vm7O2dIKtudWOBy9k5ILplyXVOgl0u0=; b=iLFcU Zq6pvKXwu4Ri5e0JvbsyCO44EAPqZZZp11x5PniZ5FIF6CJBR0GLwbVrv6jM3jKKK38BhXvJ9MeLU A2O8i6JtywfxgMSd0gn3ob4J1YKMbv1wuh8pSvItK9utSM+YF4IdnCOvT6Wru9IVXHwr34t+Wfd9C dQTkwU6mvEnQ=; Received: from lummox.shxd.cx ([10.0.0.254]:60103 helo=smtpclient.apple) by shxd.cx with esmtpsa (TLS1.2) tls TLS_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1 (FreeBSD)) (envelope-from ) id 1rSnvQ-000000007yJ-1HfH; Wed, 24 Jan 2024 16:49:00 -0800 Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: git: 54d31cfb2789 - main - mount: document atime option From: Devin Teske In-Reply-To: Date: Wed, 24 Jan 2024 16:49:28 -0800 Cc: Rick Macklem , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <202401241956.40OJuD8e023568@gitrepo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3731.500.231) X-Rspamd-Queue-Id: 4TL2KH52glz42Bm X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; TAGGED_RCPT(0.00)[]; ASN(0.00)[asn:36734, ipnet:64.201.240.0/20, country:US] > On Jan 24, 2024, at 4:38 PM, Ed Maste wrote: >=20 > On Wed, 24 Jan 2024 at 17:04, Rick Macklem = wrote: >>=20 >> I'll note that, for an NFS mount, atime is not implemented. I found >> out recently when Mike Karels asked. The NFS client does not >> do a Setattr/atime upon every read from the buffer cache. As such, >> the behaviour w.r.t. atime is largely undefined (and ahs been for = decades) >> and depends on the NFS server's file system configuration. >=20 > Ah, maybe I should just mirror the text from noatime, something like: > This is the default for local file systems. =F0=9F=91=8D +1= From nobody Thu Jan 25 01:24:26 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TL35h64Rlz57Mtg for ; Thu, 25 Jan 2024 01:24:40 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TL35h2LqVz45ZF for ; Thu, 25 Jan 2024 01:24:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-55a9008c185so529385a12.1 for ; Wed, 24 Jan 2024 17:24:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1706145878; x=1706750678; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9rFrH/GduqaqGzGXG4Hs2ikT1P45SEPiCsjVb6USA30=; b=qwiMpeLWmW3he30NnpisnUakgc8GMolu6yHaBSGqM4gDW3AN7Oti4s6bg571oLF2L6 iBOu9+wnZoNYdScZX/1d4YX7cVBmiVd2tnw0kycLSgLK7Aod2oJVJD5ezuE4JbZj3aAD lltlR/Ue945Yl70pctPHZ2uTakzgmACaExewHnX2bMb+8kJOlCQwvUMzrOpAXWH+SDhe Ixn0uwlKQ+UDJn5IKUGCRxxWKehU6oatpbt9l/SuAWy6L+UhgJTLdDyHyfKpe2ifnuf3 CaeRk/8LxI8kMsZZkYVzc7gtYdxHFywxbeZpY9vQRcfPXoCj9/PdlLBWq7+6DK2vBUGQ B0oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706145878; x=1706750678; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=9rFrH/GduqaqGzGXG4Hs2ikT1P45SEPiCsjVb6USA30=; b=iRfmbNCWx/7aGGTTnvW9/Cm/63dtTlHLcqlTEPX2QPr25HgFcVePKZTar8h5qwmnol u2ojElRGev2O8jci+gtTGamsrBuLY5CTy1Z7s7QqbVk3J7dgUnhs64ySuutS9ChHc5aK ozCK+Ex7ieB9pv9mVfCd9J1Ftk1awaG5uaNkUsnWA0n4npY+87negrGBhcgqsYkJ3ZgQ rVkV5nWSKSsV8CEpOIGRDFEWf1QgvECpjVD+cVpEZnB5rGTaj6KjXLhV+QrTm5r+UcMT Z7qxYVNT2Q693qd9BIRU/gueYwrXIgfHK9B2LViyFASg77nTHVfX5XXv249KmEUttsp1 Nyfg== X-Gm-Message-State: AOJu0YynJYsbBbT/qLPf5tPiGkhd8j8eTiFkBwsH8qvK26QzAyrcEE0C 6FhSJP8zzQH67k/bPry1RyFDbAXIWCJL6nOtYcSMSV2OEsZpc2dhpG/lMMhCrWfHIy+vo0BrQp0 bYKjwMA+k++bOtiBloWbv0CY/VbjWDeguMFZCCgqQWEtiIfk7 X-Google-Smtp-Source: AGHT+IH7CPOqRE/1D7xSeBEebIEja07kpnS40xT/3I6z4r5vPuuyB2f+5bo7V2ewGrPUhi7t97R5LdCa/QQVUT5TehY= X-Received: by 2002:aa7:d94c:0:b0:55c:ffe4:9771 with SMTP id l12-20020aa7d94c000000b0055cffe49771mr109613eds.33.1706145877629; Wed, 24 Jan 2024 17:24:37 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202401242205.40OM5Jiq042676@gitrepo.freebsd.org> In-Reply-To: <202401242205.40OM5Jiq042676@gitrepo.freebsd.org> From: Warner Losh Date: Wed, 24 Jan 2024 18:24:26 -0700 Message-ID: Subject: Re: git: 820401bf1769 - main - nl_types.h: explicitly include cdefs.h To: Ed Maste Cc: src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000f8abb3060fbb0aa2" X-Rspamd-Queue-Id: 4TL35h2LqVz45ZF X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] --000000000000f8abb3060fbb0aa2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable This was one of the things i wanted to comment on the that review. This change should be done as a special Linux sys/param.h that includes ctypes.h and then includes the next sys/param.h. A large number of the changes from that review are similar and i wanted yo think through the right solution. This is fragile: I'm likely to remove it again because it violates style(9) and has no docs around it. Warner On Wed, Jan 24, 2024, 3:05=E2=80=AFPM Ed Maste wrote: > The branch main has been updated by emaste: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D820401bf176996e41091d2e4190aded= 12a966b1d > > commit 820401bf176996e41091d2e4190aded12a966b1d > Author: Val Packett > AuthorDate: 2024-01-16 18:42:26 +0000 > Commit: Ed Maste > CommitDate: 2024-01-24 21:59:18 +0000 > > nl_types.h: explicitly include cdefs.h > > This file uses __BEGIN_DECLS/__END_DECLS. When bootstrapping from > Linux/musl, they were missing. > > Sponsored by: https://www.patreon.com/valpackett > Pull Request: https://github.com/freebsd/freebsd-src/pull/1066 > --- > include/nl_types.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/nl_types.h b/include/nl_types.h > index 120d1911631f..6ba15132126d 100644 > --- a/include/nl_types.h > +++ b/include/nl_types.h > @@ -34,6 +34,7 @@ > #ifndef _NL_TYPES_H_ > #define _NL_TYPES_H_ > > +#include > #include > > #ifdef _NLS_PRIVATE > --000000000000f8abb3060fbb0aa2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This was one of the things i wanted to comment on the tha= t review.

This change should b= e done as a special Linux sys/param.h that includes ctypes.h and then inclu= des the next sys/param.h.

A large number of the changes from that review are similar and i wanted y= o think through the right solution.

This is fragile: I'm likely to remove it again because it v= iolates style(9) and has no docs around it.

Warner

On Wed, Jan 24, 2024, 3:05=E2=80=AFPM Ed Ma= ste <emaste@freebsd.org> wr= ote:
The branch main has been updat= ed by emaste:

URL: ht= tps://cgit.FreeBSD.org/src/commit/?id=3D820401bf176996e41091d2e4190aded12a9= 66b1d

commit 820401bf176996e41091d2e4190aded12a966b1d
Author:=C2=A0 =C2=A0 =C2=A0Val Packett <val@packett.cool>
AuthorDate: 2024-01-16 18:42:26 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-01-24 21:59:18 +0000

=C2=A0 =C2=A0 nl_types.h: explicitly include cdefs.h

=C2=A0 =C2=A0 This file uses __BEGIN_DECLS/__END_DECLS. When bootstrapping = from
=C2=A0 =C2=A0 Linux/musl, they were missing.

=C2=A0 =C2=A0 Sponsored by:=C2=A0 =C2=A0https://www.pat= reon.com/valpackett
=C2=A0 =C2=A0 Pull Request:=C2=A0 =C2=A0h= ttps://github.com/freebsd/freebsd-src/pull/1066
---
=C2=A0include/nl_types.h | 1 +
=C2=A01 file changed, 1 insertion(+)

diff --git a/include/nl_types.h b/include/nl_types.h
index 120d1911631f..6ba15132126d 100644
--- a/include/nl_types.h
+++ b/include/nl_types.h
@@ -34,6 +34,7 @@
=C2=A0#ifndef _NL_TYPES_H_
=C2=A0#define _NL_TYPES_H_

+#include <sys/cdefs.h>
=C2=A0#include <sys/types.h>

=C2=A0#ifdef _NLS_PRIVATE
--000000000000f8abb3060fbb0aa2-- From nobody Thu Jan 25 02:22:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TL4NZ1Fxcz57Sjx for ; Thu, 25 Jan 2024 02:22:38 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TL4NY63Gjz4BKt for ; Thu, 25 Jan 2024 02:22:37 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-40ececef212so2365775e9.1 for ; Wed, 24 Jan 2024 18:22:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706149356; x=1706754156; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=006BSzGf6TfM6ZXwSJ8MVdf7bc8AiX7YXo4HiYWOuvk=; b=NMiyP/zi0BsRqPfnznx28+56YRYw7dk6pkVWjhrK7ngLZUz7wOvSJq5B7kBjtdmJwG SkERLu3ONRxUF6L1c3THAnpG/d5G5AExD58BUiH1X4aWqUpZdYzTkhoYB9XbDHyaVydl umbuzdlN4/e5HPHDzPJpNXBiKWmIMkx/Rvu3oT3jmF2NxETe3qkOuHSlQD+ileUUCER9 fvElcC4aHohbyyKFHBUTw/qhD+6GVFMrZ7ipsoyWHgtBVeOybxiEHlMxb99Fke+bEqag u1Dvv90+x0mnknmZuMKSFT+43hwdS5s/74GN/UpzluSh04n10s1Dg8E2Ebyh3BhU7t8K mdYg== X-Gm-Message-State: AOJu0YxoPfI9ZhAhcp/mVDy85tAqkNgeeRwZOgex/JiC3T4QDURR8I5j G745XuivBWCyPAgx59Wl15lSsBeCjCb2QilK9nBh1IvDIHXF3xHcJNbfoAYp2HY= X-Google-Smtp-Source: AGHT+IHPHRFh9Am+oJUAsmiprZzg3/VrCsg7zPatuS5FkqHaLcy+s+a/+r2p6uKW5EVQkYatugMaSQ== X-Received: by 2002:a05:600c:2248:b0:40e:615f:32cc with SMTP id a8-20020a05600c224800b0040e615f32ccmr72311wmm.185.1706149355647; Wed, 24 Jan 2024 18:22:35 -0800 (PST) Received: from smtpclient.apple ([131.111.5.246]) by smtp.gmail.com with ESMTPSA id v19-20020a05600c445300b0040d6d755c90sm825338wmn.42.2024.01.24.18.22.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jan 2024 18:22:35 -0800 (PST) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.200.91.1.1\)) Subject: Re: git: 820401bf1769 - main - nl_types.h: explicitly include cdefs.h From: Jessica Clarke In-Reply-To: Date: Thu, 25 Jan 2024 02:22:24 +0000 Cc: Ed Maste , src-committers , "" , "" Content-Transfer-Encoding: quoted-printable Message-Id: <549CBD3B-51AA-4BDE-A987-8E98BF1EE8C0@freebsd.org> References: <202401242205.40OM5Jiq042676@gitrepo.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.3774.200.91.1.1) X-Rspamd-Queue-Id: 4TL4NY63Gjz4BKt X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] On 25 Jan 2024, at 01:24, Warner Losh wrote: >=20 > This was one of the things i wanted to comment on the that review. >=20 > This change should be done as a special Linux sys/param.h that = includes ctypes.h and then includes the next sys/param.h. >=20 > A large number of the changes from that review are similar and i = wanted yo think through the right solution. >=20 > This is fragile: I'm likely to remove it again because it violates = style(9) and has no docs around it. Agreed this is wrong. If it were in tools/build/cross-build I wouldn=E2=80= =99t care about that, but this is base, and the whole point of the cross-build infrastructure is to not have to change base, especially system headers, wherever possible. This is the perfect example of the kind of thing that the cross-build compat headers are meant to fix. So yeah, please revert this someone, else I will. Jess > Warner >=20 > On Wed, Jan 24, 2024, 3:05=E2=80=AFPM Ed Maste = wrote: > The branch main has been updated by emaste: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D820401bf176996e41091d2e4190aded1= 2a966b1d >=20 > commit 820401bf176996e41091d2e4190aded12a966b1d > Author: Val Packett > AuthorDate: 2024-01-16 18:42:26 +0000 > Commit: Ed Maste > CommitDate: 2024-01-24 21:59:18 +0000 >=20 > nl_types.h: explicitly include cdefs.h >=20 > This file uses __BEGIN_DECLS/__END_DECLS. When bootstrapping from > Linux/musl, they were missing. >=20 > Sponsored by: https://www.patreon.com/valpackett > Pull Request: https://github.com/freebsd/freebsd-src/pull/1066 > --- > include/nl_types.h | 1 + > 1 file changed, 1 insertion(+) >=20 > diff --git a/include/nl_types.h b/include/nl_types.h > index 120d1911631f..6ba15132126d 100644 > --- a/include/nl_types.h > +++ b/include/nl_types.h > @@ -34,6 +34,7 @@ > #ifndef _NL_TYPES_H_ > #define _NL_TYPES_H_ >=20 > +#include > #include >=20 > #ifdef _NLS_PRIVATE From nobody Thu Jan 25 03:51:02 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TL6LZ4SD2z57cSm; Thu, 25 Jan 2024 03:51: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 4TL6LZ427Zz4Mcv; Thu, 25 Jan 2024 03:51:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706154662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8cAp16xwaxd26NbDdpA7RcQlLCR5akFEQbIpOP4K0Zc=; b=bDd+bMAcfeMWDrD1quiGxc0iHMi4W5BjZOsmX/GfIYEwD2vDQ0Igbr/jVWrYf49bJ2pjC5 dxGEiHCdOzCvbLThZxO6TX/w7vpd06IvgI0/5U2p3jlYr+BnH/oiS5AxfNJ5AosDxKJprU lO402ZBVjXVyl4RIi5jkg01IyN2TKmgGmBEurATcannvxwodqfuUB9dps1tkLAKgx3UFD+ pICOvB0kM17d7w6Wn2c4GRxiujBlBThwxZk6KXNj/XHQgYHFqfwpvf5vyIBVuA3RWhN7TV YAv0a1M4XwDhaUd0wx48t3Pbj2PBjKHRKGYmTmpHlXfDPI+GUBSkK3ZRYBTB7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706154662; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8cAp16xwaxd26NbDdpA7RcQlLCR5akFEQbIpOP4K0Zc=; b=BUn0H0OsrnYP4usMyCwZ2T12o2jErDhnxxzn8CXFlIr35PJvg94ahdtrDfmBZoz47fKY2R ua7sZw68bTe3EtELpmaLK6DjoNuPlmPItY0WAl5oTsFcNCUE2ExvtoxWM2iKcDdt3S63vR tOPcj0uuBNYHRnuwX7SlfpgIx5OOPkSZTRE7uHx+1Q7rT5jcJQK8/6FIJkByTQsAgQTrnV BNtjaN3r6YHVDocGKOUJYcLGurGmwF+ZIJY3D0qqQPMABpRpzIUAShNASfageL6P3jmrZq Fly7939mOZubZduFu+zi4r80LogD9zDEFC/+VX2i2DRmcAav7ki6g8nbwkvygg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706154662; a=rsa-sha256; cv=none; b=lPXvPiGjjVjo8cdZ0LNizMUyMpjnrw+CS449iT8613S59k8HRMCJwpIf8v/vidnWUsUqXm JuL+PyrakuGf3uHJz84pgoZCUM1sQDUj362Dduw2SH92BuGSBbKBC/M03ff+e+I8W8ykzo 0YMPQAmR4zI49UMWyuyPFt9Iixw/bI3Jct+aE6hQbXWo18+FxnlzrRmjyb0gbykEvmjqUN JxE+gzPi+8FPRZHEJn//1ht29QVjqFFDeDNvIJqVMsTogSx3GgliSewbzojpYoKF07u0Pq baju1LLF/2ClP61iqvGR1YrdYA6EqZNTbde/mz28/nrBNbHs8Rn/7g3QMD6X2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TL6LZ36SQzjKb; Thu, 25 Jan 2024 03:51: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 40P3p2x4023678; Thu, 25 Jan 2024 03:51:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40P3p2on023675; Thu, 25 Jan 2024 03:51:02 GMT (envelope-from git) Date: Thu, 25 Jan 2024 03:51:02 GMT Message-Id: <202401250351.40P3p2on023675@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: fbd156d78fbd - main - Revert "nl_types.h: explicitly include cdefs.h" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fbd156d78fbdc5e1984afe4d83436b624e7a1f01 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=fbd156d78fbdc5e1984afe4d83436b624e7a1f01 commit fbd156d78fbdc5e1984afe4d83436b624e7a1f01 Author: Ed Maste AuthorDate: 2024-01-25 03:49:45 +0000 Commit: Ed Maste CommitDate: 2024-01-25 03:50:49 +0000 Revert "nl_types.h: explicitly include cdefs.h" This isn't the right approach for addressing this cross-build issue. This reverts commit 820401bf176996e41091d2e4190aded12a966b1d. --- include/nl_types.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/nl_types.h b/include/nl_types.h index 6ba15132126d..120d1911631f 100644 --- a/include/nl_types.h +++ b/include/nl_types.h @@ -34,7 +34,6 @@ #ifndef _NL_TYPES_H_ #define _NL_TYPES_H_ -#include #include #ifdef _NLS_PRIVATE From nobody Thu Jan 25 04:48:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TL7cf4MLqz57hw1 for ; Thu, 25 Jan 2024 04:48:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TL7cf1kFyz4TF6 for ; Thu, 25 Jan 2024 04:48:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-55d0031d8b5so123429a12.2 for ; Wed, 24 Jan 2024 20:48:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1706158095; x=1706762895; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ynlZHQrk9q3PTTxCn2DnIFkSiQSQ95mmWMqHx7YZrjQ=; b=UbgVwnG3WqH4T3Ry23Ck2bAPeQxHoBKREvqKtI/shl6T+kF61AbFAod5LKuqxGNWhQ xTrb5HaMp0wDw//niRwPGi9TMKKT16/WT0l4MWbmHbkJdD5QwdVSfI4x0I2FbGYAiehE 2G8L9/V3IW1E/OINpkEnGBE7bxNKgQlw2q1+nton7gqSIMpSL24snOgG74WFiEDFFI/X tO8CmGoJdjkDCN0KuptD0j8Vu8K4PO+RGzN4aNOciVajyAEzjp0vBi5+rKtJ3FAUF5Hh mkjWS3vppk2NpEhMcc1+xq6zMNuVQZ1QEAJT4dmzAbcDoj1pf63IrXfapk8WOfK+N2Ux vXNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706158095; x=1706762895; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ynlZHQrk9q3PTTxCn2DnIFkSiQSQ95mmWMqHx7YZrjQ=; b=ivnfh+fYDdwRgQSl594t6R0L5f0ulOZkpD6Cq1nIxEDbVrEIcXA080cyEt4e44cbjy q6h2x+C31PsZx2Td0ZYNx8seRffuwdbr0p6ulCdQLIDJxB/88JGa1uMV99NqMFBrqmhA UckjmvdPigRHMRSQC8M3Hob4wJIj4fd++nnCibDf37xFFNHOwOsKxxSqlN7CkVeIAzha 5gpfeLBVK4oFaNCymtXfhGKfG3KQSYODca05LOQzRDdZ+hbmdIFIXokiIEANcxbss2KG QdVuYuvUZF2M0N0azhItoQetzhoCGy0Q8XeTHbIo9lLRgGm3nBTQpoj9APIYiLzH9Fx5 f6iA== X-Gm-Message-State: AOJu0YwVXD2wfM0y4IIXVq5yjZKbjaxBylH+W05UthEWJFuzA9UvHwsd 5McCqIuUQkfYjo4YuPcf3xErjMDD3d/VygDXxC2E9TEWS77j+uFT+/q5Hb0PVoPuwsLD7/DOTtN m4/IyVQKEIUsVEhilGGUiuS+2XQZQXiCgsgR/bQ== X-Google-Smtp-Source: AGHT+IGCvM5K5fxfq+m69F2ZkkCMHAmdx2MmMsNJTUy8tMDUUBryQWpYEkWuw6FaxM8s7ycetJDy+WXTtvu1h4rscLY= X-Received: by 2002:aa7:c554:0:b0:55c:210b:7503 with SMTP id s20-20020aa7c554000000b0055c210b7503mr236406edr.45.1706158095105; Wed, 24 Jan 2024 20:48:15 -0800 (PST) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202401250351.40P3p2on023675@gitrepo.freebsd.org> In-Reply-To: <202401250351.40P3p2on023675@gitrepo.freebsd.org> From: Warner Losh Date: Wed, 24 Jan 2024 21:48:03 -0700 Message-ID: Subject: Re: git: fbd156d78fbd - main - Revert "nl_types.h: explicitly include cdefs.h" To: Ed Maste Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000030a393060fbde35b" X-Rspamd-Queue-Id: 4TL7cf1kFyz4TF6 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] --00000000000030a393060fbde35b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks Ed... I think that diff --git a/tools/build/cross-build/include/linux/sys/types.h b/tools/build/cross-build/include/linux/sys/types.h index 770b3057f8a8..e72e1419bccd 100644 --- a/tools/build/cross-build/include/linux/sys/types.h +++ b/tools/build/cross-build/include/linux/sys/types.h @@ -35,6 +35,11 @@ */ #pragma once +/* + * FreeBSD's types.h always includes sys/cdefs.h, but Linux headers often don't. + */ +#include + #include_next #ifndef __size_t will filx the problem, but I can't test things easily enough. Warner On Wed, Jan 24, 2024 at 8:51=E2=80=AFPM Ed Maste wrote= : > The branch main has been updated by emaste: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3Dfbd156d78fbdc5e1984afe4d83436b6= 24e7a1f01 > > commit fbd156d78fbdc5e1984afe4d83436b624e7a1f01 > Author: Ed Maste > AuthorDate: 2024-01-25 03:49:45 +0000 > Commit: Ed Maste > CommitDate: 2024-01-25 03:50:49 +0000 > > Revert "nl_types.h: explicitly include cdefs.h" > > This isn't the right approach for addressing this cross-build issue. > > This reverts commit 820401bf176996e41091d2e4190aded12a966b1d. > --- > include/nl_types.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/include/nl_types.h b/include/nl_types.h > index 6ba15132126d..120d1911631f 100644 > --- a/include/nl_types.h > +++ b/include/nl_types.h > @@ -34,7 +34,6 @@ > #ifndef _NL_TYPES_H_ > #define _NL_TYPES_H_ > > -#include > #include > > #ifdef _NLS_PRIVATE > --00000000000030a393060fbde35b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks Ed...

I think that

diff --git a/tools/build/cross-build/include/linux/s= ys/types.h b/tools/build/cross-build/include/linux/sys/types.h
index 770= b3057f8a8..e72e1419bccd 100644
--- a/tools/build/cross-build/include/lin= ux/sys/types.h
+++ b/tools/build/cross-build/include/linux/sys/types.h@@ -35,6 +35,11 @@
=C2=A0 */
=C2=A0#pragma once
=C2=A0
+/*+ * FreeBSD's types.h always includes sys/cdefs.h, but Linux headers o= ften don't.
+ */
+#include <sys/cdefs.h>
+
=C2=A0#inc= lude_next <sys/types.h>
=C2=A0
=C2=A0#ifndef __size_t

will filx the problem, but I can't test things easily e= nough.

Warner

On Wed, Jan 24, 2024 at 8:5= 1=E2=80=AFPM Ed Maste <emaste@free= bsd.org> wrote:
The branch main has been updated by emaste:

URL: https://cgit.= FreeBSD.org/src/commit/?id=3Dfbd156d78fbdc5e1984afe4d83436b624e7a1f01
commit fbd156d78fbdc5e1984afe4d83436b624e7a1f01
Author:=C2=A0 =C2=A0 =C2=A0Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2024-01-25 03:49:45 +0000
Commit:=C2=A0 =C2=A0 =C2=A0Ed Maste <emaste@FreeBSD.org>
CommitDate: 2024-01-25 03:50:49 +0000

=C2=A0 =C2=A0 Revert "nl_types.h: explicitly include cdefs.h"

=C2=A0 =C2=A0 This isn't the right approach for addressing this cross-b= uild issue.

=C2=A0 =C2=A0 This reverts commit 820401bf176996e41091d2e4190aded12a966b1d.=
---
=C2=A0include/nl_types.h | 1 -
=C2=A01 file changed, 1 deletion(-)

diff --git a/include/nl_types.h b/include/nl_types.h
index 6ba15132126d..120d1911631f 100644
--- a/include/nl_types.h
+++ b/include/nl_types.h
@@ -34,7 +34,6 @@
=C2=A0#ifndef _NL_TYPES_H_
=C2=A0#define _NL_TYPES_H_

-#include <sys/cdefs.h>
=C2=A0#include <sys/types.h>

=C2=A0#ifdef _NLS_PRIVATE
--00000000000030a393060fbde35b-- From nobody Thu Jan 25 07:20:14 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TLBzz2pDHz57xqv; Thu, 25 Jan 2024 07:20: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 4TLBzz14mwz40D3; Thu, 25 Jan 2024 07:20:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706167215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5rIcaMVCA2K+TzXA88M/V0KuU9256GI6g/Q58fQJbBk=; b=uSquPOxyqeqVkKDoIkZDThT3ACj1yV7NTCAS6fIQA15UG8ogEUbUlno0WMdCBHH2eHXjaW 1tC7mduMstM+9mSSzkLmpSTBbtGEzwm0yHUfIHnYu8xExZVfgND38Wnfe470/9uAqn3Xe8 VbPR7/ASxz0DQ4TDCAlU7jCyzK6ohlPgGFFOFVsnzzFHcjp97+rPLMaR0O8y9Hqwpz9Xn7 wnSC414e5sQcgrS4yDllL5ORzl49RP4+Nx1GuFBPHBgqM4JrdGarNf3FIb+mRr+/6Ykx1U PKiEmgSgJ+h+TEVdlaGUdXsIuZrNkYYiacBKI9OkknwO5Om+8qAAPQLaN4bv3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706167215; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5rIcaMVCA2K+TzXA88M/V0KuU9256GI6g/Q58fQJbBk=; b=DxAmTzMSQ8MHBPGFjzaOE5N4f/NzhFJSny8D054/tKvcNjf9u/ImxKYzP4OY+czjCxdqtb 67R6Sjckixs4pSJz5keZeMM/Ci/CH8NmIzUOomPuXQ0WiyxAS+iUr8MCRPUUjg7+5qzkoE 6PRTiBvNpOoO8RiLvkoMhpVo66AGKMmpgHeFyy0HTL5c2vonTckI/2Exlr2fDtySzqiChR wBA06/rWBYyq1TRK1r80sU1/IqJUktd1TtC8XpihlHPoBP9rJlyp7Dobv9/L9iYAsOaBxQ F9goN8bRor9HQtE6gftjjF29vfi7gYccBIopMorc+m7zDGa28wGe8veaUiRkng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706167215; a=rsa-sha256; cv=none; b=Er9e4yvvoIHC19BzibVUhhRV7MN+jpud4aVngyulKr1APYakRZQCzhq4ujxXR9VN/Em4hz iccKEqJ1l6wglB1zgF34DSK6nFHPrqUnnBOoDOWrOToM/mA38k9E4i2Du2vLyHE559+sPQ eyiC8O4Yf/r/asCTNjtC8+fBZZHrz9zIOVVlkaBwh6aA6/vOFyrr4mrGCHEFNSWj+vuPxJ 24GkjpnLi8KHOPGmTjg3lOJrlDC0mJOUJ3EK/LcvbnFfem2lvSMup70IEBZuca9SC6NMHC qsxbZ4AEJd0mwruoqJ6jsJkLEUEEvGUVGAL6wdXWsmOklOfZ85iFucQ5S7YHxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TLBzz0B0Fzp7Z; Thu, 25 Jan 2024 07:20: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 40P7KEYN076898; Thu, 25 Jan 2024 07:20:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40P7KEhu076891; Thu, 25 Jan 2024 07:20:14 GMT (envelope-from git) Date: Thu, 25 Jan 2024 07:20:14 GMT Message-Id: <202401250720.40P7KEhu076891@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider Subject: git: b8a484ec343d - main - man: support special characters in filenames List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b8a484ec343d163a40f7cf4a6026e880f992c738 Auto-Submitted: auto-generated The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=b8a484ec343d163a40f7cf4a6026e880f992c738 commit b8a484ec343d163a40f7cf4a6026e880f992c738 Author: Wolfram Schneider AuthorDate: 2024-01-25 07:14:06 +0000 Commit: Wolfram Schneider CommitDate: 2024-01-25 07:14:06 +0000 man: support special characters in filenames man.sh needs to handle double quotes and sub shell character as '`' '$' etc. PR: 275967 Reviewed by: bapt MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D43453 --- usr.bin/man/man.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index efb05603f912..4be38083462c 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -349,7 +349,7 @@ man_display_page() { decho "Command: $cattool \"$catpage\" | $MANPAGER" ret=0 else - eval "$cattool \"$catpage\" | $MANPAGER" + $cattool "$catpage" | $MANPAGER ret=$? fi fi @@ -374,7 +374,7 @@ man_display_page() { pipeline="mandoc $mandoc_args | $MANPAGER" fi - if ! eval "$cattool \"$manpage\" | $testline" ;then + if ! $cattool "$manpage" | eval "$testline"; then if which -s groff; then man_display_page_groff else @@ -387,10 +387,10 @@ man_display_page() { fi if [ $debug -gt 0 ]; then - decho "Command: $cattool \"$manpage\" | $pipeline" + decho "Command: $cattool \"$manpage\" | eval \"$pipeline\"" ret=0 else - eval "$cattool \"$manpage\" | $pipeline" + $cattool "$manpage" | eval "$pipeline" ret=$? fi } @@ -480,10 +480,10 @@ man_display_page_groff() { fi if [ $debug -gt 0 ]; then - decho "Command: $cattool \"$manpage\" | $pipeline" + decho "Command: $cattool \"$manpage\" | eval \"$pipeline\"" ret=0 else - eval "$cattool \"$manpage\" | $pipeline" + $cattool "$manpage" | eval "$pipeline" ret=$? fi } From nobody Thu Jan 25 17:08:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TLS2d1X1Mz57dXH; Thu, 25 Jan 2024 17:08: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 4TLS2d0wHCz59P2; Thu, 25 Jan 2024 17:08:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706202505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SwmkBUZjrJzUQZmCVPjXq4rnIIjvCVzo7eorz82m8ls=; b=m9qpexH+5yCQSVf5JplVblBjCPoGHZRx8qcVe6ghNM6CXaAigMDpScvSGog492whpAjYBH /WtQtmVuXPr3KMiTn48+v7cHcAMa4za88cI/vnv+iwW5qnHFQcdcDoJSvaVQl0RrSsZYdK YKt1aEWFAF6vfAeWp+9LGcEFT3xdl1QJBdTRq9wEZCorYUf4wbu8mESM7/Nr+2UDvyx+RC vnB4nTZVLfk796CcJf5MMPo73Cg1BEA0MMu5MZPSqnBvy+FFDjhh1cEHbN8nl4VFnkmhLl OA773VKegwEQyDWX26FM7ZY06qeODDEkQMfSZuSsa916lLogf/pHBgPkpsT/Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706202505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SwmkBUZjrJzUQZmCVPjXq4rnIIjvCVzo7eorz82m8ls=; b=kEgpeRkoAVfkPa9mAsAorCFNxtGR954eWz9Cm+cRGb7ZlpZOFv6SbPi3A0FngxeJ/dB+tW Gbyrf4z/gUqgJ/blEJh+tWuD0N9eHp9fUrNpbCgMrlD5JdGPXO598ONs/RVQDtp7PBlbUq Ukzr7x+jz5u1fagcNNSVIlmSdXckFMfDdWtrb5Jo22jzEVJJ5VvMlak9iy7v3XcG1tShxC py2ghQpMEPPfPY5QJNBApo+JN5HZGVD5HV1NqZ8oQMes/fL/1oyHYl7INDEpEE9USRih95 TmdTfiOtwms6XjOZqq4LqSyl2c6w2hEN7xUYURx6qjTwtxNPSPnuvzRZJ32dYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706202505; a=rsa-sha256; cv=none; b=cSyUDI4SQV/jSEHqrOBMSF0tURrP2jWgn1Ly4xS1nm6TzuqYkrrT6eYhZcTuL3ZlYGbiw0 fxKwsW2nIa8i0x25dia+qmBZEhe6B702uGu2ML68UhqFwPR4D1nTmVIFFqn9XxiUrdnnn+ 4DtfdixcOcBQoikG2Fbmd+g5LD28Y0icpfjvO2IKT4spkVNRwwIviOP5jqHVlsj7jsjMmf wregpyBPGKYgsvW3daGK5X7jxGQwubq1ED33b0BkB13uVvA8iFqig41jsptUDlhHI6NDpV me24w2BnRsuDUmEONYr7L0+y5aUPLY3YWmhzJ2wvrSO3vpNM56b6f+tYH1kXSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TLS2d01f2z15kl; Thu, 25 Jan 2024 17:08: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 40PH8OHv060523; Thu, 25 Jan 2024 17:08:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40PH8OTb060520; Thu, 25 Jan 2024 17:08:24 GMT (envelope-from git) Date: Thu, 25 Jan 2024 17:08:24 GMT Message-Id: <202401251708.40PH8OTb060520@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: e95025ed9388 - main - pflow: show socket status in verbose mode List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e95025ed93886dc854c2c92a2d2812cb51abf4ed Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e95025ed93886dc854c2c92a2d2812cb51abf4ed commit e95025ed93886dc854c2c92a2d2812cb51abf4ed Author: Kristof Provost AuthorDate: 2024-01-25 16:37:51 +0000 Commit: Kristof Provost CommitDate: 2024-01-25 16:37:51 +0000 pflow: show socket status in verbose mode Introduce a verbose output mode to pflowctl, and expose the status of the socket to userspace. This can be helpful in debugging configuration errors. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pflowctl/pflowctl.8 | 5 ++++- sbin/pflowctl/pflowctl.c | 52 ++++++++++++++++++++++++++++++++++++++++++------ sys/net/pflow.h | 3 ++- sys/netpfil/pf/pflow.c | 1 + 4 files changed, 53 insertions(+), 8 deletions(-) diff --git a/sbin/pflowctl/pflowctl.8 b/sbin/pflowctl/pflowctl.8 index 446679486db6..8c4142f31396 100644 --- a/sbin/pflowctl/pflowctl.8 +++ b/sbin/pflowctl/pflowctl.8 @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: January 08 2024 $ +.Dd $Mdocdate: January 25 2024 $ .Dt PFLOWCTL 8 .Os .Sh NAME @@ -24,6 +24,7 @@ .Sh SYNOPSIS .Nm pflowctl .Bk -words +.Op Fl v .Op Fl lc .Op Fl d Ar id .Op Fl s Ar id ... @@ -40,6 +41,8 @@ The utility provides several commands. The options are as follows: .Bl -tag -width Ds +.It Fl v +Produce verbose output. .It Fl c Create a new .Xr pflow 4 diff --git a/sbin/pflowctl/pflowctl.c b/sbin/pflowctl/pflowctl.c index e5dd3df7e6a7..f6ca8980db1b 100644 --- a/sbin/pflowctl/pflowctl.c +++ b/sbin/pflowctl/pflowctl.c @@ -47,13 +47,15 @@ static int get(int id); +static bool verbose = false; + extern char *__progname; static void usage(void) { fprintf(stderr, -"usage: %s [-lc] [-d id] [-s id ...]\n", +"usage: %s [-lc] [-d id] [-s id ...] [-v]\n", __progname); exit(1); @@ -253,6 +255,7 @@ struct pflowctl_get { struct pflowctl_sockaddr src; struct pflowctl_sockaddr dst; uint32_t obs_dom; + uint8_t so_status; }; #define _IN(_field) offsetof(struct genlmsghdr, _field) #define _OUT(_field) offsetof(struct pflowctl_get, _field) @@ -262,6 +265,7 @@ static struct snl_attr_parser ap_get[] = { { .type = PFLOWNL_GET_SRC, .off = _OUT(src), .arg = &sockaddr_parser, .cb = snl_attr_get_nested }, { .type = PFLOWNL_GET_DST, .off = _OUT(dst), .arg = &sockaddr_parser, .cb = snl_attr_get_nested }, { .type = PFLOWNL_GET_OBSERVATION_DOMAIN, .off = _OUT(obs_dom), .cb = snl_attr_get_uint32 }, + { .type = PFLOWNL_GET_SOCKET_STATUS, .off = _OUT(so_status), .cb = snl_attr_get_uint8 }, }; static struct snl_field_parser fp_get[] = {}; #undef _IN @@ -344,6 +348,10 @@ get(int id) print_sockaddr(" src ", &g.src.storage); print_sockaddr(" dst ", &g.dst.storage); printf("\n"); + if (verbose) { + printf("\tsocket: %s\n", + g.so_status ? "connected" : "disconnected"); + } } if (e.error) @@ -533,10 +541,20 @@ static const struct snl_hdr_parser *all_parsers[] = { &get_parser, }; +enum pflowctl_op_t { + OP_HELP, + OP_LIST, + OP_CREATE, + OP_DELETE, + OP_SET, +}; int main(int argc, char *argv[]) { int ch; + enum pflowctl_op_t op = OP_HELP; + char **set_args = NULL; + size_t set_arg_count = 0; SNL_VERIFY_PARSERS(all_parsers); @@ -544,18 +562,40 @@ main(int argc, char *argv[]) usage(); while ((ch = getopt(argc, argv, - "lcd:s:")) != -1) { + "lcd:s:v")) != -1) { switch (ch) { case 'l': - return (list()); + op = OP_LIST; + break; case 'c': - return (create()); + op = OP_CREATE; + break; case 'd': - return (del(optarg)); + op = OP_DELETE; + break; case 's': - return (set(optarg, argc - optind, argv + optind)); + op = OP_SET; + set_arg_count = argc - optind; + set_args = argv + optind; + case 'v': + verbose = true; + break; } } + switch (op) { + case OP_LIST: + return (list()); + case OP_CREATE: + return (create()); + case OP_DELETE: + return (del(optarg)); + case OP_SET: + return (set(optarg, set_arg_count, set_args)); + case OP_HELP: + usage(); + break; + } + return (0); } diff --git a/sys/net/pflow.h b/sys/net/pflow.h index 4c194e14e001..ee747d1a6a46 100644 --- a/sys/net/pflow.h +++ b/sys/net/pflow.h @@ -362,7 +362,8 @@ enum pflow_get_type_t { PFLOWNL_GET_VERSION = 2, /* u16 */ PFLOWNL_GET_SRC = 3, /* struct sockaddr_storage */ PFLOWNL_GET_DST = 4, /* struct sockaddr_storage */ - PFLOWNL_GET_OBSERVATION_DOMAIN = 5, /* u32 */ + PFLOWNL_GET_OBSERVATION_DOMAIN = 5, /* u32 */ + PFLOWNL_GET_SOCKET_STATUS = 6, /* u8 */ }; enum pflow_set_type_t { diff --git a/sys/netpfil/pf/pflow.c b/sys/netpfil/pf/pflow.c index 17a68e0d9e57..f3dba7687d05 100644 --- a/sys/netpfil/pf/pflow.c +++ b/sys/netpfil/pf/pflow.c @@ -1485,6 +1485,7 @@ pflow_nl_get(struct nlmsghdr *hdr, struct nl_pstate *npt) nlattr_add_sockaddr(nw, PFLOWNL_GET_DST, sc->sc_flowdst); nlattr_add_u32(nw, PFLOWNL_GET_OBSERVATION_DOMAIN, sc->sc_observation_dom); + nlattr_add_u8(nw, PFLOWNL_GET_SOCKET_STATUS, sc->so != NULL); if (! nlmsg_end(nw)) { nlmsg_abort(nw); From nobody Thu Jan 25 17:44:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TLSqy2xrkz57hTw; Thu, 25 Jan 2024 17:44: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 4TLSqy1sF3z43Cr; Thu, 25 Jan 2024 17:44:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706204654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jtdC0QW/Z4VjTCtB66xzAg3M5QlT8Jla3vxGkXg02QQ=; b=IAIjjsLH+iVDGU3f8lqcQsx2pApLqEp+XTGzPvPYhRiePYLK7EJfSWbyDCH1db0C3xpBqk GZ8Mh7BS2iTTH890IlNhqEdRpZZBIuAv8vvlMM9hcr1P4rVcxb7nyX7w0OcxjKn1CNnhnS onuNF882ok2Z7sF2tpKUXTF0k082PgWabTg6l1zAXrZpiQJdIyojvtyam9aoPRcmoSUGTQ B9oQfzFt2irr3DUAvByhYh7wpMTrvyoaXavKIEqDVJefRjjpcJYeKB2hfi6hsgMu4Yhyjm +5oCQt/0fGeFjM/YDpsw5E8OVx8/+L9SZqSMF1bDZ/wxT8Mi56z9NsfIWc4btg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706204654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jtdC0QW/Z4VjTCtB66xzAg3M5QlT8Jla3vxGkXg02QQ=; b=MEQQyV5USnOzUH3hickS6BOu1iKJkmxPue4YfEh9jqVmjJuoTDSsJHsj0L5fPKeseWiGEJ aeyVFU7zYm71bsPGjjcr/QZKqzeXKfUbwjk3AgIFD77oCT1kllBUgIWTgvRmhHrdTILlBT 9IOSktQUNo9p4hpBoVmpb4fvDuC/nCdH7SCPAidKD6MU4yXlGamDW6Vy30jYYpWmtxBoqB RR0iAnoqvwN4qyEjGpxxkrs+/E/fd3EPcrX/sE6zN+wokKBD83lXrbPniVCvOBk4l5Rl84 XXq5SFU/qsLHmvj7Hsz/ZB7LBqWMpgc/B5cSdZSGq/+Y7iia9Tn6jW95M0qFgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706204654; a=rsa-sha256; cv=none; b=G4ll5/o7yJE2lkw4ThjqwZvlgZlB/3z6uDabymzr/ND7TFKhZmnmAMDSerAdazaHeVOkLe BIsOd0rWTKVcJ8U7C9z6l7ryBoY2XQ7uPpfhWMxSwOEHUUMhgbjngblrZFMZX2w/kjrDsA V4ArReGOBmT7EPd4mcx4SH//OTXiJKMlGjDjcAdalgBsKseH9qM+Z541it24PleGOKRjTz lQL1Z24RfO8h+tG6lwG0c8SnCd4CTEulFw+tgr1dTiS5UXRtDT1PF7sQJPICat5ukDnfIo 97H3aLznWHKwyXnir3zAIt/fTVwl/kLFiTzvDgHPKGBxynmw0YnqBLrgcV+Agw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TLSqy0w0Dz16GD; Thu, 25 Jan 2024 17:44: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 40PHiEU5027803; Thu, 25 Jan 2024 17:44:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40PHi9N8027797; Thu, 25 Jan 2024 17:44:09 GMT (envelope-from git) Date: Thu, 25 Jan 2024 17:44:09 GMT Message-Id: <202401251744.40PHi9N8027797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: ecf410623750 - main - Merge libcxxrt master 03c83f5a57be8c5b1a29a68de5638744f17d28ba List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ecf4106237505fa9459ae871793b754334989c17 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ecf4106237505fa9459ae871793b754334989c17 commit ecf4106237505fa9459ae871793b754334989c17 Merge: e95025ed9388 156745f57594 Author: Dimitry Andric AuthorDate: 2024-01-25 17:41:44 +0000 Commit: Dimitry Andric CommitDate: 2024-01-25 17:43:23 +0000 Merge libcxxrt master 03c83f5a57be8c5b1a29a68de5638744f17d28ba Interesting fixes (* were already cherry-picked): - 03c83f5 add __cxa_init_primary_exception (#23) * 5d8a158 Fix two bugs in __cxa_end_cleanup() * b00c6c5 Insert padding in __cxa_dependent_exception * 45ca8b1 Insert padding in __cxa_exception struct for compatibility * f2e5509 Fix unlock in two-word version and add missing comment. - 6229590 Add an option for disabling emergency buffers. (#14) MFC after: 2 weeks contrib/libcxxrt/cxxabi.h | 8 ++++++++ contrib/libcxxrt/exception.cc | 44 +++++++++++++++++++++++++++++++++++-------- lib/libcxxrt/Version.map | 4 ++++ 3 files changed, 48 insertions(+), 8 deletions(-) diff --cc lib/libcxxrt/Version.map index 0d2dccbe2670,000000000000..a54b6a4daad5 mode 100644,000000..100644 --- a/lib/libcxxrt/Version.map +++ b/lib/libcxxrt/Version.map @@@ -1,394 -1,0 +1,398 @@@ +# Define the same version as the libsupc++ from gcc 4.2.1 so that we can use +# libcxxrt as a drop-in replacement. + +CXXABI_1.3 { + + global: + + # ABI functions with C linkage + __cxa_allocate_exception; + __cxa_bad_cast; + __cxa_bad_typeid; + __cxa_begin_catch; + __cxa_begin_cleanup; + __cxa_call_unexpected; + __cxa_current_exception_type; + __cxa_demangle; + __cxa_end_catch; + __cxa_end_cleanup; + __cxa_free_exception; + __cxa_get_globals; + __cxa_get_globals_fast; + __cxa_guard_abort; + __cxa_guard_acquire; + __cxa_guard_release; + __cxa_pure_virtual; + __cxa_rethrow; + __cxa_throw; + __cxa_throw_bad_array_new_length; + __cxa_type_match; + __cxa_vec_cctor; + __cxa_vec_cleanup; + __cxa_vec_ctor; + __cxa_vec_delete2; + __cxa_vec_delete3; + __cxa_vec_delete; + __cxa_vec_dtor; + __cxa_vec_new2; + __cxa_vec_new3; + __cxa_vec_new; + __dynamic_cast; + __gxx_personality_sj0; + __gxx_personality_v0; + + extern "C++" { + # Type info classes and their destructors + "__cxxabiv1::__array_type_info"; + "__cxxabiv1::__array_type_info::~__array_type_info()"; + "__cxxabiv1::__class_type_info"; + "__cxxabiv1::__class_type_info::~__class_type_info()"; + "__cxxabiv1::__enum_type_info"; + "__cxxabiv1::__enum_type_info::~__enum_type_info()"; + "__cxxabiv1::__function_type_info::"; + "__cxxabiv1::__function_type_info::~__function_type_info()"; + "__cxxabiv1::__fundamental_type_info"; + "__cxxabiv1::__fundamental_type_info::~__fundamental_type_info()"; + "__cxxabiv1::__pbase_type_info"; + "__cxxabiv1::__pbase_type_info::~__pbase_type_info()"; + "__cxxabiv1::__pointer_to_member_type_info"; + "__cxxabiv1::__pointer_to_member_type_info::~__pointer_to_member_type_info()"; + "__cxxabiv1::__pointer_type_info"; + "__cxxabiv1::__pointer_type_info::~__pointer_type_info()"; + "__cxxabiv1::__si_class_type_info"; + "__cxxabiv1::__si_class_type_info::~__si_class_type_info()"; + "__cxxabiv1::__vmi_class_type_info"; + "__cxxabiv1::__vmi_class_type_info::~__vmi_class_type_info()"; + + # vtables typeinfo classes. + "vtable for __cxxabiv1::__array_type_info"; + "vtable for __cxxabiv1::__class_type_info"; + "vtable for __cxxabiv1::__enum_type_info"; + "vtable for __cxxabiv1::__function_type_info"; + "vtable for __cxxabiv1::__fundamental_type_info"; + "vtable for __cxxabiv1::__pbase_type_info"; + "vtable for __cxxabiv1::__pointer_to_member_type_info"; + "vtable for __cxxabiv1::__pointer_type_info"; + "vtable for __cxxabiv1::__si_class_type_info"; + "vtable for __cxxabiv1::__vmi_class_type_info"; + + # Type info for built-in types + "typeinfo for bool const*"; + "typeinfo for bool"; + "typeinfo for char const*"; + "typeinfo for char"; + "typeinfo for double const*"; + "typeinfo for double"; + "typeinfo for float const*"; + "typeinfo for float"; + "typeinfo for int const*"; + "typeinfo for int"; + "typeinfo for long const*"; + "typeinfo for long double const*"; + "typeinfo for long double"; + "typeinfo for long long const*"; + "typeinfo for long long"; + "typeinfo for long"; + "typeinfo for short const*"; + "typeinfo for short"; + "typeinfo for signed char const*"; + "typeinfo for signed char"; + "typeinfo for unsigned char const*"; + "typeinfo for unsigned char"; + "typeinfo for unsigned int const*"; + "typeinfo for unsigned int"; + "typeinfo for unsigned long const*"; + "typeinfo for unsigned long long const*"; + "typeinfo for unsigned long long"; + "typeinfo for unsigned long"; + "typeinfo for unsigned short const*"; + "typeinfo for unsigned short"; + "typeinfo for void const*"; + "typeinfo for void"; + "typeinfo for wchar_t const*"; + "typeinfo for wchar_t"; + + "typeinfo for bool*"; + "typeinfo for wchar_t*"; + "typeinfo for short*"; + "typeinfo for char*"; + "typeinfo for unsigned char*"; + "typeinfo for long long*"; + "typeinfo for unsigned short*"; + "typeinfo for long*"; + "typeinfo for double*"; + "typeinfo for unsigned long*"; + "typeinfo for unsigned long long*"; + "typeinfo for int*"; + "typeinfo for long double*"; + "typeinfo for signed char*"; + "typeinfo for void*"; + "typeinfo for unsigned int*"; + "typeinfo for float*"; + + "typeinfo for __cxxabiv1::__array_type_info"; + "typeinfo for __cxxabiv1::__class_type_info"; + "typeinfo for __cxxabiv1::__enum_type_info"; + "typeinfo for __cxxabiv1::__function_type_info"; + "typeinfo for __cxxabiv1::__fundamental_type_info"; + "typeinfo for __cxxabiv1::__pbase_type_info"; + "typeinfo for __cxxabiv1::__pointer_to_member_type_info"; + "typeinfo for __cxxabiv1::__pointer_type_info"; + "typeinfo for __cxxabiv1::__si_class_type_info"; + "typeinfo for __cxxabiv1::__vmi_class_type_info"; + + # Typeinfo names. + + "typeinfo name for unsigned char const*"; + "typeinfo name for long const*"; + "typeinfo name for double const*"; + "typeinfo name for unsigned long long const*"; + "typeinfo name for unsigned short const*"; + "typeinfo name for char const*"; + "typeinfo name for long long const*"; + "typeinfo name for short const*"; + "typeinfo name for unsigned int const*"; + "typeinfo name for float const*"; + "typeinfo name for bool const*"; + "typeinfo name for wchar_t const*"; + "typeinfo name for int const*"; + "typeinfo name for unsigned long const*"; + "typeinfo name for void const*"; + "typeinfo name for long double const*"; + "typeinfo name for signed char const*"; + "typeinfo name for wchar_t"; + "typeinfo name for short"; + "typeinfo name for char"; + "typeinfo name for float"; + "typeinfo name for void"; + "typeinfo name for unsigned int"; + "typeinfo name for bool"; + "typeinfo name for signed char"; + "typeinfo name for long double"; + "typeinfo name for int"; + "typeinfo name for unsigned long long"; + "typeinfo name for unsigned long"; + "typeinfo name for unsigned char"; + "typeinfo name for long"; + "typeinfo name for long long"; + "typeinfo name for unsigned short"; + "typeinfo name for double"; + + "typeinfo name for bool*"; + "typeinfo name for wchar_t*"; + "typeinfo name for short*"; + "typeinfo name for char*"; + "typeinfo name for unsigned char*"; + "typeinfo name for long long*"; + "typeinfo name for unsigned short*"; + "typeinfo name for long*"; + "typeinfo name for double*"; + "typeinfo name for unsigned long*"; + "typeinfo name for unsigned long long*"; + "typeinfo name for int*"; + "typeinfo name for long double*"; + "typeinfo name for signed char*"; + "typeinfo name for void*"; + "typeinfo name for unsigned int*"; + "typeinfo name for float*"; + + "typeinfo name for __cxxabiv1::__array_type_info"; + "typeinfo name for __cxxabiv1::__class_type_info"; + "typeinfo name for __cxxabiv1::__enum_type_info"; + "typeinfo name for __cxxabiv1::__function_type_info"; + "typeinfo name for __cxxabiv1::__fundamental_type_info"; + "typeinfo name for __cxxabiv1::__pbase_type_info"; + "typeinfo name for __cxxabiv1::__pointer_to_member_type_info"; + "typeinfo name for __cxxabiv1::__pointer_type_info"; + "typeinfo name for __cxxabiv1::__si_class_type_info"; + "typeinfo name for __cxxabiv1::__vmi_class_type_info"; + + "std::type_info::type_info(std::type_info const&)"; + "std::type_info::operator=(std::type_info const&)"; + + + # Extensions + "pathscale::set_terminate(void (*)())"; + "pathscale::set_unexpected(void (*)())"; + "pathscale::set_use_thread_local_handlers(bool)"; + }; + + # C++11 typeinfo not understood by ld.bfd 2.17.50 + # std::nullptr_t + _ZTIDn;_ZTIPDn;_ZTIPKDn; + # char16_t + _ZTIDi;_ZTIPDi;_ZTIPKDi; + # char32_t + _ZTIDs;_ZTIPDs;_ZTIPKDs; + # IEEE 754r decimal floating point + _ZTIDd;_ZTIPDd;_ZTIPKDd; + _ZTIDe;_ZTIPDe;_ZTIPKDe; + _ZTIDf;_ZTIPDf;_ZTIPKDf; + # IEEE 754r half-precision floating point + _ZTIDh;_ZTIPDh;_ZTIPKDh; + + # C++11 typeinfo name not understood by ld.bfd 2.17.50 + # std::nullptr_t + _ZTSDn;_ZTSPDn;_ZTSPKDn; + # char16_t + _ZTSDi;_ZTSPDi;_ZTSPKDi; + # char32_t + _ZTSDs;_ZTSPDs;_ZTSPKDs; + # IEEE 754r decimal floating point + _ZTSDd;_ZTSPDd;_ZTSPKDd; + _ZTSDe;_ZTSPDe;_ZTSPKDe; + _ZTSDf;_ZTSPDf;_ZTSPKDf; + # IEEE 754r half-precision floating point + _ZTSDh;_ZTSPDh;_ZTSPKDh; + + local: + *; +}; + +CXXABI_1.3.1 { + __cxa_get_exception_ptr; +} CXXABI_1.3; + +CXXABI_1.3.5 { + extern "C++" { + "typeinfo for __int128 const*"; + "typeinfo for __int128"; + "typeinfo for __int128*"; + "typeinfo for unsigned __int128 const*"; + "typeinfo for unsigned __int128"; + "typeinfo for unsigned __int128*"; + }; +} CXXABI_1.3.1; + +CXXABI_1.3.6 { + __cxa_deleted_virtual; +} CXXABI_1.3.5; + +CXXABI_1.3.9 { + extern "C++" { + "typeinfo name for __int128 const*"; + "typeinfo name for __int128"; + "typeinfo name for __int128*"; + "typeinfo name for unsigned __int128 const*"; + "typeinfo name for unsigned __int128"; + "typeinfo name for unsigned __int128*"; + "operator delete[](void*, unsigned int)"; + "operator delete(void*, unsigned int)"; + "operator delete[](void*, unsigned long)"; + "operator delete(void*, unsigned long)"; + }; +} CXXABI_1.3.6; + ++CXXABI_1.3.11 { ++ __cxa_init_primary_exception; ++} CXXABI_1.3.9; ++ +CXXRT_1.0 { + + extern "C++" { + "std::type_info::name() const"; + "std::type_info::before(std::type_info const&) const"; + "std::type_info::operator==(std::type_info const&) const"; + "std::type_info::operator!=(std::type_info const&) const"; + "std::bad_cast::bad_cast(std::bad_cast const&)"; + "std::bad_cast::bad_cast()"; + "std::bad_cast::operator=(std::bad_cast const&)"; + "std::bad_typeid::bad_typeid(std::bad_typeid const&)"; + "std::bad_typeid::bad_typeid()"; + "std::bad_typeid::operator=(std::bad_typeid const&)"; + "std::exception::exception(std::exception const&)"; + "std::exception::exception()"; + "std::exception::operator=(std::exception const&)"; + "std::bad_alloc::bad_alloc(std::bad_alloc const&)"; + "std::bad_alloc::bad_alloc()"; + "std::bad_alloc::operator=(std::bad_alloc const&)"; + "std::bad_array_new_length::bad_array_new_length(std::bad_array_new_length const&)"; + "std::bad_array_new_length::bad_array_new_length()"; + "std::bad_array_new_length::operator=(std::bad_array_new_length const&)"; + + }; + __cxa_allocate_dependent_exception; + __cxa_current_primary_exception; + __cxa_decrement_exception_refcount; + __cxa_free_dependent_exception; + __cxa_increment_exception_refcount; + __cxa_rethrow_primary_exception; + +} CXXABI_1.3.6; + + +GLIBCXX_3.4 { + extern "C++" { + "operator delete[](void*)"; + "operator delete(void*)"; + "operator new[](unsigned int)"; + "operator new(unsigned int)"; + "operator new(unsigned int, std::nothrow_t const&)"; + "operator new[](unsigned long)"; + "operator new(unsigned long)"; + "operator new(unsigned long, std::nothrow_t const&)"; + + "std::unexpected()"; + "std::get_terminate()"; + "std::get_unexpected()"; + "std::uncaught_exception()"; + "std::terminate()"; + + "std::type_info::~type_info()"; + "std::bad_cast::~bad_cast()"; + "std::bad_typeid::~bad_typeid()"; + "std::exception::~exception()"; + "std::bad_alloc::~bad_alloc()"; + "std::bad_array_new_length::~bad_array_new_length()"; + + "std::exception::what() const"; + + std::set_new_handler*; + std::set_terminate*; + std::set_unexpected*; + std::type_info::__*; + + "vtable for std::bad_alloc"; + "vtable for std::bad_cast"; + "vtable for std::bad_typeid"; + "vtable for std::exception"; + "vtable for std::type_info"; + "vtable for std::bad_array_new_length"; + + "typeinfo for std::bad_alloc"; + "typeinfo for std::bad_typeid"; + "typeinfo for std::bad_cast"; + "typeinfo for std::exception"; + "typeinfo for std::type_info"; + "typeinfo for std::bad_array_new_length"; + "typeinfo name for std::bad_alloc"; + "typeinfo name for std::bad_typeid"; + "typeinfo name for std::bad_cast"; + "typeinfo name for std::exception"; + "typeinfo name for std::type_info"; + "typeinfo name for std::bad_array_new_length"; + + }; +}; + +GLIBCXX_3.4.9 { + extern "C++" { + "std::bad_typeid::what() const"; + "std::bad_cast::what() const"; + "std::bad_alloc::what() const"; + "std::bad_array_new_length::what() const"; + }; +} GLIBCXX_3.4; + +GLIBCXX_3.4.20 { + extern "C++" { + "std::get_new_handler()"; + }; +} GLIBCXX_3.4.9; + +GLIBCXX_3.4.22 { + extern "C++" { + "std::uncaught_exceptions()"; + }; +} GLIBCXX_3.4.20; + From nobody Thu Jan 25 21:36:48 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TLZ0K15ZYz585GR; Thu, 25 Jan 2024 21:36:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TLZ0K0WPGz4YMp; Thu, 25 Jan 2024 21:36:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706218609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zQz/YqqEzpTERjyc+1lzjX1LM19ZmTluaFIZJTxl/QI=; b=QfA6keiYqWW+5BJvPs1tGTevBZUK6a76XCZvs+xJhTr77MrHwL6uZwJOdJSaa0Di11DP44 1fC3TvWqaMJl50Kqnmo571fCmLUjIX6ytiVKFYIx5oTNukaTVL7t3yEhyqykux8q0Yln23 teLbrGypUItgRUuZlDA2/OhOaEvWgLkrZhdHudlXS0oIl8nHq3bMsyRULOZNpoYUpnvNpU TYe+mVH+LgpF/bd8VtVyVH8800EP6cHeucZQt0Q3JFagGKrI2hZ4T/p+Owa1N91Z2lpCkr l/kANm0t7TWB8T3r1Goq1eAgSBWEq8PxKYLsetNMaeHOV3iXzYDqn2HMrXbVlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706218609; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zQz/YqqEzpTERjyc+1lzjX1LM19ZmTluaFIZJTxl/QI=; b=EXqsJfVxQoiKu7KUY+RmLPrge1UlqgJzmrIrgUoROTkfFOcCZ/cEtSoq5gKCEnyHzyrDow jCn9jmfDW/QVMJ1ij3NCiu00f1Ip1JWVS1X3TB5iGTP92OV8XrLaARmIGCnwmUmoZH7Xwj g4rapK/pK2wgu1hNfg1w1eWXC4U5HGmeBFjK5wovSjw0QTsE4QRbczkxgVBX4aekThyZW8 KU26L/hPJ4p9WUvzz3zp1bunrZjCl8oG2HReIzSfUuT4afByXkS+IF//fCoRsfQAvVHKAX B6dYIieu/xWPgkUTdMtx0BFRQ+WUgN+YAwKc351Ewn5tEfoWNqLAgJF6k9aYmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706218609; a=rsa-sha256; cv=none; b=BdtZ2lp/ImBjKGxrRL932zTA5pL6/85weg0k1HN8F9X63jRkK1afyfhRCibcexAwZoGSVz U/5+UQVSvfuwNAg/NifZl03zWizrS7+40SicFPDwUWfxv9SXgpaq0KUo/DxEvPF1cI/Km1 hEkn4Qf1d/ayBGb7N9+Bvti9TSzJ2mY8XsNdczbuP7zNxnK5pAj/9Z8TDqDwOEivVZeAfD ivN5CcqpbyI/hl6JAP3S2tCJUfsPht3gCAQw2bT70+PivNMMnvCl3BxAnzxO4dfpdJyoBD 1v+tuCrQHyO2UR69p61vKwFA9Ye/pSpiMKSF93DBTvjsJWP2sZXYcz85NmuxFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TLZ0J6gckzF52; Thu, 25 Jan 2024 21:36:48 +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 40PLam1F015391; Thu, 25 Jan 2024 21:36:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40PLamZh015388; Thu, 25 Jan 2024 21:36:48 GMT (envelope-from git) Date: Thu, 25 Jan 2024 21:36:48 GMT Message-Id: <202401252136.40PLamZh015388@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 48d5dab7bace - main - arm64: Add a VM_FREELIST_DMA32 freelist List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48d5dab7bace6bae938672784ca3aa8733d72eb9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=48d5dab7bace6bae938672784ca3aa8733d72eb9 commit 48d5dab7bace6bae938672784ca3aa8733d72eb9 Author: Mark Johnston AuthorDate: 2024-01-25 21:33:46 +0000 Commit: Mark Johnston CommitDate: 2024-01-25 21:33:46 +0000 arm64: Add a VM_FREELIST_DMA32 freelist When booting a KMSAN kernel on an Ampere Altra, I've seen some boot time hangs when the XHCI controller driver attempts to allocate memory for 32-bit DMA. The system boots fine with a GENERIC kernel; I believe that the additional memory requirements of KMSAN push it over the edge. The system has a bit less than 2GB of RAM below the 4GB boundary. Allocate a new freelist to segregate memory below 4GB, as we do on amd64, so that such memory allocation failures are less likely to occur. Reviewed by: alc MFC after: 1 month Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D43503 --- sys/arm64/include/vmparam.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/arm64/include/vmparam.h b/sys/arm64/include/vmparam.h index fe5d66c2d73f..d577b9315471 100644 --- a/sys/arm64/include/vmparam.h +++ b/sys/arm64/include/vmparam.h @@ -83,11 +83,13 @@ #define VM_FREEPOOL_DIRECT 1 /* - * Create one free page lists: VM_FREELIST_DEFAULT is for all physical - * pages. + * Create two free page lists: VM_FREELIST_DMA32 is for physical pages that have + * physical addresses below 4G, and VM_FREELIST_DEFAULT is for all other + * physical pages. */ -#define VM_NFREELIST 1 +#define VM_NFREELIST 2 #define VM_FREELIST_DEFAULT 0 +#define VM_FREELIST_DMA32 1 /* * When PAGE_SIZE is 4KB, an allocation size of 16MB is supported in order From nobody Thu Jan 25 22:00:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TLZWj6BBzz587tK; Thu, 25 Jan 2024 22:00: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 4TLZWj5gcrz4bs1; Thu, 25 Jan 2024 22:00:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706220033; h=from:from:reply-to:subject:subject: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+5Jt99xUKQ76wcMgZacmKxG5ccfWY6iWgoO3SeS+eI=; b=vtDnwVHL5kGEY/2+KQks6uxQbczUeeD96BjTeL513FrETIKw+IgjfqPbZlSxc10Ti2ty11 PwrJpVnGsl1Qx3UoT7Tzxw/SWsSZQQbr+rw/rSGei9elNp1j8QIRaIk9zXmtM7+DylQ5pS KOSObtkBKq2es5iJ8IciZA8a9CaFKGExg7qdmcyE/5qmeyYM+Wl/4/SSzbTmW4YomfxkEG adNfF7rQFZj54LPZf/nixJemL4h3YyxX5jZg+tQqV3P2qhsstLEQ080A7awq8Dj72U887b GFsSNT6bBQJE/F1xmbhjzjhV2T+Png+fWxo/h3pEwy+A3QgcqA0CRyP51f6Vlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706220033; h=from:from:reply-to:subject:subject: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+5Jt99xUKQ76wcMgZacmKxG5ccfWY6iWgoO3SeS+eI=; b=roHkDOIP8QcZnx395UsvsP9OU8/XoUmxXIJOvulKTULfh0Hf46D8u9SrWlGWyLiUiYz4Dc 4akb88AJW4paK2MbNmvWsSN0vTGsY/VAqAZyCG88XRY/EleQrF531F1iIgOwMLhA1cJoPS IOKjPRUCHcXReGLmYxT3GX8pCde5z7u+9ZqxrPwkFeMEJ1S0i5FgtYtK95/cLpmGoUjm2B nLq5J8usF6/u9DasL0plwkdcc4JpJlntu5eyUrvELjdPcNx+cTAbD5E9GoG+/eZpceKL7q JyBlpyP2GJSZ/ECErD9+G1naaj/EFDHf168j2eBgTfO6l/rKGYe7d2qbcpFrKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706220033; a=rsa-sha256; cv=none; b=u3jcY/B3XHP2WSpihTRELp0Va9f3XrBnxDF/vIHrEKH96q/ryllGrS7vrw377QuRUHzRUS 8/KohwBQC3/FrmQiiX2j62TT80Cj4jDhvE3uKngiPAuQZZVw5y2B8Dq9MA+8gT7CkvoakQ RjnCxDwgm/jAMV0iOQajTSwtwUxUKokgUhRDblBCdU1A38n11L29bEema38BCW5AD/rb0J r7x2nhaIR/lNOK/zb1kCNZw9ZZVxsCrx5VMZPixwVhARTc33/QKXEZeVl7hwkKXxyVxFqd sDZi4HmCyzxzrPTE2JDYsFbuueL9SDCKie0Hn30L8r90qdLeXAZ19IgvtF2S5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TLZWj4n2MzF5s; Thu, 25 Jan 2024 22:00: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 40PM0XT6059091; Thu, 25 Jan 2024 22:00:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40PM0XPt059088; Thu, 25 Jan 2024 22:00:33 GMT (envelope-from git) Date: Thu, 25 Jan 2024 22:00:33 GMT Message-Id: <202401252200.40PM0XPt059088@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 0932fb565a08 - main - tcp: fix TCPSTAT accounting for SACK List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0932fb565a08e6e13dd9843e7a60dae311911d0d Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=0932fb565a08e6e13dd9843e7a60dae311911d0d commit 0932fb565a08e6e13dd9843e7a60dae311911d0d Author: Richard Scheffenegger AuthorDate: 2024-01-25 21:03:36 +0000 Commit: Richard Scheffenegger CommitDate: 2024-01-25 21:58:33 +0000 tcp: fix TCPSTAT accounting for SACK Account for SACK retransmitted bytes once the actual length is known. This prevents a call to tcp_maxseg() and prepares for TSO support when transmitting from the SACK scoreboard. Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43447 --- sys/netinet/tcp_output.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 71a50d54d5ee..58f63b593b2a 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -330,9 +330,6 @@ again: __func__, off)); sack_rxmit = 1; sendalot = 1; - TCPSTAT_INC(tcps_sack_rexmits); - TCPSTAT_ADD(tcps_sack_rexmit_bytes, - min(len, tcp_maxseg(tp))); } } after_sack_rexmit: @@ -1036,6 +1033,10 @@ send: tp->t_sndrexmitpack++; TCPSTAT_INC(tcps_sndrexmitpack); TCPSTAT_ADD(tcps_sndrexmitbyte, len); + if (sack_rxmit) { + TCPSTAT_INC(tcps_sack_rexmits); + TCPSTAT_ADD(tcps_sack_rexmit_bytes, len); + } #ifdef STATS stats_voi_update_abs_u32(tp->t_stats, VOI_TCP_RETXPB, len); From nobody Thu Jan 25 23:17:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TLcF15r8tz58FvD; Thu, 25 Jan 2024 23:17:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TLcF13Kgsz4mpP; Thu, 25 Jan 2024 23:17:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706224677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3tuyvHAmHt0R+j7w4eAVelTnoXPsGiuHIBmCPqJCP8k=; b=Amb6maBudWUSvUawk55DDus7EsGKeMIGnDSultRP3s9ce5KrLOZMUSHyNgxfXjgzd4KrDC p3cpbcchOr6WYm1nX/aiBLrSklQaGvHCPaktVQpd2UYlLiXPp3qbh7xHq57041qS909BmO EkIpDTiYHSlx6nOY+i57riaZ3kZ9gBjv4IpMzwz2oudTD+bfQx/mVU7RlnL2NKqMFR5G4e hY0TBr1VOP3J85h7TfQUMRJtF1tO7Ay+uYeZnHR0nG+v9ncKRnrl7BdlXUrD91BsTgPGfK iYXSy6sJa0m1NYz+0preq4JUsA86G3gvAaA7aHuBiGyPqxOjrbCgXPviMZmQzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706224677; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3tuyvHAmHt0R+j7w4eAVelTnoXPsGiuHIBmCPqJCP8k=; b=IMwq4w0OosSA926x4B0xnRGPgmeIwJ+gNTTkpUT8Sj1YGgrWFQFK7DasA6Dp7NfvgXfP2C J6s0fsBhtzlwqLHnx728EFLZ4JaTlVYooOoavwyHGyEGWdu+5aO3EFwfeHcNE9ti8kdRfS HrnMCw856KX3TMSGORXNYgFNbJhLZ/93Fz/tvY37QFcR/r/Sc/Cum/N7ain3RmzVpR91aW L8HrBKv1K+0vi1uRXAx0sygJJpayn7nhitCUrDF/mcj8Wy/rrujlE4LmeytYiy7i/H+KDh T7BP4cUVVqXAjRK6rix7RWuqE1GI7cFD+2VCacz+6sDfOF+pK2x+K+jDIJycxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706224677; a=rsa-sha256; cv=none; b=j66uYj377l3+UszrXiH5jT/XUWmGltpNLfMkSB+4zjBtf1RspTWYLSzFm3HmHdodHcQdc6 ZD+8JX/QZeVWNdKFZn+ynwhO4HxWcCdvVxi8NMI07M7PWATF4bnPdopBiH0E7LXM9qMasw ze/ZTX+x/pMSWXwChjs7WpxhwCzfRmaHQR95/iPbDHhgIur7n9q5ew0XZDD1xoVXZrbIgD 4xgGup4ZMd7F59dZy2TZHJvWBXepftyiNyW7klXa1cchv/RkLmNKH2hQ2GK7lvKCal2Iyt MSbtxUnWJd/M11lrMLfxXR4pSvVJR5FVm2A78mnB1eEHxvajzaCeHlSmvdIJFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TLcF12Nq3zHqb; Thu, 25 Jan 2024 23:17:57 +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 40PNHvrX084367; Thu, 25 Jan 2024 23:17:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40PNHvp3084364; Thu, 25 Jan 2024 23:17:57 GMT (envelope-from git) Date: Thu, 25 Jan 2024 23:17:57 GMT Message-Id: <202401252317.40PNHvp3084364@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: fc262fd3dc0a - main - tcp: AccECN access ACE field by shifting bits List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fc262fd3dc0a111f42d34cff4012912db906549a Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=fc262fd3dc0a111f42d34cff4012912db906549a commit fc262fd3dc0a111f42d34cff4012912db906549a Author: Richard Scheffenegger AuthorDate: 2024-01-25 22:21:07 +0000 Commit: Richard Scheffenegger CommitDate: 2024-01-25 23:16:22 +0000 tcp: AccECN access ACE field by shifting bits Shifting bits is quicker than checking header flag bits one by one. Also improve readability by the use of switch statements. No change in behaviour. Reviewed By: glebius, tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43560 --- sys/netinet/tcp_ecn.c | 71 ++++++++++++++++++++++++--------------------------- sys/netinet/tcp_ecn.h | 3 ++- 2 files changed, 36 insertions(+), 38 deletions(-) diff --git a/sys/netinet/tcp_ecn.c b/sys/netinet/tcp_ecn.c index 43c23f8118f4..34ecfe1c83c0 100644 --- a/sys/netinet/tcp_ecn.c +++ b/sys/netinet/tcp_ecn.c @@ -96,6 +96,9 @@ #include #include +static inline int tcp_ecn_get_ace(uint16_t); +static inline void tcp_ecn_set_ace(uint16_t *, uint32_t); + static SYSCTL_NODE(_net_inet_tcp, OID_AUTO, ecn, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "TCP ECN"); @@ -116,22 +119,24 @@ SYSCTL_INT(_net_inet_tcp_ecn, OID_AUTO, maxretries, void tcp_ecn_input_syn_sent(struct tcpcb *tp, uint16_t thflags, int iptos) { - - if (V_tcp_do_ecn == 0) + switch (V_tcp_do_ecn) { + case 0: return; - if ((V_tcp_do_ecn == 1) || - (V_tcp_do_ecn == 2)) { + case 1: + /* FALLTHROUGH */ + case 2: /* RFC3168 ECN handling */ if ((thflags & (TH_CWR | TH_ECE)) == (0 | TH_ECE)) { tp->t_flags2 |= TF2_ECN_PERMIT; tp->t_flags2 &= ~TF2_ACE_PERMIT; TCPSTAT_INC(tcps_ecn_shs); } - } else - /* decoding Accurate ECN according to table in section 3.1.1 */ - if ((V_tcp_do_ecn == 3) || - (V_tcp_do_ecn == 4)) { - /* + break; + case 3: + /* FALLTHROUGH */ + case 4: + /* decoding Accurate ECN according to + * table in section 3.1.1 * on the SYN,ACK, process the AccECN * flags indicating the state the SYN * was delivered. @@ -208,6 +213,7 @@ tcp_ecn_input_syn_sent(struct tcpcb *tp, uint16_t thflags, int iptos) tp->t_rcep = 0b110; break; } + break; } } @@ -219,10 +225,12 @@ tcp_ecn_input_parallel_syn(struct tcpcb *tp, uint16_t thflags, int iptos) { if (thflags & TH_ACK) return; - if (V_tcp_do_ecn == 0) + switch (V_tcp_do_ecn) { + case 0: return; - if ((V_tcp_do_ecn == 1) || - (V_tcp_do_ecn == 2)) { + case 1: + /* FALLTHROUGH */ + case 2: /* RFC3168 ECN handling */ if ((thflags & (TH_CWR | TH_ECE)) == (TH_CWR | TH_ECE)) { tp->t_flags2 |= TF2_ECN_PERMIT; @@ -230,9 +238,10 @@ tcp_ecn_input_parallel_syn(struct tcpcb *tp, uint16_t thflags, int iptos) tp->t_flags2 |= TF2_ECN_SND_ECE; TCPSTAT_INC(tcps_ecn_shs); } - } else - if ((V_tcp_do_ecn == 3) || - (V_tcp_do_ecn == 4)) { + break; + case 3: + /* FALLTHROUGH */ + case 4: /* AccECN handling */ switch (thflags & (TH_AE | TH_CWR | TH_ECE)) { default: @@ -272,6 +281,7 @@ tcp_ecn_input_parallel_syn(struct tcpcb *tp, uint16_t thflags, int iptos) } break; } + break; } } @@ -418,13 +428,7 @@ tcp_ecn_output_established(struct tcpcb *tp, uint16_t *thflags, int len, bool rx * Reply with proper ECN notifications. */ if (tp->t_flags2 & TF2_ACE_PERMIT) { - *thflags &= ~(TH_AE|TH_CWR|TH_ECE); - if (tp->t_rcep & 0x01) - *thflags |= TH_ECE; - if (tp->t_rcep & 0x02) - *thflags |= TH_CWR; - if (tp->t_rcep & 0x04) - *thflags |= TH_AE; + tcp_ecn_set_ace(thflags, tp->t_rcep); if (!(tp->t_flags2 & TF2_ECN_PERMIT)) { /* * here we process the final @@ -476,9 +480,6 @@ tcp_ecn_syncache_socket(struct tcpcb *tp, struct syncache *sc) tp->t_scep = 6; tp->t_rcep = 6; break; - /* undefined SCF codepoint */ - default: - break; } } } @@ -591,24 +592,20 @@ tcp_ecn_syncache_respond(uint16_t thflags, struct syncache *sc) TCPSTAT_INC(tcps_ecn_shs); TCPSTAT_INC(tcps_ace_ce); break; - /* undefined SCF codepoint */ - default: - break; } } return thflags; } -int +static inline int tcp_ecn_get_ace(uint16_t thflags) { - int ace = 0; + return ((thflags & (TH_AE|TH_CWR|TH_ECE)) >> TH_ACE_SHIFT); +} - if (thflags & TH_ECE) - ace += 1; - if (thflags & TH_CWR) - ace += 2; - if (thflags & TH_AE) - ace += 4; - return ace; +static inline void +tcp_ecn_set_ace(uint16_t *thflags, uint32_t t_rcep) +{ + *thflags &= ~(TH_AE|TH_CWR|TH_ECE); + *thflags |= ((t_rcep << TH_ACE_SHIFT) & (TH_AE|TH_CWR|TH_ECE)); } diff --git a/sys/netinet/tcp_ecn.h b/sys/netinet/tcp_ecn.h index db5c71d64cab..89ee157361ab 100644 --- a/sys/netinet/tcp_ecn.h +++ b/sys/netinet/tcp_ecn.h @@ -38,6 +38,8 @@ #include #include +#define TH_ACE_SHIFT 6 + void tcp_ecn_input_syn_sent(struct tcpcb *, uint16_t, int); void tcp_ecn_input_parallel_syn(struct tcpcb *, uint16_t, int); int tcp_ecn_input_segment(struct tcpcb *, uint16_t, int, int, int); @@ -46,7 +48,6 @@ int tcp_ecn_output_established(struct tcpcb *, uint16_t *, int, bool); void tcp_ecn_syncache_socket(struct tcpcb *, struct syncache *); int tcp_ecn_syncache_add(uint16_t, int); uint16_t tcp_ecn_syncache_respond(uint16_t, struct syncache *); -int tcp_ecn_get_ace(uint16_t); #endif /* _KERNEL */ From nobody Fri Jan 26 00:19:13 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TLdbj3sv9z58LYG; Fri, 26 Jan 2024 00:19: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 4TLdbj3QNBz4tv3; Fri, 26 Jan 2024 00:19:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706228353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9XyLcVdeoh3kBss6wKG8alP4Wxp4dgC4OM+auUovu54=; b=t6lyALnX6HJm1b0PkzYcl1CwuDKhpCEln+4w5tMMUacZRC55dz1hFxODeblkjjH3rmaK6A H/92vMr5yeE/gCMPx2YQJ0fugWWTxQeLk4Y/nB2J8gj37c06LOUA7vbeyXlRzv1+9FRHgi 3LULdDTq6/OdQ7hNbv2qAzPJIbHBsmank2e5xRFvU/EdW7BVDl4uUq3oX2FmFcPyYr6O/f jOgIV9UCtRMfUkPv+CuQahBG1sDz+qriD8QgqdJfBs9KY6Aj+NI+JG0L5WRQCFMr5kotR6 ygnIcHZnuYiUgV+e3zuvsbSc0lPIJwnTQEXuw/LKczZKARufOB1cy7jLcLaA6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706228353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9XyLcVdeoh3kBss6wKG8alP4Wxp4dgC4OM+auUovu54=; b=QVXbgaByQZOUpiNulraRi7J5oxOc3LUdfmSAbMCay1x6xBLCfjQxZV7VvzTKJXcOhYc3+3 /SETh/MqVt0+aHbdSly653kHIE5tjnKlE7hTMOKzyvLpnxgUQ4bfHxrz+t/gzbHePQTACK bMyPZLj8olxV4Q80b46CWpmVf5zbjkX/j5jspg/6+URnsL8T2MfEV9XadWuteczHqx5ZPx DICWW2SDZbTNotOvIMEAUnmUmm85LCCHBb3xLrRFmbyjNQIK3mbGHB8j9iOHRVNbfKPy02 vAQQuhJ2IDIkCe9X6SnzCxpXhoEUcokFmz/yG3ajyDRvg58nLt9lWEZS+0jBww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706228353; a=rsa-sha256; cv=none; b=wKtoUForh43DFLIjKcJ8SwV5NCNfTd6mvYh30I8kw5Xcxf8+N5eNKlDyJY+6WOhUFHhrf+ Z4jk06VqoNnZS95uHNQH7XNp0uWBpfhe++8YQnffj9i8BdckL/IlLx9sOHFIcv91U5c0NM 8YRvcoF4E2EboAqQEeOAMRVG+53U8t23P32KxsYEUuGxm7F+XGs4dMOE6xy602OITKfwlu gwZWutNkWlOwlKe4J5hQo6WdNM+OFsncgrzbwVOfzwp8eXQ1qLZ72FhiEoezAyVB1NfiVT MgcBo67bMBn2L7AexEitQw9j8Dz2Z7aOWRwcMjYC364RBsDqK66UOXsmk9ku9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TLdbj2SyWzJx2; Fri, 26 Jan 2024 00:19: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 40Q0JDmW084174; Fri, 26 Jan 2024 00:19:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40Q0JD04084171; Fri, 26 Jan 2024 00:19:13 GMT (envelope-from git) Date: Fri, 26 Jan 2024 00:19:13 GMT Message-Id: <202401260019.40Q0JD04084171@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 3896a6cc0a8e - main - ldscript.powerpc*: Only put .dynamic in PT_DYNAMIC List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3896a6cc0a8e774f33e6381ecc73be6e51dc6a53 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=3896a6cc0a8e774f33e6381ecc73be6e51dc6a53 commit 3896a6cc0a8e774f33e6381ecc73be6e51dc6a53 Author: Jessica Clarke AuthorDate: 2024-01-26 00:19:02 +0000 Commit: Jessica Clarke CommitDate: 2024-01-26 00:19:02 +0000 ldscript.powerpc*: Only put .dynamic in PT_DYNAMIC Currently there are a few output sections left as implicitly using :kernel :dynamic before :kernel on its own is used again, which means they end up in both the PT_LOAD and the PT_DYNAMIC segments, an unusual situation which the new libelf-based kldxref initially treated as invalid. Thus, hoist the :kernel to the very next section to ensure only .dynamic is in PT_DYNAMIC, as is more normal. Whilst here, sync ldscript.powerpc64le with ldscript.powerpc64 to pick up various fixes that were presumably made between the start of the powerpc64le port and it being committed and got missed. Reviewed by: jhibbits, jhb Differential Revision: https://reviews.freebsd.org/D43066 --- sys/conf/ldscript.powerpc | 4 ++-- sys/conf/ldscript.powerpc64 | 4 ++-- sys/conf/ldscript.powerpc64le | 17 +++++++++-------- sys/conf/ldscript.powerpcspe | 4 ++-- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/sys/conf/ldscript.powerpc b/sys/conf/ldscript.powerpc index 2bfc02768a22..c08123e4eaba 100644 --- a/sys/conf/ldscript.powerpc +++ b/sys/conf/ldscript.powerpc @@ -86,7 +86,7 @@ SECTIONS get relocated with -mrelocatable. Also put in the .fixup pointers. The current compiler no longer needs this, but keep it around for 2.7.2 */ PROVIDE (_GOT2_START_ = .); - .got2 : { *(.got2) } + .got2 : { *(.got2) } :kernel PROVIDE (__CTOR_LIST__ = .); .ctors : { *(.ctors) } PROVIDE (__CTOR_END__ = .); @@ -100,7 +100,7 @@ SECTIONS /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ - .sdata : { *(.sdata) } :kernel + .sdata : { *(.sdata) } _edata = .; PROVIDE (edata = .); .sbss : diff --git a/sys/conf/ldscript.powerpc64 b/sys/conf/ldscript.powerpc64 index f436a3bc0f64..df279576193f 100644 --- a/sys/conf/ldscript.powerpc64 +++ b/sys/conf/ldscript.powerpc64 @@ -111,7 +111,7 @@ SECTIONS get relocated with -mrelocatable. Also put in the .fixup pointers. The current compiler no longer needs this, but keep it around for 2.7.2 */ PROVIDE (_GOT2_START_ = .); - .got2 : { *(.got2) } + .got2 : { *(.got2) } :kernel PROVIDE (__CTOR_LIST__ = .); .ctors : { *(.ctors) } PROVIDE (__CTOR_END__ = .); @@ -125,7 +125,7 @@ SECTIONS /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ - .sdata : { *(.sdata) } :kernel + .sdata : { *(.sdata) } _edata = .; PROVIDE (edata = .); .sbss : diff --git a/sys/conf/ldscript.powerpc64le b/sys/conf/ldscript.powerpc64le index bd883853711a..3fd80d3130fb 100644 --- a/sys/conf/ldscript.powerpc64le +++ b/sys/conf/ldscript.powerpc64le @@ -7,15 +7,15 @@ SEARCH_DIR(/usr/lib); PROVIDE (__stack = 0); PHDRS { - text PT_LOAD ; - dynamic PT_DYNAMIC ; + kernel PT_LOAD; + dynamic PT_DYNAMIC; } SECTIONS { /* Low-address wrapper for bootloaders (kexec/kboot) that can't parse ELF */ . = kernbase - 0x100; - .kboot : { *(.text.kboot) } :text + .kboot : { *(.text.kboot) } :kernel /* Read-only sections, merged into text segment: */ . = kernbase; @@ -36,9 +36,6 @@ SECTIONS /* Do not emit PT_INTERP section, which confuses some loaders (kexec-lite) */ /DISCARD/ : { *(.interp) } - /* Also delete notes */ - /DISCARD/ : { *(.note.*) } - .hash : { *(.hash) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) } @@ -50,6 +47,10 @@ SECTIONS *(.note.gnu.build-id) PROVIDE (__build_id_end = .); } + + /* Do not emit any additional notes. */ + /DISCARD/ : { *(.note.*) } + .rela.text : { *(.rela.text) *(.rela.gnu.linkonce.t*) } .rela.data : @@ -105,12 +106,12 @@ SECTIONS .got : ALIGN(8) { __tocbase = .; *(.got) } .toc : ALIGN(8) { *(.toc) } - .dynamic : { *(.dynamic) } :text :dynamic + .dynamic : { *(.dynamic) } :kernel :dynamic /* Put .ctors and .dtors next to the .got2 section, so that the pointers get relocated with -mrelocatable. Also put in the .fixup pointers. The current compiler no longer needs this, but keep it around for 2.7.2 */ PROVIDE (_GOT2_START_ = .); - .got2 : { *(.got2) } + .got2 : { *(.got2) } :kernel PROVIDE (__CTOR_LIST__ = .); .ctors : { *(.ctors) } PROVIDE (__CTOR_END__ = .); diff --git a/sys/conf/ldscript.powerpcspe b/sys/conf/ldscript.powerpcspe index 38209f6516c8..7d5b54a655a6 100644 --- a/sys/conf/ldscript.powerpcspe +++ b/sys/conf/ldscript.powerpcspe @@ -87,7 +87,7 @@ SECTIONS get relocated with -mrelocatable. Also put in the .fixup pointers. The current compiler no longer needs this, but keep it around for 2.7.2 */ PROVIDE (_GOT2_START_ = .); - .got2 : { *(.got2) } + .got2 : { *(.got2) } :kernel PROVIDE (__CTOR_LIST__ = .); .ctors : { *(.ctors) } PROVIDE (__CTOR_END__ = .); @@ -101,7 +101,7 @@ SECTIONS /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ - .sdata : { *(.sdata) } :kernel + .sdata : { *(.sdata) } _edata = .; PROVIDE (edata = .); .sbss : From nobody Fri Jan 26 00:22:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TLdg01C30z58Lj6; Fri, 26 Jan 2024 00:22:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TLdfz6j4yz4vlS; Fri, 26 Jan 2024 00:22:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706228523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wUBKztSI/GK3KKDCQGRaY4D4I7t7P+qqE24mG5rjiBU=; b=YkV4NR26DYoNJzMnK5xDgA69t0VcTLpPA/GFyWqFRNely3uYcsmQAzxGENaBseNSnTQDAV oEx24Tf5RB+60F32KKa8m8SGvROS50nqt6Oi6Nnmku+PtEHBfmKo3u1DNPp+iHqwx6c0Er 1eWXR+kf75zCj+P4ulKtaOJKBg3CX4DHFmvFX5cRRbMnw1jK2PTxxpRDNtX7gy0GnswVK3 /CT/+YrfYRX94cwDOQHL5+85WWtwuTMepUBxMHG7/1oHwr65F58hsiWsfD6Q6OgnVIDPGC /djBbxi0FrmuxTieXww+yQ5g7ENMjYwthLhBPcK56C//DJ/DutF/zvllZKr+/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706228523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wUBKztSI/GK3KKDCQGRaY4D4I7t7P+qqE24mG5rjiBU=; b=FO3P+3Jq5uDrBLWQb8sz0yJ1Lxk3xwvI5gPD28oxqf3x2m2ZkyWmSoqZwDJfK6QPK25SC6 67E/LkhpMhqXffZ16K07J/1cujlnfjCheZJi3T5uBOss5xtqzdGQNXuYotQUco0j5l9ddS JZbZuvvN8tk7SjPSn0U4PYwUazTTARmuWXTN7WDqo4uy9p9csXdI0JcnpySofHc+Vn+rKL DPrsOv02n3/aUJ/sdfOYRHoFnhR0zbm/KHT28dNGntxJULW14fkDQrrdAU5Bx5ib6k72Gg 6by51BXHmq+i6vmbR2cIY67wTKtRn5i1jOY8c6nkiE4RiaHV8MGmB4aR3i0hDg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706228523; a=rsa-sha256; cv=none; b=bQP7cG6kVVuBBIQZ7ZIwN17zmEr2V8dBVrUnfJ5bgn10qHgd+lEXODc7Bnb6fNbu6qGSoO 2idcFqhGCXQv0ARtQgktIXX699wZLzEpMcciqyslxPeD8Ree8PR0Fk2ZY3NMM/z6A9uxhE dR9rmpEOZGt/m4Lfl1jHoNkc99JBZNtIJtLn3KAQuw5klkrBkHd+hhUW2acmvseP9BGB2F H77XWI3eDnHSbIymtWqkUcRnL7MvZCNWk/VQTgCRNMX9ktajgf7n7p4Y2buIl1J9mHqZTD h8nJ9TA2j2H6HAiPq/gNeyBzb94Lsf2eWcX54U8vnos8LCMmXHfv1SpVdnqwjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TLdfz5pH5zJrh; Fri, 26 Jan 2024 00:22: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 40Q0M3Fa096420; Fri, 26 Jan 2024 00:22:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40Q0M3DK096417; Fri, 26 Jan 2024 00:22:03 GMT (envelope-from git) Date: Fri, 26 Jan 2024 00:22:03 GMT Message-Id: <202401260022.40Q0M3DK096417@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 2d05a1c81b2c - main - tcp: commonize check for more data to send, style changes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2d05a1c81b2cbb5468a242d0add44f850aa31811 Auto-Submitted: auto-generated The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=2d05a1c81b2cbb5468a242d0add44f850aa31811 commit 2d05a1c81b2cbb5468a242d0add44f850aa31811 Author: Richard Scheffenegger AuthorDate: 2024-01-25 23:19:30 +0000 Commit: Richard Scheffenegger CommitDate: 2024-01-26 00:20:35 +0000 tcp: commonize check for more data to send, style changes Use SEQ_SUB instead of a plain subtraction, for an implict type conversion and prevention of a possible overflow. Use curly brackets in stacked if statements throughout. Use of the ? operator to enhance readability when clearing the FIN flag in tcp_output(). None of the above change the function. Reviewed By: tuexen, cc, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D43539 --- sys/netinet/tcp_ecn.c | 9 ++--- sys/netinet/tcp_input.c | 94 ++++++++++++++++++++++++++++-------------------- sys/netinet/tcp_output.c | 12 +++---- sys/netinet/tcp_sack.c | 31 +++++++++------- 4 files changed, 83 insertions(+), 63 deletions(-) diff --git a/sys/netinet/tcp_ecn.c b/sys/netinet/tcp_ecn.c index 34ecfe1c83c0..5332b3caf950 100644 --- a/sys/netinet/tcp_ecn.c +++ b/sys/netinet/tcp_ecn.c @@ -135,9 +135,11 @@ tcp_ecn_input_syn_sent(struct tcpcb *tp, uint16_t thflags, int iptos) case 3: /* FALLTHROUGH */ case 4: - /* decoding Accurate ECN according to + /* + * Decoding Accurate ECN according to * table in section 3.1.1 - * on the SYN,ACK, process the AccECN + * + * On the SYN,ACK, process the AccECN * flags indicating the state the SYN * was delivered. * Reactions to Path ECN mangling can @@ -382,8 +384,7 @@ tcp_ecn_output_syn_sent(struct tcpcb *tp) thflags = TH_ECE|TH_CWR; } else thflags = TH_ECE|TH_CWR; - } else - if (V_tcp_do_ecn == 3) { + } else if (V_tcp_do_ecn == 3) { /* Send an Accurate ECN setup packet */ if (tp->t_rxtshift >= 1) { if (tp->t_rxtshift <= V_tcp_ecn_maxretries) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 02b042fd3273..98564ff67f22 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1624,13 +1624,14 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, */ if ((to.to_flags & TOF_TS) && (to.to_tsecr != 0)) { to.to_tsecr -= tp->ts_offset; - if (TSTMP_GT(to.to_tsecr, tcp_ts_getticks())) + if (TSTMP_GT(to.to_tsecr, tcp_ts_getticks())) { to.to_tsecr = 0; - else if (tp->t_rxtshift == 1 && + } else if (tp->t_rxtshift == 1 && tp->t_flags & TF_PREVVALID && tp->t_badrxtwin != 0 && - TSTMP_LT(to.to_tsecr, tp->t_badrxtwin)) + TSTMP_LT(to.to_tsecr, tp->t_badrxtwin)) { cc_cong_signal(tp, th, CC_RTO_ERR); + } } /* * Process options only when we get SYN/ACK back. The SYN case @@ -1647,8 +1648,9 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, !(tp->t_flags & TF_NOOPT)) { tp->t_flags |= TF_RCVD_SCALE; tp->snd_scale = to.to_wscale; - } else + } else { tp->t_flags &= ~TF_REQ_SCALE; + } /* * Initial send window. It will be updated with * the next incoming segment to the scaled value. @@ -1660,30 +1662,36 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, tp->t_flags |= TF_RCVD_TSTMP; tp->ts_recent = to.to_tsval; tp->ts_recent_age = tcp_ts_getticks(); - } else + } else { tp->t_flags &= ~TF_REQ_TSTMP; - if (to.to_flags & TOF_MSS) + } + if (to.to_flags & TOF_MSS) { tcp_mss(tp, to.to_mss); + } if ((tp->t_flags & TF_SACK_PERMIT) && (!(to.to_flags & TOF_SACKPERM) || - (tp->t_flags & TF_NOOPT))) + (tp->t_flags & TF_NOOPT))) { tp->t_flags &= ~TF_SACK_PERMIT; + } if (IS_FASTOPEN(tp->t_flags)) { if ((to.to_flags & TOF_FASTOPEN) && !(tp->t_flags & TF_NOOPT)) { uint16_t mss; - if (to.to_flags & TOF_MSS) + if (to.to_flags & TOF_MSS) { mss = to.to_mss; - else - if ((inp->inp_vflag & INP_IPV6) != 0) + } else { + if ((inp->inp_vflag & INP_IPV6) != 0) { mss = TCP6_MSS; - else + } else { mss = TCP_MSS; + } + } tcp_fastopen_update_cache(tp, mss, to.to_tfo_len, to.to_tfo_cookie); - } else + } else { tcp_fastopen_disable_path(tp); + } } } @@ -1872,9 +1880,11 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, * is new data available to be sent * or we need to send an ACK. */ - if (SEQ_GT(tp->snd_una + sbavail(&so->so_snd), - tp->snd_max) || tp->t_flags & TF_ACKNOW) + if ((tp->t_flags & TF_ACKNOW) || + (sbavail(&so->so_snd) >= + SEQ_SUB(tp->snd_max, tp->snd_una))) { (void) tcp_output(tp); + } goto check_delack; } } else if (th->th_ack == tp->snd_una && @@ -2585,12 +2595,12 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, */ if (th->th_ack != tp->snd_una || (tcp_is_sack_recovery(tp, &to) && - (sack_changed == SACK_NOCHANGE))) + (sack_changed == SACK_NOCHANGE))) { break; - else if (!tcp_timer_active(tp, TT_REXMT)) + } else if (!tcp_timer_active(tp, TT_REXMT)) { tp->t_dupacks = 0; - else if (++tp->t_dupacks > tcprexmtthresh || - IN_FASTRECOVERY(tp->t_flags)) { + } else if (++tp->t_dupacks > tcprexmtthresh || + IN_FASTRECOVERY(tp->t_flags)) { cc_ack_received(tp, th, nsegs, CC_DUPACK); if (V_tcp_do_prr && @@ -2599,7 +2609,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, tcp_do_prr_ack(tp, th, &to, sack_changed, &maxseg); } else if (tcp_is_sack_recovery(tp, &to) && - IN_FASTRECOVERY(tp->t_flags)) { + IN_FASTRECOVERY(tp->t_flags)) { int awnd; /* @@ -2608,19 +2618,20 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, * we have less than 1/2 the original window's * worth of data in flight. */ - if (V_tcp_do_newsack) + if (V_tcp_do_newsack) { awnd = tcp_compute_pipe(tp); - else + } else { awnd = (tp->snd_nxt - tp->snd_fack) + tp->sackhint.sack_bytes_rexmit; - + } if (awnd < tp->snd_ssthresh) { tp->snd_cwnd += maxseg; if (tp->snd_cwnd > tp->snd_ssthresh) tp->snd_cwnd = tp->snd_ssthresh; } - } else + } else { tp->snd_cwnd += maxseg; + } (void) tcp_output(tp); goto drop; } else if (tp->t_dupacks == tcprexmtthresh || @@ -2688,13 +2699,13 @@ enter_recovery: tp->snd_nxt - tp->snd_una); } if (tcp_is_sack_recovery(tp, &to)) { - TCPSTAT_INC( - tcps_sack_recovery_episode); + TCPSTAT_INC(tcps_sack_recovery_episode); tp->snd_recover = tp->snd_nxt; tp->snd_cwnd = maxseg; (void) tcp_output(tp); - if (SEQ_GT(th->th_ack, tp->snd_una)) + if (SEQ_GT(th->th_ack, tp->snd_una)) { goto resume_partialack; + } goto drop; } tp->snd_nxt = th->th_ack; @@ -2720,8 +2731,7 @@ enter_recovery: * segment. Restore the original * snd_cwnd after packet transmission. */ - cc_ack_received(tp, th, nsegs, - CC_DUPACK); + cc_ack_received(tp, th, nsegs, CC_DUPACK); uint32_t oldcwnd = tp->snd_cwnd; tcp_seq oldsndmax = tp->snd_max; u_int sent; @@ -2743,12 +2753,14 @@ enter_recovery: * or we need to send an ACK. */ SOCKBUF_LOCK(&so->so_snd); - avail = sbavail(&so->so_snd) - - (tp->snd_nxt - tp->snd_una); + avail = sbavail(&so->so_snd); SOCKBUF_UNLOCK(&so->so_snd); - if (avail > 0 || tp->t_flags & TF_ACKNOW) + if (tp->t_flags & TF_ACKNOW || + (avail >= + SEQ_SUB(tp->snd_nxt, tp->snd_una))) { (void) tcp_output(tp); - sent = tp->snd_max - oldsndmax; + } + sent = SEQ_SUB(tp->snd_max, oldsndmax); if (sent > maxseg) { KASSERT((tp->t_dupacks == 2 && tp->snd_limited == 0) || @@ -2757,8 +2769,9 @@ enter_recovery: ("%s: sent too much", __func__)); tp->snd_limited = 2; - } else if (sent > 0) + } else if (sent > 0) { ++tp->snd_limited; + } tp->snd_cwnd = oldcwnd; goto drop; } @@ -3316,9 +3329,9 @@ dodata: /* XXX */ /* * Return any desired output. */ - if (needoutput || (tp->t_flags & TF_ACKNOW)) + if (needoutput || (tp->t_flags & TF_ACKNOW)) { (void) tcp_output(tp); - + } check_delack: INP_WLOCK_ASSERT(inp); @@ -3982,8 +3995,9 @@ tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to, tp->sackhint.sack_bytes_rexmit; } else { if (tp->sackhint.prr_delivered < (tcprexmtthresh * maxseg + - tp->snd_recover - tp->snd_una)) + tp->snd_recover - tp->snd_una)) { del_data = maxseg; + } pipe = imax(0, tp->snd_max - tp->snd_una - imin(INT_MAX / 65536, tp->t_dupacks) * maxseg); } @@ -4009,13 +4023,14 @@ tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to, * - Prevent ACK splitting attacks, by being conservative * when no new data is acked. */ - if ((sack_changed == SACK_NEWLOSS) || (del_data == 0)) + if ((sack_changed == SACK_NEWLOSS) || (del_data == 0)) { limit = tp->sackhint.prr_delivered - tp->sackhint.prr_out; - else + } else { limit = imax(tp->sackhint.prr_delivered - tp->sackhint.prr_out, del_data) + maxseg; + } snd_cnt = imin((tp->snd_ssthresh - pipe), limit); } snd_cnt = imax(snd_cnt, 0) / maxseg; @@ -4033,8 +4048,9 @@ tcp_do_prr_ack(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to, tp->snd_cwnd = (tp->snd_max - tp->snd_una) + (snd_cnt * maxseg); } - } else if (IN_CONGRECOVERY(tp->t_flags)) + } else if (IN_CONGRECOVERY(tp->t_flags)) { tp->snd_cwnd = pipe - del_data + (snd_cnt * maxseg); + } tp->snd_cwnd = imax(maxseg, tp->snd_cwnd); } diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 58f63b593b2a..50dc05e9c55a 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -392,10 +392,10 @@ after_sack_rexmit: * in which case len is already set. */ if (sack_rxmit == 0) { - if (sack_bytes_rxmt == 0) + if (sack_bytes_rxmt == 0) { len = ((int32_t)min(sbavail(&so->so_snd), sendwin) - off); - else { + } else { int32_t cwin; /* @@ -558,12 +558,8 @@ after_sack_rexmit: ipoptlen == 0 && !(flags & TH_SYN)) tso = 1; - if (sack_rxmit) { - if (SEQ_LT(p->rxmit + len, tp->snd_una + sbused(&so->so_snd))) - flags &= ~TH_FIN; - } else { - if (SEQ_LT(tp->snd_nxt + len, tp->snd_una + - sbused(&so->so_snd))) + if (SEQ_LT((sack_rxmit ? p->rxmit : tp->snd_nxt) + len, + tp->snd_una + sbused(&so->so_snd))) { flags &= ~TH_FIN; } diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index f517bb9fcdb7..0c557dc4579d 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -988,12 +988,13 @@ tcp_sack_partialack(struct tcpcb *tp, struct tcphdr *th, u_int *maxsegp) if (tp->t_flags & TF_SENTFIN) highdata--; highdata = SEQ_MIN(highdata, tp->snd_recover); - if (th->th_ack != highdata) { + if (SEQ_LT(th->th_ack, highdata)) { tp->snd_fack = th->th_ack; if ((temp = tcp_sackhole_insert(tp, SEQ_MAX(th->th_ack, - highdata - maxseg), highdata, NULL)) != NULL) - tp->sackhint.hole_bytes += temp->end - - temp->start; + highdata - maxseg), highdata, NULL)) != NULL) { + tp->sackhint.hole_bytes += + temp->end - temp->start; + } } } (void) tcp_output(tp); @@ -1065,27 +1066,33 @@ tcp_sack_adjust(struct tcpcb *tp) struct sackhole *p, *cur = TAILQ_FIRST(&tp->snd_holes); INP_WLOCK_ASSERT(tptoinpcb(tp)); - if (cur == NULL) - return; /* No holes */ - if (SEQ_GEQ(tp->snd_nxt, tp->snd_fack)) - return; /* We're already beyond any SACKed blocks */ + if (cur == NULL) { + /* No holes */ + return; + } + if (SEQ_GEQ(tp->snd_nxt, tp->snd_fack)) { + /* We're already beyond any SACKed blocks */ + return; + } /*- * Two cases for which we want to advance snd_nxt: * i) snd_nxt lies between end of one hole and beginning of another * ii) snd_nxt lies between end of last hole and snd_fack */ while ((p = TAILQ_NEXT(cur, scblink)) != NULL) { - if (SEQ_LT(tp->snd_nxt, cur->end)) + if (SEQ_LT(tp->snd_nxt, cur->end)) { return; - if (SEQ_GEQ(tp->snd_nxt, p->start)) + } + if (SEQ_GEQ(tp->snd_nxt, p->start)) { cur = p; - else { + } else { tp->snd_nxt = p->start; return; } } - if (SEQ_LT(tp->snd_nxt, cur->end)) + if (SEQ_LT(tp->snd_nxt, cur->end)) { return; + } tp->snd_nxt = tp->snd_fack; } From nobody Fri Jan 26 06:20:24 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TLncT01Cbz57gvW; Fri, 26 Jan 2024 06:20: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 4TLncS6g8zz4X7m; Fri, 26 Jan 2024 06:20:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706250024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YxTZkAMflVk3SsW56FMasLx8eukZZvTIfBfhzO/e4A0=; b=clsXe6R+wIqbIm3/4erNAi29QQNxR71s9/xxAw88Bb0X5A9xJ2FbN6eYHdEfTLbrCsiek7 cREzFvABgVWnCNN1x/cZv94wjVRnEBoAC82aTQJ0WBQet4OqxX/CZQouAdzrxXXHiwTvAx R9TUZVFReN3mKrScpx+w8Vw8PNBppZIEqqi5t0e3bXqS+vAPqVNLye2ZkkQO9zrg1SkfB2 r08m+yDtnHyCGy5tKmktkNaTx/odJ2t4c/iehHXlOP2kpjph8m78eGJL50XxIfS+BKtw/Z YwwEas3gKf3Gk4iLNno8wH47m4fyOZAnZn9o2Mlrlj1muy+y/AORlAp3H6o+KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706250024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YxTZkAMflVk3SsW56FMasLx8eukZZvTIfBfhzO/e4A0=; b=RJ80ecHxUek23kL1TdjPBp6trDLXwQRfsqw6HvYKRXShXFcRRjp6wmxtMNB1/Fk8sDp49A LmQkUKCL3vOi5LaNkal7F4rWti38YqhVUxVwfuZLApeOerJFFzmPhukzdm1U0ECK7I2W1S 8Ns6+TvdJzzrtYXliz5HgtmiPKs1heOH1FhLcLMvj0YAOTMmlyaaLiWFB7mTG/KlttxK7X +bgqUe5FVxZApbjQt4lUXkI5JIbhhuvPPNI//PBsF/nQ0UHOJ1Mpo5W0rnd5tJ5ZqUYA+j 9Bmg53ivE1aD2pVquxtTFUTxNJBZg8pIxTSWrOCv0pINEV1B1jocUI/qgClRBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706250024; a=rsa-sha256; cv=none; b=sSHnh1mESKI+Ha/PQRxneXGqsTL/8nbzXAfr4EjCb1Ev5HYFaR6WM3Ai9xtbt5Sl0hP1Lq NJy7jCNi8pH97+ukLl3D0vcLtdlM2/vOmVe4SkE06Q5MtHvN6ixdwC+k6w1eXnMsuN1uC8 97pA9xtid6f0mb5qLfO5fGzvvM1dfPSTP5z8wwangFgpaTdOokN2qQkFQg4lb4wFn6PuEJ inGLeXMy553w0/oBihkDm+04VfmgaEiRPxUDvB0Ahc0kpt5EXrmZdq/1rjiXerAW3hPbGl fMK36UFtcPN+l6U4VZiNay/77TPr+P7Vz5JmIDdunEPb94GgaeOSE8ruTIOYNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TLncS5jfDzWBs; Fri, 26 Jan 2024 06:20:24 +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 40Q6KOFo095975; Fri, 26 Jan 2024 06:20:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40Q6KOnp095972; Fri, 26 Jan 2024 06:20:24 GMT (envelope-from git) Date: Fri, 26 Jan 2024 06:20:24 GMT Message-Id: <202401260620.40Q6KOnp095972@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: b32d49cfbaa0 - main - tests: fix typo in a comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b32d49cfbaa0437d08e65e7cd7c82c5951b1a852 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=b32d49cfbaa0437d08e65e7cd7c82c5951b1a852 commit b32d49cfbaa0437d08e65e7cd7c82c5951b1a852 Author: Gleb Smirnoff AuthorDate: 2024-01-26 06:19:35 +0000 Commit: Gleb Smirnoff CommitDate: 2024-01-26 06:19:59 +0000 tests: fix typo in a comment --- tests/sys/kern/shutdown_dgram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/kern/shutdown_dgram.c b/tests/sys/kern/shutdown_dgram.c index 04382d14f48f..c46c2091a5a0 100644 --- a/tests/sys/kern/shutdown_dgram.c +++ b/tests/sys/kern/shutdown_dgram.c @@ -39,7 +39,7 @@ * shutdown(2) on SOCK_DGRAM shall return ENOTCONN per POSIX. However, there * is historical behavior of the shutdown(2) also unblocking any ongoing * recv(2) syscall on the socket. It is known that some programs rely on this - * behavior, but exact list of problems isn't known. Neither we know if the + * behavior, but exact list of programs isn't known. Neither we know if the * "feature" is required on PF_UNIX sockets or on PF_INET/INET6 sockets or * on both kinds. Feel free to improve this comment if you know any details. * From nobody Fri Jan 26 15:38:31 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TM20R2pv9z58Lwt; Fri, 26 Jan 2024 15:38:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TM20R275Hz4V4d; Fri, 26 Jan 2024 15:38:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706283511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BbmRuPB4qhBtyEz+gGsomiEH79SIEtEVj2PeEGzrrU4=; b=FvtTsibZaPeykowJ6Nqw9efvuZFxLZLZZuLi6bL2aOwXl4/dVn2NNlebTh1PGWcUvB2qOf i+Gx/qkogSGdbzVr7viUhccYG2VcUVmJhoePnre7thPV1ZCK2shZefL8Fv8C2omn3sDYUo BAQfaASxRK2R3XCGOerP6YGihZV5O1b8rDm7pUsocS5VauPVY1Tlyi8mVO8sTvtjE45wEO 5vfqyuNqcOguvzJntaX738nJ7aHs/d6hxY3funHbY3GrxboP6ai+ORD7SHutANyUJXpoM4 AqEBjXp2hUqp+EFU+a0UvkvkWoYLYtONJHnLiHU4y+DWwzIw84N97uGFZtrMGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706283511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BbmRuPB4qhBtyEz+gGsomiEH79SIEtEVj2PeEGzrrU4=; b=QzVzXnT2HPtauQVxZucu330cvxLZcCpIUShag+AUS+DLbIRFHCLLe2Tazu2xasGqBirtfx GrgtIPj3Q7OuFDp3dGXB6cPxRsFrrDD/DyPY7pcx2Sw4kSAy2kDLohDvJNP+mcU0ybuGEb VMRygenGnBTQruP8+wOaDMj3CjmTh8DHuh2FuHDBhOV2ExbZRhbsceCjVfbFZHywajHBb5 APHrp2BRaMFpujEmDJCdcF1QJdHnCXFvVKX+bfac461ySEyiVkyU6sDfVoOHETCpPR6xMB N4NiOOT2/YwwFJO0ZuyEikca5kUaLDqVVm7lJHbTm9Qlgso6JMYF5Pq5iFWgAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706283511; a=rsa-sha256; cv=none; b=bz9oYJsTvAIJQZL0g9umBTtTpKYPtT9SSZ3AJH78Iskee8aP9eDMrpELNIgxUe/Wd24iOt iqy+jrIhQtg09V2HRc16P39gKWUJSfKJ2OTCgDrJ/ieAkcNcXZxP+RmhsLN7Gez6jCXIgX jQ9HuU0XyhmHK6YepQlEubDTcA/3NBzwM/1Ra9kY67RbI0ZHNKX1bsbiMN759JN608Ytkw +sjZQhjTv8Cc+Ap4tHZ0jhc8GWFaZa8x1HzQgW89mvuMRm/Q/hJcIMXUhNGLSptxkAcY5P h6aPF+iGhwcEhdtCQWDR+dVTcynTNlBMhjIVIEk0OAYYSpB3/PwIhzjpJrZvQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TM20R139Bzn7g; Fri, 26 Jan 2024 15:38: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 40QFcVLE027043; Fri, 26 Jan 2024 15:38:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40QFcVBR027040; Fri, 26 Jan 2024 15:38:31 GMT (envelope-from git) Date: Fri, 26 Jan 2024 15:38:31 GMT Message-Id: <202401261538.40QFcVBR027040@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: ea6a6b63e1fd - main - open: make non-POSIX errno value more apparent List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ea6a6b63e1fd304e790c8ed7627caf5e3ba52bc7 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ea6a6b63e1fd304e790c8ed7627caf5e3ba52bc7 commit ea6a6b63e1fd304e790c8ed7627caf5e3ba52bc7 Author: Ed Maste AuthorDate: 2024-01-26 15:19:04 +0000 Commit: Ed Maste CommitDate: 2024-01-26 15:36:32 +0000 open: make non-POSIX errno value more apparent In the errno list, add an explicit note and reference to the note in the STANDARDS section. When O_NOFOLLOW is specified and the target is a symbolic link FreeBSD sets errno to a value different than that specified by POSIX. Commit 295159dfa3ed added a note to this effect, but I missed it when reading through the list of errno values. PR: 214633 Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43618 --- lib/libc/sys/open.2 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/libc/sys/open.2 b/lib/libc/sys/open.2 index df9400e80036..a6859a6c4931 100644 --- a/lib/libc/sys/open.2 +++ b/lib/libc/sys/open.2 @@ -481,6 +481,10 @@ The system file table is full. .It Bq Er EMLINK .Dv O_NOFOLLOW was specified and the target is a symbolic link. +.Tn POSIX +specifies a different error for this case; see the note in +.Sx STANDARDS +below. .It Bq Er ENXIO The named file is a character special or block special file, and the device associated with this special file @@ -643,6 +647,7 @@ is set, and the process is in capability mode. .Sh STANDARDS These functions are specified by .St -p1003.1-2008 . +.Pp .Fx sets .Va errno From nobody Fri Jan 26 15:45:36 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TM28c6cCFz58MW9; Fri, 26 Jan 2024 15:45: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 4TM28c5drnz4WTt; Fri, 26 Jan 2024 15:45:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706283936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7cv80T7BCn/3ckNonyavIel8kDNZkN/OiHZ2pLseGtk=; b=fBeU3xyZyUEPjK6Mm2IB+HKRdbjLvlt5FtPEa69QKnL8l44eGGeS6hH5cJLamgSeiBT/8+ 3XGMuWOemqOiHRk+0pBPqBE9tIX3EXLfQArljTdoLCAHr3GOPuKDiGc92qsifw1LmQ0Q7T 67d6tJemik2tOFj8pl0aVE91Xsfkev4L2dgsFm028a/OHECeTEW/M+xUFqhlH/3Kkdx4qP wiI1g6dsLxETm9AqNPKWxEYPmxL8yTrWbNvdlUcFPqPzi+7GRy7usK6sbp8VxvtHIQGD6Q pjEx/QTQfRuAiL54UajNGBlZ2uKHvZNdhNs3KlAJUMJQoEZAJqGHv05mKtu5LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706283936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7cv80T7BCn/3ckNonyavIel8kDNZkN/OiHZ2pLseGtk=; b=Rscyt0oP5+xrLbq92Smzjq9qzSthrhwvM4D/uMPcZfYEfgUJU8JJ56tftxVZGgMIJ/8OtQ gAM7nfGYy2nUMW4gzA+7CsU+pqZ1JlGX3GM6GOVbkwpM1YrxyPBkH+MVVjE7lCtQpLDxLH u3KlfS1r7BGvqhpp7cxO39mm3tCNJMr1qNrQ3IWhdnAtkBT49ZrGvOr5nhXXKpGAYap7zg CIBDe37sR4qYGhRk35ff/FH8Vm8Nc9M9xrLFyUSzyt31hbSYnM6hMBEHQTj3m/NnM6EM3w CiiOjzCTOcdseLKo8z049rmtk8m8u2S3+fl0CgZWJ/aI/PjsnTPoFLZuv3K0OQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706283936; a=rsa-sha256; cv=none; b=mZdXldVKjAJcCQPerzrURcisB6qq7AVqI8NgZtDWH2hwO7fv2bylU/XHIUbKQzFH9GCqRL 4Z7c3m16hHIn+/Bkzw+kBarKFbXqjjxx51KgNnrCxl/sJcLNpkWM9y4B6r+iY6S1o8m++s qn6xG3zeqITuU+pt/1E463jb2e5+p6YFy02asT747VIeoqGAA7RjgcPmoZ8kwKUS0LF9VU Q/N/28QMb2ViX25pQqwApFVvl6TDrDQHLBv7+Dw6vkGIgaLMCUbPghg/VDJ38YTPx3NUay z25UFYvPdGJq5V9xuDKEGK6M6eMidJBRvhQmhQiWY9zTr4CmmfgcwpcblAsAyg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TM28c4hBKznZ6; Fri, 26 Jan 2024 15:45: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 40QFjalg043216; Fri, 26 Jan 2024 15:45:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40QFjaMF043214; Fri, 26 Jan 2024 15:45:36 GMT (envelope-from git) Date: Fri, 26 Jan 2024 15:45:36 GMT Message-Id: <202401261545.40QFjaMF043214@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 90372a9e3cda - main - arm64: Remove pmap_san_bootstrap() and call kasan_init_early() directly List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 90372a9e3cda838914bc8518dbc4340906351e98 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=90372a9e3cda838914bc8518dbc4340906351e98 commit 90372a9e3cda838914bc8518dbc4340906351e98 Author: Mark Johnston AuthorDate: 2024-01-26 15:35:40 +0000 Commit: Mark Johnston CommitDate: 2024-01-26 15:42:34 +0000 arm64: Remove pmap_san_bootstrap() and call kasan_init_early() directly pmap_san_bootstrap() doesn't really do much, and it was hard-coding the the bootstrap stack size defined in locore.S. Moreover, the name is a bit confusing given the existence of pmap_bootstrap_san(). Just remove it and call kasan_init_early() directly like we do on amd64. It will not be used by KMSAN in a forthcoming patch series. No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D43403 --- sys/amd64/include/pmap.h | 1 - sys/arm64/arm64/locore.S | 11 +++++++++-- sys/arm64/arm64/pmap.c | 6 ------ sys/arm64/include/pmap.h | 1 - 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 17df8d0b8fde..cb95b311a3b9 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -495,7 +495,6 @@ void pmap_page_array_startup(long count); vm_page_t pmap_page_alloc_below_4g(bool zeroed); #if defined(KASAN) || defined(KMSAN) -void pmap_san_bootstrap(void); void pmap_san_enter(vm_offset_t); #endif diff --git a/sys/arm64/arm64/locore.S b/sys/arm64/arm64/locore.S index 8b0564298296..b246ed3f2a41 100644 --- a/sys/arm64/arm64/locore.S +++ b/sys/arm64/arm64/locore.S @@ -45,6 +45,11 @@ #define L3_PAGE_COUNT 32 #endif +/* + * The size of our bootstrap stack. + */ +#define BOOT_STACK_SIZE (KSTACK_PAGES * PAGE_SIZE) + .globl kernbase .set kernbase, KERNBASE @@ -147,7 +152,9 @@ virtdone: mov x19, x0 /* Bootstrap an early shadow map for the boot stack. */ - bl pmap_san_bootstrap + ldr x0, [x0, #BP_KERN_STACK] + ldr x1, =BOOT_STACK_SIZE + bl kasan_init_early /* Restore bootparams */ mov x0, x19 @@ -880,7 +887,7 @@ END(abort) .bss .align PAGE_SHIFT initstack: - .space (PAGE_SIZE * KSTACK_PAGES) + .space BOOT_STACK_SIZE initstack_end: .section .init_pagetable, "aw", %nobits diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 134ad187130c..f44371080c91 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -7864,12 +7864,6 @@ pmap_pte_bti(pmap_t pmap, vm_offset_t va __diagused) #if defined(KASAN) static pd_entry_t *pmap_san_early_l2; -void __nosanitizeaddress -pmap_san_bootstrap(struct arm64_bootparams *abp) -{ - kasan_init_early(abp->kern_stack, KSTACK_PAGES * PAGE_SIZE); -} - #define SAN_BOOTSTRAP_L2_SIZE (1 * L2_SIZE) #define SAN_BOOTSTRAP_SIZE (2 * PAGE_SIZE) static vm_offset_t __nosanitizeaddress diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index efbf7eaaae91..4b4d47ccc7af 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -194,7 +194,6 @@ struct arm64_bootparams; void pmap_bootstrap_san(void); void pmap_san_enter(vm_offset_t); -void pmap_san_bootstrap(struct arm64_bootparams *); #endif #endif /* _KERNEL */ From nobody Fri Jan 26 17:48:51 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TM4tq3qDtz58Xxp; Fri, 26 Jan 2024 17:48: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 4TM4tq3HGNz3xC8; Fri, 26 Jan 2024 17:48:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706291331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X+7hpcgXh+kNZ0RLL4S823/qBuFWcnCdyT0sWKOADlA=; b=FqoAHYTEaOiviGPbtLNyvZhNFC9B74s/Q15Lh8XbwV9Hdxg+uDScIkRd/7M45Ee1EpjkTh KjaqL0mQQlQxfcVibUQzMm0JRuLTmqXfUg3EvIRi6w8I4/H8Ki930o29MUMwFcvlv08hcU Lgt/F7S3uVKrQFp6tzEPYz+Pvj90XLobglP2iK9ftoVlFcLc0nS3/f8bJ7HTrCYZjYlGvE 8MOA+36HMqgEH4CfWE52M33v9bqex2/1yD4kWgVp5zjPriVQGMMgmB5BPgyunigCLkUmhM TngYs+hKz0tqQhtljoPyS/p5+pvmuu4DQKQHe6yEBhxWGjX04d0z5hRV9FANew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706291331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X+7hpcgXh+kNZ0RLL4S823/qBuFWcnCdyT0sWKOADlA=; b=yfwbBkiA4x5d/Z75XeLF/zfg+IDx6KYGVRmtYsZwBqtZzwovEFaIHH4rJqygiMQQFn3rq5 4wR+vyJ8p6J5Pu/pL6P3E5zgSox4+P4a2g/ph/5ejGsi2n1o4pUuNd2Q2awmCIl/0kzGwO u7hJ3lojw1If7osXYYF/SfDDNWzcAJZ4E+0ix/dXGi5Jl36LpOaSN7KIRvpURjC/SwLfSn mRGOi6l60l2S4XzoTXf9x2t7nbSNaf49oMquVkNkvc2SvXT+qKWhrx5X3hJ6N5F5wWZVbE zPhzcXQkqxLQ1qrHaYOHuaLyFmEpB7NvDVKP1edTLsAdl8z6dxL0s6bOvCJtEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706291331; a=rsa-sha256; cv=none; b=XzDzstUvDFjVG59sC8d5MnvEFI7XPqzPhXv3oQWuwMzvGGJo380BykpxspErxXMgD1aojq fsVvMQAQ9OCmMKfv4TIlgmECcuBVHidABviUpX8oiswUHBqnHGQ2j0NWuUiuD8AL/Cjfkj ChoEzay8YyesQQUMZbcenFrXfME+zJ5nEZP3Rhf7qwmuUmO+HzhJy0QvusOOcpnPPWl/yV hHZDr6k9/lO3r7as71kuKO9hXAXY91JePF9ouzhbor6G+gilJKazZ0SLZCb5K6nQYqtdtq EGOGEIzklhfvVETrvWmFSDw4PyxKexPlQUl+hirI1RqrxecIYkwhbDVIJMF+Yw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TM4tq1wKfzrcx; Fri, 26 Jan 2024 17:48: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 40QHmp5D047761; Fri, 26 Jan 2024 17:48:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40QHmplP047758; Fri, 26 Jan 2024 17:48:51 GMT (envelope-from git) Date: Fri, 26 Jan 2024 17:48:51 GMT Message-Id: <202401261748.40QHmplP047758@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jamie Gritton Subject: git: ab0841bdbe84 - main - jail: expose children.max and children.cur via sysctl List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jamie X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab0841bdbe8460db6eb77e0228a08812ce74d583 Auto-Submitted: auto-generated The branch main has been updated by jamie: URL: https://cgit.FreeBSD.org/src/commit/?id=ab0841bdbe8460db6eb77e0228a08812ce74d583 commit ab0841bdbe8460db6eb77e0228a08812ce74d583 Author: Jamie Gritton AuthorDate: 2024-01-26 17:45:40 +0000 Commit: Jamie Gritton CommitDate: 2024-01-26 17:45:40 +0000 jail: expose children.max and children.cur via sysctl Submitted by: Igor Ostapenko Differential Revision: --- sys/kern/kern_jail.c | 29 +++++++++++ sys/kern/sysctl_security_jail_children.sh | 80 +++++++++++++++++++++++++++++++ tests/sys/kern/Makefile | 2 + 3 files changed, 111 insertions(+) diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 0ae1d9a02f60..fb674b991a73 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -4468,6 +4468,35 @@ SYSCTL_PROC(_security_jail, OID_AUTO, devfs_ruleset, sysctl_jail_default_level, "I", "Ruleset for the devfs filesystem in jail (deprecated)"); +SYSCTL_NODE(_security_jail, OID_AUTO, children, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, + "Limits and stats of child jails"); + +static int +sysctl_jail_children(SYSCTL_HANDLER_ARGS) +{ + struct prison *pr; + int i; + + pr = req->td->td_ucred->cr_prison; + + switch (oidp->oid_kind & CTLTYPE) { + case CTLTYPE_INT: + i = *(int *)((char *)pr + arg2); + return (SYSCTL_OUT(req, &i, sizeof(i))); + } + + return (0); +} + +SYSCTL_PROC(_security_jail_children, OID_AUTO, max, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, + NULL, offsetof(struct prison, pr_childmax), sysctl_jail_children, + "I", "Maximum number of child jails"); +SYSCTL_PROC(_security_jail_children, OID_AUTO, cur, + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, + NULL, offsetof(struct prison, pr_childcount), sysctl_jail_children, + "I", "Current number of child jails"); + /* * Nodes to describe jail parameters. Maximum length of string parameters * is returned in the string itself, and the other parameters exist merely diff --git a/sys/kern/sysctl_security_jail_children.sh b/sys/kern/sysctl_security_jail_children.sh new file mode 100644 index 000000000000..0423cf1e8a59 --- /dev/null +++ b/sys/kern/sysctl_security_jail_children.sh @@ -0,0 +1,80 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 Igor Ostapenko +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +# +# Even being is_exclusive="true" this test does not expect a host to spawn +# other jails during the test execution. +# +atf_test_case "max_cur" "cleanup" +max_cur_head() +{ + atf_set descr 'Test maximum and current number of child jails' + atf_set require.user root +} +max_cur_body() +{ + origin_max=$(sysctl -n security.jail.children.max) + origin_cur=$(sysctl -n security.jail.children.cur) + + # Magic numbers reasoning: + # 3 stands for: + # - the test creates three jails: childfree, maxallowed, maxallowed.family + # 6 stands for: + # - maxallowed.family wants to set children.max=4 + # - it means that its parent (maxallowed) should have at least children.max=5 + # - it makes the origin (parent of maxallowed) provide children.max=6 minimum + # + test $origin_cur -le $origin_max || atf_fail "Abnormal cur=$origin_cur > max=$origin_max." + test $((origin_max - origin_cur)) -ge 3 || atf_skip "Not enough child jails are allowed for the test." + test $origin_max -ge 6 || atf_skip "Not high enough children.max limit for the test." + + jail -c name=childfree persist + atf_check_equal "$((origin_cur + 1))" "$(sysctl -n security.jail.children.cur)" + atf_check_equal "0" "$(jexec childfree sysctl -n security.jail.children.max)" + atf_check_equal "0" "$(jexec childfree sysctl -n security.jail.children.cur)" + + jail -c name=maxallowed children.max=$((origin_max - 1)) persist + atf_check_equal "$((origin_cur + 2))" "$(sysctl -n security.jail.children.cur)" + atf_check_equal "$((origin_max - 1))" "$(jexec maxallowed sysctl -n security.jail.children.max)" + atf_check_equal "0" "$(jexec maxallowed sysctl -n security.jail.children.cur)" + + jexec maxallowed jail -c name=family children.max=4 persist + atf_check_equal "$((origin_cur + 3))" "$(sysctl -n security.jail.children.cur)" + atf_check_equal "1" "$(jexec maxallowed sysctl -n security.jail.children.cur)" + atf_check_equal "4" "$(jexec maxallowed.family sysctl -n security.jail.children.max)" + atf_check_equal "0" "$(jexec maxallowed.family sysctl -n security.jail.children.cur)" +} +max_cur_cleanup() +{ + jail -r maxallowed + jail -r childfree + return 0 +} + +atf_init_test_cases() +{ + atf_add_test_case "max_cur" +} diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index 7b5d87ff30ac..5a7e27319ddb 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -59,6 +59,8 @@ ATF_TESTS_SH+= sonewconn_overflow TEST_METADATA.sonewconn_overflow+= required_programs="python" TEST_METADATA.sonewconn_overflow+= required_user="root" ATF_TESTS_SH+= sendfile_test +ATF_TESTS_SH+= sysctl_security_jail_children +TEST_METADATA.sysctl_security_jail_children+= is_exclusive="true" ${PACKAGE}FILES+= sonewconn_overflow.py ${PACKAGE}FILESMODE_sonewconn_overflow.py=0555 From nobody Fri Jan 26 21:11:27 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TM9Nb3GPVz58r55; Fri, 26 Jan 2024 21:11: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 4TM9Nb2j9mz4R8F; Fri, 26 Jan 2024 21:11:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706303487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n/Evg1IeKMGhgLJ6QLIVR1NIRbIKjgeZBeGox/TQKBs=; b=CGwmDsrWOZH/fAFxjHlScGD7WvISNTv0l/KGZ4tIQDebu4bM1UI9A71L1M0nmF6aO3qYBQ ZfS6VemN2Dxtm3D9GYpl25b4z5S0bnnLZZi98hZxEShuUTk/mM4z/PgCm5/xfNZWPDJQeH 37Dh1SJlnnT8UDd7UKTWE3btHDs/lIvdwvNLPh4P2WaKS8sHlqpfW24jy/CYl1zfqnL8ZB 5GidPdXgCN55+7/8+owJkJZaX1iijrYYmsgEYff/KuDhd51F+tn1XQDgEoUNPwRcnrAHrl gIGDuyFNAvrDN1RbyDfOJAEvZPHr07cipN38JjlJ4z6KSzMmVVZauCebvVNzBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706303487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n/Evg1IeKMGhgLJ6QLIVR1NIRbIKjgeZBeGox/TQKBs=; b=d9YAg8Fcmemc2cbVPMkvjHd8lsMhbmKpe+NHCdidvNbC/jgzc09I3guv+Y9DhkHdVCGUi5 UY914bFtuMrUCf4ajbZJAeyoE/2+JeV9waDaPrezML2l7hPiimPzoRE3jhUiGVcZt8q0Dy kwSqknG1TLjiTE2j+zgNsNqaITZkFEaRA8ZthB7503cs2uIvGrRp6aB1BFOh08MKplM98F S/lltIJyWsjIlid2WRyd13ey+95atzwynlD6tMbjohYXixJijFblyFynamQqRSncxIIvMA Ea2UqE8qTN3Rae/neWWz1CZ+0tRFIDl5bx3LM79mSQyi+rnfVsQW2e+GQJlwDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706303487; a=rsa-sha256; cv=none; b=GVF935jeQi6gExhJdt4DNF2bum+LSCp+FLuRWmLD/LqqGuyxwmDbGLodQGH+hc6w3oNN0z 99TfHRYXnyR/zyVjVnpJy1JzTYkaF2UZt2yPQK/FNmDTW04aQ/SoYUqKQv+IsNBsAtBBaz v+7qsyCzaXWoP1ULJKDr5NId3lMizC2ubexPC6ZNWiV4wZB6k/ZsYChU1qz0Nn7/a1XsIv 5nudtTdPUXDManqjU7DLCgjvesKoIIrrlXErj5yKIn05vLmOeXlrHYpAbAGTVzXLTWWhd0 YKPFgBD0SiRD2ZlafD0gZfEq7VJfZmvlJ1luZA67akpa38dejXo6MAjdGdhLmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TM9Nb1mXdzxVB; Fri, 26 Jan 2024 21:11: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 40QLBR9B093984; Fri, 26 Jan 2024 21:11:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40QLBROv093981; Fri, 26 Jan 2024 21:11:27 GMT (envelope-from git) Date: Fri, 26 Jan 2024 21:11:27 GMT Message-Id: <202401262111.40QLBROv093981@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: eaed922eda58 - main - panic()/KERNEL_PANICKED(): Move back to using 'panicstr' as a flag List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: eaed922eda584da7306e7c371ff6adf3fc4dc4c3 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=eaed922eda584da7306e7c371ff6adf3fc4dc4c3 commit eaed922eda584da7306e7c371ff6adf3fc4dc4c3 Author: Olivier Certner AuthorDate: 2024-01-18 10:15:18 +0000 Commit: Olivier Certner CommitDate: 2024-01-26 21:07:56 +0000 panic()/KERNEL_PANICKED(): Move back to using 'panicstr' as a flag Currently, no performance-critical path tests for a panic. Moreover, we today have KERNEL_PANICKED() which wraps the test into __predict_false(), already catering to those (potential) use cases. Also, in practice we don't support 64-bit architectures without caches, so reading an 'int' instead of a pointer doesn't (directly) save any memory access. Finally, 'panicked' is redundant with 'panicstr' (and wastes a tiny amount of memory). Consequently: 1. Use again 'panicstr' as a flag indicating that the system is panicking. To this end: - Modify panic() so that it ensures this pointer is set to some non-NULL value even if the caller didn't pass any panic string. - Modify KERNEL_PANICKED() to test for 'panicstr'. - Remove 'panicked'. 2. Annotate 'panicstr' with '__read_mostly' (instead of using '__read_frequently' as for 'panicked'). This may have to be changed if, in the future, some performance-intensive path needs to test it. 3. Convert a few more direct tests of 'panicstr' to using KERNEL_PANICKED(). Reviewed by: kib, markj, emaste Approved by: markj (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43569 --- sys/kern/kern_shutdown.c | 15 +++++++++++---- sys/sys/kassert.h | 3 +-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 3b0e3997c852..d66c7ba0d344 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -224,8 +224,7 @@ SYSCTL_INT(_kern, OID_AUTO, kerneldump_gzlevel, CTLFLAG_RWTUN, * Variable panicstr contains argument to first call to panic; used as flag * to indicate that the kernel has already called panic. */ -const char *panicstr; -bool __read_frequently panicked; +const char *panicstr __read_mostly; int __read_mostly dumping; /* system is dumping */ int rebooting; /* system is rebooting */ @@ -899,6 +898,15 @@ vpanic(const char *fmt, va_list ap) int bootopt, newpanic; static char buf[256]; + /* + * 'fmt' must not be NULL as it is put into 'panicstr' which is then + * used as a flag to detect if the kernel has panicked. Also, although + * vsnprintf() supports a NULL 'fmt' argument, use a more informative + * message. + */ + if (fmt == NULL) + fmt = ""; + spinlock_enter(); #ifdef SMP @@ -907,7 +915,7 @@ vpanic(const char *fmt, va_list ap) * concurrently entering panic. Only the winner will proceed * further. */ - if (panicstr == NULL && !kdb_active) { + if (!KERNEL_PANICKED() && !kdb_active) { other_cpus = all_cpus; CPU_CLR(PCPU_GET(cpuid), &other_cpus); stop_cpus_hard(other_cpus); @@ -927,7 +935,6 @@ vpanic(const char *fmt, va_list ap) else { bootopt |= RB_DUMP; panicstr = fmt; - panicked = true; newpanic = 1; } diff --git a/sys/sys/kassert.h b/sys/sys/kassert.h index 7b54ac6ae519..da8701ce3858 100644 --- a/sys/sys/kassert.h +++ b/sys/sys/kassert.h @@ -35,8 +35,7 @@ #ifdef _KERNEL extern const char *panicstr; /* panic message */ -extern bool panicked; -#define KERNEL_PANICKED() __predict_false(panicked) +#define KERNEL_PANICKED() __predict_false(panicstr != NULL) /* * Trap accesses going through a pointer. Moreover if kasan is available trap From nobody Fri Jan 26 21:11:28 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TM9Nc4KRjz58r2p; Fri, 26 Jan 2024 21:11: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 4TM9Nc3Yjjz4Qsf; Fri, 26 Jan 2024 21:11:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706303488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UdmNPisAJ8u6Agmem6YdZrAZ0FLWY2wcaUfGmHCN8GI=; b=QAjkZe/EDQbapbk/BCxi5tx45v8BsLLs5RdAGc4loWy2dA4KCogwSiObVwsaMGwbxzbDlW BG6JhdrTkKo+VCAwL7HZv2WarGp0//Ag15ShtkS+ozKC3NIrxRIKIa1EE+qkzFZ6LlnjM1 faNLe+4bz4mvUcoxUFT1B9PrH6v5uNVLX8o3VmyL1Ol8kJxtdE3r9M3bH+YO0oF+UMW2mS IHUaZMY04oYfNWTKSBLcTs8KjSRYBScSs3bxNTfnhZk61Ft26Kp91g6P3GvY/v4JogqhF4 dU5TYorYhMNSAuwytB70xPsLvh3Sn0LA0nOEsONIVSZFgvmDw+qysdTLQYEUPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706303488; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UdmNPisAJ8u6Agmem6YdZrAZ0FLWY2wcaUfGmHCN8GI=; b=OuvQllvTREsG8cmGe3+kx14Zpnsm6ln7Lkg557teZ+zldpQ6h/nfZp7rK1sHYoSg8rYVr4 gcsWPjjah6N3Z2o3z2LkYJlqNUZX+mV3TiBuir8UUTDrgzCcKBx8Hd943fmvaik7yk+lqB KU1W99XYJhE/zeqCeurKNyRzY4HBaf5kmtPqJrsmJeuFHiXk1I3v4VKKNsOtKIswjJhJJs SHYKYJvKAFWkIp0uRdwWm/5sE1ibXoEIDi37u1nux18ARDwPbl5M+pqiJY3l33Q5EGmrpO rjn2zhAyZcqollo0SUn54RREVBktRq13rAHaNcdS5U0qMW3+tF+hO54aNM96sQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706303488; a=rsa-sha256; cv=none; b=WUoh9l7v0/QNG+An1SxDmp7i2qZudgccSzCk7SYypKq2G2wxaiGkHIQQQkuGH03DsUdIob T5fWRQqYS+C/6dVppYUUGqRJ3pXUzDNshE6/MSwk0h+GILS/fxl5n4QU0nJ10RwHDXFmQp Ms38rtHnNrzVt+92mRuDIjDEf/XqB1OlLK3MCQKTjvFKzlDPW4MTtX2syZfd18P7QEczfS pa1rOmm2y+SNfImr+VbumOESyM3/9znGkBkrut80dZ8rdgz7wD/3NJh4ABwOdJFt2UA7kl E0g48ieRKFXVp8GlWuUo11EEom7bDdTK54mKH7goFvjJZn2A2VnH1jiMFg8yzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TM9Nc2cfszxXn; Fri, 26 Jan 2024 21:11: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 40QLBS3P094023; Fri, 26 Jan 2024 21:11:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40QLBSaG094020; Fri, 26 Jan 2024 21:11:28 GMT (envelope-from git) Date: Fri, 26 Jan 2024 21:11:28 GMT Message-Id: <202401262111.40QLBSaG094020@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 12d6a032dff1 - main - Annotate 'rebooting' with __read_mostly List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 12d6a032dff10fad72f7d3f1bb5cb4c53b9c4284 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=12d6a032dff10fad72f7d3f1bb5cb4c53b9c4284 commit 12d6a032dff10fad72f7d3f1bb5cb4c53b9c4284 Author: Olivier Certner AuthorDate: 2024-01-18 10:22:28 +0000 Commit: Olivier Certner CommitDate: 2024-01-26 21:09:10 +0000 Annotate 'rebooting' with __read_mostly While here, put such annotation after the variable for 'dumping', since it concerns the variable and not the type. Reviewed by: markj Approved by: markj (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43570 --- sys/kern/kern_shutdown.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index d66c7ba0d344..17d40ff0429c 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -226,8 +226,8 @@ SYSCTL_INT(_kern, OID_AUTO, kerneldump_gzlevel, CTLFLAG_RWTUN, */ const char *panicstr __read_mostly; -int __read_mostly dumping; /* system is dumping */ -int rebooting; /* system is rebooting */ +int dumping __read_mostly; /* system is dumping */ +int rebooting __read_mostly; /* system is rebooting */ /* * Used to serialize between sysctl kern.shutdown.dumpdevname and list * modifications via ioctl. From nobody Fri Jan 26 21:11:29 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TM9Nd5yCLz58r2v; Fri, 26 Jan 2024 21:11: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 4TM9Nd4Knpz4R1N; Fri, 26 Jan 2024 21:11:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706303489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LaCoiRmWJw+jZubiHdgHG3oZT4fY8IepEmdEu9sLtCM=; b=fN10aqNZeZ6LqXmi+RWvcDLHYfY9KK9nmu9cLI46ndNWgMF8hmAKd0liewRzbMWii2a5FI 0KikEpIjFF/lUpk8umEBn8asG/5QL63OarEunWgqYD0HK6gfUmX1aZe+XEL3UEUH9jtZEL fuowlrvuxSbB1zk6WjaF8dfOCT5Ibu0HPebGnpBrowz/SWV1ngLP6g526KvyT+IuVMXA7k mWvw40rberh7nUdk+A5tpryF7yl3cJgOmeE9slCxl2b56y0uIckdc6b1zK54BC4fd5BvNY m7cjsZkJRQsyNtdtniSP9y6b8JZ0C3SAGK1Wcy3rTYBd9bddJJ10Ps0RjruYTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706303489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LaCoiRmWJw+jZubiHdgHG3oZT4fY8IepEmdEu9sLtCM=; b=ZMGgVBqXUFyUbJKH1zNv7xEeIUl2rQoT3REoC3g0rk75f5I/rBzPZ4kPRBNKPrpA17BbRV VtJU0GvExASkEVIHQrbAcXq1ULQWkrZZCriGUai8hc0oQY/4EBNxIgTZjA1fnGU/i0b6L0 U/vW7J+V2meJs6/U24bLyG2w9PrGBR5CX9OiGYoBn5gDz9idOsOgq8zkieBIii+VI2SvKe 2zrAFBrGBD7Y1eWaUUK1XaVL05dHxfD8DOMkaMd/Sm5hT21h/cYnMdsr/LWprEfheTT71c AQBzxYJXmztR9NXHAAfxrGLhYbxPOMsfkvsdbgnj4dPfXETJ52wpyGrslUVEzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706303489; a=rsa-sha256; cv=none; b=r0cbrnUWLx57vzFZaQOBBomE3y5ADzKgTTg6Mf23FcHXbpJNBxLfQ6HZrOu8IZn6MNifvP L3M/PBW4sj69C0i2d3ZsMCHbyRE1p9ot2lVWL45LdYyggR5tMD0H8IqsU3JTTBxZX0FdVe 1gz04K6HKiFj4NzquzJVg0QAvd7yIq1Y3/0M4zrUqerW3IT1PdnKUxzp8AGEedv3WfhdYI wtgIvDw53CUhUvtHVnCZy/V8YPH5Ba5F7N34R1wKzVE37E4b6gFi4fN2OKvOAjBVx9bwx0 +Fiq8R/iofKDKlrbv7Nzz5Lflm2tC6tktHEGe6shBaFL8AV/V9ZKBVczfwOZFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TM9Nd3Nypzx0S; Fri, 26 Jan 2024 21:11: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 40QLBTl1094068; Fri, 26 Jan 2024 21:11:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40QLBTYZ094065; Fri, 26 Jan 2024 21:11:29 GMT (envelope-from git) Date: Fri, 26 Jan 2024 21:11:29 GMT Message-Id: <202401262111.40QLBTYZ094065@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: cd0c52e50bc1 - main - SCHEDULER_STOPPED(): Move it (back) to 'systm.h' List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd0c52e50bc17f4c3fab998f9f33b1d3ada6c90e Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=cd0c52e50bc17f4c3fab998f9f33b1d3ada6c90e commit cd0c52e50bc17f4c3fab998f9f33b1d3ada6c90e Author: Olivier Certner AuthorDate: 2024-01-18 10:31:59 +0000 Commit: Olivier Certner CommitDate: 2024-01-26 21:09:16 +0000 SCHEDULER_STOPPED(): Move it (back) to 'systm.h' It's not an assertion, so doesn't logically belong to 'kassert.h'. Moreover, a subsequent commit will make it rely on a variable whose declaration also belongs to 'systm.h'. Approved by: markj (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43571 --- sys/sys/kassert.h | 11 ----------- sys/sys/systm.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/sys/sys/kassert.h b/sys/sys/kassert.h index da8701ce3858..25e2b025a11a 100644 --- a/sys/sys/kassert.h +++ b/sys/sys/kassert.h @@ -179,17 +179,6 @@ void kassert_panic(const char *fmt, ...) __printflike(1, 2); #define CRITICAL_ASSERT(td) \ KASSERT((td)->td_critnest >= 1, ("Not in critical section")) -/* - * If we have already panic'd and this is the thread that called - * panic(), then don't block on any mutexes but silently succeed. - * Otherwise, the kernel will deadlock since the scheduler isn't - * going to run the thread that holds any lock we need. - */ -#define SCHEDULER_STOPPED_TD(td) ({ \ - MPASS((td) == curthread); \ - __predict_false((td)->td_stopsched); \ -}) -#define SCHEDULER_STOPPED() SCHEDULER_STOPPED_TD(curthread) #endif /* _KERNEL */ #endif /* _SYS_KASSERT_H_ */ diff --git a/sys/sys/systm.h b/sys/sys/systm.h index c684f3365c35..0d3f9fe98893 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -99,6 +99,18 @@ struct ucred; #include /* curthread */ #include +/* + * If we have already panic'd and this is the thread that called + * panic(), then don't block on any mutexes but silently succeed. + * Otherwise, the kernel will deadlock since the scheduler isn't + * going to run the thread that holds any lock we need. + */ +#define SCHEDULER_STOPPED_TD(td) ({ \ + MPASS((td) == curthread); \ + __predict_false((td)->td_stopsched); \ +}) +#define SCHEDULER_STOPPED() SCHEDULER_STOPPED_TD(curthread) + extern int osreldate; extern const void *zero_region; /* address space maps to a zeroed page */ From nobody Fri Jan 26 21:11:30 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TM9Ng1Pgsz58r9y; Fri, 26 Jan 2024 21:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TM9Nf5bnWz4RBt; Fri, 26 Jan 2024 21:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706303490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/TrKWhsu6JaWAOUo9LmXVdEQtc3m0pTH2Au9HeuOQag=; b=L4Cv9STzQ2eIeoi4+tbFBCFYcTImjDVgP24MqzzqV7leBLc1CJO5FKmHopKvVYYJQcZ//Y BFjtD0RxMB7nfNAAm5lHGUkR3rSoOuURv69wtKHQWsFLQJLCweMnMvpKblF3r7zavvuw97 ++N7y/SIhEx+OFJrOJRyY7bL5bq/ZXb04D4hYkxnWddP7swnl+RUQ7qS5Uwsebp/485EYn Q+M8iJQtFTUS1BKEaekC+72R/lQnssN7ZUxVwkaZW3UiLXb4XlduqV8bo5a8tPz3iC0AId GFOuHy6o0NqvbmeYuqSkIMqeTBNUWfrp3j6jNq3GCWSex5j0xrx3sRAWTfb9CA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706303490; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/TrKWhsu6JaWAOUo9LmXVdEQtc3m0pTH2Au9HeuOQag=; b=lcD7FypjRHo7fZsjwsHsJLhcr+yp/DODBkS6OZdcCotlZWW2Dp7/X8dU/nzloaWnCuEj9p 450GmDGX0jn66azPtooxQk6CwoddacATD+NYCNqG8x1NEWjbpT6U3ntdPzs4FvRH6SJHVf gFgCqtxNNMW3WkvTn80f5V6opLC8MAf5LJ/VnPpgTc/TqE0lopSxBTASDeiu6JClQK51yS DcbEKCdHZKMdf8QMgMVZwOzvjqj22slNNWEP+McW/SBhYZKg1bIwWWx3JvqfY/eLQh8uS0 VyFtUfJoLOui92GtYbrFjBbrbt84V0SsAgLNqe6Hu3rc8zE1Uim1/8aIRfYDQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706303490; a=rsa-sha256; cv=none; b=YFm1lKA38cGDsaeXsf6IeKLyOtrs4GXCTOFWpNqLAUjimysIPe/2h5Sk1IdroV5OomzOER +cKJWqs/H/CvGuHs5PCfJG28TTnzpE+MTQlkt5zE2CZQO4u67/negYLfGfOH7i/6Qai3Q9 fyX9uT+3Y2tWESQxPFmASAjuh4owVqyAWSBXyDI4e5MSBmjFNq+rH24+LzsmZJj1Qr4Hhi i+x9Yyk9npWAkmpsQSGBgwHjhT9PnkjgEcnfxT096fM007dj/rQ6kVWD8+RQb1qecDVZBJ Y2676XgjzBeGlF7Dhxa18mQPM0Eq+Z8OCeU+/nbgUCcrpuWP5n9KRnDSdY8gEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TM9Nf4jQGzx34; Fri, 26 Jan 2024 21:11: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 40QLBUuv094115; Fri, 26 Jan 2024 21:11:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40QLBUGw094112; Fri, 26 Jan 2024 21:11:30 GMT (envelope-from git) Date: Fri, 26 Jan 2024 21:11:30 GMT Message-Id: <202401262111.40QLBUGw094112@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 6b3531017348 - main - SCHEDULER_STOPPED(): Rely on a global variable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b35310173482a100304bf9129e1c9ac9e0e6d06 Auto-Submitted: auto-generated The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=6b35310173482a100304bf9129e1c9ac9e0e6d06 commit 6b35310173482a100304bf9129e1c9ac9e0e6d06 Author: Olivier Certner AuthorDate: 2024-01-18 13:10:18 +0000 Commit: Olivier Certner CommitDate: 2024-01-26 21:09:38 +0000 SCHEDULER_STOPPED(): Rely on a global variable A commit from 2012 (5d7380f8e34f0083, r228424) introduced 'td_stopsched', on the ground that a global variable would cause all CPUs to have a copy of it in their cache, and consequently of all other variables sharing the same cache line. This is really a problem only if that cache line sees relatively frequent modifications. This was unlikely to be the case back then because nearby variables are almost never modified as well. In any case, today we have a new tool at our disposal to ensure that this variable goes into a read-mostly section containing frequently-accessed variables ('__read_frequently'). Most of the cache lines covering this section are likely to always be in every CPU cache. This makes the second reason stated in the commit message (ensuring the field is in the same cache line as some lock-related fields, since these are accessed in close proximity) moot, as well as the second order effect of requiring an additional line to be present in the cache (the one containing the new 'scheduler_stopped' boolean, see below). From a pure logical point of view, whether the scheduler is stopped is a global state and is certainly not a per-thread quality. Consequently, remove 'td_stopsched', which immediately frees a byte in 'struct thread'. Currently, the latter's size (and layout) stays unchanged, but some of the later re-orderings will probably benefit from this removal. Available bytes at the original position for 'td_stopsched' have been made explicit with the addition of the '_td_pad0' member. Store the global state in the new 'scheduler_stopped' boolean, which is annotated with '__read_frequently'. Replace uses of SCHEDULER_STOPPED_TD() with SCHEDULER_STOPPER() and remove the former as it is now unnecessary. Reviewed by: markj, kib Approved by: markj (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43572 --- sys/kern/kern_condvar.c | 10 +++++----- sys/kern/kern_mutex.c | 4 ++-- sys/kern/kern_rwlock.c | 4 ++-- sys/kern/kern_shutdown.c | 3 ++- sys/kern/kern_sx.c | 2 +- sys/kern/kern_synch.c | 6 +++--- sys/kern/subr_kdb.c | 4 ++-- sys/sys/proc.h | 4 ++-- sys/sys/systm.h | 8 +++----- 9 files changed, 22 insertions(+), 23 deletions(-) diff --git a/sys/kern/kern_condvar.c b/sys/kern/kern_condvar.c index 2731f581a29f..0d470aeafcd5 100644 --- a/sys/kern/kern_condvar.c +++ b/sys/kern/kern_condvar.c @@ -120,7 +120,7 @@ _cv_wait(struct cv *cvp, struct lock_object *lock) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, lock, "Waiting on \"%s\"", cvp->cv_description); - if (SCHEDULER_STOPPED_TD(td)) + if (SCHEDULER_STOPPED()) return; #ifdef KTRACE @@ -184,7 +184,7 @@ _cv_wait_unlock(struct cv *cvp, struct lock_object *lock) ("cv_wait_unlock cannot be used with Giant")); class = LOCK_CLASS(lock); - if (SCHEDULER_STOPPED_TD(td)) { + if (SCHEDULER_STOPPED()) { class->lc_unlock(lock); return; } @@ -241,7 +241,7 @@ _cv_wait_sig(struct cv *cvp, struct lock_object *lock) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, lock, "Waiting on \"%s\"", cvp->cv_description); - if (SCHEDULER_STOPPED_TD(td)) + if (SCHEDULER_STOPPED()) return (0); #ifdef KTRACE @@ -309,7 +309,7 @@ _cv_timedwait_sbt(struct cv *cvp, struct lock_object *lock, sbintime_t sbt, WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, lock, "Waiting on \"%s\"", cvp->cv_description); - if (SCHEDULER_STOPPED_TD(td)) + if (SCHEDULER_STOPPED()) return (0); #ifdef KTRACE @@ -379,7 +379,7 @@ _cv_timedwait_sig_sbt(struct cv *cvp, struct lock_object *lock, WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, lock, "Waiting on \"%s\"", cvp->cv_description); - if (SCHEDULER_STOPPED_TD(td)) + if (SCHEDULER_STOPPED()) return (0); #ifdef KTRACE diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 6071ac7fd6f1..92be72546b46 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -424,7 +424,7 @@ _mtx_trylock_flags_int(struct mtx *m, int opts LOCK_FILE_LINE_ARG_DEF) td = curthread; tid = (uintptr_t)td; - if (SCHEDULER_STOPPED_TD(td)) + if (SCHEDULER_STOPPED()) return (1); KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), @@ -534,7 +534,7 @@ __mtx_lock_sleep(volatile uintptr_t *c, uintptr_t v) doing_lockprof = 1; #endif - if (SCHEDULER_STOPPED_TD(td)) + if (SCHEDULER_STOPPED()) return; if (__predict_false(v == MTX_UNOWNED)) diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c index 83d5862a6667..28dddb950966 100644 --- a/sys/kern/kern_rwlock.c +++ b/sys/kern/kern_rwlock.c @@ -307,7 +307,7 @@ __rw_try_wlock_int(struct rwlock *rw LOCK_FILE_LINE_ARG_DEF) td = curthread; tid = (uintptr_t)td; - if (SCHEDULER_STOPPED_TD(td)) + if (SCHEDULER_STOPPED()) return (1); KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), @@ -666,7 +666,7 @@ __rw_rlock_int(struct rwlock *rw LOCK_FILE_LINE_ARG_DEF) td = curthread; - KASSERT(kdb_active != 0 || SCHEDULER_STOPPED_TD(td) || + KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() || !TD_IS_IDLETHREAD(td), ("rw_rlock() by idle thread %p on rwlock %s @ %s:%d", td, rw->lock_object.lo_name, file, line)); diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 17d40ff0429c..ee666281418f 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -225,6 +225,7 @@ SYSCTL_INT(_kern, OID_AUTO, kerneldump_gzlevel, CTLFLAG_RWTUN, * to indicate that the kernel has already called panic. */ const char *panicstr __read_mostly; +bool scheduler_stopped __read_frequently; int dumping __read_mostly; /* system is dumping */ int rebooting __read_mostly; /* system is rebooting */ @@ -926,7 +927,7 @@ vpanic(const char *fmt, va_list ap) * Ensure that the scheduler is stopped while panicking, even if panic * has been entered from kdb. */ - td->td_stopsched = 1; + scheduler_stopped = true; bootopt = RB_AUTOBOOT; newpanic = 0; diff --git a/sys/kern/kern_sx.c b/sys/kern/kern_sx.c index 706ae90ef9af..d302fa45161e 100644 --- a/sys/kern/kern_sx.c +++ b/sys/kern/kern_sx.c @@ -350,7 +350,7 @@ sx_try_xlock_int(struct sx *sx LOCK_FILE_LINE_ARG_DEF) td = curthread; tid = (uintptr_t)td; - if (SCHEDULER_STOPPED_TD(td)) + if (SCHEDULER_STOPPED()) return (1); KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 8cb847fe2a2d..f12054a04b23 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -158,7 +158,7 @@ _sleep(const void *ident, struct lock_object *lock, int priority, else class = NULL; - if (SCHEDULER_STOPPED_TD(td)) { + if (SCHEDULER_STOPPED()) { if (lock != NULL && priority & PDROP) class->lc_unlock(lock); return (0); @@ -247,7 +247,7 @@ msleep_spin_sbt(const void *ident, struct mtx *mtx, const char *wmesg, KASSERT(ident != NULL, ("msleep_spin_sbt: NULL ident")); KASSERT(TD_IS_RUNNING(td), ("msleep_spin_sbt: curthread not running")); - if (SCHEDULER_STOPPED_TD(td)) + if (SCHEDULER_STOPPED()) return (0); sleepq_lock(ident); @@ -511,7 +511,7 @@ mi_switch(int flags) */ if (kdb_active) kdb_switch(); - if (SCHEDULER_STOPPED_TD(td)) + if (SCHEDULER_STOPPED()) return; if (flags & SW_VOL) { td->td_ru.ru_nvcsw++; diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c index 86f392485a4b..a7fc2284cbcf 100644 --- a/sys/kern/subr_kdb.c +++ b/sys/kern/subr_kdb.c @@ -764,7 +764,7 @@ kdb_trap(int type, int code, struct trapframe *tf) CPU_CLR(PCPU_GET(cpuid), &other_cpus); stop_cpus_hard(other_cpus); #endif - curthread->td_stopsched = 1; + scheduler_stopped = true; did_stop_cpus = 1; } else did_stop_cpus = 0; @@ -801,7 +801,7 @@ kdb_trap(int type, int code, struct trapframe *tf) kdb_active--; if (did_stop_cpus) { - curthread->td_stopsched = 0; + scheduler_stopped = false; #ifdef SMP CPU_AND(&other_cpus, &other_cpus, &stopped_cpus); restart_cpus(other_cpus); diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 33a878dc46aa..b08226c89dfd 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -270,7 +270,7 @@ struct thread { const char *td_wmesg; /* (t) Reason for sleep. */ volatile u_char td_owepreempt; /* (k*) Preempt on last critical_exit */ u_char td_tsqueue; /* (t) Turnstile queue blocked on. */ - u_char td_stopsched; /* (k) Scheduler stopped. */ + u_char _td_pad0[2]; /* Available. */ int td_locks; /* (k) Debug: count of non-spin locks */ int td_rw_rlocks; /* (k) Count of rwlock read locks. */ int td_sx_slocks; /* (k) Count of sx shared locks. */ @@ -429,7 +429,7 @@ do { \ #define TD_LOCKS_INC(td) ((td)->td_locks++) #define TD_LOCKS_DEC(td) do { \ - KASSERT(SCHEDULER_STOPPED_TD(td) || (td)->td_locks > 0, \ + KASSERT(SCHEDULER_STOPPED() || (td)->td_locks > 0, \ ("Thread %p owns no locks", (td))); \ (td)->td_locks--; \ } while (0) diff --git a/sys/sys/systm.h b/sys/sys/systm.h index 0d3f9fe98893..29c8bfc3c768 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -99,17 +99,15 @@ struct ucred; #include /* curthread */ #include +extern bool scheduler_stopped; + /* * If we have already panic'd and this is the thread that called * panic(), then don't block on any mutexes but silently succeed. * Otherwise, the kernel will deadlock since the scheduler isn't * going to run the thread that holds any lock we need. */ -#define SCHEDULER_STOPPED_TD(td) ({ \ - MPASS((td) == curthread); \ - __predict_false((td)->td_stopsched); \ -}) -#define SCHEDULER_STOPPED() SCHEDULER_STOPPED_TD(curthread) +#define SCHEDULER_STOPPED() __predict_false(scheduler_stopped) extern int osreldate; From nobody Fri Jan 26 22:28:54 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TMC5z10vJz58yP3; Fri, 26 Jan 2024 22:28: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 4TMC5z0Vsgz4gx8; Fri, 26 Jan 2024 22:28:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706308135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TjsbWcrXfTkcupMAtVluHuxgM9J4pD0OKYm2C5rvRu8=; b=Q2VSO1PW72c0RgyBqRA+gDtATI6K5f2VDe5t73uRI3RvgXgO5+JxmprgujjuIMiQNuqIBV VKBWZ3BNVQ+IFDdbh9friQwTjtLo4/9+VBdw8T4FWXMab97HE3G/asl7gJqYgpO2Uy+hQf r1Y6CpBoUWkXzbLjiQlZSYyLiP/sqlVwE/xTm1FwovnWHxkHJt3/y7AzwbCHf9tR/2WtSY ura4rnkoFaZ9z87lAuOYVSBc/l/k4aVJs3ce9fMaHeUSwxebnCbE5zny6PoNH3CeyNeJD4 ty7eYaSXCH9SrTLWy/q9U3ycyUCk2xH2I/kKbB9xf1AbcYbd7qsBa8R6TrDxbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706308135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TjsbWcrXfTkcupMAtVluHuxgM9J4pD0OKYm2C5rvRu8=; b=Irm7hSUz5WTeiLMdFguzhzhVY4uQB+d0E4L8kyJ/MR/eRihMd+6diTfSymjVPM9GO4ati6 rek4zjZ7gygt3iaWlLCLzKf+44MaPE39WcPN6xRSOqEX+LL8J4wHm2VHpu71mFvZ8LODmJ og1IEV9gnY80ihI6ZEvnSv6t336jlw4b2VNjskksd4zLjP+tJqi/GWMuIK/ZKZ3Kzbs9jD B2YTN8+v9S+BG3CliX/L0uJe3saUPA8DaWEsH/ApZZC3rrdfy2/WWGmpPD54wR/X+2JloQ JQ84a/OY5ozpwaDLdaAjHFcUFYo1AwaunCkGbg1Wy7pVxeexuNUHCv7/pxHL3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706308135; a=rsa-sha256; cv=none; b=KLHch3PyW3OVA4dY33L+S3DuVEAVGOVVsGH5PE6/D9aTC3R2fHJui/Ay6Td3NGKmPmlyDz oXAWt7xZda1DmOofNmK0qbsl+KnneSCrFNL25DAfb9itUHTlhjyOUftcKz4H+t9oqUvRH3 eKPDDfdxnf8LX3rMPrE4GQGFhrMAgpRvi4oVlGtyEhtTVXagWfM3qKWVcLzyF5+xXryA67 fM5NeLnRbz0YQLeQcAXsK8/GhhYOSZzrQCwAUwnVyiY0dvlB0WrZymy3/NpVNAg0iPq64O /B55O6j/BZkGjWNlapMrmVlUIiAcx/zR5Vpm5QY34Rmz4qsw+ZXFOyFtza+6Cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TMC5y6gySz10NX; Fri, 26 Jan 2024 22:28:54 +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 40QMSsqw019312; Fri, 26 Jan 2024 22:28:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40QMSsAu019309; Fri, 26 Jan 2024 22:28:54 GMT (envelope-from git) Date: Fri, 26 Jan 2024 22:28:54 GMT Message-Id: <202401262228.40QMSsAu019309@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 176b9e0d724b - main - makefs: warn that ffs sectorsize other than 512 may not work List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 176b9e0d724b4c1a24d2c46a1256381784f04edc Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=176b9e0d724b4c1a24d2c46a1256381784f04edc commit 176b9e0d724b4c1a24d2c46a1256381784f04edc Author: Ed Maste AuthorDate: 2024-01-25 01:47:36 +0000 Commit: Ed Maste CommitDate: 2024-01-26 22:27:57 +0000 makefs: warn that ffs sectorsize other than 512 may not work newfs always sets sectorsize to DEV_BSIZE (512) and derives some other values based on the number of 512-byte sectors per real sector. Similar logic is required in makefs. Until that happens, emit a warning that the image may be incorrect. PR: 276571 --- usr.sbin/makefs/ffs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/makefs/ffs.c b/usr.sbin/makefs/ffs.c index 93dc2e3cd2f5..ebfda7f929e4 100644 --- a/usr.sbin/makefs/ffs.c +++ b/usr.sbin/makefs/ffs.c @@ -338,6 +338,9 @@ ffs_validate(const char *dir, fsnode *root, fsinfo_t *fsopts) /* set FFS defaults */ if (fsopts->sectorsize == -1) fsopts->sectorsize = DFL_SECSIZE; + if (fsopts->sectorsize != DFL_SECSIZE) + warnx("sectorsize %d may produce nonfunctional image", + fsopts->sectorsize); if (ffs_opts->fsize == -1) ffs_opts->fsize = MAX(DFL_FRAGSIZE, fsopts->sectorsize); if (ffs_opts->bsize == -1) From nobody Sat Jan 27 03:09:59 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TMKLH6RfLz57QPw; Sat, 27 Jan 2024 03:09:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TMKLH5xKGz574R; Sat, 27 Jan 2024 03:09:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706324999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ggc1/w9qM859Bfea43vO3gtYHlqWQUqU3McJcBWYNXU=; b=rE1LVu1H2tls+Gsih0LVvT/eZ8QtDDPVw075189Oohh/ldnMfHdJQZBENTlSVnfL4MZqAd IOyyxvm1+JB18w0nkMw0/C3Q8CC02EHiK9lToRAZOUaz+anOJjtDdDs+jnDhMuKFw8ui1A ABkRw2mMjBCejYW5hgW0BKTUvqUShMMWtP54FPy0neNsjHmKhEgvE79M1aSDaAe+MLfCO8 wNBEFIF5uAEXK/ztAahJYudNzXQQFN6XrOgdain6S6MdyJ25Fk6FCwNJqtUX42dDbQzu0P QXLn0Xag8den9UV/4yQ5yKs7qer3KhL4MtSVp8+hNrOSQqC+qwONjXM0VE4VcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706324999; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ggc1/w9qM859Bfea43vO3gtYHlqWQUqU3McJcBWYNXU=; b=LXqjxflLNi8E2gQg89HhCkf42A7vMeTQBd3/vhEsA4aoEVJpZWNQ9f4L/5hK8WwY9VovD7 qoOoKXMyl9MeDegAOHLYnbGZgKUFpy3Z1t+UYqFiLo6AKVY7R4PZXUvroG6qn53vfFAwH/ NZajv8/DZ+QKdrAoVmibUp2qfbo0/nInS/InYH7mlTCAb4E7WcswZZNZThRk1T7NQHEj2D r5Ly1nnloaBwuIhR1Bqckdl6t8o1lIXmQDp9ElVeaDbD+lrf7xQ/kGB1lvF02HJaWObfDC Pj4ElsHlI/yYg3fo33hlA4kHILAq1SvQRBM6eaO/zyIt0lMjKD2oic6uaX+wkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706324999; a=rsa-sha256; cv=none; b=lKUnHxNoMpNimZMtBs1h1iGQt1H2EIaIQEKkno3XZxE4bjyQlgCeTaV9vfLuJUQrWGnQ+k WgqNV+tHUasbv1WJ+KfBU79pRQ5EZkOicwKkVBvGtsmep2KpKDt487R+FTWWssUi99xD4U T0WzDtJD0oHZRimACAN1oed6oB8cAQWYCfNygNwbqRh2tKllAerC3kPRmNOPauDwbJLHFk 5ebB7GUJKMt9/+tJw+jUD/WISgVHTQhEFWeBZyp3Cn9mWVz5fiJvkqzMllNrVeGXQe3/nf YFUj+0j3N1UhYPt7rI/0qiE9+XiwfvsUWnmc5EF/u8pKrRSRgaR6Trh2iRjYdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TMKLH4trhz17RP; Sat, 27 Jan 2024 03:09: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 40R39xPH092410; Sat, 27 Jan 2024 03:09:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40R39xrX092407; Sat, 27 Jan 2024 03:09:59 GMT (envelope-from git) Date: Sat, 27 Jan 2024 03:09:59 GMT Message-Id: <202401270309.40R39xrX092407@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Xin LI Subject: git: 72dd306e44bc - main - releng-gce: Advertise the availability of UEFI support in GCE images. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72dd306e44bc531fa723f4cdb631cb63cc5f09cb Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/src/commit/?id=72dd306e44bc531fa723f4cdb631cb63cc5f09cb commit 72dd306e44bc531fa723f4cdb631cb63cc5f09cb Author: Xin LI AuthorDate: 2024-01-27 03:09:39 +0000 Commit: Xin LI CommitDate: 2024-01-27 03:09:39 +0000 releng-gce: Advertise the availability of UEFI support in GCE images. The amd64 and arm64 images supported UEFI, mark it as so users can take advantage of UEFI boot on GCE. This is already done on FreeBSD 14.0-RELEASE but never codified into the release tools (and should). PR: conf/276532 Reviewed by: lwhsu MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D43557 --- release/Makefile.gce | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/Makefile.gce b/release/Makefile.gce index f244e6c89640..2bfdf4edc246 100644 --- a/release/Makefile.gce +++ b/release/Makefile.gce @@ -73,7 +73,7 @@ gce-do-upload-${_FS}: gs://${GCE_BUCKET}/ /usr/local/bin/gcloud compute images create ${GCE_TARGET_${_FS}} \ --family=${GCE_FAMILY}${GCE_FAMILY_SUFX} ${GCE_LICENSE} \ - --guest-os-features=GVNIC \ + --guest-os-features=GVNIC,UEFI_COMPATIBLE \ --source-uri gs://${GCE_BUCKET}/${GCE_TARGET_${_FS}}.tar.gz touch ${.OBJDIR}/${.TARGET} .endfor From nobody Sat Jan 27 15:40:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TMf064cfwz58R4h; Sat, 27 Jan 2024 15:40: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 4TMf063mLNz4PFk; Sat, 27 Jan 2024 15:40:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706370022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b8CEYXfFPIc44+WXizSUhVMz/dHa5i+rBWY+YfNkKLY=; b=G2kr2uQNlDQuLWHmQLHWCkh83UPvhlXff+Ftau2y10QU9lllbTTiENQ6K1lMhpOhpK5+i2 y1PNo6zNlY68RsXs/zOXr2IYVjgbZngF61fgCDgi1MMow2MBoNBAe1uqH9bwIUT8zQNpHk ZSdORL4SsjgWGr9E7SyvtFu+HCHC/TSmBt5UWbHdNcjPNq3E70HT1yzYNNG0D7HpamZL72 HaNVz/QSYIZ9cMml5qg7w45ecesSegpyQ1RXsYfixrYikWPYpOEnV1fRUul4huJwpHGatv FcXaPLdRnZLh39oH8z6HmX2abhOaLhbAhFyUjC8mL7c6bZVcrfKXdQp+NkRAQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706370022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b8CEYXfFPIc44+WXizSUhVMz/dHa5i+rBWY+YfNkKLY=; b=syVdojf++7U8ymtNS9nUe0XBJd+Dr/JPhO5i5/BFSzv6g/9x3BvEWByAEJZ+MI7BJVXXlh SsnkfMwRx/Ty++WklSeSPsL9zYXRvnDcnM/sy5YKDR+FqdM1tAvQKjdTVbnCDLftIVQFce BwAQecq7ZGWeZWh/gEPoTKahP9bfbL4XRZ/ugjKsREcDpSty7AGZVDwr6AiPhinSxRnSfN PX3sA14o7Nd5GMGiQFy+cwfNei093FGowvASquSedyakUcQbY0YHkEUSiiSDFUwtsgHMtj h3RNkxl13j+p9UGsC6M3A0rtL48iijsKhK8BguxYTxHlQE/5OIk852ENcbA9rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706370022; a=rsa-sha256; cv=none; b=EtPmrsUlIPPMxkXEi/flglfaGcI3HnlUfxGojYeDiroqrf6zG4TEdWCd0FtlF6Zycm0v2q YamhNqRzWOnU+1SsGU9VgN8ZtzFVP+ZTOsa7i+Rf2BKo6utmdp4TyqKfU5URFEVnHgID/L qwHejk8poBaXRbhUdEeNsXzJulQAGinKIHcUwCAZsHA2VQkT147iphmSEqihk6p2bwg66O fdVPoNwbA6cRZsU39M4zszT0YPdSuh7IAIIi5KnBs3tIAHytzmPkkixi5tfqlVjcZDe2mg f+h5tD7jFEEuQesoz2jbea32XgtYXgHGLC65mNkJuzkozhK4R0Ga1Rl2HYtLTQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TMf062p84zTcM; Sat, 27 Jan 2024 15:40: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 40RFeMuu062682; Sat, 27 Jan 2024 15:40:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40RFeMd4062679; Sat, 27 Jan 2024 15:40:22 GMT (envelope-from git) Date: Sat, 27 Jan 2024 15:40:22 GMT Message-Id: <202401271540.40RFeMd4062679@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mike Karels Subject: git: 9231c42127bf - main - inet(3): clarify syntax accepted by inet_pton List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: karels X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9231c42127bf8e47588169ecc395f57cae0e15fb Auto-Submitted: auto-generated The branch main has been updated by karels: URL: https://cgit.FreeBSD.org/src/commit/?id=9231c42127bf8e47588169ecc395f57cae0e15fb commit 9231c42127bf8e47588169ecc395f57cae0e15fb Author: Mike Karels AuthorDate: 2024-01-27 15:40:07 +0000 Commit: Mike Karels CommitDate: 2024-01-27 15:40:07 +0000 inet(3): clarify syntax accepted by inet_pton The section INTERNET ADDRESSES describes the acceptance of dotted values with varying number of parts in multiple bases. This applies to inet_aton and inet_addr, but not to inet_pton. Clarify this section by listing the functions to which this applies. Move the description of what inet_pton accepts into this section from STANDARDS, where it is easily missed. Rename the section to clarify that it applies only to IPv4. (inet_pton also works with IPv6.) Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D43537 --- lib/libc/net/inet.3 | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/libc/net/inet.3 b/lib/libc/net/inet.3 index 5e8c1953431b..7b1a5fcc8ede 100644 --- a/lib/libc/net/inet.3 +++ b/lib/libc/net/inet.3 @@ -173,10 +173,15 @@ All Internet addresses are returned in network order (bytes ordered from left to right). All network numbers and local address parts are returned as machine byte order integer values. -.Sh INTERNET ADDRESSES -Values specified using the +.Sh INTERNET ADDRESSES (IP VERSION 4) +The +.Fn inet_aton +and +.Fn inet_addr +functions accept IPv4 +values specified using the .Ql .\& -notation take one +notation in one of the following forms: .Bd -literal -offset indent a.b.c.d @@ -210,6 +215,13 @@ may be decimal, octal, or hexadecimal, as specified in the C language (i.e., a leading 0x or 0X implies hexadecimal; otherwise, a leading 0 implies octal; otherwise, the number is interpreted as decimal). +.Pp +Note that +.Fn inet_pton +does not accept 1-, 2-, or 3-part dotted addresses; all four parts +must be specified and are interpreted only as decimal values. +This is a narrower input set than that accepted by +.Fn inet_aton . .Sh DIAGNOSTICS The constant .Dv INADDR_NONE @@ -256,12 +268,6 @@ and .Fn inet_pton functions conform to .St -xns5.2 . -Note that -.Fn inet_pton -does not accept 1-, 2-, or 3-part dotted addresses; all four parts -must be specified and are interpreted only as decimal values. -This is a narrower input set than that accepted by -.Fn inet_aton . .Sh HISTORY These functions appeared in From nobody Sat Jan 27 18:52:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TMkFb2n7Qz58jfT; Sat, 27 Jan 2024 18:52:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TMkFb2Lmpz4m1R; Sat, 27 Jan 2024 18:52:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706381539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fRuwZnz5OQn2e3VUlH1P/kJNCLLaIaj1Wa+fVuR6N00=; b=axm2VxkhsNcK2dqnw61XD1BeC5LIyvMbfbAglnm/MzwnohJQewV5QGgpr9I98Wq5Tn4g34 RiLbmsopq1cHCVvN2dyPrktqVSEmXqyLZ/JS+VQSdjWUoFybUKBi5OjpXt1t3gKVxBjPHz UU1e2UgRdsgVPTDF3NKcRimZ2gPwnH5B1YPoW2AsJoaxnPU5knkYPid1jLCr+nwhHN5sDz 19/RptaP3gg1JLY6B9m7spWj3/61RM6hpciq0BzCychZ+5VtBl83tI3m+WbdWTolh9bF+r rFpMWDuOXyLlo/2NxIIHEZL7bJcYdNpxANg4h4DK1xtN5IymZm7VQ5d/1twynA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706381539; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fRuwZnz5OQn2e3VUlH1P/kJNCLLaIaj1Wa+fVuR6N00=; b=QO/dgzlEEyU/yr48tIO+8Bsfq1L51tXReXmhgHfJU8D/vl9sVMvIkEzS0tLWO72NOkiPz0 ii8rtmi2Vm2If+6ObP6pbPWh8wtkwtufeUpaeYxaSmntRu1uj83L0AQDE82r6Bu+9hFtVU Jz2CWwiiMMx3XprV2KkW49LoyZ6JXOsqlSQIGcHQ6nxoWz15eiW1NYwkCAzKLWQBDl+bhB rDcsK5G6MjLodieCKkea1hXLAo/PhYk0RABD5HibMoHK9TlFgAnDwfOJNFumG/WVDF8Rs1 rC3CHysw2emmfIBMRcv/bo5cmHYBRu/AZRhCAIpF3uQ3G2UMumbsdVEG3Fcd8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706381539; a=rsa-sha256; cv=none; b=D2J22nc1mFLS1U+vanx1gYasoZJEZmOC0JDZHpnnsabblYmrk9YfsKwpRM4EBbKUqeBfk9 HtXdEk2EHfVPpaXtQ+qXY/enAQDo0JYTG17gP9DdlcG57dgqODqdYwSl8mHqZFYk0eDpKT HQLliH+/vEgPB2Tadj97PpZnq2QnEx2/XLGuWN7JUGH7fR91YcE2XcVe0mBKE9/cy6e5qE iLPjNj7yK+EKXtI9Zw8v3qDz45GkpcdhrtBvLL263aNg4Mmtpfo6aqbsmmVZUCrW8faRqT 2jim3BrggTNjnp2aIbSKdeJpZkMyR2veU2gIfsQgcR4XEDzOqemzNcsW4NyX3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TMkFb1QbDzcN3; Sat, 27 Jan 2024 18:52:19 +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 40RIqJJK088697; Sat, 27 Jan 2024 18:52:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40RIqJ4j088694; Sat, 27 Jan 2024 18:52:19 GMT (envelope-from git) Date: Sat, 27 Jan 2024 18:52:19 GMT Message-Id: <202401271852.40RIqJ4j088694@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: f5463265955b - main - kqueue tests: Add a regression test List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f5463265955b829775bbb32e1fd0bc11dafc36ce Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f5463265955b829775bbb32e1fd0bc11dafc36ce commit f5463265955b829775bbb32e1fd0bc11dafc36ce Author: Mark Johnston AuthorDate: 2023-11-24 15:28:13 +0000 Commit: Mark Johnston CommitDate: 2024-01-27 18:51:13 +0000 kqueue tests: Add a regression test Based on the test case submitted by Andreas Bock for PR 275286. PR: 275286 MFC after: 2 weeks --- tests/sys/kqueue/Makefile | 4 +- tests/sys/kqueue/kqueue_fork.c | 89 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 2 deletions(-) diff --git a/tests/sys/kqueue/Makefile b/tests/sys/kqueue/Makefile index 3267b9ad8d9a..37f4f323904d 100644 --- a/tests/sys/kqueue/Makefile +++ b/tests/sys/kqueue/Makefile @@ -1,10 +1,10 @@ - TESTSRC= ${SRCTOP}/contrib/netbsd-tests/kernel/kqueue TESTSDIR= ${TESTSBASE}/sys/kqueue BINDIR= ${TESTSDIR} -ATF_TESTS_C+= kqueue_peek_signal +ATF_TESTS_C+= kqueue_fork \ + kqueue_peek_signal NETBSD_ATF_TESTS_C= proc1_test # XXX: fails `ke.fflags & NOTE_TRACKERR` invariant diff --git a/tests/sys/kqueue/kqueue_fork.c b/tests/sys/kqueue/kqueue_fork.c new file mode 100644 index 000000000000..e4c0412c1980 --- /dev/null +++ b/tests/sys/kqueue/kqueue_fork.c @@ -0,0 +1,89 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2023 Andreas Bock + * Copyright (c) 2023 Mark Johnston + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include + +#include +#include +#include + +#include + +/* + * A regression test for bugzilla 275286. + */ +ATF_TC_WITHOUT_HEAD(shared_table_filt_sig); +ATF_TC_BODY(shared_table_filt_sig, tc) +{ + struct sigaction sa; + pid_t pid; + int error, status; + + sa.sa_handler = SIG_IGN; + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + error = sigaction(SIGINT, &sa, NULL); + ATF_REQUIRE(error == 0); + + pid = rfork(RFPROC); + ATF_REQUIRE(pid != -1); + if (pid == 0) { + struct kevent ev; + int kq; + + kq = kqueue(); + if (kq < 0) + err(1, "kqueue"); + EV_SET(&ev, SIGINT, EVFILT_SIGNAL, EV_ADD | EV_ENABLE, 0, 0, + NULL); + if (kevent(kq, &ev, 1, NULL, 0, NULL) < 0) + err(2, "kevent"); + if (kevent(kq, NULL, 0, &ev, 1, NULL) < 0) + err(3, "kevent"); + _exit(0); + } + + /* Wait for the child to block in kevent(). */ + usleep(100000); + + error = kill(pid, SIGINT); + ATF_REQUIRE(error == 0); + + error = waitpid(pid, &status, 0); + ATF_REQUIRE(error != -1); + ATF_REQUIRE(WIFEXITED(status)); + ATF_REQUIRE_EQ(WEXITSTATUS(status), 0); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, shared_table_filt_sig); + + return (atf_no_error()); +} From nobody Sat Jan 27 18:52:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TMkFc4RGZz58kCX; Sat, 27 Jan 2024 18:52: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 4TMkFc2mkVz4lxn; Sat, 27 Jan 2024 18:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706381540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RNVMBTbVrJEaAv2VI4QaCpwXt5KD2UgtQlIxSKmKBk0=; b=BtyiaS30I5jDcczEjLZ25j6ADs7+vsWnfzxGs0RIN8boFqxGid/xpWA+7UhKDUBELkWTrE D4367X4PyZch9qiyGQlerYZAdq8cHl6IkqSQyKAtHrK3sQZkCx0BqX47tWU4vppz5Q/vyO rOl3Ubgwwc8oMrkg/W3eXH/QVmoLfSLe5veeLS86kdYNubUWKJznqWv+NjbYvZ2RIHT8hL UTvt4wgoeH4OKGOyTE75mljjWzgnDO8EKDSpe/jhUmfT/eVwLDnT2UZkqH9/1RNJzbw3Ir 41XCesjJBgj/hXAg645+4tH3LDrdz+Xt52V/XBnR6AyvvG2jRj/f1H2ulvMTeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706381540; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RNVMBTbVrJEaAv2VI4QaCpwXt5KD2UgtQlIxSKmKBk0=; b=J1oyecfu6hSu2sPDnagiEQOyzB+lzhmMnTM56Qw8/JkAGT+djF2ZNeWz2+v5Q677XNAr4w epmAxMIOYKxX5mrJYws81VPum4CNPXJ6WfMbzoIecihV8bgA5ePG11cvhkWRDU6OabAeiR 3WPY0AOSNDSyTWzvPA1YQgAcorU3Hm9OTujJL/XG0daj5QS9KgTuiNFYC8FxtZvNfmb1ro kG58pAuW8tXM+QEETTyWz03Ry1RECvJO0mQ0TmcZy0c+xq7P0y5E+CcqhnUQLYfCexGG38 93/nTaqSyb9MfnU8kSGVTrIgkw+QFE8lgJ1uN0p1Ruazr9ypba7gSJFhG5Hw6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706381540; a=rsa-sha256; cv=none; b=lIXh2Uy4bpa59yNPKFVllv8LkQXx5BewHtlogAA8s3UdNLIBCs+eJd7Bl5ZB90YH9VJqs1 zM2sL5LlFpqSz4/LjjRQbqS7oZI0EBY11Y7M8cZ/nVCl6wd4Kf2i4qBppe7kUKfEE/EUgI /454TzLTJUcCC2uvisLlSlCBOHarUIGKspoKZatKFeSgOyA5DP3a8vMgi3T6OhDM8wDX/W uMSFYB9di87Dc6C75AjqqflW3jkxZbCK/HyP0XhgNYF1C+tclhbpbj6wisWyydPX9elT0Q JqdHK8zV/ZWWtQ6liuSpyJStgPhL4yBMRFV4IbcXXVW7UuCM2DGA4olXOuz3LA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TMkFc1rF1zcN4; Sat, 27 Jan 2024 18:52: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 40RIqKCi088777; Sat, 27 Jan 2024 18:52:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40RIqKVW088771; Sat, 27 Jan 2024 18:52:20 GMT (envelope-from git) Date: Sat, 27 Jan 2024 18:52:20 GMT Message-Id: <202401271852.40RIqKVW088771@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: bbf86c65d04d - main - netinet: Remove stale references to Giant from comments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bbf86c65d04d6013fd3f7b6d74a341256c4e7336 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bbf86c65d04d6013fd3f7b6d74a341256c4e7336 commit bbf86c65d04d6013fd3f7b6d74a341256c4e7336 Author: Mark Johnston AuthorDate: 2023-03-12 18:59:42 +0000 Commit: Mark Johnston CommitDate: 2024-01-27 18:51:13 +0000 netinet: Remove stale references to Giant from comments MFC after: 1 week --- sys/netinet/igmp.c | 2 -- sys/netinet/in_mcast.c | 15 +++++---------- sys/netinet6/in6_mcast.c | 7 ++----- 3 files changed, 7 insertions(+), 17 deletions(-) diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index 1655963e6cff..454668c2aadc 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -166,7 +166,6 @@ static const struct netisr_handler igmp_nh = { * Any may be taken independently; if any are held at the same * time, the above lock order must be followed. * * All output is delegated to the netisr. - * Now that Giant has been eliminated, the netisr may be inlined. * * IN_MULTI_LIST_LOCK covers in_multi. * * IGMP_LOCK covers igmp_ifsoftc and any global variables in this file, * including the output queue. @@ -1672,7 +1671,6 @@ igmp_fasttimo(void *arg __unused) /* * Fast timeout handler (per-vnet). - * Sends are shuffled off to a netisr to deal with Giant. * * VIMAGE: Assume caller has set up our curvnet. */ diff --git a/sys/netinet/in_mcast.c b/sys/netinet/in_mcast.c index 6d68ebcb188c..f5b20c49ffd2 100644 --- a/sys/netinet/in_mcast.c +++ b/sys/netinet/in_mcast.c @@ -92,8 +92,8 @@ static MALLOC_DEFINE(M_IPMSOURCE, "ip_msource", /* * Locking: * - * - Lock order is: Giant, IN_MULTI_LOCK, INP_WLOCK, - * IN_MULTI_LIST_LOCK, IGMP_LOCK, IF_ADDR_LOCK. + * - Lock order is: IN_MULTI_LOCK, INP_WLOCK, IN_MULTI_LIST_LOCK, IGMP_LOCK, + * IF_ADDR_LOCK. * - The IF_ADDR_LOCK is implicitly taken by inm_lookup() earlier, however * it can be taken by code in net/if.c also. * - ip_moptions and in_mfilter are covered by the INP_WLOCK. @@ -1186,9 +1186,9 @@ inm_purge(struct in_multi *inm) /* * Join a multicast group; unlocked entry point. * - * SMPng: XXX: in_joingroup() is called from in_control() when Giant - * is not held. Fortunately, ifp is unlikely to have been detached - * at this point, so we assume it's OK to recurse. + * SMPng: XXX: in_joingroup() is called from in_control(). Fortunately, + * ifp is unlikely to have been detached at this point, so we assume + * it's OK to recurse. */ int in_joingroup(struct ifnet *ifp, const struct in_addr *gina, @@ -1362,8 +1362,6 @@ in_leavegroup_locked(struct in_multi *inm, /*const*/ struct in_mfilter *imf) * The delta-based API applies only to exclusive-mode memberships. * An IGMP downcall will be performed. * - * SMPng: NOTE: Must take Giant as a join may create a new ifma. - * * Return 0 if successful, otherwise return an appropriate error code. */ static int @@ -1550,7 +1548,6 @@ out_inp_locked: * Given an inpcb, return its multicast options structure pointer. Accepts * an unlocked inpcb pointer, but will return it locked. May sleep. * - * SMPng: NOTE: Potentially calls malloc(M_WAITOK) with Giant held. * SMPng: NOTE: Returns with the INP write lock held. */ static struct ip_moptions * @@ -2520,8 +2517,6 @@ inp_set_multicast_if(struct inpcb *inp, struct sockopt *sopt) /* * Atomically set source filters on a socket for an IPv4 multicast group. - * - * SMPng: NOTE: Potentially calls malloc(M_WAITOK) with Giant held. */ static int inp_set_source_filters(struct inpcb *inp, struct sockopt *sopt) diff --git a/sys/netinet6/in6_mcast.c b/sys/netinet6/in6_mcast.c index db2176614f38..a6186568ecb2 100644 --- a/sys/netinet6/in6_mcast.c +++ b/sys/netinet6/in6_mcast.c @@ -101,8 +101,8 @@ RB_GENERATE(ip6_msource_tree, ip6_msource, im6s_link, ip6_msource_cmp); /* * Locking: - * - Lock order is: Giant, IN6_MULTI_LOCK, INP_WLOCK, - * IN6_MULTI_LIST_LOCK, MLD_LOCK, IF_ADDR_LOCK. + * - Lock order is: IN6_MULTI_LOCK, INP_WLOCK, IN6_MULTI_LIST_LOCK, MLD_LOCK, + * IF_ADDR_LOCK. * - The IF_ADDR_LOCK is implicitly taken by in6m_lookup() earlier, however * it can be taken by code in net/if.c also. * - ip6_moptions and in6_mfilter are covered by the INP_WLOCK. @@ -1418,8 +1418,6 @@ in6_leavegroup_locked(struct in6_multi *inm, /*const*/ struct in6_mfilter *imf) * The delta-based API applies only to exclusive-mode memberships. * An MLD downcall will be performed. * - * SMPng: NOTE: Must take Giant as a join may create a new ifma. - * * Return 0 if successful, otherwise return an appropriate error code. */ static int @@ -1581,7 +1579,6 @@ out_in6p_locked: * Given an inpcb, return its multicast options structure pointer. Accepts * an unlocked inpcb pointer, but will return it locked. May sleep. * - * SMPng: NOTE: Potentially calls malloc(M_WAITOK) with Giant held. * SMPng: NOTE: Returns with the INP write lock held. */ static struct ip6_moptions * From nobody Sat Jan 27 18:52:21 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TMkFd6Cw9z58jtJ; Sat, 27 Jan 2024 18:52:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TMkFd42r4z4mBf; Sat, 27 Jan 2024 18:52:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706381541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pI8CkwYmknH/gtQl04TJaBLG5Yv+vs3fgyBDADR6WdU=; b=bt+qIQwyIyoRxT1qBCZ7yQ3NOJMoPnk51kmmNXgqVTydSfFb1ghmtXNOeP/FuN4Xvuagvr tOfkPZ1YeBL3J8aB27DwDaFDOfXm1yi02qvuBFGUeNA3HM7AndFddZobulTxF0n1PFaoE5 T40uCEfqFNH0l0hYM6xNciQAaorCVkg5n1sc0iSTzvLdzHI12nBlu4guZOqh0RmoEcTexp u2Ne8Dok3JKyuAtiBItvX+rQz/OuzdNhE0yjK/uT7fdkoRd7WDD8c4hAGLwU0uuUtMUONP hFjtG/ChdxXQ+gJyip7ywqM5rZ8yOCjyb/0BQEfF2lDI/hJYBeS+OA5FnWU7NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706381541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pI8CkwYmknH/gtQl04TJaBLG5Yv+vs3fgyBDADR6WdU=; b=Z4mNqUX/rv6APNBLZ1mDrvdaUpBDmgbRCtTVV7FO8UE/kd3SMD0GPsf8O/W3XhiLenKkuY FAT+jRw3cRAmoctXOlcV10KvIjq7+o0Sl7eMOaqBqE9wl6lTIhpHNvF90n0wHPyvWAWH72 MpajqGWqjWcbDOJA1VleZloZtEk6ICLhZQqLuFopEsr+Z1efpbYdIsZYVqSkiIXr23TQ8L FilYIewkUP6Uakr722OP/Z47gpiXj+jd/UY8sXh3wGAOM4lH4oEPaJa8fdRn/f65oEK0pE 1IZWglypicMBDR0aGKrbQDC+nQQpxPoR2dUpetIi+MOiVh52XHR6dG+ygFF45w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706381541; a=rsa-sha256; cv=none; b=Z6RKCsz0L8n524BiLjpJnJHT1DMuNJYj+tgGkmh9oip1ejJaXj7FfvGy5gXO5LfNfNk72D JGgj9CEfCj/Gvp0a2AnMfwv0pRkKyZR7jP5bGvkLmnBR9bKBoWvqYi/TvkGbgAEVWdczd0 cXpmAwyrcomcOcgzJT1FyIb32vz8nneKrhZqq6QAq1o4l/MRcPGSRUX80N1Ou+FAQERNXW 38jsiugj2+GrDHtbwgLsS2lK+sJc+rGeNandzEYEoI/VKovMTH1tmPcNfNlMZIegc3CyPP f4CcZAIY+WM0L3cFqeUSARxqLXDR7GWPI+bQgEUOoLW3fUHn0fHEOPZ+ZxZGNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TMkFd34t9zcDk; Sat, 27 Jan 2024 18:52:21 +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 40RIqL4c089804; Sat, 27 Jan 2024 18:52:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40RIqLdg089801; Sat, 27 Jan 2024 18:52:21 GMT (envelope-from git) Date: Sat, 27 Jan 2024 18:52:21 GMT Message-Id: <202401271852.40RIqLdg089801@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 2e55256de3e6 - main - route tests: Serialize List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e55256de3e6193b5073f9774362b06ce690e482 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2e55256de3e6193b5073f9774362b06ce690e482 commit 2e55256de3e6193b5073f9774362b06ce690e482 Author: Mark Johnston AuthorDate: 2023-03-25 19:59:20 +0000 Commit: Mark Johnston CommitDate: 2024-01-27 18:51:14 +0000 route tests: Serialize These tests reuse jail names and so cannot run in parallel. MFC after: 1 week --- sbin/route/tests/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sbin/route/tests/Makefile b/sbin/route/tests/Makefile index 1ae964693ff4..23e5ecb79143 100644 --- a/sbin/route/tests/Makefile +++ b/sbin/route/tests/Makefile @@ -1,10 +1,10 @@ PACKAGE= tests -ATF_TESTS_SH+= \ - basic +ATF_TESTS_SH+= basic +# Tests reuse jail names and so cannot run in parallel. +TEST_METADATA.basic+= is_exclusive=true -${PACKAGE}FILES+= \ - utils.subr +${PACKAGE}FILES+= utils.subr .include From nobody Sat Jan 27 18:52:22 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TMkFf5vNpz58kCd; Sat, 27 Jan 2024 18:52: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 4TMkFf52r8z4m25; Sat, 27 Jan 2024 18:52:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706381542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ulKQF2w/un+md87aWxL83x8axj0Rhl1k2C1Dau+tQrI=; b=juud3qMq8oh5Kku2AhBqzXM42g789srFCTYwy7I0zS5v7fVdsqsGKR+wgT3dyk0sqEE7Yy 6iB9kQ7ENh4Kh/bbvH7RqF5U1TnJ7nCuws0uwVEhG4PN6D5JZ091wKfz2uFgmY/1UsjdTx mSffjcPcreaihNxP8I6ciEuPsfuaArE+ll6x5xDy7Rol0APDcy3HruWi22nInIz4NYYLNl kx+Cnk5Jy2hYN4egCVPViiwVjMrG92oVps6SQyl6si2tW1shZYTr94CLmSn8DWCVzcpWiw PHZmkv36DizFGOR41BPx8xP+/As8RRL5DhvK9FOPHD3CjILThw2a3Fg+9eBElg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706381542; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ulKQF2w/un+md87aWxL83x8axj0Rhl1k2C1Dau+tQrI=; b=xUQwsYf2JluGa30eJCgchdPPxa20K7ZfcU4IezNZmRT6jXQ9SWefyKO9JZZ2s8Mqno8JLu pmSTH/vmAYNQ8cDP1y587hLUnq4PTZvEkRU6/OIHThuC8JG9FYXLr78xDwjHknVqVtxgua 7GOZt54au0iykJt0y7w36auG7sV76PT/GiLdlAhXp9zs8l3E6FL3EeB1onyTDPNxYsdGLJ GuxLRS+vHtNeADl1ZYVN9xS6iWLISJBXcr8WvlFOTTprUxkK/at3z8VoNcz8a61Jeu5yqq yANCTN5BvEdgm8/9fO9OCj1+aIVbPaq7fkTUdTciuwrw0G8W0KScAen+zH4gyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706381542; a=rsa-sha256; cv=none; b=bsTADD8eJ3A7C8YyIDfdYi2uqBg3LrrzH3yzdHLpY3LedTryEnhRuyA9q/aKaZ10ext74L 8bbgkSZdhoqwITnY0MOf7nSZbtzdSqRVFY+N/b/X2TUlwQkWJo+FSeZnI3fIAAbo8OdDxS xP5uUSzMc6c9ZLrGuSz0Gppfzs3P8WoyMdDWRYzmgMlJBaNRkf6mX0xUHl2CW/VeTiF6PY XFR7twKcWsT8SnzLKyADezN6nGFdUl3M67MxDlLErURA33RSJx9rtMVv5nW3EglZVTMnQh PLTIWopQP3+2kKsHzmEjdY3MLhmOga9QHxwqcgXtC6v08bJVBGRfby7GH583aA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TMkFf465GzcN5; Sat, 27 Jan 2024 18:52: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 40RIqM71089856; Sat, 27 Jan 2024 18:52:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40RIqMc3089853; Sat, 27 Jan 2024 18:52:22 GMT (envelope-from git) Date: Sat, 27 Jan 2024 18:52:22 GMT Message-Id: <202401271852.40RIqMc3089853@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 3f73fbb0acd4 - main - netinet6 tests: Restore an atf_check invocation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f73fbb0acd4131b08dba4f7590061826ab08df1 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3f73fbb0acd4131b08dba4f7590061826ab08df1 commit 3f73fbb0acd4131b08dba4f7590061826ab08df1 Author: Mark Johnston AuthorDate: 2023-03-31 00:07:20 +0000 Commit: Mark Johnston CommitDate: 2024-01-27 18:51:14 +0000 netinet6 tests: Restore an atf_check invocation This one has been commented out since the initial commit, but doesn't appear to pose any problems. MFC after: 1 week --- tests/sys/netinet6/forward6.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/netinet6/forward6.sh b/tests/sys/netinet6/forward6.sh index 2eecbf382461..b3ccd30aea62 100755 --- a/tests/sys/netinet6/forward6.sh +++ b/tests/sys/netinet6/forward6.sh @@ -375,7 +375,7 @@ fwd_ip6_gu_icmp_gw_gu_slow_success_body() { jexec ${jname} sysctl net.inet6.ip6.forwarding=1 # Do not turn off route redirects to ensure slow path is on - # atf_check -s exit:0 + atf_check -s exit:0 \ $(atf_get_srcdir)/${script_name} \ --test_name fwd_ip6_icmp \ --smac ${our_mac} --dmac ${jail_mac} \ From nobody Sat Jan 27 18:52:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TMkFh1MzSz58kCh; Sat, 27 Jan 2024 18:52:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TMkFg5Mn8z4mMV; Sat, 27 Jan 2024 18:52:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706381543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ucghKaYl1u2Lr/bRpiWFZ5I/ed5fkN0AHAMpFxA80fk=; b=v2mp+MkDgPkNt4gs+Zm/TcaaFaBpDjUnrwCnP/u4RJuSTuUJF5GeqA9WJw/1ka+bJsDOic QnF9sXsP3v3YRs/0z6+AqTLl/uLPmfSz2YWZSF6Oxlv06OoWKfSnzdcUDouXHM8p9QVQW8 SBiSfdx4bn+DSAIHw0+O9gsCc90QCggtOTVu50P/uI2wdXuZp+aG/GgIsCMPMBWpB+46t1 gEG3F1aIbn+Ie4Lze3dyAWr1iTWgvXUaZ99Ze0KxmBJDZxjGMSk7F/zyj+NLKti/J3qgN5 MDsds7schms5G1PUnoFNX8ZcFP9M8Ug5eabBoiRWzv2urzxuvnvpeXrqyWAhaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706381543; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ucghKaYl1u2Lr/bRpiWFZ5I/ed5fkN0AHAMpFxA80fk=; b=MDclUmIggZDEWaohRxmVinnDaIM5FHKDSEh6Jk2xAsIZLxj5EFAJ3IPlN5Wb1LLIR+PJ2H mgH1p76IOCRhXnok5WJZVgCVmkowC/tnTC+uf4/rnJ9HxyMwy08llFg3I7xPgmau/SPbuC pPXrgaamgYThwSl0eoHq0ZSizHcroEs0OKZVLJgtnjK6zT0AKuzylNznmoXVLcEmCbenXf YS06VVSdRZOIab9QAYYjEorvWJEnOYTCXKiB55GFEb1dsFze53TF/sSYAz6R19Uhoo4bhE qIrnWwUufBq680AY050l+4kfxkmWlGGaXLQwF6phuduGQdegQUmXDXtuwLX+KQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706381543; a=rsa-sha256; cv=none; b=FZeoGLMdiBFuhWsLvBlrNFG7bULgqQARDtDKEYVu3pq8cI0nuK4ZH/wVsDLROzRgULNG+u MaAcYoNsK4RJBuSzq3TeXfRE2hZE+zlFAdadaGp/8N735V5EFT+UB/hfBKMefZxIj3BzgH DhRdN+fsnkOoR0WrxvOM1J7jF+RsPyA3rnINJzdVnsFo6KsZK6TDGawYytCYS2I79SX9Ms uKVlNW+RyJrQdmpltaAxg7DojnAwVSouJXhRyQ1GrKxyvOY8v31XSJMLAA8DdhgONrCk30 LyhdN6YKhtRWpslcbaWlYSN5ASYWXdvTpgHyZFKnhyQym9oT60aloY99wrHmGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TMkFg4RMRzbmJ; Sat, 27 Jan 2024 18:52:23 +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 40RIqNoi089911; Sat, 27 Jan 2024 18:52:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40RIqNWq089908; Sat, 27 Jan 2024 18:52:23 GMT (envelope-from git) Date: Sat, 27 Jan 2024 18:52:23 GMT Message-Id: <202401271852.40RIqNWq089908@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 001c48b4139f - main - netinet tests: Make test jail names unique List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 001c48b4139ff6f07de70a16518161dcea5598b9 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=001c48b4139ff6f07de70a16518161dcea5598b9 commit 001c48b4139ff6f07de70a16518161dcea5598b9 Author: Mark Johnston AuthorDate: 2024-01-27 15:26:22 +0000 Commit: Mark Johnston CommitDate: 2024-01-27 18:51:37 +0000 netinet tests: Make test jail names unique Otherwise we get spurious test failures when running tests in parallel. The intent here was to name jails after the tests, but this was done incorrectly in a couple of places. MFC after: 1 week --- tests/sys/netinet/output.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/netinet/output.sh b/tests/sys/netinet/output.sh index 9ede7e66aaa5..23d427605878 100755 --- a/tests/sys/netinet/output.sh +++ b/tests/sys/netinet/output.sh @@ -386,7 +386,7 @@ output_udp_flowid_mpath_success_body() script_name=`dirname $0`/../common/net_receiver.py script_name=`realpath ${script_name}` - jname="v4t-output_tcp_flowid_mpath_success" + jname="v4t-output_udp_flowid_mpath_success" epair0=$(vnet_mkepair) epair1=$(vnet_mkepair) @@ -510,7 +510,7 @@ output_raw_flowid_mpath_success_body() plen=24 text="testtesttst" - jname="v4t-output_tcp_flowid_mpath_success" + jname="v4t-output_raw_flowid_mpath_success" epair0=$(vnet_mkepair) epair1=$(vnet_mkepair) From nobody Sat Jan 27 21:28:16 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TMnjX2Dn6z58xSP; Sat, 27 Jan 2024 21:28: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 4TMnjX1f3bz430b; Sat, 27 Jan 2024 21:28:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706390896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YYwjRxu7xpqAxUW1/to78+rMhJf48GW2gbOg9AH4SAc=; b=FO3nr3CRAcBpr4QkdNJYExAQUK4bJ7kKChMSkKe1JheYY9YIeF4ZFnfWehTnVKZaZ28RuA J5snJMdIsrCPSB8oqLqmmASsy19yDetY8vrIgt2GxOhTf+EhPECJk3TPFJvml1mGXFbms/ Z8udylWDZ7mQ3Vs0bZ39KFmTGF8uoqFXRySw6yCQlU/WR6WZ56waAunZkgiiS43RMo1Ib9 L0e8BswxTJ46JaJ2bFPyDQKjYi19BfrdGaWkIhll/Z+kzXk4W9YkrPxoWaNR7gqzXf+wQT mpXSIEzov9AFqDEhXwDk5b552v49n92utObvnxK8HceWOLyS8DG8ibt3C9L/KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706390896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YYwjRxu7xpqAxUW1/to78+rMhJf48GW2gbOg9AH4SAc=; b=yCCMnyBhYDl83Rq7BuxwU+tYOaAu4UVJvRuSRiPetwdaY0wvw80Egoi9bsvYN3RoCL75L8 Qod3ARrZ/0a3vJ1ZWkKKE7+PPqmu0Nv2bjnHe4gEyE3FpZO6i6bHu0HOeElZh423xahjfY BXNzrKr6/H+pRvVxL1kjpRwOF32ndsGAvGX1BC3phcTJGvAH69qQNwGv1tZ+1ICQq61zEr GuAiXdnTS75ZjSvNOWYeJUUwvd/kqlFtZxc9/BTKms6TtC/sB4yZZ1/p8naW6KPAO6BFRo UI3txkI6wWMg6SMHikt/z7DghnvzbLoAzKXBeucgVDLgwv5ceE0F+TnWD4bi/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706390896; a=rsa-sha256; cv=none; b=FXUalw3wWA60wgC/W7U5Y8XjEFzZ1VbilJ7hK1a3X7ihVEDM5WyT/AZ1/aBNxKkblkUlaf RT9Vr7hMAdwteSFcrxNF2fX6h23xIhMo1VuW7lbfeci0geRfyyihSRnL7g8fxLqmG5HUj6 SzjwatfVrq3wGZ6I1BDsKYPSxh9v5LGCu7p58x/jB0kTXMVxuzJhLPpnTotrW8yq1mTd26 ylFR387DRYLi9eREVCUqMVhhRq4n5o2CBHgLiAyWoiqEQT/P6wLsP7PcVCr470/TNr1f5U 2rN6+Ev4SWlXFnMkwqHTyXdZxSHNe5DqX6DWV3bQhPqubGCO0euov4NPb8z19g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TMnjX0kW5zh2M; Sat, 27 Jan 2024 21:28: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 40RLSGc2042810; Sat, 27 Jan 2024 21:28:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40RLSG6l042807; Sat, 27 Jan 2024 21:28:16 GMT (envelope-from git) Date: Sat, 27 Jan 2024 21:28:16 GMT Message-Id: <202401272128.40RLSG6l042807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: d04e03c19a8d - main - msun: remove fabs from Symbol.map, and adjust comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d04e03c19a8d7660ea36f62720eef9bc96b69889 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d04e03c19a8d7660ea36f62720eef9bc96b69889 commit d04e03c19a8d7660ea36f62720eef9bc96b69889 Author: Dimitry Andric AuthorDate: 2024-01-27 21:24:38 +0000 Commit: Dimitry Andric CommitDate: 2024-01-27 21:24:38 +0000 msun: remove fabs from Symbol.map, and adjust comment We have s_fabs.c, but fabs(3) is already provided by libc due to historical reasons, so it is not compiled into libm. When the linker does not use --undefined-version, this leads to a complaint about the symbol being nonexistent, so remove it from Symbol.map. While here, adjust the comment about some functions being supplied by libc: while it is true that all these are indeed in libc, libm still includes its own versions of frexp(3), isnan(3), isnanf(3), and isnanl(3). Reported by: Steve Kargl MFC after: 3 days --- lib/msun/Makefile | 3 ++- lib/msun/Symbol.map | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/msun/Makefile b/lib/msun/Makefile index ed84e7b578a4..6c8c6c3e8009 100644 --- a/lib/msun/Makefile +++ b/lib/msun/Makefile @@ -154,7 +154,8 @@ COMMON_SRCS+= catrig.c catrigf.c \ s_cproj.c s_cprojf.c s_creal.c s_crealf.c s_creall.c \ s_csinh.c s_csinhf.c s_ctanh.c s_ctanhf.c -# FreeBSD's C library supplies these functions: +# FreeBSD's C library supplies these functions (but note we still have s_frexp.c +# and s_isnan.c enabled above, so they are duplicated): #COMMON_SRCS+= s_fabs.c s_frexp.c s_isnan.c s_ldexp.c s_modf.c # Exclude the generic versions of what we provide in the MD area. diff --git a/lib/msun/Symbol.map b/lib/msun/Symbol.map index 6e74918ade6e..4d5a5e4d7e6e 100644 --- a/lib/msun/Symbol.map +++ b/lib/msun/Symbol.map @@ -88,7 +88,6 @@ FBSD_1.0 { exp2f; expm1; expm1f; - fabs; fabsf; fabsl; fdim; From nobody Sat Jan 27 21:51:41 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TMpDY2z8fz590RF; Sat, 27 Jan 2024 21:51: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 4TMpDY2KF9z45jC; Sat, 27 Jan 2024 21:51:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706392301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AXYlXA25JUU/t2Q6VW1QvWHagZoN5eFD7INyBU/jE3A=; b=LhUVhYORA3+GdtuGHKDcYXKFx17u1Ro0/3oa73puxYjEb3NdIKe8R0+Q0il3/gMWpGbt3P 6pYwjDPejMkTF5/yNAUeX8J521S8SSr1Ii62R3hnM0huu4wl3ErVceNbVPirqBAbPwU4v+ YW70QGUt+lnvj1c7IH6qjEZiFWbFDDxh4eWpAkoZi375o3xTif/7AZdGyeujrXDnSA0MHg uQ9xS7AmCrHinoujFCf3sENqeFvW+voCJyYRAVbzd8CeBnoDHYjcLGhtkcP0nERXiqgZiI mZmHE6DtJahhd+tLjtcU9FtkzAmtm4Tv03D/vH4rWq83hFCudCwOvIp8ekI18A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706392301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AXYlXA25JUU/t2Q6VW1QvWHagZoN5eFD7INyBU/jE3A=; b=hJauGkU7MQghCfK5b9f9nfUV0oFiiTrMOAtfaSeoTHc4lI7x6ooaDTtk+CSgCLf9BKWiEQ JLFiPcNncZVUY0KXrKSP3mS31Qbm/mmeXvf8wG7Uy1DQrOobbg5m2U7OGnEoj8W8PaUS17 tUWUuE3Ava0jNor9vm10hFz74lO3hvS7yX2RF2qTWCxHV6ZC8SvtniyfBCFX3zz/RtLDG9 MeKb5PcKOHFHJnucMPnQjhBEh98oxYztfkJAncby2yJavPdtEaa77bRI2TEVGy5zPbJQP0 bl2V6Snlny6yX1ilhHn3qMxu/Z3JG/Ab+vZt0QSBaBEqLQ7yttHSZpTC1FgcfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706392301; a=rsa-sha256; cv=none; b=OJjyeIRJzOgnB8QupbKeUxWZPRw2/hDJPDlMRW9+A1zvl5TJUZFJiuTvWPzOJvvrsDmJHJ +H+p45FLHH9p06UIlKnVVeCsLN2Zl3CeDynmp5Av7dMhNHl+GQEp4c6PQwDezLKj4miAi3 nkIGFS5ES2B82EL8C9V0g88FolZsL1ALYtbNFyQQAI/eg3o0BCeULL0nOBBsMH+p4PiLBs jCRUmAgqy0kNUV8NVOrsgAp6wyhufTViPvFwlUblgiZjqRsfF8WXA+bfmZJbl96pmRoOxE h976JbybptWTeMTn9Whpsa5KggAhEV/CcdisraRnSpZNvPCz83VHVbN/AW+HwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TMpDY0vKvzht1; Sat, 27 Jan 2024 21:51: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 40RLpfIC085314; Sat, 27 Jan 2024 21:51:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40RLpfxN085312; Sat, 27 Jan 2024 21:51:41 GMT (envelope-from git) Date: Sat, 27 Jan 2024 21:51:41 GMT Message-Id: <202401272151.40RLpfxN085312@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 31aedef26fc0 - main - Merge commit 16a1ef86cbc5 from llvm-project (by David CARLIER): List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31aedef26fc0613f5d61204c624451d57e716ed9 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=31aedef26fc0613f5d61204c624451d57e716ed9 commit 31aedef26fc0613f5d61204c624451d57e716ed9 Author: Dimitry Andric AuthorDate: 2024-01-27 21:48:58 +0000 Commit: Dimitry Andric CommitDate: 2024-01-27 21:48:58 +0000 Merge commit 16a1ef86cbc5 from llvm-project (by David CARLIER): [compiler-rt] remove hexdump interception. (#79378) a freebsd dev member reported a symbol conflict and intercepting this had little value anyway. This is one part of fixing the WITH_ASAN build. Some executables in the base system define their own hexdump() symbol, which would otherwise conflict with the ASan-intercepted one. Reported by: markj PR: 276597 MFC after: 3 days --- .../sanitizer_common/sanitizer_common_interceptors.inc | 15 --------------- .../sanitizer_common/sanitizer_platform_interceptors.h | 1 - 2 files changed, 16 deletions(-) diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc index 0e563fa12022..a6cda8c6bd4f 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc @@ -10180,20 +10180,6 @@ INTERCEPTOR(int, __xuname, int size, void *utsname) { #define INIT___XUNAME #endif -#if SANITIZER_INTERCEPT_HEXDUMP -INTERCEPTOR(void, hexdump, const void *ptr, int length, const char *header, int flags) { - void *ctx; - COMMON_INTERCEPTOR_ENTER(ctx, hexdump, ptr, length, header, flags); - COMMON_INTERCEPTOR_READ_RANGE(ctx, ptr, length); - COMMON_INTERCEPTOR_READ_RANGE(ctx, header, internal_strlen(header) + 1); - REAL(hexdump)(ptr, length, header, flags); -} - -#define INIT_HEXDUMP COMMON_INTERCEPT_FUNCTION(hexdump); -#else -#define INIT_HEXDUMP -#endif - #if SANITIZER_INTERCEPT_ARGP_PARSE INTERCEPTOR(int, argp_parse, const struct argp *argp, int argc, char **argv, unsigned flags, int *arg_index, void *input) { @@ -10543,7 +10529,6 @@ static void InitializeCommonInterceptors() { INIT_PROCCTL INIT_UNAME; INIT___XUNAME; - INIT_HEXDUMP; INIT_ARGP_PARSE; INIT_CPUSET_GETAFFINITY; diff --git a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h index c740778b6228..d7fe7e29b105 100644 --- a/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h +++ b/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h @@ -594,7 +594,6 @@ #define SANITIZER_INTERCEPT___XUNAME SI_FREEBSD #define SANITIZER_INTERCEPT_FLOPEN SI_FREEBSD #define SANITIZER_INTERCEPT_PROCCTL SI_FREEBSD -#define SANITIZER_INTERCEPT_HEXDUMP SI_FREEBSD #define SANITIZER_INTERCEPT_ARGP_PARSE SI_GLIBC #define SANITIZER_INTERCEPT_CPUSET_GETAFFINITY SI_FREEBSD From nobody Sat Jan 27 21:51:42 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TMpDZ4Gffz590RG; Sat, 27 Jan 2024 21:51: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 4TMpDZ38YFz45tL; Sat, 27 Jan 2024 21:51:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706392302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0K5pyKjlnFSI887C2brISG9tc5h6UfhxvJ64mufhLew=; b=MB6iGuiwL2+Pq3GV3wVSVUDxjP2+r74HnRaZg6IBBYJ6aCIhZ/8A0lLj9MId21kygCh2C5 GSVuaP7+bYLdv2f8p5yIc3xGNTEXz7dPLL3ry1N34X6RSOozlxGbfMrY/4j5tZYzoJfWJX 0ktWjlT+0lUZ79VYQc3id/84Ke1kbbyWaKBEdTZmf8WdF+hy5r5Vj8UwbfmYYolu9Ia8Mh R+2930sAyG5JBfzhsdesrnAYWwVLSKPFnUDQxyTzPfkqPJgMvIZF54wnm52tXVGpjx3Dy5 oJ/Py2AoofDS3Afz/nPj/ZkE9An3m7AqyLieAHWQaLQ9O01GYypTvLbwetuceQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706392302; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0K5pyKjlnFSI887C2brISG9tc5h6UfhxvJ64mufhLew=; b=QJdFBudiFttUhssjxZ7lmEaMO+WxSsIjujN/wPbAG+6C8XrDRNLtjug0uv/nLsDU3iwdVu SRfX7swsDqsV46JFS4j5qmMlA+zzV5ZpQZlU9apuDMDnNoFx7yRkDCxg9ptwyyqPrc6mFA D6jbDqVvu8A6ZEBc9TkZdY8Y4Wn8mOM+hoNg0D99easYO+Yr/4Lj+mzSDGBScr4RhHA9oe WTG4sS3HaVmfRfaLtS2soDj5mxdOv86hO7mRCjSZ+YdNl9MREpAHF0O+Oeq8y1EYQ8FRCk 89fwUc5TzRhlM9MMinRbxziHvRdnsbSsOcgdZmbV4SVK2obcuK+KZLybOtLIBw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706392302; a=rsa-sha256; cv=none; b=BbK+rqe0L/bA/dKvkpU8N8hvhhd0jueHJNpfxlbAU1PA0dk4QiIRUquefC1rqH6OBJx9qu j1aaqDlkO5huW9txoraeguk6wmwYHkwPJ6Bd3hSDSnGSzZIg2kHYgatbAcFCR8QY3+OqJS ee5Meu1Wg3qm4KWIS0/tAC7nipG4Q2uahJeevLRuHgBHlM/Da4nLf12TqwsEHQZi/Kpkel P1UveFYjWT8z/ukJ/oPmuMFJkeBI2L1vYmmvcJWARn1WRX4jNhxlJyZgVENm+l0f9usW2D Rcx7i6T7L05ia5j/eCoNcjz4wf7rQHo/WQ/O0N9LRyQCqciWi0uUeqQGvOCbHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TMpDZ1wZGzht3; Sat, 27 Jan 2024 21:51: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 40RLpgAS085378; Sat, 27 Jan 2024 21:51:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40RLpgXQ085375; Sat, 27 Jan 2024 21:51:42 GMT (envelope-from git) Date: Sat, 27 Jan 2024 21:51:42 GMT Message-Id: <202401272151.40RLpgXQ085375@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 5c38ea60a041 - main - Add libllvm and liblldb source files to enable WITH_ASAN build List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5c38ea60a04199dae2c6e5db82461e7275c7def6 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5c38ea60a04199dae2c6e5db82461e7275c7def6 commit 5c38ea60a04199dae2c6e5db82461e7275c7def6 Author: Dimitry Andric AuthorDate: 2024-01-27 21:51:08 +0000 Commit: Dimitry Andric CommitDate: 2024-01-27 21:51:08 +0000 Add libllvm and liblldb source files to enable WITH_ASAN build This is another part of fixing the WITH_ASAN build. Some additional source files had to be added to libllvm and liblldb, since the ASan instrumentation causes symbols in those files to be referenced. Reported by: markj PR: 276597 MFC after: 3 days --- lib/clang/liblldb/Makefile | 5 +++++ lib/clang/libllvm/Makefile | 2 ++ 2 files changed, 7 insertions(+) diff --git a/lib/clang/liblldb/Makefile b/lib/clang/liblldb/Makefile index 0dbcac7d3068..c32e4a387b2e 100644 --- a/lib/clang/liblldb/Makefile +++ b/lib/clang/liblldb/Makefile @@ -421,8 +421,13 @@ SRCS+= Plugins/Language/ObjC/NSString.cpp SRCS+= Plugins/Language/ObjC/ObjCLanguage.cpp SRCS+= Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp SRCS+= Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp +SRCS+= Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp +SRCS+= Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp SRCS+= Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp +SRCS+= Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp +SRCS+= Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp SRCS+= Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp +SRCS+= Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp SRCS+= Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp SRCS+= Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.cpp SRCS+= Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp diff --git a/lib/clang/libllvm/Makefile b/lib/clang/libllvm/Makefile index 3ac81305df19..df39f2eb212e 100644 --- a/lib/clang/libllvm/Makefile +++ b/lib/clang/libllvm/Makefile @@ -666,6 +666,7 @@ SRCS_MIW+= DebugInfo/Symbolize/Symbolize.cpp SRCS_MIW+= Debuginfod/BuildIDFetcher.cpp SRCS_MIW+= Debuginfod/Debuginfod.cpp SRCS_MIW+= Debuginfod/HTTPClient.cpp +SRCS_MIW+= Debuginfod/HTTPServer.cpp SRCS_MIN+= Demangle/DLangDemangle.cpp SRCS_MIN+= Demangle/Demangle.cpp SRCS_MIN+= Demangle/ItaniumDemangle.cpp @@ -1645,6 +1646,7 @@ SRCS_MIW+= TextAPI/ArchitectureSet.cpp SRCS_MIW+= TextAPI/InterfaceFile.cpp SRCS_MIW+= TextAPI/PackedVersion.cpp SRCS_MIW+= TextAPI/Platform.cpp +SRCS_MIW+= TextAPI/Symbol.cpp SRCS_MIW+= TextAPI/SymbolSet.cpp SRCS_MIW+= TextAPI/Target.cpp SRCS_MIW+= TextAPI/TextStub.cpp From nobody Sat Jan 27 22:29:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TMq3k2MP3z593V1; Sat, 27 Jan 2024 22:29: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 4TMq3k1n8Tz4ChB; Sat, 27 Jan 2024 22:29:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706394546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TtVSLkCqUEopS82JB3YYUXn5lvrFKbhSTniNRGQrxJE=; b=EtCGtXL6qq5hSv786Vxu5uBQfFik7yyEd+yK7WCFAz/fQeVjeAdgQxHF4XH0k7CB49Z1Ye Q0s+HXVoSlR7LKid6mZxNxs64yX4IPNJZ4hSR3+fRqtVn8KpbOvKBK/1BMreevmoGSy0Zg kVKA+pQjdbm2xkrupZI3qC1x9fxFJxTdTPDPpDaPnVn9XcGIe9igBM7TQlOcLCS4qqPqnn g+A7is7Ct4rRpEIPGmLdNeth2tks2qzH7YlOCuEaBw/QohRjajd+H/I9ckuzSZToqObk79 k9KdYlSqTiDTi/FZdBPUgvxE5x9QahhkOApX7QZWObRzdhND3iylIYLgpRxoew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706394546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TtVSLkCqUEopS82JB3YYUXn5lvrFKbhSTniNRGQrxJE=; b=joGyQSoA20P1h58ZeDu97QTItjZL38xQ0B4x9DYsnEl2QvSv8yDvrb5sEjqIESaCj3yAIG a2TMBhjFwlgEaK0mY3mjGjlcI4yafPKRT171a77X+2EIyta1C9wb3P7SrQE2zEug7fYRlJ 61qM+ElbHBlFOKzIiHbE/WJ/NkbX8EfeHE/5hLQh+GAKR/AUvP0R3Cf8JK3oers7YB/M30 Uvva0WPImEBOMVOgz26yoliSbHw546MgnfjAGVv68WDdKTEjdT7g3EukxWpcEKOf3DkXC/ YRY4ah0dxaCPyPznZawoKlF5wSf0IxCdL97fYJp3TDWRtbLg/PLaOg8VARp8oA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706394546; a=rsa-sha256; cv=none; b=uRQegTjjSpo/aHWwYX+avgi5fWmSzHVdeITursEJWLnzA641Mxt7CFgVtukFIEjs+tormR upqDIRVnT/wt7QNum4cDXTKbsAB3dT8uOgwP4mtGPQvRxPG/NMaXexI+ToUdRs2iDWaLt3 eQ2as8BMbLuw9nGgEagCxrPYSC3+mQL3EcZwKf2Aijp+MiJsga9IrVb5Q5cUpCpLkpLbxl tmJVbylfoshh3khLLqWi7K/D8TBarOJTBXeFN+iB+/RShq33a5+RcLhQbVsgPd9zMMG1dN GfsBwDCnLsfRu0S2K5G+7/e5XyNEneXt2loLUUkD1+VlrOFOdUAJaYj7HXMOAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TMq3k0rnyzjbG; Sat, 27 Jan 2024 22:29: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 40RMT6xx043540; Sat, 27 Jan 2024 22:29:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40RMT6Qu043537; Sat, 27 Jan 2024 22:29:06 GMT (envelope-from git) Date: Sat, 27 Jan 2024 22:29:06 GMT Message-Id: <202401272229.40RMT6Qu043537@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 3883c6fbf232 - main - ntb_hw_plx: Workaround read-only scratchpad registers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3883c6fbf232452098ba6ea802ef1426d83d2d68 Auto-Submitted: auto-generated The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=3883c6fbf232452098ba6ea802ef1426d83d2d68 commit 3883c6fbf232452098ba6ea802ef1426d83d2d68 Author: Alexander Motin AuthorDate: 2024-01-27 21:51:46 +0000 Commit: Alexander Motin CommitDate: 2024-01-27 22:29:01 +0000 ntb_hw_plx: Workaround read-only scratchpad registers On several systems we've noticed that when NTB link goes down, the Physical Layer User Test Pattern registers we use as additional scratchpad registers (that is explicitly allowed by the chip specs) become read-only for about 100us. I see no explanation for this in the chip specs, neither why it was not seen before, may be a race. Since we do need these registers, workaround it by repeating writes until we succeed or 1ms timeout expire. MFC after: 1 week --- sys/dev/ntb/ntb.h | 2 +- sys/dev/ntb/ntb_hw/ntb_hw_plx.c | 26 +++++++++++++++++++++----- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/sys/dev/ntb/ntb.h b/sys/dev/ntb/ntb.h index f9119fa0aedc..e2af625fff94 100644 --- a/sys/dev/ntb/ntb.h +++ b/sys/dev/ntb/ntb.h @@ -279,7 +279,7 @@ int ntb_mw_set_wc(device_t ntb, unsigned mw_idx, vm_memattr_t mode); uint8_t ntb_spad_count(device_t ntb); /* - * ntb_get_max_spads() - zero local scratch registers + * ntb_spad_clear() - zero local scratch registers * @ntb: pointer to ntb_softc instance * * This functions overwrites all local scratchpad registers with zeroes. diff --git a/sys/dev/ntb/ntb_hw/ntb_hw_plx.c b/sys/dev/ntb/ntb_hw/ntb_hw_plx.c index 57e3265ee5b1..906660116067 100644 --- a/sys/dev/ntb/ntb_hw/ntb_hw_plx.c +++ b/sys/dev/ntb/ntb_hw/ntb_hw_plx.c @@ -879,17 +879,33 @@ static int ntb_plx_spad_write(device_t dev, unsigned int idx, uint32_t val) { struct ntb_plx_softc *sc = device_get_softc(dev); - u_int off; + u_int off, t; if (idx >= sc->spad_count1 + sc->spad_count2) return (EINVAL); - if (idx < sc->spad_count1) + if (idx < sc->spad_count1) { off = sc->spad_off1 + idx * 4; - else + bus_write_4(sc->conf_res, off, val); + return (0); + } else { off = sc->spad_off2 + (idx - sc->spad_count1) * 4; - bus_write_4(sc->conf_res, off, val); - return (0); + /* + * For some reason when link goes down Test Pattern registers + * we use as additional scratchpad become read-only for about + * 100us. I see no explanation in specs, so just wait a bit. + */ + for (t = 0; t <= 1000; t++) { + bus_write_4(sc->conf_res, off, val); + if (bus_read_4(sc->conf_res, off) == val) + return (0); + DELAY(1); + } + device_printf(dev, + "Can't write Physical Layer User Test Pattern (0x%x)\n", + off); + return (EIO); + } } static void From nobody Sun Jan 28 03:12:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TMxMF4zrPz57Yq0; Sun, 28 Jan 2024 03:12:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TMxMF4RBlz4nnK; Sun, 28 Jan 2024 03:12:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706411577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iW24du4tS87zLZ0Xd/U10UUKIzJCjZF6CZDd8xtIucg=; b=JRox05TXR0nwAkHYBPZgF5JMOaRpmN6oge89hWEUxKP27E1bDGico6M3Lz+FoX9LORmOFl dwL0NkgZkpLAUYqXMCwKhnL9rew2OtBelj4kjyWTQmSUMFJsuiCmBXwhthkeSOkjQn9zRS +bWb+sYD9v2dHMRjY4Y5dYpRi42yA7cqZhN4k+UPYUR8os6rFMlTWfbQeSR0SxW18a2NF1 jlGwO4vNPnsDgazdMiuos3CGrm//7gGhHRZ8vspoe1flU2wD0C5HbU/UmkSGD4s21WsNjt U5TH0x3kU8kyl7T2UUhrbNcJ2yBSg9weezSkke3DusqvnIoHIIFWRcyy1N7BJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706411577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iW24du4tS87zLZ0Xd/U10UUKIzJCjZF6CZDd8xtIucg=; b=yX93DeLPl2h6AcKXImyqAK67s8hu35lwwFtwdCWEepmzd0RQ5tLtYPjfp1sRzGNe9wkuIJ L2q9Q3ovYrnhrR54FFQl42prVXPwWV/UmWJtIQiyaWMYUTmNqz5o5qTdacmXedsFvALz2r EfmzUcVleCDAqhSdbuSPIL0VMYAA29Mn4cIPg4VvTUwl/Z27LTK0XxIz70dQr8C1ofrT1A HEJx6jEwS0FcGBRl9JOoetKUTBoLxRRhcX8Bs6IRv55fX2buZ8js2p6gZKKFRZ7xWZRqx0 3IMLcRQtPEnyWU17Sz5M0XEBr7I6jenoMZZn09Bob/B/dsSFoKqNOiXGj0m9wA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706411577; a=rsa-sha256; cv=none; b=a+jWYgX7z53Qn9fHORdSmm3ZOOGXA8n6kJYhoyLmEp2KsClgyTazvVp9iD37q1MJLvk2W0 +sNdZU2x1r9aLtqJiivlressPbfNHYEGLAsZa8DjBXxWhr7Z3SWhPyRCvCNSFvzI5O7/Rs aoPcmqrZ2XO1EMcSqVrLc8xJidomgcHKPzRx0YKC3UM3TEKdVqvk8hYUQa2OYD+0pISKXb Occn6Q8yeNBXBUh3tHs4D6CBC5EYnJyRX6mPqETn0GvVfcHsb3NRL/vGOeYBS6vJD7GXfz rfVHrhIOwtdGP0/Dkxuyas5OBVGCls3fgtVqDtJAaocQcoj+9fD2JrKtl8jFoA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TMxMF3XJmzrZr; Sun, 28 Jan 2024 03:12:57 +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 40S3Cv2T031680; Sun, 28 Jan 2024 03:12:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40S3CvGV031677; Sun, 28 Jan 2024 03:12:57 GMT (envelope-from git) Date: Sun, 28 Jan 2024 03:12:57 GMT Message-Id: <202401280312.40S3CvGV031677@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4dedcb1bb54c - main - libc/amd64: Disable ASAN for amd64_archlevel.c List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4dedcb1bb54cbbe8043c79ad733f966b6ffc6972 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4dedcb1bb54cbbe8043c79ad733f966b6ffc6972 commit 4dedcb1bb54cbbe8043c79ad733f966b6ffc6972 Author: Mark Johnston AuthorDate: 2024-01-28 02:49:41 +0000 Commit: Mark Johnston CommitDate: 2024-01-28 03:12:01 +0000 libc/amd64: Disable ASAN for amd64_archlevel.c The code in this file runs before the sanitizer can initialize its shadow map. Fixes: ad2fac552c3f ("lib/libc/amd64: add archlevel-based simd dispatch framework") --- lib/libc/amd64/string/Makefile.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/libc/amd64/string/Makefile.inc b/lib/libc/amd64/string/Makefile.inc index b1369841bc74..d5bb646c5c53 100644 --- a/lib/libc/amd64/string/Makefile.inc +++ b/lib/libc/amd64/string/Makefile.inc @@ -28,3 +28,9 @@ MDSRCS+= \ strspn.S \ timingsafe_bcmp.S \ timingsafe_memcmp.S + +.if ${MK_ASAN} != "no" +# Disable ASAN for amd64_archlevel.c since its code is executed before the +# sanitizer runtime can initialize itself. +CFLAGS.amd64_archlevel.c+= -fno-sanitize=address +.endif From nobody Sun Jan 28 11:09:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TN7wm3Ynyz58Mb2; Sun, 28 Jan 2024 11:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TN7wm33znz4g7y; Sun, 28 Jan 2024 11:09:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706440152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H1Q3wpYNtkjolkMsEtJDHIu89KT8ISAXxNFVbqApd8w=; b=dZeArt+f4AG0xDkL+aGFMSbnW02s1XwgxoF3K62pY1mMk3LkV4MQX1ptrSTp4wEy1GIXSg i8ZxGEAth8Q0atBf0//p83/3PE+o7ue8Jd+XZO1L1d4L2wFm7jjj3kdp+bztT4F0njTfpo eOWotR0p/s1uctz6gpjcdErXlx4MtaSjVDSPiY+pn78w3PsQl5zRbYifDWAxiokMceW8ui fOul1IP2WV/5AaM2VE1zn+g5L9GhrMW/YZNuhvtetbP/Sc/LnDJiun8STBeGZUqYqJny+p euu8mf5bQi+HY4dQgRAiKRD5jYoTEr8Tb/zRCCW4qTLUp6s7CmoWHJEIf9ux9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706440152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=H1Q3wpYNtkjolkMsEtJDHIu89KT8ISAXxNFVbqApd8w=; b=beZGodRcj53ulC+MsLJxckusXAv26UXR9B1nit6WivAgFtXefA6CsnzM0vR2er51MTD3MP kc2p6b+J/JsTiKOVDAq7gRca6rUEQfJhgAEWs3IS5dUKVXvMmRdxCAJj8G/ybE9gAmV0G2 qYKCFvrL1XnKFDn42ZXlRqZeILhhcucu/HavToRbgF0h9YVMZSh1eixzEV6jEnvSsIaCTI Zk2I655KSnDhLXzMp+uOdPSte7GO9EAEJA+u0YAqwW1aDCtCOSnaCYMrxkEOwiGdNfobtr nEy1zCb7aq7sXM2PWNjfxkwzl674VXrlt12FEpDy02mjoVYRTPd+HppHbi4Uwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706440152; a=rsa-sha256; cv=none; b=RiA1RxvMnGt2/bPdfWkYyUYhkZIb1wljCmY3Ekz524h+8eZrZWTQXfHknqOLSv0pn8cXCF cAS0a++wJUlxIEv249NAsHzxL4OJR0C0bxHRflaYLEhKSMZYbTgtokV5jcQzWUcVsd6jlT 8XUiWxOrOatkQaaK9BgKW4fgIn3mAnbfOQHp1FAlxaKkKWKwKpRSZzKUZ3MF1jeXZkgCwU ulifZFV3tZYcys8wFEApKBEIhFUHOdxhOp1JAjZZSNb7ZKe1k98Mq04Kk92OtyAlpdeJe8 KWuNGZ7TCPRjmD+eTrs9T/yfCMw5tXvIV37kxqaxwhE1ddDwwX4PQn9HtSfxdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TN7wm27Zrz15C1; Sun, 28 Jan 2024 11:09: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 40SB9CiN020605; Sun, 28 Jan 2024 11:09:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SB9CYp020602; Sun, 28 Jan 2024 11:09:12 GMT (envelope-from git) Date: Sun, 28 Jan 2024 11:09:12 GMT Message-Id: <202401281109.40SB9CYp020602@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 34694f3da7f9 - main - ds1307: restore hints-based configuration on FDT systems List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 34694f3da7f9537c34b1878206c65a8cda16c6c0 Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=34694f3da7f9537c34b1878206c65a8cda16c6c0 commit 34694f3da7f9537c34b1878206c65a8cda16c6c0 Author: Andriy Gapon AuthorDate: 2023-05-02 20:46:39 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 10:45:57 +0000 ds1307: restore hints-based configuration on FDT systems Fall-through to non-FDT probe code if no matching device node is found. While here, fix indentation of the switch statement. Also, make the device description for the hints-based attachment the same as for FDT attachment. Fixes: 2486b446db ds1307: add support for the EPSON RX-8035SA I2C RTC --- sys/dev/iicbus/rtc/ds1307.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/dev/iicbus/rtc/ds1307.c b/sys/dev/iicbus/rtc/ds1307.c index e8d24880571c..cc232bae0e94 100644 --- a/sys/dev/iicbus/rtc/ds1307.c +++ b/sys/dev/iicbus/rtc/ds1307.c @@ -225,10 +225,8 @@ ds1307_probe(device_t dev) return (ENXIO); compat = ofw_bus_search_compatible(dev, ds1307_compat_data); - if (compat->ocd_str == NULL) - return (ENXIO); - - switch(compat->ocd_data) { + if (compat->ocd_str != NULL) { + switch(compat->ocd_data) { case TYPE_DS1307: device_set_desc(dev, "Dallas DS1307"); break; @@ -244,11 +242,12 @@ ds1307_probe(device_t dev) default: device_set_desc(dev, "Unknown DS1307-like device"); break; + } + return (BUS_PROBE_DEFAULT); } - return (BUS_PROBE_DEFAULT); #endif - device_set_desc(dev, "Maxim DS1307 RTC"); + device_set_desc(dev, "Maxim DS1307"); return (BUS_PROBE_NOWILDCARD); } From nobody Sun Jan 28 11:12:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TN8054PWzz58N52; Sun, 28 Jan 2024 11:12:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TN8053yz4z4gXJ; Sun, 28 Jan 2024 11:12:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706440325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EGWfjNjL35jeHVF3z5PvUj8kQ8zFX1DcKRRTDGnvdmM=; b=NXu24mdv9dGxsp3sW0respywqZrO5nZg5aovpIN1H3ukPIUoAIcO5oS70KiNw/rwQU0L/8 QNULZcreqKzpBkldwhggghoq9P+UJOf2AKhbZoqhpgo1ZFxEV//xm15h8mFLdj8rvzqwl1 5FX6ERy0A9zGALz8v4lnHz3VMmmnseAbc7D5A3nFKfFY90ftiMScPFlHiFksPpdpwWZePJ VEgddwJ7nyv75sPpkDl9R4aRcvn930XHRxxl2ZMFR3i3/op0ArpUgQbxXIwMvpK2Gu+O+G N22jnnclNuw6ij3iudp/es2v22+cKTHCEIaDijw7phbICZBQ/9oSk4xyCjbGSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706440325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EGWfjNjL35jeHVF3z5PvUj8kQ8zFX1DcKRRTDGnvdmM=; b=a265KacYywI2XVR0iLCwBdvj3kd6uCsUPYJapnTmd0eRgVoDjLwbAEFOQcxA41r3CkGmRB u8bB6fWRmXwBOohbO3mwygdiBfmACILvTZno911CuagB38s7qc9xRiuzegIuTS3hPsqnDl o/D4MzJRB36ruvBSVJLfnWT8X/uGXVePTc8KZukU5c2hjqA+N4j5ABxByn9NAA7i4gMPx8 ikwgv6cdCpt83hv6RYQk1uI+rtAOCfXQPQY66y8UIEVmAilN7qStqJ3xkJrflpncSW+Fdt 0cqTcPjLVNLFUPXzVx8lmPCC+XeVcNTjo+ck52n2P2Q7t08DUv6gpB+pqw0p5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706440325; a=rsa-sha256; cv=none; b=r+tnlc4z+XsWK/7Zr71rp6iopvQ5J0cEs+v8U8//54l9emVNbLFiM3U+6nT5ts5F4ORT/1 wdrKcxX9zqvvdeUezQqbr5BFDcOy6bJ8AKgzFC9M0BA/TovpBbjLSOdXCH1QWgqvNGAoOK c8QStG9vJRl8ZJXfLL7OVy6mY+uoUKCSItw11BKSUWOyuIsq73HiK39Y9247C2fm4dXOqf rgnFdk5mO1d33s8Gak6acC0O6WpyGsEq57MNVeIYHKzZ0aRvANwVJCYRbVFmExTGKuMpG8 5xQqAxmHo+KY3RbNbMfZlg21NZ4llUHCCYs71tyDKhndnjj9/HE68XE2Ob73yQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TN80530Xrz15Cb; Sun, 28 Jan 2024 11:12:05 +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 40SBC5So034086; Sun, 28 Jan 2024 11: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 40SBC56C034083; Sun, 28 Jan 2024 11:12:05 GMT (envelope-from git) Date: Sun, 28 Jan 2024 11:12:05 GMT Message-Id: <202401281112.40SBC56C034083@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 5b54b6ac8ca1 - main - usbdevs: add Ralink RT7601 aka MT7601 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 5b54b6ac8ca1bc0653a3b31e79c1bffd9b227c6e Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=5b54b6ac8ca1bc0653a3b31e79c1bffd9b227c6e commit 5b54b6ac8ca1bc0653a3b31e79c1bffd9b227c6e Author: Andriy Gapon AuthorDate: 2022-07-10 20:11:56 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 11:10:51 +0000 usbdevs: add Ralink RT7601 aka MT7601 This is a popular USB WiFi chip. Unfortunately, it's not supported by FreeBSD yet. --- sys/dev/usb/usbdevs | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs index 221761af4fe7..65dcb06c2f3f 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -4042,6 +4042,7 @@ product RALINK RT3573 0x3573 RT3573 product RALINK RT5370 0x5370 RT5370 product RALINK RT5372 0x5372 RT5372 product RALINK RT5572 0x5572 RT5572 +product RALINK RT7601 0x7601 RT7601 product RALINK RT8070 0x8070 RT8070 product RALINK RT2570_3 0x9020 RT2500USB Wireless Adapter product RALINK RT2573_2 0x9021 RT2501USB Wireless Adapter From nobody Sun Jan 28 11:14:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TN82N3WfJz58NG0; Sun, 28 Jan 2024 11:14: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 4TN82N1jWRz4h4j; Sun, 28 Jan 2024 11:14:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706440444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SWIAigasrJoLebQ1rtHVNc5Id9EqivXN5rkJhNEGURs=; b=skfv1z7vljCo8OekwK9qFuPjZiDUnBy3albZBsQ8It1A26KEuHrPaCdzVRHQ0wPFX/yvKO NzpKP+C9UndcyMDsar/O6SW5VQ6UEsvOkKIT3cI/X+bjO8OLKT5L83igrNpkDs6/Zhvryi 7laMTuiKTn+hR14yA+tNM49pT2wW4DuYE65jFL5PGx4BfzLgO49JOY3e5IePqjRbQhkBHi cDGur6NFXPyQgCVf8Jh/MBfwe38/g0Tnbr4aw7kt7psct+xpYFBca60xGhFnaOHcvcGF4y i3FQaH4sLtmDEPNYfmjz9DcEeNWMqIOPQ0nhb5GfJ641YRfoQGwsIm4qf6xZgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706440444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SWIAigasrJoLebQ1rtHVNc5Id9EqivXN5rkJhNEGURs=; b=tWkpJofKTqlV80uWIKjh/1tBNeX8z5O3tIxXg8WFrx+zYe7nAN8yK893lDz8LnSrEuPNbM KIti8mH5CeT4on+4QWNfRGJnvrT4QHkM54y1vDVV3+B5P318yBBVDNsr35NDqaVtyt4rQG EhdUAgIuJFGr1t/s6804jVn4iD5RmG4V2L290up/igXmoAxt7Fa1TyaGhXAUPjoQh21nEj fIEOfxHCVRIGv4ZQtyGTnB4cVYsEWdFiEy7iC6IdWJ4Ezafhh/YDpBcBiSG3P0tlFK+TGp JCw9RkEkNJGLO0C/nCm6Rsn50IujNQM9NoAV3UpJ+4n47Opq6o3fh1OB3f+y2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706440444; a=rsa-sha256; cv=none; b=OXMQOt2F6PO+S7Q2dhPQ0Hb0iNdxn/zrU8cVI4IYKROYGlZft8Pl+wd5gIZG32HE6Gx8yM 4nTbYNEtIc9z+lIGhBko9t0T9jh2+HmR7RwDOQxwqhfhLA5NX9eUUU9wN6p4yVdWwUd7XW yVnzhaBCacqvi5HPy3HHEtqOUxIQ3y/fLl1vI4MQDeJz0K9tUpqtLvQPT6fg3pT5HaE6zm 6Wvwjnza3qabWI7UkN/rgf5vCCO7wDiwKjhKcXp8EjbPjr+SjGp5rUDAtcvSKRyjbdYc0f 3nq9X7RYP802xjyvrXGRmYf00HYRB/nkj2i0GWTh0t/mbwyXknwfczpwm1qvxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TN82N0VgZz15GB; Sun, 28 Jan 2024 11:14: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 40SBE3hM036394; Sun, 28 Jan 2024 11:14:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SBE3Pp036390; Sun, 28 Jan 2024 11:14:03 GMT (envelope-from git) Date: Sun, 28 Jan 2024 11:14:03 GMT Message-Id: <202401281114.40SBE3Pp036390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 197944948e62 - main - add allwinner overlays for enabling additional USB ports List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 197944948e6229f625306f38403737ed723e544e Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=197944948e6229f625306f38403737ed723e544e commit 197944948e6229f625306f38403737ed723e544e Author: Andriy Gapon AuthorDate: 2022-07-10 20:09:23 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 11:12:39 +0000 add allwinner overlays for enabling additional USB ports For instance, on NanoPi NEO two additional ports are available via a GPIO header. --- sys/dts/arm/overlays/sun8i-h3-usb1.dtso | 14 ++++++++++++++ sys/dts/arm/overlays/sun8i-h3-usb2.dtso | 14 ++++++++++++++ sys/modules/dtb/allwinner/Makefile | 4 +++- 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/sys/dts/arm/overlays/sun8i-h3-usb1.dtso b/sys/dts/arm/overlays/sun8i-h3-usb1.dtso new file mode 100644 index 000000000000..247faa370a14 --- /dev/null +++ b/sys/dts/arm/overlays/sun8i-h3-usb1.dtso @@ -0,0 +1,14 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "allwinner,sun8i-h3"; +}; + +&{/soc/usb@1c1b000} { + status = "okay"; +}; + +&{/soc/usb@1c1b400} { + status = "okay"; +}; diff --git a/sys/dts/arm/overlays/sun8i-h3-usb2.dtso b/sys/dts/arm/overlays/sun8i-h3-usb2.dtso new file mode 100644 index 000000000000..02533289e3dc --- /dev/null +++ b/sys/dts/arm/overlays/sun8i-h3-usb2.dtso @@ -0,0 +1,14 @@ +/dts-v1/; +/plugin/; + +/ { + compatible = "allwinner,sun8i-h3"; +}; + +&{/soc/usb@1c1c000} { + status = "okay"; +}; + +&{/soc/usb@1c1c400} { + status = "okay"; +}; diff --git a/sys/modules/dtb/allwinner/Makefile b/sys/modules/dtb/allwinner/Makefile index 524636e380d6..f04be9ca0dc9 100644 --- a/sys/modules/dtb/allwinner/Makefile +++ b/sys/modules/dtb/allwinner/Makefile @@ -29,7 +29,9 @@ DTSO= sun8i-a83t-sid.dtso \ sun8i-h3-mmc0-disable.dtso \ sun8i-h3-mmc1-disable.dtso \ sun8i-h3-mmc2-disable.dtso \ - sun8i-h3-spi0.dtso + sun8i-h3-spi0.dtso \ + sun8i-h3-usb1.dtso \ + sun8i-h3-usb2.dtso LINKS= \ ${DTBDIR}/sun4i-a10-cubieboard.dtb ${DTBDIR}/cubieboard.dtb \ From nobody Sun Jan 28 11:31:19 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TN8QH5CXhz58PjB; Sun, 28 Jan 2024 11:31:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TN8QH4kqrz4jRt; Sun, 28 Jan 2024 11:31:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706441479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jQqWhyA4nx24S0Pv4+Au2aeYPz8m4lJWge+2ftRfVr0=; b=T69k/809kc1GKfjp5Q0/pHPX2aELj6FOW2DrlNZeSD0EAWkOEu1I3o8VqxJcJ1ELTadAXy D0nCoo2FsxJ/WHW/IkeZSVWy1nvG5ty9wtrUWCKIhb48B201WhxIX74sSyffz0+X06BX0t GE+XeNnrxnkDrFHTQ1DHdNLHdQ79/7Bqxxjawi/6FsIPhs+sw8NyB4eqtp72ugTNWe4RVy uPOncw7weuqz9hw+Elty7VqF9NHVHD9V02YpuvTB7dmp129Vwp9JsKts2bQnQb+//nTdy5 LFzzguTvZxELN6e+z5f9ZJwKUiCtcoKlKjwG3DJnch+jBQTTjok8qaOZowzISw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706441479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jQqWhyA4nx24S0Pv4+Au2aeYPz8m4lJWge+2ftRfVr0=; b=BEKpPS56f319m//nnm1Y7uUfhkUMi9bK09hm3nIlx2fJofLMUkzrheDLhRqpf25BnNsdxR iuJD3Upv94wP3FzWqwsATqAdxTTIZKR0UX18pIZfSUhuo80Bk5MRgRYqcqOhWOxBGriBUO 6QY3uL2J4Xu7Ou8+tDcmHJWJDXPxgugppMUBhqtl7xY6Muv1BmbuTqlFEVUKVUgw8iOxoJ M4/trIYAvp2p4o8xaKaI70NVCGRkOK4ES6INvKYtv5/+22QjY9TrcFRz4GvZV2OQWYZJlD tnEJpxRuMuwYOR+Rvu3KWnb//9jswNZL56fRWN5hjTerBzHCSwGJ8TM991jH8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706441479; a=rsa-sha256; cv=none; b=ot4zLJFkIymfrchsbxjBZoxxDKWR8i525shI8t7XSrY4InUPiYWapIPZmCk2Ohx9ttEP+T 2Yx6+RVZyBw4VS107AYbZB5btti1nz0741C8a1lkR0Ykz5dQa/qu5z74nGZ/Ls3TGb2IIf ibkGCSQx2gvZHRVKcollywYTDN3VAAOAg0kaMJmNxCDHnB/PksxtqvAAP+VMF2D+XXaU48 aqu05TC1cB7ckLtEjHuXliIF3VWKI+rMbVl9BuyWfBpn5jUSYKvTcCfAuycn0k9X9EIRic aiaGzLusUuL84RabmJvcJS7xTtMWPFbCdzEms2mhFat245vLyrP37o7/DewGrA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TN8QH3VwGz15w8; Sun, 28 Jan 2024 11:31:19 +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 40SBVJjj066679; Sun, 28 Jan 2024 11:31:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SBVJCs066676; Sun, 28 Jan 2024 11:31:19 GMT (envelope-from git) Date: Sun, 28 Jan 2024 11:31:19 GMT Message-Id: <202401281131.40SBVJCs066676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 320e4beb9761 - main - gpiopower: trigger low, high and both edges List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 320e4beb97618c6964380bfa404a3e96c5de7663 Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=320e4beb97618c6964380bfa404a3e96c5de7663 commit 320e4beb97618c6964380bfa404a3e96c5de7663 Author: Andriy Gapon AuthorDate: 2024-01-28 11:29:41 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 11:29:41 +0000 gpiopower: trigger low, high and both edges Power off or reset may be activated either by low or high signal or by an edge. So, try everything. Also, the driver now supports DTS properties for timings. Finally, the driver does not change the pin configuration during attach. It is assumed that the pin is already in a state that does not trigger the power event (otherwise we wouldn't be running). --- sys/dev/gpio/gpiopower.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/sys/dev/gpio/gpiopower.c b/sys/dev/gpio/gpiopower.c index 5c369396813f..2f09f79850d5 100644 --- a/sys/dev/gpio/gpiopower.c +++ b/sys/dev/gpio/gpiopower.c @@ -34,6 +34,7 @@ #include #include +#include #include #include @@ -41,6 +42,9 @@ struct gpiopower_softc { gpio_pin_t sc_pin; int sc_rbmask; + int sc_hi_period; + int sc_lo_period; + int sc_timeout; }; static void gpiopower_assert(device_t dev, int howto); @@ -65,6 +69,7 @@ gpiopower_attach(device_t dev) { struct gpiopower_softc *sc; phandle_t node; + uint32_t prop; sc = device_get_softc(dev); @@ -80,9 +85,20 @@ gpiopower_attach(device_t dev) sc->sc_rbmask = RB_HALT | RB_POWEROFF; else sc->sc_rbmask = 0; + + sc->sc_hi_period = 100000; + sc->sc_lo_period = 100000; + sc->sc_timeout = 1000000; + + if ((OF_getprop(node, "active-delay-ms", &prop, sizeof(prop))) > 0) + sc->sc_hi_period = fdt32_to_cpu(prop) * 1000; + if ((OF_getprop(node, "inactive-delay-ms", &prop, sizeof(prop))) > 0) + sc->sc_lo_period = fdt32_to_cpu(prop) * 1000; + if ((OF_getprop(node, "timeout-ms", &prop, sizeof(prop))) > 0) + sc->sc_timeout = fdt32_to_cpu(prop) * 1000; + EVENTHANDLER_REGISTER(shutdown_final, gpiopower_assert, dev, SHUTDOWN_PRI_LAST); - gpio_pin_setflags(sc->sc_pin, GPIO_PIN_OUTPUT); return (0); } @@ -107,10 +123,16 @@ gpiopower_assert(device_t dev, int howto) else return; + gpio_pin_setflags(sc->sc_pin, GPIO_PIN_OUTPUT); + gpio_pin_set_active(sc->sc_pin, true); + DELAY(sc->sc_hi_period); + gpio_pin_set_active(sc->sc_pin, false); + DELAY(sc->sc_lo_period); gpio_pin_set_active(sc->sc_pin, true); + DELAY(sc->sc_timeout); - /* Wait a second for it to trip */ - DELAY(10000000); + device_printf(dev, "%s failed\n", + (howto & RB_POWEROFF) != 0 ? "power off" : "reset"); } static device_method_t gpiopower_methods[] = { From nobody Sun Jan 28 11:32:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TN8S81Z5tz58PlG; Sun, 28 Jan 2024 11:32:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TN8S80z7zz4k2s; Sun, 28 Jan 2024 11:32:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706441576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mjrIA8Ct+V1IlH2/u0d3ZkU3u4w1wChDrFpr/I1coY4=; b=UBX2VJ+B5ad+mdmjhhPJmLf68vHGUiMBCU7Q6iwUMGwdkNELu9rBYqLJZR5BCMWwU8mPGV LAXcq1upE8M/tdB59WTMoyP/iA9tD2anvhQla/hXw1aEr/SBpRruDM4hT9zgg02xLfA4Dx /rZQcEgFioRVWSsasVtKFspzdEK/nAkBwANSmln9qYXdbjKdxv6/krpTByPaNKKjuQ239j WjrIiLnTg/GqHfkobBdJ57gio5T4xyMushZXvQD/djupIjB0AjqFJy965RLCQkRj9ieH2L +o6QAQhke+ahzcq0mHzRymDuPpA9zfbUp3eQiO6IJekRFxmxq+/sgx/GaLJ6OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706441576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mjrIA8Ct+V1IlH2/u0d3ZkU3u4w1wChDrFpr/I1coY4=; b=WsO3mxZC5rM4o74h+8Y6d69C24VXqKnRLly5faUWBqXs3ADYZJwRJQfFMQhIDNnt6BH3Ev Lc/JmSSCVg+1J/NcGCcr14Zq5hu1b6pT2FjWh5eVspudLZsriO9s+97jbKXFaY61j6jQtl 6hkIDJQ4Mwdg81NCPaDAhB++ohg1lE7VySpe/4Lf3IO1PTIwXf+mEZfizATiN2lBsE60UF 58p7rZi51sXXaVk9ndOVu2mLk49yBdxQSYL2fMQV0UAj38xiLNSktfcSsdKQky9zuN0uI4 6J3UgESGBM+vpBHe+/l7LDB4wEitPxmm7s3YhdRYc2hDhegLn5abNKdZYXKXng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706441576; a=rsa-sha256; cv=none; b=HgY1Ss/IxkRWgv6/C4aFYJgzFn/zX3xENw8UvdA5QY7bt60/TBIecAbWAn9ldQJ/lsctQ1 OVuc0HkexD7bPz5PU9clwo7lQbL/rqjD3VvXLAoXo8hMUfqipSYSguGOCQeNLoDsS3g/dF UGk8jiZt212obtCKz03T7ble9jh6Z5XNv/0DnOXVkFoHOSc5KcJ/yIfq7RGcs8V+pDTgE/ 1Ovi3HRpCL2O5qmH3bWhiFDW62ZX7OOYoIkn0XRlmvXLkLIbpNtKePMgAKqaeh9N5lvrSB P+wwbN8yqL5OufspyHV4xyq/HZc8JTwO2L4mqAjFUSLsAEZiel2dEjLVDAU+Dw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TN8S801xZz15fh; Sun, 28 Jan 2024 11:32:56 +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 40SBWt48070027; Sun, 28 Jan 2024 11:32:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SBWtcg070024; Sun, 28 Jan 2024 11:32:55 GMT (envelope-from git) Date: Sun, 28 Jan 2024 11:32:55 GMT Message-Id: <202401281132.40SBWtcg070024@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: b587cb69f35c - main - audio_soc: set "status" as being at simplebus List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: b587cb69f35cd7bd280fe1f8c82b37f56f10d5cf Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=b587cb69f35cd7bd280fe1f8c82b37f56f10d5cf commit b587cb69f35cd7bd280fe1f8c82b37f56f10d5cf Author: Andriy Gapon AuthorDate: 2022-01-11 12:28:48 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 11:32:38 +0000 audio_soc: set "status" as being at simplebus This is more true and less confusing than previous "at EXPERIMENT". --- sys/dev/sound/fdt/audio_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/sound/fdt/audio_soc.c b/sys/dev/sound/fdt/audio_soc.c index c7f09e3787db..3e937720bb5b 100644 --- a/sys/dev/sound/fdt/audio_soc.c +++ b/sys/dev/sound/fdt/audio_soc.c @@ -408,7 +408,7 @@ audio_soc_init(void *arg) pcm_addchan(sc->dev, PCMDIR_PLAY, &audio_soc_chan_class, &sc->play_channel); pcm_addchan(sc->dev, PCMDIR_REC, &audio_soc_chan_class, &sc->rec_channel); - pcm_setstatus(sc->dev, "at EXPERIMENT"); + pcm_setstatus(sc->dev, "at simplebus"); AUDIO_DAI_SETUP_INTR(sc->cpu_dev, audio_soc_intr, sc); AUDIO_DAI_SETUP_MIXER(sc->codec_dev, sc->dev); From nobody Sun Jan 28 11:33:33 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TN8St1ZBsz58Q6G; Sun, 28 Jan 2024 11:33: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 4TN8St0xZcz4kKp; Sun, 28 Jan 2024 11:33:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706441614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HZw8ir+F8lD9RbskPqnHBO244dHUN1HRTfkDp3akI9M=; b=fgzLirDb74AEEEIvRysEBWUSTV4kaa/kCYHfIpAKD5gZJJSHjEy4apZuWgDjM7sLiMA82m whl9+uRgsTkZIAM3/dAkBOf4MkvrfrIGO+wFW9pmaLqr/0/k2Myy5eHMc7923epcvH8nrp 2YdJfztYKo1HzPMYoOFlmwZCvzlg5PmRb641wPnm5ZnVACTJlLjSiwjderZzOl6Mtoh1KQ UEJ5DlZEkMv9R6iiqCW6Z1WEICuPhivnO49DYYv/Ldhgpt2AxXgf5MJI0HYsw6zKbUnh6Y 0mWn4p/1agDklN15cMxDjGwsJr6Gz/gEvdJPyl22h0Q6f4t7g5mvGW9mx8i2jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706441614; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HZw8ir+F8lD9RbskPqnHBO244dHUN1HRTfkDp3akI9M=; b=Q2QflmV6nx4Rk1LDeKuZAKq7nakUpvK6ou0Ju0ChB8GcjcgBh2skZtlsT5kiNC2PGXYUwa zP58dmenFyjIsAKjV8QYejPzbeK+bzLgexk4ObAtADJt9PF+z12bD4CbuE/1fyfefEktWm iu0vpACrzac0pPWKR3a0NOqsy4QivbvFLy+W1GLai7/KPa45bmCb8WADu4WGTBNX9Lm69M e4Dz1UqRuApDGIBtxvtN4qZQjxAyqZlv2uM11NXdQZ4IRdYe01lQvnm1Gg7A+8SmQsQvuu 7CiBqNLeclei4GTblpX0tb8JoeB8U/Jo5GWQTpQ1U1E5KmoClKHvr0h8+7EtjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706441614; a=rsa-sha256; cv=none; b=beEXGnHkxJCzeVhT72o+G6GOlNUuNESvsUeEVhscEmvV1T8bdpvLmiyaKNvR8JzYNKjA5T u4k5xjV8h8Tr4DHU3V36QuiuA+jw2QhRM018Mp5anApX68aEnRHWon4aKipKU7TIC8YSDb 4rQQsk5+XnCwu5tyqW4MA0EdDiW7/DAy+56pa709BLWMInDBKvAo5mNgSngLQl/TRcrZjV NlZpv1lENNfLgy9H734H9V99Lhir5Mbg4MFl/s9iXxYPWfms4GHg7fOG4gjkcsHv5tqiXl 8bmHN8RsItftzLmOPJFg/kUOZk63HZRMzyFqP1CWze6ZKXd8fDjttnKCg3/S7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TN8Ss74Rzz15h8; Sun, 28 Jan 2024 11:33: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 40SBXXEr070284; Sun, 28 Jan 2024 11:33:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SBXXlX070281; Sun, 28 Jan 2024 11:33:33 GMT (envelope-from git) Date: Sun, 28 Jan 2024 11:33:33 GMT Message-Id: <202401281133.40SBXXlX070281@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 408a9efd75dd - main - rk3328_codec: remove diagostic printfs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 408a9efd75ddcf59a05069681c3b32cb1118aa9a Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=408a9efd75ddcf59a05069681c3b32cb1118aa9a commit 408a9efd75ddcf59a05069681c3b32cb1118aa9a Author: Andriy Gapon AuthorDate: 2022-01-11 12:01:31 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 11:33:16 +0000 rk3328_codec: remove diagostic printfs Most likeyly there were intended as reminders for unimplemented functions, but they do not seem to be useful. Also, a small style nit. --- sys/arm64/rockchip/rk3328_codec.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/sys/arm64/rockchip/rk3328_codec.c b/sys/arm64/rockchip/rk3328_codec.c index 91d73ee4ca34..480a1087ea2d 100644 --- a/sys/arm64/rockchip/rk3328_codec.c +++ b/sys/arm64/rockchip/rk3328_codec.c @@ -434,11 +434,9 @@ rkcodec_mixer_set(struct snd_mixer *m, unsigned dev, unsigned left, unsigned rig RKCODEC_LOCK(sc); switch(dev) { case SOUND_MIXER_VOLUME: - printf("[%s] %s:%d\n", __func__, __FILE__, __LINE__); break; case SOUND_MIXER_MIC: - printf("[%s] %s:%d\n", __func__, __FILE__, __LINE__); break; default: break; @@ -546,27 +544,15 @@ rkcodec_dai_trigger(device_t dev, int go, int pcm_dir) { // struct rkcodec_softc *sc = device_get_softc(dev); - if ((pcm_dir != PCMDIR_PLAY) && (pcm_dir != PCMDIR_REC)) + if (pcm_dir != PCMDIR_PLAY && pcm_dir != PCMDIR_REC) return (EINVAL); switch (go) { case PCMTRIG_START: - if (pcm_dir == PCMDIR_PLAY) { - printf("[%s] %s:%d\n", __func__, __FILE__, __LINE__); - } - else if (pcm_dir == PCMDIR_REC) { - printf("[%s] %s:%d\n", __func__, __FILE__, __LINE__); - } break; case PCMTRIG_STOP: case PCMTRIG_ABORT: - if (pcm_dir == PCMDIR_PLAY) { - printf("[%s] %s:%d\n", __func__, __FILE__, __LINE__); - } - else if (pcm_dir == PCMDIR_REC) { - printf("[%s] %s:%d\n", __func__, __FILE__, __LINE__); - } break; } From nobody Sun Jan 28 11:37:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TN8Y50WJjz58Q87; Sun, 28 Jan 2024 11:37:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TN8Y473XPz4kpP; Sun, 28 Jan 2024 11:37:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706441833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dET5YkQJX5GxX1jd+bz7bQRuO4eUWZ8spv4zv8kbFBM=; b=NVmwPvZ/pEKFpJgysR2VDTBy5UB/lAP80RXQ6ZxOiEhIGm1h7n4dxjo3+SYzwpvQJjxAw5 leDQPOwCdKSgA+rIAjnXNquIolvyjJS28cmS0iqbdAi/oEAIJeP6hZEktQcnCI00my37s8 CGhta0Qq6JieETNlAWjMpm7RGZ+YLq4GOKUZbPR9zmrirIeilbQVkRtbBaxR+k+hFBvjgB Rr772J5wnWFCkm48FIrlOaPyxuzvOm2xZFawZDDtK1fuCrslnTuWt7g80Xhs+pTlBvZiQd DXhiv9aLCAwb6sUGkE5FNxim0YmkHj3FukQhNm2sqESl/NdE8gsMD7YAz+1cjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706441833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dET5YkQJX5GxX1jd+bz7bQRuO4eUWZ8spv4zv8kbFBM=; b=Z2gmUksm4TDTOU731M+3dW8K0+p8bZ7afYS9p2Uvr+k69hOxlKvIHWl6ofuZufp60H/jyU tPdcaP3ozWH2m6f6krCOXpq3mlV/cWcxQdMdqbl3y0gTdkmhGS0q3LGLtBreyg8204ltPA EYbJEaKu4REajkyqvO6u1dqdsWOrASy58t6OWAPrAIgZAsmbMQB97d4vzmPVHakkhSwXGj H19H50kr5wT9mhCKzndDoU9p4gubgk7Ok4r13wt0HE5/F+sJWEBBxvY5M1cIGJOFeOSzYH FROkv/KIg2UL10nRJwMVdZp7ooWHa9OPIyLMgyNE0VI448hnt45Owhz4UbNH9Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706441833; a=rsa-sha256; cv=none; b=I+qvjITtZhtrFi/p0eShVQ23zYmWdUlAyyXbpOXQpuCBd7T8V4DOVSclArF3M1Mb2xnDxV YwtL1mt+/pVDwbO/VUzZ0PGdzSdBkLXPcQp+xpuUrVRAE+mPFgxaUUNLRCPCLt1YlfLgn1 x2Vr3PxkyeAJX/S3pNKg5NPYU2/R9lW+u4548b47XkhSMliWzk7zPcm/swYEfrNHbKQLYT cLiv/qxF/MN2y6Nhzpy4Wt3fQn4PPNtIJ0AXUmJFUATc83Yvr6LUmnrxzFPWWIKU/TzUAb MDnFC13T0afQsGPU3tu9y6QPKJRbndMat8Ov0T0oFNWoJSsm0am9o7pde6GLdw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TN8Y460vZz15kP; Sun, 28 Jan 2024 11:37: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 40SBbCbK070906; Sun, 28 Jan 2024 11:37:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SBbCM0070903; Sun, 28 Jan 2024 11:37:12 GMT (envelope-from git) Date: Sun, 28 Jan 2024 11:37:12 GMT Message-Id: <202401281137.40SBbCM0070903@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 406e959d07c7 - main - rk_i2s: change interrupt type from MISC to AV (audio/video) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 406e959d07c78521fb755d94dc784d377f302cfe Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=406e959d07c78521fb755d94dc784d377f302cfe commit 406e959d07c78521fb755d94dc784d377f302cfe Author: Andriy Gapon AuthorDate: 2021-09-24 17:06:49 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 11:36:19 +0000 rk_i2s: change interrupt type from MISC to AV (audio/video) This gives a higher priority to the interrupt handling thread. We need it because its work (filling the hardware FIFO) is time sensitive. --- sys/arm64/rockchip/rk_i2s.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/rockchip/rk_i2s.c b/sys/arm64/rockchip/rk_i2s.c index 6d3db56919d7..08fbbd7915bf 100644 --- a/sys/arm64/rockchip/rk_i2s.c +++ b/sys/arm64/rockchip/rk_i2s.c @@ -544,7 +544,7 @@ rk_i2s_dai_setup_intr(device_t dev, driver_intr_t intr_handler, void *intr_arg) struct rk_i2s_softc *sc = device_get_softc(dev); if (bus_setup_intr(dev, sc->res[1], - INTR_TYPE_MISC | INTR_MPSAFE, NULL, intr_handler, intr_arg, + INTR_TYPE_AV | INTR_MPSAFE, NULL, intr_handler, intr_arg, &sc->intrhand)) { device_printf(dev, "cannot setup interrupt handler\n"); return (ENXIO); From nobody Sun Jan 28 11:37:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TN8Yc55B3z58Pv9; Sun, 28 Jan 2024 11:37: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 4TN8Yc4Z0Sz4l0C; Sun, 28 Jan 2024 11:37:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706441860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ybpZGYNWlE8sSuD1p2iCXMa4NQjdk1Kfx8uQyNnbtDE=; b=xLEAKhZdBWX1kUyrq4VHce6f6VsLECdPz73mDRZOeJ5Q7TLQbb3Dx75gklFGwmphisuKkS FsY/y1/3NvUfXjZcveW4u7IlmFDrAgmKQ5fVkbUVKLkbg1KvtnvZ5Lk7uSh/c7e28q5xHh J1VY51UCErB5d/igFUQidvJAVfWlxoyu/+w9Wt/97Mu6s2urH/ysWF9B2cTAK4IBu9LO15 s7Xg2CH66e9Fu0f2RGhkN7B+BhsyzjsBfIgIIBiumpak57C/NaiiQIZC3KrW1sBRY+SA+P loYebrLO+dH2fnUYVWG/aeX6NQcE0KSqyUdCh+OpPbfHWx9NDn8rczFrTuc0HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706441860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ybpZGYNWlE8sSuD1p2iCXMa4NQjdk1Kfx8uQyNnbtDE=; b=cSWT9WPa5wOo4Rlfcr0DC2K5LcCkYwJffnBqmYzXHgg8O37CXeRdAP3Bg/gwd6N4MF6Poq QXHbddCENgr7usD7lOWVCVWJKPSKY48RTkvE2lkV4KXPqAmSwm3802gO+Alej0QEvtIfk3 I9XbFYF3n3iFbOvLUSXMcqILys6kQJdHNNp6BA1l5vmeK/XkQgU6mG59q/p1190jhdZWJt 6lKZA/XO5y0AWPgFOCsZiq9gThysXxbknLnYN1WeoTXpv9zUn/YM7BTc7fDmQaaFN67kN1 PbIhVG/NFXTu39drHomQGjPzX+cOU7Uv1HecphUvHrfngjQFXlp0eo9aat6mIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706441860; a=rsa-sha256; cv=none; b=ILmHKF6BdS4eEE7ZMOY0DZz097QJC0XCQ37zJ2VG6CNOuq0iCr2aL8bH9IyrJfMILEHTjB jBmNYG82Rf4mJJpwxpuHBCe1Ps/tbkSPsU8SPepvxw3RB76RmF9PtqZs0rmHqV5fCZP/Dp o7CTfoq44k06EsXqnCeTg0H49jpSUU7Eb3sCkvFTwc/Xy613mGbJCPPe6NTMYM6/Yq3ZyV dAbk2BU5At4w2PR/fIORXv8U5ObhYKF5A0WJl4x6qpVsJqC/vpldE7ybetDUCMJL8PHOgB l9Lgr+i+AOqp+FpR0HLTPg82mlJdiv9n2vINp4A4E/9lPqWX8Egh6gHTXxvbHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TN8Yc3dQzz15WB; Sun, 28 Jan 2024 11:37: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 40SBbeAi071103; Sun, 28 Jan 2024 11:37:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SBbeBU071100; Sun, 28 Jan 2024 11:37:40 GMT (envelope-from git) Date: Sun, 28 Jan 2024 11:37:40 GMT Message-Id: <202401281137.40SBbeBU071100@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 89cb925fddac - main - rk_i2s: remove unused definition List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 89cb925fddac372f74068b9e57528090299032a2 Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=89cb925fddac372f74068b9e57528090299032a2 commit 89cb925fddac372f74068b9e57528090299032a2 Author: Andriy Gapon AuthorDate: 2021-09-24 17:04:27 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 11:37:25 +0000 rk_i2s: remove unused definition --- sys/arm64/rockchip/rk_i2s.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/arm64/rockchip/rk_i2s.c b/sys/arm64/rockchip/rk_i2s.c index 08fbbd7915bf..3d6aaf523c4a 100644 --- a/sys/arm64/rockchip/rk_i2s.c +++ b/sys/arm64/rockchip/rk_i2s.c @@ -50,8 +50,6 @@ #include #include "audio_dai_if.h" -#define AUDIO_BUFFER_SIZE 48000 * 4 - #define I2S_TXCR 0x0000 #define I2S_CSR_2 (0 << 15) #define I2S_CSR_4 (1 << 15) From nobody Sun Jan 28 11:39:29 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TN8bj4MTQz58PvH; Sun, 28 Jan 2024 11:39: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 4TN8bj3sR2z4lgZ; Sun, 28 Jan 2024 11:39:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706441969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D9KaVStlihf7vtnhucsi7eP9Rppfb7FaQBmTliq1T04=; b=j4MhV4OZ0F1OHFLWwbB+9tXdw0ax6uwVrsl0jcgrAetFyA70nd2MC01r+zXjrOORkHsgM7 2rEJgXIsJNGHZnC3D9QDNa4JFj0JYXoueNkDLCs4BLhhIGF2Ue5q2uu6IUIU2JLCtmFh9O dF9tv8r5x7RpCRU8Hvs09HpnM4VtDotIsG/S4QutV2sDmryg/0dW5/Z2gIvkgFoM87QVnn h4Ci7dkwMMlhQ85qhEVqjkFgWXhYd97kVD9tB5Z2yzlqdCGU0hNEzGuh1wr8wKgX7b/fz5 fXWSJi/a20lFma5yE5LSwXM3s5OfLz7mXL4gX7S0GvjBteiohLYmfWX12VDsxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706441969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D9KaVStlihf7vtnhucsi7eP9Rppfb7FaQBmTliq1T04=; b=DKjsHoGiNaM/RKOsa2m6Ed8nz7OQCjd0rY9E1rJfjUBDy15yDE8pG8ijNBw8mvfuLnIMuz EM8Uase3x+jszsbgnggKKu810iQAmEhjw9Q8PbUOAyytIIiPelbnEzGJk4QlJkbjKykyaY 04wgExLttaguYaPe7FhGRgIiVgz99KfPtVClNPrObMpVB0GWKrc5vrZefpVrep0b/fAojl OZuWqvMe9yV20yqSs9Qk5Eph8GHgrhB6ryJo0F4GhQP7l75IcA1UaVJlClOaXpueMuZ5ss azZabzhIrYOjXuUVh4pAEe+kMyeP55pMiuaBkAiB51/70DDWC2DxSmWeHy5Mrw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706441969; a=rsa-sha256; cv=none; b=nEHkoYbDUigojr3Sqadq8bk87ktUagVbEyfBgKp9oXZRVeLvdGVEGd/9w2FU7LZFNmf/eN 9KkQf+9uaCRE8PoKHPS65PDuQOqPO51gin8qyd6y+bCHTVf79ZhSUdJYNb0WgsRkN1s88u Ld6oc5mzqXf7T9mXuKzw3iGhkAz5o1blKS8O8PyO21WaYNoco+jQ/gsTV9j+QWhMogmigf on2sP2DhvBIVuv1JYxQ+95LlUmgFLH+VzpZz4uycBu8I0sfVVnfkttqZnD9jL9GOhUvf0O C5xB8tkwFcH7s3jmPZzS93c/DjSXKrydJcfs9sTUAaY3V9Ha5zvV83keHT9gFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TN8bj2vxqz15kQ; Sun, 28 Jan 2024 11:39: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 40SBdT1C071439; Sun, 28 Jan 2024 11:39:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SBdTHV071436; Sun, 28 Jan 2024 11:39:29 GMT (envelope-from git) Date: Sun, 28 Jan 2024 11:39:29 GMT Message-Id: <202401281139.40SBdTHV071436@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: ea7f45d3d8d5 - main - dwmmc: fix a typo List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: ea7f45d3d8d5d41a9cded5765dea43ed215a663b Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=ea7f45d3d8d5d41a9cded5765dea43ed215a663b commit ea7f45d3d8d5d41a9cded5765dea43ed215a663b Author: Andriy Gapon AuthorDate: 2021-09-24 16:32:39 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 11:37:57 +0000 dwmmc: fix a typo --- sys/dev/mmc/host/dwmmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mmc/host/dwmmc.c b/sys/dev/mmc/host/dwmmc.c index fd55ce5c0cd4..8d67608c3977 100644 --- a/sys/dev/mmc/host/dwmmc.c +++ b/sys/dev/mmc/host/dwmmc.c @@ -878,7 +878,7 @@ dwmmc_update_ios(device_t brdev, device_t reqdev) sc = device_get_softc(brdev); ios = &sc->host.ios; - dprintf("Setting up clk %u bus_width %d, timming: %d\n", + dprintf("Setting up clk %u bus_width %d, timing: %d\n", ios->clock, ios->bus_width, ios->timing); switch (ios->power_mode) { From nobody Sun Jan 28 11:39:30 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TN8bk5n18z58QHn; Sun, 28 Jan 2024 11:39: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 4TN8bk4nblz4lKS; Sun, 28 Jan 2024 11:39:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706441970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vw+hbYtTNjMxQrSL7t2jNo0CqOtea7494JaxXhq6FIU=; b=cU1VkWwsOYU91iqcYJzQ7A2WQHjZ2CGc3ZxLawjnKzLGtb6FH9IPgJpm8tQnj7wUWI3aXv YfqMmTXTVogrPwXovSVr9EfnubB8AAOqC7s/WMjPv7PqXkkVOFqpAIOc+H8a+crAHhUcSb 8IdbwcKkHMzsFPY22Jmbf4ag7p7lenQtiOQU4Qxw31hOglZ65W9PFfmx9+qxVr1NfoVZLR etmlm2tnSfdR8fS1XpMHKi8KzoPA5wPK/vKPRG2SUb1AzZTv/QL2PnPhfu+sjNQLiOudiq cu4LYnWjIB+S78WRM0eW1p17c2JIrf9/e9XJkubESjNf+ayD0exaC4TL6WnreQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706441970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vw+hbYtTNjMxQrSL7t2jNo0CqOtea7494JaxXhq6FIU=; b=wnUTciJB/6pOP4wtIcQbJCn5vXgOiMgD5ZpZQmgaYMMHBqqMPht3kdFP2oVxY3WNP8HwgO PbdkazGJ7PSszP1NCoRVRBgH2zrwARTbKi0cSv7vXPkfduXN5cUY2SvA1QWJTJp107dEzd OuMT1ylR8Jo4+0L/RwSPHE4+l/PiRzfc3u6R2RvVzBzCUIisVoBs3n/QDqY3gYmQlIUy16 4NmEfPij1yamcchkJMlHCslUwqxdu7F/+eeeeRQzI1/27FmZ7Y/Yi2IjdPbD5vbsLqvW03 RT1zSAccx3AjizyhKn1c827C0vFxgniWn7mKfnjzrQ4DOd4lxmJv0OkMHhj3Rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706441970; a=rsa-sha256; cv=none; b=cw2wHpLJ+dUiGz3h1uvg+8wje+lG2Byygmev8K1gUOPVii0N5REPWZ+0QG0RNBWpqidg9b qN3Pw39EUeqIM1lJ2SLWlAXh5jysv2OwfXD9l+b/l4UETEpIj114k6WLjKsLBeCmePd3Ef MuN+6UhhxW2fTa8oWQEPPdWdLvSf1lvtKlR9TFwXm/iZATDLWqEVx9yyzcARLdio/uX+5g Zf9U6oFdlC9y4jyheRc+6CvZ5XBE36I0fuzN9RymfSx+KMQV0QSDZbKhXqKLTuvDbFpt2Z 7etuoRCTjxNIdjayo3rtnbjVrg42NSezLtx2JgETQuEiFRFoPRSg1mj46f0KDA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TN8bk3s4vz15yh; Sun, 28 Jan 2024 11:39: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 40SBdUIn071481; Sun, 28 Jan 2024 11:39:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SBdUcu071478; Sun, 28 Jan 2024 11:39:30 GMT (envelope-from git) Date: Sun, 28 Jan 2024 11:39:30 GMT Message-Id: <202401281139.40SBdUcu071478@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 43ca38eb59ff - main - mmc_fdt_parse: remove redundant bootverbose check List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 43ca38eb59ff194fb6d8ad589e74147d94717bf4 Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=43ca38eb59ff194fb6d8ad589e74147d94717bf4 commit 43ca38eb59ff194fb6d8ad589e74147d94717bf4 Author: Andriy Gapon AuthorDate: 2021-09-24 16:26:06 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 11:39:03 +0000 mmc_fdt_parse: remove redundant bootverbose check --- sys/dev/mmc/mmc_fdt_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mmc/mmc_fdt_helpers.c b/sys/dev/mmc/mmc_fdt_helpers.c index 0fb76dbfe522..752e5d14bcb0 100644 --- a/sys/dev/mmc/mmc_fdt_helpers.c +++ b/sys/dev/mmc/mmc_fdt_helpers.c @@ -66,7 +66,7 @@ mmc_fdt_parse(device_t dev, phandle_t node, struct mmc_helper *helper, device_printf(dev, "vmmc-supply regulator found\n"); } if (regulator_get_by_ofw_property(dev, 0, "vqmmc-supply", - &helper->vqmmc_supply) == 0 && bootverbose) { + &helper->vqmmc_supply) == 0) { if (bootverbose) device_printf(dev, "vqmmc-supply regulator found\n"); } From nobody Sun Jan 28 12:44:40 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNB2x09HQz58WZW; Sun, 28 Jan 2024 12:44:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TNB2w6mC2z4tN6; Sun, 28 Jan 2024 12:44:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706445881; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MF3BkVf/QcB7OmoVHjcUX1duYcsgq2lEGqu2tgCDu2s=; b=AGowH9z1A2LS3yEcr87K8o121iS5tgOADqh6BpiZHvMOXlackf3MDiWm6cklBhVTGSG7VC rLEmpGnPtW4/AQM2SZ893ezRrjfcPRwGbb0gaY+LpKqUtZB2BF2UYjbJrdkwIeP6lnHUaf RdeG7Tg3kcTlk0oWA91hDH6N3A8KJ0e7w5D03hz1bhm0lokgBjju7wRXJwNvff0BGHyozy v1vX3/bE4nUcyEVZPqWLq7pn9lSQXlpCndcb9Q0G3bnTTZLYMJ3BShIDHmJ+z/Eoxifi6O QJg6pPbaZmEI8FY/xYXFm1BBPTU0BsUBaXl933q6Z0iNcckO+D1fHe6F3CiEWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706445880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MF3BkVf/QcB7OmoVHjcUX1duYcsgq2lEGqu2tgCDu2s=; b=OYeC+NjBhXhy8TIiPBISjR1QLrtUyQr+sO98oPW5i8+k+aNbvEgdR6hDHjbU/Cu3N1OsD+ 3p6fcXF8SaaAndG3f2lvzdDeeeuFCeFj0qPckt2VXyHOvZ2ytHuU4uOJjW1JakK5ZhO2dL ATdTN0gRg4dizTUQNFOU6QbrUZE93Dfx7Tg/F+D56g3Q1nRysLX0L29Vhr9gimviF7DXdU Mj2FsIhDgEdpcr7RHDHq5cqOzPiPvaaBw04uFEKs9BH5kALsvitUI7qLT8W+NElTeargm9 6PPHu4UIBwkVdVSyBXKi3siksfshkazZ3S+2W/GJQ2sseUJ5y17/GJXOCJJK1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706445880; a=rsa-sha256; cv=none; b=rGqy7+pZJeBAhYOHDS4q4VlC3nkfy4a8tAUaSD/hV0wktMkX1JPa5XSpgBLFhhSckQWYqs Yoh/AP4Y1s2fGwxDN7CC+dJP8lrWDtnfZ0+eJ0Ipy6Zmyhq2Y363CJQ1ZYSkrXHQBWP5Q1 LDwDf2kDRyUF1UXrW2gxuksc/+z84G3AWBPUD4/ZqOv8flu+zm7vUbe98BprlD1w2nQAE2 WPn5QGfCTgbV4bb6l402i9UMZ9D94b38bXLZw24WNEK+kty1pDoDGVsNsHH+VPj9BDyJI6 wh6XQYZIizqoiBKBw+unpfmh8c60j1owFV4yBuGYwzAdDRVBDZIyiZcZk8pjQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNB2w5pWlz17Dd; Sun, 28 Jan 2024 12:44: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 40SCieD0088741; Sun, 28 Jan 2024 12:44:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SCieRk088738; Sun, 28 Jan 2024 12:44:40 GMT (envelope-from git) Date: Sun, 28 Jan 2024 12:44:40 GMT Message-Id: <202401281244.40SCieRk088738@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 90dc7889825d - main - fix signature of ipmi_shutdown_event List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 90dc7889825d13290955d0eb7e1fb4388c0a0135 Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=90dc7889825d13290955d0eb7e1fb4388c0a0135 commit 90dc7889825d13290955d0eb7e1fb4388c0a0135 Author: Andriy Gapon AuthorDate: 2023-01-03 17:22:21 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 12:44:13 +0000 fix signature of ipmi_shutdown_event The function had a signature of watchdog_fn while in fact it is used as shutdown_fn. --- sys/dev/ipmi/ipmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ipmi/ipmi.c b/sys/dev/ipmi/ipmi.c index c9ebb5aab2bc..06b0760b002c 100644 --- a/sys/dev/ipmi/ipmi.c +++ b/sys/dev/ipmi/ipmi.c @@ -753,7 +753,7 @@ ipmi_wd_event(void *arg, unsigned int cmd, int *error) } static void -ipmi_shutdown_event(void *arg, unsigned int cmd, int *error) +ipmi_shutdown_event(void *arg, int howto) { struct ipmi_softc *sc = arg; From nobody Sun Jan 28 12:47:57 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNB6j4ZT5z58WyT; Sun, 28 Jan 2024 12:47:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TNB6j43cZz4tXR; Sun, 28 Jan 2024 12:47:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706446077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iSoJpdhxrLZe0rRGxsDQaIyOjupsvjWonYhTuvn3EqY=; b=u4N8Dxs3d+JZjPi3W8wTYtGw6UKcAQfi9jCt2Q+UCXJ03C1ohwucVYnIpLsmxc+UeRNgw+ Rd1JZ7KVkVsXDbsbUwrORg4FZL9nweq+pwmr4s5bYz1PZrtpnCVHCgFyz8WiQsSH3kpcou IZDFvhzT51a9s73ru75H3trH7ou1ACYSPck0zlT0PVjXQDlGccsyiHHLUOvtl03l5WNj1C pd7IxBDG0LT8PHPc+OM4635Vx8hGI4yDop95US/LrUXPVeY2fibhS9n7hYJM01IQ/pPeOG /PtVjYJ5JEdfGOHsDSXJLPWVrzPiPXdhw/zULe4+a18Ry49UHqTk4qhL67eBOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706446077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iSoJpdhxrLZe0rRGxsDQaIyOjupsvjWonYhTuvn3EqY=; b=eHsTgL3oyiCpIx4QlnuriP8KvU8GFvHwSgjIovNYFKMu4BAeaGgxNV6PB3NYRGedyfGPoy vjWESGJ70S0jYDdC42PIf67IqXfVjowA6IoDGdm3lmGcE6Dgx9jL4bhMrU+Yq/xREkJ4B9 kESiRQVSkPyf38sMFQQKbVB8uZBd9jqvh7UZJrk3PQ/hK/zNX0AKoFUgEO6/vYKqslS5zz ax0m7co9ha8owyJyh73gbil/yKbF5iiie0wG4wbU2D6LbmffmdaA4nsriGC986vMUx13Te yvLGjvt/2BtFxwq+xfoCw1ix8dE+4FxqH77PlSrbNmtFgbIlphc7e3Jkb8TDoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706446077; a=rsa-sha256; cv=none; b=lOPziIlOK6y51aweKyphlx8Xg1ijG3RZtFKBUxU1hxIBizinSCEI3a1o+gCeOIYVDhjzxp BLwpt1RK+uQebbgVQVK79FprkuiRka7jjpx+sKTy+TgJwwI/+7lz+U/C4YeXxuITzS8Cbe VebHwMeeeO1DCQSwmF3N+JoYQ6ZN6TsrCdxm4Xp6yFAzCae1luUxn6emP3wkxKHJRGJoXc gKnwecSHF3uPBmy7st5oTeu8EOR8DAQNEulgX5DFfcWU8M22SxnNzwgCtLpDZ+otbZtq/q AmTwnHVVDas1ERXHCpnU/blJZc5xh1LdTvr2C5GBFrkFhQatwVbgyoxtu+hCNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNB6j35XTz17SP; Sun, 28 Jan 2024 12:47:57 +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 40SClvR5089336; Sun, 28 Jan 2024 12:47:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SClvua089333; Sun, 28 Jan 2024 12:47:57 GMT (envelope-from git) Date: Sun, 28 Jan 2024 12:47:57 GMT Message-Id: <202401281247.40SClvua089333@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 8fdb26160160 - main - change ipmi watchdog to awlays stop when system is halted List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 8fdb26160160c4507eb2f644a982a3e05984cdf6 Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=8fdb26160160c4507eb2f644a982a3e05984cdf6 commit 8fdb26160160c4507eb2f644a982a3e05984cdf6 Author: Andriy Gapon AuthorDate: 2023-01-03 17:26:45 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 12:45:16 +0000 change ipmi watchdog to awlays stop when system is halted That is, wd_shutdown_countdown value is ignored when halting. A halted system should remain halted for as long as needed until a power cycle, so the watchdog should not reset the system. --- sys/dev/ipmi/ipmi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/ipmi/ipmi.c b/sys/dev/ipmi/ipmi.c index 06b0760b002c..efb8a7e7669b 100644 --- a/sys/dev/ipmi/ipmi.c +++ b/sys/dev/ipmi/ipmi.c @@ -766,6 +766,10 @@ ipmi_shutdown_event(void *arg, int howto) * Zero value in wd_shutdown_countdown will disable watchdog; * Negative value in wd_shutdown_countdown will keep existing state; * + * System halt is a special case of shutdown where wd_shutdown_countdown + * is ignored and watchdog is disabled to ensure that the system remains + * halted as requested. + * * Revert to using a power cycle to ensure that the watchdog will * do something useful here. Having the watchdog send an NMI * instead is useless during shutdown, and might be ignored if an @@ -773,7 +777,7 @@ ipmi_shutdown_event(void *arg, int howto) */ wd_in_shutdown = true; - if (wd_shutdown_countdown == 0) { + if (wd_shutdown_countdown == 0 || (howto & RB_HALT) != 0) { /* disable watchdog */ ipmi_set_watchdog(sc, 0); sc->ipmi_watchdog_active = 0; From nobody Sun Jan 28 12:54:55 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNBGl3c7Fz58XKh; Sun, 28 Jan 2024 12:54: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 4TNBGl2llcz4vfJ; Sun, 28 Jan 2024 12:54:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706446495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mpX3nKUk6vgqOb0zYbGp6FBsS5exo+BXsHYW8XOnG3M=; b=bANQ7CoPq+BVb26FEXb2JH9MAMwan50BQimH4F3yfwzdipkVlhducf1VZadTSO1++h0Nqj ANuwCZY9r/BsOfLIMrsaF9WDHP4IxMSZuRDOVXJw3Rh1jCXcp0HOp2xDrLREQzyVldVbqB d+WJyh3BedZxd6WJmqtREQJ3kcuuXHfdIPqpPhWPfSLhHSDSV1I5FbkHrs2vuzpc7oFo0e bxa1GkLaKh9dWfpwZ011DV0p07FUPLVoj0QlgCYfmHBYC1HG0h0JiVBI6ieO8/nyBHzBbE nKKba9IW9k0DNJmoikgvYcWYAfEth7lyKt4IQvwb/5/bBJnAl2CkPRF1bo/1DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706446495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mpX3nKUk6vgqOb0zYbGp6FBsS5exo+BXsHYW8XOnG3M=; b=e6JIH1s3qB+cJLk7jk0qwUwyhzkzQfwab+nidzwtqwD1Jd+KBH+I+zltq2P6Bm3RpnlyhB QDurpb6A2/HD7C+nXELYrtk0BjknW/Ah2g04rb+rhZ/595gpR+I66dwQz6oR9N+PM0DvH/ 7kjg+XZw5fbK+0B3mtSp7QQVtxaFmBnf7IfWmgTaUc4i/8EYWh2Hw9nATt2AWG/UT020L0 UuUvdXO/Ksnn8HqhHvODY2SgtslOvEuh1VxFx/nO+BMzjRMzFOjdpCy5JAa22Wfj5brKWY AEuKJXfAyqSdlpcYJHSLGj8xTLdH1jy0K/rcOIKS0DlVV9UQkPngP4e11D0p1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706446495; a=rsa-sha256; cv=none; b=oaV634bXPNKugSWte7uGC3AudgppZo2ESIPjrsCP3ZRcFePcsfWyPcavCfV7Uox4kswEiX Iz+35mJwSX6f6ctQROt5H0mwVHjFl5K93Z59VdObuU6pA9rO4OF3Zu5SGDra19D7DGkHp8 SRa/qa75z9wmk4lK3SmL7HjEbwBrkSkxri1kJH0rg4jOqKuSpUiaT1EWB2+sSbFTBBRFk/ eWSlzuT2utcqoD0JdVdVV2F4R3xFSvOvnUI1aKQgoSqRKIhFdaY9MO9osdyRtz01A/VwOu ee8Ntcj8wJjDl6jOOTxbOXeb5G4pcV25Mbd0/xrURoVOgp0kXQCL4J31SUU2EQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNBGl1msGz17jS; Sun, 28 Jan 2024 12:54: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 40SCstRr005204; Sun, 28 Jan 2024 12:54:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SCstTd005201; Sun, 28 Jan 2024 12:54:55 GMT (envelope-from git) Date: Sun, 28 Jan 2024 12:54:55 GMT Message-Id: <202401281254.40SCstTd005201@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: cbf7c81b608b - main - ichsmb: fix block read operation List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: cbf7c81b608bb9311e50df9481447dc843083a0e Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=cbf7c81b608bb9311e50df9481447dc843083a0e commit cbf7c81b608bb9311e50df9481447dc843083a0e Author: Andriy Gapon AuthorDate: 2022-09-13 21:26:35 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 12:54:19 +0000 ichsmb: fix block read operation First of all and unlike I2C, it's not the master that dictates how many bytes to read in block read operation. It's the device that informs the master how many bytes it's sending back. Thus, for ichsmb_bread() the count parameter is purely an output parameter. The code has been changed to reflect that. The sanity checking of the response length is now done once it (the first byte of the response) is received. While here, handling of ICH_HST_STA_FAILED status bit has been added. Plus some code style improvements and some new code comments in the vicinity of the changed code. --- sys/dev/ichsmb/ichsmb.c | 61 ++++++++++++++++++++++++++++++++------------- sys/dev/ichsmb/ichsmb_var.h | 5 ++-- 2 files changed, 46 insertions(+), 20 deletions(-) diff --git a/sys/dev/ichsmb/ichsmb.c b/sys/dev/ichsmb/ichsmb.c index 7405f625e69f..94fc03d2bc67 100644 --- a/sys/dev/ichsmb/ichsmb.c +++ b/sys/dev/ichsmb/ichsmb.c @@ -389,8 +389,8 @@ ichsmb_bwrite(device_t dev, u_char slave, char cmd, u_char count, char *buf) return (SMB_EINVAL); bcopy(buf, sc->block_data, count); sc->block_count = count; - sc->block_index = 1; - sc->block_write = 1; + sc->block_index = 1; /* buf[0] is written here */ + sc->block_write = true; mtx_lock(&sc->mutex); sc->ich_cmd = ICH_HST_CNT_SMB_CMD_BLOCK; @@ -413,26 +413,23 @@ ichsmb_bread(device_t dev, u_char slave, char cmd, u_char *count, char *buf) const sc_p sc = device_get_softc(dev); int smb_error; - DBG("slave=0x%02x cmd=0x%02x count=%d\n", slave, (u_char)cmd, count); + DBG("slave=0x%02x cmd=0x%02x\n", slave, (u_char)cmd); KASSERT(sc->ich_cmd == -1, ("%s: ich_cmd=%d\n", __func__ , sc->ich_cmd)); - if (*count < 1 || *count > 32) - return (SMB_EINVAL); bzero(sc->block_data, sizeof(sc->block_data)); sc->block_count = 0; sc->block_index = 0; - sc->block_write = 0; + sc->block_write = false; mtx_lock(&sc->mutex); sc->ich_cmd = ICH_HST_CNT_SMB_CMD_BLOCK; bus_write_1(sc->io_res, ICH_XMIT_SLVA, slave | ICH_XMIT_SLVA_READ); bus_write_1(sc->io_res, ICH_HST_CMD, cmd); - bus_write_1(sc->io_res, ICH_D0, *count); /* XXX? */ bus_write_1(sc->io_res, ICH_HST_CNT, ICH_HST_CNT_START | ICH_HST_CNT_INTREN | sc->ich_cmd); if ((smb_error = ichsmb_wait(sc)) == SMB_ENOERR) { - bcopy(sc->block_data, buf, min(sc->block_count, *count)); + bcopy(sc->block_data, buf, sc->block_count); *count = sc->block_count; } mtx_unlock(&sc->mutex); @@ -515,21 +512,35 @@ ichsmb_device_intr(void *cookie) /* Check for unexpected interrupt */ ok_bits = ICH_HST_STA_SMBALERT_STS; - cmd_index = sc->ich_cmd >> 2; + + if (sc->killed) { + sc->killed = 0; + ok_bits |= ICH_HST_STA_FAILED; + bus_write_1(sc->io_res, ICH_HST_CNT, + ICH_HST_CNT_INTREN); + } + if (sc->ich_cmd != -1) { + cmd_index = sc->ich_cmd >> 2; KASSERT(cmd_index < sizeof(ichsmb_state_irqs), ("%s: ich_cmd=%d", device_get_nameunit(dev), sc->ich_cmd)); ok_bits |= ichsmb_state_irqs[cmd_index]; } if ((status & ~ok_bits) != 0) { - device_printf(dev, "irq 0x%02x during %d\n", status, - cmd_index); + device_printf(dev, "irq 0x%02x during 0x%02x\n", status, + sc->ich_cmd); bus_write_1(sc->io_res, ICH_HST_STA, (status & ~ok_bits)); continue; } + /* Check for killed / aborted command */ + if (status & ICH_HST_STA_FAILED) { + sc->smb_error = SMB_EABORT; + goto finished; + } + /* Check for bus error */ if (status & ICH_HST_STA_BUS_ERR) { sc->smb_error = SMB_ECOLLI; /* XXX SMB_EBUSERR? */ @@ -558,6 +569,18 @@ ichsmb_device_intr(void *cookie) if (sc->block_index == 0) { sc->block_count = bus_read_1( sc->io_res, ICH_D0); + if (sc->block_count < 1 || + sc->block_count > 32) { + device_printf(dev, "block read " + "wrong length: %d\n", + sc->block_count); + bus_write_1(sc->io_res, + ICH_HST_CNT, + ICH_HST_CNT_KILL | + ICH_HST_CNT_INTREN); + sc->block_count = 0; + sc->killed = true; + } } /* Get next byte, if any */ @@ -568,15 +591,17 @@ ichsmb_device_intr(void *cookie) bus_read_1(sc->io_res, ICH_BLOCK_DB); - /* Set "LAST_BYTE" bit before reading - the last byte of block data */ - if (sc->block_index - >= sc->block_count - 1) { + /* + * Set "LAST_BYTE" bit before reading + * the last byte of block data + */ + if (sc->block_index == + sc->block_count - 1) { bus_write_1(sc->io_res, ICH_HST_CNT, - ICH_HST_CNT_LAST_BYTE - | ICH_HST_CNT_INTREN - | sc->ich_cmd); + ICH_HST_CNT_LAST_BYTE | + ICH_HST_CNT_INTREN | + sc->ich_cmd); } } } diff --git a/sys/dev/ichsmb/ichsmb_var.h b/sys/dev/ichsmb/ichsmb_var.h index abef219465e6..7fb14804d3c4 100644 --- a/sys/dev/ichsmb/ichsmb_var.h +++ b/sys/dev/ichsmb/ichsmb_var.h @@ -58,8 +58,9 @@ struct ichsmb_softc { int smb_error; /* result of smb command */ int block_count; /* count for block read/write */ int block_index; /* index for block read/write */ - u_char block_write; /* 0=read, 1=write */ - u_char block_data[32]; /* block read/write data */ + bool block_write; /* block write or block read */ + uint8_t block_data[32]; /* block read/write data */ + bool killed; /* killed current transfer */ struct mtx mutex; /* device mutex */ }; typedef struct ichsmb_softc *sc_p; From nobody Sun Jan 28 13:14:01 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNBhn4J7Qz58YxN; Sun, 28 Jan 2024 13:14: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 4TNBhn3p7Pz4ybL; Sun, 28 Jan 2024 13:14:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706447641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LiSoJDSkJVtrbpEU2K+i3S5qaIwSq7ClYuJAy9xrqpE=; b=sW/qIdyVlUH9W9izl1KkW+Zc6MlAqlzipFwKqQTe6Oy7m6vzH8FoyHodD2TFu6WqOAJmzz N+WodiUGsPjOPzM1Q7B/Pu3Ov3wsZfgCiNOWITxqQxTX9PJefqcBw1FqGRiHSLeVXBV59L 5yuJ63S8NxoOJN5iyPhV8VkjcfWLvRqsjio849/Y6bGrI4XIx4DAXevS8j6OoWK7PMrzDL sBaKCRrWuAkFz2yGtRQ4FyEEZG0SCORRV49/NMJpotSjWT+vzz8RBBHq7ymVk8pMa17cny oM11jnOfx+G5XLlMDtEMutihM2RoMI0LIvyl5bqIQqjGwuujQWfH4fvCAFtuhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706447641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LiSoJDSkJVtrbpEU2K+i3S5qaIwSq7ClYuJAy9xrqpE=; b=YSvvKb8FgMv9bNy7Il/L3h8BiO8+T/DxdMILirFdmRRqqLEg8gPgT9Xi8Q5W+PPcAc4qvf VvWyvjojnA+KXPAX4RH6cDH/lwqodPM+XiiYmIPDHY4uc1Acmugujb9cqG1lXf1DgWbqZx Nbq1IoCri6qHTwA42jtYSMskaxfYJhnsHsPLSLfipUdkAsG31rruZfCqF7mpvE0dHG5w0T CVtNP24EvHKvbe3lOGgqYLWkr9VVX3c2mTs8/+Fwy8kBLHowtGSmG4eEm9OK+yullsS5ko 206ZMbwZRmNOsPT4sSlFW45ngSUEz3EMoCsOOanYOdul8mDWfn6gaWdbWpGCqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706447641; a=rsa-sha256; cv=none; b=iyIhR/80N3XVeGN+JwPHrOo802wsv+RIPrHbdWX2uDScC80my1/s3Wka8rP92g+ybs/YSf j3OqrMY9Ee+MyybJswggCLUoa5a+2qvODIAXKIO1LkS1daMghLL3nqjb4NbW++T7n9W9XN pC3Ivh062nWRKs0mckezOyOIntapdkgmiub9GX1sfBPFWuXq/zB5YAQVpZ7Goq2IUoBcNL zV1jbg9ds6jKlqaPtfKEGvNCXp3AekFaVt3IX8ghkDjtOKWGffSku8CFFA8EkPVeqy54a8 gxYAJfNxB1SwDMULJoJ2T9TDUOUavB9w8h13mTCxWBjzQyJ2RUVDljNaqklHaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNBhn2vGDz18RM; Sun, 28 Jan 2024 13:14:01 +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 40SDE1Ev039743; Sun, 28 Jan 2024 13:14:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SDE19b039740; Sun, 28 Jan 2024 13:14:01 GMT (envelope-from git) Date: Sun, 28 Jan 2024 13:14:01 GMT Message-Id: <202401281314.40SDE19b039740@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 9cdf326b4fae - main - run acpi_shutdown_final later to give other handlers a chance List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 9cdf326b4faef97f0d3314b5dd693308ac494d48 Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=9cdf326b4faef97f0d3314b5dd693308ac494d48 commit 9cdf326b4faef97f0d3314b5dd693308ac494d48 Author: Andriy Gapon AuthorDate: 2021-12-20 11:01:56 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 13:04:55 +0000 run acpi_shutdown_final later to give other handlers a chance For example, shutdown_panic wants to produce some output and maybe take some input before a system is actually reset. The change should only make difference for the case of system reset (reboot), poweroff and halt should not be affected. The change makes difference only if hw.acpi.handle_reboot is set. It used to default to zero until r213755 / ac731af5670c7. --- sys/dev/acpica/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 9196c446ae80..7d1fc10afb9e 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -675,7 +675,7 @@ acpi_attach(device_t dev) /* Register our shutdown handler. */ EVENTHANDLER_REGISTER(shutdown_final, acpi_shutdown_final, sc, - SHUTDOWN_PRI_LAST); + SHUTDOWN_PRI_LAST + 150); /* * Register our acpi event handlers. From nobody Sun Jan 28 13:15:41 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNBkk1gnjz58Yrj; Sun, 28 Jan 2024 13:15: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 4TNBkk12q1z4ytC; Sun, 28 Jan 2024 13:15:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706447742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oc54fdl++sb1F1l5d/8ZfFj0L+ESTo66thaH1+T5LNs=; b=ltG5lz80vtltnqsUC9O58sdlgkvsESStuPDWV1q1DFYYKbJ/2QK50MomG9xtPv81bY0LWi GL1VthJ00kBqznxKBw0iyEzJFTMgOn7cg+58nhae925+6zGqSoqyx5OK33mROHUj7YA+Ug QZ9soCe7SciXJ4mTvszgwKJm2ncTB/UtPtyncWZw/Au/Ug2Vpci1t2sJPApEbcWEFf0fq+ 654nGWJdoVE/7vM5LwGS0Hqx/8g26zHcdXrLzX/Xr6sANeRCn5cYZRdpDQm/b8BgGOou57 qs3JFWjKg1vYDTilBH3K+GWci3viBFp8iR/pvN2i9gRblwP+FRMHRPFmWefJ8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706447742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oc54fdl++sb1F1l5d/8ZfFj0L+ESTo66thaH1+T5LNs=; b=T5ROuBVm+vC7FCvch/NGimt+OeTv93gS82RJ5iiWbM9m+ocJGXPTAM3Sj02Dd9WjBTzd29 fxt/OXY1bGrYmyUvyJ7RqB2U2Qyxn5+GHZUivTd3mMO+QkxsxcquUrcu+KLwO2vWVWGYwj qrNHvONUQaowed84ebnlF+eme9YshI+zD+JgW5Z4wdvxjPmanFqlGliArbPzWU2HkSVh8V 37ZYym/mDJSaCGwRlEUv6GC9/TonEZUSzfixWWPVtZHXGsf44aj1bmZrHx1dZyS2QC1iuR UrPc1J1U5Xz7/suHErjLPvFsKLRy7GGXuro0b24RdtLG44FhdLbUAsLRgj0HZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706447742; a=rsa-sha256; cv=none; b=sqzBlFyG56pRdJnWceqon2Kz3B/GBpED7OYu3sztGhNUm7Y7kSKhM7XXLA2vQB40fotHRR sdz5T5Ua7h/7tawQiVbeBbCz76EWRGOorm9Dtnak9faWWKmjh8yYjAkBEmb9xxMq9oUZ/q 7RnQMQb10Z18Q5cmsXwc5FxAlDt0n5k81o8YOxsCODUS2absW4ZJQLRdkW+TkxNAXdl/zU d87dA9+C38KK22CVlxZd9vI+Pys2ywTaYQjr46F9PJu1L0dNwdZtgQcKW0vTLIAnf9/ifg zDSRcbr2ZxBDv/JO2fSE4QCK16EvetYzhSdv3AYIhcUnN8yAecDoxabzhsZpHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNBkk05lHz18TS; Sun, 28 Jan 2024 13:15: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 40SDFf97040154; Sun, 28 Jan 2024 13:15:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SDFfC8040151; Sun, 28 Jan 2024 13:15:41 GMT (envelope-from git) Date: Sun, 28 Jan 2024 13:15:41 GMT Message-Id: <202401281315.40SDFfC8040151@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: e92491d95ff3 - main - dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: e92491d95ff3500e140eafa614e88ca84ffb0d26 Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=e92491d95ff3500e140eafa614e88ca84ffb0d26 commit e92491d95ff3500e140eafa614e88ca84ffb0d26 Author: Andriy Gapon AuthorDate: 2021-12-24 09:38:38 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 13:15:17 +0000 dtrace: make 'ring' and 'fill' policies imply 'noswitch' flag This should disable allocation of the second per-CPU principal buffer which is never used. This will also enable additional asserts for buffers that are never switched. --- sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c index ce02676e0dc1..83c0648b23b1 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c @@ -12058,7 +12058,6 @@ dtrace_buffer_switch(dtrace_buffer_t *buf) hrtime_t now; ASSERT(!(buf->dtb_flags & DTRACEBUF_NOSWITCH)); - ASSERT(!(buf->dtb_flags & DTRACEBUF_RING)); cookie = dtrace_interrupt_disable(); now = dtrace_gethrtime(); @@ -14866,10 +14865,10 @@ dtrace_state_buffer(dtrace_state_t *state, dtrace_buffer_t *buf, int which) if (which == DTRACEOPT_BUFSIZE) { if (opt[DTRACEOPT_BUFPOLICY] == DTRACEOPT_BUFPOLICY_RING) - flags |= DTRACEBUF_RING; + flags |= DTRACEBUF_RING | DTRACEBUF_NOSWITCH; if (opt[DTRACEOPT_BUFPOLICY] == DTRACEOPT_BUFPOLICY_FILL) - flags |= DTRACEBUF_FILL; + flags |= DTRACEBUF_FILL | DTRACEBUF_NOSWITCH; if (state != dtrace_anon.dta_state || state->dts_activity != DTRACE_ACTIVITY_ACTIVE) From nobody Sun Jan 28 13:19:20 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNBpw342hz58Z4j; Sun, 28 Jan 2024 13:19: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 4TNBpw2YZrz50Yr; Sun, 28 Jan 2024 13:19:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706447960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E0HymIyoXZGduHs4uMtIPNy9CsA2n7CotPYVlnn2KpY=; b=kZVxiZk6XL7JC6IzT7ZqDFkacG9z/DcdtfYr2nDBi3MYfbJoSj12SIWKgjlzwF5rx7KkPU 07cashEt8t1a5HP7i0QJytY4hs20EurSMOHaz6fwdGPfRKkyklXaEUGqWh8lQlpFE0teBS sqDt7xhyNgHDptNN9fAyTlZp/M8mXid64B6ZnnbjasTnqhrH+YqyJY+XVmiCu58Wz9pto+ WlIMlkLYHsGoUP5gQ7YnfmDQ3GzPNpzYW2TW1Aym3vSMIVHYTloficvPTEF0gfGxc476hT vauwvF4SM8H7fBcyALwEgBQFNatdDo0DpEPpyn8xlFwsuoVuEfHZgCYKi6ehgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706447960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E0HymIyoXZGduHs4uMtIPNy9CsA2n7CotPYVlnn2KpY=; b=RjnmUgjYHvPGUTvod7tvrfsGfYRsautiSVhQjRWDkRmx7Yno2/7QM05KPrJWhMKeJ6ysuD fUxLSk7B+y9zRIQ/xnvXWs//89FTuHQmkW9JVXYRNfeGhvZ/pgOCxFDSjef6E8SZvcvIbj Aa+uU4r+kP75U9R/azpUqN+ZJ4WFbQHTPjVs8B0YOSbNDVhgW6P2RS9J1HOXxWyT56y8ry 8doT6X4ASRWQuR6SPU0BPLaD5avvkqJ1fWLfBXXi2ZN102jKSuUiq8TaXw0aExbU8YWcIf e/fcGvX/KL05g+MRqu2yjGokrVW4xlzGYieO62RVyKvBFFZ1IxGssBoEB/orLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706447960; a=rsa-sha256; cv=none; b=eIiJNi9pfD4o0UuGbC9MSl5pm9L2MucdvSzedk+XeLjPpg9YtgYYs6zzBnha7vmdXu6uX8 +Tk2moNY3g4f5bvuauBr9sHPvEC3pF5uHrDZwYP0RGr88103cj6Ps1RMQIiqmZBf8UTFDA 2dmRY9bh17uRShU5CT4eygEgMSfIpj+0RtYflC3L1MRBncnkzMftraXCpm4XCbFQFTfkjg JC3cYRYxjAKfoK3eH23vmyf1S5aTSpMMJc95FyAATzIm2Z3dvzPFa7kLVs3YZxMZCAA8X5 +2PkOgk15v2QhmBP40BiDHwDmZ+K0iVKYS0iGYyg8euQmDTv2vpUhPu2IYZmlg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNBpw1XHDz183r; Sun, 28 Jan 2024 13:19: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 40SDJKv3040859; Sun, 28 Jan 2024 13:19:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SDJKvt040856; Sun, 28 Jan 2024 13:19:20 GMT (envelope-from git) Date: Sun, 28 Jan 2024 13:19:20 GMT Message-Id: <202401281319.40SDJKvt040856@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: c053a56c0f5d - main - hdaa_pcmchannel_setup: do not advertise AC3 8+0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: c053a56c0f5df6db5223316831142e1d8afff64f Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=c053a56c0f5df6db5223316831142e1d8afff64f commit c053a56c0f5df6db5223316831142e1d8afff64f Author: Andriy Gapon AuthorDate: 2024-01-28 13:18:02 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 13:18:55 +0000 hdaa_pcmchannel_setup: do not advertise AC3 8+0 The rest of the sound system supports 7+1 maximum and is not aware of 8+0. I believe that these messages are caused by 8+0: kernel: feeder_init(0xfffff801f935d680) on feeder_matrix returned 22 kernel: pcm0: feeder_build_matrix(): can't add feeder_matrix --- sys/dev/sound/pci/hda/hdaa.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index 02f4babcd331..dcd10cb36510 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -5426,7 +5426,6 @@ hdaa_pcmchannel_setup(struct hdaa_chan *ch) if (HDA_PARAM_SUPP_STREAM_FORMATS_AC3(fmtcap)) { ch->fmtlist[i++] = SND_FORMAT(AFMT_AC3, 2, 0); if (channels >= 8) { - ch->fmtlist[i++] = SND_FORMAT(AFMT_AC3, 8, 0); ch->fmtlist[i++] = SND_FORMAT(AFMT_AC3, 8, 1); } } From nobody Sun Jan 28 13:20:58 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNBrp64lvz58ZFC; Sun, 28 Jan 2024 13:20: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 4TNBrp5K3Lz51DX; Sun, 28 Jan 2024 13:20:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706448058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bm2jPUhvJPoArOJxJAejge5L6KZxvlW8OHQUDJVZxOQ=; b=htXFN2Zs02a9rtvfWmFjUCeLBhRei1F4VFoflqFACt6mhE4urGONPDeRD7tVxV21L6UpWb S99m1YILZNPucHgAPNs3a/4iEQ1yhwq2N4kgBJlNggvIFP+pZ04vDOsnQRrIIyle0/DJEF pMVKng2iW7dQdYx0L7eKvdbMaOSsw1WlU1ITXPPkj0yIGoeT2iw5Z6cqeo9s9MOi/5nZ8Q W4wlWPCVJig0rb5FCv762qtPbDV1Zhr+CDXPyAkLcje0kzW78vvinIWvQvBYiBCUA0/Z4b 2a8lEsp3bnysMsAsf0vKJhp4qs3LCRDYx8GaoWsmFQQh8T/WElRSr9wZKMX1vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706448058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bm2jPUhvJPoArOJxJAejge5L6KZxvlW8OHQUDJVZxOQ=; b=YvzBSZpbMiAaEUYHUI0324YgbUaIiVBe7yRCwZJo1BiPxLOMgpnRLpvFE2IGuCA8wnt4X6 6KQqlf88XfTGfkN+8tAAy+T+F1UkeWOjc2JwQqjrrRexVaLbjrd78+EEcXgoGXhaU8O2UG R+MM6yREa1MTkYvXa8xpY7oTlF/PwZiKhvytWNfpTR2WBT6LH8BRx/jjEdLc/L2p91xQyF IMT7rPOt6VGK8Y+blJIwC51I+qB0hTEOT73LZd9v10VCzuVsI3EcwTLIvP51xKNJcGH0+a vrm2Nr3N0yp9iR/PS0aICYrKO3J4aRKXcAx3Sr2wZJK0TTe1FJiTs04oWJnscw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706448058; a=rsa-sha256; cv=none; b=v52O4a0k6wnoFCPRt/0EmDHlyLPij7xnw3Lw1c/x4AWoo+9X+rzvH+13EF1Syn6XyTBknT L58lOkfkeYjovgAZUd6DLEGorEoS6RcQf7TOCP3bUDWmm7XN01GLoa0T4wOr5imUXlbXyW /2rYV2ljMsND7+ITGCLqtt4+GV9o1RCFQ5jHY2qYKrH4d+BG9KN7wAEdfP0TJl4Cd5eIhs ctyKCGOi8vUxFWurg9DlcKUtZWp2lXWOdcwyA0Ed4Ddz6+MT/0tjzn2e8eCTW3zSKywQ4z DYbc/T9/nx7kn5x+TFvEJ/H5yEQ6sE53zjiVSzub0hM1IE2yjzes+i/ZgBIFpQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNBrp4MYrz183w; Sun, 28 Jan 2024 13:20: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 40SDKwfX050640; Sun, 28 Jan 2024 13:20:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SDKwXt050637; Sun, 28 Jan 2024 13:20:58 GMT (envelope-from git) Date: Sun, 28 Jan 2024 13:20:58 GMT Message-Id: <202401281320.40SDKwXt050637@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: bf87d4a4bfaa - main - efibootmgr: fix potential endless loop with -v List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: bf87d4a4bfaa86e97079754e93fe14595adf07c5 Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=bf87d4a4bfaa86e97079754e93fe14595adf07c5 commit bf87d4a4bfaa86e97079754e93fe14595adf07c5 Author: Andriy Gapon AuthorDate: 2022-10-25 21:10:39 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 13:20:29 +0000 efibootmgr: fix potential endless loop with -v I observed the problem on a system with fairly old and, apparently, buggy EFI implementation. A list of boot devices had an invalid trailing entry. efidp_size() for that entry returned zero, which means that the code got stuck looping on that entry. --- usr.sbin/efibootmgr/efibootmgr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr.sbin/efibootmgr/efibootmgr.c b/usr.sbin/efibootmgr/efibootmgr.c index 4a6a7fdfec39..7bcb4674586b 100644 --- a/usr.sbin/efibootmgr/efibootmgr.c +++ b/usr.sbin/efibootmgr/efibootmgr.c @@ -790,6 +790,8 @@ print_loadopt_str(uint8_t *data, size_t datalen) */ indent = 1; while (dp < edp) { + if (efidp_size(dp) == 0) + break; efidp_format_device_path(buf, sizeof(buf), dp, (intptr_t)(void *)edp - (intptr_t)(void *)dp); printf("%*s%s\n", indent, "", buf); From nobody Sun Jan 28 13:21:49 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNBsp1QXGz58ZFQ; Sun, 28 Jan 2024 13:21:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TNBsp0dVlz51Mp; Sun, 28 Jan 2024 13:21:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706448110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U5S1sJ30wG8z+/inRyHV9IQUB1GhJpEU57JV2++Bnuo=; b=WEKppdyfvQkUiw24YIggK664HeWw2f/NNkg6jJFFDtonti06VEH99CWDVTVxb6Hf2cQ0Wi DP4VaWh2d7GdbHrxmWAHc06TfVQiCtvhIoa+DZwXXCQfD3Zh2qHlJF1czwaaS8ogERr97l jF/vS6/PosLdIy27h+OGUwIR4oN5BI9r+FBZhewo+79xnxoMmKaU1LtLPiFw6Sko6dZ76z PlWFAQNkpzppDcC/2bhDNVgHrhtBLzav+nJNCapEVJVJbNY87JtzsZB892V6Zwif+eqoNR n2iEGh3ipHA6o+imxSJQ/Bu+cSYbN7jQJMzL3qCqPuhmURceHThYqSQVzxR6SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706448110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=U5S1sJ30wG8z+/inRyHV9IQUB1GhJpEU57JV2++Bnuo=; b=yHMddNug1RkEI/cpfpEJlInYw6PxywJq2W0iZfJ9HzrxZY1OfSvRwvLQIkOYmslu9qWbLS wJDzhh/QNEXh9PYFXJhGkyud0gqXvEOkdDJ15VZiAN0jZJvluUAvaK3YcyirswpxYweTkH Jnll3rvUXUTLZU+U9p9UztVxvW6rGR7Iq8bCpNvKRLzQt4h8P4kI4UPaWRSEILvCLGzJtY 6GzO3uhCgx8vsO7jMvwuk4bZJDg6tgbG6VPo9L17sYjsQyx3B8L84axQz6liMCw+s7TfrE uspEaCjoD42QiE7FbUteN/8qvJhoxIRr5xGVdbRpPDZnP236Jr2n/5dU1pMw8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706448110; a=rsa-sha256; cv=none; b=NWAZDYeGDXmoLbIdLLeW+ThklzKQfVmA05bI7pnf9zF28dESg4MDxdjt7RkjFNazcm73fM cqT/MGBQI4PMR2LjfIxadHejjs5MZYrm83qqgX5h5unks7wd8dlZSJIXRsW9dQL8zyAKgV 926EnTn8Tl39/CPaCKB3sEbYgM304Ei0NzBf1AT4z+FNlmC90WPpAX5vE23JFf9smSGNmx 521060PD3CNsG9vXlWm3wqVRNtJ+SthVqjSuTYqCs3gMj72sppq42kGdxQizYFC+Kll1ny tHdbPNTE3h5byNQTsBWaYfY+ZOjdYhLVCrQ4XL78ex5vZ+LIrAQq1EDrcDqaPg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNBsn6qpfz18Yp; Sun, 28 Jan 2024 13:21:49 +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 40SDLnxT052095; Sun, 28 Jan 2024 13:21:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SDLneL052092; Sun, 28 Jan 2024 13:21:49 GMT (envelope-from git) Date: Sun, 28 Jan 2024 13:21:49 GMT Message-Id: <202401281321.40SDLneL052092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 4d1161f094dd - main - subr_bus: report DEVICE_SUSPEND failures List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 4d1161f094dd90428847f7e5989767e9957055f4 Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=4d1161f094dd90428847f7e5989767e9957055f4 commit 4d1161f094dd90428847f7e5989767e9957055f4 Author: Andriy Gapon AuthorDate: 2023-01-03 08:39:32 +0000 Commit: Andriy Gapon CommitDate: 2024-01-28 13:21:09 +0000 subr_bus: report DEVICE_SUSPEND failures This greatly aids with diagnosing system suspend failures when they are due to a device driver or hardware. --- sys/kern/subr_bus.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 21c2835f2ae6..c06f3df0c9c9 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3463,8 +3463,12 @@ bus_generic_suspend_child(device_t dev, device_t child) error = DEVICE_SUSPEND(child); - if (error == 0) + if (error == 0) { child->flags |= DF_SUSPENDED; + } else { + printf("DEVICE_SUSPEND(%s) failed: %d\n", + device_get_nameunit(child), error); + } return (error); } From nobody Sun Jan 28 15:01:01 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNF4F24Czz58k8N; Sun, 28 Jan 2024 15:01: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 4TNF4F1pL9z43fH; Sun, 28 Jan 2024 15:01:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706454061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TU+cZ74SJCLlowEfCYAp4rMYacFTeBBtIGDJivHuuRk=; b=yNQjJZy26uhSsdJCxGFiXjIxXMGzkwCUHcmNvGC9sDRyLC8h8i9tWvXonuWOCzO8KWUqyE h8nuP7rj9+JTAsbxZZj7XWz3hEGwk/hoqpcR/K9f0beFXsEkaY6E9KM5s+cGhS9RGvptxf Jsac6KrctXsf708HS2y+44zW/cuD8oSnEczjcwMG4sVqhkeJGN8pII+iZsLIRQeiYNlN/6 rX00nn17DcJG5jsXXRA5HqC8m/mZM/x8p28Bs+nbE6dYbCWgQtRpnV91A86YZty4aB1jyh 4t1LrN+9AwbEWV5KRT4pFrd6yuqakFsBju2NL0JyyneR7ws+wP2Xzfr/uSJtnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706454061; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TU+cZ74SJCLlowEfCYAp4rMYacFTeBBtIGDJivHuuRk=; b=mK8sjVmaLj8kJMIMgEQJ9D5tK6M8uWfRTsolINVth7w+kg0i2CChDTcArN8+LR0YhD8caB 6ay+ZeiZyfHFTbQYWd+HGVvQabftVFCop7w0gzzwegefAZcPyWrIz3STYronbzX+DKhALr km1URHvxIdtn/WLIx3MUukcgz2yyjbB8tODvY8hTJkJrqYivEGioRIWwD0opqay1exTCwS MFkCQd9XvBCOdB7fAbZb8VRvzIPnNHGnWXuhwD91fN59q4inUWTzcvok2/VGILGaJnJW2j nD4jfKw/my5rCFBFQ3KI/3e/e7V1vLC6TPkuM8CEid8VoPc6oAAjCug9kgNkEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706454061; a=rsa-sha256; cv=none; b=RET+fWGkqTIVosw9I+B58J/Y8yxZxnVDXgNCxEU6pVZzCt04Qov0ZO55dY/D97jrXfuMJI oEmqIPphsgbAE2Asf6NPW1rH0cl9HBP7hoeag4wS505CwVWfGP1FmFrgyttHZNf+xcXkaf bbhtGUQvbUO6sSDwrz6qH/NPSL8kSLh/8MCxEFvs6jgsxxyvGMPLqGfPr+zW5c6yFS2L1W 9+NSwDgLGqKmbZaxQSLjDOqBh5+4P051CeG8omTM8m4/O8ZDQX1SHbzoF7zgQVkJlSQfAF +MATvPlYd36WVvfc1F1kx09qtK8Nd2tx5WerS+aAEvGkczsDmwacgJZkMejfSQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNF4F0sDYz1BN8; Sun, 28 Jan 2024 15:01:01 +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 40SF11IK020694; Sun, 28 Jan 2024 15:01:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SF11TX020691; Sun, 28 Jan 2024 15:01:01 GMT (envelope-from git) Date: Sun, 28 Jan 2024 15:01:01 GMT Message-Id: <202401281501.40SF11TX020691@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 0dd5a5603e7a - main - lib/msun: Cleanup after $FreeBSD$ removal List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0dd5a5603e7a33d976f8e6015620bbc79839c609 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0dd5a5603e7a33d976f8e6015620bbc79839c609 commit 0dd5a5603e7a33d976f8e6015620bbc79839c609 Author: Steve Kargl AuthorDate: 2024-01-28 09:14:50 +0000 Commit: Konstantin Belousov CommitDate: 2024-01-28 15:00:23 +0000 lib/msun: Cleanup after $FreeBSD$ removal Remove no longer needed explicit inclusion of sys/cdefs.h. PR: 276669 MFC after: 1 week --- lib/msun/bsdsrc/b_exp.c | 1 - lib/msun/bsdsrc/b_log.c | 1 - lib/msun/bsdsrc/b_tgamma.c | 1 - lib/msun/bsdsrc/mathimpl.h | 1 - lib/msun/i387/invtrig.c | 1 - lib/msun/ld128/e_lgammal_r.c | 1 - lib/msun/ld128/e_powl.c | 1 - lib/msun/ld128/e_rem_pio2l.h | 1 - lib/msun/ld128/invtrig.c | 1 - lib/msun/ld128/k_cosl.c | 1 - lib/msun/ld128/k_expl.h | 1 - lib/msun/ld128/k_sinl.c | 1 - lib/msun/ld128/k_tanl.c | 1 - lib/msun/ld128/s_cexpl.c | 1 - lib/msun/ld128/s_erfl.c | 1 - lib/msun/ld128/s_exp2l.c | 1 - lib/msun/ld128/s_expl.c | 1 - lib/msun/ld128/s_logl.c | 1 - lib/msun/ld80/e_lgammal_r.c | 1 - lib/msun/ld80/e_powl.c | 2 -- lib/msun/ld80/e_rem_pio2l.h | 1 - lib/msun/ld80/invtrig.c | 1 - lib/msun/ld80/k_cosl.c | 1 - lib/msun/ld80/k_expl.h | 1 - lib/msun/ld80/k_sinl.c | 1 - lib/msun/ld80/k_tanl.c | 1 - lib/msun/ld80/s_cexpl.c | 1 - lib/msun/ld80/s_erfl.c | 1 - lib/msun/ld80/s_exp2l.c | 1 - lib/msun/ld80/s_expl.c | 1 - lib/msun/ld80/s_logl.c | 1 - lib/msun/src/catrig.c | 1 - lib/msun/src/catrigf.c | 1 - lib/msun/src/catrigl.c | 1 - lib/msun/src/e_acos.c | 1 - lib/msun/src/e_acosf.c | 1 - lib/msun/src/e_acosh.c | 1 - lib/msun/src/e_acoshf.c | 1 - lib/msun/src/e_acoshl.c | 1 - lib/msun/src/e_acosl.c | 1 - lib/msun/src/e_asin.c | 1 - lib/msun/src/e_asinf.c | 1 - lib/msun/src/e_asinl.c | 1 - lib/msun/src/e_atan2.c | 1 - lib/msun/src/e_atan2f.c | 1 - lib/msun/src/e_atan2l.c | 1 - lib/msun/src/e_atanh.c | 1 - lib/msun/src/e_atanhf.c | 1 - lib/msun/src/e_atanhl.c | 1 - lib/msun/src/e_cosh.c | 1 - lib/msun/src/e_coshf.c | 1 - lib/msun/src/e_coshl.c | 1 - lib/msun/src/e_exp.c | 1 - lib/msun/src/e_expf.c | 1 - lib/msun/src/e_fmod.c | 1 - lib/msun/src/e_fmodf.c | 1 - lib/msun/src/e_fmodl.c | 1 - lib/msun/src/e_gamma.c | 1 - lib/msun/src/e_gamma_r.c | 1 - lib/msun/src/e_gammaf.c | 1 - lib/msun/src/e_gammaf_r.c | 1 - lib/msun/src/e_hypot.c | 1 - lib/msun/src/e_hypotf.c | 1 - lib/msun/src/e_hypotl.c | 1 - lib/msun/src/e_j0.c | 1 - lib/msun/src/e_j0f.c | 1 - lib/msun/src/e_j1.c | 1 - lib/msun/src/e_j1f.c | 1 - lib/msun/src/e_jn.c | 1 - lib/msun/src/e_jnf.c | 1 - lib/msun/src/e_lgamma.c | 1 - lib/msun/src/e_lgamma_r.c | 1 - lib/msun/src/e_lgammaf.c | 1 - lib/msun/src/e_lgammaf_r.c | 1 - lib/msun/src/e_lgammal.c | 1 - lib/msun/src/e_log.c | 1 - lib/msun/src/e_log10.c | 1 - lib/msun/src/e_log10f.c | 1 - lib/msun/src/e_log2.c | 1 - lib/msun/src/e_log2f.c | 1 - lib/msun/src/e_logf.c | 1 - lib/msun/src/e_pow.c | 1 - lib/msun/src/e_powf.c | 1 - lib/msun/src/e_rem_pio2.c | 1 - lib/msun/src/e_rem_pio2f.c | 1 - lib/msun/src/e_remainder.c | 1 - lib/msun/src/e_remainderf.c | 1 - lib/msun/src/e_remainderl.c | 1 - lib/msun/src/e_scalb.c | 1 - lib/msun/src/e_scalbf.c | 1 - lib/msun/src/e_sinh.c | 1 - lib/msun/src/e_sinhf.c | 1 - lib/msun/src/e_sinhl.c | 1 - lib/msun/src/e_sqrt.c | 1 - lib/msun/src/e_sqrtl.c | 1 - lib/msun/src/k_cos.c | 1 - lib/msun/src/k_cosf.c | 4 ---- lib/msun/src/k_exp.c | 1 - lib/msun/src/k_expf.c | 1 - lib/msun/src/k_log.h | 1 - lib/msun/src/k_logf.h | 1 - lib/msun/src/k_rem_pio2.c | 1 - lib/msun/src/k_sin.c | 1 - lib/msun/src/k_sincos.h | 1 - lib/msun/src/k_sincosf.h | 1 - lib/msun/src/k_sincosl.h | 1 - lib/msun/src/k_sinf.c | 4 ---- lib/msun/src/k_tan.c | 2 -- lib/msun/src/k_tanf.c | 4 ---- lib/msun/src/math.h | 1 - lib/msun/src/s_asinh.c | 1 - lib/msun/src/s_asinhf.c | 1 - lib/msun/src/s_asinhl.c | 1 - lib/msun/src/s_atan.c | 1 - lib/msun/src/s_atanf.c | 1 - lib/msun/src/s_atanl.c | 1 - lib/msun/src/s_carg.c | 1 - lib/msun/src/s_cargf.c | 1 - lib/msun/src/s_cargl.c | 1 - lib/msun/src/s_cbrt.c | 1 - lib/msun/src/s_cbrtf.c | 1 - lib/msun/src/s_cbrtl.c | 1 - lib/msun/src/s_ccosh.c | 1 - lib/msun/src/s_ccoshf.c | 1 - lib/msun/src/s_ceil.c | 1 - lib/msun/src/s_ceilf.c | 1 - lib/msun/src/s_ceill.c | 1 - lib/msun/src/s_cexp.c | 1 - lib/msun/src/s_cexpf.c | 1 - lib/msun/src/s_clog.c | 1 - lib/msun/src/s_clogf.c | 1 - lib/msun/src/s_clogl.c | 1 - lib/msun/src/s_copysign.c | 1 - lib/msun/src/s_copysignf.c | 1 - lib/msun/src/s_cos.c | 1 - lib/msun/src/s_cosf.c | 1 - lib/msun/src/s_cosl.c | 1 - lib/msun/src/s_cpow.c | 1 - lib/msun/src/s_cpowf.c | 1 - lib/msun/src/s_cpowl.c | 1 - lib/msun/src/s_cproj.c | 1 - lib/msun/src/s_cprojf.c | 1 - lib/msun/src/s_cprojl.c | 1 - lib/msun/src/s_csinh.c | 1 - lib/msun/src/s_csinhf.c | 1 - lib/msun/src/s_csqrt.c | 1 - lib/msun/src/s_csqrtf.c | 1 - lib/msun/src/s_csqrtl.c | 1 - lib/msun/src/s_ctanh.c | 1 - lib/msun/src/s_ctanhf.c | 1 - lib/msun/src/s_erf.c | 1 - lib/msun/src/s_erff.c | 1 - lib/msun/src/s_exp2.c | 1 - lib/msun/src/s_exp2f.c | 1 - lib/msun/src/s_expm1.c | 1 - lib/msun/src/s_expm1f.c | 1 - lib/msun/src/s_fabs.c | 1 - lib/msun/src/s_fabsf.c | 1 - lib/msun/src/s_fdim.c | 1 - lib/msun/src/s_finite.c | 1 - lib/msun/src/s_finitef.c | 1 - lib/msun/src/s_floor.c | 1 - lib/msun/src/s_floorf.c | 1 - lib/msun/src/s_floorl.c | 1 - lib/msun/src/s_fma.c | 1 - lib/msun/src/s_fmaf.c | 1 - lib/msun/src/s_fmal.c | 1 - lib/msun/src/s_fmax.c | 1 - lib/msun/src/s_fmaxf.c | 1 - lib/msun/src/s_fmaxl.c | 1 - lib/msun/src/s_fmin.c | 1 - lib/msun/src/s_fminf.c | 1 - lib/msun/src/s_fminl.c | 1 - lib/msun/src/s_frexp.c | 1 - lib/msun/src/s_frexpf.c | 1 - lib/msun/src/s_ilogb.c | 1 - lib/msun/src/s_ilogbf.c | 1 - lib/msun/src/s_ilogbl.c | 1 - lib/msun/src/s_llrint.c | 1 - lib/msun/src/s_llrintf.c | 1 - lib/msun/src/s_llrintl.c | 1 - lib/msun/src/s_llround.c | 1 - lib/msun/src/s_llroundf.c | 1 - lib/msun/src/s_llroundl.c | 1 - lib/msun/src/s_log1p.c | 1 - lib/msun/src/s_log1pf.c | 1 - lib/msun/src/s_logb.c | 1 - lib/msun/src/s_logbf.c | 1 - lib/msun/src/s_logbl.c | 1 - lib/msun/src/s_lrint.c | 1 - lib/msun/src/s_lrintf.c | 1 - lib/msun/src/s_lrintl.c | 1 - lib/msun/src/s_lround.c | 1 - lib/msun/src/s_lroundf.c | 1 - lib/msun/src/s_lroundl.c | 1 - lib/msun/src/s_modff.c | 1 - lib/msun/src/s_nearbyint.c | 1 - lib/msun/src/s_nextafter.c | 1 - lib/msun/src/s_nextafterf.c | 1 - lib/msun/src/s_nextafterl.c | 1 - lib/msun/src/s_nexttoward.c | 1 - lib/msun/src/s_nexttowardf.c | 1 - lib/msun/src/s_remquo.c | 1 - lib/msun/src/s_remquof.c | 1 - lib/msun/src/s_remquol.c | 1 - lib/msun/src/s_rint.c | 1 - lib/msun/src/s_rintf.c | 1 - lib/msun/src/s_rintl.c | 1 - lib/msun/src/s_round.c | 1 - lib/msun/src/s_roundf.c | 1 - lib/msun/src/s_roundl.c | 1 - lib/msun/src/s_scalbln.c | 1 - lib/msun/src/s_significand.c | 1 - lib/msun/src/s_significandf.c | 1 - lib/msun/src/s_sin.c | 1 - lib/msun/src/s_sincos.c | 1 - lib/msun/src/s_sincosf.c | 1 - lib/msun/src/s_sincosl.c | 1 - lib/msun/src/s_sinf.c | 1 - lib/msun/src/s_sinl.c | 1 - lib/msun/src/s_tan.c | 1 - lib/msun/src/s_tanf.c | 1 - lib/msun/src/s_tanh.c | 1 - lib/msun/src/s_tanhf.c | 1 - lib/msun/src/s_tanhl.c | 1 - lib/msun/src/s_tanl.c | 1 - lib/msun/src/s_tgammaf.c | 1 - lib/msun/src/s_trunc.c | 1 - lib/msun/src/s_truncf.c | 1 - lib/msun/src/s_truncl.c | 1 - lib/msun/src/w_cabs.c | 1 - lib/msun/src/w_cabsl.c | 1 - lib/msun/tests/rem_test.c | 1 - 233 files changed, 244 deletions(-) diff --git a/lib/msun/bsdsrc/b_exp.c b/lib/msun/bsdsrc/b_exp.c index 112717303ccd..44cd5190de92 100644 --- a/lib/msun/bsdsrc/b_exp.c +++ b/lib/msun/bsdsrc/b_exp.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include /* EXP(X) * RETURN THE EXPONENTIAL OF X * DOUBLE PRECISION (IEEE 53 bits, VAX D FORMAT 56 BITS) diff --git a/lib/msun/bsdsrc/b_log.c b/lib/msun/bsdsrc/b_log.c index 64ca87e53b81..a82140bb98b5 100644 --- a/lib/msun/bsdsrc/b_log.c +++ b/lib/msun/bsdsrc/b_log.c @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include /* Table-driven natural logarithm. * * This code was derived, with minor modifications, from: diff --git a/lib/msun/bsdsrc/b_tgamma.c b/lib/msun/bsdsrc/b_tgamma.c index 07597cacf998..8369477c18b7 100644 --- a/lib/msun/bsdsrc/b_tgamma.c +++ b/lib/msun/bsdsrc/b_tgamma.c @@ -42,7 +42,6 @@ * porting to other precisions. */ -#include #include #include "math.h" diff --git a/lib/msun/bsdsrc/mathimpl.h b/lib/msun/bsdsrc/mathimpl.h index c8a0ceb4f6ef..a4d081c3f02f 100644 --- a/lib/msun/bsdsrc/mathimpl.h +++ b/lib/msun/bsdsrc/mathimpl.h @@ -36,7 +36,6 @@ #ifndef _MATHIMPL_H_ #define _MATHIMPL_H_ -#include #include #include "../src/math_private.h" diff --git a/lib/msun/i387/invtrig.c b/lib/msun/i387/invtrig.c index 523f022e0546..50d8d3af9343 100644 --- a/lib/msun/i387/invtrig.c +++ b/lib/msun/i387/invtrig.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include #define STRUCT_DECLS diff --git a/lib/msun/ld128/e_lgammal_r.c b/lib/msun/ld128/e_lgammal_r.c index 4a8faca7befd..f8079b79d7fa 100644 --- a/lib/msun/ld128/e_lgammal_r.c +++ b/lib/msun/ld128/e_lgammal_r.c @@ -9,7 +9,6 @@ * ==================================================== */ -#include /* * See e_lgamma_r.c for complete comments. * diff --git a/lib/msun/ld128/e_powl.c b/lib/msun/ld128/e_powl.c index fd8b57b66bd5..f5a993cf0054 100644 --- a/lib/msun/ld128/e_powl.c +++ b/lib/msun/ld128/e_powl.c @@ -59,7 +59,6 @@ * */ -#include #include #include diff --git a/lib/msun/ld128/e_rem_pio2l.h b/lib/msun/ld128/e_rem_pio2l.h index 028705ca5ceb..44ec6eb10bfd 100644 --- a/lib/msun/ld128/e_rem_pio2l.h +++ b/lib/msun/ld128/e_rem_pio2l.h @@ -12,7 +12,6 @@ * Optimized by Bruce D. Evans. */ -#include /* ld128 version of __ieee754_rem_pio2l(x,y) * * return the remainder of x rem pi/2 in y[0]+y[1] diff --git a/lib/msun/ld128/invtrig.c b/lib/msun/ld128/invtrig.c index cd9a276b68d1..75aef7b5166a 100644 --- a/lib/msun/ld128/invtrig.c +++ b/lib/msun/ld128/invtrig.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include "invtrig.h" /* diff --git a/lib/msun/ld128/k_cosl.c b/lib/msun/ld128/k_cosl.c index 6ff15eb7c763..c7562664bd3c 100644 --- a/lib/msun/ld128/k_cosl.c +++ b/lib/msun/ld128/k_cosl.c @@ -10,7 +10,6 @@ * ==================================================== */ -#include /* * ld128 version of k_cos.c. See ../src/k_cos.c for most comments. */ diff --git a/lib/msun/ld128/k_expl.h b/lib/msun/ld128/k_expl.h index 71924f16c8a4..86811dd8e089 100644 --- a/lib/msun/ld128/k_expl.h +++ b/lib/msun/ld128/k_expl.h @@ -30,7 +30,6 @@ * Optimized by Bruce D. Evans. */ -#include /* * ld128 version of k_expl.h. See ../ld80/s_expl.c for most comments. * diff --git a/lib/msun/ld128/k_sinl.c b/lib/msun/ld128/k_sinl.c index 5874d0596235..f2b17ba0eeb3 100644 --- a/lib/msun/ld128/k_sinl.c +++ b/lib/msun/ld128/k_sinl.c @@ -10,7 +10,6 @@ * ==================================================== */ -#include /* * ld128 version of k_sin.c. See ../src/k_sin.c for most comments. */ diff --git a/lib/msun/ld128/k_tanl.c b/lib/msun/ld128/k_tanl.c index 0846acfd3335..8aff0d1fc0d3 100644 --- a/lib/msun/ld128/k_tanl.c +++ b/lib/msun/ld128/k_tanl.c @@ -9,7 +9,6 @@ * ==================================================== */ -#include /* * ld128 version of k_tan.c. See ../src/k_tan.c for most comments. */ diff --git a/lib/msun/ld128/s_cexpl.c b/lib/msun/ld128/s_cexpl.c index 1e4141f162c5..9e3eebfa750e 100644 --- a/lib/msun/ld128/s_cexpl.c +++ b/lib/msun/ld128/s_cexpl.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include #include #include diff --git a/lib/msun/ld128/s_erfl.c b/lib/msun/ld128/s_erfl.c index 8a3c5d311df2..227c31fd096b 100644 --- a/lib/msun/ld128/s_erfl.c +++ b/lib/msun/ld128/s_erfl.c @@ -9,7 +9,6 @@ * ==================================================== */ -#include /* * See s_erf.c for complete comments. * diff --git a/lib/msun/ld128/s_exp2l.c b/lib/msun/ld128/s_exp2l.c index 74ae8c2daad8..249cb4cb8bb0 100644 --- a/lib/msun/ld128/s_exp2l.c +++ b/lib/msun/ld128/s_exp2l.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include #include diff --git a/lib/msun/ld128/s_expl.c b/lib/msun/ld128/s_expl.c index 6d6c22d917fe..e1358e2213a0 100644 --- a/lib/msun/ld128/s_expl.c +++ b/lib/msun/ld128/s_expl.c @@ -28,7 +28,6 @@ * Optimized by Bruce D. Evans. */ -#include /* * ld128 version of s_expl.c. See ../ld80/s_expl.c for most comments. */ diff --git a/lib/msun/ld128/s_logl.c b/lib/msun/ld128/s_logl.c index 8961dd0c96db..4d32462e5653 100644 --- a/lib/msun/ld128/s_logl.c +++ b/lib/msun/ld128/s_logl.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include /** * Implementation of the natural logarithm of x for 128-bit format. * diff --git a/lib/msun/ld80/e_lgammal_r.c b/lib/msun/ld80/e_lgammal_r.c index 29459fd614d5..9f8b8f0f98bb 100644 --- a/lib/msun/ld80/e_lgammal_r.c +++ b/lib/msun/ld80/e_lgammal_r.c @@ -9,7 +9,6 @@ * ==================================================== */ -#include /* * See e_lgamma_r.c for complete comments. * diff --git a/lib/msun/ld80/e_powl.c b/lib/msun/ld80/e_powl.c index 2daf26aab93b..b028d3cb7ff2 100644 --- a/lib/msun/ld80/e_powl.c +++ b/lib/msun/ld80/e_powl.c @@ -14,7 +14,6 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include #include #include "math_private.h" @@ -114,7 +113,6 @@ __p1evll(long double x, long double *PP, int n) * */ -#include #include #include diff --git a/lib/msun/ld80/e_rem_pio2l.h b/lib/msun/ld80/e_rem_pio2l.h index b32a5f1c7922..d0a4710bc4e2 100644 --- a/lib/msun/ld80/e_rem_pio2l.h +++ b/lib/msun/ld80/e_rem_pio2l.h @@ -12,7 +12,6 @@ * Optimized by Bruce D. Evans. */ -#include /* ld80 version of __ieee754_rem_pio2l(x,y) * * return the remainder of x rem pi/2 in y[0]+y[1] diff --git a/lib/msun/ld80/invtrig.c b/lib/msun/ld80/invtrig.c index 0e2d49546391..76eb681454d3 100644 --- a/lib/msun/ld80/invtrig.c +++ b/lib/msun/ld80/invtrig.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include "invtrig.h" /* diff --git a/lib/msun/ld80/k_cosl.c b/lib/msun/ld80/k_cosl.c index 28848cc62e41..371c360aa2ce 100644 --- a/lib/msun/ld80/k_cosl.c +++ b/lib/msun/ld80/k_cosl.c @@ -10,7 +10,6 @@ * ==================================================== */ -#include /* * ld80 version of k_cos.c. See ../src/k_cos.c for most comments. */ diff --git a/lib/msun/ld80/k_expl.h b/lib/msun/ld80/k_expl.h index 8c3617e4b177..fabf5a792205 100644 --- a/lib/msun/ld80/k_expl.h +++ b/lib/msun/ld80/k_expl.h @@ -30,7 +30,6 @@ * Optimized by Bruce D. Evans. */ -#include /* * See s_expl.c for more comments about __k_expl(). * diff --git a/lib/msun/ld80/k_sinl.c b/lib/msun/ld80/k_sinl.c index c2910993556a..ffc00be23f1c 100644 --- a/lib/msun/ld80/k_sinl.c +++ b/lib/msun/ld80/k_sinl.c @@ -10,7 +10,6 @@ * ==================================================== */ -#include /* * ld80 version of k_sin.c. See ../src/k_sin.c for most comments. */ diff --git a/lib/msun/ld80/k_tanl.c b/lib/msun/ld80/k_tanl.c index f86c6cc93c6a..b3a4d9e05255 100644 --- a/lib/msun/ld80/k_tanl.c +++ b/lib/msun/ld80/k_tanl.c @@ -9,7 +9,6 @@ * ==================================================== */ -#include /* * ld80 version of k_tan.c. See ../src/k_tan.c for most comments. */ diff --git a/lib/msun/ld80/s_cexpl.c b/lib/msun/ld80/s_cexpl.c index 81a4d727561b..cbe9dcd64099 100644 --- a/lib/msun/ld80/s_cexpl.c +++ b/lib/msun/ld80/s_cexpl.c @@ -28,7 +28,6 @@ * src/s_cexp.c converted to long double complex by Steven G. Kargl */ -#include #include #include #ifdef __i386__ diff --git a/lib/msun/ld80/s_erfl.c b/lib/msun/ld80/s_erfl.c index e33858b95115..047077ca4470 100644 --- a/lib/msun/ld80/s_erfl.c +++ b/lib/msun/ld80/s_erfl.c @@ -9,7 +9,6 @@ * ==================================================== */ -#include /* * See s_erf.c for complete comments. * diff --git a/lib/msun/ld80/s_exp2l.c b/lib/msun/ld80/s_exp2l.c index 94aecf1843cd..9d979994ece8 100644 --- a/lib/msun/ld80/s_exp2l.c +++ b/lib/msun/ld80/s_exp2l.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include #include diff --git a/lib/msun/ld80/s_expl.c b/lib/msun/ld80/s_expl.c index 065e02fae1b0..03d7b366151a 100644 --- a/lib/msun/ld80/s_expl.c +++ b/lib/msun/ld80/s_expl.c @@ -28,7 +28,6 @@ * Optimized by Bruce D. Evans. */ -#include /** * Compute the exponential of x for Intel 80-bit format. This is based on: * diff --git a/lib/msun/ld80/s_logl.c b/lib/msun/ld80/s_logl.c index 459374d7d164..2c5d1e2dd08f 100644 --- a/lib/msun/ld80/s_logl.c +++ b/lib/msun/ld80/s_logl.c @@ -26,7 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include /** * Implementation of the natural logarithm of x for Intel 80-bit format. * diff --git a/lib/msun/src/catrig.c b/lib/msun/src/catrig.c index 929811a09a3b..45af164a66c5 100644 --- a/lib/msun/src/catrig.c +++ b/lib/msun/src/catrig.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ -#include #include #include diff --git a/lib/msun/src/catrigf.c b/lib/msun/src/catrigf.c index 7feecfc5de38..da90629ec076 100644 --- a/lib/msun/src/catrigf.c +++ b/lib/msun/src/catrigf.c @@ -40,7 +40,6 @@ * a few comments on the right of declarations remain. */ -#include #include #include diff --git a/lib/msun/src/catrigl.c b/lib/msun/src/catrigl.c index 7cc3c1431731..faf9d299670e 100644 --- a/lib/msun/src/catrigl.c +++ b/lib/msun/src/catrigl.c @@ -39,7 +39,6 @@ * a few comments on the right of declarations remain. */ -#include #include #include diff --git a/lib/msun/src/e_acos.c b/lib/msun/src/e_acos.c index 75494529138a..af51fe1ecddc 100644 --- a/lib/msun/src/e_acos.c +++ b/lib/msun/src/e_acos.c @@ -10,7 +10,6 @@ * ==================================================== */ -#include /* acos(x) * Method : * acos(x) = pi/2 - asin(x) diff --git a/lib/msun/src/e_acosf.c b/lib/msun/src/e_acosf.c index 29f6d4a78495..42ba126d1baa 100644 --- a/lib/msun/src/e_acosf.c +++ b/lib/msun/src/e_acosf.c @@ -13,7 +13,6 @@ * ==================================================== */ -#include #include "math.h" #include "math_private.h" diff --git a/lib/msun/src/e_acosh.c b/lib/msun/src/e_acosh.c index 36bac70a58f9..0e5640b623d9 100644 --- a/lib/msun/src/e_acosh.c +++ b/lib/msun/src/e_acosh.c @@ -11,7 +11,6 @@ * */ -#include /* acosh(x) * Method : * Based on diff --git a/lib/msun/src/e_acoshf.c b/lib/msun/src/e_acoshf.c index df12609671cf..b6fbd2c14cb4 100644 --- a/lib/msun/src/e_acoshf.c +++ b/lib/msun/src/e_acoshf.c @@ -13,7 +13,6 @@ * ==================================================== */ -#include #include "math.h" #include "math_private.h" diff --git a/lib/msun/src/e_acoshl.c b/lib/msun/src/e_acoshl.c index 72ee019899f9..6bfa6244df09 100644 --- a/lib/msun/src/e_acoshl.c +++ b/lib/msun/src/e_acoshl.c @@ -12,7 +12,6 @@ * */ -#include /* * See e_acosh.c for complete comments. * diff --git a/lib/msun/src/e_acosl.c b/lib/msun/src/e_acosl.c index 8781a98faffd..209814383e51 100644 --- a/lib/msun/src/e_acosl.c +++ b/lib/msun/src/e_acosl.c @@ -11,7 +11,6 @@ * ==================================================== */ -#include /* * See comments in e_acos.c. * Converted to long double by David Schultz . diff --git a/lib/msun/src/e_asin.c b/lib/msun/src/e_asin.c index 72853652fe72..530bf7910756 100644 --- a/lib/msun/src/e_asin.c +++ b/lib/msun/src/e_asin.c @@ -10,7 +10,6 @@ * ==================================================== */ -#include /* asin(x) * Method : * Since asin(x) = x + x^3/6 + x^5*3/40 + x^7*15/336 + ... diff --git a/lib/msun/src/e_asinf.c b/lib/msun/src/e_asinf.c index 391c15870f84..a2ee1a166f03 100644 --- a/lib/msun/src/e_asinf.c +++ b/lib/msun/src/e_asinf.c @@ -13,7 +13,6 @@ * ==================================================== */ -#include #include "math.h" #include "math_private.h" diff --git a/lib/msun/src/e_asinl.c b/lib/msun/src/e_asinl.c index 2100c20e3896..bb2320e129e7 100644 --- a/lib/msun/src/e_asinl.c +++ b/lib/msun/src/e_asinl.c @@ -11,7 +11,6 @@ * ==================================================== */ -#include /* * See comments in e_asin.c. * Converted to long double by David Schultz . diff --git a/lib/msun/src/e_atan2.c b/lib/msun/src/e_atan2.c index 42665f130ac7..ab5fc72dbabf 100644 --- a/lib/msun/src/e_atan2.c +++ b/lib/msun/src/e_atan2.c @@ -11,7 +11,6 @@ * */ -#include /* atan2(y,x) * Method : * 1. Reduce y to positive by atan2(y,x)=-atan2(-y,x). diff --git a/lib/msun/src/e_atan2f.c b/lib/msun/src/e_atan2f.c index af8c00851476..408f3646f612 100644 --- a/lib/msun/src/e_atan2f.c +++ b/lib/msun/src/e_atan2f.c @@ -13,7 +13,6 @@ * ==================================================== */ -#include #include "math.h" #include "math_private.h" diff --git a/lib/msun/src/e_atan2l.c b/lib/msun/src/e_atan2l.c index 8266bda19de3..a27fd3efc141 100644 --- a/lib/msun/src/e_atan2l.c +++ b/lib/msun/src/e_atan2l.c @@ -12,7 +12,6 @@ * */ -#include /* * See comments in e_atan2.c. * Converted to long double by David Schultz . diff --git a/lib/msun/src/e_atanh.c b/lib/msun/src/e_atanh.c index 27e2bfc5f0d0..0cc0b9248b6b 100644 --- a/lib/msun/src/e_atanh.c +++ b/lib/msun/src/e_atanh.c @@ -11,7 +11,6 @@ * */ -#include /* atanh(x) * Method : * 1.Reduced x to positive by atanh(-x) = -atanh(x) diff --git a/lib/msun/src/e_atanhf.c b/lib/msun/src/e_atanhf.c index 134513e5b817..a2d6b69a6812 100644 --- a/lib/msun/src/e_atanhf.c +++ b/lib/msun/src/e_atanhf.c @@ -13,7 +13,6 @@ * ==================================================== */ -#include #include "math.h" #include "math_private.h" diff --git a/lib/msun/src/e_atanhl.c b/lib/msun/src/e_atanhl.c index 0574a3c82369..cb707272a66c 100644 --- a/lib/msun/src/e_atanhl.c +++ b/lib/msun/src/e_atanhl.c @@ -12,7 +12,6 @@ * */ -#include /* * See e_atanh.c for complete comments. * diff --git a/lib/msun/src/e_cosh.c b/lib/msun/src/e_cosh.c index 636fe05faa71..5c3614efbf47 100644 --- a/lib/msun/src/e_cosh.c +++ b/lib/msun/src/e_cosh.c @@ -10,7 +10,6 @@ * ==================================================== */ -#include /* cosh(x) * Method : * mathematically cosh(x) if defined to be (exp(x)+exp(-x))/2 diff --git a/lib/msun/src/e_coshf.c b/lib/msun/src/e_coshf.c index 8c5457e24a51..40443b8b84d3 100644 --- a/lib/msun/src/e_coshf.c +++ b/lib/msun/src/e_coshf.c @@ -13,7 +13,6 @@ * ==================================================== */ -#include #include "math.h" #include "math_private.h" diff --git a/lib/msun/src/e_coshl.c b/lib/msun/src/e_coshl.c index de54b8183bbb..efb5094d39f9 100644 --- a/lib/msun/src/e_coshl.c +++ b/lib/msun/src/e_coshl.c @@ -11,7 +11,6 @@ * ==================================================== */ -#include /* * See e_cosh.c for complete comments. * diff --git a/lib/msun/src/e_exp.c b/lib/msun/src/e_exp.c index a872c1d4d800..6401556a44e4 100644 --- a/lib/msun/src/e_exp.c +++ b/lib/msun/src/e_exp.c @@ -9,7 +9,6 @@ * ==================================================== */ -#include /* exp(x) * Returns the exponential of x. * diff --git a/lib/msun/src/e_expf.c b/lib/msun/src/e_expf.c index 2dbce9dd870d..fe2e6779469f 100644 --- a/lib/msun/src/e_expf.c +++ b/lib/msun/src/e_expf.c @@ -13,7 +13,6 @@ * ==================================================== */ -#include #include #include "math.h" diff --git a/lib/msun/src/e_fmod.c b/lib/msun/src/e_fmod.c index 4639d52e1cbb..77afd116c658 100644 --- a/lib/msun/src/e_fmod.c +++ b/lib/msun/src/e_fmod.c @@ -10,7 +10,6 @@ * ==================================================== */ -#include /* * fmod(x,y) * Return x mod y in exact arithmetic diff --git a/lib/msun/src/e_fmodf.c b/lib/msun/src/e_fmodf.c index 0e6633fbe739..a7d1a0c22acd 100644 --- a/lib/msun/src/e_fmodf.c +++ b/lib/msun/src/e_fmodf.c @@ -13,7 +13,6 @@ * ==================================================== */ -#include /* * fmodf(x,y) * Return x mod y in exact arithmetic diff --git a/lib/msun/src/e_fmodl.c b/lib/msun/src/e_fmodl.c index 96967b628aa6..d5997e1f4e47 100644 --- a/lib/msun/src/e_fmodl.c +++ b/lib/msun/src/e_fmodl.c @@ -9,7 +9,6 @@ * ==================================================== */ -#include #include #include diff --git a/lib/msun/src/e_gamma.c b/lib/msun/src/e_gamma.c index e69c7fe40e2e..43541ad935bd 100644 --- a/lib/msun/src/e_gamma.c +++ b/lib/msun/src/e_gamma.c @@ -11,7 +11,6 @@ * */ -#include /* gamma(x) * Return the logarithm of the Gamma function of x. * diff --git a/lib/msun/src/e_gamma_r.c b/lib/msun/src/e_gamma_r.c index 1c83ce658c8a..f317ae435cdc 100644 --- a/lib/msun/src/e_gamma_r.c +++ b/lib/msun/src/e_gamma_r.c @@ -11,7 +11,6 @@ * */ -#include /* gamma_r(x, signgamp) * Reentrant version of the logarithm of the Gamma function * with user provide pointer for the sign of Gamma(x). diff --git a/lib/msun/src/e_gammaf.c b/lib/msun/src/e_gammaf.c index 3afef79de53a..98da5711e811 100644 --- a/lib/msun/src/e_gammaf.c +++ b/lib/msun/src/e_gammaf.c @@ -13,7 +13,6 @@ * ==================================================== */ -#include /* gammaf(x) * Return the logarithm of the Gamma function of x. * diff --git a/lib/msun/src/e_gammaf_r.c b/lib/msun/src/e_gammaf_r.c index 5b3bd535aa42..ae80c1bae2cc 100644 --- a/lib/msun/src/e_gammaf_r.c +++ b/lib/msun/src/e_gammaf_r.c @@ -13,7 +13,6 @@ * ==================================================== *** 2050 LINES SKIPPED *** From nobody Sun Jan 28 15:42:27 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNG040DzVz58nQr; Sun, 28 Jan 2024 15:42: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 4TNG03693lz49w7; Sun, 28 Jan 2024 15:42:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706456547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=juL+5ZM0bP/B19kKprf1Y7/6lTHF1qilgsQGgH0oCGE=; b=F4ShW5OJptWEjMK4zzs3/UGlcZSleMiuSLdOAWr+B2TlEpGbiPjpxjoQnI7mrKs5m2y601 WHUrDkf1SKUo8l4164dd0xnQox4zhaBDknlEN0gDzxmq+qs4CI/3SJlxJC69t5xFPCep2t Tm3vmBZu115gTqxycUvPj0Tgccq17rL8e2WICBOfOCNuKjYXE5g1hJ5Yr1HbhxHIzX3B1V kXP+/ZPL1Ce60BobcFkIMB4LYhao+CqwHpeCz/Xil1DHsHRMji7ublpgK/XcKRDePem3JO 0+9ikNCinXHCsywXS4/ArrjiJ6CWhrpUr2FCHc82LSte06vLy5L1yMc+ZNWdFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706456547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=juL+5ZM0bP/B19kKprf1Y7/6lTHF1qilgsQGgH0oCGE=; b=f9U8u7zoACSxQHaf7KAptLU1EgpGEmjaQX3fJm6JwNl6mG+vEmFWTugIPkY/9MI7W1hrWE r5/9nIKgd47w9u1HWFyOYl9wDuYLlN5gfxjaYkbEQEr+5lJcQIfOKpuIURu9n777OJKdSs ErylFXBLIRyQZ3ebMswxODU78SRqGVqJkZsnTd56mC7xqW7uaqvnApBStMpJTL102OHkM6 DNuOFmX/yO2lnj/G+bMPdrv+M2pmrYcuHLEpHyFYYK7ROGFqU8K/1OWmG6LUOpFKo76okA Kj25E8DdXqZFcbNQvcUIOfodpaHndjBHbHF3q4eLiueRtWYbRD7/3t71jiTrKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706456547; a=rsa-sha256; cv=none; b=e7O+RKU0dmsZfiGIVkLuppSKkSeHltYhBpVaeCgewU4eQXj7LAVsAtEhNbtCi1mvlJh7Pk 6WT125gDNEik+rW8nw4Wvuuwlh3hLGXpxE6EDwaw55kuKUluxFnOHUt2fsaBflMlfbejoi oZe4gGC+GUw2ZtCrsQaFxacGXSSZuUo01GqM8N0yrLrSNI122G1Mzqu9D8CNqv05yhhnx6 m08JribQiMqeIWTMsTbMwm+iTA6rrpkDtijhufoCj6vEEdDBcuqk/Lp+QTLtYQCn5zMt7K 3VH2X6uXat6cjmXtkMdkii3tmsNjFWWCKKSIZOhkxCHuXKUBrK+Zr07c1D6+/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNG035DMVz1ClM; Sun, 28 Jan 2024 15:42: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 40SFgRNs092824; Sun, 28 Jan 2024 15:42:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SFgRgq092821; Sun, 28 Jan 2024 15:42:27 GMT (envelope-from git) Date: Sun, 28 Jan 2024 15:42:27 GMT Message-Id: <202401281542.40SFgRgq092821@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Bergling Subject: git: 551921a75775 - main - if_eqos: Fix a typo in a kernel error message List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gbe X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 551921a757758353af51cd0283e9e4bcee9a84d2 Auto-Submitted: auto-generated The branch main has been updated by gbe: URL: https://cgit.FreeBSD.org/src/commit/?id=551921a757758353af51cd0283e9e4bcee9a84d2 commit 551921a757758353af51cd0283e9e4bcee9a84d2 Author: Gordon Bergling AuthorDate: 2024-01-28 15:42:12 +0000 Commit: Gordon Bergling CommitDate: 2024-01-28 15:42:12 +0000 if_eqos: Fix a typo in a kernel error message - s/errer/error/ MFC after: 5 days --- sys/dev/eqos/if_eqos.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/eqos/if_eqos.c b/sys/dev/eqos/if_eqos.c index 17c820a1b191..566f6ffd0a42 100644 --- a/sys/dev/eqos/if_eqos.c +++ b/sys/dev/eqos/if_eqos.c @@ -687,7 +687,7 @@ eqos_rxintr(struct eqos_softc *sc) break; if (rdes3 & (EQOS_RDES3_OE | EQOS_RDES3_RE)) - printf("Receive errer rdes3=%08x\n", rdes3); + printf("Receive error rdes3=%08x\n", rdes3); bus_dmamap_sync(sc->rx.buf_tag, sc->rx.buf_map[sc->rx.head].map, BUS_DMASYNC_POSTREAD); From nobody Sun Jan 28 16:28:23 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNH1Q6Vvfz58sdN for ; Sun, 28 Jan 2024 16:28:42 +0000 (UTC) (envelope-from qgmcrae@yahoo.com) Received: from sonic305-21.consmr.mail.ne1.yahoo.com (sonic305-21.consmr.mail.ne1.yahoo.com [66.163.185.147]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4TNH1Q4W8kz4KPs for ; Sun, 28 Jan 2024 16:28:42 +0000 (UTC) (envelope-from qgmcrae@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1706459320; bh=kxzCQDHEpM4w0NdspALh4uX8AxNcXFEbD+PJlkHl8VQ=; h=From:Subject:Date:References:Cc:In-Reply-To:To:From:Subject:Reply-To; b=nvKk5I2kAGYWeikvu7e+02K53SPtFI8lhHo3kOjwBDanT9Tw5sQMlbLWmSMJzbCn5YwRjueLusmHe0/cWp9fxJcisss2ycTonsLCtCgAxQprZc0GkLwqFo32tWyHAISpgIVeHOdj5DyJu7F2LsWlSwmTertUoBCdn5UkDQwXEANwXgWxd7/70P9pHQ6x+w2L+Ti/+9rzDVdqQd93ZxNlNeiIWLKOCPXVvBrFmliNUUz+Ref74rrD3UpxyKnm8VjfyrpaoqrY8PtvXtpDUahJJbObzORF1B9sNX6XyIWrVWJ3PbG865US++f8lrtpViBjWfRf63v/SeEWpsbJQa/oBQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1706459320; bh=gCb9sdoK9JSEftaIGtIfMSYDNR10XwHnn6fn3vvO5zA=; h=X-Sonic-MF:From:Subject:Date:To:From:Subject; b=kTpK5QtPvEBsosGSWWOxl7TPLUQcTi2n3SasqAjHIJSkHBSgs3AQqARkn3ex4ZjxgGkhU88qkhPMjMcfAtXBqNv1GRHYU/rZO1zyjoTbhppibhp7o7cCAsE8Bazl+BN4SrFJV2t+Z1rYx+WTdLd+5c7shmWM9uhNrZdjcx/2VYIB2BlR3wcZwH5f+0xzY3P6ZQxvK4Wo2zllB7MJIuoLhUXOpdaSY2IcXhuSvAM8QKO9cmfYaaL1xrMHZtERywzu1diAyHnhPpnO1NLVuxze7KRStkP+1enGXPf/4I4mZq1Fnb7qLG0XICc+nPFTf8MsdKEccHBduqlGG+JcxtQ2iQ== X-YMail-OSG: LLi86TgVM1nh7kXisHMRPqZdO7QNkQAa71mNtC_rO1L84YKqAs2IbB7.m40lao4 Y5GD3aNpcP8SfMCyTzFdRtYLpd2wFGbEthXzbtuFbP1o4S_30b2_PVanWmBejTVHqV2zGCUnGLai pztrM..fCN1QkdigyW0vkGnzZs6j2LZ0s3ID8oU0vQjdyuq39.A3eL9T93jHMAi8mjggR131KUqx BDIOxv9wEMVAW4F2LN2gIlWMNrA0GDYE.Mh8oJ6oWK2yVxkKPQ3ltj_BKl2EP9KPsL8cKGYZ_lLw CGHwGMu4XaHGs7J_km0mRQ6XfuFVe_EqyqaMQSrT5LxVbnAl_HLOrlPAUHhQEYSfyewm9wKvtL9O ZfslwCzMqEd89yydB9l2DxMtL.61w1L72wPx3OfafDgaRqFrGTh13jiulNZpTZa25yoA2DM_9t7x XrZCXf0fueQKoKkFig1PnesCKnnq7Up68EZY5x0qTgSPxDSqihLTqml7ZTCTDzvxO90XtbqG.hds aY1aA.Jd9KcJF3poTF1TKuJXFIJvvFmrI4l92U9Se3N0AjDZc86OtdMDYyoEKpdaGodXlHnkik26 rRR_f6U5p9R6OUA5tuHffTv1eK2c5XYGmqmiLJEGx_2gka5nfq3jkpbTAAjtI.cc7wfCnch9LISr 6p8l4RQ6PxFAd30HYw3t95cfUBfVRz8kWUvU_Xg4PoQS1maj738XNpIggu1bBlY4MSnOMP.YfvJA JqGkuL26uSO1OEYEOSbZPpw6RPvp2MwWtjqj_x5Mjuw8xEm3mL2AvUC8DkxS1Exg0CGnpyhkX5UK T.ZZfElX0GO2avzYsjC6QRbVZRK6gzPkB7IifweCdYQU0s3gPUhl7H0MOMQET8EZhkq__2asew2N 0AUPsY5oY9FXhIzmLWLrFSnT6ngom544tIXFfPHGhNeihSBJSnanl0V3eCLSakeIdF3Qk1T7VFp6 rIKlqs13IO_SYQz7OLW.3XqiR_sUks9LWx0xS5ji6vmEJOxI5gOmWVTxl3Pdu213ZdmWvBkUe4aX NBGOC3dLnZI.B9r2Gim94FnA6GkVTm_72frCHZrOQCD6ncGiMc8pszh2x.3FrwXtaJ6Hxl2IpxzX PGmLEnQQKi74B_sWFrkGhj4tKshAtRtFThWMHAfIaDkpFuSgWULRNZy_N6VWyvfT7KNEtdDjJVcJ tntr7CKnGpWR_qKGiWdA8Nbd8WBFAyx._i8r206Ypa_wgHTC.4ygGP.1uXLvXibYAnXuujud17pZ QKxhFSVDxEf_slfGmL2jFJ4o5Kq87XwRQ3jT0rF8pJpMzm5LiujurgFpo5qejDPD_SLZnPv50ghM Kz7lyjbQF.5ZH022PNt5g3FXi.y8cl6sUX8cL2vPtuZKR3mXtCMyVA6VrSBEDZ8WJlgRqkrmpzHs tYG9B4754ZzoSyzqXwY9kYRYGbQC5u1bQpqXcD7qSijuo1WMLIocwu6J4QEXoYAvB6DAAYgwdPJ9 2I3XAD.GTktEUO09bF5zWQ1VsOeSWGeMAO15gaQhR9ubCK3et7FjMx3b0zgPtT_bEbZ1vyrTXAWn x5D9OfvZd6sgYA5LCrwYtzTEov7NypTohxzExxo0Nwyl47JGAslSe8JCYZnTfE1EwIVIT5.cO0YH w5YvS5sOshIYAaCqdWPFoOWQkjDl0fDKCxlvk_59YQvbNk47dU2jIMPaU6jcpXhMb5ug9PjVVt5b 12fYw7IijmGNvt63XNiHnowr.6NbHOQqfs6JLoC1zYmJRpF64JzP4R.cP7OaNgDKyYPqDR1OCWAB JyVhZYBnFbbYgcJ7IkaVd0BaMaOTwEdo3636RbNtI2xBbBH8HIfu0vPPLkQRso9b5two8.YeWs.1 X7DjYp0gT.1Mq3MSVWbNyXMTsdD6rqXyeof2MZkqMdUhIyvcpSAjczzprJsRgh2mSmwT.en8KCwG fbNAvooQcz2iCQqVf9Tut1INXSVLfk8v6udRNOOjcrTrwz9y4XSJHQr.mUckqxEx.fwOZ8yE6J24 LJmNt_ZevQD5SuAAUF6E.q9byDaTvs6LYil_KxystVSeGXDYDCpbHzbzZ.nM_oeWsR88UVyntFpC .4J5TpldRwfUJoNnZqYpjLSiokFJuE6zf9g5cT54psKbfFORfio_EeaRB3usIh3PuK68Wt5MnV69 NjBPUdW_byoIOMIsddldSwSHxy7ZluF5hje7sx9PoN5jvbKkiZv.D8qQwGll.K.2twLQ_hZ8ylqS p.Qn5f11p6cmct7ypOaj780qzjMZgK0kJrN4S6EZw1GUr X-Sonic-MF: X-Sonic-ID: e6e1a170-f933-4183-bc75-cbc223ffee4a Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Sun, 28 Jan 2024 16:28:40 +0000 Received: by hermes--production-bf1-7d6dbd57c9-s4dph (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 9bc13427c234747682070d9bfbbdbe23; Sun, 28 Jan 2024 16:28:35 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Quincy Mcrae List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (1.0) Subject: Re: git: 4d1161f094dd - main - subr_bus: report DEVICE_SUSPEND failures Date: Sun, 28 Jan 2024 12:28:23 -0400 Message-Id: References: <202401281321.40SDLneL052092@gitrepo.freebsd.org> Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org In-Reply-To: <202401281321.40SDLneL052092@gitrepo.freebsd.org> To: Andriy Gapon X-Mailer: iPhone Mail (21D50) X-Rspamd-Queue-Id: 4TNH1Q4W8kz4KPs X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US] Good afternoon, Could you please unsubscribe me from the group? Quincy Sent from my iPhone > On Jan 28, 2024, at 9:21=E2=80=AFAM, Andriy Gapon wrote:= >=20 > =EF=BB=BFThe branch main has been updated by avg: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3D4d1161f094dd90428847f7e5989= 767e9957055f4 >=20 > commit 4d1161f094dd90428847f7e5989767e9957055f4 > Author: Andriy Gapon > AuthorDate: 2023-01-03 08:39:32 +0000 > Commit: Andriy Gapon > CommitDate: 2024-01-28 13:21:09 +0000 >=20 > subr_bus: report DEVICE_SUSPEND failures >=20 > This greatly aids with diagnosing system suspend failures when > they are due to a device driver or hardware. > --- > sys/kern/subr_bus.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c > index 21c2835f2ae6..c06f3df0c9c9 100644 > --- a/sys/kern/subr_bus.c > +++ b/sys/kern/subr_bus.c > @@ -3463,8 +3463,12 @@ bus_generic_suspend_child(device_t dev, device_t ch= ild) >=20 > error =3D DEVICE_SUSPEND(child); >=20 > - if (error =3D=3D 0) > + if (error =3D=3D 0) { > child->flags |=3D DF_SUSPENDED; > + } else { > + printf("DEVICE_SUSPEND(%s) failed: %d\n", > + device_get_nameunit(child), error); > + } >=20 > return (error); > } >=20 From nobody Sun Jan 28 20:05:03 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNMq40h4Qz59Ccc; Sun, 28 Jan 2024 20:05: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 4TNMq35j6zz3xC3; Sun, 28 Jan 2024 20:05:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6MQ7soP4kB1QxH//pNLpuBkhyoeXOTlc+wICXfxcEPo=; b=ZmENEKfm0aSGjTimXBn5suYdWQrhR/7+EuJe15jHkJyt2U8wfXdPf3z5oJX5jSNBx8rFZl BU3QxSfxr1+2jZy6n1P+WxyprKqP6ADgjU2gkksf1Cshz/tljFURf5cgGRWcTtsBnWsQ/+ 1Oh67/PVjafaNQpWq+OhNZkzmPRBNvSTr3qSzdbF8bDYA++Ak0jPQEjDUUUYzxjw6K1lYD Qin8I7cOsQ5KqklDuBS9SBDuSYWyPckMaX761knoqi790HlLKo+66NwkOhlm0Bm2036Do1 7IEmhqAfE8l+zJ+hnOhD6WiwpkUSxurNAMLOjQXXV+9zeVyYoaubtt8QOM2PbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472303; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6MQ7soP4kB1QxH//pNLpuBkhyoeXOTlc+wICXfxcEPo=; b=Wkf7SOj3M5dmCgnQPjgYiNiEJCKvzZEmJDDyVkrZiI7F+sH//tKvlnOrvDWzalrMBWioNz DzcxcemDIB50p4zrlKzUGU62jET86rrwuGqilPdetYdHksWOuTCLRRF4lIWgqlDmfmP3MM jMv9nzop6qgQBmfCQ2JQ70L82XKPsw0ewu9ySneccurLwbBVrsb/Gyp7tQgA4y6xLu70zS Tu30e61p3bwDzXkwOFYGpHHrAKYvo9l8VaU2mLC5Jv1PY06fhpsh9QnOjYKNKRaCrc1MAu mi2o4FAnzIdkW7fAbg6d9YRhqWRbUqBSfj4jIyIjfZmjH0kmqbmo/sLLZWJKAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706472303; a=rsa-sha256; cv=none; b=B5Dskip1XFWKqbHXoILjM3u4Q4eRLd6OpxYpIp/ujFxLaag7664py+kh1ubq5Q2NDlpVSp K8v0VfgVwbS01vp/jQh4KZ132vy2dGAdzXYJk12u9VLhknoD4g95jPXs0hsWYEINbImPjV 01WL8tBAR7EnLqsxe+nvP8H4Vl2Y+EIzSf71TP0Ef/V6f6KEz/Sj7Oe5cBNr0r+x7UYtDb H5NQuWxscRYacaFrUsAR41EKXWPcLhZAtx1wCysB3b6yHggqb6qwGKE6J1Um9EUak4oRxD L28z9MaGIiSJn6uGu1jOwHP+lCPIRfBGqXW3jcK1CdiDNLMmZ122wigOCGQg9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNMq34n3nzLcs; Sun, 28 Jan 2024 20:05: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 40SK53sc032408; Sun, 28 Jan 2024 20:05:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SK53nt032405; Sun, 28 Jan 2024 20:05:03 GMT (envelope-from git) Date: Sun, 28 Jan 2024 20:05:03 GMT Message-Id: <202401282005.40SK53nt032405@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: dcc20bced515 - main - stand: Use modern function definitions List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dcc20bced51583df83e49af269ff7be5fb48dbf8 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=dcc20bced51583df83e49af269ff7be5fb48dbf8 commit dcc20bced51583df83e49af269ff7be5fb48dbf8 Author: Warner Losh AuthorDate: 2024-01-28 18:36:21 +0000 Commit: Warner Losh CommitDate: 2024-01-28 20:04:31 +0000 stand: Use modern function definitions Use modern function definitions for functions with no args. Sponsored by: Netflix --- stand/common/boot.c | 2 +- stand/efi/libefi/efinet.c | 2 +- stand/fdt/fdt_loader_cmd.c | 6 +++--- stand/libofw/ofw_console.c | 4 ++-- stand/libofw/openfirm.c | 8 ++++---- stand/libsa/bzipfs.c | 2 +- stand/libsa/powerpc/syncicache.c | 2 +- stand/uboot/main.c | 2 +- stand/uboot/net.c | 2 +- stand/uboot/uboot_console.c | 4 ++-- 10 files changed, 17 insertions(+), 17 deletions(-) diff --git a/stand/common/boot.c b/stand/common/boot.c index db4bb4fc2ea8..658da097b9a9 100644 --- a/stand/common/boot.c +++ b/stand/common/boot.c @@ -160,7 +160,7 @@ command_autoboot(int argc, char *argv[]) * we haven't tried already, try now. */ void -autoboot_maybe() +autoboot_maybe(void) { char *cp; diff --git a/stand/efi/libefi/efinet.c b/stand/efi/libefi/efinet.c index 62fc203c83b5..97890c9d9b43 100644 --- a/stand/efi/libefi/efinet.c +++ b/stand/efi/libefi/efinet.c @@ -352,7 +352,7 @@ struct devsw efinet_dev = { }; static int -efinet_dev_init() +efinet_dev_init(void) { struct netif_dif *dif; struct netif_stats *stats; diff --git a/stand/fdt/fdt_loader_cmd.c b/stand/fdt/fdt_loader_cmd.c index a27ac53cb13b..eb152ae1949c 100644 --- a/stand/fdt/fdt_loader_cmd.c +++ b/stand/fdt/fdt_loader_cmd.c @@ -111,7 +111,7 @@ static const struct cmdtab commands[] = { static char cwd[FDT_CWD_LEN] = "/"; static vm_offset_t -fdt_find_static_dtb() +fdt_find_static_dtb(void) { Elf_Ehdr *ehdr; Elf_Shdr *shdr; @@ -428,7 +428,7 @@ fdt_check_overlay_compatible(void *base_fdt, void *overlay_fdt) * Returns the number of overlays successfully applied */ int -fdt_apply_overlays() +fdt_apply_overlays(void) { struct preloaded_file *fp; size_t max_overlay_size, next_fdtp_size; @@ -551,7 +551,7 @@ fdt_is_setup(void) } int -fdt_setup_fdtp() +fdt_setup_fdtp(void) { struct preloaded_file *bfp; vm_offset_t va; diff --git a/stand/libofw/ofw_console.c b/stand/libofw/ofw_console.c index 42ff045e8831..b0ead0aba198 100644 --- a/stand/libofw/ofw_console.c +++ b/stand/libofw/ofw_console.c @@ -83,7 +83,7 @@ ofw_cons_putchar(int c) static int saved_char = -1; int -ofw_cons_getchar() +ofw_cons_getchar(void) { unsigned char ch = '\0'; int l; @@ -105,7 +105,7 @@ ofw_cons_getchar() } int -ofw_cons_poll() +ofw_cons_poll(void) { unsigned char ch; diff --git a/stand/libofw/openfirm.c b/stand/libofw/openfirm.c index 211722c08e10..da0f589faa67 100644 --- a/stand/libofw/openfirm.c +++ b/stand/libofw/openfirm.c @@ -135,7 +135,7 @@ OF_test(char *name) /* Return firmware millisecond count. */ int -OF_milliseconds() +OF_milliseconds(void) { static struct { cell_t name; @@ -693,7 +693,7 @@ OF_boot(char *bootspec) /* Suspend and drop back to the Open Firmware interface. */ void -OF_enter() +OF_enter(void) { static struct { cell_t name; @@ -708,7 +708,7 @@ OF_enter() /* Shut down and drop back to the Open Firmware interface. */ void -OF_exit() +OF_exit(void) { static struct { cell_t name; @@ -723,7 +723,7 @@ OF_exit() } void -OF_quiesce() +OF_quiesce(void) { static struct { cell_t name; diff --git a/stand/libsa/bzipfs.c b/stand/libsa/bzipfs.c index 9a14380bae51..ad51e934ed9c 100644 --- a/stand/libsa/bzipfs.c +++ b/stand/libsa/bzipfs.c @@ -366,7 +366,7 @@ bz_internal_error(int errorcode) #ifdef REGRESSION /* Small test case, open and decompress test.bz2 */ -int main() +int main(void) { struct open_file f; char buf[1024]; diff --git a/stand/libsa/powerpc/syncicache.c b/stand/libsa/powerpc/syncicache.c index 0fcb1914a0da..1f99007dcdae 100644 --- a/stand/libsa/powerpc/syncicache.c +++ b/stand/libsa/powerpc/syncicache.c @@ -54,7 +54,7 @@ int cacheline_size = 0; static void getcachelinesize(void); static void -getcachelinesize() +getcachelinesize(void) { static int cachemib[] = { CTL_MACHDEP, CPU_CACHELINE }; int clen; diff --git a/stand/uboot/main.c b/stand/uboot/main.c index 6147757ced71..5a896959122e 100644 --- a/stand/uboot/main.c +++ b/stand/uboot/main.c @@ -339,7 +339,7 @@ get_load_device(int *type, int *unit, int *slice, int *partition) } static void -print_disk_probe_info() +print_disk_probe_info(void) { char slice[32]; char partition[32]; diff --git a/stand/uboot/net.c b/stand/uboot/net.c index 969724ea02df..392dd1ca45c2 100644 --- a/stand/uboot/net.c +++ b/stand/uboot/net.c @@ -100,7 +100,7 @@ static struct uboot_softc uboot_softc; * to obtain all this info again. */ static void -get_env_net_params() +get_env_net_params(void) { char *envstr; in_addr_t rootaddr, serveraddr; diff --git a/stand/uboot/uboot_console.c b/stand/uboot/uboot_console.c index d8819b8193e2..f6656309be6c 100644 --- a/stand/uboot/uboot_console.c +++ b/stand/uboot/uboot_console.c @@ -73,14 +73,14 @@ uboot_cons_putchar(int c) } static int -uboot_cons_getchar() +uboot_cons_getchar(void) { return (ub_getc()); } static int -uboot_cons_poll() +uboot_cons_poll(void) { return (ub_tstc()); From nobody Sun Jan 28 20:05:04 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNMq5020sz59CTP; Sun, 28 Jan 2024 20:05:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TNMq466wrz3wsX; Sun, 28 Jan 2024 20:05:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xg9+wA0c4e4Ztint+iHeLRdaSAAZmziGyZuDuHXqOKA=; b=O/FoCeO/OYNL7uSOtpigTrYt2asY18FcbVtUFeqeKtOJC0dZXPnkt/GR+kev0LpS4M0HyV qM54x02Luf0tsFEDnZYZncHNdqR4y8A8KMr6au7VJcTtYZPgaOmiLV6Tu+rJ7oi0w1z0/B HjmOzA+2RdZpAw9DavD3UlGDUQD3ddZ8jBltgTXU+Oi5gIWAsdGuFkCYA2ynEydipLU3Ho pILOLXonCYYQfyg6g7IcNoVFla1b/9ud7CXX20qAllsDjZHLekDMYyZEMpPH3VhbJeN3PX DEYoKlcgnDLoJqyKO68+JArc1IONo7fpyvlndAE2kHYuOAIRV9f2knpkEBSFUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xg9+wA0c4e4Ztint+iHeLRdaSAAZmziGyZuDuHXqOKA=; b=OOIn9yXxiO4GOl5puSoSC5ubwyNb2dkAA20wQVTABDoP4EbpRLZA4sAGD7auA0DyKnUUbX 35OTmGVGjLFsp61Ayg7amHzVTKdm4ct2bjsIFf10AD2QDWcvgfZWHGq8R9ktzJlGJBwshm HEz39tBgzkVMXYu7q216huI6AjWGluUWaVfyqUA3UQ15ps8AVF1R64gSs61ul3v/Ftn9kM BEaE980ZMmaAmdHS9w5VMVrV6B/wMy4cHD7e4LTqChZpiN0FIwxSbviFkHPF3sC81YKF4S cGAcV+BceEyO4nWXsX0uec2lCK6ACfaF4rZ58gK8LQqgT2fg7GbNZ0mgDmTbOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706472304; a=rsa-sha256; cv=none; b=kqUK9xlIwhll1gPfpaIVh+ElmdOZhZ7sRkxZdsZESjM3G4xnFyNrfdF3pyenZugwJrzXIV mjmPOE4Q5HFTpZ63pBlJRCEw6DQawRXF2PSkJpfv1atxxOdDyKVnK5vubFueZ5lKorxB30 CeEmj4hJoN1u7Fc4HqKmuOO6LE3BreIE9HB0+oDIur3mdievOsj6Z+vQYEst5YX2gy8rRP yb4kX89dzoy+9nkZkp/QxDbzFqslc6hD3N49mSc3+47EM4RcBXasekDrfifbsqUilV2l/8 3j3cSo5RIh674q3pieWDnUos/hUtkRD0rJwchs+0DRaI9n0o0NHUgtLlaFd0VQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNMq459GQzLct; Sun, 28 Jan 2024 20:05: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 40SK54Ua032456; Sun, 28 Jan 2024 20:05:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SK54mX032453; Sun, 28 Jan 2024 20:05:04 GMT (envelope-from git) Date: Sun, 28 Jan 2024 20:05:04 GMT Message-Id: <202401282005.40SK54mX032453@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 091c255b5b27 - main - kboot: Move to kboot/kboot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 091c255b5b279fddf445a42dd7d0bad0e7c213fd Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=091c255b5b279fddf445a42dd7d0bad0e7c213fd commit 091c255b5b279fddf445a42dd7d0bad0e7c213fd Author: Warner Losh AuthorDate: 2024-01-28 18:05:05 +0000 Commit: Warner Losh CommitDate: 2024-01-28 20:04:31 +0000 kboot: Move to kboot/kboot In anticipation of separating the library elements from the kboot prorgam elements, move kboot down a level into a subdirectory. There will be libkboot and include directories in subsequent commits, mirroring other subsystems like i386 and efi. Sponsored by: Netflix --- stand/kboot/Makefile | 68 +-------------------- stand/kboot/Makefile.inc | 1 + stand/kboot/kboot/Makefile | 69 ++++++++++++++++++++++ stand/kboot/{ => kboot}/arch/aarch64/Makefile.inc | 0 stand/kboot/{ => kboot}/arch/aarch64/exec.c | 0 stand/kboot/{ => kboot}/arch/aarch64/fdt_arch.c | 0 .../kboot/{ => kboot}/arch/aarch64/host_syscall.S | 0 .../{ => kboot}/arch/aarch64/ldscript.aarch64 | 0 stand/kboot/{ => kboot}/arch/aarch64/load_addr.c | 0 stand/kboot/{ => kboot}/arch/aarch64/start_arch.h | 0 stand/kboot/{ => kboot}/arch/aarch64/stat_arch.h | 0 stand/kboot/{ => kboot}/arch/aarch64/syscall_nr.h | 0 .../kboot/{ => kboot}/arch/aarch64/termios_arch.h | 0 stand/kboot/{ => kboot}/arch/aarch64/tramp.S | 0 stand/kboot/{ => kboot}/arch/amd64/Makefile.inc | 0 stand/kboot/{ => kboot}/arch/amd64/amd64_tramp.S | 0 stand/kboot/{ => kboot}/arch/amd64/elf64_freebsd.c | 0 stand/kboot/{ => kboot}/arch/amd64/fdt_arch.c | 0 stand/kboot/{ => kboot}/arch/amd64/host_syscall.S | 0 stand/kboot/{ => kboot}/arch/amd64/ldscript.amd64 | 0 stand/kboot/{ => kboot}/arch/amd64/load_addr.c | 0 stand/kboot/{ => kboot}/arch/amd64/multiboot2.h | 0 stand/kboot/{ => kboot}/arch/amd64/start_arch.h | 0 stand/kboot/{ => kboot}/arch/amd64/stat_arch.h | 0 stand/kboot/{ => kboot}/arch/amd64/syscall_nr.h | 0 stand/kboot/{ => kboot}/arch/amd64/termios_arch.h | 0 .../kboot/{ => kboot}/arch/powerpc64/Makefile.inc | 0 stand/kboot/{ => kboot}/arch/powerpc64/fdt_arch.c | 0 .../{ => kboot}/arch/powerpc64/host_syscall.S | 0 .../kboot/{ => kboot}/arch/powerpc64/kerneltramp.S | 0 .../{ => kboot}/arch/powerpc64/ldscript.powerpc | 0 stand/kboot/{ => kboot}/arch/powerpc64/load_addr.c | 0 .../{ => kboot}/arch/powerpc64/ppc64_elf_freebsd.c | 0 .../kboot/{ => kboot}/arch/powerpc64/start_arch.h | 0 stand/kboot/{ => kboot}/arch/powerpc64/stat_arch.h | 0 .../kboot/{ => kboot}/arch/powerpc64/syscall_nr.h | 0 .../{ => kboot}/arch/powerpc64/termios_arch.h | 0 stand/kboot/{ => kboot}/conf.c | 0 stand/kboot/{ => kboot}/crt1.c | 0 stand/kboot/{ => kboot}/host_syscall.h | 0 stand/kboot/{ => kboot}/host_syscalls.c | 0 stand/kboot/{ => kboot}/hostcons.c | 0 stand/kboot/{ => kboot}/hostdisk.c | 0 stand/kboot/{ => kboot}/hostfs.c | 0 stand/kboot/{ => kboot}/init.c | 0 stand/kboot/{ => kboot}/kboot.h | 0 stand/kboot/{ => kboot}/kbootfdt.c | 0 stand/kboot/{ => kboot}/main.c | 0 stand/kboot/{ => kboot}/seg.c | 0 stand/kboot/{ => kboot}/termios.c | 0 stand/kboot/{ => kboot}/termios.h | 0 stand/kboot/{ => kboot}/termios_gen.h | 0 stand/kboot/{ => kboot}/util.c | 0 stand/kboot/{ => kboot}/version | 0 54 files changed, 73 insertions(+), 65 deletions(-) diff --git a/stand/kboot/Makefile b/stand/kboot/Makefile index b9d68cddf97d..2e0b9d7a2e09 100644 --- a/stand/kboot/Makefile +++ b/stand/kboot/Makefile @@ -1,69 +1,7 @@ - -LOADER_DISK_SUPPORT?= yes -LOADER_CD9660_SUPPORT?= yes -LOADER_MSDOS_SUPPORT?= no -LOADER_EXT2FS_SUPPORT?= yes -LOADER_UFS_SUPPORT?= yes -LOADER_ZFS_SUPPORT?= yes -LOADER_NET_SUPPORT?= no -LOADER_NFS_SUPPORT?= no -LOADER_TFTP_SUPPORT?= no -LOADER_GZIP_SUPPORT?= no -LOADER_BZIP2_SUPPORT?= no +NO_OBJ=t .include -PROG= loader.kboot -NEWVERSWHAT= "kboot loader" ${MACHINE_ARCH} -INSTALLFLAGS= -b - -# Architecture-specific loader code -SRCS= \ - bootinfo.c \ - conf.c \ - crt1.c \ - gfx_fb_stub.c \ - host_syscalls.c \ - hostcons.c \ - hostdisk.c \ - hostfs.c \ - init.c \ - kbootfdt.c \ - main.c \ - seg.c \ - termios.c \ - util.c \ - vers.c - -CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken -.if ${MK_LOADER_ZFS} != "no" -CFLAGS+= -I${ZFSSRC} -CFLAGS+= -I${SYSDIR}/contrib/openzfs/include -CFLAGS+= -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs -HAVE_ZFS=yes -.endif - -HELP_FILENAME= loader.help.kboot - -.include "${BOOTSRC}/fdt.mk" - -# We share bootinfo.c with efi -.PATH: ${BOOTSRC}/efi/loader - -# Note: Since we're producing a userland binary, we key off of MACHINE_ARCH -# instead of the more normal MACHINE since the changes between different flavors -# of MACHINE_ARCH are large enough in Linux that it's easier that way. -.PATH: ${.CURDIR}/arch/${MACHINE_ARCH} -.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" - -# Always add MI sources -.include "${BOOTSRC}/loader.mk" -.PATH: ${SYSDIR}/libkern -CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} - -CFLAGS+= -Wall - -DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} -LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} +SUBDIR+= kboot -.include +.include diff --git a/stand/kboot/Makefile.inc b/stand/kboot/Makefile.inc new file mode 100644 index 000000000000..01b5f23410c8 --- /dev/null +++ b/stand/kboot/Makefile.inc @@ -0,0 +1 @@ +.include "../Makefile.inc" diff --git a/stand/kboot/kboot/Makefile b/stand/kboot/kboot/Makefile new file mode 100644 index 000000000000..b9d68cddf97d --- /dev/null +++ b/stand/kboot/kboot/Makefile @@ -0,0 +1,69 @@ + +LOADER_DISK_SUPPORT?= yes +LOADER_CD9660_SUPPORT?= yes +LOADER_MSDOS_SUPPORT?= no +LOADER_EXT2FS_SUPPORT?= yes +LOADER_UFS_SUPPORT?= yes +LOADER_ZFS_SUPPORT?= yes +LOADER_NET_SUPPORT?= no +LOADER_NFS_SUPPORT?= no +LOADER_TFTP_SUPPORT?= no +LOADER_GZIP_SUPPORT?= no +LOADER_BZIP2_SUPPORT?= no + +.include + +PROG= loader.kboot +NEWVERSWHAT= "kboot loader" ${MACHINE_ARCH} +INSTALLFLAGS= -b + +# Architecture-specific loader code +SRCS= \ + bootinfo.c \ + conf.c \ + crt1.c \ + gfx_fb_stub.c \ + host_syscalls.c \ + hostcons.c \ + hostdisk.c \ + hostfs.c \ + init.c \ + kbootfdt.c \ + main.c \ + seg.c \ + termios.c \ + util.c \ + vers.c + +CFLAGS.gfx_fb_stub.c += -I${SRCTOP}/contrib/pnglite -I${SRCTOP}/sys/teken +.if ${MK_LOADER_ZFS} != "no" +CFLAGS+= -I${ZFSSRC} +CFLAGS+= -I${SYSDIR}/contrib/openzfs/include +CFLAGS+= -I${SYSDIR}/contrib/openzfs/include/os/freebsd/zfs +HAVE_ZFS=yes +.endif + +HELP_FILENAME= loader.help.kboot + +.include "${BOOTSRC}/fdt.mk" + +# We share bootinfo.c with efi +.PATH: ${BOOTSRC}/efi/loader + +# Note: Since we're producing a userland binary, we key off of MACHINE_ARCH +# instead of the more normal MACHINE since the changes between different flavors +# of MACHINE_ARCH are large enough in Linux that it's easier that way. +.PATH: ${.CURDIR}/arch/${MACHINE_ARCH} +.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" + +# Always add MI sources +.include "${BOOTSRC}/loader.mk" +.PATH: ${SYSDIR}/libkern +CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} + +CFLAGS+= -Wall + +DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} +LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} + +.include diff --git a/stand/kboot/arch/aarch64/Makefile.inc b/stand/kboot/kboot/arch/aarch64/Makefile.inc similarity index 100% rename from stand/kboot/arch/aarch64/Makefile.inc rename to stand/kboot/kboot/arch/aarch64/Makefile.inc diff --git a/stand/kboot/arch/aarch64/exec.c b/stand/kboot/kboot/arch/aarch64/exec.c similarity index 100% rename from stand/kboot/arch/aarch64/exec.c rename to stand/kboot/kboot/arch/aarch64/exec.c diff --git a/stand/kboot/arch/aarch64/fdt_arch.c b/stand/kboot/kboot/arch/aarch64/fdt_arch.c similarity index 100% rename from stand/kboot/arch/aarch64/fdt_arch.c rename to stand/kboot/kboot/arch/aarch64/fdt_arch.c diff --git a/stand/kboot/arch/aarch64/host_syscall.S b/stand/kboot/kboot/arch/aarch64/host_syscall.S similarity index 100% rename from stand/kboot/arch/aarch64/host_syscall.S rename to stand/kboot/kboot/arch/aarch64/host_syscall.S diff --git a/stand/kboot/arch/aarch64/ldscript.aarch64 b/stand/kboot/kboot/arch/aarch64/ldscript.aarch64 similarity index 100% rename from stand/kboot/arch/aarch64/ldscript.aarch64 rename to stand/kboot/kboot/arch/aarch64/ldscript.aarch64 diff --git a/stand/kboot/arch/aarch64/load_addr.c b/stand/kboot/kboot/arch/aarch64/load_addr.c similarity index 100% rename from stand/kboot/arch/aarch64/load_addr.c rename to stand/kboot/kboot/arch/aarch64/load_addr.c diff --git a/stand/kboot/arch/aarch64/start_arch.h b/stand/kboot/kboot/arch/aarch64/start_arch.h similarity index 100% rename from stand/kboot/arch/aarch64/start_arch.h rename to stand/kboot/kboot/arch/aarch64/start_arch.h diff --git a/stand/kboot/arch/aarch64/stat_arch.h b/stand/kboot/kboot/arch/aarch64/stat_arch.h similarity index 100% rename from stand/kboot/arch/aarch64/stat_arch.h rename to stand/kboot/kboot/arch/aarch64/stat_arch.h diff --git a/stand/kboot/arch/aarch64/syscall_nr.h b/stand/kboot/kboot/arch/aarch64/syscall_nr.h similarity index 100% rename from stand/kboot/arch/aarch64/syscall_nr.h rename to stand/kboot/kboot/arch/aarch64/syscall_nr.h diff --git a/stand/kboot/arch/aarch64/termios_arch.h b/stand/kboot/kboot/arch/aarch64/termios_arch.h similarity index 100% rename from stand/kboot/arch/aarch64/termios_arch.h rename to stand/kboot/kboot/arch/aarch64/termios_arch.h diff --git a/stand/kboot/arch/aarch64/tramp.S b/stand/kboot/kboot/arch/aarch64/tramp.S similarity index 100% rename from stand/kboot/arch/aarch64/tramp.S rename to stand/kboot/kboot/arch/aarch64/tramp.S diff --git a/stand/kboot/arch/amd64/Makefile.inc b/stand/kboot/kboot/arch/amd64/Makefile.inc similarity index 100% rename from stand/kboot/arch/amd64/Makefile.inc rename to stand/kboot/kboot/arch/amd64/Makefile.inc diff --git a/stand/kboot/arch/amd64/amd64_tramp.S b/stand/kboot/kboot/arch/amd64/amd64_tramp.S similarity index 100% rename from stand/kboot/arch/amd64/amd64_tramp.S rename to stand/kboot/kboot/arch/amd64/amd64_tramp.S diff --git a/stand/kboot/arch/amd64/elf64_freebsd.c b/stand/kboot/kboot/arch/amd64/elf64_freebsd.c similarity index 100% rename from stand/kboot/arch/amd64/elf64_freebsd.c rename to stand/kboot/kboot/arch/amd64/elf64_freebsd.c diff --git a/stand/kboot/arch/amd64/fdt_arch.c b/stand/kboot/kboot/arch/amd64/fdt_arch.c similarity index 100% rename from stand/kboot/arch/amd64/fdt_arch.c rename to stand/kboot/kboot/arch/amd64/fdt_arch.c diff --git a/stand/kboot/arch/amd64/host_syscall.S b/stand/kboot/kboot/arch/amd64/host_syscall.S similarity index 100% rename from stand/kboot/arch/amd64/host_syscall.S rename to stand/kboot/kboot/arch/amd64/host_syscall.S diff --git a/stand/kboot/arch/amd64/ldscript.amd64 b/stand/kboot/kboot/arch/amd64/ldscript.amd64 similarity index 100% rename from stand/kboot/arch/amd64/ldscript.amd64 rename to stand/kboot/kboot/arch/amd64/ldscript.amd64 diff --git a/stand/kboot/arch/amd64/load_addr.c b/stand/kboot/kboot/arch/amd64/load_addr.c similarity index 100% rename from stand/kboot/arch/amd64/load_addr.c rename to stand/kboot/kboot/arch/amd64/load_addr.c diff --git a/stand/kboot/arch/amd64/multiboot2.h b/stand/kboot/kboot/arch/amd64/multiboot2.h similarity index 100% rename from stand/kboot/arch/amd64/multiboot2.h rename to stand/kboot/kboot/arch/amd64/multiboot2.h diff --git a/stand/kboot/arch/amd64/start_arch.h b/stand/kboot/kboot/arch/amd64/start_arch.h similarity index 100% rename from stand/kboot/arch/amd64/start_arch.h rename to stand/kboot/kboot/arch/amd64/start_arch.h diff --git a/stand/kboot/arch/amd64/stat_arch.h b/stand/kboot/kboot/arch/amd64/stat_arch.h similarity index 100% rename from stand/kboot/arch/amd64/stat_arch.h rename to stand/kboot/kboot/arch/amd64/stat_arch.h diff --git a/stand/kboot/arch/amd64/syscall_nr.h b/stand/kboot/kboot/arch/amd64/syscall_nr.h similarity index 100% rename from stand/kboot/arch/amd64/syscall_nr.h rename to stand/kboot/kboot/arch/amd64/syscall_nr.h diff --git a/stand/kboot/arch/amd64/termios_arch.h b/stand/kboot/kboot/arch/amd64/termios_arch.h similarity index 100% rename from stand/kboot/arch/amd64/termios_arch.h rename to stand/kboot/kboot/arch/amd64/termios_arch.h diff --git a/stand/kboot/arch/powerpc64/Makefile.inc b/stand/kboot/kboot/arch/powerpc64/Makefile.inc similarity index 100% rename from stand/kboot/arch/powerpc64/Makefile.inc rename to stand/kboot/kboot/arch/powerpc64/Makefile.inc diff --git a/stand/kboot/arch/powerpc64/fdt_arch.c b/stand/kboot/kboot/arch/powerpc64/fdt_arch.c similarity index 100% rename from stand/kboot/arch/powerpc64/fdt_arch.c rename to stand/kboot/kboot/arch/powerpc64/fdt_arch.c diff --git a/stand/kboot/arch/powerpc64/host_syscall.S b/stand/kboot/kboot/arch/powerpc64/host_syscall.S similarity index 100% rename from stand/kboot/arch/powerpc64/host_syscall.S rename to stand/kboot/kboot/arch/powerpc64/host_syscall.S diff --git a/stand/kboot/arch/powerpc64/kerneltramp.S b/stand/kboot/kboot/arch/powerpc64/kerneltramp.S similarity index 100% rename from stand/kboot/arch/powerpc64/kerneltramp.S rename to stand/kboot/kboot/arch/powerpc64/kerneltramp.S diff --git a/stand/kboot/arch/powerpc64/ldscript.powerpc b/stand/kboot/kboot/arch/powerpc64/ldscript.powerpc similarity index 100% rename from stand/kboot/arch/powerpc64/ldscript.powerpc rename to stand/kboot/kboot/arch/powerpc64/ldscript.powerpc diff --git a/stand/kboot/arch/powerpc64/load_addr.c b/stand/kboot/kboot/arch/powerpc64/load_addr.c similarity index 100% rename from stand/kboot/arch/powerpc64/load_addr.c rename to stand/kboot/kboot/arch/powerpc64/load_addr.c diff --git a/stand/kboot/arch/powerpc64/ppc64_elf_freebsd.c b/stand/kboot/kboot/arch/powerpc64/ppc64_elf_freebsd.c similarity index 100% rename from stand/kboot/arch/powerpc64/ppc64_elf_freebsd.c rename to stand/kboot/kboot/arch/powerpc64/ppc64_elf_freebsd.c diff --git a/stand/kboot/arch/powerpc64/start_arch.h b/stand/kboot/kboot/arch/powerpc64/start_arch.h similarity index 100% rename from stand/kboot/arch/powerpc64/start_arch.h rename to stand/kboot/kboot/arch/powerpc64/start_arch.h diff --git a/stand/kboot/arch/powerpc64/stat_arch.h b/stand/kboot/kboot/arch/powerpc64/stat_arch.h similarity index 100% rename from stand/kboot/arch/powerpc64/stat_arch.h rename to stand/kboot/kboot/arch/powerpc64/stat_arch.h diff --git a/stand/kboot/arch/powerpc64/syscall_nr.h b/stand/kboot/kboot/arch/powerpc64/syscall_nr.h similarity index 100% rename from stand/kboot/arch/powerpc64/syscall_nr.h rename to stand/kboot/kboot/arch/powerpc64/syscall_nr.h diff --git a/stand/kboot/arch/powerpc64/termios_arch.h b/stand/kboot/kboot/arch/powerpc64/termios_arch.h similarity index 100% rename from stand/kboot/arch/powerpc64/termios_arch.h rename to stand/kboot/kboot/arch/powerpc64/termios_arch.h diff --git a/stand/kboot/conf.c b/stand/kboot/kboot/conf.c similarity index 100% rename from stand/kboot/conf.c rename to stand/kboot/kboot/conf.c diff --git a/stand/kboot/crt1.c b/stand/kboot/kboot/crt1.c similarity index 100% rename from stand/kboot/crt1.c rename to stand/kboot/kboot/crt1.c diff --git a/stand/kboot/host_syscall.h b/stand/kboot/kboot/host_syscall.h similarity index 100% rename from stand/kboot/host_syscall.h rename to stand/kboot/kboot/host_syscall.h diff --git a/stand/kboot/host_syscalls.c b/stand/kboot/kboot/host_syscalls.c similarity index 100% rename from stand/kboot/host_syscalls.c rename to stand/kboot/kboot/host_syscalls.c diff --git a/stand/kboot/hostcons.c b/stand/kboot/kboot/hostcons.c similarity index 100% rename from stand/kboot/hostcons.c rename to stand/kboot/kboot/hostcons.c diff --git a/stand/kboot/hostdisk.c b/stand/kboot/kboot/hostdisk.c similarity index 100% rename from stand/kboot/hostdisk.c rename to stand/kboot/kboot/hostdisk.c diff --git a/stand/kboot/hostfs.c b/stand/kboot/kboot/hostfs.c similarity index 100% rename from stand/kboot/hostfs.c rename to stand/kboot/kboot/hostfs.c diff --git a/stand/kboot/init.c b/stand/kboot/kboot/init.c similarity index 100% rename from stand/kboot/init.c rename to stand/kboot/kboot/init.c diff --git a/stand/kboot/kboot.h b/stand/kboot/kboot/kboot.h similarity index 100% rename from stand/kboot/kboot.h rename to stand/kboot/kboot/kboot.h diff --git a/stand/kboot/kbootfdt.c b/stand/kboot/kboot/kbootfdt.c similarity index 100% rename from stand/kboot/kbootfdt.c rename to stand/kboot/kboot/kbootfdt.c diff --git a/stand/kboot/main.c b/stand/kboot/kboot/main.c similarity index 100% rename from stand/kboot/main.c rename to stand/kboot/kboot/main.c diff --git a/stand/kboot/seg.c b/stand/kboot/kboot/seg.c similarity index 100% rename from stand/kboot/seg.c rename to stand/kboot/kboot/seg.c diff --git a/stand/kboot/termios.c b/stand/kboot/kboot/termios.c similarity index 100% rename from stand/kboot/termios.c rename to stand/kboot/kboot/termios.c diff --git a/stand/kboot/termios.h b/stand/kboot/kboot/termios.h similarity index 100% rename from stand/kboot/termios.h rename to stand/kboot/kboot/termios.h diff --git a/stand/kboot/termios_gen.h b/stand/kboot/kboot/termios_gen.h similarity index 100% rename from stand/kboot/termios_gen.h rename to stand/kboot/kboot/termios_gen.h diff --git a/stand/kboot/util.c b/stand/kboot/kboot/util.c similarity index 100% rename from stand/kboot/util.c rename to stand/kboot/kboot/util.c diff --git a/stand/kboot/version b/stand/kboot/kboot/version similarity index 100% rename from stand/kboot/version rename to stand/kboot/kboot/version From nobody Sun Jan 28 20:05:05 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNMq60mnpz59CTS; Sun, 28 Jan 2024 20:05: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 4TNMq574WJz3wsf; Sun, 28 Jan 2024 20:05:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rT5Kwy0BbcWPx/8y68bM2Nrx1nPf5itgY2jCLlTmzn4=; b=R+P3Mm4SCxuUo1A0SSxbQrU9YDRuY6mrHdwoQraDdi7VF9iot86wt2N/FsTNnPjROGBEOD Y3dwte/rlKZehp8yDmE+OxpTxx0GUqfHpD0RVSkDEzx3NZWscpjUtU5d4+pmlcHitriqzs CCWQmFTTgnua5HOsUl/ED6sIp8JRusRfFZs+ZKdXH0odKQYGuoe1wJMNpkPeflfh4/8tsF RDEJ2uQd8xilwnlQG/+hc5e4s5mlt8Zavdhx39ci7K0Gi3G+OlAvun5BMEd3VGf01fWu3o SaVpaKVo3yrd5ZE3fvrU0XfyqWmZ2DNmbzA2v5uAjo7GXLaGHBZT5gnRGshabw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rT5Kwy0BbcWPx/8y68bM2Nrx1nPf5itgY2jCLlTmzn4=; b=Xy0jND57nXvjOLVSihlH15lQSjht8sGmg40K4DtcPvMGVMkPsZSN0BEX7hWXT+TH5L2wrY VU32INBgiJ/emb5tLbpJz1LfOcyNjA8Ue2bdPw3uuMLfRDrqbuuobmvuz/+pEMuk6SMdaw LzBClEToaNT0LULmvW2MA/xaf4meD0zo8JJw0SKgE0KJi0xvFXgcXgWzogjVEHpPtqFpsr HZjmAM4S4dcypsXJ/ILZuEBgO0sM4g6+ce37SSBTfBs2bI8De2z6V2FUg14T5lOJcW2Iyu mHyyWb5NEDXyM7mQ6rkXQE6C4lph+fzift4fkdIMEzLERBR4ABqqDrqHalG1Vw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706472306; a=rsa-sha256; cv=none; b=oxZK0iBdaCnzm2Wjt4XVKa5jWWGFx9OnsxhnpQQxsehFORx9YdiV4hHBEWCzcvFn/gWjkW 1iPj//ZkMMss+X0wWzARXK9/LpBgeExNr9ZmHYbbvvxyZAgChhOMqlEd493j0YUHuxjOpl IlJBly43GXXJY9v2NcRhAxyZc5UYhLIpSOhZZ2LE8CV1fF3h7jsbX+uS6YiZeQpEyYeUxJ IKpJWrT+yObRoblop7GfvvJzfp9P2u+mkYfgayG9YZP/s5AlQuYDH0TVxAit6zdQigYBk+ Q5GFopvNbnHLsflT+WhNeM6JX3nb53bDeZMvt+p26FVsWI8z73i96nnJRSuwdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNMq569thzLcv; Sun, 28 Jan 2024 20:05:05 +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 40SK55s7032510; Sun, 28 Jan 2024 20:05:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SK55oB032507; Sun, 28 Jan 2024 20:05:05 GMT (envelope-from git) Date: Sun, 28 Jan 2024 20:05:05 GMT Message-Id: <202401282005.40SK55oB032507@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: a03411e84728 - main - kboot: Move _start out of kboot and into libkboot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a03411e84728e9b267056fd31c7d1d9d1dc1b01e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a03411e84728e9b267056fd31c7d1d9d1dc1b01e commit a03411e84728e9b267056fd31c7d1d9d1dc1b01e Author: Warner Losh AuthorDate: 2024-01-28 18:53:59 +0000 Commit: Warner Losh CommitDate: 2024-01-28 20:04:31 +0000 kboot: Move _start out of kboot and into libkboot Move the startup code from kboot/kboot to kboot/libkboot and add the necessary infrastructure for it to build. move start_arch.h, a private header for libkboot, over as well. Sponsored by: Netflix --- stand/kboot/Makefile | 2 +- stand/kboot/Makefile.inc | 6 ++++++ stand/kboot/kboot/Makefile | 5 ++--- stand/kboot/libkboot/Makefile | 10 ++++++++++ stand/kboot/{kboot => libkboot}/arch/aarch64/start_arch.h | 0 stand/kboot/{kboot => libkboot}/arch/amd64/start_arch.h | 0 stand/kboot/{kboot => libkboot}/arch/powerpc64/start_arch.h | 0 stand/kboot/{kboot => libkboot}/crt1.c | 0 8 files changed, 19 insertions(+), 4 deletions(-) diff --git a/stand/kboot/Makefile b/stand/kboot/Makefile index 2e0b9d7a2e09..72dbabc00568 100644 --- a/stand/kboot/Makefile +++ b/stand/kboot/Makefile @@ -2,6 +2,6 @@ NO_OBJ=t .include -SUBDIR+= kboot +SUBDIR+= libkboot .WAIT kboot .include diff --git a/stand/kboot/Makefile.inc b/stand/kboot/Makefile.inc index 01b5f23410c8..02aecdad55f1 100644 --- a/stand/kboot/Makefile.inc +++ b/stand/kboot/Makefile.inc @@ -1 +1,7 @@ +# Bring in the mini-libc that we wrote + +KBOOTSRC=${BOOTSRC}/kboot +CFLAGS+=-I${KBOOTSRC}/include +LIBKBOOT=${BOOTOBJ}/kboot/libkboot/libkboot.a + .include "../Makefile.inc" diff --git a/stand/kboot/kboot/Makefile b/stand/kboot/kboot/Makefile index b9d68cddf97d..4054bb1da9f2 100644 --- a/stand/kboot/kboot/Makefile +++ b/stand/kboot/kboot/Makefile @@ -21,7 +21,6 @@ INSTALLFLAGS= -b SRCS= \ bootinfo.c \ conf.c \ - crt1.c \ gfx_fb_stub.c \ host_syscalls.c \ hostcons.c \ @@ -63,7 +62,7 @@ CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} CFLAGS+= -Wall -DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} -LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} +DPADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} ${LIBKBOOT} +LDADD= ${LDR_INTERP} ${LIBOFW} ${LIBSAFDT} ${LIBSA} ${LIBKBOOT} .include diff --git a/stand/kboot/libkboot/Makefile b/stand/kboot/libkboot/Makefile new file mode 100644 index 000000000000..415571617d2a --- /dev/null +++ b/stand/kboot/libkboot/Makefile @@ -0,0 +1,10 @@ +.include + +LIB= kboot +WARNS?= 4 + +CFLAGS+=-I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} + +SRCS= crt1.c + +.include diff --git a/stand/kboot/kboot/arch/aarch64/start_arch.h b/stand/kboot/libkboot/arch/aarch64/start_arch.h similarity index 100% rename from stand/kboot/kboot/arch/aarch64/start_arch.h rename to stand/kboot/libkboot/arch/aarch64/start_arch.h diff --git a/stand/kboot/kboot/arch/amd64/start_arch.h b/stand/kboot/libkboot/arch/amd64/start_arch.h similarity index 100% rename from stand/kboot/kboot/arch/amd64/start_arch.h rename to stand/kboot/libkboot/arch/amd64/start_arch.h diff --git a/stand/kboot/kboot/arch/powerpc64/start_arch.h b/stand/kboot/libkboot/arch/powerpc64/start_arch.h similarity index 100% rename from stand/kboot/kboot/arch/powerpc64/start_arch.h rename to stand/kboot/libkboot/arch/powerpc64/start_arch.h diff --git a/stand/kboot/kboot/crt1.c b/stand/kboot/libkboot/crt1.c similarity index 100% rename from stand/kboot/kboot/crt1.c rename to stand/kboot/libkboot/crt1.c From nobody Sun Jan 28 20:05:06 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNMq72Pg9z59CTT; Sun, 28 Jan 2024 20:05: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 4TNMq70mKsz3x9p; Sun, 28 Jan 2024 20:05:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jsNX6+1WzyXPfLHIhOcR5g19/NVzbObcMU2UA5YFyZU=; b=i6A7XngDFw9T6Gmh9YnCStz14OmO5ZXCL5hYH+CBn5bSNJ8iRRBqkBjUuo0zEoMJXMOPJb gClNqEAWYcVBboTj1zxdfDDoYaEJp+EVHxM/2Vj3ZtEmkotEcLwLbFqxMC+3T8ewQ8WrxH ldZATYfyaIrNJYyS+RMY/iBCzKkRz41AkTpKsRvLDt7tsVtE3kWxrJ/SfvBKT2THL9DHOZ Q97G6wpoxCQBYqglLoWREpWSU4xdZBZJiUyxxAy0ANsVe3mq+2uSKF+8rhPhB54LzRs5vf 7dQmgRHDM08rk8XQhhDbqaUEVvS3W5PPl734dpRWZTDEb0cZa8hl5LlY1I+vyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jsNX6+1WzyXPfLHIhOcR5g19/NVzbObcMU2UA5YFyZU=; b=jQcr/t9tGwx21WEZngMVH5SAxwbLRfu2+zYi9UWvJ0drs6KnTZRMoYgH9oaRZ9ekbg9rJq 8Rk3R8bMQ9ou/4RatAucHox3Y/Yga/vUwc2AARUoiV5ipaip2lxEDbYZ0Svp57er/b05z0 1pdt7j9jSi9pIjfNjugAK5ghx0q3ncfedcGU9XX+NywiY8+vgKiPtsEsFMHdDJP2TCZI31 nq3skF033g7V3qGEZB7CpXUf+LE/0bnvt4M3oYnr0JhX+lAdu441KXAjqAKoYwOEgo5x5+ xR9IHoEwCDnluaNCweiduAIojeW4VQo2hNoyvROxlHimI2MFchJerL21/Fyy1g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706472307; a=rsa-sha256; cv=none; b=RQhXhBhLDbsgwQEOXxv+EQusSIPV011QUCDW+2VjrPOdTF4MeVLPkSYMg/jps9b4AJCPa6 FdGph2k8/c6i9AMVi4iXVHczMRnlUeOMEKwllZeng1ls2dKuEjad33v20XErSDS5TWG4r4 No5ZJ1PCyfr8QgdqkyyUbO5nG+MT3Dwld+MgEqIAbzijED5m/jWxkRJsUzYSO/Bbi2TzyI s3NaBdh+2OMTaxLF1aRm+o5w6dooniyytl86Cc5gKl+JWZS7UI5REfEbGhFnLSMsL/DijB SKq6WRnpNwxMFUuYM/ToYwl/6W92cPPJwHGKE77D9OrTXWP1lou2fwzB5QiVLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNMq66zMJzLwt; Sun, 28 Jan 2024 20:05: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 40SK56dJ032550; Sun, 28 Jan 2024 20:05:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SK56IB032547; Sun, 28 Jan 2024 20:05:06 GMT (envelope-from git) Date: Sun, 28 Jan 2024 20:05:06 GMT Message-Id: <202401282005.40SK56IB032547@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 4aabaa1890e9 - main - kboot: Cleanup libkern reference List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4aabaa1890e927ed3dd34ccc4642268ea6a505ce Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4aabaa1890e927ed3dd34ccc4642268ea6a505ce commit 4aabaa1890e927ed3dd34ccc4642268ea6a505ce Author: Warner Losh AuthorDate: 2024-01-28 18:28:05 +0000 Commit: Warner Losh CommitDate: 2024-01-28 20:04:31 +0000 kboot: Cleanup libkern reference For aarch64 and amd64, we don't pull in anything from libkern, so we don't need it in our path. However, powerpc needs ucmpdi2 from libkern, so bring it into libkboot's build and omit it from loader.kboot. Sponsored by: Netflix --- stand/kboot/kboot/Makefile | 1 - stand/kboot/kboot/arch/powerpc64/Makefile.inc | 3 +-- stand/kboot/libkboot/Makefile | 2 ++ stand/kboot/libkboot/arch/powerpc64/Makefile.inc | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/stand/kboot/kboot/Makefile b/stand/kboot/kboot/Makefile index 4054bb1da9f2..ae32d878a3f4 100644 --- a/stand/kboot/kboot/Makefile +++ b/stand/kboot/kboot/Makefile @@ -57,7 +57,6 @@ HELP_FILENAME= loader.help.kboot # Always add MI sources .include "${BOOTSRC}/loader.mk" -.PATH: ${SYSDIR}/libkern CFLAGS+= -I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} CFLAGS+= -Wall diff --git a/stand/kboot/kboot/arch/powerpc64/Makefile.inc b/stand/kboot/kboot/arch/powerpc64/Makefile.inc index c29e69970505..338d1222ab65 100644 --- a/stand/kboot/kboot/arch/powerpc64/Makefile.inc +++ b/stand/kboot/kboot/arch/powerpc64/Makefile.inc @@ -1,7 +1,6 @@ CFLAGS+= -mcpu=powerpc64 -SRCS+= ppc64_elf_freebsd.c host_syscall.S kerneltramp.S load_addr.c fdt_arch.c -SRCS+= ucmpdi2.c +SRCS+= ppc64_elf_freebsd.c kerneltramp.S load_addr.c fdt_arch.c LDFLAGS= -nostdlib -static -T ${.CURDIR}/arch/${MACHINE_ARCH}/ldscript.powerpc diff --git a/stand/kboot/libkboot/Makefile b/stand/kboot/libkboot/Makefile index 415571617d2a..1b030ccfe018 100644 --- a/stand/kboot/libkboot/Makefile +++ b/stand/kboot/libkboot/Makefile @@ -7,4 +7,6 @@ CFLAGS+=-I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} SRCS= crt1.c +.sinclude "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" + .include diff --git a/stand/kboot/libkboot/arch/powerpc64/Makefile.inc b/stand/kboot/libkboot/arch/powerpc64/Makefile.inc new file mode 100644 index 000000000000..4cafaee28847 --- /dev/null +++ b/stand/kboot/libkboot/arch/powerpc64/Makefile.inc @@ -0,0 +1,4 @@ +CFLAGS+= -mcpu=powerpc64 + +.PATH: ${SYSDIR}/libkern +SRCS+= ucmpdi2.c From nobody Sun Jan 28 20:05:08 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNMq83Tkbz59Cch; Sun, 28 Jan 2024 20:05: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 4TNMq81zjXz3xCZ; Sun, 28 Jan 2024 20:05:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KSsN3SfOKF80A6TTNm/JQC4bHCKunzMwKeswL02HYl8=; b=eXIOTp2KFlXYDVEQuc4PQmAfPFBjF1j2K22GBKndZHv4WUOP//HrWGd+9B9IHO5f6iqTnl Wx+KYbxN8YRoeZEx20c9+liLuBcdTH0u1jLOFKES0rRwCZgOLQ9XpOjYQZIpNxPGXFBwkH 4IFdGa5f/gMpybe46U1+tVcbYsOIN3iTkUChGSnIv0KrsMVW/s7+TQNLYpYpZ/sOm3pDna qUL7uirLtDy78lyd4ZSOKBjQ1+Rfil1QlaKi8yt8IxY4TqDyXLu6nVPb/VIE+Aig2uY141 BbjiYL8gI2m8Jfk6TzLOhvi0Ml8+fu60+nHz6Aqx+b/u+lKI8Dj1A8ocMFKdcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472308; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KSsN3SfOKF80A6TTNm/JQC4bHCKunzMwKeswL02HYl8=; b=RClBxU3jZyCNT1P4ypYJoefngsoeGVl5+eXwRq7b81P4ORtjiAG8S4XAoLct/FGvO/dHFO I/uxhT/N63j5TZjsxX4yt7P1ErF5cbxVHq8vOSposQ/EEBoOCtHpv38cE1TSBvtEuXKQeI 4pjc1yEJaZY8P5WG1NRQ6KX//vnD9C8B2Bv7x64ru6z5yd9aSG6DqS4nTiE2YyKKRnrYuu F9btCnRehX+orV7Zyr0TkugFCL9WA9VAtAExkDJRbjf/3JCqV7cgrKry9Y1kG74YAlw4n2 6MLlMW7QDoL4KteKFZDCCE7Or2BqXsDm5V/hxL0rlrYp4Q7r4+cOzBL8j3JJjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706472308; a=rsa-sha256; cv=none; b=r6yt6BOZC9MSQDT9f97jnn76Lsr/uFh/pfJy6u7BAgqgCiIvreef+ykuzVZE2e/ce6hGBg Oyyp6sBv74t9qIJBMBsfClIz2embUOpNlWf96EL9YbT0kOvSNDaKpzDmHbBZu94tyAfIR7 2jF68HZ9MUpSxtfNxN+nnzcc7sRRpGsUif4QAo7s6rLt7LibfxlXrxVscKdUgRrz1LZHVw 0TrDkWow6oObFXtry8plkEGO00vmAKPKyZFhje2jm9vSQDorU1bypBi6ICicQwcypp38su AdaJykY9aCg1N5X+TQZaFcVs1tONeeKa8w72/KkQiWvTTMInCIN2M3PZL1gNrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNMq80wQzzLwv; Sun, 28 Jan 2024 20:05: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 40SK58b7032595; Sun, 28 Jan 2024 20:05:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SK58u8032592; Sun, 28 Jan 2024 20:05:08 GMT (envelope-from git) Date: Sun, 28 Jan 2024 20:05:08 GMT Message-Id: <202401282005.40SK58u8032592@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 099335814d5a - main - kboot: Move syscall stubs to libkboot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 099335814d5aafefb3603b1a0901a1432895455c Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=099335814d5aafefb3603b1a0901a1432895455c commit 099335814d5aafefb3603b1a0901a1432895455c Author: Warner Losh AuthorDate: 2024-01-28 19:34:13 +0000 Commit: Warner Losh CommitDate: 2024-01-28 20:04:31 +0000 kboot: Move syscall stubs to libkboot Sponsored by: Netflix --- stand/kboot/kboot/arch/aarch64/Makefile.inc | 2 +- stand/kboot/kboot/arch/amd64/Makefile.inc | 2 +- stand/kboot/libkboot/Makefile | 4 +++- stand/kboot/{kboot => libkboot}/arch/aarch64/host_syscall.S | 0 stand/kboot/{kboot => libkboot}/arch/amd64/host_syscall.S | 0 stand/kboot/{kboot => libkboot}/arch/powerpc64/host_syscall.S | 0 6 files changed, 5 insertions(+), 3 deletions(-) diff --git a/stand/kboot/kboot/arch/aarch64/Makefile.inc b/stand/kboot/kboot/arch/aarch64/Makefile.inc index 50388d38dbf2..744a15f363d3 100644 --- a/stand/kboot/kboot/arch/aarch64/Makefile.inc +++ b/stand/kboot/kboot/arch/aarch64/Makefile.inc @@ -1,4 +1,4 @@ -SRCS+= host_syscall.S tramp.S exec.c load_addr.c fdt_arch.c +SRCS+= tramp.S exec.c load_addr.c fdt_arch.c .PATH: ${BOOTSRC}/arm64/libarm64 CFLAGS+=-I${BOOTSRC}/arm64/libarm64 diff --git a/stand/kboot/kboot/arch/amd64/Makefile.inc b/stand/kboot/kboot/arch/amd64/Makefile.inc index fdd40fe9bc5a..55b1819ccdee 100644 --- a/stand/kboot/kboot/arch/amd64/Makefile.inc +++ b/stand/kboot/kboot/arch/amd64/Makefile.inc @@ -1,4 +1,4 @@ -SRCS+= host_syscall.S amd64_tramp.S elf64_freebsd.c load_addr.c fdt_arch.c +SRCS+= amd64_tramp.S elf64_freebsd.c load_addr.c fdt_arch.c CFLAGS+= -I${SYSDIR}/contrib/dev/acpica/include diff --git a/stand/kboot/libkboot/Makefile b/stand/kboot/libkboot/Makefile index 1b030ccfe018..31f4827e64b9 100644 --- a/stand/kboot/libkboot/Makefile +++ b/stand/kboot/libkboot/Makefile @@ -3,9 +3,11 @@ LIB= kboot WARNS?= 4 +.PATH: ${.CURDIR}/arch/${MACHINE_ARCH} CFLAGS+=-I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} -SRCS= crt1.c +SRCS= crt1.c \ + host_syscall.S .sinclude "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" diff --git a/stand/kboot/kboot/arch/aarch64/host_syscall.S b/stand/kboot/libkboot/arch/aarch64/host_syscall.S similarity index 100% rename from stand/kboot/kboot/arch/aarch64/host_syscall.S rename to stand/kboot/libkboot/arch/aarch64/host_syscall.S diff --git a/stand/kboot/kboot/arch/amd64/host_syscall.S b/stand/kboot/libkboot/arch/amd64/host_syscall.S similarity index 100% rename from stand/kboot/kboot/arch/amd64/host_syscall.S rename to stand/kboot/libkboot/arch/amd64/host_syscall.S diff --git a/stand/kboot/kboot/arch/powerpc64/host_syscall.S b/stand/kboot/libkboot/arch/powerpc64/host_syscall.S similarity index 100% rename from stand/kboot/kboot/arch/powerpc64/host_syscall.S rename to stand/kboot/libkboot/arch/powerpc64/host_syscall.S From nobody Sun Jan 28 20:05:09 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNMq94MG3z59Ccl; Sun, 28 Jan 2024 20:05: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 4TNMq9306nz3x5H; Sun, 28 Jan 2024 20:05:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QaDmvErduX6HCYuieEiQEcKr/kk2AcrTpQQp6MqcJtw=; b=aioASrbaQEmTAoeU6cc5mKxSXj44M/NGLkqWnSrktQjaqhrALnJh2W/4Abrf0RWFrR7gOr 3/Hgmg5O2gf+PHorPrtBSEulU4KvXrRrlZzP8TkhoW/YcbjXYssMmhlUnb3EzXnJcX1A/V GAMy10mBk4gx8TQmmjwHt0z6VeOG8/Q4N0EwXwwWj23wzlQDGHrV73iqA1X68CY9S9rIPH pmJkMYiWSAyr0TNYJgLsAtNWbsr8FuFSJ6I6WanIhCVBlixPdLFO2Fx7O1x52lilYtrmfm fs9VcAicM0oUj1FJIdwGgBFd6Nq3m32v0ESPRL2phqlfKi++ZAkRPPOHTtgPQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QaDmvErduX6HCYuieEiQEcKr/kk2AcrTpQQp6MqcJtw=; b=pvW9COLGWAMiL/twP5Jh9y5Oc1i8Rd666IsVr8mTD6qGaVSXelwr7eHzVF/pBiawg7C5bv L+tQM1CGnPXpw0ISwRyAnAjPGPDu3S8cN6MkjGNU6GrAho0LnGm7SLnThWk2wkJ9rx5q62 XBipP+nNBBjd18i4ygYjGw+dhmFBPrCs3WqWC7cFg25VvXYEMqXEWK/13Uk5sRx8EBUKzA xjVt7Wno273YW4n5oo7mc+KTeSbDJ1Rl2DcPFWb6GZg7EUWWvVnbSMkcW9QgOr+lon596g oDHGCxLDkvLLcez8EwGi31pHcKtNH2/mu/TVVPqWrLqsq7E+GrDKkhZviP7W/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706472309; a=rsa-sha256; cv=none; b=INcyTtxjDnxCmKMlGrDYe5evUmpq4/5WxqeKHdsZjk8oygxBb01lbf3tiwEFxdxiFVU12h kIWvidu+Ni48ECsc2mckQ2+Jv+dx2li1YUab44ehqudRHuSu9jSIpXQZCM8Qx3zssEj2+3 7SlAm0+ZOzM8F0iZt89eIO/MEcHLMHsj9fSePk9xeF0HU7kqUhNvXbnZ9GgZUr+mVU0Hop vK6+KnL++wTJ8ulKzFNaD1cnWIfXZfnK2rfIVzyIpcut4d4xDplQ5EHTMTem9Pe9O1E9tl iy1FL+y9aJ5s6khwyl4Y0JCu3TVGGHh8DK0QZ4E8BUSL1GS+0OD1Ym7Q2JJang== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNMq91qG2zLww; Sun, 28 Jan 2024 20:05: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 40SK59Cb032640; Sun, 28 Jan 2024 20:05:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SK59bL032637; Sun, 28 Jan 2024 20:05:09 GMT (envelope-from git) Date: Sun, 28 Jan 2024 20:05:09 GMT Message-Id: <202401282005.40SK59bL032637@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 2e3f49888ec8 - main - kboot: Move system calls to libkboot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e3f49888ec8851bafb22011533217487764fdb0 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2e3f49888ec8851bafb22011533217487764fdb0 commit 2e3f49888ec8851bafb22011533217487764fdb0 Author: Warner Losh AuthorDate: 2024-01-28 19:08:45 +0000 Commit: Warner Losh CommitDate: 2024-01-28 20:04:31 +0000 kboot: Move system calls to libkboot Sponsored by: Netflix --- stand/kboot/Makefile.inc | 2 +- stand/kboot/{kboot => include}/arch/aarch64/stat_arch.h | 0 stand/kboot/{kboot => include}/arch/aarch64/syscall_nr.h | 0 stand/kboot/{kboot => include}/arch/amd64/stat_arch.h | 0 stand/kboot/{kboot => include}/arch/amd64/syscall_nr.h | 0 stand/kboot/{kboot => include}/arch/powerpc64/stat_arch.h | 0 stand/kboot/{kboot => include}/arch/powerpc64/syscall_nr.h | 0 stand/kboot/{kboot => include}/host_syscall.h | 0 stand/kboot/kboot/Makefile | 1 - stand/kboot/libkboot/Makefile | 3 ++- stand/kboot/{kboot => libkboot}/host_syscalls.c | 0 11 files changed, 3 insertions(+), 3 deletions(-) diff --git a/stand/kboot/Makefile.inc b/stand/kboot/Makefile.inc index 02aecdad55f1..90a1b9a17e3e 100644 --- a/stand/kboot/Makefile.inc +++ b/stand/kboot/Makefile.inc @@ -1,7 +1,7 @@ # Bring in the mini-libc that we wrote KBOOTSRC=${BOOTSRC}/kboot -CFLAGS+=-I${KBOOTSRC}/include +CFLAGS+=-I${KBOOTSRC}/include -I${KBOOTSRC}/include/arch/${MACHINE_ARCH} LIBKBOOT=${BOOTOBJ}/kboot/libkboot/libkboot.a .include "../Makefile.inc" diff --git a/stand/kboot/kboot/arch/aarch64/stat_arch.h b/stand/kboot/include/arch/aarch64/stat_arch.h similarity index 100% rename from stand/kboot/kboot/arch/aarch64/stat_arch.h rename to stand/kboot/include/arch/aarch64/stat_arch.h diff --git a/stand/kboot/kboot/arch/aarch64/syscall_nr.h b/stand/kboot/include/arch/aarch64/syscall_nr.h similarity index 100% rename from stand/kboot/kboot/arch/aarch64/syscall_nr.h rename to stand/kboot/include/arch/aarch64/syscall_nr.h diff --git a/stand/kboot/kboot/arch/amd64/stat_arch.h b/stand/kboot/include/arch/amd64/stat_arch.h similarity index 100% rename from stand/kboot/kboot/arch/amd64/stat_arch.h rename to stand/kboot/include/arch/amd64/stat_arch.h diff --git a/stand/kboot/kboot/arch/amd64/syscall_nr.h b/stand/kboot/include/arch/amd64/syscall_nr.h similarity index 100% rename from stand/kboot/kboot/arch/amd64/syscall_nr.h rename to stand/kboot/include/arch/amd64/syscall_nr.h diff --git a/stand/kboot/kboot/arch/powerpc64/stat_arch.h b/stand/kboot/include/arch/powerpc64/stat_arch.h similarity index 100% rename from stand/kboot/kboot/arch/powerpc64/stat_arch.h rename to stand/kboot/include/arch/powerpc64/stat_arch.h diff --git a/stand/kboot/kboot/arch/powerpc64/syscall_nr.h b/stand/kboot/include/arch/powerpc64/syscall_nr.h similarity index 100% rename from stand/kboot/kboot/arch/powerpc64/syscall_nr.h rename to stand/kboot/include/arch/powerpc64/syscall_nr.h diff --git a/stand/kboot/kboot/host_syscall.h b/stand/kboot/include/host_syscall.h similarity index 100% rename from stand/kboot/kboot/host_syscall.h rename to stand/kboot/include/host_syscall.h diff --git a/stand/kboot/kboot/Makefile b/stand/kboot/kboot/Makefile index ae32d878a3f4..475f863b77bd 100644 --- a/stand/kboot/kboot/Makefile +++ b/stand/kboot/kboot/Makefile @@ -22,7 +22,6 @@ SRCS= \ bootinfo.c \ conf.c \ gfx_fb_stub.c \ - host_syscalls.c \ hostcons.c \ hostdisk.c \ hostfs.c \ diff --git a/stand/kboot/libkboot/Makefile b/stand/kboot/libkboot/Makefile index 31f4827e64b9..33674da83661 100644 --- a/stand/kboot/libkboot/Makefile +++ b/stand/kboot/libkboot/Makefile @@ -7,7 +7,8 @@ WARNS?= 4 CFLAGS+=-I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} SRCS= crt1.c \ - host_syscall.S + host_syscall.S \ + host_syscalls.c .sinclude "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" diff --git a/stand/kboot/kboot/host_syscalls.c b/stand/kboot/libkboot/host_syscalls.c similarity index 100% rename from stand/kboot/kboot/host_syscalls.c rename to stand/kboot/libkboot/host_syscalls.c From nobody Sun Jan 28 20:05:10 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNMqB6BH3z59CXF; Sun, 28 Jan 2024 20:05: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 4TNMqB43C5z3x7k; Sun, 28 Jan 2024 20:05:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=39ccBY3PBbYOt7UC4Hgs85RzLmGUnO/MUCBWRvsMAGA=; b=vF+MhcrcaUIspcSWRODabdXleSKcr2/Z0ix9eYzv5y0JWGQvoEXdVB+153zX7zueSPZ5F7 MVo9KDuzXQA4C9vvPNBjpMTKi8C/kpztjgOMZUHjmbgBN5D299jEcWd0v63EB1/mzLr9/C xKsZr48OpgVMHJKRwY/ezbIb7vP3/JCfnfiZXFlRNXELTRZogoxg2q686DvFG2I4NauCyh cOygacdBsX286XqBHKBCB1tPBb0bYBWRVYotOK5kh3OiZ2iKqpcugf47fgz2UTJGH5FV3f qtMCKD6UyqKSYltRTcxgDVWtHgTW3s4Pum+HX+LOLsWZoGxpDA7DLVy6XRhUQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472310; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=39ccBY3PBbYOt7UC4Hgs85RzLmGUnO/MUCBWRvsMAGA=; b=EcLTzP8tvgxnvJ/z2zI7rhJjzMHi75n3mhFqeFYc8dhJUxQwQ/kOg6QpK8lgymleY0wZ/J luykGiufUKjkbQE0xdy0su7I8/vq+EgGnLbz2Fwe3Izf3NfkqM7LjFnygiZYUdb42iMos+ J3W7bKOGc/RzTZRTAuMZ0wXVQZGSXWKxQuoQBQeP+NK2hH4111LLIuFnFSL5FBA8FNgL/h 6fNvuJzy08sg5QYuni4D+fZFyEzlDX0ZFr40vR+1KDmzT6/nBbJOHQ2ijlDL3zhqDbrTJT C8McD1Nzo1BsR6oPp0xSKTY+dR4HCOJyyQSfqJkAhwitkVSqJA90FhQoFVFuSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706472310; a=rsa-sha256; cv=none; b=v1ZcgAd1C1JGVko9TMAq1LELE5vVFs4Vb8Fw/q5kMZeTK6uShtS1RL96o4aTbzxdht1bCw SEPNwbWjIN1RzKCPHaIW2Yk/8FJXPEr+YEmJAYUi0oI3DPu0X/TkqYhrRpYlVBd8yurpq7 kyg8wJHXHHBmue6fn8g0fZbliqoaGpgwqVp2J0+7aYoxFM/S9XrvS/07uynbct6D/FE02W 1hhucyR8xT8a/SD8XczmBQ9/SY/djeY5tvDzSSzeoL+YS9GGebbeyfP9QDA9yhyHu1bOQh rg0nLE67YLV4XZzb+k9aw/iQO071hGa/rzglbh8IzvdApRwyQ1DYR5Vq/Mm6AQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNMqB2sfmzM0V; Sun, 28 Jan 2024 20:05: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 40SK5ANv032684; Sun, 28 Jan 2024 20:05:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SK5Afv032680; Sun, 28 Jan 2024 20:05:10 GMT (envelope-from git) Date: Sun, 28 Jan 2024 20:05:10 GMT Message-Id: <202401282005.40SK5Afv032680@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 36ef238cb604 - main - kboot: Move termios to libkboot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 36ef238cb604c827c696e975281f63d90641005f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=36ef238cb604c827c696e975281f63d90641005f commit 36ef238cb604c827c696e975281f63d90641005f Author: Warner Losh AuthorDate: 2024-01-28 19:28:30 +0000 Commit: Warner Losh CommitDate: 2024-01-28 20:04:31 +0000 kboot: Move termios to libkboot Sponsored by: Netflix --- stand/kboot/{kboot => include}/arch/aarch64/termios_arch.h | 0 stand/kboot/{kboot => include}/arch/amd64/termios_arch.h | 0 stand/kboot/{kboot => include}/arch/powerpc64/termios_arch.h | 0 stand/kboot/{kboot => include}/termios.h | 0 stand/kboot/{kboot => include}/termios_gen.h | 0 stand/kboot/kboot/Makefile | 1 - stand/kboot/libkboot/Makefile | 3 ++- stand/kboot/{kboot => libkboot}/termios.c | 0 8 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stand/kboot/kboot/arch/aarch64/termios_arch.h b/stand/kboot/include/arch/aarch64/termios_arch.h similarity index 100% rename from stand/kboot/kboot/arch/aarch64/termios_arch.h rename to stand/kboot/include/arch/aarch64/termios_arch.h diff --git a/stand/kboot/kboot/arch/amd64/termios_arch.h b/stand/kboot/include/arch/amd64/termios_arch.h similarity index 100% rename from stand/kboot/kboot/arch/amd64/termios_arch.h rename to stand/kboot/include/arch/amd64/termios_arch.h diff --git a/stand/kboot/kboot/arch/powerpc64/termios_arch.h b/stand/kboot/include/arch/powerpc64/termios_arch.h similarity index 100% rename from stand/kboot/kboot/arch/powerpc64/termios_arch.h rename to stand/kboot/include/arch/powerpc64/termios_arch.h diff --git a/stand/kboot/kboot/termios.h b/stand/kboot/include/termios.h similarity index 100% rename from stand/kboot/kboot/termios.h rename to stand/kboot/include/termios.h diff --git a/stand/kboot/kboot/termios_gen.h b/stand/kboot/include/termios_gen.h similarity index 100% rename from stand/kboot/kboot/termios_gen.h rename to stand/kboot/include/termios_gen.h diff --git a/stand/kboot/kboot/Makefile b/stand/kboot/kboot/Makefile index 475f863b77bd..055027b85eb2 100644 --- a/stand/kboot/kboot/Makefile +++ b/stand/kboot/kboot/Makefile @@ -29,7 +29,6 @@ SRCS= \ kbootfdt.c \ main.c \ seg.c \ - termios.c \ util.c \ vers.c diff --git a/stand/kboot/libkboot/Makefile b/stand/kboot/libkboot/Makefile index 33674da83661..d9ce08cb0856 100644 --- a/stand/kboot/libkboot/Makefile +++ b/stand/kboot/libkboot/Makefile @@ -8,7 +8,8 @@ CFLAGS+=-I${.CURDIR} -I${.CURDIR}/arch/${MACHINE_ARCH} SRCS= crt1.c \ host_syscall.S \ - host_syscalls.c + host_syscalls.c \ + termios.c .sinclude "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc" diff --git a/stand/kboot/kboot/termios.c b/stand/kboot/libkboot/termios.c similarity index 100% rename from stand/kboot/kboot/termios.c rename to stand/kboot/libkboot/termios.c From nobody Sun Jan 28 20:05:11 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNMqC6bMGz59CPJ; Sun, 28 Jan 2024 20:05:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TNMqC4jGVz3x5h; Sun, 28 Jan 2024 20:05:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DFib+pYn/c0Y302ONXJfaQTtg33lIjLW9T6bGMbYLew=; b=pj3RDv0fcCfxi8/OZmnwjyKzTxx+TNszjRp6V+9/y+0e7FYBWhlc+c4sDDT0/hhWef5Z8E XexbRpm+OPG8yS49KEFE9lGrRrASYmvgB549rqdkFtFgC87E446Hyb/EbJ5Fc0DLN4hjkj 6lPyOYkphhVOnJhRn5RNWnrT9Y5fST4Z6gt9HuWrDrO7A/oPH01CJU5bijGWolS6GiE57L MOkdWKdMIcEC4rhGKnIIsIRoHHPl0siJzqnvJcGJOc9E3qbK4RPbItPu8gy5zJQOuNN5H8 iMkFmBMu3Pp7Loni7GJHU+QNcieJ19QVsyrXhhKr3EX9pOsl/YSA/P7ROtmByw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DFib+pYn/c0Y302ONXJfaQTtg33lIjLW9T6bGMbYLew=; b=mUdR9tKesQFA83Aric9ttqGVAwDlYRbsIBWLYznQTvZLRnoA0iwuk3QDqIrK0eu578F30A e/h3PnI8HryV1mt+MF9J4fH/JBZkyqeuVtXIOlSHAH2MCEXMptMH6NbRooAuO5ZxKRv2YL 0Ic9cVKsZN4m+mUAQVgohPJjNrkyc/HMPlocXgiI5yfA8db9w89RUur4EBumeL6uyB1IUO kvc7dyBeIJUZiw63SCIIIHQ/5SWtRQrlnBQElE/Ml3F7/q1G/dDeq/S6CdatE4tKfjwkmM 4qHrGiTr1G49p6iB0zTYlWkRe+vfPaRjZH7cQ+jU83jxLDPrgStypYeWRXRSAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706472311; a=rsa-sha256; cv=none; b=WltIJitDFhz2QlPYo2bn2AhVcvJ/vucyb1y79ZZRzNt1zn2LMfdl+G+PNhTMK3ycj0Qea8 kTTihLXfvrPMdrSMaB1P2QnpiD3TfUhpU6QTzp9u3MBPLko033pPv6eeNQRb1TVpE/uRmL +sAhCquthk9zhqEmyvYOPuJrLtvUGFadOZQY9dj2s5AWjO302f/TRV9LqpWJEpmnBRTusP GtUsjt0NAFR2QAgmgo8SO6BE0IKYRxXpSmIF3LeqKc5jayHvdF5PDW7getY1tojjcndfG0 T4UehFva+bCQ62JJBa+OB66FK9YD/T0esCobFiOGHOYMLPJdBO/uqbbCKH+n8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNMqC3ptnzLcw; Sun, 28 Jan 2024 20:05: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 40SK5Bxi032724; Sun, 28 Jan 2024 20:05:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SK5Bi0032721; Sun, 28 Jan 2024 20:05:11 GMT (envelope-from git) Date: Sun, 28 Jan 2024 20:05:11 GMT Message-Id: <202401282005.40SK5Bi0032721@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 2b7918f13c6f - main - kboot: Assert copyright here List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b7918f13c6fce378a75f8247b5dd203bf4a3c5d Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2b7918f13c6fce378a75f8247b5dd203bf4a3c5d commit 2b7918f13c6fce378a75f8247b5dd203bf4a3c5d Author: Warner Losh AuthorDate: 2024-01-28 19:17:44 +0000 Commit: Warner Losh CommitDate: 2024-01-28 20:04:32 +0000 kboot: Assert copyright here According to git blame I've 95%+ rewritten this file. Update copyright to reflect that, but give nod to Nathan for the original I started with. Sponsored by: Netflix --- stand/kboot/include/host_syscall.h | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/stand/kboot/include/host_syscall.h b/stand/kboot/include/host_syscall.h index fc44419201f6..fd3b7a0f362b 100644 --- a/stand/kboot/include/host_syscall.h +++ b/stand/kboot/include/host_syscall.h @@ -1,26 +1,9 @@ -/*- - * Copyright (C) 2014 Nathan Whitehorn - * All rights reserved. +/* + * Copyright (c) 2022, Netflix, Inc. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * SPDX-License-Identifier: BSD-2-Clause * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * Rewritten from the original host_syscall.h Copyright (C) 2014 Nathan Whitehorn */ #ifndef _HOST_SYSCALL_H From nobody Sun Jan 28 20:05:12 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNMqF0vdSz59CgC; Sun, 28 Jan 2024 20:05: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 4TNMqD66vdz3xP4; Sun, 28 Jan 2024 20:05:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IouZ2/4YcdFE1tvS/MBI8KKeYvdwYlLGQ2uV8j574OQ=; b=HfhiSuEE21HHf7pGopywbSl8ZwOP27q5fw+Iq2osdkqrRufXzfoix32VXc0qK7IW+H+lJx zhOci+QnmUsbmcVqkWa4GQ3+g+jWcYIpyzrPRlpSd7A/7k0nSYnroy+v59reJQCn9k5+Vg UOCBe7mz6jxz2kOq8OU8h+l4yHK31aO+JZhe/7NSo6GXCTOxg+BxtslPsWMWeDhaZpO5XC Zn6NhoysnPSto0msSZRKegiO6163JVmNSPxyfQSxYfVFabg2i7qGciS7VPPKY+bv24dBgv EoxquRtC96WyVAExJ9wdyrcjnqQyVzl0r0NgRdc5zwZKrb7NUVIEmx3Kg4Bcjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706472312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IouZ2/4YcdFE1tvS/MBI8KKeYvdwYlLGQ2uV8j574OQ=; b=taqNxULTkNL0U0AW55o/kzRwrdhzubasue2bLAjuUvRbeLTTW/g6FHA1DJjyVp1lFhOPn/ x26e/f/yw5rmwzwX9+T48gpKSbw5HVeTbBmMjIocxGi2YEHIvFkLPNpj32lMMe/Yiw8wNU BGh/yCp8ab2cAJ7rELn1fgBxUkyuT3Zob6O7WWvDVlk2tgzv2vvucAOLiqIYH5m2ZjfloI keVeUoOfB0cb8P6FQqtAUuTC5i0C6qdAzhKXMjsm4pfGa7Mg3aDMNUkDTOG7h7+HlYxXpv gbahy5BP9GDJSSDclP6DvNbNcx1hvZmdKM0GnNKmaqx//UA0NnTtwW/QPzdVxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706472312; a=rsa-sha256; cv=none; b=DF9XI5581RwKVdCImxeP4h9Oy+VJjzQccocfzVC5bDBiS5yw104Y7K2Wx0qBlbrch+rdlo A0P2NYhjqbHGnwnc/Xs1aTpMtxfWQnujix3XVL+FCHohzDob6O45z/VVk5LLvwNtFmk9Z5 welbGXfeB60jPdNGUskajlli6ODtfJ2pi442Qhdso78FqW8IqXrE88YeDBpzpxNDA+hFIG kn8MDVl72n4fWGnHjsFddi3TS9Y01+crK0Q03gewMLsHn9cSEbBzG09KAs9/FV8brP3dg0 7WqRiLVUR3nQoD7XjvXnwqzRIvbb/nhiy7FfFsi27zqSaohy9/y0Kzo7Wq/jjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNMqD4x5jzLTH; Sun, 28 Jan 2024 20:05: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 40SK5CqY032769; Sun, 28 Jan 2024 20:05:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SK5CLT032766; Sun, 28 Jan 2024 20:05:12 GMT (envelope-from git) Date: Sun, 28 Jan 2024 20:05:12 GMT Message-Id: <202401282005.40SK5CLT032766@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 8f7327dceecc - main - kboot: update copyright on these files. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f7327dceecc225029b17378e4a26ae0b73a0a49 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=8f7327dceecc225029b17378e4a26ae0b73a0a49 commit 8f7327dceecc225029b17378e4a26ae0b73a0a49 Author: Warner Losh AuthorDate: 2024-01-28 19:19:32 +0000 Commit: Warner Losh CommitDate: 2024-01-28 20:04:32 +0000 kboot: update copyright on these files. host_syscalls.c: I've written, so put Netflix copyright on. It's possible in the confusion that Nathan wrote the host_gettimeofday implementation. syscall_nr: These files likely can't enjoy copyright protection since they are just facts (the per-arch Linux system calls), so add a note they are in the public domain. Sponsored by: Netflix --- stand/kboot/include/arch/aarch64/syscall_nr.h | 4 ++++ stand/kboot/include/arch/amd64/syscall_nr.h | 4 ++++ stand/kboot/include/arch/powerpc64/syscall_nr.h | 4 ++++ stand/kboot/libkboot/host_syscalls.c | 6 ++++++ 4 files changed, 18 insertions(+) diff --git a/stand/kboot/include/arch/aarch64/syscall_nr.h b/stand/kboot/include/arch/aarch64/syscall_nr.h index 83069dd8dc76..5c776db81d03 100644 --- a/stand/kboot/include/arch/aarch64/syscall_nr.h +++ b/stand/kboot/include/arch/aarch64/syscall_nr.h @@ -1,3 +1,7 @@ +/* + * This file is in the public domain. It only recounts facts in the only way + * possible. + */ #define SYS_close 57 #define SYS_dup 23 #define SYS_exit 93 diff --git a/stand/kboot/include/arch/amd64/syscall_nr.h b/stand/kboot/include/arch/amd64/syscall_nr.h index 2cf26d7ca4dc..705b39c62f44 100644 --- a/stand/kboot/include/arch/amd64/syscall_nr.h +++ b/stand/kboot/include/arch/amd64/syscall_nr.h @@ -1,3 +1,7 @@ +/* + * This file is in the public domain. It only recounts facts in the only way + * possible. + */ #define SYS_close 3 #define SYS_dup 32 #define SYS_exit 60 diff --git a/stand/kboot/include/arch/powerpc64/syscall_nr.h b/stand/kboot/include/arch/powerpc64/syscall_nr.h index 735e79a09158..50946a4f058c 100644 --- a/stand/kboot/include/arch/powerpc64/syscall_nr.h +++ b/stand/kboot/include/arch/powerpc64/syscall_nr.h @@ -1,3 +1,7 @@ +/* + * This file is in the public domain. It only recounts facts in the only way + * possible. + */ #define SYS_close 6 #define SYS_dup 41 #define SYS_exit 1 diff --git a/stand/kboot/libkboot/host_syscalls.c b/stand/kboot/libkboot/host_syscalls.c index 092ddfd133fd..551ff6b777d6 100644 --- a/stand/kboot/libkboot/host_syscalls.c +++ b/stand/kboot/libkboot/host_syscalls.c @@ -1,3 +1,9 @@ +/* + * Copyright (c) 2022-2024, Netflix, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + #include "host_syscall.h" #include "syscall_nr.h" #include From nobody Sun Jan 28 20:23:39 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNNDX0vtbz59Dnm; Sun, 28 Jan 2024 20:23: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 4TNNDX0NN3z42SJ; Sun, 28 Jan 2024 20:23:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706473420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wXRek7SbU+tW3jofN21ZHgpouM761ey2Oe9lQtcVmDg=; b=JiMUYs/s0odgrmSkW3e4/AEcmP0i4lNUS88rKQcBv9yr/jYm25xx7ibm2/Kvvu125vwIV2 NAW23w7hhesZRp/iEBfkX7EOu8nrv5SSpGcoK6rgDBKXcqIciTsZlAHvCE4aHoclM+FqZj 64glbcKKyVBLZSI64jti96XxiPljai4fEXtYmyUYM3O+fjq51g627eYq0/kxp/PvVQK9EB Y96slAV+joNZY/dhMRYnOeq+xzlpMQcziot+BXvM6WouP7SQPN4VDciaVx2S+g4GoBDli9 ScmBvlhSoXc0oplB63F74JL8EMmT0qCvNIetg0b5/jUu4XlQMSDIOKJE2gUajA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706473420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wXRek7SbU+tW3jofN21ZHgpouM761ey2Oe9lQtcVmDg=; b=Vek1wyOF+ReCCJrNIubaLogkDLcwncc2QHbgYg7xQIlNBWKlmKUTkzAC6wtfDmXKYWRLzF hJvxeVZ25gvltnjl4LsBWiC/FD9JCc5Hx8Crf3ymAsuxIj/nHiIL2J+YE3gBIi1w51pfng P+QMPaey2QMTHxudg+YogVy9YvB8cPGA2239zqE5R0ttRJp4xpxhkbL+Ru4+51S0svcKkK /agl+KlB+e4byMpar+FdZxuIXWPN9J0pidXhkvOhaIl8sL2TIiH5+tgT21L+eeYHgW6bt1 cArwMpuG9uJIKX51Xmclf3hvok0R5D4bjBLrFQqN66bpTXDrQ2MY7J9jY3mIeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706473420; a=rsa-sha256; cv=none; b=f/lS6MLLoS8tyW0aCAnsKoE318bwCsEXEs2BdC0zloahvSK9BZVrgImChnioXUGvxvLzay O+SRNBDwcY+ZYjM6NpLtyhp3Jq/6zCnrPYDybHu4eiwHZFMAmM91aO1FohWwU42koNSczO KYHr1yE33IbOyudj7ocOpMG9MERTFwBvATEYooK3JMozHGVmtJIrkBYmBvpyXLDS+4abBn rP5B0JOeYTj3KdykudLmWN8fF61q6umd/6M7aYq3X/MwETI1uoMiK5C+mdwqe74+7demnE cDHv4sDDowcdWLRyQkMAc5DWWJgZKPJOMwmMOy72BR71X4qVIYZyK8JmNUPz9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TNNDW6XsZzMR9; Sun, 28 Jan 2024 20:23: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 40SKNdqj065394; Sun, 28 Jan 2024 20:23:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40SKNdnw065391; Sun, 28 Jan 2024 20:23:39 GMT (envelope-from git) Date: Sun, 28 Jan 2024 20:23:39 GMT Message-Id: <202401282023.40SKNdnw065391@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: fb87726303b6 - main - snd_hdspe(4): Per device sysctl for period. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb87726303b6e620a06fec1d3b2988d428e33ac2 Auto-Submitted: auto-generated The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=fb87726303b6e620a06fec1d3b2988d428e33ac2 commit fb87726303b6e620a06fec1d3b2988d428e33ac2 Author: Florian Walpen AuthorDate: 2024-01-28 20:18:20 +0000 Commit: Ruslan Bukin CommitDate: 2024-01-28 20:20:26 +0000 snd_hdspe(4): Per device sysctl for period. Let the user choose a period (interrupt cadence in samples), in the official RME drivers this setting is available as "Buffer Size". Override the period propagated through blocksize by pcm channel latency settings (see sound(4)), since these are unreliable and differ between playback and recording channels. Differential Revision: https://reviews.freebsd.org/D43527 --- share/man/man4/snd_hdspe.4 | 7 ++++++- sys/dev/sound/pci/hdspe-pcm.c | 3 +++ sys/dev/sound/pci/hdspe.c | 38 ++++++++++++++++++++++++++++++++++++++ sys/dev/sound/pci/hdspe.h | 1 + 4 files changed, 48 insertions(+), 1 deletion(-) diff --git a/share/man/man4/snd_hdspe.4 b/share/man/man4/snd_hdspe.4 index 6023cd3d2ccd..d4ddc70f4070 100644 --- a/share/man/man4/snd_hdspe.4 +++ b/share/man/man4/snd_hdspe.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 8, 2024 +.Dd January 19, 2024 .Dt SND_HDSPE 4 .Os .Sh NAME @@ -76,6 +76,11 @@ To adjust the following sysctl identifiers for a specific sound card, insert the respective device number in place of .Ql 0 . .Bl -tag -width indent +.It Va dev.hdspe.0.period +The number of samples processed per interrupt, from 32, 64, 128, up to 4096. +Setting a lower value here results in less latency, but increases system load +due to frequent interrupt processing. +Extreme values may cause audio gaps and glitches. .It Va dev.hdspe.0.clock_list Lists possible clock sources to sync with, depending on the hardware model. This includes internal and external master clocks as well as incoming digital diff --git a/sys/dev/sound/pci/hdspe-pcm.c b/sys/dev/sound/pci/hdspe-pcm.c index db39b867879f..f6c7c84e026e 100644 --- a/sys/dev/sound/pci/hdspe-pcm.c +++ b/sys/dev/sound/pci/hdspe-pcm.c @@ -891,6 +891,9 @@ hdspechan_setblocksize(kobj_t obj, void *data, uint32_t blocksize) blocksize /= 4 /* samples */; + if (sc->force_period > 0) + blocksize = sc->force_period; + /* First look for equal latency. */ for (i = 0; latency_map[i].period != 0; i++) { if (latency_map[i].period == blocksize) diff --git a/sys/dev/sound/pci/hdspe.c b/sys/dev/sound/pci/hdspe.c index e0197d1e981a..b1ca67bdc313 100644 --- a/sys/dev/sound/pci/hdspe.c +++ b/sys/dev/sound/pci/hdspe.c @@ -228,6 +228,31 @@ hdspe_map_dmabuf(struct sc_info *sc) } } +static int +hdspe_sysctl_period(SYSCTL_HANDLER_ARGS) +{ + struct sc_info *sc = oidp->oid_arg1; + int error; + unsigned int period; + + period = sc->force_period; + + /* Process sysctl (unsigned) integer request. */ + error = sysctl_handle_int(oidp, &period, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + + /* Period is from 2^5 to 2^14, 0 falls back to pcm latency settings. */ + sc->force_period = 0; + if (period > 0) { + sc->force_period = 32; + while (sc->force_period < period && sc->force_period < 4096) + sc->force_period <<= 1; + } + + return (0); +} + static int hdspe_sysctl_clock_preference(SYSCTL_HANDLER_ARGS) { @@ -419,6 +444,13 @@ hdspe_init(struct sc_info *sc) /* Set latency. */ sc->period = 32; + /* + * The pcm channel latency settings propagate unreliable blocksizes, + * different for recording and playback, and skewed due to rounding + * and total buffer size limits. + * Force period to a consistent default until these issues are fixed. + */ + sc->force_period = 256; sc->ctrl_register = hdspe_encode_latency(7); /* Set rate. */ @@ -524,6 +556,12 @@ hdspe_attach(device_t dev) sc, 0, hdspe_sysctl_clock_list, "A", "List of supported clock sources"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "period", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, + sc, 0, hdspe_sysctl_period, "A", + "Force period of samples per interrupt (32, 64, ... 4096)"); + return (bus_generic_attach(dev)); } diff --git a/sys/dev/sound/pci/hdspe.h b/sys/dev/sound/pci/hdspe.h index d5d8dd46e580..81116e0cd437 100644 --- a/sys/dev/sound/pci/hdspe.h +++ b/sys/dev/sound/pci/hdspe.h @@ -227,6 +227,7 @@ struct sc_info { bus_dmamap_t rmap; uint32_t period; uint32_t speed; + uint32_t force_period; }; #define hdspe_read_1(sc, regno) \ From nobody Sun Jan 28 20:23:59 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TNNFD62Xrz59F0v for ; Sun, 28 Jan 2024 20:24:16 +0000 (UTC) (envelope-from qgmcrae@yahoo.com) Received: from sonic301-32.consmr.mail.ne1.yahoo.com (sonic301-32.consmr.mail.ne1.yahoo.com [66.163.184.201]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4TNNFD021fz446G for ; Sun, 28 Jan 2024 20:24:15 +0000 (UTC) (envelope-from qgmcrae@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=aU0QrhMU; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of qgmcrae@yahoo.com designates 66.163.184.201 as permitted sender) smtp.mailfrom=qgmcrae@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1706473454; bh=oQVrm4JM1X0wDCMXvmOHv4D9tQl39pOLC72bTquZ9bE=; h=From:Date:Subject:To:References:From:Subject:Reply-To; b=aU0QrhMU8e4QR5fd3Ub+jXjcQ4PDjoZ/qzNNDdgcMlDcwxOQejAIlfUYQjFFwF4Y7+OxCJ6rW842sJVAsnLKjVTYc1HlbaCgdmiIov0jvrJYi7lrFzOCXsy956+NR4PUTm+C7py0L2fX/Bb9o7kyZ3jsHjkFkBDz0/KlmhqM0myVKUMiQm5AupneRkG/cpmspMm6HcEB/YZm/ycrLqHVbpTlYuK0FjD+y9PMCN1I0KIaUmT3uyGdjD49CbmvBd3i3PaowDR9mZrBaDsdn99NJ6gY2Wdxzkw3fbSxXd+KO0V2uddlis1WdOcccWlckTH98q7YGOGBv8fwSdwy2UmfFQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1706473454; bh=FVJhfADuWNVwjzG3qL77CPJEO7wUBjIrfIQluwty7QP=; h=X-Sonic-MF:From:Date:Subject:To:From:Subject; b=dA/yeSe97SfPVx2qIoUfDk427UxTSdcmxW/itHyLR+zCR9ctukIkjFg5h2W5Zwdqsth7n4FNcsQYgbLiT8LwITzQqhkcBa930OU+U3xXJy7b94TdJSkQgwQM2NhuOGtazrpp6vQoWbc1dOPkEsCtyVQgj3R1yeuio1YoHytG8J/mKV8XNKAXlY7TZWUzkJQJFeMUtIaCbZLmLJdQ7oyit585BpnmoNubws/PD1BkomzWYM8DN6lcOLLtJc6vIm+opdKgci/Xyu56FRrXty4k0Vd3VxOQdFZ7/G7GvHQPltz8yQ0pqHDXaAd0bLpgvW7C0/3bUp7UGzQiW1q2GX1Imw== X-YMail-OSG: kEWgwUwVM1kgrVEm9RtHb1DaaWUF0KTlqaA_CBeHF2ZvL7rQn_OpSKC1jXhoOgt LE1f5ov5_IXMkqE3CkEi6Yn2K4czwn690dpTwPTX7Hcs0esSYM2YZwq7vfT9pNoimYoBNKuJuffL iTK_KkTKKfWbcGEDyJi7Rc3oDOaGiuswz5AdsDvAb_dhH8u8ETLnmnViZbhQGyBFyD4blNcIBzog PhBf7YXmDwDLxcbn5kikwuxJUIvl0I6o0aX4P1HyjJC.ZAqdR42Odr3ATltCXwljotdK2nFxlWFt S79vI6XJiqCi.Gis_7_WHg_qleRhA5V5pY3Z.103yFEOMC5GR2AwqO0tUDW716nOpVixTetzzv8o RV5ZfxzOXvmx5rJame_cCOc56rD.ypbOC2ny2ZBIe3ChwVJvsIMd8eTG2bOiT9BpYgmXhL44ofJt ptbTdTmjp4w8tN5wjS_rjYC_BIu6.No1U05GMXogm7mSWLrPY4Mtoj83d524uM4SF4qUALOreDkO VLfI9uxqNtq0VbS_j_ROm.9CvvdVQs3ysYrJpnnVCvdXuMr9Mfq3jwkCArw2ONMqdQlq5jv4zvZn k1FcdK80NwYQbfKvj0.3qwAeF92LiUJFUj4ZECXSJ9QUVpHzdG36SFYvGuJx1DZfq.jbx6uCWEkM h3KeYHOC_ecaa6kbB.w2kBuzuhnvugdineEpTCkvqogYfTWFCm0CTf8qFRZ7l6tJ8waV6TiYuZsG IBpuXp2OVjNWwAZETdCz_FI4JjL_yz6QSWacURsBykQ2Ku8vi4h_xPDqprq6cg5jHGE3kXSBljVF QAVBL4H2Scfr6v93k60ieKHRE7NfmXAwUKDBT_pE8fhIlJQgkvJNk7W4n1fZLG5YBBiZtHxlzryw FXi.m0eZ6OnBJeh8R6x8OcvYxq5l.uAW_gfwuN7POfsCZ1k4Ugk3oNegqjxntYneE5andbkpJBWa pECq5Lv5QLpRYb3YygZYi8YjVGUAafnMNgyCVBFtVa5BUqUFHnj0nq15wqUffj6Xnmumz1zzEeBU GhkRxZCjlVDmpJIJJSz95yMLr1T8nOrGxt06nObpphUhZwrzI9vv29bHwTNfP1S6RDtX.m3PSC5K oaBku6tSpNOQ3tmN12pXF_CsFQwvVAM8quQzM_WymcRxi2jtU_RQd2dHeCV.Ne_ia7P.lnf85b.F Mgq03ASCIZxhi76xK0TUoTEnIper3RpTYNK0G4YNYDNomFJ9gV9ioEhzN5kjn_mkefecc6IqGh8J W91hTul9HkLQH736PN8dLq1gYQu7LHI.AXGuYIUxtnqDHCLFsRGezqnB7p5Yoj.2qah7MtvZtaLR .PrPbbPIpoSbGLzoykm2GAw7suAHra2Oh3xkbhi5nin_02Ew.7bVQeDfo4WbW4H6IdblFvxkciFA KU2E4CTx3odo9EvswV1akDUsLI.RTCiZMgxogzMBsWZcWGCMx8CYcWzQgmCL.3d5CVyPKVBwmgzS bWMmJrJy7HDFZfYlOu1OfnAQq7lr0vK37Mne08v4Dfy_fNBJcaFxYKXkw.PxbsnRhL7Fhg9cg94p QnD3pUtRW8Uk6fHl2kC16ka4orED8t74WUwe1qbkOFvy3v8Hp0AqU1YfZzD1JFoqulRU6kYnYjlz 1huKv5H2MfyjQkxyFyk79elU0n1j62rjzHJjCKhJweiNkV9Wn8v_kqnK7DBUM.rWRo.Cng7DuVRR lCi04P.gcdml1DocKqKIMpIooPriqieYkCswcqVdkjhaoCdwP6RelVMqcSrxvd1Yiw8vZysaTvTU fR2qIb14czfWFSudDYpyZf8yyKCniLxAMZLJYvmIFypSt7E9TuTaMRBjJrVtY8Klmorq5yAMRlRL 5q22sEvu_9B5Z36V6GbNSAmJv0rjOtHI7PI72maAB.aHGmG0iTxdkGGrV0XYeO5ibobuI8p5llVy _68LJAf3ADzXrBfkaVwcJjLk75wnigyXqq1bmmh3yPovMUPvYl5y7cNKGSs_ofGAGeVeHl8DAr7B SdCqGW7f42SmGqDLiiJklvYEwgeG8FBCaVkUwgqOpBw9zFrhG.axhX7pmm.79BCJmkDA6f1U2QDP 5a0CLugp6sLM7oZBw9O3JjOT_WLI98wiryt.Oj.lzdlFEvFUlRVqbpqsG2EcheCA7FgmKAF2m92h xV3DugmHclufyJxyrZXApKg3ThUB9xYIaDfdHmzn_.Ey34x07tO0qWg0rdUU.e9MCUSlPu0ZtBoI 7dzAA4EupzWG3I.RTdmCE9npqfcRyObM- X-Sonic-MF: X-Sonic-ID: 55851197-85bf-4734-8750-33abc562d150 Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.ne1.yahoo.com with HTTP; Sun, 28 Jan 2024 20:24:14 +0000 Received: by hermes--production-bf1-7d6dbd57c9-46rcv (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID fc81efaeee465707f2f140422995299f; Sun, 28 Jan 2024 20:24:10 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Quincy Mcrae List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org Mime-Version: 1.0 (1.0) Date: Sun, 28 Jan 2024 16:23:59 -0400 Subject: Unsubscribe Message-Id: <7E8E992A-928C-4FDD-8260-6B0E283FFA6A@yahoo.com> To: dev-commits-src-main@freebsd.org X-Mailer: iPhone Mail (21D50) References: <7E8E992A-928C-4FDD-8260-6B0E283FFA6A.ref@yahoo.com> X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.49 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.990]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; SUBJECT_ENDS_SPACES(0.50)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; FREEMAIL_FROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; APPLE_IOS_MAILER_COMMON(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[66.163.184.201:from]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; SINGLE_SHORT_PART(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[66.163.184.201:from] X-Rspamd-Queue-Id: 4TNNFD021fz446G Sent from my iPhone